[otb] 01/05: Imported Upstream version 4.2.1

Paolo Cavallini pcav-guest at moszumanska.debian.org
Mon Oct 6 16:24:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

pcav-guest pushed a commit to branch master
in repository otb.

commit 1db3fe2097c7609d2e20cae6b8ae29cec7d43a62
Author: Paolo Cavallini <cavallini at faunalia.it>
Date:   Mon Oct 6 12:23:34 2014 +0000

    Imported Upstream version 4.2.1
---
 .hg_archival.txt                                   |    5 +-
 .hgtags                                            |    3 +
 Applications/CMakeLists.txt                        |    2 +
 .../Classification/otbComputeConfusionMatrix.cxx   |    4 +-
 .../Classification/otbSOMClassification.cxx        |    2 +-
 Applications/DisparityMap/otbBlockMatching.cxx     |    2 +-
 Applications/DisparityMap/otbGeneratePlyFile.cxx   |    7 +-
 Applications/DisparityMap/otbStereoFramework.cxx   |    2 -
 .../otbDimensionalityReduction.cxx                 |    6 +-
 .../otbHaralickTextureExtraction.cxx               |    3 +-
 .../otbHomologousPointsExtraction.cxx              |   68 +-
 Applications/Filtering/CMakeLists.txt              |    5 +
 Applications/Filtering/otbDespeckle.cxx            |  178 +
 .../Hyperspectral/otbHyperspectralUnmixing.cxx     |    7 +-
 .../Hyperspectral/otbVertexComponentAnalysis.cxx   |    4 +-
 Applications/Projections/CMakeLists.txt            |   14 +-
 .../Projections/otbBundleToPerfectSensor.cxx       |  146 +-
 Applications/Projections/otbOrthoRectification.cxx |   36 +-
 .../Projections/otbRigidTransformResample.cxx      |   85 +-
 Applications/Projections/otbSuperimpose.cxx        |  134 +-
 Applications/Radiometry/otbOpticalCalibration.cxx  |  888 ++++-
 Applications/Segmentation/otbLSMSVectorization.cxx |   12 +-
 .../Segmentation/otbMeanShiftSmoothing.cxx         |   28 +-
 Applications/Segmentation/otbSegmentation.cxx      |    6 -
 Applications/Utils/CMakeLists.txt                  |    4 +-
 Applications/Utils/otbColorMapping.cxx             |    4 -
 Applications/Utils/otbCompareImages.cxx            |    1 +
 Applications/Utils/otbExtractROI.cxx               |    2 +-
 Applications/Utils/otbMultiResolutionPyramid.cxx   |    1 +
 Applications/Utils/otbReadImageInfo.cxx            |    2 +-
 Applications/Utils/otbSplitImage.cxx               |    1 +
 Applications/Utils/otbVectorDataExtractROI.cxx     |  169 +
 .../Utils/otbVectorDataExtractROIApplication.cxx   |  176 -
 CMake/CommonDefinitions.cmake                      |    2 +-
 CMake/FindOssim.cmake                              |   21 +-
 CMake/ImportBoost.cmake                            |    8 +-
 CMake/ImportCurl.cmake                             |    2 +-
 CMake/ImportExpat.cmake                            |    4 +-
 CMake/ImportGdal.cmake                             |   14 +-
 CMake/ImportJPEG2000.cmake                         |   12 +-
 CMake/ImportLibKML.cmake                           |   19 +-
 CMake/ImportMuParser.cmake                         |   62 +-
 CMake/ImportOpenThreads.cmake                      |   50 +-
 CMake/ImportOssim.cmake                            |   17 +-
 CMake/ImportSiftFast.cmake                         |    2 +-
 CMake/ImportTinyXML.cmake                          |   30 +-
 CMake/TestGDALHasOGR.cxx                           |   17 +-
 CMake/UseOTB.cmake.in                              |   17 +-
 CMake/otbIncludeDirectories.cmake                  |    6 +-
 CMakeLists.txt                                     |   11 +-
 Code/ApplicationEngine/CMakeLists.txt              |    2 +-
 .../otbWrapperAddProcessToWatchEvent.h             |    2 +-
 Code/ApplicationEngine/otbWrapperApplication.h     |    2 +-
 .../otbWrapperApplicationFactory.h                 |    2 +-
 .../otbWrapperApplicationHtmlDocGenerator.h        |    2 +-
 .../otbWrapperApplicationRegistry.h                |    2 +-
 Code/ApplicationEngine/otbWrapperChoiceParameter.h |    2 +-
 .../otbWrapperComplexInputImageParameter.cxx       |  130 -
 .../otbWrapperComplexInputImageParameter.h         |   39 +-
 .../otbWrapperComplexInputImageParameter.txx       |  173 +
 .../otbWrapperComplexOutputImageParameter.h        |    2 +-
 .../otbWrapperDirectoryParameter.h                 |    2 +-
 .../otbWrapperDocExampleStructure.h                |    2 +-
 .../otbWrapperElevationParametersHandler.cxx       |    2 +-
 .../otbWrapperElevationParametersHandler.h         |   14 +-
 Code/ApplicationEngine/otbWrapperEmptyParameter.h  |    2 +-
 .../otbWrapperInputFilenameListParameter.h         |    2 +-
 .../otbWrapperInputFilenameParameter.h             |    2 +-
 .../otbWrapperInputImageListParameter.h            |    2 +-
 .../otbWrapperInputImageParameter.cxx              |  228 +-
 .../otbWrapperInputImageParameter.h                |   73 +-
 .../otbWrapperInputImageParameter.txx              |  232 ++
 .../otbWrapperInputProcessXMLParameter.cxx         |   12 +-
 .../otbWrapperInputProcessXMLParameter.h           |    2 +-
 .../otbWrapperInputVectorDataListParameter.h       |    4 +-
 .../otbWrapperInputVectorDataParameter.h           |    2 +-
 .../otbWrapperListViewParameter.h                  |    2 +-
 .../otbWrapperMapProjectionParametersHandler.h     |    6 +-
 .../otbWrapperNumericalParameter.h                 |    2 +-
 .../otbWrapperOutputFilenameParameter.h            |    2 +-
 .../otbWrapperOutputImageParameter.h               |    2 +-
 .../otbWrapperOutputProcessXMLParameter.h          |    2 +-
 .../otbWrapperOutputVectorDataParameter.h          |    2 +-
 Code/ApplicationEngine/otbWrapperParameter.h       |    2 +-
 Code/ApplicationEngine/otbWrapperParameterGroup.h  |    2 +-
 Code/ApplicationEngine/otbWrapperParameterKey.h    |    2 +-
 Code/ApplicationEngine/otbWrapperRAMParameter.h    |    2 +-
 Code/ApplicationEngine/otbWrapperRadiusParameter.h |    2 +-
 .../otbWrapperStringListParameter.h                |    2 +-
 Code/ApplicationEngine/otbWrapperStringParameter.h |    2 +-
 Code/BasicFilters/otbFrostImageFilter.txx          |    1 +
 .../otbLabelImageRegionMergingFilter.txx           |    2 +-
 .../otbLabelImageRegionPruningFilter.txx           |    6 +-
 Code/BasicFilters/otbLabelizeImageFilterBase.h     |    2 +-
 .../otbListSampleToHistogramListGenerator.h        |    2 +-
 .../otbListSampleToHistogramListGenerator.txx      |    2 +-
 ...SampleToVariableDimensionHistogramGenerator.txx |    2 +-
 Code/BasicFilters/otbMeanShiftImageFilter.txx      |    2 +-
 .../otbMeanShiftSmoothingImageFilter.txx           |    2 +-
 Code/BasicFilters/otbPointSetExtractROI.txx        |    5 -
 .../otbProlateInterpolateImageFunction.h           |    8 +-
 Code/BasicFilters/otbRasterizeVectorDataFilter.txx |    4 +-
 .../otbSpatialObjectToImageDrawingFilter.txx       |    2 +
 Code/BasicFilters/otbStreamingCompareImageFilter.h |   21 +
 .../otbStreamingCompareImageFilter.txx             |   11 +-
 .../otbStreamingHistogramVectorImageFilter.h       |   35 +-
 .../otbStreamingHistogramVectorImageFilter.txx     |   82 +-
 .../BasicFilters/otbStreamingShrinkImageFilter.cxx |    2 +-
 .../BasicFilters/otbStreamingShrinkImageFilter.txx |   11 +-
 .../otbStreamingStatisticsVectorImageFilter.txx    |   13 +-
 Code/BasicFilters/otbTileImageFilter.txx           |    2 +-
 .../otbVectorDataToLabelImageFilter.txx            |    4 +-
 .../otbVectorImageTo3DScalarImageFilter.txx        |    2 +-
 Code/CMakeLists.txt                                |    6 -
 ...ryFunctorNeighborhoodJoinHistogramImageFilter.h |   62 +-
 ...FunctorNeighborhoodJoinHistogramImageFilter.txx |   51 +-
 Code/ChangeDetection/otbJoinHistogramMI.h          |   62 -
 Code/Common/otbCommandLineArgumentParser.cxx       |    2 +-
 Code/Common/otbDrawLineSpatialObjectListFilter.txx |    4 +-
 Code/Common/otbLabelImageToOGRDataSourceFilter.txx |   16 +-
 Code/Common/otbLabelImageToVectorDataFilter.txx    |    8 +-
 Code/Common/otbMacro.h                             |    2 +
 Code/Common/otbOGRDataSourceToLabelImageFilter.txx |    8 +-
 Code/Common/otbParser.cxx                          |   11 +-
 Code/Common/otbPolyLineImageConstIterator.txx      |   12 +-
 .../Common/otbSubsampledImageRegionConstIterator.h |    2 +-
 Code/Common/otbTransform.h                         |    5 +
 Code/Common/otbVectorDataToImageFilter.txx         |   18 +-
 Code/Common/otbVectorDataToMapFilter.txx           |   18 +-
 Code/DisparityMap/otbAdhesionCorrectionFilter.txx  |    4 +-
 ...plinesInterpolateDisplacementFieldGenerator.txx |    1 -
 ...erpolateTransformDisplacementFieldGenerator.txx |    1 -
 Code/DisparityMap/otbBijectionCoherencyFilter.txx  |   15 +-
 Code/DisparityMap/otbDisparityMapTo3DFilter.txx    |    2 +-
 Code/DisparityMap/otbDisparityMapToDEMFilter.h     |    7 +
 Code/DisparityMap/otbDisparityMapToDEMFilter.txx   |  145 +-
 Code/DisparityMap/otbDisparityTranslateFilter.h    |    1 +
 Code/DisparityMap/otbDisparityTranslateFilter.txx  |   53 +-
 Code/DisparityMap/otbMulti3DMapToDEMFilter.h       |    7 +-
 Code/DisparityMap/otbMulti3DMapToDEMFilter.txx     |  112 +-
 .../otbMultiDisparityMapTo3DFilter.txx             |    2 +-
 .../otbPointSetToDisplacementFieldGenerator.txx    |    2 +-
 .../otbStereoSensorModelToElevationMapFilter.h     |    4 +
 .../otbStereoSensorModelToElevationMapFilter.txx   |   21 +-
 ...bStereorectificationDisplacementFieldSource.txx |    1 -
 .../DisparityMap/otbSubPixelDisparityImageFilter.h |    7 +
 .../otbSubPixelDisparityImageFilter.txx            |   91 +-
 .../otbExtractSegmentsImageFilter.h                |   20 +-
 .../otbExtractSegmentsImageFilter.txx              |   32 +-
 Code/FeatureExtraction/otbFlusserPathFunction.txx  |    2 +-
 .../otbForwardFourierMellinTransformImageFilter.h  |   12 +-
 ...otbForwardFourierMellinTransformImageFilter.txx |   60 +-
 .../otbGenericRoadExtractionFilter.h               |    4 +-
 .../otbGenericRoadExtractionFilter.txx             |    1 +
 .../otbGreyLevelCooccurrenceIndexedList.h          |  192 +
 .../otbGreyLevelCooccurrenceIndexedList.txx        |  329 ++
 ...ceMatrixAdvancedTextureCoefficientsCalculator.h |    2 +
 ...MatrixAdvancedTextureCoefficientsCalculator.txx |    1 +
 .../otbHaralickTexturesImageFunction.h             |   79 +-
 .../otbHaralickTexturesImageFunction.txx           |  183 +-
 Code/FeatureExtraction/otbHuPathFunction.txx       |    2 +-
 .../otbImageToSIFTKeyPointSetFilter.txx            |    6 +-
 .../otbLineDetectorImageFilterBase.txx             |    4 +-
 .../otbNeighborhoodScalarProductFilter.txx         |    1 -
 .../otbNonMaxRemovalByDirectionFilter.h            |    2 +
 .../otbParallelLinePathListFilter.txx              |    2 +-
 Code/FeatureExtraction/otbSFSTexturesFunctor.h     |   18 +-
 Code/FeatureExtraction/otbSFSTexturesImageFilter.h |    2 +-
 .../otbScalarImageToAdvancedTexturesFilter.h       |  106 +-
 .../otbScalarImageToAdvancedTexturesFilter.txx     |  313 +-
 .../otbScalarImageToPanTexTextureFilter.h          |   29 +-
 .../otbScalarImageToPanTexTextureFilter.txx        |  110 +-
 .../otbScalarImageToTexturesFilter.h               |  105 +-
 .../otbScalarImageToTexturesFilter.txx             |  235 +-
 Code/Fusion/otbBayesianFusionFilter.h              |    2 +-
 Code/Fuzzy/otbMassOfBelief.txx                     |   21 +-
 Code/Fuzzy/otbStandardDSCostFunction.txx           |    2 +-
 Code/Hyperspectral/otbMDMDNMFImageFilter.txx       |    6 +-
 Code/IO/CMakeLists.txt                             |    2 +-
 Code/IO/otbBSQImageIO.cxx                          |    7 +-
 Code/IO/otbDefaultConvertPixelTraits.h             |    2 +-
 Code/IO/otbExtendedFilenameToReaderOptions.cxx     |   31 +
 Code/IO/otbExtendedFilenameToReaderOptions.h       |    3 +
 Code/IO/otbGDALDriverManagerWrapper.cxx            |   53 +-
 Code/IO/otbGDALDriverManagerWrapper.h              |    7 +
 Code/IO/otbGDALImageIO.cxx                         |  317 +-
 Code/IO/otbGDALImageIO.h                           |   33 +-
 Code/IO/otbImageFileReader.txx                     |   32 +-
 Code/IO/otbImageIOBase.cxx                         |    2 +-
 Code/IO/otbImageMetadataInterfaceFactory.cxx       |    2 +
 Code/IO/otbImageSeriesFileReader.h                 |    2 +-
 Code/IO/otbImageSeriesFileReaderBase.h             |    2 +-
 Code/IO/otbImageSeriesFileReaderBase.txx           |    2 +-
 Code/IO/otbJPEG2000ImageIO.cxx                     |   43 +-
 Code/IO/otbKmzProductWriter.txx                    |  101 +-
 Code/IO/otbLUMImageIO.cxx                          |    7 +-
 Code/IO/otbMSTARImageIO.cxx                        |    6 +-
 Code/IO/otbMWImageIO.cxx                           |    7 +-
 Code/IO/otbMapFileProductWriter.txx                |   31 +-
 Code/IO/otbONERAImageIO.cxx                        |    7 +-
 .../IO/otbOpticalImageMetadataInterfaceFactory.cxx |    3 +-
 Code/IO/otbPleiadesImageMetadataInterface.cxx      |  111 +-
 Code/IO/otbRADImageIO.cxx                          |    7 +-
 Code/IO/otbSpectralSensitivityReader.cxx           |    8 +
 Code/IO/otbSpot6ImageMetadataInterface.cxx         | 3868 ++++++++++++++++++++
 Code/IO/otbSpot6ImageMetadataInterface.h           |  135 +
 Code/IO/otbSpot6ImageMetadataInterfaceFactory.cxx  |   60 +
 Code/IO/otbSpot6ImageMetadataInterfaceFactory.h    |   67 +
 Code/IO/otbTileMapImageIO.cxx                      |   15 +-
 .../otbKMeansImageClassificationFilter.txx         |    2 +-
 Code/Learning/otbLibSVMMachineLearningModel.txx    |    6 +-
 Code/Learning/otbListSampleGenerator.h             |    4 +-
 Code/Learning/otbListSampleGenerator.txx           |   21 +
 Code/Learning/otbSOMImageClassificationFilter.txx  |    2 +-
 Code/Markov/otbMRFEnergy.h                         |    4 +-
 .../otbMorphologicalPyramidResampler.txx           |   19 +-
 .../otbMorphologicalPyramidSegmenter.txx           |    2 -
 Code/MultiScale/otbSubsampleImageFilter.txx        |    2 +-
 Code/MultiScale/otbWaveletFilterBank.txx           |    3 -
 .../otbWaveletPacketDecompositionCosts.h           |    2 +-
 Code/OBIA/otbLabelMapToSampleListFilter.txx        |    2 +-
 Code/OBIA/otbLabelMapToVectorDataFilter.h          |    6 +-
 Code/OBIA/otbLabelObjectToPolygonFunctor.txx       |   38 +-
 .../otbVectorDataToLabelMapWithAttributesFilter.h  |    6 +
 ...otbVectorDataToLabelMapWithAttributesFilter.txx |  148 +-
 .../otbDescriptorsListSampleGenerator.txx          |    4 -
 .../otbHaralickTexturesIFFactory.txx               |    6 +-
 .../otbObjectDetectionClassifier.txx               |   10 +-
 .../ObjectDetection/otbStatisticsXMLFileReader.txx |    2 +-
 .../ObjectDetection/otbStatisticsXMLFileWriter.txx |   10 +-
 Code/Projections/otbGenericRSTransform.h           |    7 +-
 Code/Projections/otbGeometriesProjectionFilter.cxx |    2 +-
 .../otbImageToEnvelopeVectorDataFilter.txx         |   33 +-
 .../otbImageToGenericRSOutputParameters.txx        |   42 +-
 .../otbPleiadesPToXSAffineTransformCalculator.cxx  |  155 +
 .../otbPleiadesPToXSAffineTransformCalculator.h    |   94 +
 .../otbVectorDataIntoImageProjectionFilter.txx     |   32 +-
 .../otbAtmosphericCorrectionParameters.cxx         |   99 +-
 .../otbAtmosphericCorrectionParameters.h           |  118 +-
 ...tionParametersTo6SAtmosphericRadiativeTerms.cxx |    7 +-
 ...ectionParametersTo6SAtmosphericRadiativeTerms.h |    3 +
 .../otbImageMetadataCorrectionParameters.cxx       |   81 +
 .../otbImageMetadataCorrectionParameters.h         |  176 +
 Code/Radiometry/otbImageToReflectanceImageFilter.h |    9 +-
 Code/Radiometry/otbLuminanceToImageImageFilter.h   |  225 ++
 .../otbLuminanceToReflectanceImageFilter.h         |   10 +-
 ...rrectionParametersToAtmosphericRadiativeTerms.h |  113 +
 Code/Radiometry/otbReflectanceToImageImageFilter.h |  351 ++
 .../otbReflectanceToLuminanceImageFilter.h         |  329 ++
 ...otbReflectanceToSurfaceReflectanceImageFilter.h |   98 +-
 ...bReflectanceToSurfaceReflectanceImageFilter.txx |  188 +-
 ...urfaceAdjacencyEffect6SCorrectionSchemeFilter.h |   53 +-
 ...faceAdjacencyEffect6SCorrectionSchemeFilter.txx |   29 +-
 ...bSurfaceAdjacencyEffectCorrectionSchemeFilter.h |  312 ++
 ...urfaceAdjacencyEffectCorrectionSchemeFilter.txx |  237 ++
 Code/Radiometry/otbVarSol.h                        |   67 +
 .../otbOGRLayerStreamStitchingFilter.txx           |   61 +-
 ...otbStreamingImageToOGRLayerSegmentationFilter.h |   10 +-
 Code/Simulation/otbAtmosphericEffects.h            |   27 +-
 Code/Simulation/otbAtmosphericEffects.txx          |   30 +-
 Code/Simulation/otbImageSimulationMethod.txx       |    2 +
 Code/Simulation/otbReduceSpectralResponse.h        |   25 +-
 Code/Simulation/otbReduceSpectralResponse.txx      |  228 +-
 Code/Simulation/otbSatelliteRSR.h                  |   11 +-
 Code/Simulation/otbSatelliteRSR.txx                |    7 +-
 .../otbSurfaceReflectanceToReflectanceFilter.h     |   95 +-
 .../otbSurfaceReflectanceToReflectanceFilter.txx   |  151 +-
 .../otbImageMultiSegmentationToRCC8GraphFilter.txx |    2 +-
 .../otbImageToImageRCC8Calculator.txx              |    2 +-
 Code/Testing/otbCurlHelperStub.cxx                 |    8 +-
 Code/Testing/otbCurlHelperStub.h                   |    2 +-
 Code/Testing/otbTestHelper.cxx                     |   51 +-
 Code/Testing/otbTestHelper.h                       |    2 +-
 Code/Testing/otbTestMain.h                         |    2 -
 .../CurlAdapters/otbCurlHelper.cxx                 |    5 +-
 .../itkHistogramToTextureFeaturesFilter.h          |  232 --
 .../itkHistogramToTextureFeaturesFilter.hxx        |  448 ---
 .../ITKPendingPatches/otbWarpImageFilter.txx       |    2 +-
 .../otbGeometriesToGeometriesFilter.cxx            |    4 +-
 .../OGRAdapters/otbGeometriesToGeometriesFilter.h  |    2 +-
 .../otbGeometriesToGeometriesFilter.txx            |    2 +-
 .../OGRAdapters/otbOGRDataSourceWrapper.cxx        |    2 +-
 .../OGRAdapters/otbOGRFeatureWrapper.txx           |    8 +-
 .../otbBoostMachineLearningModel.txx               |    2 +-
 .../otbDecisionTreeMachineLearningModel.txx        |    2 +-
 .../otbGradientBoostedTreeMachineLearningModel.txx |    2 +-
 .../otbKNearestNeighborsMachineLearningModel.txx   |    6 +-
 .../otbNeuralNetworkMachineLearningModel.txx       |    2 +-
 .../otbNormalBayesMachineLearningModel.txx         |    2 +-
 .../otbRandomForestsMachineLearningModel.txx       |    2 +-
 .../OpenCVAdapters/otbSVMMachineLearningModel.txx  |    2 +-
 .../OssimAdapters/otbDateTimeAdapter.cxx           |   88 +
 .../OssimAdapters/otbDateTimeAdapter.h             |   96 +
 .../OssimAdapters/otbImageKeywordlist.cxx          |  295 +-
 .../OssimAdapters/otbImageKeywordlist.h            |   37 +-
 .../OssimAdapters/otbRPCProjectionAdapter.cxx      |   19 +-
 .../OssimAdapters/otbRPCSolverAdapter.cxx          |    3 +-
 .../OssimAdapters/otbSensorModelAdapter.cxx        |   20 +-
 .../otbApplicationLauncherCommandLine.cxx          |  134 +-
 .../CommandLine/otbWrapperCommandLineLauncher.cxx  |  106 +-
 .../CommandLine/otbWrapperCommandLineLauncher.h    |   10 +-
 .../CommandLine/otbWrapperCommandLineParser.cxx    |  217 +-
 .../CommandLine/otbWrapperCommandLineParser.h      |   16 +-
 Code/Wrappers/QtWidget/itkQtProgressBar.h          |    2 +-
 Code/Wrappers/QtWidget/otbQtApplication.h          |    3 +-
 Code/Wrappers/QtWidget/otbQtFileSelectionWidget.h  |    2 +-
 Code/Wrappers/QtWidget/otbQtLogOutput.h            |    2 +-
 .../Wrappers/QtWidget/otbQtStringSelectionWidget.h |    2 +-
 .../QtWidget/otbWrapperQtWidgetChoiceParameter.h   |    2 +-
 .../otbWrapperQtWidgetComplexInputImageParameter.h |    2 +-
 ...otbWrapperQtWidgetComplexOutputImageParameter.h |    2 +-
 .../otbWrapperQtWidgetDirectoryParameter.h         |    2 +-
 .../QtWidget/otbWrapperQtWidgetEmptyParameter.h    |    2 +-
 .../QtWidget/otbWrapperQtWidgetFloatParameter.h    |    2 +-
 ...tbWrapperQtWidgetInputFilenameListParameter.cxx |    2 +
 .../otbWrapperQtWidgetInputFilenameListParameter.h |    3 +-
 .../otbWrapperQtWidgetInputFilenameParameter.h     |    2 +-
 .../otbWrapperQtWidgetInputImageListParameter.cxx  |    9 +-
 .../otbWrapperQtWidgetInputImageListParameter.h    |    3 +-
 .../otbWrapperQtWidgetInputImageParameter.h        |    2 +-
 .../otbWrapperQtWidgetInputProcessXMLParameter.h   |    2 +-
 ...WrapperQtWidgetInputVectorDataListParameter.cxx |    2 +
 ...tbWrapperQtWidgetInputVectorDataListParameter.h |    3 +-
 .../otbWrapperQtWidgetInputVectorDataParameter.h   |    2 +-
 .../QtWidget/otbWrapperQtWidgetIntParameter.h      |    2 +-
 .../QtWidget/otbWrapperQtWidgetListViewParameter.h |    2 +-
 Code/Wrappers/QtWidget/otbWrapperQtWidgetModel.h   |    4 +-
 .../otbWrapperQtWidgetOutputFilenameParameter.h    |    2 +-
 .../otbWrapperQtWidgetOutputImageParameter.h       |    2 +-
 .../otbWrapperQtWidgetOutputProcessXMLParameter.h  |    2 +-
 .../otbWrapperQtWidgetOutputVectorDataParameter.h  |    2 +-
 .../QtWidget/otbWrapperQtWidgetParameterBase.cxx   |    2 +-
 .../QtWidget/otbWrapperQtWidgetParameterBase.h     |    2 +-
 .../QtWidget/otbWrapperQtWidgetParameterFactory.h  |    2 +-
 .../QtWidget/otbWrapperQtWidgetParameterGroup.h    |    2 +-
 .../QtWidget/otbWrapperQtWidgetParameterLabel.h    |    2 +-
 .../QtWidget/otbWrapperQtWidgetProgressReport.cxx  |    2 +-
 .../QtWidget/otbWrapperQtWidgetProgressReport.h    |    2 +-
 .../QtWidget/otbWrapperQtWidgetRAMParameter.h      |    2 +-
 .../otbWrapperQtWidgetSimpleProgressReport.cxx     |    2 +-
 .../otbWrapperQtWidgetSimpleProgressReport.h       |    2 +-
 .../otbWrapperQtWidgetStringListParameter.h        |    2 +-
 .../QtWidget/otbWrapperQtWidgetStringParameter.h   |    2 +-
 Code/Wrappers/QtWidget/otbWrapperQtWidgetView.h    |    2 +-
 Examples/BasicFilters/BandMathFilterExample.cxx    |    1 -
 .../ClassificationMapRegularizationExample.cxx     |    2 +-
 .../KMeansImageClassificationExample.cxx           |    2 +-
 .../SOMImageClassificationExample.cxx              |    2 +-
 .../ScalarImageKmeansModelEstimator.cxx            |    1 -
 .../SupervisedImageClassificationExample.cxx       |    2 +-
 .../DataRepresentation/Image/ImageListExample.cxx  |    2 +-
 Examples/DimensionReduction/ICAExample.cxx         |    2 +-
 Examples/DimensionReduction/MNFExample.cxx         |    2 +-
 .../MaximumAutocorrelationFactor.cxx               |    2 +-
 Examples/DimensionReduction/NAPCAExample.cxx       |    2 +-
 Examples/DimensionReduction/PCAExample.cxx         |    2 +-
 .../FineRegistrationImageFilterExample.cxx         |    2 -
 .../DisparityMap/NCCRegistrationFilterExample.cxx  |    2 -
 .../SimpleDisparityMapEstimationExample.cxx        |    4 -
 .../DisparityMap/StereoReconstructionExample.cxx   |    8 +-
 .../FeatureExtraction/ComplexMomentPathExample.cxx |    2 -
 Examples/FeatureExtraction/EdgeDensityExample.cxx  |    2 +-
 .../ExtractRoadByStepsExample.cxx                  |    9 +-
 Examples/FeatureExtraction/ExtractRoadExample.cxx  |    7 +-
 .../ExtractSegmentsByStepsExample.cxx              |    2 -
 Examples/FeatureExtraction/LocalHoughExample.cxx   |    2 -
 Examples/FeatureExtraction/SFSExample.cxx          |    2 +-
 Examples/FeatureExtraction/SeamCarvingExample.cxx  |    2 +-
 .../FeatureExtraction/SeamCarvingOtherExample.cxx  |    2 +-
 .../Filtering/GeometriesChangeSpatialReference.cxx |  107 +-
 Examples/Fusion/BayesianFusionImageFilter.cxx      |    5 -
 .../Hyperspectral/HyperspectralUnmixingExample.cxx |    6 -
 Examples/IO/HDFReaderExample.cxx                   |    2 +-
 Examples/IO/MetadataExample.cxx                    |    2 +-
 Examples/IO/OGRWrappersExample.cxx                 |    2 +-
 Examples/IO/VectorDataIOExample.cxx                |    3 -
 .../Iterators/ImageLinearIteratorWithIndex2.cxx    |    1 -
 Examples/Learning/SOMExample.cxx                   |    2 +-
 .../SVMGenericKernelImageClassificationExample.cxx |    1 -
 .../Learning/SVMImageClassificationExample.cxx     |    1 -
 ...SVMImageEstimatorClassificationMultiExample.cxx |    2 +-
 .../Learning/SVMImageModelEstimatorExample.cxx     |    2 +-
 .../Learning/SVMPointSetClassificationExample.cxx  |    7 +-
 Examples/Learning/SVMPointSetExample.cxx           |    2 +-
 .../Learning/SVMPointSetModelEstimatorExample.cxx  |    2 +-
 .../TrainMachineLearningModelFromImagesExample.cxx |    8 +-
 ...TrainMachineLearningModelFromSamplesExample.cxx |    3 +-
 .../MorphologicalPyramidSegmentationExample.cxx    |    2 +-
 .../MorphologicalPyramidSegmenterExample.cxx       |    2 +-
 Examples/OBIA/KeepNObjects.cxx                     |    2 -
 Examples/OBIA/LabelMapToVectorData.cxx             |   10 +-
 .../RadiometricAttributesLabelMapFilterExample.cxx |    3 -
 .../EstimateAffineTransformationExample.cxx        |    3 -
 Examples/Patented/SIFTDensityExample.cxx           |    2 +-
 Examples/Patented/SIFTDisparityMapEstimation.cxx   |    7 -
 Examples/Patented/SIFTExample.cxx                  |    2 -
 .../Projections/EstimateRPCSensorModelExample.cxx  |    4 +-
 Examples/README.txt                                |   36 -
 .../AtmosphericCorrectionSequencement.cxx          |  214 +-
 .../OtsuMultipleThresholdImageFilter.cxx           |    2 +-
 .../Simulation/LAIAndPROSAILToSensorResponse.cxx   |   11 +-
 Examples/Tutorials/HelloWorldOTB.cxx               |    2 +-
 RELEASE_NOTES.txt                                  |  122 +-
 Testing/Applications/Classification/CMakeLists.txt |    6 +-
 Testing/Applications/DisparityMap/CMakeLists.txt   |    4 +-
 .../Applications/FeatureExtraction/CMakeLists.txt  |   23 +
 Testing/Applications/Projections/CMakeLists.txt    |    6 +-
 Testing/Applications/Radiometry/CMakeLists.txt     |   45 +
 Testing/Applications/Segmentation/CMakeLists.txt   |   26 +-
 Testing/Applications/Utils/CMakeLists.txt          |   14 +-
 .../otbWrapperApplicationHtmlDocGeneratorTest.cxx  |    4 +-
 .../otbWrapperApplicationRegistryTest.cxx          |    2 +-
 .../otbWrapperApplicationTest.cxx                  |    7 +-
 .../otbWrapperChoiceParameterTest.cxx              |    4 +-
 .../otbWrapperDocExampleStructureTest.cxx          |    4 +-
 .../otbWrapperEmptyParameterTest.cxx               |    2 +-
 .../otbWrapperInputImageListParameterTest.cxx      |    4 +-
 .../otbWrapperInputImageParameterTest.cxx          |    4 +-
 .../otbWrapperInputVectorDataListParameterTest.cxx |    4 +-
 .../otbWrapperInputVectorDataParameterTest.cxx     |    2 +-
 .../otbWrapperNumericalParameterTest.cxx           |    4 +-
 .../otbWrapperOutputImageParameterTest.cxx         |    4 +-
 .../otbWrapperParameterKeyTest.cxx                 |    2 +-
 .../otbWrapperParameterListTest.cxx                |    2 +-
 .../ApplicationEngine/otbWrapperParameterTest.cxx  |    4 +-
 .../otbWrapperRAMParameterTest.cxx                 |    2 +-
 .../otbWrapperStringListParameterTest.cxx          |    4 +-
 .../otbWrapperStringParameterTest.cxx              |    4 +-
 Testing/Code/BasicFilters/CMakeLists.txt           |    8 +-
 .../Code/BasicFilters/otbAmplitudeFunctorTest.cxx  |    2 +-
 .../BasicFilters/otbAmplitudePhaseToRGBFunctor.cxx |    2 +-
 .../otbAmplitudePhaseToRGBFunctorNew.cxx           |    2 +-
 .../otbAngularProjectionBinaryImageFilter.cxx      |    7 +-
 .../otbAngularProjectionImageFilterNew.cxx         |    4 +-
 .../otbAngularProjectionSetImageFilterNew.cxx      |    3 +-
 .../otbBCOInterpolateImageFunction.cxx             |    8 +-
 .../otbBSplineDecompositionImageFilter.cxx         |    2 +-
 .../otbBSplineDecompositionImageFilterNew.cxx      |    2 +-
 .../otbBSplineInterpolateImageFunctionNew.cxx      |    2 +-
 .../Code/BasicFilters/otbBandMathImageFilter.cxx   |    6 +-
 .../Code/BasicFilters/otbBasicFiltersTests15.cxx   |    1 +
 .../BasicFilters/otbBinaryImageDensityFunction.cxx |    2 +-
 ...bBinaryImageMinimalBoundingRegionCalculator.cxx |    2 +-
 ...naryImageMinimalBoundingRegionCalculatorNew.cxx |    2 +-
 .../otbBinaryImageToDensityImageFilter.cxx         |    2 +-
 .../BasicFilters/otbBoxAndWhiskerImageFilter.cxx   |    2 +-
 .../otbBoxAndWhiskerImageFilterNew.cxx             |    2 +-
 .../BasicFilters/otbChangeLabelImageFilter.cxx     |    4 +-
 .../BasicFilters/otbChangeLabelImageFilterNew.cxx  |    2 +-
 Testing/Code/BasicFilters/otbClampImageFilter.cxx  |    4 +-
 .../BasicFilters/otbClampVectorImageFilter.cxx     |    4 +-
 .../otbClosingOpeningMorphologicalFilter.cxx       |    2 +-
 .../otbClosingOpeningMorphologicalFilterNew.cxx    |    2 +-
 .../otbComplexToVectorImageCastFilter.cxx          |    4 +-
 .../otbConcatenateScalarValueImageFilterTest.cxx   |    4 +-
 .../otbConcatenateVectorDataFilter.cxx             |    2 +-
 .../otbConnectedComponentMuParserFunctorTest.cxx   |    4 +-
 ...bContinuousMinimumMaximumImageCalculatorNew.cxx |    2 +-
 .../BasicFilters/otbConvolutionImageFilter.cxx     |    2 +-
 .../BasicFilters/otbConvolutionImageFilterNew.cxx  |    2 +-
 .../otbDBOverlapDataNodeFeatureFunction.cxx        |    4 +-
 .../BasicFilters/otbEdgeDensityImageFilter.cxx     |    3 +-
 .../BasicFilters/otbEdgeDensityImageFilterNew.cxx  |    2 -
 .../BasicFilters/otbEdgeDetectorImageFilter.cxx    |    2 +-
 .../otbEstimateInnerProductPCAImageFilter.cxx      |    2 +-
 .../otbEstimateInnerProductPCAImageFilterNew.cxx   |    2 +-
 .../otbEuclideanDistanceMetricWithMissingValue.cxx |    2 +-
 ...bEuclideanDistanceMetricWithMissingValueNew.cxx |    2 +-
 .../Code/BasicFilters/otbFastICAImageFilter.cxx    |    6 +-
 .../otbFlexibleDistanceWithMissingValue.cxx        |    2 +-
 .../otbFlexibleDistanceWithMissingValueNew.cxx     |    2 +-
 Testing/Code/BasicFilters/otbFrostFilter.cxx       |    2 +-
 Testing/Code/BasicFilters/otbFrostFilterNew.cxx    |    2 +-
 .../Code/BasicFilters/otbFunctionToImageFilter.cxx |    2 +-
 .../BasicFilters/otbFunctionToImageFilterNew.cxx   |    2 +-
 .../otbFunctionWithNeighborhoodToImageFilter.cxx   |    2 +-
 ...otbFunctionWithNeighborhoodToImageFilterNew.cxx |    5 +-
 .../BasicFilters/otbGaborFilterGeneratorNew.cxx    |    2 +-
 .../otbHorizontalSobelVectorImageFilter.cxx        |    3 +-
 .../otbImageAndVectorImageOperationFilterNew.cxx   |    2 +-
 .../otbImageAndVectorImageOperationFilterTest.cxx  |    2 +-
 .../otbImageListToImageListApplyFilter.cxx         |    2 +-
 .../otbImageListToImageListApplyFilterNew.cxx      |    2 +-
 .../otbImageListToSingleImageFilterTest.cxx        |    4 +-
 .../otbImagePCAShapeModelEstimatorTest.cxx         |    7 +-
 .../BasicFilters/otbImageToPointSetFilterTest.cxx  |    6 +-
 .../otbImaginaryImageToComplexImageFilterTest.cxx  |    2 +-
 .../otbImportGeoInformationImageFilter.cxx         |    2 +-
 .../otbImportGeoInformationImageFilterNew.cxx      |    2 +-
 ...ortGeoInformationImageFilterWithKeywordList.cxx |    2 +-
 .../BasicFilters/otbInnerProductPCAImageFilter.cxx |    2 +-
 .../otbInnerProductPCAImageFilterNew.cxx           |    2 +-
 .../BasicFilters/otbInverseLogPolarTransform.cxx   |    2 +-
 .../otbInverseLogPolarTransformNew.cxx             |    2 +-
 .../otbInverseLogPolarTransformResample.cxx        |   14 +-
 .../otbKeyPointDensityImageFilterNew.cxx           |    1 -
 .../otbKeyPointDensityImageFilterTest.cxx          |    3 +-
 .../otbLabelImageRegionMergingFilter.cxx           |    1 -
 .../otbLabelImageRegionPruningFilter.cxx           |    1 -
 .../otbLabelObjectOpeningMuParserFilterNew.cxx     |    2 +-
 .../otbLabelObjectOpeningMuParserFilterTest.cxx    |    3 +-
 .../otbLabelizeConfidenceConnectedImageFilter.cxx  |    2 +-
 ...tbLabelizeConfidenceConnectedImageFilterNew.cxx |    2 +-
 .../otbLabelizeConnectedThresholdImageFilter.cxx   |    2 +-
 ...otbLabelizeConnectedThresholdImageFilterNew.cxx |    2 +-
 ...otbLabelizeNeighborhoodConnectedImageFilter.cxx |    2 +-
 ...LabelizeNeighborhoodConnectedImageFilterNew.cxx |    2 +-
 Testing/Code/BasicFilters/otbLeeFilter.cxx         |    2 +-
 .../otbListSampleToHistogramListGenerator.cxx      |    3 +-
 .../otbListSampleToHistogramListGeneratorNew.cxx   |    2 +-
 ...SampleToVariableDimensionHistogramGenerator.cxx |    2 +-
 ...pleToVariableDimensionHistogramGeneratorNew.cxx |    2 +-
 .../otbLocalActivityVectorImageFilter.cxx          |    3 +-
 .../otbLocalGradientVectorImageFilter.cxx          |    3 +-
 Testing/Code/BasicFilters/otbLogPolarTransform.cxx |    2 +-
 .../Code/BasicFilters/otbLogPolarTransformNew.cxx  |    2 +-
 .../BasicFilters/otbLogPolarTransformResample.cxx  |   14 +-
 Testing/Code/BasicFilters/otbMNFImageFilter.cxx    |    3 +-
 .../Code/BasicFilters/otbMaskMuParserFilterNew.cxx |    2 +-
 .../Code/BasicFilters/otbMatrixImageFilterNew.cxx  |    2 +-
 .../Code/BasicFilters/otbMatrixImageFilterTest.cxx |    4 +-
 .../otbMatrixTransposeMatrixImageFilter.cxx        |    3 +-
 .../otbMatrixTransposeMatrixImageFilterNew.cxx     |    3 +-
 .../otbMaximumAutocorrelationFactorImageFilter.cxx |    4 +-
 .../Code/BasicFilters/otbMeanFunctorImageTest.cxx  |    2 +-
 .../BasicFilters/otbMeanShiftImageFilterNew.cxx    |    2 +-
 .../otbMeanShiftSmoothingImageFilter.cxx           |    1 -
 .../otbMeanShiftSmoothingImageFilterNew.cxx        |    2 +-
 ...anShiftSmoothingImageFilterSpatialStability.cxx |    3 -
 .../otbMeanShiftSmoothingImageFilterThreading.cxx  |    1 -
 .../otbMeanShiftVectorImageFilterNew.cxx           |    2 +-
 Testing/Code/BasicFilters/otbNAPCAImageFilter.cxx  |    7 +-
 .../otbNDVIDataNodeFeatureFunction.cxx             |    5 +-
 .../otbNormalizeInnerProductPCAImageFilter.cxx     |    2 +-
 .../otbNormalizeInnerProductPCAImageFilterNew.cxx  |    2 +-
 .../BasicFilters/otbNormalizeVectorImageFilter.cxx |    5 +-
 .../otbOpeningClosingMorphologicalFilter.cxx       |    2 +-
 .../otbOpeningClosingMorphologicalFilterNew.cxx    |    2 +-
 .../otbOverlapSaveConvolutionImageFilter.cxx       |    2 +-
 .../otbOverlapSaveConvolutionImageFilterNew.cxx    |    2 +-
 Testing/Code/BasicFilters/otbPCAImageFilter.cxx    |    7 +-
 .../otbParserConditionDataNodeFeatureFunction.cxx  |    5 +-
 .../otbPerBandVectorImageFilterNew.cxx             |    2 +-
 .../otbPerBandVectorImageFilterWithMeanFilter.cxx  |    2 +-
 .../otbPerBandVectorImageFilterWithSobelFilter.cxx |    2 +-
 .../otbPersistentVectorizationFilter.cxx           |    2 +-
 .../otbPersistentVectorizationFilterNew.cxx        |    2 +-
 Testing/Code/BasicFilters/otbPhaseFunctorTest.cxx  |    2 +-
 .../otbPointSetDensityEpanechnikovFunctionTest.cxx |    2 +-
 .../otbPointSetDensityFunctionTest.cxx             |    2 +-
 .../otbPointSetDensityGaussianFunctionTest.cxx     |    2 +-
 .../BasicFilters/otbPointSetExtractROITest.cxx     |    1 -
 .../otbPointSetToDensityImageFilterTest.cxx        |    2 +-
 .../Code/BasicFilters/otbPrintableImageFilter.cxx  |    2 +-
 .../BasicFilters/otbPrintableImageFilterNew.cxx    |    2 +-
 .../otbPrintableImageFilterWithMask.cxx            |    2 +-
 .../Code/BasicFilters/otbProjectiveProjection.cxx  |    4 +-
 .../otbProlateInterpolateImageFunctionNew.cxx      |    2 +-
 .../Code/BasicFilters/otbProlateValidationTest.cxx |    2 +-
 ...nousWithNeighborhoodDataNodeFeatureFunction.cxx |    4 +-
 ...alAndImaginaryImageToComplexImageFilterTest.cxx |    2 +-
 .../otbRealImageToComplexImageFilterTest.cxx       |    2 +-
 Testing/Code/BasicFilters/otbResampleSLCImage.cxx  |    2 +-
 .../otbScalarToRainbowRGBPixelFunctor.cxx          |    2 +-
 .../otbScalarToRainbowRGBPixelFunctorNew.cxx       |    2 +-
 .../otbShiftScaleVectorImageFilterNew.cxx          |    2 +-
 .../otbShiftScaleVectorImageFilterTest.cxx         |    2 +-
 .../BasicFilters/otbSobelVectorImageFilter.cxx     |    3 +-
 .../otbSparseWvltToAngleMapperListFilterNew.cxx    |    3 +-
 .../otbSpatialObjectToImageDrawingFilter.cxx       |    2 +-
 .../otbSpatialObjectToImageDrawingFilterNew.cxx    |    2 +-
 .../otbSpectralAngleDataNodeFeatureFunction.cxx    |    4 +-
 .../otbSpectralAngleDistanceImageFilter.cxx        |    2 +-
 .../otbSpectralAngleDistanceImageFilterNew.cxx     |    2 +-
 .../otbStreamingCompareImageFilter.cxx             |    4 +-
 .../otbStreamingHistogramVectorImageFilter.cxx     |   35 +
 .../otbStreamingInnerProductVectorImageFilter.cxx  |    2 +-
 ...tbStreamingInnerProductVectorImageFilterNew.cxx |    2 +-
 .../BasicFilters/otbStreamingMinMaxImageFilter.cxx |    2 +-
 .../otbStreamingMinMaxImageFilterNew.cxx           |    2 +-
 .../otbStreamingMinMaxVectorImageFilter.cxx        |    2 +-
 .../otbStreamingMinMaxVectorImageFilterNew.cxx     |    2 +-
 .../otbStreamingResampleImageFilter.cxx            |    2 +-
 ...bStreamingResampleImageFilterCompareWithITK.cxx |    2 +-
 .../otbStreamingResampleImageFilterNew.cxx         |    2 +-
 ...amingResampleImageFilterWithAffineTransform.cxx |    3 -
 .../BasicFilters/otbStreamingShrinkImageFilter.cxx |    2 +-
 .../otbStreamingShrinkImageFilterNew.cxx           |    2 +-
 .../otbStreamingStatisticsImageFilterNew.cxx       |    2 +-
 ...eamingStatisticsMapFromLabelImageFilterTest.cxx |    2 +-
 .../otbStreamingStatisticsVectorImageFilterNew.cxx |    2 +-
 Testing/Code/BasicFilters/otbStreamingTraits.cxx   |    4 +-
 .../BasicFilters/otbThresholdVectorImageFilter.cxx |    4 +-
 Testing/Code/BasicFilters/otbTileImageFilter.cxx   |    2 +-
 .../BasicFilters/otbUnaryFunctorImageFilterNew.cxx |    2 +-
 .../otbUnaryImageFunctorWithVectorImageFilter.cxx  |    2 +-
 ...tbUnaryImageFunctorWithVectorImageFilterNew.cxx |    2 +-
 .../Code/BasicFilters/otbVarianceImageFilter.cxx   |    2 +-
 .../BasicFilters/otbVarianceImageFilterNew.cxx     |    2 +-
 .../otbVectorDataToRandomLineGenerator.cxx         |    4 +-
 .../otbVectorImageTo3DScalarImageFilter.cxx        |    2 +-
 .../otbVectorImageTo3DScalarImageFilterNew.cxx     |    2 +-
 .../otbVectorImageToAmplitudeImageFilter.cxx       |    2 +-
 .../otbVectorImageToAmplitudeImageFilterNew.cxx    |    2 +-
 .../otbVectorImageToImageListFilter.cxx            |    4 +-
 .../otbVectorImageToImageListFilterNew.cxx         |    2 +-
 .../otbVectorImageToIntensityImageFilter.cxx       |    2 +-
 .../otbVectorImageToIntensityImageFilterNew.cxx    |    2 +-
 .../otbVectorImageToMatrixImageFilter.cxx          |    4 +-
 .../otbVectorRescaleIntensityImageFilter.cxx       |    2 +-
 .../otbVectorRescaleIntensityImageFilterNew.cxx    |    2 +-
 .../otbVerticalSobelVectorImageFilter.cxx          |    3 +-
 ...owedSincInterpolateImageBlackmanFunctionNew.cxx |    2 +-
 ...ndowedSincInterpolateImageCosineFunctionNew.cxx |    2 +-
 ...WindowedSincInterpolateImageFunctionBaseNew.cxx |    2 +-
 ...owedSincInterpolateImageGaussianFunctionNew.cxx |    2 +-
 ...dowedSincInterpolateImageHammingFunctionNew.cxx |    2 +-
 ...dowedSincInterpolateImageLanczosFunctionNew.cxx |    2 +-
 ...indowedSincInterpolateImageWelchFunctionNew.cxx |    2 +-
 .../otbKullbackLeiblerDistanceImageFilterNew.cxx   |    2 +-
 .../otbKullbackLeiblerProfileImageFilterNew.cxx    |    2 +-
 ...backLeiblerSupervizedDistanceImageFilterNew.cxx |    2 +-
 ...tbMultivariateAlterationDetectorImageFilter.cxx |    4 +-
 .../Common/otbConcatenateVectorImageFilter.cxx     |    2 +-
 .../Common/otbConcatenateVectorImageFilterNew.cxx  |    2 +-
 Testing/Code/Common/otbConfigurationTest.cxx       |    6 +-
 Testing/Code/Common/otbDataNodeTest.cxx            |    2 +-
 Testing/Code/Common/otbDrawLineSpatialObject.cxx   |    2 +-
 .../Code/Common/otbDrawLineSpatialObjectList.cxx   |    2 +-
 .../Common/otbDrawLineSpatialObjectListNew.cxx     |    2 +-
 .../Code/Common/otbDrawLineSpatialObjectNew.cxx    |    2 +-
 Testing/Code/Common/otbDrawPathFilterNew.cxx       |    2 +-
 Testing/Code/Common/otbDrawPathListFilterNew.cxx   |    2 +-
 Testing/Code/Common/otbExtractROI.cxx              |    2 +-
 Testing/Code/Common/otbExtractROI2.cxx             |    2 +-
 Testing/Code/Common/otbExtractROINew.cxx           |    2 +-
 Testing/Code/Common/otbExtractROITestMetaData.cxx  |    2 +-
 Testing/Code/Common/otbExtractROI_RGB.cxx          |    2 +-
 Testing/Code/Common/otbGISTableNew.cxx             |    2 +-
 Testing/Code/Common/otbGISTableSourceNew.cxx       |    2 +-
 .../Code/Common/otbGISTableToGISTableFilterNew.cxx |    2 +-
 .../Code/Common/otbGISTableToVectorDataFilter.cxx  |    2 +-
 .../Common/otbGISTableToVectorDataFilterNew.cxx    |    2 +-
 .../otbGenericInterpolateImageFunctionNew.cxx      |    2 +-
 .../Code/Common/otbHistogramStatisticsFunction.cxx |    2 +-
 Testing/Code/Common/otbImageList.cxx               |    2 +-
 Testing/Code/Common/otbImageListNew.cxx            |    2 +-
 Testing/Code/Common/otbImageListSourceNew.cxx      |    2 +-
 .../Code/Common/otbImageListToImageFilterNew.cxx   |    2 +-
 .../Common/otbImageListToImageListFilterNew.cxx    |    2 +-
 .../Common/otbImageListToVectorImageFilter.cxx     |    2 +-
 .../Common/otbImageListToVectorImageFilter2.cxx    |    2 +-
 .../Common/otbImageListToVectorImageFilterNew.cxx  |    2 +-
 .../otbImageOfVectorsToMonoChannelExtractROI.cxx   |    2 +-
 ...otbImageOfVectorsToMonoChannelExtractROINew.cxx |    2 +-
 .../Common/otbImageRegionAdaptativeSplitter.cxx    |    4 +-
 ...ageRegionNonUniformMultidimensionalSplitter.cxx |    2 +-
 ...RegionNonUniformMultidimensionalSplitterNew.cxx |    2 +-
 .../Common/otbImageRegionSquareTileSplitter.cxx    |    4 +-
 .../Code/Common/otbImageRegionTileMapSplitter.cxx  |    2 +-
 .../Common/otbImageRegionTileMapSplitterNew.cxx    |    2 +-
 .../Code/Common/otbImageToImageListFilterNew.cxx   |    2 +-
 .../Common/otbImageToLineSpatialObjectListNew.cxx  |    2 +-
 Testing/Code/Common/otbImageToPathFilterNew.cxx    |    2 +-
 .../Common/otbImageToVectorImageCastFilter.cxx     |    2 +-
 .../Common/otbImageToVectorImageCastFilterNew.cxx  |    2 +-
 .../Common/otbLabelImageToOGRDataSourceFilter.cxx  |    4 +-
 .../Common/otbLabelImageToVectorDataFilterNew.cxx  |    2 +-
 Testing/Code/Common/otbLineSpatialObjectList.cxx   |    2 +-
 ...otbLineSpatialObjectListToPointSetFilterNew.cxx |    2 +-
 Testing/Code/Common/otbLineSpatialObjectNew.cxx    |    2 +-
 Testing/Code/Common/otbMultiChannelExtractROI.cxx  |    2 +-
 .../Code/Common/otbMultiChannelExtractROINew.cxx   |    2 +-
 .../Common/otbMultiToMonoChannelExtractROI.cxx     |    2 +-
 .../Common/otbMultiToMonoChannelExtractROINew.cxx  |    2 +-
 .../Common/otbOGRDataSourceToLabelImageFilter.cxx  |    4 +-
 Testing/Code/Common/otbObjectList.cxx              |    2 +-
 Testing/Code/Common/otbObjectList2.cxx             |    2 +-
 Testing/Code/Common/otbObjectListNew.cxx           |    2 +-
 .../Common/otbObjectListToObjectListFilterNew.cxx  |    2 +-
 Testing/Code/Common/otbParserTest.cxx              |    4 +-
 .../Common/otbPathListToHistogramGenerator.cxx     |    3 +-
 .../Common/otbPathListToHistogramGeneratorNew.cxx  |    2 +-
 .../Code/Common/otbPathListToPathListFilterNew.cxx |    2 +-
 .../otbPipelineMemoryPrintCalculatorTest.cxx       |    4 +-
 Testing/Code/Common/otbPointSetSourceTest.cxx      |    2 +-
 .../Code/Common/otbPolyLineImageConstIterator.cxx  |    2 -
 .../otbPolyLineParametricPathWithValueNew.cxx      |    2 +-
 Testing/Code/Common/otbPolygon.cxx                 |    2 +-
 Testing/Code/Common/otbPolygonNew.cxx              |    2 +-
 .../Common/otbPolygonizationRasterizationTest.cxx  |    3 +-
 Testing/Code/Common/otbPostGISTableNew.cxx         |    2 +-
 Testing/Code/Common/otbRGBAPixelConverter.cxx      |    4 +-
 Testing/Code/Common/otbRectangle.cxx               |    4 +-
 Testing/Code/Common/otbRectangleNew.cxx            |    2 +-
 Testing/Code/Common/otbRemoteSensingRegion.cxx     |    2 +-
 Testing/Code/Common/otbRemoteSensingRegionNew.cxx  |    2 +-
 Testing/Code/Common/otbShiftScaleImageAdaptor.cxx  |    2 +-
 .../Code/Common/otbShiftScaleImageAdaptorNew.cxx   |    2 +-
 Testing/Code/Common/otbSpatialObjectSourceNew.cxx  |    2 +-
 .../Code/Common/otbStandardFilterWatcherNew.cxx    |    2 +-
 .../Common/otbStandardOneLineFilterWatcherTest.cxx |    2 +-
 Testing/Code/Common/otbStandardWriterWatcher.cxx   |    2 +-
 Testing/Code/Common/otbStreamingManager.cxx        |   12 +-
 Testing/Code/Common/otbSystemTest.cxx              |    6 +-
 .../Code/Common/otbTestMultiExtractMultiUpdate.cxx |    2 +-
 .../otbUnaryFunctorNeighborhoodImageFilter.cxx     |    2 +-
 .../otbUnaryFunctorNeighborhoodImageFilterNew.cxx  |    2 +-
 ...aryFunctorNeighborhoodWithOffsetImageFilter.cxx |    4 +-
 ...FunctorNeighborhoodWithOffsetImageFilterNew.cxx |    5 +-
 .../Common/otbUnaryFunctorWithIndexImageFilter.cxx |    4 +-
 .../otbUnaryFunctorWithIndexImageFilterNew.cxx     |    4 +-
 .../Common/otbVariableLengthVectorConverter.cxx    |    2 +-
 Testing/Code/Common/otbVectorDataExtractROI.cxx    |    2 +-
 Testing/Code/Common/otbVectorDataExtractROINew.cxx |    2 +-
 Testing/Code/Common/otbVectorDataNew.cxx           |    2 +-
 .../Code/Common/otbVectorDataRasterizeFilter.cxx   |    7 +-
 Testing/Code/Common/otbVectorDataSourceNew.cxx     |    2 +-
 .../Code/Common/otbVectorDataToGISTableFilter.cxx  |    2 +-
 .../Common/otbVectorDataToGISTableFilterNew.cxx    |    2 +-
 Testing/Code/Common/otbVectorDataToImageFilter.cxx |    4 +-
 .../Common/otbVectorDataToLabelImageFilter.cxx     |    7 +-
 Testing/Code/Common/otbVectorDataToMapFilter.cxx   |    4 +-
 .../Code/Common/otbVectorDataToMapFilterNew.cxx    |    2 +-
 .../Common/otbVectorDataToMapFilterNoFonts.cxx     |    2 +-
 .../Common/otbVectorDataToMapFilterSensorModel.cxx |    2 +-
 .../Code/Common/otbVectorDataToMapFilterWorld.cxx  |    2 +-
 .../Common/otbVectorDataToVectorDataFilterNew.cxx  |    2 +-
 .../Common/otbVectorImageToASImageAdaptorNew.cxx   |    2 +-
 Testing/Code/DisparityMap/CMakeLists.txt           |    4 +-
 .../DisparityMap/otbAdhesionCorrectionFilter.cxx   |    4 +-
 ...plinesInterpolateDisplacementFieldGenerator.cxx |    2 +-
 ...nesInterpolateDisplacementFieldGeneratorNew.cxx |    2 +-
 ...erpolateTransformDisplacementFieldGenerator.cxx |    2 +-
 ...olateTransformDisplacementFieldGeneratorNew.cxx |    2 +-
 .../DisparityMap/otbBijectionCoherencyFilter.cxx   |    3 +-
 .../otbDisparityMapEstimationMethod.cxx            |    4 +-
 .../otbDisparityMapEstimationMethodNew.cxx         |    2 +-
 .../DisparityMap/otbDisparityMapMedianFilter.cxx   |    2 +-
 .../DisparityMap/otbDisparityMapTo3DFilter.cxx     |    6 +-
 .../DisparityMap/otbDisparityMapToDEMFilter.cxx    |    4 +-
 .../DisparityMap/otbDisparityTranslateFilter.cxx   |    2 +-
 .../otbFineRegistrationImageFilterNew.cxx          |    2 +-
 .../Code/DisparityMap/otbMulti3DMapToDEMFilter.cxx |   27 +-
 .../otbMultiDisparityMapTo3DFilter.cxx             |    2 +-
 .../Code/DisparityMap/otbNCCRegistrationFilter.cxx |    3 -
 .../DisparityMap/otbNCCRegistrationFilterNew.cxx   |    4 +-
 ...LinearInterpolateDisplacementFieldGenerator.cxx |    2 +-
 ...earInterpolateDisplacementFieldGeneratorNew.cxx |    2 +-
 ...LinearInterpolateDisplacementFieldGenerator.cxx |    2 +-
 ...earInterpolateDisplacementFieldGeneratorNew.cxx |    2 +-
 .../otbNearestPointDisplacementFieldGenerator.cxx  |    2 +-
 ...tbNearestPointDisplacementFieldGeneratorNew.cxx |   13 +-
 ...bNearestTransformDisplacementFieldGenerator.cxx |    2 +-
 ...arestTransformDisplacementFieldGeneratorNew.cxx |    2 +-
 .../otbPixelWiseBlockMatchingImageFilter.cxx       |    4 +-
 .../otbPointSetToDisplacementFieldGeneratorNew.cxx |    2 +-
 ...ithTransformToDisplacementFieldGeneratorNew.cxx |    2 +-
 .../otbStereoSensorModelToElevationMapFilter.cxx   |    4 +-
 ...bStereorectificationDisplacementFieldSource.cxx |    4 +-
 .../otbStreamingWarpImageFilterNew.cxx             |    2 +-
 .../otbSubPixelDisparityImageFilter.cxx            |   11 +-
 Testing/Code/FeatureExtraction/CMakeLists.txt      |   20 +-
 .../otbAddCarvingPathFilterNew.cxx                 |    2 +-
 .../Code/FeatureExtraction/otbAlignImageToPath.cxx |    6 +-
 .../otbAssociativeSymmetricalSum.cxx               |    2 +-
 .../otbAssociativeSymmetricalSumNew.cxx            |    2 +-
 .../otbAssymmetricFusionOfLineDetector.cxx         |    2 +-
 .../otbAssymmetricFusionOfLineDetectorNew.cxx      |    2 +-
 .../otbBreakAngularPathListFilter.cxx              |    2 +-
 .../otbBreakAngularPathListFilterNew.cxx           |    2 +-
 .../FeatureExtraction/otbCloudDetectionFilter.cxx  |    2 +-
 .../otbCloudDetectionFilterNew.cxx                 |    2 +-
 .../otbCloudEstimatorDefaultFilter.cxx             |    2 +-
 .../FeatureExtraction/otbCloudEstimatorFilter.cxx  |    2 +-
 .../otbCloudEstimatorFilterNew.cxx                 |    2 +-
 .../FeatureExtraction/otbCompacityPathCircle.cxx   |    2 +-
 .../Code/FeatureExtraction/otbCompacityPathNew.cxx |    2 +-
 .../otbCompacityPathRectangle.cxx                  |    2 +-
 .../FeatureExtraction/otbCompacityPathSquare.cxx   |    2 +-
 .../FeatureExtraction/otbComplexMomentPath.cxx     |    2 +-
 .../otbComplexMomentPathFloat.cxx                  |    2 +-
 .../FeatureExtraction/otbComplexMomentPathNew.cxx  |    2 +-
 .../otbComplexMomentsImageFunction.cxx             |    6 +-
 Testing/Code/FeatureExtraction/otbDrawPath.cxx     |    2 +-
 .../Code/FeatureExtraction/otbDrawPathAlign.cxx    |    3 +-
 .../Code/FeatureExtraction/otbExtractSegments.cxx  |    2 +-
 .../FeatureExtraction/otbExtractSegmentsNew.cxx    |    2 +-
 .../otbFeatureExtractionTests15.cxx                |    2 +
 .../Code/FeatureExtraction/otbFillGapsFilter.cxx   |    2 +-
 .../FeatureExtraction/otbFillGapsFilterNew.cxx     |    2 +-
 .../otbFlusserMomentsImageFunction.cxx             |    8 +-
 Testing/Code/FeatureExtraction/otbFlusserPath.cxx  |    2 +-
 .../Code/FeatureExtraction/otbFlusserPathNew.cxx   |    2 +-
 .../otbFourierMellinDescriptors.cxx                |    8 +-
 .../otbFourierMellinImageFilter.cxx                |    3 +-
 .../otbFourierMellinImageFilterNew.cxx             |    3 +-
 .../otbFourierMellinImageFilterTestFFT.cxx         |    2 +-
 .../otbGreyLevelCooccurrenceIndexedList.cxx        |  250 ++
 .../otbGreyLevelCooccurrenceIndexedListNew.cxx     |   33 +
 ...MatrixAdvancedTextureCoefficientsCalculator.cxx |    2 +-
 ...rixAdvancedTextureCoefficientsCalculatorNew.cxx |    2 +-
 .../otbHaralickTexturesImageFunction.cxx           |    4 +-
 Testing/Code/FeatureExtraction/otbHarrisImage.cxx  |    2 +-
 .../Code/FeatureExtraction/otbHarrisToPointSet.cxx |    2 +-
 ...ramOfOrientedGradientCovariantImageFunction.cxx |    5 +-
 .../otbHoughTransform2DLinesImageTest.cxx          |    2 +-
 .../otbHuMomentsImageFunction.cxx                  |    8 +-
 Testing/Code/FeatureExtraction/otbHuPath.cxx       |    2 +-
 Testing/Code/FeatureExtraction/otbHuPathNew.cxx    |    3 +-
 .../otbImageFittingPolygonListFilter.cxx           |    2 +-
 .../otbImageFittingPolygonListFilterNew.cxx        |    2 +-
 .../FeatureExtraction/otbImageFunctionAdaptor.cxx  |    5 +-
 .../otbImageToCarvingPathFilterNew.cxx             |    2 +-
 .../FeatureExtraction/otbImageToEdgePathFilter.cxx |    3 +-
 .../otbImageToEdgePathFilterNew.cxx                |    2 +-
 .../otbImageToFastSIFTKeyPointSetFilterNew.cxx     |    2 +-
 ...tSIFTKeyPointSetFilterOutputDescriptorAscii.cxx |    2 +-
 ...FTKeyPointSetFilterOutputInterestPointAscii.cxx |    2 +-
 .../otbImageToHessianDeterminantImageFilter.cxx    |    2 +-
 .../otbImageToHessianDeterminantImageFilterNew.cxx |    2 +-
 .../otbImageToSIFTKeyPointSetFilterDistanceMap.cxx |    4 +-
 .../otbImageToSIFTKeyPointSetFilterNew.cxx         |    2 +-
 .../otbImageToSIFTKeyPointSetFilterOutputAscii.cxx |    2 +-
 ...oSIFTKeyPointSetFilterOutputDescriptorAscii.cxx |    2 +-
 .../otbImageToSIFTKeyPointSetFilterOutputImage.cxx |    4 +-
 ...FTKeyPointSetFilterOutputInterestPointAscii.cxx |    4 +-
 .../otbImageToSURFKeyPointSetFilterNew.cxx         |    2 +-
 ...RFKeyPointSetFilterOutputInterestPointAscii.cxx |    2 -
 .../otbKeyPointSetsMatchingFilter.cxx              |    2 +-
 .../otbKeyPointSetsMatchingFilterNew.cxx           |    2 +-
 Testing/Code/FeatureExtraction/otbLandmarkNew.cxx  |    2 +-
 .../otbLikelihoodPathListFilter.cxx                |    2 +-
 .../otbLikelihoodPathListFilterNew.cxx             |    2 +-
 .../otbLineCorrelationDetector.cxx                 |    2 +-
 .../otbLineCorrelationDetectorLinear.cxx           |    2 +-
 .../otbLineCorrelationDetectorNew.cxx              |    2 +-
 .../FeatureExtraction/otbLineDetectorBaseNew.cxx   |    2 +-
 .../FeatureExtraction/otbLineRatioDetector.cxx     |    2 +-
 .../otbLineRatioDetectorLinear.cxx                 |    2 +-
 .../FeatureExtraction/otbLineRatioDetectorNew.cxx  |    2 +-
 .../FeatureExtraction/otbLineSegmentDetector.cxx   |    6 +-
 ...SpatialObjectListToRightAnglePointSetFilter.cxx |    2 +-
 ...oRightAnglePointSetFilterByStepsOutputAscii.cxx |    2 +-
 ...tialObjectListToRightAnglePointSetFilterNew.cxx |    2 +-
 .../FeatureExtraction/otbLinkPathListFilter.cxx    |    2 +-
 .../FeatureExtraction/otbLinkPathListFilterNew.cxx |    2 +-
 .../otbLocalHistogramImageFunctionNew.cxx          |    2 +-
 .../otbLocalHistogramImageFunctionTest.cxx         |    2 +-
 Testing/Code/FeatureExtraction/otbLocalHough.cxx   |    2 +-
 .../Code/FeatureExtraction/otbLocalHoughDraw.cxx   |    2 +-
 .../Code/FeatureExtraction/otbLocalHoughNew.cxx    |    2 +-
 .../FeatureExtraction/otbMetaImageFunction.cxx     |    4 +-
 .../otbModulusAndDirectionImageFiltersNew.cxx      |    2 +-
 .../otbMultiplyByScalarImageTest.cxx               |    2 +-
 .../otbNeighborhoodScalarProductFilter.cxx         |    3 +-
 .../otbNeighborhoodScalarProductFilterNew.cxx      |    2 +-
 .../otbNonMaxRemovalByDirectionFilter.cxx          |    2 +-
 .../otbNonMaxRemovalByDirectionFilterNew.cxx       |    2 +-
 .../Code/FeatureExtraction/otbOrientationPath.cxx  |    2 +-
 .../FeatureExtraction/otbOrientationPathNew.cxx    |    2 +-
 .../otbParallelLinePathListFilter.cxx              |    2 +-
 .../otbParallelLinePathListFilterNew.cxx           |    2 +-
 .../otbPixelSuppressionByDirection.cxx             |    2 +-
 .../otbPixelSuppressionByDirectionNew.cxx          |    6 +-
 .../otbRadiometricMomentsImageFilter.cxx           |    5 +-
 .../otbRadiometricMomentsImageFunction.cxx         |    4 +-
 .../otbRealMomentsImageFunction.cxx                |    4 +-
 .../otbRegionImageToRectangularPathListFilter.cxx  |    2 +-
 ...tbRegionImageToRectangularPathListFilterNew.cxx |    2 +-
 .../otbRemoveCarvingPathFilterNew.cxx              |    2 +-
 .../otbRemoveIsolatedByDirectionFilter.cxx         |    2 +-
 .../otbRemoveIsolatedByDirectionFilterNew.cxx      |    2 +-
 .../otbRemoveTortuousPathListFilter.cxx            |    2 +-
 .../otbRemoveTortuousPathListFilterNew.cxx         |    2 +-
 .../otbRemoveWrongDirectionFilter.cxx              |    2 +-
 .../otbRemoveWrongDirectionFilterNew.cxx           |    2 +-
 .../FeatureExtraction/otbRoadExtractionFilter.cxx  |    6 +-
 .../otbRoadExtractionFilterNew.cxx                 |    2 +-
 .../otbSFSTexturesImageFilterNew.cxx               |    4 +-
 .../otbSFSTexturesImageFilterTest.cxx              |    3 +-
 .../otbScalarImageToAdvancedTexturesFilter.cxx     |   10 +-
 .../otbScalarImageToAdvancedTexturesFilterNew.cxx  |    2 +-
 .../otbScalarImageToHigherOrderTexturesFilter.cxx  |    2 +-
 .../otbScalarImageToPanTexTextureFilter.cxx        |    2 +-
 .../otbScalarImageToPanTexTextureFilterNew.cxx     |    2 +-
 .../otbScalarImageToTexturesFilter.cxx             |    4 +-
 .../otbScalarImageToTexturesFilterNew.cxx          |    2 +-
 .../otbSimplePointCountStrategyTest.cxx            |    3 +-
 .../otbSimplifyManyPathListFilter.cxx              |    2 +-
 .../otbSimplifyPathListFilter.cxx                  |    2 +-
 .../otbSimplifyPathListFilterNew.cxx               |    2 +-
 .../otbSqrtSpectralAngleImageFilter.cxx            |    2 +-
 .../otbStreamingLineSegmentDetector.cxx            |    4 +-
 .../Code/FeatureExtraction/otbTextureFunctor.cxx   |    2 +-
 .../FeatureExtraction/otbTextureImageFunction.cxx  |    2 +-
 .../otbThresholdImageToPointSetFilterNew.cxx       |    2 +-
 .../otbThresholdImageToPointSetTest.cxx            |    2 +-
 .../FeatureExtraction/otbTouziEdgeDetector.cxx     |    2 +-
 .../otbTouziEdgeDetectorDirection.cxx              |    2 +-
 .../FeatureExtraction/otbTouziEdgeDetectorNew.cxx  |    2 +-
 .../otbUrbanAreaDetectionImageFilter.cxx           |    4 +-
 .../otbUrbanAreaDetectionImageFilterNew.cxx        |    2 +-
 .../otbVectorDataToRightAngleVectorDataFilter.cxx  |    5 +-
 .../otbVectorizationPathListFilter.cxx             |    2 +-
 .../otbVectorizationPathListFilterNew.cxx          |    2 +-
 Testing/Code/Fusion/otbBayesianFusionFilter.cxx    |    2 +-
 Testing/Code/Fusion/otbBayesianFusionFilterNew.cxx |    6 +-
 Testing/Code/Fusion/otbFusionImageBaseNew.cxx      |    2 +-
 .../otbLmvmPanSharpeningFusionImageFilter.cxx      |    2 +-
 .../otbLmvmPanSharpeningFusionImageFilterNew.cxx   |    4 +-
 .../otbSimpleRcsPanSharpeningFusionImageFilter.cxx |    2 +-
 ...bSimpleRcsPanSharpeningFusionImageFilterNew.cxx |    4 +-
 .../Fuzzy/otbConfusionMatrixToMassOfBeliefTest.cxx |    4 +-
 .../otbDSFusionOfClassifiersImageFilterTest.cxx    |    2 +-
 .../Code/Fuzzy/otbDempsterShaferFusionTests.cxx    |    8 +-
 .../Code/Fuzzy/otbFuzzyDescriptorsModelManager.cxx |    6 +-
 Testing/Code/Fuzzy/otbFuzzyVariable2Values.cxx     |    2 +-
 Testing/Code/Fuzzy/otbFuzzyVariableDSApplied.cxx   |    2 +-
 Testing/Code/Fuzzy/otbFuzzyVariableGetMaxVar.cxx   |    2 +-
 Testing/Code/Fuzzy/otbFuzzyVariableNew.cxx         |    2 +-
 Testing/Code/Fuzzy/otbFuzzyVariableSetValue.cxx    |    2 +-
 Testing/Code/Fuzzy/otbJointMassOfBeliefFilter.cxx  |    4 +-
 Testing/Code/Fuzzy/otbMassOfBelief.cxx             |    2 +-
 Testing/Code/Fuzzy/otbMassOfBeliefDSApplied.cxx    |    2 +-
 Testing/Code/Fuzzy/otbStandardDSCostFunction.cxx   |    2 +-
 .../otbVectorDataToDSValidatedVectorDataFilter.cxx |    4 +-
 .../Fuzzy/otbVectorDataToRoadDescriptionFilter.cxx |    4 +-
 ...tbVectorDataToSpecificDescriptionFilterBase.cxx |    2 +-
 .../otbEigenvalueLikelihoodMaximization.cxx        |    4 +-
 .../otbFullyConstrainedLeastSquareImageFilter.cxx  |    4 +-
 .../Hyperspectral/otbISRAUnmixingImageFilter.cxx   |    4 +-
 .../Hyperspectral/otbLocalRxDetectorRoiTest.cxx    |    4 +-
 .../Code/Hyperspectral/otbLocalRxDetectorTest.cxx  |    6 +-
 .../Code/Hyperspectral/otbMDMDNMFImageFilter.cxx   |    7 +-
 .../Hyperspectral/otbNCLSUnmixingImageFilter.cxx   |    4 +-
 .../Hyperspectral/otbSparseUnmixingImageFilter.cxx |    2 -
 .../otbSparseUnmixingImageFilterNew.cxx            |    4 +-
 .../otbUnConstrainedLeastSquareImageFilter.cxx     |    4 +-
 Testing/Code/Hyperspectral/otbVCAImageFilter.cxx   |    4 +-
 .../Hyperspectral/otbVirtualDimensionality.cxx     |    4 +-
 Testing/Code/IO/CMakeLists.txt                     |  122 +-
 Testing/Code/IO/otbBSQImageIOTestCanRead.cxx       |    2 +-
 Testing/Code/IO/otbBSQImageIOTestCanWrite.cxx      |    2 +-
 .../Code/IO/otbComplexImageManipulationTest.cxx    |   26 +-
 Testing/Code/IO/otbComplexImageTests.cxx           |    8 +-
 Testing/Code/IO/otbDEMToImageGeneratorNew.cxx      |    2 +-
 .../Code/IO/otbDefaultImageMetadataInterface.cxx   |    2 +-
 .../otbDefaultImageMetadataInterfaceFactoryNew.cxx |    2 +-
 Testing/Code/IO/otbDoubleImageIOTest.cxx           |    2 +-
 Testing/Code/IO/otbExtendedFilenameTest.cxx        |    5 +-
 .../IO/otbExtendedFilenameToReaderOptionsTest.cxx  |    2 +-
 .../IO/otbExtendedFilenameToWriterOptionsTest.cxx  |    2 +-
 Testing/Code/IO/otbFloatImageIOTest.cxx            |    2 +-
 .../IO/otbFormosatImageMetadataInterfaceNew.cxx    |    2 +-
 Testing/Code/IO/otbGDALDriverDoubleWritingTest.cxx |    2 +-
 Testing/Code/IO/otbGDALImageIOTestCanRead.cxx      |    2 +-
 Testing/Code/IO/otbGDALImageIOTestCanWrite.cxx     |    2 +-
 .../Code/IO/otbGDALImageIOTestWriteMetadata.cxx    |    3 +-
 Testing/Code/IO/otbGDALOverviewsBuilder.cxx        |    4 +-
 Testing/Code/IO/otbIOTests13.cxx                   |    4 +
 Testing/Code/IO/otbIOTests18.cxx                   |    2 +
 .../Code/IO/otbIkonosImageMetadataInterfaceNew.cxx |    2 +-
 Testing/Code/IO/otbImageFileReaderMSTAR.cxx        |    2 +-
 Testing/Code/IO/otbImageFileReaderONERAComplex.cxx |    2 +-
 Testing/Code/IO/otbImageFileReaderRADChar.cxx      |    2 +-
 .../Code/IO/otbImageFileReaderRADComplexDouble.cxx |    2 +-
 .../Code/IO/otbImageFileReaderRADComplexFloat.cxx  |    2 +-
 .../otbImageFileReaderRADComplexFloatExtract.cxx   |    3 +-
 .../Code/IO/otbImageFileReaderRADComplexInt.cxx    |    2 +-
 Testing/Code/IO/otbImageFileReaderRADFloat.cxx     |    2 +-
 Testing/Code/IO/otbImageFileReaderRADInt.cxx       |    2 +-
 Testing/Code/IO/otbImageFileReaderRGBTest.cxx      |    2 +-
 Testing/Code/IO/otbImageFileReaderServerName.cxx   |    2 +-
 Testing/Code/IO/otbImageFileReaderTest.cxx         |    2 +-
 Testing/Code/IO/otbImageFileReaderTestFloat.cxx    |    2 +-
 .../Code/IO/otbImageFileReaderWithComplexPixel.cxx |    1 -
 Testing/Code/IO/otbImageFileWriterONERAComplex.cxx |    2 +-
 Testing/Code/IO/otbImageFileWriterRGBTest.cxx      |    2 +-
 .../IO/otbImageFileWriterStreamingONERAComplex.cxx |    2 +-
 Testing/Code/IO/otbImageFileWriterTest.cxx         |    2 +-
 .../Code/IO/otbImageFileWriterTestWithoutInput.cxx |   24 +-
 .../IO/otbImageFileWriterWithExtendedOptionBox.cxx |    8 +-
 Testing/Code/IO/otbImageIOFactoryNew.cxx           |    2 +-
 Testing/Code/IO/otbImageMetadataFileWriterTest.cxx |    2 +-
 .../Code/IO/otbImageMetadataInterfaceBaseTest.cxx  |    2 +-
 Testing/Code/IO/otbImageMetadataInterfaceTest2.cxx |    2 +-
 .../IO/otbImageMetadataStreamingFileWriterTest.cxx |    2 +-
 Testing/Code/IO/otbImageSeriesFileReader.cxx       |    2 +-
 ...otbImageStreamingFileWriterTestWithoutInput.cxx |   24 +-
 Testing/Code/IO/otbImageTest.cxx                   |    2 +-
 .../Code/IO/otbImageToOSMVectorDataGenerator.cxx   |    2 +-
 Testing/Code/IO/otbIntImageIOTest.cxx              |    2 +-
 Testing/Code/IO/otbJPEG2000ImageIOTestCanRead.cxx  |    2 +-
 Testing/Code/IO/otbJPEG2000ImageIOTestCanWrite.cxx |    2 +-
 Testing/Code/IO/otbKMLVectorDataIONew.cxx          |    2 +-
 Testing/Code/IO/otbKMLVectorDataIOTestCanRead.cxx  |    2 +-
 Testing/Code/IO/otbKMLVectorDataIOTestCanWrite.cxx |    2 +-
 Testing/Code/IO/otbKmzProductWriter.cxx            |    2 +-
 Testing/Code/IO/otbLUMImageIOTestCanRead.cxx       |    2 +-
 Testing/Code/IO/otbLUMImageIOTestCanWrite.cxx      |    2 +-
 Testing/Code/IO/otbMSTARImageIOTestCanRead.cxx     |    2 +-
 Testing/Code/IO/otbMWImageIOTestCanRead.cxx        |    2 +-
 Testing/Code/IO/otbMWImageIOTestCanWrite.cxx       |    2 +-
 Testing/Code/IO/otbMapFileProductWriter.cxx        |    3 +-
 Testing/Code/IO/otbMapFileProductWriterNew.cxx     |    2 +-
 Testing/Code/IO/otbMapProjectionAdapterTest.cxx    |    2 +-
 Testing/Code/IO/otbOGRVectorDataIOCanWrite.cxx     |    2 +-
 Testing/Code/IO/otbOGRVectorDataIONew.cxx          |    2 +-
 Testing/Code/IO/otbONERAImageIOTestCanRead.cxx     |    2 +-
 Testing/Code/IO/otbOSMDataToVectorDataTests.cxx    |    4 +-
 .../IO/otbOpticalDefaultImageMetadataInterface.cxx |    2 +-
 ...icalDefaultImageMetadataInterfaceFactoryNew.cxx |    2 +-
 .../otbOpticalDefaultImageMetadataInterfaceNew.cxx |    2 +-
 .../IO/otbOpticalImageMetadataInterfaceTest.cxx    |    2 +-
 Testing/Code/IO/otbPNGIndexedNbBandsTest.cxx       |    2 +-
 Testing/Code/IO/otbPipeline.cxx                    |    2 +-
 .../Code/IO/otbPipelineMetadataHandlingTest.cxx    |    2 +-
 ...otbPipelineMetadataHandlingWithUFFilterTest.cxx |    2 +-
 .../IO/otbPleiadesImageMetadataInterfaceNew.cxx    |    2 +-
 .../IO/otbQuickBirdImageMetadataInterfaceNew.cxx   |    2 +-
 Testing/Code/IO/otbRADImageIOTestCanRead.cxx       |    2 +-
 .../otbReadingComplexDataIntoComplexImageTest.cxx  |    2 +-
 .../IO/otbSarDefaultImageMetadataInterface.cxx     |    2 +-
 ...bSarDefaultImageMetadataInterfaceFactoryNew.cxx |    2 +-
 .../IO/otbSarDefaultImageMetadataInterfaceNew.cxx  |    2 +-
 .../Code/IO/otbSarImageMetadataInterfaceTest.cxx   |    2 +-
 .../IO/otbScalarBufferToImageFileWriterNew.cxx     |    2 +-
 .../IO/otbScalarBufferToImageFileWriterTest.cxx    |    2 +-
 Testing/Code/IO/otbShortImageIOTest.cxx            |    2 +-
 Testing/Code/IO/otbShortRGBImageIOTest.cxx         |    2 +-
 .../Code/IO/otbSpectralSensitivityReaderNew.cxx    |    2 +-
 .../Code/IO/otbSpectralSensitivityReaderTest.cxx   |    7 +-
 .../Code/IO/otbSpot6ImageMetadataInterfaceNew.cxx  |   34 +
 .../Code/IO/otbSpotImageMetadataInterfaceNew.cxx   |    2 +-
 .../Code/IO/otbStreamingImageFileWriterTest.cxx    |    2 +-
 ...ageFileWriterTestCalculateNumberOfDivisions.cxx |    2 +-
 .../otbStreamingImageFileWriterWithFilterTest.cxx  |    2 +-
 Testing/Code/IO/otbStreamingImageFilterTest.cxx    |    2 +-
 .../IO/otbStreamingShortImageFileWriterTest.cxx    |    2 +-
 .../IO/otbTerraSarImageMetadataInterfaceNew.cxx    |    2 +-
 Testing/Code/IO/otbThreadsTest.cxx                 |    3 +-
 Testing/Code/IO/otbTileMapImageIOHelperTest.cxx    |    4 +-
 Testing/Code/IO/otbTileMapWriter.cxx               |    4 -
 .../Code/IO/otbVectorDataFileGeoReaderWriter.cxx   |    2 +-
 Testing/Code/IO/otbVectorDataFileReader.cxx        |    3 +-
 Testing/Code/IO/otbVectorDataFileReaderNew.cxx     |    2 +-
 Testing/Code/IO/otbVectorDataFileReaderWriter.cxx  |    2 +-
 Testing/Code/IO/otbVectorDataFileWriter.cxx        |    4 +-
 .../IO/otbVectorDataFileWriterMultiPolygons.cxx    |    4 +-
 Testing/Code/IO/otbVectorDataFileWriterNew.cxx     |    3 +-
 .../Code/IO/otbVectorDataFileWriterPolygons.cxx    |    3 +-
 Testing/Code/IO/otbVectorDataIOFactory.cxx         |    3 +-
 Testing/Code/IO/otbVectorDataKeywordlistTest.cxx   |    5 +-
 Testing/Code/IO/otbVectorDataSourceNew.cxx         |    2 +-
 .../Code/IO/otbVectorImageFileReaderWriterTest.cxx |    2 +-
 .../otbVectorImageFileWriterTestWithoutInput.cxx   |   18 +
 ...torImageStreamingFileWriterTestWithoutInput.cxx |   18 +
 Testing/Code/IO/otbWavelengthSpectralBandsTest.cxx |    5 +-
 .../IO/otbWorldView2ImageMetadataInterfaceNew.cxx  |    2 +-
 .../otbWritingComplexDataWithComplexImageTest.cxx  |    2 +-
 .../Learning/otbConcatenateSampleListFilter.cxx    |    8 +-
 .../Learning/otbConfusionMatrixCalculatorTest.cxx  |    4 +-
 .../otbConfusionMatrixMeasurementsTest.cxx         |    4 +-
 Testing/Code/Learning/otbDecisionTreeBuild.cxx     |    3 +-
 Testing/Code/Learning/otbDecisionTreeNew.cxx       |    2 +-
 .../Learning/otbDecisionTreeWithRealValues.cxx     |    3 +-
 .../otbExhaustiveExponentialOptimizerNew.cxx       |    2 +-
 .../otbExhaustiveExponentialOptimizerTest.cxx      |    4 +-
 .../otbGaussianAdditiveNoiseSampleListFilter.cxx   |    4 +-
 .../Code/Learning/otbGaussianModelComponent.cxx    |    2 +-
 .../Code/Learning/otbImageClassificationFilter.cxx |    4 +-
 .../otbKMeansImageClassificationFilter.cxx         |    2 +-
 .../otbKMeansImageClassificationFilterNew.cxx      |    2 +-
 .../Code/Learning/otbListSampleGeneratorTest.cxx   |    3 +-
 .../otbListSampleToBalancedListSampleFilter.cxx    |    2 +-
 ...otbNeighborhoodMajorityVotingImageFilterNew.cxx |    2 +-
 Testing/Code/Learning/otbPeriodicSOM.cxx           |    2 +-
 Testing/Code/Learning/otbPeriodicSOMNew.cxx        |    2 +-
 Testing/Code/Learning/otbROIdataConversion.cxx     |    3 +-
 Testing/Code/Learning/otbROIdataConversionNew.cxx  |    2 +-
 Testing/Code/Learning/otbSEMClassifierNew.cxx      |    2 +-
 Testing/Code/Learning/otbSOM.cxx                   |    2 +-
 Testing/Code/Learning/otbSOMActivationBuilder.cxx  |    2 +-
 .../Code/Learning/otbSOMActivationBuilderNew.cxx   |    4 +-
 Testing/Code/Learning/otbSOMClassifier.cxx         |    2 +
 Testing/Code/Learning/otbSOMClassifierNew.cxx      |    3 +-
 .../Learning/otbSOMImageClassificationFilter.cxx   |    2 +-
 .../otbSOMImageClassificationFilterNew.cxx         |    2 +-
 Testing/Code/Learning/otbSOMMap.cxx                |    2 +-
 Testing/Code/Learning/otbSOMMapNew.cxx             |    2 +-
 Testing/Code/Learning/otbSOMNew.cxx                |    2 +-
 Testing/Code/Learning/otbSOMWithMissingValue.cxx   |    2 +-
 .../Code/Learning/otbSOMWithMissingValueNew.cxx    |    2 +-
 Testing/Code/Learning/otbSOMbasedImageFilter.cxx   |    2 +-
 .../Code/Learning/otbSOMbasedImageFilterNew.cxx    |    2 +-
 Testing/Code/Learning/otbSVMClassifierImage.cxx    |    1 -
 Testing/Code/Learning/otbSVMClassifierNew.cxx      |    2 +-
 .../otbSVMCrossValidationCostFunctionNew.cxx       |    4 +-
 .../Learning/otbSVMImageClassificationFilter.cxx   |    2 +-
 .../otbSVMImageClassificationFilterNew.cxx         |    2 +-
 .../otbSVMImageClassificationWithRuleFilter.cxx    |    2 +-
 .../otbSVMImageClassificationWithRuleFilterNew.cxx |    2 +-
 .../otbSVMImageModelEstimatorModelAccessor.cxx     |    3 +-
 .../Code/Learning/otbSVMImageModelEstimatorNew.cxx |    4 +-
 .../Learning/otbSVMImageModelEstimatorTrain.cxx    |    3 +-
 .../otbSVMImageModelEstimatorTrainOneClass.cxx     |    3 +-
 ...alAngleKernelFunctorImageClassificationTest.cxx |    1 -
 ...alAngleKernelFunctorImageModelEstimatorTest.cxx |    1 -
 Testing/Code/Learning/otbSVMMarginSampler.cxx      |    2 +-
 Testing/Code/Learning/otbSVMModelAccessor.cxx      |    5 +-
 Testing/Code/Learning/otbSVMModelCopyTest.cxx      |    6 +-
 .../Learning/otbSVMModelGenericKernelLoadSave.cxx  |    5 +-
 .../Learning/otbSVMModelGenericKernelsTest.cxx     |    1 -
 Testing/Code/Learning/otbSVMModelLoad.cxx          |    6 +-
 Testing/Code/Learning/otbSVMModelLoadSave.cxx      |    5 +-
 Testing/Code/Learning/otbSVMModelNew.cxx           |    4 +-
 .../Learning/otbSVMPointSetModelEstimatorNew.cxx   |    2 +-
 .../Learning/otbSVMPointSetModelEstimatorTrain.cxx |    2 +-
 .../otbSVMSampleListModelEstimatorTest.cxx         |    3 +-
 .../Learning/otbShiftScaleSampleListFilter.cxx     |    4 +-
 .../Code/Learning/otbTrainMachineLearningModel.cxx |   20 +-
 Testing/Code/Markov/otbMRFEnergyEdgeFidelity.cxx   |    2 +-
 .../Code/Markov/otbMRFEnergyEdgeFidelityNew.cxx    |    5 +-
 .../Markov/otbMRFEnergyFisherClassification.cxx    |    4 +-
 Testing/Code/Markov/otbMRFEnergyGaussian.cxx       |    2 +-
 .../Markov/otbMRFEnergyGaussianClassification.cxx  |    2 +-
 .../otbMRFEnergyGaussianClassificationNew.cxx      |    2 +-
 Testing/Code/Markov/otbMRFEnergyGaussianNew.cxx    |    2 +-
 Testing/Code/Markov/otbMRFEnergyPotts.cxx          |    2 +-
 Testing/Code/Markov/otbMRFEnergyPottsNew.cxx       |    2 +-
 Testing/Code/Markov/otbMRFOptimizerICM.cxx         |    2 +-
 Testing/Code/Markov/otbMRFOptimizerICMNew.cxx      |    2 +-
 Testing/Code/Markov/otbMRFOptimizerMetropolis.cxx  |    2 +-
 .../Code/Markov/otbMRFOptimizerMetropolisNew.cxx   |    2 +-
 Testing/Code/Markov/otbMRFSamplerMAP.cxx           |    2 +-
 Testing/Code/Markov/otbMRFSamplerMAPNew.cxx        |    2 +-
 Testing/Code/Markov/otbMRFSamplerRandom.cxx        |    2 +-
 Testing/Code/Markov/otbMRFSamplerRandomMAP.cxx     |    2 +-
 Testing/Code/Markov/otbMRFSamplerRandomMAPNew.cxx  |    2 +-
 Testing/Code/Markov/otbMRFSamplerRandomNew.cxx     |    2 +-
 Testing/Code/Markov/otbMarkovRandomFieldFilter.cxx |    2 +-
 .../Code/Markov/otbMarkovRandomFieldFilterNew.cxx  |    2 +-
 .../otbConvexOrConcaveClassificationFilter.cxx     |    2 +-
 .../otbConvexOrConcaveClassificationFilterNew.cxx  |    2 +-
 ...bGeodesicMorphologyDecompositionImageFilter.cxx |    2 +-
 ...odesicMorphologyDecompositionImageFilterNew.cxx |    2 +-
 ...MorphologyIterativeDecompositionImageFilter.cxx |    2 +-
 ...phologyIterativeDecompositionImageFilterNew.cxx |    2 +-
 .../otbGeodesicMorphologyLevelingFilter.cxx        |    2 +-
 .../otbGeodesicMorphologyLevelingFilterNew.cxx     |    2 +-
 .../otbMorphologicalClosingProfileFilter.cxx       |    2 +-
 .../otbMorphologicalClosingProfileFilterNew.cxx    |    5 +-
 .../otbMorphologicalOpeningProfileFilter.cxx       |    2 +-
 .../otbMorphologicalOpeningProfileFilterNew.cxx    |    4 +-
 .../otbMorphologicalPyramidAnalysisFilter.cxx      |    6 +-
 .../otbMorphologicalPyramidAnalysisFilterNew.cxx   |    2 +-
 .../otbMorphologicalPyramidMRToMSConverter.cxx     |    2 +-
 .../otbMorphologicalPyramidMRToMSConverterNew.cxx  |    2 +-
 .../otbMorphologicalPyramidResampler.cxx           |    2 +-
 .../otbMorphologicalPyramidResamplerNew.cxx        |    2 +-
 .../otbMorphologicalPyramidSegmentationFilter.cxx  |    2 +-
 ...tbMorphologicalPyramidSegmentationFilterNew.cxx |    2 +-
 .../otbMorphologicalPyramidSegmenter.cxx           |    2 +-
 .../otbMorphologicalPyramidSegmenterNew.cxx        |    2 +-
 .../otbMorphologicalPyramidSynthesisFilter.cxx     |    2 +-
 .../otbMorphologicalPyramidSynthesisFilterNew.cxx  |    2 +-
 ...ltiScaleConvexOrConcaveClassificationFilter.cxx |    2 +-
 ...ScaleConvexOrConcaveClassificationFilterNew.cxx |    4 +-
 ...DerivativeToMultiScaleCharacteristicsFilter.cxx |    2 +-
 ...ivativeToMultiScaleCharacteristicsFilterNew.cxx |    2 +-
 .../otbProfileToProfileDerivativeFilter.cxx        |    2 +-
 .../otbProfileToProfileDerivativeFilterNew.cxx     |    2 +-
 .../Code/MultiScale/otbSubsampleImageFilter.cxx    |    2 +-
 .../Code/MultiScale/otbSubsampleImageFilterNew.cxx |    2 +-
 Testing/Code/MultiScale/otbWaveletFilterBank.cxx   |    2 +-
 .../Code/MultiScale/otbWaveletFilterBankNew.cxx    |    2 +-
 .../MultiScale/otbWaveletInverseFilterBankNew.cxx  |    2 +-
 .../MultiScale/otbWaveletInverseTransformNew.cxx   |    2 +-
 Testing/Code/MultiScale/otbWaveletOperator.cxx     |    2 +-
 Testing/Code/MultiScale/otbWaveletOperatorNew.cxx  |    2 +-
 .../otbWaveletPacketInverseTransformNew.cxx        |    2 +-
 .../Code/MultiScale/otbWaveletPacketTransform.cxx  |    2 +-
 .../MultiScale/otbWaveletPacketTransformNew.cxx    |    2 +-
 Testing/Code/MultiScale/otbWaveletTransformNew.cxx |    2 +-
 ...velopeSavitzkyGolayInterpolationFunctorTest.cxx |    2 +-
 .../MultiTemporal/otbPolynomialTimeSeriesTest.cxx  |    2 +-
 .../otbSavitzkyGolayInterpolationFunctorNew.cxx    |    2 +-
 .../otbSavitzkyGolayInterpolationFunctorTest.cxx   |    2 +-
 .../otbTimeSeriesLeastSquareFittingFunctorNew.cxx  |    2 +-
 .../otbTimeSeriesLeastSquareFittingFunctorTest.cxx |    2 +-
 ...eSeriesLeastSquareFittingFunctorWeightsTest.cxx |    2 +-
 .../Code/OBIA/otbAttributesMapLabelObjectNew.cxx   |    2 +-
 ...tbAttributesMapLabelObjectWithClassLabelNew.cxx |    2 +-
 .../otbAttributesMapOpeningLabelMapFilterNew.cxx   |    2 +-
 .../otbBandsStatisticsAttributesLabelMapFilter.cxx |    5 +-
 .../Code/OBIA/otbGISTableToLabelMapFilterNew.cxx   |    2 +-
 .../otbImageToLabelMapWithAttributesFilter.cxx     |    5 +-
 .../otbImageToLabelMapWithAttributesFilterNew.cxx  |    2 +-
 .../OBIA/otbKMeansAttributesLabelMapFilter.cxx     |    4 +-
 .../otbLabelImageToLabelMapWithAdjacencyFilter.cxx |    4 +-
 Testing/Code/OBIA/otbLabelMapSVMClassifier.cxx     |    6 +-
 Testing/Code/OBIA/otbLabelMapSourceNew.cxx         |    2 +-
 .../OBIA/otbLabelMapToAttributeImageFilterNew.cxx  |    2 +-
 .../Code/OBIA/otbLabelMapToGISTableFilterNew.cxx   |    2 +-
 .../Code/OBIA/otbLabelMapToSampleListFilterNew.cxx |    2 +-
 .../Code/OBIA/otbLabelMapToVectorDataFilter.cxx    |    3 -
 .../Code/OBIA/otbLabelMapToVectorDataFilterNew.cxx |    4 +-
 ...pWithClassLabelToLabeledSampleListFilterNew.cxx |    2 +-
 .../OBIA/otbLabelObjectToPolygonFunctorNew.cxx     |    2 +-
 ...iftConnectedComponentSegmentationFilterTest.cxx |    2 +-
 ...eanShiftStreamingConnectedComponentOBIATest.cxx |    2 +-
 .../OBIA/otbMinMaxAttributesLabelMapFilter.cxx     |    4 +-
 .../OBIA/otbNormalizeAttributesLabelMapFilter.cxx  |    4 +-
 .../OBIA/otbShapeAttributesLabelMapFilterNew.cxx   |    2 +-
 .../otbStatisticsAttributesLabelMapFilterNew.cxx   |    2 +-
 .../otbStreamingConnectedComponentOBIATest.cxx     |    4 +-
 .../Code/OBIA/otbVectorDataToLabelMapFilter.cxx    |    3 -
 .../Code/OBIA/otbVectorDataToLabelMapFilterNew.cxx |    2 +-
 .../otbLabeledSampleLocalizationGenerator.cxx      |    4 +-
 .../otbStandardMetaImageFunctionBuilder.cxx        |   11 +-
 Testing/Code/Projections/CMakeLists.txt            |   12 +-
 .../Code/Projections/otbCompositeTransformNew.cxx  |    2 +-
 .../otbForwardBackwardProjectionConsistency.cxx    |    2 +-
 ...CPsToRPCSensorModelImageFilterCheckRpcModel.cxx |    2 +-
 .../otbGCPsToRPCSensorModelImageFilterNew.cxx      |    2 +-
 .../Code/Projections/otbGenericMapProjection.cxx   |    2 +-
 .../Projections/otbGenericMapProjectionNew.cxx     |    2 +-
 .../otbGenericRSResampleImageFilter.cxx            |    7 +-
 Testing/Code/Projections/otbGenericRSTransform.cxx |    2 +-
 .../Projections/otbGenericRSTransformFromImage.cxx |    4 +-
 ...RSTransformGenericConversionCheckingFromGCP.cxx |    2 +-
 .../Code/Projections/otbGenericRSTransformNew.cxx  |    2 +-
 .../Projections/otbGenericRSTransformWithSRID.cxx  |    2 +-
 .../Code/Projections/otbGeocentricTransform.cxx    |    2 +-
 .../Code/Projections/otbGeocentricTransformNew.cxx |    2 +-
 .../Code/Projections/otbGeographicalDistance.cxx   |    4 +-
 .../otbImageToEnvelopeVectorDataFilter.cxx         |    4 +-
 .../otbImageToGenericRSOutputParameters.cxx        |    4 +-
 .../otbLeastSquareAffineTransformEstimatorNew.cxx  |    2 +-
 Testing/Code/Projections/otbMapProjection.cxx      |    2 +-
 Testing/Code/Projections/otbMapProjectionsNew.cxx  |    4 +-
 .../Projections/otbOrthoRectificationFilter.cxx    |    4 +-
 .../Projections/otbOrthoRectificationFilterNew.cxx |    2 +-
 .../Code/Projections/otbOssimElevManagerTest.cxx   |    1 -
 .../Code/Projections/otbOssimElevManagerTest2.cxx  |    2 -
 .../otbPhysicalToRPCSensorModelImageFilter.cxx     |    1 -
 Testing/Code/Projections/otbProjectionBaseNew.cxx  |    2 +-
 Testing/Code/Projections/otbRationalTransform.cxx  |    3 +-
 ...bRationalTransformToDisplacementFieldSource.cxx |    3 -
 .../Projections/otbRegionProjectionResampler.cxx   |    2 -
 Testing/Code/Projections/otbSensorModelsNew.cxx    |    2 +-
 Testing/Code/Projections/otbTileMapTransform.cxx   |    2 +-
 Testing/Code/Projections/otbUtmMapProjection.cxx   |    2 +-
 .../otbVectorDataExtractROIandProjection.cxx       |    2 +-
 .../otbVectorDataIntoImageProjectionFilterTest.cxx |    6 +-
 .../otbVectorDataProjectionFilterNew.cxx           |    2 +-
 .../Projections/otbVectorDataTransformFilter.cxx   |    4 +-
 Testing/Code/Radiometry/CMakeLists.txt             |  490 ++-
 ...hannelRAndGAndNIRVegetationIndexImageFilter.cxx |    2 +-
 ...otbAVIRAndGAndNIRVegetationIndexImageFilter.cxx |    2 +-
 Testing/Code/Radiometry/otbAeronetExtractData.cxx  |    2 +-
 .../Radiometry/otbAeronetExtractDataBadData.cxx    |    2 +-
 Testing/Code/Radiometry/otbAeronetNew.cxx          |    2 +-
 .../otbAtmosphericCorrectionParametersNew.cxx      |    2 +-
 ...tionParametersTo6SAtmosphericRadiativeTerms.cxx |  184 -
 ...nParametersTo6SAtmosphericRadiativeTermsNew.cxx |   33 -
 .../otbAtmosphericCorrectionSequencement.cxx       |  104 +-
 .../otbAtmosphericRadiativeTermsTest.cxx           |    6 +-
 .../Radiometry/otbDEMCaracteristicsExtractor.cxx   |    2 +-
 .../otbDEMCaracteristicsExtractorNew.cxx           |    2 +-
 ...hannelRAndBAndNIRVegetationIndexImageFilter.cxx |    2 +-
 ...otbEVIRAndBAndNIRVegetationIndexImageFilter.cxx |    2 +-
 .../Code/Radiometry/otbFilterFunctionValues.cxx    |    4 +-
 .../Code/Radiometry/otbGAndRIndexImageFilter.cxx   |    2 +-
 .../Radiometry/otbGAndRIndexImageFilterNew.cxx     |    2 +-
 .../otbIBGAndRAndNIRIndexImageFilter.cxx           |    2 +-
 ...tbIBMultiChannelGAndRAndNIRIndexImageFilter.cxx |    2 +-
 .../otbISUMultiChannelRAndNIRIndexImageFilter.cxx  |    2 +-
 .../Radiometry/otbISURAndNIRIndexImageFilter.cxx   |    2 +-
 .../otbImageMetadataCorrectionParametersNew.cxx    |   31 +
 .../Radiometry/otbImageToLuminanceImageFilter.cxx  |    2 +-
 .../otbImageToLuminanceImageFilterAuto.cxx         |    3 +-
 .../otbImageToLuminanceImageFilterNew.cxx          |    2 +-
 .../otbImageToReflectanceImageFilterAuto.cxx       |    4 +-
 .../otbImageToReflectanceImageFilterNew.cxx        |    2 +-
 .../otbLAIFromNDVILogarithmicFunctorTest.cxx       |    2 +-
 .../otbLAIFromReflectancesLinearFunctorTest.cxx    |    2 +-
 Testing/Code/Radiometry/otbLandsatTMBrightTest.cxx |    2 +-
 .../Code/Radiometry/otbLandsatTMIndexBIOTest.cxx   |    2 +-
 .../Radiometry/otbLandsatTMIndexBrightTest.cxx     |    2 +-
 .../Code/Radiometry/otbLandsatTMIndexMIR1Test.cxx  |    2 +-
 .../Code/Radiometry/otbLandsatTMIndexMIR2Test.cxx  |    2 +-
 .../Radiometry/otbLandsatTMIndexMIRTIRTest.cxx     |    2 +-
 .../Radiometry/otbLandsatTMIndexNDBBBITest.cxx     |    2 +-
 .../Code/Radiometry/otbLandsatTMIndexNDBSITest.cxx |    2 +-
 .../Code/Radiometry/otbLandsatTMIndexNDSITest.cxx  |    2 +-
 .../Radiometry/otbLandsatTMIndexNDSIVisTest.cxx    |    2 +-
 .../Code/Radiometry/otbLandsatTMIndexNDVITest.cxx  |    2 +-
 .../Code/Radiometry/otbLandsatTMIndexNIRTest.cxx   |    2 +-
 .../Code/Radiometry/otbLandsatTMIndexTIRTest.cxx   |    2 +-
 .../Code/Radiometry/otbLandsatTMIndexVisTest.cxx   |    2 +-
 .../Radiometry/otbLandsatTMKernelSpectralRules.cxx |    7 +-
 .../otbLandsatTMLinguisticLabelsTest.cxx           |    2 +-
 ...otbLandsatTMSpectralRuleBasedClassifierTest.cxx |    2 +-
 .../Code/Radiometry/otbLandsatTMThickCloudTest.cxx |    2 +-
 .../Code/Radiometry/otbLandsatTMThinCloudTest.cxx  |    2 +-
 .../Code/Radiometry/otbLandsatTMVegetationTest.cxx |    2 +-
 .../Radiometry/otbLuminanceToImageImageFilter.cxx  |   68 +
 .../otbLuminanceToImageImageFilterAuto.cxx         |   73 +
 .../otbLuminanceToImageImageFilterNew.cxx          |   37 +
 .../otbLuminanceToReflectanceImageFilterAuto.cxx   |    3 +-
 .../otbLuminanceToReflectanceImageFilterNew.cxx    |    2 +-
 .../otbMultiChannelGAndRIndexImageFilter.cxx       |    2 +-
 .../otbMultiChannelGAndRIndexImageFilterNew.cxx    |    2 +-
 ...hannelRAndBAndNIRVegetationIndexImageFilter.cxx |    2 +-
 ...nelRAndBAndNIRVegetationIndexImageFilterNew.cxx |    2 +-
 ...bMultiChannelRAndGAndNIRIndexImageFilterNew.cxx |    2 +-
 ...ltiChannelRAndNIRVegetationIndexImageFilter.cxx |    2 +-
 ...ChannelRAndNIRVegetationIndexImageFilterNew.cxx |    2 +-
 ...tbNDBIMultiChannelTM4AndTM5IndexImageFilter.cxx |    2 +-
 .../otbNDBITM4AndTM5IndexImageFilter.cxx           |    2 +-
 .../otbNDWIMultiChannelWaterIndexImageFilter.cxx   |    2 +-
 .../Radiometry/otbNDWIWaterIndexImageFilter.cxx    |    2 +-
 .../otbRAndBAndNIRVegetationIndexImageFilter.cxx   |    2 +-
 ...otbRAndBAndNIRVegetationIndexImageFilterNew.cxx |    2 +-
 ...otbRAndGAndNIRVegetationIndexImageFilterNew.cxx |    2 +-
 .../otbRAndNIRVegetationIndexImageFilter.cxx       |    2 +-
 .../otbRAndNIRVegetationIndexImageFilterNew.cxx    |    2 +-
 ...ectionParametersToAtmosphericRadiativeTerms.cxx |  178 +
 ...ionParametersToAtmosphericRadiativeTermsNew.cxx |   35 +
 Testing/Code/Radiometry/otbRadiometryTests2.cxx    |    9 +
 Testing/Code/Radiometry/otbRadiometryTests3.cxx    |    5 +-
 Testing/Code/Radiometry/otbRadiometryTests4.cxx    |    4 +-
 .../otbReflectanceToImageImageFilter.cxx           |  183 +
 .../otbReflectanceToImageImageFilterAuto.cxx       |   71 +
 .../otbReflectanceToImageImageFilterNew.cxx        |   37 +
 .../otbReflectanceToLuminanceImageFilter.cxx       |   90 +
 .../otbReflectanceToLuminanceImageFilterAuto.cxx   |   57 +
 .../otbReflectanceToLuminanceImageFilterNew.cxx    |   37 +
 ...lectanceToSurfaceReflectanceImageFilterTest.cxx |   50 +-
 ...tanceToRomaniaSurfaceReflectanceImageFilter.cxx |   65 +-
 .../otbSIXSTraitsComputeAtmosphericParameters.cxx  |    2 +-
 Testing/Code/Radiometry/otbSIXSTraitsTest.cxx      |    2 +-
 .../Code/Radiometry/otbSarBrightnessFunction.cxx   |    2 +-
 .../otbSarBrightnessFunctionWithoutNoise.cxx       |    2 +-
 .../Code/Radiometry/otbSarBrightnessFunctor.cxx    |    2 +-
 .../otbSarBrightnessFunctorWithoutNoise.cxx        |    2 +-
 .../Radiometry/otbSarParametricMapFunctionTest.cxx |    4 +-
 .../otbSarParametricMapFunctionToImageFilter.cxx   |    2 +-
 .../otbSarRadiometricCalibrationFunction.cxx       |    2 +-
 ...rRadiometricCalibrationFunctionWithoutNoise.cxx |    2 +-
 .../otbSarRadiometricCalibrationFunctor.cxx        |    2 +-
 ...arRadiometricCalibrationFunctorWithoutNoise.cxx |    2 +-
 ...ltiChannelRAndNIRVegetationIndexImageFilter.cxx |    2 +-
 ...tbSetASetBRAndNIRVegetationIndexImageFilter.cxx |    2 +-
 ...faceAdjacencyEffect6SCorrectionSchemeFilter.cxx |  173 -
 ...eAdjacencyEffect6SCorrectionSchemeFilterNew.cxx |   40 -
 ...urfaceAdjacencyEffectCorrectionSchemeFilter.cxx |  182 +
 ...aceAdjacencyEffectCorrectionSchemeFilterNew.cxx |   40 +
 ...hannelRAndBAndNIRVegetationIndexImageFilter.cxx |    2 +-
 ...TSARVIRAndBAndNIRVegetationIndexImageFilter.cxx |    2 +-
 .../Radiometry/otbTerraSarBrightnessFunctor.cxx    |    2 +-
 ...otbTerraSarBrightnessImageComplexFilterTest.cxx |    2 +-
 .../otbTerraSarBrightnessImageFilterNew.cxx        |    2 +-
 .../otbTerraSarBrightnessImageFilterTest.cxx       |    2 +-
 .../otbTerraSarCalibrationImageFilterNew.cxx       |    2 +-
 ...ltiChannelRAndNIRVegetationIndexImageFilter.cxx |    2 +-
 .../otbWDVIRAndNIRVegetationIndexImageFilter.cxx   |    2 +-
 .../otbWaterSqrtSpectralAngleImageFilter.cxx       |    2 +-
 ...llerToPolarisationDegreeAndPowerImageFilter.cxx |    2 +-
 ...rToPolarisationDegreeAndPowerImageFilterNew.cxx |    2 +-
 .../otbMuellerToReciprocalCovarianceFunctor.cxx    |    2 +-
 ...otbMuellerToReciprocalCovarianceImageFilter.cxx |    2 +-
 ...MuellerToReciprocalCovarianceImageFilterNew.cxx |    2 +-
 ...otbMultiChannelsPolarimetricSynthesisFilter.cxx |    2 +-
 ...MultiChannelsPolarimetricSynthesisFilterNew.cxx |    2 +-
 .../Code/SARPolarimetry/otbPolarimetricData.cxx    |    4 +-
 .../otbPolarimetricSynthesisFunctor.cxx            |    2 +-
 ...ocalCoherencyToReciprocalMuellerImageFilter.cxx |    2 +-
 ...lCoherencyToReciprocalMuellerImageFilterNew.cxx |    2 +-
 ...rocalCovarianceToCoherencyDegreeImageFilter.cxx |    2 +-
 ...alCovarianceToCoherencyDegreeImageFilterNew.cxx |    2 +-
 ...lCovarianceToReciprocalCoherencyImageFilter.cxx |    5 +-
 ...varianceToReciprocalCoherencyImageFilterNew.cxx |    2 +-
 .../otbReciprocalHAlphaImageFilter.cxx             |    2 +-
 .../otbReciprocalHAlphaImageFilterNew.cxx          |    2 +-
 ...ceToReciprocalCircularCovarianceImageFilter.cxx |    2 +-
 ...oReciprocalCircularCovarianceImageFilterNew.cxx |    2 +-
 .../Code/SARPolarimetry/otbSinclairImageFilter.cxx |    4 +-
 .../otbSinclairReciprocalImageFilter.cxx           |    6 +-
 ...tbSinclairToCircularCovarianceMatrixFunctor.cxx |    2 +-
 .../otbSinclairToCoherencyMatrixFunctor.cxx        |    2 +-
 .../otbSinclairToCovarianceMatrixFunctor.cxx       |    2 +-
 .../otbSinclairToMuellerMatrixFunctor.cxx          |    2 +-
 ...ToReciprocalCircularCovarianceMatrixFunctor.cxx |    2 +-
 ...bSinclairToReciprocalCoherencyMatrixFunctor.cxx |    2 +-
 ...SinclairToReciprocalCovarianceMatrixFunctor.cxx |    2 +-
 ...torMultiChannelsPolarimetricSynthesisFilter.cxx |    3 +-
 .../Segmentation/otbHooverInstanceFilterNew.cxx    |    2 +-
 .../Code/Segmentation/otbHooverMatrixFilterNew.cxx |    2 +-
 .../otbMeanShiftSegmentationFilter.cxx             |    1 -
 ...bStreamingImageToOGRLayerSegmentationFilter.cxx |    2 +-
 Testing/Code/Simulation/CMakeLists.txt             |   65 +-
 .../otbAtmosphericCorrectionsRSRSVMClassifier.cxx  |   54 +-
 Testing/Code/Simulation/otbAtmosphericEffects.cxx  |   53 +-
 .../otbImageSimulationMethodKMeansClassif.cxx      |    8 +-
 .../otbImageSimulationMethodSVMClassif.cxx         |    2 +-
 ...ImageSimulationMethodWithSpatialisationTest.cxx |    2 +-
 .../otbImageSimulationMethodWithVectorDataTest.cxx |    2 +-
 .../otbLabelMapToSimulatedImageFilterTest.cxx      |    2 +-
 .../Code/Simulation/otbReduceSpectralResponse.cxx  |  182 +-
 .../otbReduceSpectralResponseClassifierRAndNIR.cxx |    2 -
 .../Simulation/otbReduceSpectralResponseNew.cxx    |    2 +-
 Testing/Code/Simulation/otbSatelliteRSR.cxx        |   66 +
 Testing/Code/Simulation/otbSatelliteRSRNew.cxx     |    2 +-
 Testing/Code/Simulation/otbSimulationTests2.cxx    |    3 +
 Testing/Code/Simulation/otbSpatialisationTest.cxx  |    2 +-
 .../Code/Simulation/otbSpatialisationTestNew.cxx   |    3 +-
 Testing/Code/Simulation/otbSpectralResponseNew.cxx |    2 +-
 ...otbSurfaceReflectanceToReflectanceFilterNew.cxx |    4 +-
 .../otbImageListToRCC8GraphFilterNew.cxx           |    2 +-
 .../otbImageMultiSegmentationToRCC8GraphFilter.cxx |    2 +-
 ...bImageMultiSegmentationToRCC8GraphFilterNew.cxx |    2 +-
 .../otbImageToImageRCC8Calculator.cxx              |    2 +-
 .../otbImageToImageRCC8CalculatorNew.cxx           |    2 +-
 .../otbPolygonListToRCC8GraphFilter.cxx            |    4 +-
 .../otbPolygonListToRCC8GraphFilterNew.cxx         |    2 +-
 .../otbPolygonToPolygonRCC8Calculator.cxx          |    2 +-
 .../otbPolygonToPolygonRCC8CalculatorNew.cxx       |    2 +-
 Testing/Code/SpatialReasoning/otbRCC8Edge.cxx      |    2 +-
 Testing/Code/SpatialReasoning/otbRCC8EdgeNew.cxx   |    2 +-
 Testing/Code/SpatialReasoning/otbRCC8Graph.cxx     |    5 +-
 .../SpatialReasoning/otbRCC8GraphFileReader.cxx    |    2 +-
 .../SpatialReasoning/otbRCC8GraphFileReaderNew.cxx |    2 +-
 .../SpatialReasoning/otbRCC8GraphFileWriter.cxx    |    2 +-
 .../SpatialReasoning/otbRCC8GraphFileWriterNew.cxx |    2 +-
 .../SpatialReasoning/otbRCC8GraphIOEndToEnd.cxx    |    2 +-
 Testing/Code/SpatialReasoning/otbRCC8GraphNew.cxx  |    2 +-
 .../SpatialReasoning/otbRCC8GraphSourceNew.cxx     |    2 +-
 .../Code/SpatialReasoning/otbRCC8VertexBase.cxx    |    2 +-
 .../Code/SpatialReasoning/otbRCC8VertexBaseNew.cxx |    2 +-
 .../otbRCC8VertexWithCompacity.cxx                 |    2 +-
 .../otbRCC8VertexWithCompacityNew.cxx              |    2 +-
 .../otbCompareAsciiTestsEpsilon3_WhiteSpace.cxx    |    4 +-
 .../OGRAdapters/otbOGRDataSourceWrapperNew.cxx     |    2 +-
 .../otbGeometricSarSensorModelAdapter.cxx          |    2 +-
 .../otbPlatformPositionAdapter.cxx                 |    2 +-
 Testing/Code/Wrappers/CommandLine/CMakeLists.txt   |   10 +-
 .../otbWrapperCommandLineLauncherTests.cxx         |   13 +-
 .../otbWrapperCommandLineParserTests.cxx           |   41 +-
 Testing/Fa/0000094-PolygonsVectorization.cxx       |    8 +-
 ...307-ExtractROICompareRegionsImplementations.cxx |   11 +-
 .../0000433-LineSegmentDetector_8b_16b_compare.cxx |    4 -
 Testing/Fa/0000479-WriteInt8Image.cxx              |    2 +-
 ...anShiftVectorImageFilterWithStreamingShrink.cxx |    2 +-
 Testing/Fa/00134-feature_extraction.cxx            |    2 +-
 Testing/Fa/CMakeLists.txt                          |    2 +
 Testing/Fa/StreamingStat.cxx                       |    4 +-
 Testing/Fa/WriteUnsignedLong.cxx                   |    2 +-
 ...tbVectorDataToLabelImageFilterWithoutReader.cxx |    6 +-
 Testing/Utilities/6SFunctionMainTest.cxx           |   15 -
 Testing/Utilities/kmlcreatekml.cc                  |    3 +-
 Testing/Utilities/kmlhelloattrs.cc                 |   14 +-
 Testing/Utilities/kmlhelloenum.cc                  |   14 +-
 Testing/Utilities/kmlhellofolder.cc                |   15 +-
 Testing/Utilities/kmlhelloregion.cc                |   14 +-
 Testing/Utilities/kmlparsekml.cc                   |    3 +
 Testing/Utilities/kmlprintgeometry.cc              |   15 +-
 Testing/Utilities/kmlsharedstyles.cc               |   16 +-
 Testing/Utilities/ossimElevManagerTest.cxx         |    6 +-
 Testing/Utilities/ossimXmlDocumentTest.cxx         |    7 +-
 .../Utilities/ossimpluginsHermiteInterpolation.cxx |    3 +-
 .../Utilities/otbSVMComposedKernelFunctorTest.cxx  |    6 +-
 .../svmGenericKernelBasicOperationsTest.cxx        |    5 +-
 Testing/Utilities/svmGenericKernelFunctor.cxx      |   17 +-
 Testing/Utilities/svmGenericKernelTest.cxx         |   19 +-
 Testing/Utilities/svmTest.cxx                      |   17 +-
 Testing/Utilities/tinyXMLlibTest.cxx               |    8 +-
 Utilities/CMakeLists.txt                           |   17 +-
 Utilities/ITK/CMake/CTestCustom.cmake.in           |    4 +-
 Utilities/ITK/CMake/FindKWStyle.cmake              |   19 +-
 Utilities/ITK/CMake/ITKExternalData.cmake          |   18 +-
 Utilities/ITK/CMake/ITKGroups.cmake                |   68 +-
 Utilities/ITK/CMake/ITKModuleDoxygen.cmake         |    2 +-
 Utilities/ITK/CMake/ITKModuleEnablement.cmake      |    8 +-
 Utilities/ITK/CMake/ITKModuleHeaderTest.cmake      |    1 +
 Utilities/ITK/CMake/ITKModuleMacros.cmake          |    5 +
 Utilities/ITK/CMake/ITKModuleRemote.cmake          |    3 +-
 .../ITK/CMake/ITKSetStandardCompilerFlags.cmake    |    7 +-
 Utilities/ITK/CMake/UseITK.cmake                   |   10 +-
 Utilities/ITK/CMake/itkExternal_FFTW.cmake         |   16 +-
 Utilities/ITK/CMake/itkOpenCL.cmake                |   13 +-
 Utilities/ITK/CMake/itkSampleBuildTest.cmake.in    |  144 -
 Utilities/ITK/CMakeLists.txt                       |   71 +-
 .../itkExponentialDeformationFieldImageFilter.hxx  |    2 +-
 .../itkInverseDeformationFieldImageFilter.hxx      |    1 -
 ...IterativeInverseDeformationFieldImageFilter.hxx |   14 +-
 .../include/itkOtsuThresholdImageCalculator.h      |    2 +-
 .../include/itkOtsuThresholdImageCalculator.hxx    |    4 +-
 .../Core/Common/include/VNLSparseLUSolverTraits.h  |   33 +-
 .../Core/Common/include/itkAnnulusOperator.hxx     |    4 +-
 .../ITK/Modules/Core/Common/include/itkArray.h     |   53 +-
 .../ITK/Modules/Core/Common/include/itkArray.hxx   |  114 +-
 .../ITK/Modules/Core/Common/include/itkArray2D.h   |   18 +-
 .../ITK/Modules/Core/Common/include/itkArray2D.hxx |   40 +-
 .../itkAtanRegularizedHeavisideStepFunction.hxx    |    2 +-
 .../Modules/Core/Common/include/itkAutoPointer.h   |    4 +-
 .../include/itkAutoPointerDataObjectDecorator.h    |    2 +-
 .../itkBSplineInterpolationWeightFunction.hxx      |    5 +-
 .../include/itkBinaryThresholdSpatialFunction.hxx  |    2 +-
 .../Modules/Core/Common/include/itkBoundingBox.h   |    4 +-
 .../Modules/Core/Common/include/itkBoundingBox.hxx |    6 +-
 .../Modules/Core/Common/include/itkCellInterface.h |    2 +-
 .../Core/Common/include/itkChildTreeIterator.hxx   |    4 +-
 .../Modules/Core/Common/include/itkColorTable.h    |    2 +-
 .../Modules/Core/Common/include/itkColorTable.hxx  |    2 +-
 .../ITK/Modules/Core/Common/include/itkCommand.h   |   61 +-
 .../Core/Common/include/itkConceptChecking.h       |   20 +-
 .../Common/include/itkConditionalConstIterator.hxx |    2 +-
 .../Common/include/itkConstNeighborhoodIterator.h  |   10 +-
 .../include/itkConstNeighborhoodIterator.hxx       |   24 +-
 .../itkConstNeighborhoodIteratorWithOnlyIndex.hxx  |    1 +
 .../include/itkConstShapedNeighborhoodIterator.h   |    2 +-
 .../Core/Common/include/itkCovariantVector.h       |    2 +-
 .../Core/Common/include/itkCovariantVector.hxx     |    2 +-
 .../Core/Common/include/itkCreateObjectFunction.h  |    2 +-
 .../Modules/Core/Common/include/itkDataObject.h    |    4 +-
 .../Core/Common/include/itkDataObjectDecorator.h   |   43 +-
 .../Core/Common/include/itkDataObjectDecorator.hxx |   86 +-
 .../include/itkDefaultVectorPixelAccessorFunctor.h |    3 +
 .../Core/Common/include/itkDiffusionTensor3D.hxx   |   10 +-
 .../ITK/Modules/Core/Common/include/itkDirectory.h |    2 +-
 .../Core/Common/include/itkDomainThreader.hxx      |    4 +-
 ...itkEllipsoidInteriorExteriorSpatialFunction.hxx |    4 +-
 .../Core/Common/include/itkEquivalencyTable.h      |    2 +-
 .../Modules/Core/Common/include/itkEventObject.h   |    1 +
 .../Core/Common/include/itkExceptionObject.h       |   38 +-
 .../Modules/Core/Common/include/itkFastMutexLock.h |    2 +-
 .../Core/Common/include/itkFileOutputWindow.h      |    4 +-
 .../include/itkFiniteCylinderSpatialFunction.hxx   |    8 +-
 .../Modules/Core/Common/include/itkFixedArray.h    |   28 +-
 .../Modules/Core/Common/include/itkFixedArray.hxx  |   90 +-
 ...FloodFilledFunctionConditionalConstIterator.hxx |    7 +-
 ...lledSpatialFunctionConditionalConstIterator.hxx |    4 +-
 .../Common/include/itkFrustumSpatialFunction.hxx   |   28 +-
 .../itkGaussianDerivativeSpatialFunction.hxx       |    4 +-
 .../Common/include/itkGaussianKernelFunction.h     |    4 +-
 .../Core/Common/include/itkGaussianOperator.hxx    |   16 +-
 .../Common/include/itkGaussianSpatialFunction.hxx  |    4 +-
 .../Core/Common/include/itkHexahedronCell.hxx      |   14 +-
 .../ITK/Modules/Core/Common/include/itkImage.h     |    6 +-
 .../ITK/Modules/Core/Common/include/itkImage.hxx   |   16 +-
 .../Core/Common/include/itkImageAlgorithm.h        |   28 +
 .../Core/Common/include/itkImageAlgorithm.hxx      |    5 +-
 .../ITK/Modules/Core/Common/include/itkImageBase.h |   23 +-
 .../Modules/Core/Common/include/itkImageBase.hxx   |   29 +-
 .../Core/Common/include/itkImageConstIterator.h    |    4 +-
 .../include/itkImageConstIteratorWithIndex.hxx     |    6 +-
 .../Core/Common/include/itkImageDuplicator.h       |    2 +-
 .../Core/Common/include/itkImageDuplicator.hxx     |    4 +-
 .../Modules/Core/Common/include/itkImageIORegion.h |   21 +-
 .../include/itkImageLinearConstIteratorWithIndex.h |    6 +-
 ...ageRandomNonRepeatingConstIteratorWithIndex.hxx |    2 +-
 .../Modules/Core/Common/include/itkImageRegion.h   |    4 +-
 .../Common/include/itkImageRegionSplitterBase.h    |    2 +-
 .../include/itkImageRegionSplitterDirection.h      |    6 +-
 .../itkImageRegionSplitterMultidimensional.h       |    6 +-
 .../include/itkImageRegionSplitterSlowDimension.h  |    4 +-
 .../Common/include/itkImageScanlineConstIterator.h |    4 +-
 .../include/itkImageSliceConstIteratorWithIndex.h  |    8 +-
 .../Modules/Core/Common/include/itkImageSource.h   |   18 +-
 .../Modules/Core/Common/include/itkImageSource.hxx |    6 +-
 .../Core/Common/include/itkImageToImageFilter.hxx  |    4 +-
 .../Core/Common/include/itkImageTransformer.h      |   12 +-
 .../Core/Common/include/itkImageTransformer.hxx    |    2 +-
 .../itkImageVectorOptimizerParametersHelper.h      |   18 +-
 .../itkImageVectorOptimizerParametersHelper.hxx    |   28 +-
 .../Core/Common/include/itkImportImageContainer.h  |   16 +-
 .../Common/include/itkImportImageContainer.hxx     |   25 +-
 .../Core/Common/include/itkImportImageFilter.hxx   |    2 +-
 .../Core/Common/include/itkInOrderTreeIterator.h   |   16 +-
 .../Core/Common/include/itkInPlaceImageFilter.hxx  |    6 +-
 .../ITK/Modules/Core/Common/include/itkIndex.h     |   16 +-
 .../Core/Common/include/itkLeafTreeIterator.h      |   10 +-
 .../Common/include/itkLevelOrderTreeIterator.hxx   |   22 +-
 .../Modules/Core/Common/include/itkLightObject.h   |   10 +
 .../Core/Common/include/itkLightProcessObject.h    |    2 +-
 .../Modules/Core/Common/include/itkLoggerBase.h    |    2 +-
 .../Modules/Core/Common/include/itkLoggerManager.h |    2 +-
 .../Modules/Core/Common/include/itkLoggerOutput.h  |   14 +-
 .../Core/Common/include/itkLoggerThreadWrapper.h   |    3 +-
 .../Core/Common/include/itkLoggerThreadWrapper.hxx |   92 +-
 .../ITK/Modules/Core/Common/include/itkMacro.h     |  138 +-
 .../ITK/Modules/Core/Common/include/itkMath.h      |    2 +-
 .../Modules/Core/Common/include/itkMemoryProbe.h   |    2 +-
 .../Core/Common/include/itkMemoryUsageObserver.h   |    4 +-
 .../itkMersenneTwisterRandomVariateGenerator.h     |  172 +-
 .../Core/Common/include/itkMetaDataObject.h        |  117 +-
 .../Core/Common/include/itkMetaDataObject.hxx      |   33 +-
 .../Core/Common/include/itkMetaDataObjectBase.h    |   17 +-
 .../include/itkMinimumMaximumImageCalculator.h     |    2 +-
 .../include/itkMinimumMaximumImageCalculator.hxx   |    3 +-
 .../Modules/Core/Common/include/itkMultiThreader.h |    2 +-
 .../Core/Common/include/itkMultipleLogOutput.h     |    8 +-
 .../ITK/Modules/Core/Common/include/itkMutexLock.h |    2 +-
 .../Core/Common/include/itkNeighborhoodAllocator.h |    3 +-
 .../Common/include/itkNeighborhoodIterator.hxx     |   10 +-
 .../Core/Common/include/itkNumberToString.h        |    4 +-
 .../Core/Common/include/itkNumberToString.hxx      |    6 +-
 .../Modules/Core/Common/include/itkNumericTraits.h |  199 +-
 .../include/itkNumericTraitsFixedArrayPixel.h      |    4 +-
 .../Common/include/itkNumericTraitsStdVector.h     |    3 +
 .../ITK/Modules/Core/Common/include/itkObject.h    |   10 +-
 .../Core/Common/include/itkObjectFactoryBase.h     |    2 +-
 .../Modules/Core/Common/include/itkObjectStore.h   |    2 +-
 .../ITK/Modules/Core/Common/include/itkOctree.h    |   16 +-
 .../Core/Common/include/itkOptimizerParameters.h   |   22 +-
 .../Core/Common/include/itkOptimizerParameters.hxx |   70 +-
 .../Common/include/itkOptimizerParametersHelper.h  |   12 +-
 .../Modules/Core/Common/include/itkOutputWindow.h  |    2 +-
 .../itkPhasedArray3DSpecialCoordinatesImage.h      |   32 +-
 .../Modules/Core/Common/include/itkPixelTraits.h   |    4 +-
 .../ITK/Modules/Core/Common/include/itkPoint.h     |    2 +-
 .../ITK/Modules/Core/Common/include/itkPointSet.h  |   18 +-
 .../Modules/Core/Common/include/itkPointSet.hxx    |   38 +-
 .../Modules/Core/Common/include/itkPolygonCell.hxx |    8 +-
 .../Core/Common/include/itkPostOrderTreeIterator.h |   42 +-
 .../Core/Common/include/itkPreOrderTreeIterator.h  |   18 +-
 .../Common/include/itkPriorityQueueContainer.hxx   |    5 +-
 .../Modules/Core/Common/include/itkProcessObject.h |    6 +-
 .../Core/Common/include/itkProgressAccumulator.h   |    2 +-
 .../Core/Common/include/itkQuadrilateralCell.hxx   |   10 +-
 .../ITK/Modules/Core/Common/include/itkRGBAPixel.h |    2 +-
 .../ITK/Modules/Core/Common/include/itkRGBPixel.h  |    2 +-
 .../Modules/Core/Common/include/itkRealTimeClock.h |    4 +-
 .../Modules/Core/Common/include/itkResourceProbe.h |    9 +-
 .../Core/Common/include/itkResourceProbe.hxx       |   19 +-
 .../Core/Common/include/itkRootTreeIterator.h      |    8 +-
 ...FloodFilledFunctionConditionalConstIterator.hxx |    3 +-
 .../Common/include/itkSimpleDataObjectDecorator.h  |    2 +-
 .../itkSinRegularizedHeavisideStepFunction.hxx     |    4 +-
 .../Core/Common/include/itkSmapsFileParser.h       |    8 +-
 .../Core/Common/include/itkSmapsFileParser.hxx     |    4 +-
 .../Modules/Core/Common/include/itkSmartPointer.h  |   43 +-
 .../include/itkSmartPointerForwardReference.h      |    2 +-
 .../Core/Common/include/itkSparseFieldLayer.h      |    4 +-
 .../Core/Common/include/itkSparseFieldLayer.hxx    |    3 +-
 .../Common/include/itkSpatialOrientationAdapter.h  |    4 +-
 .../Common/include/itkSpecialCoordinatesImage.h    |    4 +-
 .../Common/include/itkSpecialCoordinatesImage.hxx  |    4 +-
 .../Core/Common/include/itkStdStreamLogOutput.h    |   10 +-
 .../Core/Common/include/itkStdStreamStateSave.h    |   69 +
 .../Common/include/itkStreamingImageFilter.hxx     |   12 +-
 .../Common/include/itkSymmetricEigenAnalysis.hxx   |    4 +-
 ...ricEllipsoidInteriorExteriorSpatialFunction.hxx |   11 +-
 .../Core/Common/include/itkTetrahedronCell.hxx     |    2 +-
 .../Modules/Core/Common/include/itkTextOutput.h    |    2 +-
 .../Modules/Core/Common/include/itkThreadLogger.h  |   16 +-
 .../itkThreadedIndexedContainerPartitioner.h       |    2 +-
 .../itkThreadedIteratorRangePartitioner.hxx        |   28 +-
 .../ITK/Modules/Core/Common/include/itkTimeProbe.h |    5 +-
 .../itkTorusInteriorExteriorSpatialFunction.hxx    |    2 +-
 .../Core/Common/include/itkTreeChangeEvent.h       |   14 +-
 .../Modules/Core/Common/include/itkTreeContainer.h |   36 +-
 .../Core/Common/include/itkTreeContainer.hxx       |   94 +-
 .../Core/Common/include/itkTreeContainerBase.h     |   16 +-
 .../Core/Common/include/itkTreeIteratorBase.hxx    |   66 +-
 .../Core/Common/include/itkTreeIteratorClone.h     |   12 +-
 .../ITK/Modules/Core/Common/include/itkTreeNode.h  |   20 +-
 .../Modules/Core/Common/include/itkTreeNode.hxx    |  115 +-
 .../Core/Common/include/itkTriangleCell.hxx        |    3 +-
 .../Core/Common/include/itkTriangleHelper.hxx      |   16 +-
 .../Common/include/itkValarrayImageContainer.h     |    2 +-
 .../Core/Common/include/itkVariableLengthVector.h  |   55 +-
 .../Common/include/itkVariableLengthVector.hxx     |  120 +-
 .../ITK/Modules/Core/Common/include/itkVector.h    |    2 +-
 .../ITK/Modules/Core/Common/include/itkVector.hxx  |    2 +-
 .../Core/Common/include/itkVectorContainer.h       |    2 +-
 .../Modules/Core/Common/include/itkVectorImage.h   |    6 +-
 .../Modules/Core/Common/include/itkVectorImage.hxx |   47 +-
 .../itkVectorImageNeighborhoodAccessorFunctor.h    |    4 +-
 .../ITK/Modules/Core/Common/include/itkVersor.h    |    4 +-
 .../ITK/Modules/Core/Common/include/itkVersor.hxx  |   63 +-
 .../Modules/Core/Common/include/itkWeakPointer.h   |    4 +-
 .../Modules/Core/Common/include/itkWin32Header.h   |    3 +
 .../Core/Common/include/itkXMLFileOutputWindow.h   |   12 +-
 .../ITK/Modules/Core/Common/src/CMakeLists.txt     |    9 +-
 .../Common/src/itkConditionVariablePThreads.cxx    |    2 +-
 .../ITK/Modules/Core/Common/src/itkDataObject.cxx  |   30 +-
 .../Modules/Core/Common/src/itkExceptionObject.cxx |   36 +-
 .../Core/Common/src/itkFileOutputWindow.cxx        |    4 +-
 .../Core/Common/src/itkFloatingPointExceptions.cxx |    2 +-
 .../ITK/Modules/Core/Common/src/itkLightObject.cxx |   10 +-
 .../Modules/Core/Common/src/itkLoggerManager.cxx   |    2 +-
 .../itkMersenneTwisterRandomVariateGenerator.cxx   |   96 +-
 .../Core/Common/src/itkMetaDataDictionary.cxx      |    2 +-
 .../Modules/Core/Common/src/itkMetaDataObject.cxx  |   47 +
 .../Core/Common/src/itkMetaDataObjectBase.cxx      |   43 +-
 .../Modules/Core/Common/src/itkMultiThreader.cxx   |   19 +-
 .../Core/Common/src/itkMultiThreaderPThreads.cxx   |   14 +-
 .../Core/Common/src/itkMutexLockPThreads.cxx       |    2 +-
 .../src/itkNumericTraitsDiffusionTensor3DPixel.cxx |    4 +-
 .../Core/Common/src/itkNumericTraitsRGBAPixel.cxx  |    4 +-
 .../Core/Common/src/itkNumericTraitsRGBPixel.cxx   |    4 +-
 .../ITK/Modules/Core/Common/src/itkObject.cxx      |  144 +-
 .../Core/Common/src/itkObjectFactoryBase.cxx       |   29 +-
 .../ITK/Modules/Core/Common/src/itkOctreeNode.cxx  |    4 +-
 .../Modules/Core/Common/src/itkOutputWindow.cxx    |    2 +-
 .../Modules/Core/Common/src/itkProcessObject.cxx   |   34 +-
 .../Core/Common/src/itkProgressAccumulator.cxx     |    2 +-
 .../Modules/Core/Common/src/itkRealTimeClock.cxx   |   10 +-
 .../Common/src/itkSimpleFastMutexLockPThreads.cxx  |    5 +-
 .../Core/Common/src/itkSimpleFilterWatcher.cxx     |   25 +-
 .../Modules/Core/Common/src/itkSmapsFileParser.cxx |    4 +-
 ...tkSmartPointerForwardReferenceProcessObject.cxx |   17 +
 .../Core/Common/src/itkStdStreamLogOutput.cxx      |    2 +-
 .../Modules/Core/Common/src/itkThreadLogger.cxx    |    4 +-
 .../Core/Common/wrapping/ITKCommonBase.wrap        |    1 +
 .../Modules/Core/Common/wrapping/itkArray2D.wrap   |    1 -
 .../Core/Common/wrapping/itkDiffusionTensor3D.wrap |   11 +-
 .../Core/Common/wrapping/itkNumericTraits.wrap     |    2 +-
 .../Core/Common/wrapping/itkVectorContainer.wrap   |    9 +-
 .../itkDenseFiniteDifferenceImageFilter.hxx        |    2 -
 .../include/itkFiniteDifferenceFunction.h          |    2 +-
 .../include/itkFiniteDifferenceFunction.hxx        |    1 -
 .../include/itkFiniteDifferenceImageFilter.hxx     |    4 +-
 .../itkFiniteDifferenceSparseImageFilter.hxx       |    2 +-
 .../itkFiniteDifferenceSparseImageFunction.h       |    2 +-
 .../Modules/Core/GPUCommon/include/itkGPUImage.h   |    2 +-
 .../Modules/Core/GPUCommon/include/itkGPUImage.hxx |    4 +-
 .../GPUCommon/include/itkGPUInPlaceImageFilter.hxx |    2 +-
 .../Core/GPUCommon/include/itkGPUReduction.hxx     |    6 +
 .../Core/GPUCommon/src/itkGPUDataManager.cxx       |    1 -
 .../ImageAdaptors/include/itkAbsImageAdaptor.h     |    4 +-
 .../ImageAdaptors/include/itkAcosImageAdaptor.h    |    8 +-
 .../ImageAdaptors/include/itkAsinImageAdaptor.h    |    8 +-
 .../ImageAdaptors/include/itkAtanImageAdaptor.h    |    8 +-
 .../include/itkComplexToModulusImageAdaptor.h      |    4 +-
 .../include/itkComplexToPhaseImageAdaptor.h        |    2 +-
 .../ImageAdaptors/include/itkCosImageAdaptor.h     |    8 +-
 .../ImageAdaptors/include/itkExpImageAdaptor.h     |    8 +-
 .../include/itkExpNegativeImageAdaptor.h           |    8 +-
 .../Core/ImageAdaptors/include/itkImageAdaptor.h   |    8 +-
 .../Core/ImageAdaptors/include/itkImageAdaptor.hxx |    8 +-
 .../ImageAdaptors/include/itkLog10ImageAdaptor.h   |    8 +-
 .../ImageAdaptors/include/itkLogImageAdaptor.h     |    8 +-
 .../ImageAdaptors/include/itkSinImageAdaptor.h     |    8 +-
 .../ImageAdaptors/include/itkSqrtImageAdaptor.h    |    8 +-
 .../ImageAdaptors/include/itkTanImageAdaptor.h     |    8 +-
 .../include/itkBSplineDecompositionImageFilter.hxx |   16 +-
 .../include/itkBSplineInterpolateImageFunction.h   |   26 +-
 .../include/itkBSplineInterpolateImageFunction.hxx |   56 +-
 .../include/itkCentralDifferenceImageFunction.hxx  |    7 +-
 .../include/itkGaussianBlurImageFunction.hxx       |    3 +-
 .../include/itkGaussianDerivativeImageFunction.hxx |    5 +-
 .../include/itkGaussianInterpolateImageFunction.h  |    2 +-
 .../itkGaussianInterpolateImageFunction.hxx        |   12 +-
 .../ImageFunction/include/itkImageFunction.hxx     |    2 +-
 ...itkLabelImageGaussianInterpolateImageFunction.h |    2 +-
 ...kLabelImageGaussianInterpolateImageFunction.hxx |    4 +-
 .../include/itkLinearInterpolateImageFunction.h    |   27 +
 .../include/itkLinearInterpolateImageFunction.hxx  |   58 +-
 ...tkMahalanobisDistanceThresholdImageFunction.hxx |    4 +-
 .../include/itkRayCastInterpolateImageFunction.hxx |   51 +-
 .../itkWindowedSincInterpolateImageFunction.h      |   10 +-
 .../itkWindowedSincInterpolateImageFunction.hxx    |    4 +-
 .../Mesh/include/itkBinaryMask3DMeshSource.hxx     |   69 +-
 .../Mesh/include/itkConnectedRegionsMeshFilter.hxx |   10 +-
 .../Mesh/include/itkInteriorExteriorMeshFilter.hxx |    4 -
 .../ITK/Modules/Core/Mesh/include/itkMesh.hxx      |   48 +-
 .../ITK/Modules/Core/Mesh/include/itkMeshRegion.h  |    2 +-
 .../ITK/Modules/Core/Mesh/include/itkMeshSource.h  |    6 +-
 .../itkParametricSpaceToImageSpaceMeshFilter.hxx   |    2 -
 .../Mesh/include/itkRegularSphereMeshSource.hxx    |    2 +-
 .../ITK/Modules/Core/Mesh/include/itkSimplexMesh.h |    2 +-
 .../Modules/Core/Mesh/include/itkSimplexMesh.hxx   |   10 +-
 .../include/itkSimplexMeshAdaptTopologyFilter.h    |    8 +-
 .../include/itkSimplexMeshAdaptTopologyFilter.hxx  |   11 +-
 .../Mesh/include/itkSimplexMeshVolumeCalculator.h  |    2 +-
 .../include/itkSimplexMeshVolumeCalculator.hxx     |   36 +-
 .../Core/Mesh/include/itkSphereMeshSource.hxx      |   38 +-
 .../Core/Mesh/include/itkTransformMeshFilter.hxx   |    2 +-
 .../include/itkTriangleMeshToBinaryImageFilter.hxx |   16 +-
 .../include/itkTriangleMeshToSimplexMeshFilter.hxx |   13 +-
 .../Core/Mesh/include/itkVTKPolyDataReader.h       |    6 +
 .../Core/Mesh/include/itkVTKPolyDataWriter.h       |    8 +-
 .../Core/Mesh/include/itkVTKPolyDataWriter.hxx     |    2 +-
 .../Core/Mesh/include/itkWarpMeshFilter.hxx        |    1 -
 .../Core/Mesh/src/itkSimplexMeshGeometry.cxx       |   10 +-
 .../Core/Mesh/wrapping/itkImageToMeshFilter.wrap   |    9 +-
 .../include/itkGeometricalQuadEdge.hxx             |   20 +-
 .../Core/QuadEdgeMesh/include/itkQuadEdge.h        |    2 +-
 .../Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h    |    2 +-
 .../Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx  |   60 +-
 .../itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx   |    2 +-
 ...geMeshEulerOperatorDeleteCenterVertexFunction.h |    2 +-
 ...MeshEulerOperatorDeleteCenterVertexFunction.hxx |   10 +-
 ...tkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx |   14 +-
 ...kQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx |    2 +-
 ...QuadEdgeMeshEulerOperatorJoinVertexFunction.hxx |   10 +-
 ...itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h |    4 +-
 ...QuadEdgeMeshEulerOperatorSplitFacetFunction.hxx |   10 +-
 ...uadEdgeMeshEulerOperatorSplitVertexFunction.hxx |   10 +-
 .../include/itkQuadEdgeMeshFrontIterator.hxx       |   15 +-
 .../include/itkQuadEdgeMeshFunctionBase.h          |    2 +-
 .../QuadEdgeMesh/include/itkQuadEdgeMeshPoint.hxx  |    2 +-
 .../include/itkQuadEdgeMeshPolygonCell.h           |    8 +-
 .../include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h  |    2 +-
 .../include/itkQuadEdgeMeshTopologyChecker.h       |    2 +-
 .../include/itkQuadEdgeMeshTopologyChecker.hxx     |    2 +-
 .../Modules/Core/QuadEdgeMesh/src/itkQuadEdge.cxx  |    8 +-
 .../include/itkAffineGeometryFrame.h               |    4 +-
 .../include/itkAffineGeometryFrame.hxx             |    4 +-
 .../include/itkArrowSpatialObject.hxx              |    4 +-
 .../SpatialObjects/include/itkBlobSpatialObject.h  |    4 +-
 .../include/itkBlobSpatialObject.hxx               |    8 +-
 .../SpatialObjects/include/itkBoxSpatialObject.h   |    4 +-
 .../SpatialObjects/include/itkBoxSpatialObject.hxx |   21 +-
 .../include/itkContourSpatialObject.h              |    4 +-
 .../include/itkCylinderSpatialObject.h             |   10 +-
 .../include/itkEllipseSpatialObject.h              |    4 +-
 .../include/itkEllipseSpatialObject.hxx            |    2 +-
 .../include/itkGaussianSpatialObject.h             |    4 +-
 .../include/itkGaussianSpatialObject.hxx           |    4 +-
 .../include/itkImageMaskSpatialObject.h            |    5 +
 .../include/itkImageMaskSpatialObject.hxx          |   66 +-
 .../SpatialObjects/include/itkImageSpatialObject.h |    4 +-
 .../include/itkImageSpatialObject.hxx              |    4 +-
 .../include/itkLandmarkSpatialObject.h             |    4 +-
 .../include/itkLandmarkSpatialObject.hxx           |    2 +-
 .../SpatialObjects/include/itkLineSpatialObject.h  |    4 +-
 .../include/itkLineSpatialObject.hxx               |    2 +-
 .../SpatialObjects/include/itkMeshSpatialObject.h  |    4 +-
 .../include/itkMeshSpatialObject.hxx               |    6 +-
 .../include/itkMetaArrowConverter.hxx              |    2 +-
 .../include/itkMetaBlobConverter.hxx               |    6 +-
 .../include/itkMetaContourConverter.hxx            |    2 +-
 .../include/itkMetaDTITubeConverter.hxx            |    3 +-
 .../include/itkMetaEllipseConverter.hxx            |    2 +-
 .../include/itkMetaGaussianConverter.hxx           |    2 +-
 .../include/itkMetaGroupConverter.hxx              |    2 +-
 .../include/itkMetaImageConverter.hxx              |    5 +-
 .../include/itkMetaLandmarkConverter.hxx           |    5 +-
 .../include/itkMetaLineConverter.hxx               |    3 +-
 .../include/itkMetaMeshConverter.hxx               |    4 +-
 .../SpatialObjects/include/itkMetaSceneConverter.h |    4 +-
 .../include/itkMetaSceneConverter.hxx              |    3 +-
 .../include/itkMetaSurfaceConverter.hxx            |    3 +-
 .../include/itkMetaTubeConverter.hxx               |    3 +-
 .../include/itkMetaVesselTubeConverter.hxx         |    3 +-
 .../SpatialObjects/include/itkPlaneSpatialObject.h |    4 +-
 .../include/itkPlaneSpatialObject.hxx              |    2 +-
 .../include/itkPointBasedSpatialObject.h           |    4 +-
 .../include/itkPolygonGroupSpatialObject.h         |    2 +-
 .../include/itkPolygonGroupSpatialObject.hxx       |    2 +-
 .../include/itkPolygonSpatialObject.hxx            |    6 +-
 .../SpatialObjects/include/itkSceneSpatialObject.h |    8 +-
 .../include/itkSceneSpatialObject.hxx              |   10 +-
 .../Core/SpatialObjects/include/itkSpatialObject.h |   34 +-
 .../SpatialObjects/include/itkSpatialObject.hxx    |   26 +-
 .../include/itkSpatialObjectDuplicator.h           |    2 +-
 .../include/itkSpatialObjectDuplicator.hxx         |    6 +-
 .../include/itkSpatialObjectFactoryBase.h          |    6 +-
 .../include/itkSpatialObjectProperty.h             |    2 +-
 .../itkSpatialObjectToImageStatisticsCalculator.h  |    2 +-
 ...itkSpatialObjectToImageStatisticsCalculator.hxx |    4 +-
 .../include/itkSpatialObjectTreeContainer.h        |    2 +-
 .../include/itkSpatialObjectTreeNode.h             |    2 +-
 .../include/itkSpatialObjectTreeNode.hxx           |    4 +-
 .../include/itkSurfaceSpatialObject.h              |    4 +-
 .../include/itkSurfaceSpatialObject.hxx            |    4 +-
 .../SpatialObjects/include/itkTubeSpatialObject.h  |    4 +-
 .../include/itkTubeSpatialObject.hxx               |   10 +-
 .../SpatialObjects/src/itkArrowSpatialObject.cxx   |    6 +-
 .../src/itkCylinderSpatialObject.cxx               |    4 +-
 .../src/itkSpatialObjectFactoryBase.cxx            |    2 +-
 .../wrapping/itkDTITubeSpatialObject.wrap          |   15 +-
 .../wrapping/itkDTITubeSpatialObjectPoint.wrap     |   15 +-
 .../Core/Transform/include/itkAffineTransform.h    |    4 +-
 .../Core/Transform/include/itkAffineTransform.hxx  |   32 +-
 .../itkAzimuthElevationToCartesianTransform.h      |    8 +-
 .../itkAzimuthElevationToCartesianTransform.hxx    |   14 +-
 .../Transform/include/itkBSplineBaseTransform.h    |    3 -
 .../include/itkBSplineDeformableTransform.hxx      |    2 +-
 .../Core/Transform/include/itkBSplineTransform.hxx |    6 +-
 .../include/itkBSplineTransformInitializer.h       |    2 +-
 .../include/itkBSplineTransformInitializer.hxx     |    8 +-
 .../include/itkCenteredAffineTransform.hxx         |    2 +-
 .../include/itkCenteredEuler3DTransform.hxx        |   15 +-
 .../include/itkCenteredRigid2DTransform.hxx        |    6 +-
 .../include/itkCenteredSimilarity2DTransform.hxx   |    6 +-
 .../Core/Transform/include/itkCompositeTransform.h |   13 +-
 .../Transform/include/itkCompositeTransform.hxx    |   57 +-
 .../Core/Transform/include/itkEuler2DTransform.hxx |    2 +-
 .../Core/Transform/include/itkEuler3DTransform.hxx |   48 +-
 .../include/itkLandmarkBasedTransformInitializer.h |    2 +-
 .../itkLandmarkBasedTransformInitializer.hxx       |   15 +-
 .../include/itkMatrixOffsetTransformBase.hxx       |    3 +-
 .../Core/Transform/include/itkMultiTransform.hxx   |    9 +-
 .../include/itkQuaternionRigidTransform.hxx        |    8 +-
 .../Core/Transform/include/itkRigid2DTransform.hxx |   16 +-
 .../include/itkRigid3DPerspectiveTransform.hxx     |    6 +-
 .../Core/Transform/include/itkRigid3DTransform.hxx |    2 +-
 .../include/itkScalableAffineTransform.hxx         |    2 +-
 .../include/itkScaleLogarithmicTransform.hxx       |    4 +-
 .../include/itkScaleSkewVersor3DTransform.hxx      |    4 +-
 .../Core/Transform/include/itkScaleTransform.hxx   |    3 +-
 .../include/itkScaleVersor3DTransform.hxx          |    4 +-
 .../Transform/include/itkSimilarity2DTransform.hxx |   16 +-
 .../Transform/include/itkSimilarity3DTransform.hxx |    4 +-
 .../itkThinPlateR2LogRSplineKernelTransform.hxx    |    4 +-
 .../Modules/Core/Transform/include/itkTransform.h  |   22 +-
 .../Core/Transform/include/itkTransform.hxx        |    2 +-
 .../Transform/include/itkTranslationTransform.hxx  |    3 +-
 .../Transform/include/itkVersorRigid3DTransform.h  |   13 +
 .../include/itkVersorRigid3DTransform.hxx          |   90 +-
 .../Core/Transform/include/itkVersorTransform.h    |    2 +-
 .../Core/Transform/include/itkv3Rigid3DTransform.h |    2 +-
 .../Transform/wrapping/itkVersorTransform.wrap     |   11 +-
 .../include/itkAnisotropicDiffusionFunction.h      |    2 +-
 .../include/itkAnisotropicDiffusionImageFilter.hxx |    8 +-
 .../itkCurvatureAnisotropicDiffusionImageFilter.h  |    2 +-
 .../itkCurvatureNDAnisotropicDiffusionFunction.hxx |   13 +-
 .../itkGradientNDAnisotropicDiffusionFunction.hxx  |    7 +-
 ...ectorCurvatureAnisotropicDiffusionImageFilter.h |    2 +-
 ...ctorCurvatureNDAnisotropicDiffusionFunction.hxx |   10 +-
 ...ectorGradientNDAnisotropicDiffusionFunction.hxx |    4 +-
 .../include/itkAntiAliasBinaryImageFilter.hxx      |    2 +-
 .../include/itkCompositeValleyFunction.h           |    2 +-
 .../BiasCorrection/include/itkMRASlabIdentifier.h  |    2 +-
 .../include/itkMRASlabIdentifier.hxx               |    2 +-
 .../include/itkMRIBiasFieldCorrectionFilter.h      |   10 +-
 .../include/itkMRIBiasFieldCorrectionFilter.hxx    |   38 +-
 .../itkN4BiasFieldCorrectionImageFilter.hxx        |   39 +-
 .../src/itkCacheableScalarFunction.cxx             |    9 +-
 ...itkBinaryClosingByReconstructionImageFilter.hxx |    1 -
 .../include/itkBinaryThinningImageFilter.hxx       |   12 +-
 .../include/itkObjectMorphologyImageFilter.hxx     |    2 +-
 .../Colormap/include/itkColormapFunction.h         |    2 +-
 .../include/itkFFTConvolutionImageFilter.hxx       |   28 +-
 ...tkMaskedFFTNormalizedCorrelationImageFilter.hxx |   44 +-
 .../include/itkNormalizedCorrelationImageFilter.h  |    3 +-
 .../itkNormalizedCorrelationImageFilter.hxx        |    9 +-
 .../include/itkMinMaxCurvatureFlowFunction.hxx     |   29 +-
 .../include/itkInverseDeconvolutionImageFilter.hxx |    8 +-
 .../itkIterativeDeconvolutionImageFilter.hxx       |   12 +-
 .../itkLandweberDeconvolutionImageFilter.hxx       |    8 +-
 ...icBlindLeastSquaresDeconvolutionImageFilter.hxx |   10 +-
 ...kProjectedIterativeDeconvolutionImageFilter.hxx |    4 +-
 .../itkRichardsonLucyDeconvolutionImageFilter.hxx  |   20 +-
 .../itkTikhonovDeconvolutionImageFilter.hxx        |    8 +-
 .../include/itkWienerDeconvolutionImageFilter.hxx  |    8 +-
 .../itkPatchBasedDenoisingBaseImageFilter.hxx      |    6 +-
 .../include/itkPatchBasedDenoisingImageFilter.hxx  |  133 +-
 ...kDiffusionTensor3DReconstructionImageFilter.hxx |   17 +-
 .../itkComposeDisplacementFieldsImageFilter.hxx    |    4 +-
 .../include/itkConstantVelocityFieldTransform.hxx  |    4 +-
 ...itkDisplacementFieldJacobianDeterminantFilter.h |    3 +-
 ...kDisplacementFieldJacobianDeterminantFilter.hxx |    1 -
 .../itkDisplacementFieldToBSplineImageFilter.hxx   |    5 +-
 .../include/itkDisplacementFieldTransform.hxx      |    8 +-
 .../itkExponentialDisplacementFieldImageFilter.hxx |    2 +-
 ...hingOnUpdateTimeVaryingVelocityFieldTransform.h |    2 +-
 ...ngOnUpdateTimeVaryingVelocityFieldTransform.hxx |   11 +-
 .../itkInverseDisplacementFieldImageFilter.hxx     |    1 -
 .../itkInvertDisplacementFieldImageFilter.h        |    5 +
 .../itkInvertDisplacementFieldImageFilter.hxx      |   51 +-
 ...terativeInverseDisplacementFieldImageFilter.hxx |   12 +-
 .../itkTimeVaryingBSplineVelocityFieldTransform.h  |    2 +-
 ...itkTimeVaryingBSplineVelocityFieldTransform.hxx |    1 +
 ...eVaryingVelocityFieldIntegrationImageFilter.hxx |    1 -
 .../itkTransformToDisplacementFieldFilter.h        |  201 +
 .../itkTransformToDisplacementFieldFilter.hxx      |  300 ++
 .../include/itkVelocityFieldTransform.hxx          |    2 +-
 .../itkApproximateSignedDistanceMapImageFilter.hxx |    3 +-
 .../itkContourDirectedMeanDistanceImageFilter.hxx  |    2 +-
 .../itkDanielssonDistanceMapImageFilter.hxx        |    2 +-
 .../itkDirectedHausdorffDistanceImageFilter.hxx    |    4 +-
 .../include/itkFastChamferDistanceImageFilter.hxx  |    8 +-
 .../include/itkIsoContourDistanceImageFilter.hxx   |   12 +-
 .../itkReflectiveImageRegionConstIterator.hxx      |    2 +-
 .../itkSignedMaurerDistanceMapImageFilter.hxx      |   10 +-
 .../Modules/Filtering/FFT/include/itkFFTWCommon.h  |   12 +-
 .../FFT/include/itkFFTWGlobalConfiguration.h       |    8 +-
 .../FFT/src/itkFFTWGlobalConfiguration.cxx         |    2 +-
 .../FFT/wrapping/itkFFTWGlobalConfiguration.wrap   |    1 +
 .../itkMagnitudeAndPhaseToComplexImageFilter.wrap  |    9 +
 .../FastMarching/include/itkFastMarchingBase.hxx   |    8 +-
 .../itkFastMarchingExtensionImageFilter.hxx        |    6 +-
 .../itkFastMarchingExtensionImageFilterBase.hxx    |    8 +-
 .../include/itkFastMarchingImageFilter.h           |    1 +
 .../include/itkFastMarchingImageFilter.hxx         |   12 +-
 .../include/itkFastMarchingImageFilterBase.hxx     |    4 +-
 ...FastMarchingImageToNodePairContainerAdaptor.hxx |    4 +-
 .../itkFastMarchingQuadEdgeMeshFilterBase.hxx      |   18 +-
 ...stMarchingReachedTargetNodesStoppingCriterion.h |   14 +-
 .../include/itkFastMarchingStoppingCriterionBase.h |    2 +-
 .../itkFastMarchingUpwindGradientImageFilter.hxx   |    4 +-
 .../itkGPUAnisotropicDiffusionImageFilter.hxx      |    6 +-
 .../itkGPUNeighborhoodOperatorImageFilter.h        |    3 +-
 .../itkGPUNeighborhoodOperatorImageFilter.hxx      |    1 -
 .../include/itkGPUDiscreteGaussianImageFilter.h    |    3 +-
 .../include/itkGPUDiscreteGaussianImageFilter.hxx  |    1 -
 .../ImageCompose/include/itkComposeImageFilter.hxx |    6 +-
 .../wrapping/itkJoinSeriesImageFilter.wrap         |   35 +-
 .../ImageFeature/include/itkBilateralImageFilter.h |    3 +-
 .../include/itkBilateralImageFilter.hxx            |   13 +-
 .../include/itkCannyEdgeDetectionImageFilter.h     |   17 +-
 .../include/itkCannyEdgeDetectionImageFilter.hxx   |   18 +-
 .../include/itkDerivativeImageFilter.h             |    3 +-
 .../include/itkDerivativeImageFilter.hxx           |    1 -
 .../itkHessian3DToVesselnessMeasureImageFilter.hxx |    4 +-
 .../itkHessianRecursiveGaussianImageFilter.h       |    3 +-
 .../itkHessianRecursiveGaussianImageFilter.hxx     |    1 -
 .../itkHoughTransform2DCirclesImageFilter.hxx      |   24 +-
 .../include/itkHoughTransform2DLinesImageFilter.h  |    8 +-
 .../itkHoughTransform2DLinesImageFilter.hxx        |   29 +-
 .../ImageFeature/include/itkLaplacianImageFilter.h |    3 +-
 .../include/itkLaplacianImageFilter.hxx            |    1 -
 .../include/itkLaplacianSharpeningImageFilter.h    |    3 +-
 .../include/itkLaplacianSharpeningImageFilter.hxx  |    1 -
 .../include/itkMaskFeaturePointSelectionFilter.hxx |    2 +-
 .../include/itkSobelEdgeDetectionImageFilter.h     |    3 +-
 .../include/itkSobelEdgeDetectionImageFilter.hxx   |    1 -
 .../include/itkZeroCrossingImageFilter.h           |    3 +-
 .../include/itkZeroCrossingImageFilter.hxx         |    1 -
 ...itkHessian3DToVesselnessMeasureImageFilter.wrap |   11 +-
 .../itkMaskFeaturePointSelectionFilter.wrap        |   10 +-
 .../include/itkBinaryFunctorImageFilter.hxx        |    6 +-
 .../ImageFilterBase/include/itkBoxImageFilter.h    |    6 +-
 .../itkMaskNeighborhoodOperatorImageFilter.h       |    3 +-
 .../itkMaskNeighborhoodOperatorImageFilter.hxx     |    1 -
 .../include/itkNeighborhoodOperatorImageFilter.h   |    3 +-
 .../include/itkNeighborhoodOperatorImageFilter.hxx |    1 -
 .../include/itkNoiseImageFilter.hxx                |    2 +-
 .../include/itkNullImageToImageFilterDriver.hxx    |    2 +-
 .../include/itkRecursiveSeparableImageFilter.hxx   |   27 +-
 .../itkVectorNeighborhoodOperatorImageFilter.h     |    8 +-
 .../itkVectorNeighborhoodOperatorImageFilter.hxx   |    1 -
 .../include/itkLabelMapContourOverlayImageFilter.h |   15 +
 .../itkLabelMapContourOverlayImageFilter.hxx       |    9 +-
 .../include/itkLabelMapOverlayImageFilter.h        |   15 +
 .../include/itkLabelMapOverlayImageFilter.hxx      |    4 +-
 .../include/itkLabelMapToRGBImageFilter.hxx        |    2 -
 .../ImageFusion/include/itkLabelOverlayFunctor.h   |   12 +-
 .../ImageFusion/include/itkLabelToRGBFunctor.h     |   20 +-
 .../Filtering/ImageFusion/wrapping/CMakeLists.txt  |   11 +
 .../ImageGradient/include/itkGradientImageFilter.h |    7 +-
 .../include/itkGradientImageFilter.hxx             |    1 -
 .../include/itkGradientMagnitudeImageFilter.h      |    3 +-
 .../include/itkGradientMagnitudeImageFilter.hxx    |    3 +-
 ...GradientMagnitudeRecursiveGaussianImageFilter.h |    3 +-
 ...adientMagnitudeRecursiveGaussianImageFilter.hxx |    1 -
 .../itkGradientRecursiveGaussianImageFilter.h      |    9 +-
 .../itkGradientRecursiveGaussianImageFilter.hxx    |    1 -
 .../itkVectorGradientMagnitudeImageFilter.h        |    5 +-
 .../itkVectorGradientMagnitudeImageFilter.hxx      |   15 +-
 .../itkBSplineCenteredResampleImageFilterBase.hxx  |    2 +-
 .../include/itkBSplineControlPointImageFilter.hxx  |   12 +-
 .../itkBSplineControlPointImageFunction.hxx        |    6 +-
 .../include/itkBSplineDownsampleImageFilter.hxx    |    4 +-
 .../include/itkBSplineResampleImageFilterBase.hxx  |    5 +-
 ...tkBSplineScatteredDataPointSetToImageFilter.hxx |   13 +-
 .../include/itkBSplineUpsampleImageFilter.hxx      |    4 +-
 .../ImageGrid/include/itkBinShrinkImageFilter.h    |    2 +-
 .../ImageGrid/include/itkBinShrinkImageFilter.hxx  |    2 +-
 .../include/itkChangeInformationImageFilter.hxx    |    2 +-
 .../include/itkConstantPadImageFilter.hxx          |    2 +-
 .../ImageGrid/include/itkExpandImageFilter.hxx     |    4 +-
 .../include/itkInterpolateImageFilter.hxx          |    4 +-
 .../ImageGrid/include/itkPadImageFilter.hxx        |    2 +-
 .../ImageGrid/include/itkResampleImageFilter.h     |   17 +-
 .../ImageGrid/include/itkResampleImageFilter.hxx   |  102 +-
 .../ImageGrid/include/itkShrinkImageFilter.h       |    2 +-
 .../ImageGrid/include/itkShrinkImageFilter.hxx     |    4 +-
 .../include/itkSliceBySliceImageFilter.hxx         |   16 +-
 .../ImageGrid/include/itkTileImageFilter.hxx       |   19 +
 .../include/itkVectorResampleImageFilter.hxx       |    2 +-
 .../ImageGrid/include/itkWarpImageFilter.hxx       |    4 +-
 .../wrapping/itkBinShrinkImageFilter.wrap          |    1 -
 .../ImageGrid/wrapping/itkOrientImageFilter.wrap   |   10 +-
 .../wrapping/itkSliceBySliceImageFilter.wrap       |   35 +-
 .../ImageIntensity/include/itkAcosImageFilter.h    |    6 +-
 .../ImageIntensity/include/itkAdaptImageFilter.h   |    2 +-
 .../ImageIntensity/include/itkAsinImageFilter.h    |    6 +-
 .../ImageIntensity/include/itkAtan2ImageFilter.h   |    4 +-
 .../ImageIntensity/include/itkAtanImageFilter.h    |    6 +-
 .../include/itkBinaryMagnitudeImageFilter.h        |    4 +-
 .../include/itkComplexToModulusImageFilter.h       |    2 +-
 .../include/itkComplexToPhaseImageFilter.h         |    2 +-
 .../ImageIntensity/include/itkCosImageFilter.h     |    6 +-
 .../ImageIntensity/include/itkDivideImageFilter.h  |    2 +-
 .../include/itkEdgePotentialImageFilter.h          |    2 +-
 .../ImageIntensity/include/itkExpImageFilter.h     |    4 +-
 .../include/itkExpNegativeImageFilter.h            |    4 +-
 .../include/itkHistogramMatchingImageFilter.hxx    |   49 +-
 .../include/itkIntensityWindowingImageFilter.h     |    8 +-
 .../ImageIntensity/include/itkLog10ImageFilter.h   |    4 +-
 .../ImageIntensity/include/itkLogImageFilter.h     |    2 +-
 .../itkMagnitudeAndPhaseToComplexImageFilter.h     |  142 +
 .../ImageIntensity/include/itkMaskImageFilter.h    |   16 +-
 .../include/itkMaskNegatedImageFilter.h            |    2 +-
 .../include/itkNormalizeImageFilter.hxx            |    2 +-
 .../include/itkPolylineMask2DImageFilter.hxx       |    2 -
 .../include/itkPolylineMaskImageFilter.hxx         |   15 +-
 .../ImageIntensity/include/itkPowImageFilter.h     |    4 +-
 .../include/itkShiftScaleImageFilter.hxx           |    4 +-
 .../ImageIntensity/include/itkSigmoidImageFilter.h |    2 +-
 .../ImageIntensity/include/itkSinImageFilter.h     |    4 +-
 .../ImageIntensity/include/itkSqrtImageFilter.h    |    4 +-
 .../ImageIntensity/include/itkTanImageFilter.h     |    4 +-
 .../include/itkTernaryMagnitudeImageFilter.h       |    2 +-
 .../include/itkVectorExpandImageFilter.hxx         |    4 +-
 .../include/itkVectorRescaleIntensityImageFilter.h |    2 +-
 .../itkVectorRescaleIntensityImageFilter.hxx       |   12 +-
 .../include/itkWeightedAddImageFilter.h            |    2 +-
 .../include/itkBinaryContourImageFilter.hxx        |    2 +-
 .../Modules/Filtering/ImageNoise/CMakeLists.txt    |    2 +
 .../include/itkAdditiveGaussianNoiseImageFilter.h  |  105 +
 .../itkAdditiveGaussianNoiseImageFilter.hxx        |  100 +
 .../ImageNoise/include/itkNoiseBaseImageFilter.h   |   91 +
 .../ImageNoise/include/itkNoiseBaseImageFilter.hxx |   89 +
 .../include/itkSaltAndPepperNoiseImageFilter.h     |  106 +
 .../include/itkSaltAndPepperNoiseImageFilter.hxx   |  111 +
 .../ImageNoise/include/itkShotNoiseImageFilter.h   |  109 +
 .../ImageNoise/include/itkShotNoiseImageFilter.hxx |  123 +
 .../include/itkSpeckleNoiseImageFilter.h           |  105 +
 .../include/itkSpeckleNoiseImageFilter.hxx         |  134 +
 .../Modules/Filtering/ImageNoise/itk-module.cmake  |   13 +
 .../itkAdditiveGaussianNoiseImageFilter.wrap       |    3 +
 .../itkPeakSignalToNoiseRatioCalculator.wrap       |    3 +
 .../wrapping/itkSaltAndPepperNoiseImageFilter.wrap |    3 +
 .../wrapping/itkShotNoiseImageFilter.wrap          |    3 +
 .../wrapping/itkSpeckleNoiseImageFilter.wrap       |    3 +
 .../ImageSources/include/itkGaborImageSource.hxx   |    2 +-
 .../ImageSources/include/itkGaborKernelFunction.h  |    6 +-
 .../include/itkGaussianImageSource.hxx             |    1 -
 ...itkAdaptiveHistogramEqualizationImageFilter.hxx |    2 +-
 .../include/itkHistogramAlgorithmBase.h            |    2 +-
 .../include/itkHistogramAlgorithmBase.hxx          |   13 +-
 .../include/itkImageMomentsCalculator.h            |    2 +-
 .../include/itkImageMomentsCalculator.hxx          |    8 +-
 .../include/itkImagePCADecompositionCalculator.h   |    2 +-
 .../include/itkImagePCADecompositionCalculator.hxx |    4 +-
 .../include/itkLabelOverlapMeasuresImageFilter.h   |    3 -
 .../include/itkLabelOverlapMeasuresImageFilter.hxx |   20 -
 .../include/itkLabelStatisticsImageFilter.h        |    5 +-
 .../include/itkLabelStatisticsImageFilter.hxx      |  198 +-
 .../itkStandardDeviationProjectionImageFilter.h    |    2 +-
 .../include/itkStatisticsImageFilter.hxx           |    2 +-
 .../LabelMap/include/itkAttributeLabelObject.h     |    2 +-
 .../include/itkBinaryGrindPeakImageFilter.hxx      |    4 +-
 .../include/itkBinaryImageToLabelMapFilter.hxx     |    2 +-
 .../itkBinaryShapeKeepNObjectsImageFilter.hxx      |   13 +-
 .../itkBinaryStatisticsKeepNObjectsImageFilter.hxx |   13 +-
 .../Filtering/LabelMap/include/itkLabelMap.h       |    2 +-
 .../Filtering/LabelMap/include/itkLabelMap.hxx     |   50 +-
 .../include/itkLabelMapToLabelImageFilter.hxx      |    2 +-
 .../Filtering/LabelMap/include/itkLabelObject.h    |    2 +-
 .../Filtering/LabelMap/include/itkLabelObject.hxx  |    4 +-
 .../LabelMap/include/itkLabelObjectLine.h          |    4 +-
 .../LabelMap/include/itkLabelObjectLine.hxx        |   12 +-
 .../include/itkObjectByObjectLabelMapFilter.hxx    |    6 +-
 .../LabelMap/include/itkShapeLabelMapFilter.hxx    |   30 +-
 .../LabelMap/include/itkShapeLabelObject.h         |    2 +-
 .../include/itkStatisticsLabelMapFilter.hxx        |   41 +-
 .../LabelMap/include/itkStatisticsLabelObject.h    |   14 +-
 .../LabelMap/src/itkGeometryUtilities.cxx          |    6 +-
 .../Filtering/LabelMap/wrapping/CMakeLists.txt     |   11 +
 .../itkClosingByReconstructionImageFilter.hxx      |    4 +
 .../include/itkFlatStructuringElement.hxx          |   24 +-
 .../include/itkGrayscaleDilateImageFilter.hxx      |   24 +-
 .../include/itkGrayscaleErodeImageFilter.hxx       |   24 +-
 ...itkGrayscaleMorphologicalClosingImageFilter.hxx |   24 +-
 .../itkGrayscaleMorphologicalOpeningImageFilter.h  |    4 +-
 ...itkGrayscaleMorphologicalOpeningImageFilter.hxx |   44 +-
 .../include/itkKernelImageFilter.h                 |    2 -
 .../itkMorphologicalGradientImageFilter.hxx        |   20 +-
 .../include/itkMovingHistogramImageFilter.hxx      |    2 -
 .../include/itkSharedMorphologyUtilities.hxx       |   18 +-
 .../Filtering/Path/include/itkChainCodePath2D.h    |   16 +-
 .../itkChainCodeToFourierSeriesPathFilter.hxx      |    6 +-
 .../Path/include/itkFourierSeriesPath.hxx          |   12 +-
 .../Filtering/Path/include/itkHilbertPath.hxx      |    2 +-
 .../Path/include/itkImageAndPathToImageFilter.hxx  |    4 +-
 .../include/itkOrthogonalSwath2DPathFilter.hxx     |    6 +-
 .../itkOrthogonallyCorrected2DParametricPath.h     |   14 +-
 .../ITK/Modules/Filtering/Path/include/itkPath.h   |    2 +-
 .../Filtering/Path/include/itkPathFunctions.h      |   10 +-
 .../Modules/Filtering/Path/include/itkPathSource.h |    4 +-
 .../Path/include/itkPolyLineParametricPath.hxx     |    8 +-
 .../itkOrthogonallyCorrected2DParametricPath.cxx   |    2 +-
 .../include/itkBorderQuadEdgeMeshFilter.hxx        |   12 +-
 .../include/itkCleanQuadEdgeMeshFilter.hxx         |    2 +-
 .../include/itkDecimationQuadEdgeMeshFilter.h      |    2 +-
 .../itkDelaunayConformingQuadEdgeMeshFilter.h      |    7 +-
 .../itkDelaunayConformingQuadEdgeMeshFilter.hxx    |    4 +-
 .../itkDiscreteCurvatureQuadEdgeMeshFilter.h       |    2 +-
 ...tkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h |    2 +-
 ...itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.h |    2 +-
 .../itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h   |    2 +-
 ...itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.h |    2 +-
 ...DiscretePrincipalCurvaturesQuadEdgeMeshFilter.h |    2 +-
 .../itkEdgeDecimationQuadEdgeMeshFilter.hxx        |   22 +-
 .../include/itkNormalQuadEdgeMeshFilter.hxx        |    6 +-
 .../itkParameterizationQuadEdgeMeshFilter.hxx      |    4 +-
 .../include/itkQuadEdgeMeshDecimationCriteria.h    |    2 +-
 .../itkQuadricDecimationQuadEdgeMeshFilter.hxx     |    2 +-
 .../include/itkSmoothingQuadEdgeMeshFilter.hxx     |    4 +-
 ...SquaredEdgeLengthDecimationQuadEdgeMeshFilter.h |   10 +-
 .../wrapping/itkMatrixCoefficients.wrap            |    0
 .../include/itkDiscreteGaussianImageFilter.h       |    3 +-
 .../include/itkDiscreteGaussianImageFilter.hxx     |    1 -
 .../include/itkRecursiveGaussianImageFilter.hxx    |   24 +-
 .../itkSmoothingRecursiveGaussianImageFilter.h     |    3 +-
 .../itkSmoothingRecursiveGaussianImageFilter.hxx   |    1 -
 .../itkSpatialFunctionImageEvaluatorFilter.hxx     |    2 +-
 .../include/itkHistogramThresholdCalculator.h      |    6 +-
 .../include/itkHistogramThresholdImageFilter.h     |    2 +-
 .../include/itkHistogramThresholdImageFilter.hxx   |   15 +-
 .../include/itkHuangThresholdCalculator.hxx        |    2 +-
 .../itkKittlerIllingworthThresholdCalculator.hxx   |    4 +-
 .../include/itkLiThresholdCalculator.hxx           |    4 +-
 .../itkMaximumEntropyThresholdCalculator.hxx       |    8 +-
 .../include/itkMomentsThresholdCalculator.hxx      |    4 +-
 .../itkOtsuMultipleThresholdsCalculator.hxx        |   57 +-
 .../include/itkOtsuThresholdCalculator.h           |    1 +
 .../include/itkOtsuThresholdCalculator.hxx         |   12 +
 .../include/itkRenyiEntropyThresholdCalculator.hxx |   22 +-
 .../include/itkShanbhagThresholdCalculator.hxx     |   10 +-
 .../Thresholding/include/itkThresholdImageFilter.h |   15 +
 .../include/itkThresholdImageFilter.hxx            |    6 +-
 .../include/itkYenThresholdCalculator.hxx          |    2 +-
 .../include/itkArchetypeSeriesFileNames.h          |    2 +-
 .../IO/ImageBase/include/itkImageFileReader.hxx    |   42 +-
 .../IO/ImageBase/include/itkImageFileWriter.h      |    8 +-
 .../IO/ImageBase/include/itkImageFileWriter.hxx    |   24 +-
 .../Modules/IO/ImageBase/include/itkImageIOBase.h  |   40 +-
 .../IO/ImageBase/include/itkImageSeriesReader.h    |    9 +-
 .../IO/ImageBase/include/itkImageSeriesReader.hxx  |   12 +-
 .../IO/ImageBase/include/itkImageSeriesWriter.h    |    6 +-
 .../IO/ImageBase/include/itkImageSeriesWriter.hxx  |    6 +-
 .../ImageBase/include/itkNumericSeriesFileNames.h  |    2 +-
 .../include/itkRegularExpressionSeriesFileNames.h  |    2 +-
 .../IO/ImageBase/include/itkStreamingImageIOBase.h |   28 +-
 .../Modules/IO/ImageBase/src/itkImageIOBase.cxx    |   99 +-
 .../Modules/IO/ImageBase/src/itkImageIOFactory.cxx |    2 +-
 .../IO/ImageBase/src/itkStreamingImageIOBase.cxx   |   57 -
 .../include/itkEigenAnalysis2DImageFilter.hxx      |    2 +-
 .../Eigen/include/itkSymmetricEigenSystem.h        |    2 +-
 .../Eigen/include/itkSymmetricEigenSystem.hxx      |    4 +-
 .../Numerics/NarrowBand/include/itkNarrowBand.h    |    5 +-
 .../Numerics/NarrowBand/include/itkNarrowBand.hxx  |    3 +-
 .../include/itkGaussianRadialBasisFunction.hxx     |    6 +-
 .../include/itkGaussianTransferFunction.hxx        |    2 +-
 .../Numerics/NeuralNetworks/include/itkLayerBase.h |    2 +-
 .../NeuralNetworks/include/itkLayerBase.hxx        |   10 +-
 .../include/itkLearningFunctionBase.h              |    2 +-
 .../include/itkLogSigmoidTransferFunction.h        |   13 +-
 .../include/itkLogSigmoidTransferFunction.hxx      |   31 +-
 .../include/itkMultiquadricRadialBasisFunction.hxx |    2 +-
 .../include/itkNeuralNetworkObject.h               |    2 +-
 .../itkRBFBackPropagationLearningFunction.hxx      |    5 -
 .../include/itkSigmoidTransferFunction.h           |   23 +-
 .../include/itkSigmoidTransferFunction.hxx         |   40 +-
 .../itkSymmetricSigmoidTransferFunction.hxx        |    2 +-
 .../include/itkTanHTransferFunction.hxx            |    6 +-
 .../include/itkTanSigmoidTransferFunction.hxx      |    2 +-
 .../include/itkTrainingFunctionBase.h              |    2 +-
 .../include/itkTrainingFunctionBase.hxx            |    4 +-
 .../NeuralNetworks/include/itkWeightSetBase.h      |    2 +-
 .../Optimizers/include/itkAmoebaOptimizer.h        |    8 +-
 .../include/itkConjugateGradientOptimizer.h        |    4 +-
 .../Numerics/Optimizers/include/itkCostFunction.h  |    2 +-
 .../include/itkCumulativeGaussianCostFunction.h    |   10 +-
 .../include/itkCumulativeGaussianOptimizer.h       |    6 +-
 .../Optimizers/include/itkExhaustiveOptimizer.h    |    6 +-
 .../Numerics/Optimizers/include/itkFRPROptimizer.h |    4 +-
 .../include/itkGradientDescentOptimizer.h          |    6 +-
 ...itkInitializationBiasedParticleSwarmOptimizer.h |    4 +-
 .../Optimizers/include/itkLBFGSBOptimizer.h        |    8 +-
 .../Optimizers/include/itkLBFGSOptimizer.h         |    8 +-
 .../include/itkLevenbergMarquardtOptimizer.h       |    6 +-
 .../include/itkMultipleValuedNonLinearOptimizer.h  |    2 +-
 .../itkMultipleValuedNonLinearVnlOptimizer.h       |    2 +-
 .../itkMultipleValuedVnlCostFunctionAdaptor.h      |    4 +-
 .../include/itkOnePlusOneEvolutionaryOptimizer.h   |    6 +-
 .../Numerics/Optimizers/include/itkOptimizer.h     |    2 +-
 .../Optimizers/include/itkParticleSwarmOptimizer.h |    4 +-
 .../include/itkParticleSwarmOptimizerBase.h        |    6 +-
 .../Optimizers/include/itkPowellOptimizer.h        |    6 +-
 ...ternionRigidTransformGradientDescentOptimizer.h |    2 +-
 .../itkRegularStepGradientDescentBaseOptimizer.h   |    6 +-
 .../itkRegularStepGradientDescentOptimizer.h       |    2 +-
 .../Numerics/Optimizers/include/itkSPSAOptimizer.h |    6 +-
 .../include/itkSingleValuedNonLinearOptimizer.h    |    2 +-
 .../include/itkSingleValuedNonLinearVnlOptimizer.h |    2 +-
 .../itkSingleValuedVnlCostFunctionAdaptor.h        |    6 +-
 .../include/itkVersorRigid3DTransformOptimizer.h   |    2 +-
 .../include/itkVersorTransformOptimizer.h          |    2 +-
 .../Numerics/Optimizers/src/itkAmoebaOptimizer.cxx |    6 +-
 .../src/itkConjugateGradientOptimizer.cxx          |    2 +-
 .../src/itkCumulativeGaussianCostFunction.cxx      |    8 +-
 .../src/itkCumulativeGaussianOptimizer.cxx         |   22 +-
 .../Numerics/Optimizers/src/itkFRPROptimizer.cxx   |    6 +-
 .../Optimizers/src/itkGradientDescentOptimizer.cxx |   15 +-
 .../Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx |    4 +-
 .../Numerics/Optimizers/src/itkLBFGSOptimizer.cxx  |    4 +-
 .../src/itkLevenbergMarquardtOptimizer.cxx         |    2 +-
 .../src/itkMultipleValuedNonLinearOptimizer.cxx    |    2 +-
 .../src/itkMultipleValuedNonLinearVnlOptimizer.cxx |    4 +-
 .../src/itkOnePlusOneEvolutionaryOptimizer.cxx     |    6 +-
 .../src/itkParticleSwarmOptimizerBase.cxx          |    6 +-
 .../Numerics/Optimizers/src/itkPowellOptimizer.cxx |   22 +-
 .../itkRegularStepGradientDescentBaseOptimizer.cxx |    9 +-
 .../Numerics/Optimizers/src/itkSPSAOptimizer.cxx   |   11 +-
 .../src/itkSingleValuedNonLinearOptimizer.cxx      |    2 +-
 .../src/itkSingleValuedNonLinearVnlOptimizer.cxx   |    4 +-
 .../Modules/Numerics/Optimizersv4/CMakeLists.txt   |    1 +
 .../Optimizersv4/include/itkAmoebaOptimizerv4.h    |  162 +
 .../include/itkConvergenceMonitoringFunction.h     |    2 +-
 .../include/itkExhaustiveOptimizerv4.h             |  180 +
 .../include/itkExhaustiveOptimizerv4.hxx           |  260 ++
 .../itkGradientDescentLineSearchOptimizerv4.hxx    |    2 +-
 .../include/itkGradientDescentOptimizerBasev4.h    |   57 +-
 .../include/itkGradientDescentOptimizerBasev4.hxx  |   56 +-
 .../include/itkGradientDescentOptimizerv4.h        |   83 +-
 .../include/itkGradientDescentOptimizerv4.hxx      |  100 +-
 .../Optimizersv4/include/itkLBFGSBOptimizerv4.h    |  181 +
 .../Optimizersv4/include/itkLBFGSOptimizerBasev4.h |  169 +
 .../include/itkLBFGSOptimizerBasev4.hxx            |  258 ++
 .../Optimizersv4/include/itkLBFGSOptimizerv4.h     |   99 +
 .../include/itkMultiGradientOptimizerv4.h          |   17 +-
 .../include/itkMultiGradientOptimizerv4.hxx        |    6 +-
 .../include/itkMultiStartOptimizerv4.h             |   18 +-
 .../include/itkMultiStartOptimizerv4.hxx           |    8 +-
 .../include/itkObjectToObjectMetric.hxx            |   29 +-
 .../include/itkObjectToObjectMetricBase.h          |    2 +-
 .../include/itkObjectToObjectOptimizerBase.h       |   87 +-
 .../include/itkObjectToObjectOptimizerBase.hxx     |   43 +-
 .../include/itkOnePlusOneEvolutionaryOptimizerv4.h |  216 ++
 .../itkOnePlusOneEvolutionaryOptimizerv4.hxx       |  337 ++
 .../include/itkOptimizerParameterScalesEstimator.h |   11 +-
 .../Optimizersv4/include/itkPowellOptimizerv4.h    |  245 ++
 .../Optimizersv4/include/itkPowellOptimizerv4.hxx  |  582 +++
 .../include/itkQuasiNewtonOptimizerv4.h            |    1 -
 .../include/itkQuasiNewtonOptimizerv4.hxx          |   47 +-
 .../itkRegistrationParameterScalesEstimator.hxx    |   16 +-
 .../itkRegistrationParameterScalesFromJacobian.hxx |   18 +-
 ...itkRegistrationParameterScalesFromShiftBase.hxx |    4 +-
 .../itkRegularStepGradientDescentOptimizerv4.h     |  150 +
 .../itkRegularStepGradientDescentOptimizerv4.hxx   |  299 ++
 .../itkSingleValuedNonLinearVnlOptimizerv4.h       |  126 +
 .../itkSingleValuedVnlCostFunctionAdaptorv4.h      |  129 +
 .../Numerics/Optimizersv4/src/CMakeLists.txt       |   14 +
 .../Optimizersv4/src/itkAmoebaOptimizerv4.cxx      |  298 ++
 .../Optimizersv4/src/itkLBFGSBOptimizerv4.cxx      |  296 ++
 .../Optimizersv4/src/itkLBFGSOptimizerv4.cxx       |  207 ++
 .../src/itkSingleValuedNonLinearVnlOptimizerv4.cxx |  130 +
 .../itkSingleValuedVnlCostFunctionAdaptorv4.cxx    |  194 +
 .../itkGradientDescentOptimizerBasev4.wrap         |    7 +
 .../wrapping/itkGradientDescentOptimizerv4.wrap    |   10 +-
 .../wrapping/itkObjectToObjectOptimizerBase.wrap   |    7 +
 .../itkOptimizerParameterScalesEstimator.wrap      |    8 +-
 .../wrapping/itkQuasiNewtonOptimizerv4.wrap        |    8 +-
 .../include/itkMultivariateLegendrePolynomial.h    |    9 +-
 .../Statistics/include/itkChiSquareDistribution.h  |   24 +-
 .../Statistics/include/itkCovarianceSampleFilter.h |   48 +-
 .../include/itkCovarianceSampleFilter.hxx          |   76 +-
 .../include/itkDenseFrequencyContainer2.h          |    2 +-
 .../include/itkEuclideanDistanceMetric.hxx         |    6 +-
 ...kExpectationMaximizationMixtureModelEstimator.h |    2 +-
 ...xpectationMaximizationMixtureModelEstimator.hxx |   21 +-
 .../Statistics/include/itkGaussianDistribution.h   |   24 +-
 .../include/itkGaussianMembershipFunction.hxx      |   10 +-
 .../include/itkGaussianMixtureModelComponent.hxx   |    2 +-
 .../itkGaussianRandomSpatialNeighborSubsampler.hxx |    2 +-
 .../Numerics/Statistics/include/itkHistogram.h     |    6 +-
 .../Numerics/Statistics/include/itkHistogram.hxx   |   13 +-
 .../include/itkHistogramToEntropyImageFilter.h     |    4 +-
 .../itkHistogramToLogProbabilityImageFilter.h      |    8 +-
 .../itkHistogramToRunLengthFeaturesFilter.h        |    6 +-
 .../itkHistogramToRunLengthFeaturesFilter.hxx      |    2 +-
 .../include/itkHistogramToTextureFeaturesFilter.h  |    6 +-
 .../itkHistogramToTextureFeaturesFilter.hxx        |   10 +-
 .../include/itkImageClassifierFilter.hxx           |    4 +-
 .../include/itkImageToHistogramFilter.hxx          |   11 +-
 .../include/itkImageToListSampleAdaptor.h          |   46 +-
 .../include/itkImageToListSampleAdaptor.hxx        |    2 +-
 .../include/itkImageToListSampleFilter.h           |   11 +-
 .../include/itkImageToListSampleFilter.hxx         |    5 +-
 .../itkImageToNeighborhoodSampleAdaptor.hxx        |   10 +-
 .../itkJointDomainImageToListSampleAdaptor.hxx     |    2 +-
 .../Numerics/Statistics/include/itkKdTree.h        |   20 +-
 .../Numerics/Statistics/include/itkKdTree.hxx      |   48 +-
 .../include/itkKdTreeBasedKmeansEstimator.h        |    4 +-
 .../include/itkKdTreeBasedKmeansEstimator.hxx      |   23 +-
 .../Statistics/include/itkKdTreeGenerator.h        |    2 +-
 .../Statistics/include/itkKdTreeGenerator.hxx      |    6 +-
 .../itkMahalanobisDistanceMembershipFunction.hxx   |   24 +-
 .../include/itkMahalanobisDistanceMetric.hxx       |    4 +-
 .../include/itkManhattanDistanceMetric.hxx         |    4 +-
 .../include/itkMaskedImageToHistogramFilter.hxx    |    4 +-
 .../Statistics/include/itkMaximumDecisionRule.h    |    2 +-
 .../include/itkMaximumRatioDecisionRule.h          |    4 +-
 .../Statistics/include/itkMeanSampleFilter.h       |   44 +-
 .../Statistics/include/itkMeanSampleFilter.hxx     |   40 +-
 .../include/itkMeasurementVectorTraits.h           |  120 +-
 .../Statistics/include/itkMembershipSample.h       |    8 +-
 .../Statistics/include/itkMembershipSample.hxx     |    4 +
 .../Statistics/include/itkMinimumDecisionRule.h    |    2 +-
 .../include/itkMixtureModelComponentBase.h         |    2 +-
 .../include/itkMixtureModelComponentBase.hxx       |    8 +-
 .../Statistics/include/itkNeighborhoodSampler.hxx  |    2 +-
 .../Statistics/include/itkNormalVariateGenerator.h |    4 +-
 .../include/itkPointSetToListSampleAdaptor.hxx     |    2 +-
 .../include/itkProbabilityDistribution.h           |    2 +-
 .../Numerics/Statistics/include/itkSample.h        |    6 +-
 .../Statistics/include/itkSampleClassifierFilter.h |    6 +-
 .../include/itkSampleClassifierFilter.hxx          |    4 +-
 .../include/itkSampleToHistogramFilter.h           |    6 +-
 .../include/itkSampleToHistogramFilter.hxx         |    8 +-
 .../include/itkSampleToSubsampleFilter.h           |    4 +-
 .../itkScalarImageToCooccurrenceListSampleFilter.h |    6 +-
 .../itkScalarImageToCooccurrenceMatrixFilter.h     |    6 +-
 .../itkScalarImageToCooccurrenceMatrixFilter.hxx   |   20 +-
 .../include/itkScalarImageToHistogramGenerator.h   |    2 +-
 .../itkScalarImageToRunLengthFeaturesFilter.h      |    6 +-
 .../itkScalarImageToRunLengthFeaturesFilter.hxx    |    8 +-
 .../itkScalarImageToRunLengthMatrixFilter.h        |    6 +-
 .../itkScalarImageToRunLengthMatrixFilter.hxx      |    8 +-
 .../itkScalarImageToTextureFeaturesFilter.h        |    6 +-
 .../itkScalarImageToTextureFeaturesFilter.hxx      |    4 +-
 .../include/itkSparseFrequencyContainer2.h         |    2 +-
 .../itkStandardDeviationPerComponentSampleFilter.h |    6 +-
 ...tkStandardDeviationPerComponentSampleFilter.hxx |    2 +-
 .../Statistics/include/itkStatisticsAlgorithm.h    |   68 +-
 .../Statistics/include/itkStatisticsAlgorithm.hxx  |   54 +-
 .../Numerics/Statistics/include/itkSubsample.hxx   |    4 +-
 .../Statistics/include/itkSubsamplerBase.h         |    4 +-
 .../Statistics/include/itkSubsamplerBase.hxx       |    2 +-
 .../Numerics/Statistics/include/itkTDistribution.h |   24 +-
 .../itkVectorContainerToListSampleAdaptor.hxx      |    2 +-
 .../include/itkWeightedCovarianceSampleFilter.h    |   37 +-
 .../include/itkWeightedCovarianceSampleFilter.hxx  |  175 +-
 .../include/itkWeightedMeanSampleFilter.h          |   33 +-
 .../include/itkWeightedMeanSampleFilter.hxx        |  117 +-
 .../Statistics/src/itkChiSquareDistribution.cxx    |    6 +-
 .../Statistics/src/itkGaussianDistribution.cxx     |   14 +-
 .../Statistics/src/itkNormalVariateGenerator.cxx   |   26 +-
 .../Numerics/Statistics/src/itkTDistribution.cxx   |   12 +-
 .../Common/include/itkBlockMatchingImageFilter.hxx |    2 +-
 .../include/itkCenteredTransformInitializer.h      |    2 +-
 .../Common/include/itkCommandIterationUpdate.h     |    4 +-
 .../Common/include/itkCommandVnlIterationUpdate.h  |    4 +-
 .../itkCompareHistogramImageToImageMetric.hxx      |   15 +-
 ...ationCoefficientHistogramImageToImageMetric.hxx |   10 +-
 ...DisplacementFieldTransformParametersAdaptor.hxx |    2 +-
 .../include/itkEuclideanDistancePointMetric.hxx    |    4 +-
 .../itkGradientDifferenceImageToImageMetric.hxx    |    7 +-
 .../include/itkHistogramImageToImageMetric.hxx     |    5 +-
 .../Common/include/itkImageRegistrationMethod.h    |    8 +-
 .../Common/include/itkImageRegistrationMethod.hxx  |   14 +-
 .../itkImageRegistrationMethodImageSource.h        |    4 +-
 .../Common/include/itkImageToImageMetric.h         |   26 +-
 .../Common/include/itkImageToImageMetric.hxx       |  166 +-
 .../Common/include/itkImageToSpatialObjectMetric.h |    2 +-
 .../include/itkImageToSpatialObjectMetric.hxx      |   11 +-
 .../itkImageToSpatialObjectRegistrationMethod.h    |    8 +-
 .../itkImageToSpatialObjectRegistrationMethod.hxx  |   14 +-
 .../itkKappaStatisticImageToImageMetric.hxx        |   11 +-
 ...backLeiblerCompareHistogramImageToImageMetric.h |    2 +-
 ...ckLeiblerCompareHistogramImageToImageMetric.hxx |    4 +-
 .../itkMattesMutualInformationImageToImageMetric.h |   24 +-
 ...tkMattesMutualInformationImageToImageMetric.hxx |  240 +-
 ...procalSquareDifferencePointSetToImageMetric.hxx |   32 +-
 .../include/itkMeanSquareRegistrationFunction.hxx  |    6 +-
 .../include/itkMeanSquaresImageToImageMetric.h     |    4 +-
 .../include/itkMeanSquaresImageToImageMetric.hxx   |   24 +-
 .../itkMeanSquaresPointSetToImageMetric.hxx        |   23 +-
 .../itkMultiResolutionImageRegistrationMethod.h    |    8 +-
 .../itkMultiResolutionImageRegistrationMethod.hxx  |   20 +-
 .../itkMultiResolutionPyramidImageFilter.hxx       |    8 +-
 ...utualInformationHistogramImageToImageMetric.hxx |   12 +-
 .../itkMutualInformationImageToImageMetric.hxx     |   21 +-
 .../itkNormalizedCorrelationImageToImageMetric.hxx |   22 +-
 ...kNormalizedCorrelationPointSetToImageMetric.hxx |   23 +-
 ...utualInformationHistogramImageToImageMetric.hxx |   12 +-
 .../include/itkPDEDeformableRegistrationFunction.h |    6 +-
 .../Common/include/itkPointSetToImageMetric.h      |    4 +-
 .../Common/include/itkPointSetToImageMetric.hxx    |   10 +-
 .../include/itkPointSetToImageRegistrationMethod.h |    8 +-
 .../itkPointSetToImageRegistrationMethod.hxx       |   14 +-
 .../Common/include/itkPointSetToPointSetMetric.h   |    4 +-
 .../Common/include/itkPointSetToPointSetMetric.hxx |    6 +-
 .../itkPointSetToPointSetRegistrationMethod.h      |    8 +-
 .../itkPointSetToPointSetRegistrationMethod.hxx    |   12 +-
 .../itkPointSetToSpatialObjectDemonsRegistration.h |    2 +-
 ...tkPointSetToSpatialObjectDemonsRegistration.hxx |    4 +-
 .../Registration/Common/include/itkPointsLocator.h |    2 +-
 ...kRecursiveMultiResolutionPyramidImageFilter.hxx |    4 +-
 .../itkSimpleMultiResolutionImageRegistrationUI.h  |    3 +-
 ...lineVelocityFieldTransformParametersAdaptor.hxx |    2 +-
 .../Common/include/itkTransformParametersAdaptor.h |   24 +-
 .../include/itkTransformParametersAdaptorBase.h    |   16 +-
 .../wrapping/itkBlockMatchingImageFilter.wrap      |   10 +-
 .../itkCenteredVersorTransformInitializer.wrap     |   11 +-
 .../include/itkGPUDemonsRegistrationFunction.hxx   |    4 +-
 ...eToImageMetricv4GetValueAndDerivativeThreader.h |   16 +-
 ...oImageMetricv4GetValueAndDerivativeThreader.hxx |   13 +-
 .../include/itkCorrelationImageToImageMetricv4.hxx |   16 +-
 ...eToImageMetricv4GetValueAndDerivativeThreader.h |    2 +-
 ...oImageMetricv4GetValueAndDerivativeThreader.hxx |   36 +-
 ...rrelationImageToImageMetricv4HelperThreader.hxx |   27 +-
 ...eToImageMetricv4GetValueAndDerivativeThreader.h |    6 +-
 ...oImageMetricv4GetValueAndDerivativeThreader.hxx |    2 +-
 ...tkEuclideanDistancePointSetToPointSetMetricv4.h |    8 +-
 ...EuclideanDistancePointSetToPointSetMetricv4.hxx |   22 +-
 ...itkExpectationBasedPointSetToPointSetMetricv4.h |   10 +-
 ...kExpectationBasedPointSetToPointSetMetricv4.hxx |   62 +-
 .../Metricsv4/include/itkImageToImageMetricv4.hxx  |   61 +-
 ...oImageMetricv4GetValueAndDerivativeThreader.hxx |   15 +-
 ...mageMetricv4GetValueAndDerivativeThreaderBase.h |    7 +-
 ...geMetricv4GetValueAndDerivativeThreaderBase.hxx |   38 +-
 ...avrdaCharvatTsallisPointSetToPointSetMetricv4.h |   20 +-
 ...rdaCharvatTsallisPointSetToPointSetMetricv4.hxx |  100 +-
 ...utualInformationComputeJointPDFThreaderBase.hxx |    7 +-
 ...utualInformationGetValueAndDerivativeThreader.h |   10 +-
 ...ualInformationGetValueAndDerivativeThreader.hxx |   33 +-
 ...togramMutualInformationImageToImageMetricv4.hxx |   15 +-
 .../include/itkLabeledPointSetToPointSetMetricv4.h |    8 +-
 .../itkLabeledPointSetToPointSetMetricv4.hxx       |   46 +-
 .../itkManifoldParzenWindowsPointSetFunction.hxx   |    6 +-
 ...tkMattesMutualInformationImageToImageMetricv4.h |    4 +-
 ...MattesMutualInformationImageToImageMetricv4.hxx |   63 +-
 ...eToImageMetricv4GetValueAndDerivativeThreader.h |   16 +-
 ...oImageMetricv4GetValueAndDerivativeThreader.hxx |  261 +-
 ...eToImageMetricv4GetValueAndDerivativeThreader.h |    2 +-
 ...oImageMetricv4GetValueAndDerivativeThreader.hxx |   10 +-
 .../include/itkObjectToObjectMultiMetricv4.hxx     |    8 +-
 .../Metricsv4/include/itkPointSetFunction.hxx      |    2 +-
 .../include/itkPointSetToPointSetMetricv4.h        |   22 +-
 .../include/itkPointSetToPointSetMetricv4.hxx      |   98 +-
 .../Registration/Metricsv4/itk-module.cmake        |    1 +
 .../include/itkCurvatureRegistrationFilter.hxx     |    4 +-
 .../include/itkDemonsRegistrationFunction.hxx      |    6 +-
 ...stSymmetricForcesDemonsRegistrationFunction.hxx |    2 +-
 .../itkLevelSetMotionRegistrationFunction.hxx      |    8 +-
 ...itkMultiResolutionPDEDeformableRegistration.hxx |   16 +-
 ...tkSymmetricForcesDemonsRegistrationFunction.hxx |    6 +-
 .../include/itkBSplineSyNImageRegistrationMethod.h |    8 +-
 .../itkBSplineSyNImageRegistrationMethod.hxx       |   20 +-
 .../include/itkImageRegistrationMethodv4.h         |   81 +-
 .../include/itkImageRegistrationMethodv4.hxx       |  212 +-
 .../include/itkSyNImageRegistrationMethod.h        |    8 +-
 .../include/itkSyNImageRegistrationMethod.hxx      |   24 +-
 ...ngBSplineVelocityFieldImageRegistrationMethod.h |    7 -
 ...BSplineVelocityFieldImageRegistrationMethod.hxx |   22 +-
 ...VaryingVelocityFieldImageRegistrationMethodv4.h |    8 -
 ...ryingVelocityFieldImageRegistrationMethodv4.hxx |   16 +-
 .../Modules/Remote/AnalyzeObjectMapIO.remote.cmake |    5 +
 .../ITK/Modules/Remote/FDFImageIO.remote.cmake     |    5 +
 Utilities/ITK/Modules/Remote/IOSTL.remote.cmake    |    7 +
 .../Remote/LesionSizingToolkit.remote.cmake        |    2 +-
 Utilities/ITK/Modules/Remote/MGHIO.remote.cmake    |    2 +-
 Utilities/ITK/Modules/Remote/SCIFIO.remote.cmake   |    2 +-
 .../ITK/Modules/Remote/SkullStrip.remote.cmake     |    5 +
 ...moothingRecursiveYvvGaussianFilter.remote.cmake |    2 +-
 .../ITK/Modules/Remote/SphinxExamples.remote.cmake |    7 +
 .../Modules/Remote/SplitComponents.remote.cmake    |    9 +
 .../Remote/VariationalRegistration.remote.cmake    |    9 +
 .../ITK/Modules/Remote/WikiExamples.remote.cmake   |   13 +
 .../Segmentation/BioCell/include/itkBioCell.h      |    2 +-
 .../Segmentation/BioCell/include/itkBioCell.hxx    |   13 +-
 .../BioCell/include/itkBioCellularAggregate.h      |    8 +-
 .../BioCell/include/itkBioCellularAggregate.hxx    |    5 +-
 .../BioCell/include/itkBioCellularAggregateBase.h  |    2 +-
 .../Segmentation/BioCell/include/itkBioGenome.h    |    4 +-
 .../Segmentation/BioCell/src/itkBioCellBase.cxx    |   12 +-
 .../include/itkBayesianClassifierImageFilter.hxx   |   10 +-
 ...BayesianClassifierInitializationImageFilter.hxx |    2 +-
 .../Classifiers/include/itkClassifierBase.h        |    2 +-
 .../Classifiers/include/itkClassifierBase.hxx      |    2 +-
 .../Classifiers/include/itkImageClassifierBase.hxx |    1 -
 .../include/itkImageGaussianModelEstimator.hxx     |    2 +-
 .../include/itkImageKmeansModelEstimator.hxx       |    8 +-
 .../include/itkImageModelEstimatorBase.h           |    4 +-
 .../include/itkScalarImageKmeansImageFilter.hxx    |    1 -
 .../itkConnectedComponentFunctorImageFilter.hxx    |   14 +-
 .../include/itkConnectedComponentImageFilter.hxx   |    4 +-
 ...hresholdMaximumConnectedComponentsImageFilter.h |    8 +-
 ...esholdMaximumConnectedComponentsImageFilter.hxx |    8 +-
 .../itkVectorConnectedComponentImageFilter.h       |    4 +-
 ...tkDeformableSimplexMesh3DBalloonForceFilter.hxx |    6 +-
 .../include/itkDeformableSimplexMesh3DFilter.hxx   |   20 +-
 ...eSimplexMesh3DGradientConstraintForceFilter.hxx |    8 +-
 .../include/itkKLMRegionGrowImageFilter.hxx        |    7 +-
 .../include/itkKLMSegmentationBorder.h             |    2 +-
 .../include/itkKLMSegmentationRegion.h             |    2 +-
 .../include/itkSegmentationBorder.h                |    2 +-
 .../include/itkSegmentationRegion.h                |    2 +-
 .../src/itkKLMSegmentationBorder.cxx               |    4 +-
 .../src/itkKLMSegmentationRegion.cxx               |   14 +-
 .../include/itkBinaryMedianImageFilter.h           |    3 +-
 .../include/itkBinaryMedianImageFilter.hxx         |    1 -
 .../include/itkLabelVotingImageFilter.hxx          |    6 +-
 .../include/itkMultiLabelSTAPLEImageFilter.h       |   14 +-
 .../include/itkVotingBinaryImageFilter.h           |    3 +-
 .../include/itkVotingBinaryImageFilter.hxx         |    1 -
 .../itkBinaryMaskToNarrowBandPointSetFilter.hxx    |    2 +-
 .../include/itkCollidingFrontsImageFilter.hxx      |    4 +-
 .../LevelSets/include/itkCurvesLevelSetFunction.h  |    6 +-
 .../include/itkCurvesLevelSetImageFilter.hxx       |    3 +-
 .../include/itkExtensionVelocitiesImageFilter.hxx  |    4 +-
 ...esicActiveContourShapePriorLevelSetFunction.hxx |   43 +-
 .../itkImplicitManifoldNormalVectorFilter.hxx      |    4 +-
 .../LevelSets/include/itkLevelSetFunction.h        |   14 +-
 .../LevelSets/include/itkLevelSetFunction.hxx      |    6 +-
 .../include/itkLevelSetFunctionWithRefitTerm.hxx   |    4 +-
 .../include/itkLevelSetNeighborhoodExtractor.h     |    4 +-
 .../include/itkLevelSetNeighborhoodExtractor.hxx   |   22 +-
 .../itkLevelSetVelocityNeighborhoodExtractor.h     |    2 +-
 .../itkLevelSetVelocityNeighborhoodExtractor.hxx   |    6 +-
 .../include/itkNarrowBandLevelSetImageFilter.hxx   |    8 +-
 .../include/itkNormalVectorDiffusionFunction.h     |    2 +-
 .../include/itkNormalVectorDiffusionFunction.hxx   |   22 +-
 .../include/itkNormalVectorFunctionBase.h          |    2 +-
 .../itkParallelSparseFieldLevelSetImageFilter.hxx  |   65 +-
 .../include/itkReinitializeLevelSetImageFilter.hxx |    4 +-
 .../include/itkSegmentationLevelSetImageFilter.hxx |    4 +-
 .../itkShapeDetectionLevelSetImageFilter.hxx       |    3 +-
 .../include/itkShapePriorMAPCostFunctionBase.h     |    8 +-
 .../include/itkShapePriorMAPCostFunctionBase.hxx   |    6 +-
 .../itkShapePriorSegmentationLevelSetFunction.hxx  |    2 +-
 ...tkShapePriorSegmentationLevelSetImageFilter.hxx |    8 +-
 .../itkSparseFieldFourthOrderLevelSetImageFilter.h |    2 +-
 ...tkSparseFieldFourthOrderLevelSetImageFilter.hxx |    8 +-
 .../include/itkSparseFieldLevelSetImageFilter.h    |    4 +-
 .../include/itkSparseFieldLevelSetImageFilter.hxx  |   21 +-
 ...VectorThresholdSegmentationLevelSetFunction.hxx |    2 +-
 .../itkBinaryImageToLevelSetImageAdaptor.hxx       |    6 +-
 .../include/itkDiscreteLevelSetImage.hxx           |   29 +-
 .../LevelSetsv4/include/itkLevelSetBase.h          |   16 +-
 .../LevelSetsv4/include/itkLevelSetBase.hxx        |   37 +-
 .../include/itkLevelSetContainerBase.hxx           |    4 +-
 .../LevelSetsv4/include/itkLevelSetDenseImage.hxx  |   30 +-
 .../include/itkLevelSetDomainMapImageFilter.hxx    |    4 +-
 .../itkLevelSetDomainPartitionImageWithKdTree.hxx  |    2 +-
 .../itkLevelSetEquationChanAndVeseExternalTerm.hxx |    6 +-
 .../itkLevelSetEquationOverlapPenaltyTerm.hxx      |    6 +-
 .../LevelSetsv4/include/itkLevelSetEvolution.hxx   |    3 +-
 ...itkLevelSetEvolutionUpdateLevelSetsThreader.hxx |    7 +-
 .../include/itkLevelSetQuadEdgeMesh.hxx            |   28 +-
 .../LevelSetsv4/include/itkLevelSetSparseImage.hxx |   29 +-
 .../include/itkMalcolmSparseLevelSetImage.hxx      |    1 -
 .../include/itkShiSparseLevelSetImage.hxx          |    1 -
 .../include/itkWhitakerSparseLevelSetImage.hxx     |    1 -
 .../include/itkMRFImageFilter.hxx                  |    4 +-
 .../include/itkRGBGibbsPriorFilter.hxx             |   18 +-
 .../include/itkConfidenceConnectedImageFilter.hxx  |   14 +-
 .../include/itkIsolatedConnectedImageFilter.h      |   31 +-
 .../include/itkIsolatedConnectedImageFilter.hxx    |   46 +-
 .../include/itkPCAShapeSignedDistanceFunction.hxx  |    4 +-
 .../include/itkSphereSignedDistanceFunction.hxx    |    2 +-
 .../Voronoi/include/itkVoronoiDiagram2DGenerator.h |   90 +-
 .../include/itkVoronoiDiagram2DGenerator.hxx       |  123 +-
 .../include/itkVoronoiPartitioningImageFilter.hxx  |    4 +-
 .../include/itkVoronoiSegmentationImageFilter.hxx  |    8 +-
 .../itkVoronoiSegmentationImageFilterBase.hxx      |   65 +-
 .../itkVoronoiSegmentationRGBImageFilter.hxx       |   66 +-
 .../include/itkIsolatedWatershedImageFilter.hxx    |    4 +-
 .../Watersheds/include/itkOneWayEquivalencyTable.h |    2 +-
 .../Watersheds/include/itkWatershedBoundary.h      |    2 +-
 .../include/itkWatershedBoundaryResolver.h         |    8 +-
 .../include/itkWatershedEquivalenceRelabeler.h     |   10 +-
 .../itkWatershedMiniPipelineProgressCommand.h      |    8 +-
 .../Watersheds/include/itkWatershedRelabeler.h     |   10 +-
 .../Watersheds/include/itkWatershedSegmentTable.h  |    6 +-
 .../Watersheds/include/itkWatershedSegmentTree.h   |    4 +-
 .../include/itkWatershedSegmentTreeGenerator.h     |   10 +-
 .../include/itkWatershedSegmentTreeGenerator.hxx   |    2 +-
 .../Watersheds/include/itkWatershedSegmenter.h     |   12 +-
 .../Watersheds/include/itkWatershedSegmenter.hxx   |   11 +-
 .../src/UpdateDoubleConversionFromGoogle.sh        |   16 +-
 .../src/double-conversion/CMakeLists.txt           |   21 +-
 .../src/double-conversion/bignum-dtoa.cc           |   11 +-
 .../src/double-conversion/bignum.cc                |   19 +-
 .../src/double-conversion/cached-powers.cc         |    1 +
 .../src/double-conversion/double-conversion.cc     |  194 +-
 .../src/double-conversion/double-conversion.h      |   33 +-
 .../src/double-conversion/fast-dtoa.cc             |   19 +-
 .../src/double-conversion/fixed-dtoa.cc            |   12 +-
 .../DoubleConversion/src/double-conversion/ieee.h  |    4 +
 .../src/double-conversion/strtod.cc                |    3 +-
 .../DoubleConversion/src/double-conversion/utils.h |   15 +-
 .../ITK/Modules/ThirdParty/Expat/CMakeLists.txt    |   14 +-
 .../ThirdParty/Expat/src/expat/CMakeLists.txt      |   28 +-
 .../Modules/ThirdParty/KWSys/src/CMakeLists.txt    |    1 +
 .../ThirdParty/KWSys/src/KWSys/CMakeLists.txt      |   24 +
 .../ThirdParty/KWSys/src/KWSys/Encoding.hxx.in     |   31 +
 .../Modules/ThirdParty/KWSys/src/KWSys/EncodingC.c |    2 +-
 .../ThirdParty/KWSys/src/KWSys/EncodingCXX.cxx     |   96 +
 .../Modules/ThirdParty/KWSys/src/KWSys/FStream.cxx |   76 +
 .../ThirdParty/KWSys/src/KWSys/FStream.hxx.in      |   28 +-
 .../ITK/Modules/ThirdParty/KWSys/src/KWSys/MD5.c   |    9 +-
 .../ThirdParty/KWSys/src/KWSys/ProcessUNIX.c       |    2 +-
 .../ThirdParty/KWSys/src/KWSys/SharedForward.h.in  |    8 +-
 .../Modules/ThirdParty/KWSys/src/KWSys/System.c    |   30 +-
 .../Modules/ThirdParty/KWSys/src/KWSys/System.h.in |    9 +-
 .../KWSys/src/KWSys/SystemInformation.cxx          |   58 +-
 .../ThirdParty/KWSys/src/KWSys/SystemTools.cxx     |   11 +-
 .../Modules/ThirdParty/KWSys/src/KWSys/Terminal.c  |    1 +
 .../ThirdParty/KWSys/src/KWSys/hashtable.hxx.in    |   11 +-
 .../ThirdParty/KWSys/src/KWSys/testEncoding.cxx    |   42 +-
 .../ThirdParty/KWSys/src/KWSys/testFStream.cxx     |  190 +
 .../Netlib/src/netlib/slatec/CMakeLists.txt        |   14 +-
 .../config/vxl_shared_link_test/CMakeLists.txt     |   10 +-
 .../src/vxl/core/vnl/algo/tests/test_sparse_lm.cxx |    2 +-
 .../VNL/src/vxl/core/vnl/algo/vnl_lbfgsb.cxx       |    2 +-
 .../VNL/src/vxl/core/vnl/vnl_diag_matrix.h         |   11 +-
 .../ITK/Modules/ThirdParty/ZLIB/CMakeLists.txt     |    8 +-
 .../ThirdParty/ZLIB/src/itkzlib/CMakeLists.txt     |   32 +-
 .../Modules/ThirdParty/pygccxml/src/README-ITK.txt |   15 +
 .../ThirdParty/pygccxml/src}/pygccxml/__init__.py  |    0
 .../pygccxml/src/pygccxml/declarations/__init__.py |  345 ++
 .../src}/pygccxml/declarations/algorithm.py        |    0
 .../src/pygccxml/declarations/algorithms_cache.py  |  147 +
 .../src/pygccxml/declarations/call_invocation.py   |   78 +
 .../pygccxml/src/pygccxml/declarations/calldef.py  |  561 +++
 .../src/pygccxml/declarations/class_declaration.py |  532 +++
 .../src}/pygccxml/declarations/compilers.py        |    0
 .../src/pygccxml/declarations/container_traits.py  |  487 +++
 .../src}/pygccxml/declarations/cpptypes.py         |    0
 .../src}/pygccxml/declarations/decl_factory.py     |    0
 .../src}/pygccxml/declarations/decl_printer.py     |    0
 .../src/pygccxml/declarations/decl_visitor.py      |   56 +
 .../src/pygccxml/declarations/declaration.py       |  277 ++
 .../src/pygccxml/declarations/dependencies.py      |   61 +
 .../src/pygccxml/declarations/enumeration.py       |  138 +
 .../src}/pygccxml/declarations/filtering.py        |    0
 .../src/pygccxml/declarations/function_traits.py   |   92 +
 .../pygccxml/src}/pygccxml/declarations/matcher.py |    0
 .../pygccxml/src/pygccxml/declarations/matchers.py |  527 +++
 .../src/pygccxml/declarations/mdecl_wrapper.py     |   96 +
 .../src/pygccxml/declarations/namespace.py         |  144 +
 .../src/pygccxml/declarations/pattern_parser.py    |  140 +
 .../pygccxml/src/pygccxml/declarations/scopedef.py |  655 ++++
 .../src/pygccxml/declarations/templates.py         |   76 +
 .../src/pygccxml/declarations/type_traits.py       | 1101 ++++++
 .../src/pygccxml/declarations/type_visitor.py      |  132 +
 .../pygccxml/src}/pygccxml/declarations/typedef.py |    0
 .../pygccxml/src/pygccxml/declarations/variable.py |   82 +
 .../pygccxml/src}/pygccxml/msvc/__init__.py        |    0
 .../pygccxml/src}/pygccxml/msvc/bsc/__init__.py    |    0
 .../pygccxml/src}/pygccxml/msvc/bsc/c_wrapper.py   |    0
 .../pygccxml/src}/pygccxml/msvc/common_utils.py    |    0
 .../pygccxml/src}/pygccxml/msvc/config.py          |    0
 .../pygccxml/src/pygccxml/msvc/pdb/__init__.py     |   25 +
 .../pygccxml/src/pygccxml/msvc/pdb/enums.py        |   60 +
 .../src}/pygccxml/msvc/pdb/impl_details.py         |    0
 .../pygccxml/src/pygccxml/msvc/pdb/kb.txt          |   17 +
 .../pygccxml/src}/pygccxml/msvc/pdb/loader.py      |    0
 .../pygccxml/src/pygccxml/parser/__init__.py       |   61 +
 .../pygccxml/src/pygccxml/parser/config.py         |  191 +
 .../src/pygccxml/parser/declarations_cache.py      |  237 ++
 .../src/pygccxml/parser/directory_cache.py         |  528 +++
 .../pygccxml/src}/pygccxml/parser/etree_scanner.py |    0
 .../pygccxml/src/pygccxml/parser/linker.py         |  272 ++
 .../pygccxml/src/pygccxml/parser/patcher.py        |  189 +
 .../src}/pygccxml/parser/project_reader.py         |    0
 .../pygccxml/src/pygccxml/parser/scanner.py        |  539 +++
 .../pygccxml/src/pygccxml/parser/source_reader.py  |  346 ++
 .../pygccxml/src/pygccxml/utils/__init__.py        |  156 +
 .../pygccxml/src/pygccxml/utils/fs_utils.py        |  136 +
 .../ITK/Modules/Video/Core/include/itkRingBuffer.h |    2 +-
 .../Modules/Video/Core/include/itkRingBuffer.hxx   |    2 +-
 .../Video/Core/include/itkTemporalDataObject.h     |   14 +-
 .../Video/Core/include/itkTemporalProcessObject.h  |   14 +-
 .../Modules/Video/Core/include/itkTemporalRegion.h |    4 +-
 .../Modules/Video/Core/include/itkVideoSource.h    |    8 +-
 .../Modules/Video/Core/include/itkVideoSource.hxx  |    4 +-
 .../Modules/Video/Core/include/itkVideoStream.h    |    4 +-
 .../Video/Core/src/itkTemporalDataObject.cxx       |    2 -
 .../include/itkImageFilterToVideoFilterWrapper.hxx |    2 +-
 .../Modules/Video/IO/include/itkFileListVideoIO.h  |   36 +-
 .../Video/IO/include/itkFileListVideoIOFactory.h   |    4 +-
 .../Video/IO/include/itkVideoFileReader.hxx        |    2 +-
 .../Modules/Video/IO/include/itkVideoFileWriter.h  |    8 +-
 .../Video/IO/include/itkVideoFileWriter.hxx        |   21 +-
 .../ITK/Modules/Video/IO/include/itkVideoIOBase.h  |    2 +-
 .../Modules/Video/IO/src/itkFileListVideoIO.cxx    |    2 +-
 .../ITK/Modules/Video/IO/src/itkVideoIOBase.cxx    |   12 +-
 .../ITK/Modules/Video/IO/src/itkVideoIOFactory.cxx |    2 +-
 Utilities/ITK/README.OTB.txt                       |   79 -
 Utilities/ITK/Utilities/Doxygen/CMakeLists.txt     |   17 +-
 Utilities/ITK/Utilities/Doxygen/doxygen.config.in  |    8 +-
 Utilities/ITK/Utilities/KWStyle/KWStyle.cmake      |   75 +-
 .../Utilities/Maintenance/ArchiveTestingData.py    |    2 +
 .../ITK/Utilities/Maintenance/BuildHeaderTest.py   |    2 +
 .../Maintenance/BuildKWStyle/CMakeLists.txt        |    1 +
 .../Maintenance/FindRedundantHeaderIncludes.py     |   12 +-
 Utilities/ITK/Utilities/Maintenance/JREUpdate.py   |    2 +
 .../ITK/Utilities/Maintenance/StripIncludes.py     |    5 +-
 .../Maintenance/UpdateCopyrightStatementsInITK.py  |    7 +-
 Utilities/ITK/Utilities/Maintenance/VerifyURLs.py  |   30 +-
 .../Utilities/Maintenance/VisualizeTestTimes.py    |    2 +
 .../ITK/Utilities/Maintenance/WhatModulesITK.py    |   23 +-
 Utilities/ITK/Wrapping/CMakeLists.txt              |   30 +-
 Utilities/ITK/Wrapping/ConfigureWrapping.cmake     |   16 -
 Utilities/ITK/Wrapping/Generators/Doc/doxy2swig.py |    5 +-
 .../ITK/Wrapping/Generators/Doc/doxygen.config.in  |    2 +-
 .../ITK/Wrapping/Generators/Doc/itk_doxy2swig.py   |   15 +-
 .../ITK/Wrapping/Generators/GccXML/CMakeLists.txt  |   12 +-
 .../ITK/Wrapping/Generators/Java/itkCommand.i      |    2 +-
 .../ITK/Wrapping/Generators/Java/itkJavaCommand.i  |    2 +-
 .../ITK/Wrapping/Generators/Python/CMakeLists.txt  |  257 +-
 .../Generators/Python/InsightToolkit.py.in         |    6 -
 .../Generators/Python/PyUtils/itkPyCommand.cxx     |    2 +-
 .../Generators/Python/PyUtils/itkPyImageFilter.hxx |    2 +-
 .../Python/Tests/AntiAliasBinaryImageFilter.py     |   59 +-
 .../Python/Tests/BinaryDilateImageFilter.py        |   40 +-
 .../Python/Tests/BinaryErodeImageFilter.py         |   40 +-
 .../Python/Tests/BinaryThresholdImageFilter.py     |   42 +-
 .../Python/Tests/BoxGrayscaleDilateImageFilter.py  |    8 +-
 .../Generators/Python/Tests/CMakeLists.txt         |   10 +
 .../Python/Tests/CannyEdgeDetectionImageFilter.py  |   25 +-
 .../Generators/Python/Tests/CastImageFilter.py     |    6 +-
 .../CurvatureAnisotropicDiffusionImageFilter.py    |   19 +-
 .../Python/Tests/CurvatureFlowImageFilter.py       |   15 +-
 .../Generators/Python/Tests/FFTImageFilter.py      |   29 +-
 .../Python/Tests/FastMarchingImageFilter.py        |  151 +-
 .../Python/Tests/FlatStructuringElement.py         |   36 +-
 .../Tests/GeodesicActiveContourImageFilter.py      |  145 +-
 .../GradientAnisotropicDiffusionImageFilter.py     |   25 +-
 ...radientMagnitudeRecursiveGaussianImageFilter.py |   18 +-
 .../Python/Tests/GrayscaleDilateImageFilter.py     |   38 +-
 .../Python/Tests/GrayscaleErodeImageFilter.py      |   38 +-
 .../Python/Tests/LaplacianImageFilter.py           |   10 +-
 .../Generators/Python/Tests/MeanImageFilter.py     |   25 +-
 .../Generators/Python/Tests/MedianImageFilter.py   |   10 +-
 .../Tests/OldStyleBinaryDilateImageFilter.py       |   32 +-
 .../Generators/Python/Tests/ReadDicomAndReadTag.py |   68 +
 .../Generators/Python/Tests/ResampleImageFilter.py |   66 +-
 .../Generators/Python/Tests/SigmoidImageFilter.py  |   16 +-
 .../Tests/SmoothingRecursiveGaussianImageFilter.py |    8 +-
 .../Generators/Python/Tests/SpatialObjectTest.py   |   39 +-
 .../StrelFromImageGrayscaleDilateImageFilter.py    |   14 +-
 .../Generators/Python/Tests/TestDirectory.py       |    6 +-
 .../Python/Tests/TestMetaDataDictionary.py         |   10 +-
 .../Python/Tests/ThresholdImageFilter.py           |   10 +-
 .../ThresholdSegmentationLevelSetImageFilter.py    |   93 +-
 .../Python/Tests/WatershedSegmentation1.py         |   12 +-
 .../Generators/Python/Tests/auto_pipeline.py       |   28 +-
 .../ITK/Wrapping/Generators/Python/Tests/extras.py |   42 +-
 .../Generators/Python/Tests/findEmptyClasses.py    |  124 +-
 .../Generators/Python/Tests/findSegfaults.py       |   79 +-
 .../Generators/Python/Tests/getNameOfClass.py      |   82 +-
 .../Generators/Python/Tests/module2module.py       |  129 +-
 .../Python/Tests/notYetUsable/DicomSliceRead.py    |   14 +-
 .../Tests/notYetUsable/ImageRegistration3.py       |   74 +-
 .../Tests/notYetUsable/ImageRegistration4.py       |   78 +-
 .../Tests/notYetUsable/ImageRegistration5.py       |  110 +-
 .../Python/Tests/notYetUsable/ImageToArray.py      |    8 +-
 .../Tests/notYetUsable/VoronoiSegmentation.py      |   18 +-
 .../notYetUsable/itkCurvatureFlowTestPython2.py    |  141 +-
 .../Generators/Python/Tests/pythonTestDriver.py.in |    6 +-
 .../Python/Tests/returnedTypeCoverage.py           |  355 +-
 .../Generators/Python/Tests/simple_pipeline.py     |    3 +-
 .../Wrapping/Generators/Python/Tests/template.py   |   54 +-
 .../Generators/Python/Tests/templated_pipeline.py  |  101 +-
 .../ITK/Wrapping/Generators/Python/Tests/timing.py |   91 +-
 .../Wrapping/Generators/Python/Tests/typemaps.py   |   62 +-
 .../Generators/Python/Tests/wrappingCoverage.py    |  111 +-
 .../ITK/Wrapping/Generators/Python/WrapITK.pth.in  |    1 +
 .../Generators/Python/WrapITKBuildOptionsConfig.py |   28 +-
 Utilities/ITK/Wrapping/Generators/Python/itk.py    |   80 +-
 .../ITK/Wrapping/Generators/Python/itkBase.py      |  425 +--
 .../ITK/Wrapping/Generators/Python/itkData.py      |   42 +
 .../ITK/Wrapping/Generators/Python/itkExtras.py    | 1035 ++++++
 .../Generators/Python/itkExtras/CMakeLists.txt     |   50 -
 .../Generators/Python/itkExtras/__init__.py        | 1029 ------
 .../ITK/Wrapping/Generators/Python/itkLazy.py      |   49 +-
 .../ITK/Wrapping/Generators/Python/itkTemplate.py  |  691 ++--
 .../ITK/Wrapping/Generators/Python/itkTesting.py   |   63 +
 .../ITK/Wrapping/Generators/Python/itkTypes.py     |   59 +-
 .../ITK/Wrapping/Generators/Python/itkdata.py      |   42 -
 .../ITK/Wrapping/Generators/Python/itktesting.py   |   61 -
 .../ITK/Wrapping/Generators/Python/module_ext.i.in |    7 +-
 .../Wrapping/Generators/Ruby/Tests/CMakeLists.txt  |    3 -
 .../Ruby/Tests/notYetUsable/DicomSliceRead.py      |   32 -
 .../Ruby/Tests/notYetUsable/ImageRegistration3.py  |  139 -
 .../Ruby/Tests/notYetUsable/ImageRegistration4.py  |  142 -
 .../Ruby/Tests/notYetUsable/ImageRegistration5.py  |  161 -
 .../Ruby/Tests/notYetUsable/ImageToArray.py        |   25 -
 .../Ruby/Tests/notYetUsable/VoronoiSegmentation.py |   31 -
 .../notYetUsable/itkCurvatureFlowTestPython2.py    |   93 -
 .../Generators/Ruby/Tests/pythonTestDriver.py.in   |   76 -
 .../Generators/SwigInterface/CMakeLists.txt        |   63 +-
 .../ITK/Wrapping/Generators/SwigInterface/idx.py   |   63 +-
 .../Generators/SwigInterface/igenerator.py         | 1235 ++++---
 .../SwigInterface/pygccxml-1.0.0/LICENSE_1_0.txt   |   23 -
 .../SwigInterface/pygccxml-1.0.0/MANIFEST          |  553 ---
 .../SwigInterface/pygccxml-1.0.0/PKG-INFO          |   10 -
 .../SwigInterface/pygccxml-1.0.0/README.txt        |   39 -
 .../SwigInterface/pygccxml-1.0.0/announcement.txt  |   43 -
 .../pygccxml/declarations/__init__.py              |  337 --
 .../pygccxml/declarations/algorithms_cache.py      |  146 -
 .../pygccxml/declarations/call_invocation.py       |   78 -
 .../pygccxml/declarations/calldef.py               |  561 ---
 .../pygccxml/declarations/class_declaration.py     |  532 ---
 .../pygccxml/declarations/container_traits.py      |  485 ---
 .../pygccxml/declarations/decl_visitor.py          |   56 -
 .../pygccxml/declarations/declaration.py           |  277 --
 .../pygccxml/declarations/dependencies.py          |   61 -
 .../pygccxml/declarations/enumeration.py           |  137 -
 .../pygccxml/declarations/function_traits.py       |   89 -
 .../pygccxml/declarations/matchers.py              |  527 ---
 .../pygccxml/declarations/mdecl_wrapper.py         |   96 -
 .../pygccxml/declarations/namespace.py             |  144 -
 .../pygccxml/declarations/pattern_parser.py        |  137 -
 .../pygccxml/declarations/scopedef.py              |  650 ----
 .../pygccxml/declarations/templates.py             |   76 -
 .../pygccxml/declarations/type_traits.py           | 1093 ------
 .../pygccxml/declarations/type_visitor.py          |  131 -
 .../pygccxml/declarations/variable.py              |   82 -
 .../pygccxml/msvc/bsc_impl_details.py              |  568 ---
 .../pygccxml-1.0.0/pygccxml/msvc/pdb/__init__.py   |   24 -
 .../pygccxml-1.0.0/pygccxml/msvc/pdb/enums.py      |   59 -
 .../pygccxml-1.0.0/pygccxml/msvc/pdb/kb.txt        |   16 -
 .../pygccxml-1.0.0/pygccxml/parser/__init__.py     |   61 -
 .../pygccxml-1.0.0/pygccxml/parser/config.py       |  192 -
 .../pygccxml/parser/declarations_cache.py          |  240 --
 .../pygccxml/parser/directory_cache.py             |  531 ---
 .../pygccxml-1.0.0/pygccxml/parser/linker.py       |  271 --
 .../pygccxml-1.0.0/pygccxml/parser/patcher.py      |  188 -
 .../pygccxml-1.0.0/pygccxml/parser/scanner.py      |  539 ---
 .../pygccxml/parser/source_reader.py               |  345 --
 .../pygccxml-1.0.0/pygccxml/utils/__init__.py      |  156 -
 .../pygccxml-1.0.0/pygccxml/utils/fs_utils.py      |  136 -
 .../SwigInterface/pygccxml-1.0.0/setup.py          |   68 -
 .../Generators/Tcl/CreateLanguageSupport.cmake     |    2 +-
 .../ITK/Wrapping/Generators/Tcl/TCLGetInterp.i     |    2 +-
 Utilities/ITK/Wrapping/TypedefMacros.cmake         |  203 +-
 Utilities/ITK/Wrapping/WrapITKConfig.cmake.in      |    5 -
 Utilities/ITK/Wrapping/WrapITKTypes.cmake          |   52 +-
 Utilities/ITK/Wrapping/itkWrapSetup.cmake          |   22 +-
 Utilities/otbkml/CMakeLists.txt                    |    4 +-
 Utilities/otbkml/src/kml/base/file_win32.cc        |    8 +-
 Utilities/otbmuparser/muParserBytecode.cpp         |    1 +
 Utilities/otbopenjpeg/libopenjpeg/openjpeg.c       |    2 +-
 Utilities/otbopenjpeg/libopenjpeg/openjpeg.h       |    2 +-
 .../include/ossim/projection/ossimRS1SarModel.h    |   28 +-
 .../otbossim/src/ossim/imaging/ossimTiling.cpp     |    3 +-
 .../projection/ossimNitfProjectionFactory.cpp      |   16 +-
 .../ossim/ossimPleiadesDimapSupportData.cpp        |  299 +-
 .../ossim/ossimPleiadesDimapSupportData.h          |   27 +-
 .../ossim/ossimPluginProjectionFactory.cpp         |   88 +-
 .../ossim/ossimSpot6DimapSupportData.cpp           | 2217 +++++++++++
 .../ossim/ossimSpot6DimapSupportData.h             |  350 ++
 .../otbossimplugins/ossim/ossimSpot6Model.cpp      |  372 ++
 Utilities/otbossimplugins/ossim/ossimSpot6Model.h  |  114 +
 Utilities/otbsiftfast/libsiftfast.cpp              |    4 +-
 2963 files changed, 49797 insertions(+), 28658 deletions(-)

diff --git a/.hg_archival.txt b/.hg_archival.txt
index 87f550f..942c344 100644
--- a/.hg_archival.txt
+++ b/.hg_archival.txt
@@ -1,5 +1,4 @@
 repo: aba0c56ceeda5161830c14bced82592ab71dfb9b
-node: ca1f99db3ad5ca32e71f31b53c721ab9df7262cf
+node: af1ee118977e739e8961661141a410295a04324d
 branch: default
-latesttag: 4.0-rc1
-latesttagdistance: 1
+tag: 4.2.1
diff --git a/.hgtags b/.hgtags
index dd3aa1f..6a3a8f0 100644
--- a/.hgtags
+++ b/.hgtags
@@ -50,3 +50,6 @@ ad4afc38975a41aad0f9b506777ff2339135d299 3.14.1
 02113d4594c59f9951635643416d0b232b8a5c6f 3.20-rc1
 3e7a91d3fbe595170753ce018a193dd28aef26af 3.20.0
 9cafe3e2dc540f6008f86da44e5e37d95318380f 4.0-rc1
+8c14c4efeaec0e37b0213b367c5a9997751e3e2a 4.0.0
+97b540d916d7961a9f62b1c8d0192ebb889ad675 4.2-rc1
+7db1f09e3054e73c663802624b69a7564e1396b2 4.2.0
diff --git a/Applications/CMakeLists.txt b/Applications/CMakeLists.txt
index 7dc4e85..af8aa1d 100644
--- a/Applications/CMakeLists.txt
+++ b/Applications/CMakeLists.txt
@@ -10,6 +10,7 @@ add_subdirectory(ChangeDetection)
 add_subdirectory(Classification)
 add_subdirectory(DisparityMap)
 add_subdirectory(FeatureExtraction)
+add_subdirectory(Filtering)
 add_subdirectory(Fusion)
 add_subdirectory(Hyperspectral)
 add_subdirectory(Projections)
@@ -18,3 +19,4 @@ add_subdirectory(Rasterization)
 add_subdirectory(Segmentation)
 add_subdirectory(Test)
 add_subdirectory(Utils)
+
diff --git a/Applications/Classification/otbComputeConfusionMatrix.cxx b/Applications/Classification/otbComputeConfusionMatrix.cxx
index 3968684..1912f50 100644
--- a/Applications/Classification/otbComputeConfusionMatrix.cxx
+++ b/Applications/Classification/otbComputeConfusionMatrix.cxx
@@ -216,7 +216,7 @@ private:
 
   void DoExecute()
   {
-    Int32ImageType* input = this->GetParameterImage<Int32ImageType> ("in");
+    Int32ImageType* input = this->GetParameterInt32Image("in");
 
     std::string field;
     int nodata = this->GetParameterInt("nodatalabel");
@@ -228,7 +228,7 @@ private:
 
     if (GetParameterString("ref") == "raster")
       {
-      reference = this->GetParameterImage<Int32ImageType> ("ref.raster.in");
+      reference = this->GetParameterInt32Image("ref.raster.in");
       }
     else
       {
diff --git a/Applications/Classification/otbSOMClassification.cxx b/Applications/Classification/otbSOMClassification.cxx
index 6260b48..5f4bebf 100644
--- a/Applications/Classification/otbSOMClassification.cxx
+++ b/Applications/Classification/otbSOMClassification.cxx
@@ -188,7 +188,7 @@ private:
     m_UseMask = false;
     if (HasValue("vm"))
     {
-      mask = GetParameterImage<LabeledImageType>("vm");
+      mask = GetParameterUInt16Image("vm");
       if (input->GetLargestPossibleRegion()
         != mask->GetLargestPossibleRegion())
         {
diff --git a/Applications/DisparityMap/otbBlockMatching.cxx b/Applications/DisparityMap/otbBlockMatching.cxx
index 075a6bf..5f2bc6c 100644
--- a/Applications/DisparityMap/otbBlockMatching.cxx
+++ b/Applications/DisparityMap/otbBlockMatching.cxx
@@ -470,7 +470,7 @@ private:
     rightBandMathExpression << "if(" << rightBandMathCondition.str() << "," << state << "," << elseState << ")";
     #endif
 
-    std::cout << leftBandMathCondition << std::endl;
+    std::cout << leftBandMathCondition.str() << std::endl;
     if(maskingLeft)
       {
       GetLogger()->Info("Masking criterion on left image: " + leftBandMathExpression.str() + '\n');
diff --git a/Applications/DisparityMap/otbGeneratePlyFile.cxx b/Applications/DisparityMap/otbGeneratePlyFile.cxx
index e1a64b8..12fc7ad 100644
--- a/Applications/DisparityMap/otbGeneratePlyFile.cxx
+++ b/Applications/DisparityMap/otbGeneratePlyFile.cxx
@@ -98,10 +98,10 @@ private:
   {
     std::string outfname = GetParameterString("out");
 
-    FloatVectorImageType::Pointer demPtr = this->GetParameterImage<FloatVectorImageType>("indem");
+    FloatVectorImageType::Pointer demPtr = this->GetParameterImage("indem");
     demPtr->Update();
 
-    FloatVectorImageType::Pointer colorPtr = this->GetParameterImage<FloatVectorImageType>("incolor");
+    FloatVectorImageType::Pointer colorPtr = this->GetParameterImage("incolor");
 
     // First, find the footprint in the color image
 
@@ -109,6 +109,9 @@ private:
     it.GoToBegin();
 
     FloatImageType::IndexType lr, ul;
+    typedef FloatImageType::IndexType::IndexValueType IndexValueType;
+    lr.Fill(itk::NumericTraits<IndexValueType>::Zero);
+    ul.Fill(itk::NumericTraits<IndexValueType>::Zero);
 
     bool firstLoop = true;
 
diff --git a/Applications/DisparityMap/otbStereoFramework.cxx b/Applications/DisparityMap/otbStereoFramework.cxx
index 7f9877e..c54eb13 100644
--- a/Applications/DisparityMap/otbStereoFramework.cxx
+++ b/Applications/DisparityMap/otbStereoFramework.cxx
@@ -545,8 +545,6 @@ private:
                              TMetricFunctor>*subPixelFilter, TInputImage * leftImage, TInputImage * rightImage,TInputImage * leftMask,TInputImage * rightMask,TInputImage * finalMask, const bool minimize,double minDisp,double maxDisp)
     {
     typedef TMetricFunctor MetricFunctorType;
-    typedef otb::PixelWiseBlockMatchingImageFilter<TInputImage, TInputImage, TInputImage, TInputImage,
-        MetricFunctorType> BlockMatchingFilterType;
     typedef otb::SubPixelDisparityImageFilter<TInputImage, TInputImage, TInputImage, TInputImage, MetricFunctorType>
         SubPixelFilterType;
 
diff --git a/Applications/FeatureExtraction/otbDimensionalityReduction.cxx b/Applications/FeatureExtraction/otbDimensionalityReduction.cxx
index 87dd730..0e9dffd 100644
--- a/Applications/FeatureExtraction/otbDimensionalityReduction.cxx
+++ b/Applications/FeatureExtraction/otbDimensionalityReduction.cxx
@@ -182,7 +182,7 @@ private:
   {
               if (HasValue("in"))
               {
-                     FloatVectorImageType::Pointer inImage = this->GetParameterImage<FloatVectorImageType> ("in");
+                     FloatVectorImageType::Pointer inImage = this->GetParameterImage("in");
                      inImage->UpdateOutputInformation();
 
                      // Update the values of the channels to be selected
@@ -211,7 +211,7 @@ private:
                      }
                      this->DisableParameter("outmatrix");
 
-                     FloatVectorImageType::Pointer inImage = this->GetParameterImage<FloatVectorImageType> ("in");
+                     FloatVectorImageType::Pointer inImage = this->GetParameterImage("in");
                      inImage->UpdateOutputInformation();
 
                      // Update the values of the channels to be selected
@@ -234,7 +234,7 @@ private:
     bool normalize = IsParameterEnabled("normalize");
     bool rescale = IsParameterEnabled("rescale");
 
-    bool invTransform = HasValue("outinv");
+    bool invTransform = HasValue("outinv") && IsParameterEnabled("outinv");
     switch (GetParameterInt("method"))
       {
       // PCA Algorithm
diff --git a/Applications/FeatureExtraction/otbHaralickTextureExtraction.cxx b/Applications/FeatureExtraction/otbHaralickTextureExtraction.cxx
index 21c4bd2..d7664f2 100644
--- a/Applications/FeatureExtraction/otbHaralickTextureExtraction.cxx
+++ b/Applications/FeatureExtraction/otbHaralickTextureExtraction.cxx
@@ -28,8 +28,6 @@
 #include "otbImageList.h"
 #include "otbImageListToVectorImageFilter.h"
 
-#include "itkTimeProbe.h"
-
 namespace otb
 {
 namespace Wrapper
@@ -239,6 +237,7 @@ void DoExecute()
     m_AdvTexFilter->SetNumberOfBinsPerAxis(GetParameterInt("parameters.nbbin"));
     m_AdvImageList->PushBack(m_AdvTexFilter->GetMeanOutput());
     m_AdvImageList->PushBack(m_AdvTexFilter->GetVarianceOutput());
+    m_AdvImageList->PushBack(m_AdvTexFilter->GetDissimilarityOutput());
     m_AdvImageList->PushBack(m_AdvTexFilter->GetSumAverageOutput());
     m_AdvImageList->PushBack(m_AdvTexFilter->GetSumVarianceOutput());
     m_AdvImageList->PushBack(m_AdvTexFilter->GetSumEntropyOutput());
diff --git a/Applications/FeatureExtraction/otbHomologousPointsExtraction.cxx b/Applications/FeatureExtraction/otbHomologousPointsExtraction.cxx
index bf3c5f5..5b96afa 100644
--- a/Applications/FeatureExtraction/otbHomologousPointsExtraction.cxx
+++ b/Applications/FeatureExtraction/otbHomologousPointsExtraction.cxx
@@ -146,17 +146,33 @@ private:
     SetParameterDescription("mode.full","Extract and match all keypoints, loading both images entirely into memory");
 
     AddChoice("mode.geobins","Search keypoints in small spatial bins regularly spread accross first image");
-    SetParameterDescription("mode.geobins","This method allows to retrieve a set of tie points regulary spread accross image 1. Corresponding bins in image 2 are retrieved using sensor and geographical information if available.");
+    SetParameterDescription("mode.geobins","This method allows to retrieve a set of tie points regulary spread accross image 1. Corresponding bins in image 2 are retrieved using sensor and geographical information if available. The first bin position takes into account the margin parameter. Bins are cropped to the largest image region shrinked by the margin parameter for both in1 and in2 images.");
+    
     AddParameter(ParameterType_Int,"mode.geobins.binsize","Size of bin");
     SetParameterDescription("mode.geobins.binsize","Radius of the spatial bin in pixels");
     SetDefaultParameterInt("mode.geobins.binsize",256);
     SetMinimumParameterIntValue("mode.geobins.binsize",1);
 
+    AddParameter(ParameterType_Int,"mode.geobins.binsizey","Size of bin (y direction)");
+    SetParameterDescription("mode.geobins.binsizey","Radius of the spatial bin in pixels (y direction). If not set, the mode.geobins.binsize value is used.");
+    SetMinimumParameterIntValue("mode.geobins.binsizey",1);
+    MandatoryOff("mode.geobins.binsizey");
+    
     AddParameter(ParameterType_Int,"mode.geobins.binstep","Steps between bins");
     SetParameterDescription("mode.geobins.binstep","Steps between bins in pixels");
     SetDefaultParameterInt("mode.geobins.binstep",256);
     SetMinimumParameterIntValue("mode.geobins.binstep",1);
 
+    AddParameter(ParameterType_Int,"mode.geobins.binstepy","Steps between bins (y direction)");
+    SetParameterDescription("mode.geobins.binstepy","Steps between bins in pixels (y direction). If not set, the mode.geobins.binstep value is used.");
+    SetMinimumParameterIntValue("mode.geobins.binstepy",1);
+    MandatoryOff("mode.geobins.binstepy");
+
+    AddParameter(ParameterType_Int,"mode.geobins.margin","Margin from image border to start/end bins (in pixels)");
+    SetParameterDescription("mode.geobins.margin","Margin from image border to start/end bins (in pixels)");
+    SetMinimumParameterIntValue("mode.geobins.margin",0);
+    SetDefaultParameterInt("mode.geobins.margin",10);
+
     AddParameter(ParameterType_Float,"precision","Estimated precision of the colocalisation function (in pixels).");
     SetParameterDescription("precision","Estimated precision of the colocalisation function in pixels");
     SetDefaultParameterFloat("precision",0.);
@@ -360,10 +376,26 @@ private:
       {
       // Compute binning on first image
       FloatImageType::SizeType size = this->GetParameterImage("in1")->GetLargestPossibleRegion().GetSize();
-      unsigned int bin_size = GetParameterInt("mode.geobins.binsize");
-      unsigned int bin_step = GetParameterInt("mode.geobins.binstep");
-      unsigned int nb_bins_x = size[0]/(bin_size + bin_step);
-      unsigned int nb_bins_y = size[1]/(bin_size + bin_step);
+      unsigned int bin_size_x = GetParameterInt("mode.geobins.binsize");
+      unsigned int bin_size_y = bin_size_x;
+
+      unsigned int image_border_margin = GetParameterInt("mode.geobins.margin");
+
+      if(IsParameterEnabled("mode.geobins.binsizey"))
+        {
+        bin_size_y = GetParameterInt("mode.geobins.binsizey");
+        }
+      
+      unsigned int bin_step_x = GetParameterInt("mode.geobins.binstep");
+      unsigned int bin_step_y = bin_step_x;
+
+      if(IsParameterEnabled("mode.geobins.binstepy"))
+        {
+        bin_step_y = GetParameterInt("mode.geobins.binstepy");
+        }
+      
+      unsigned int nb_bins_x = static_cast<unsigned int>(vcl_ceil(static_cast<float>(size[0]-2*image_border_margin)/(bin_size_x + bin_step_x)));
+      unsigned int nb_bins_y = static_cast<unsigned int>(vcl_ceil(static_cast<float>(size[1]-2*image_border_margin)/(bin_size_y + bin_step_y)));
 
       FloatImageType::SpacingType spacing1 = this->GetParameterImage("in1")->GetSpacing();
       FloatImageType::PointType origin1 = this->GetParameterImage("in1")->GetOrigin();
@@ -374,8 +406,8 @@ private:
         {
         for(unsigned int j = 0; j<nb_bins_y; ++j)
           {
-          unsigned int startx = bin_step/2 + i*(bin_size + bin_step);
-          unsigned int starty = bin_step/2 + j*(bin_size + bin_step);
+          unsigned int startx = image_border_margin + i*(bin_size_x + bin_step_x);
+          unsigned int starty = image_border_margin + j*(bin_size_y + bin_step_y);
 
 
           FloatImageType::SizeType size1;
@@ -384,13 +416,16 @@ private:
 
           index1[0]=startx;
           index1[1]=starty;
-          size1[0] = bin_size;
-          size1[1] = bin_size;
+          size1[0] = bin_size_x;
+          size1[1] = bin_size_y;
 
           region1.SetIndex(index1);
           region1.SetSize(size1);
 
-          region1.Crop(this->GetParameterImage("in1")->GetLargestPossibleRegion());
+          FloatImageType::RegionType largestRegion = this->GetParameterImage("in1")->GetLargestPossibleRegion();
+
+          largestRegion.ShrinkByRadius(image_border_margin);
+          region1.Crop(largestRegion);
 
           otbAppLogINFO("("<<i+1<<"/"<<nb_bins_x<<", "<<j+1<<"/"<<nb_bins_y<<") Considering region1 : "<<region1.GetIndex()<<", "<<region1.GetSize());
 
@@ -405,14 +440,14 @@ private:
           ul1[0] = origin1[0] + startx * spacing1[0];
           ul1[1] = origin1[1] + starty * spacing1[1];
 
-          ur1[0] = origin1[0] + (startx+bin_size) * spacing1[0];
+          ur1[0] = origin1[0] + (startx+bin_size_x) * spacing1[0];
           ur1[1] = origin1[1] + starty * spacing1[1];
 
-          lr1[0] = origin1[0] + (startx+bin_size) * spacing1[0];
-          lr1[1] = origin1[1] + (starty+bin_size) * spacing1[1];
+          lr1[0] = origin1[0] + (startx+bin_size_x) * spacing1[0];
+          lr1[1] = origin1[1] + (starty+bin_size_y) * spacing1[1];
 
           ll1[0] = origin1[0] + (startx) * spacing1[0];
-          ll1[1] = origin1[1] + (starty+bin_size) * spacing1[1];
+          ll1[1] = origin1[1] + (starty+bin_size_y) * spacing1[1];
 
           p1 = rsTransform->TransformPoint(ul1);
           p2 = rsTransform->TransformPoint(ur1);
@@ -444,7 +479,10 @@ private:
           region2.SetSize(size2);
           region2.PadByRadius(static_cast<unsigned int>(GetParameterInt("precision")));
 
-          if(region2.Crop(this->GetParameterImage("in2")->GetLargestPossibleRegion()))
+          FloatImageType::RegionType largestRegion2 = this->GetParameterImage("in2")->GetLargestPossibleRegion();
+          largestRegion2.ShrinkByRadius(image_border_margin);
+
+          if(region2.Crop(largestRegion2))
             {
             otbAppLogINFO("Corresponding region2 is "<<region2.GetIndex()<<", "<<region2.GetSize());
 
diff --git a/Applications/Filtering/CMakeLists.txt b/Applications/Filtering/CMakeLists.txt
new file mode 100644
index 0000000..67f3812
--- /dev/null
+++ b/Applications/Filtering/CMakeLists.txt
@@ -0,0 +1,5 @@
+OTB_CREATE_APPLICATION(NAME           Despeckle
+                       SOURCES        otbDespeckle.cxx
+                       LINK_LIBRARIES OTBIO;OTBCommon;OTBBasicFilters)
+
+
diff --git a/Applications/Filtering/otbDespeckle.cxx b/Applications/Filtering/otbDespeckle.cxx
new file mode 100644
index 0000000..63b4a10
--- /dev/null
+++ b/Applications/Filtering/otbDespeckle.cxx
@@ -0,0 +1,178 @@
+/*=========================================================================
+
+ Program:   ORFEO Toolbox
+ Language:  C++
+ Date:      $Date$
+ Version:   $Revision$
+
+
+ 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
+ PURPOSE.  See the above copyright notices for more information.
+
+ =========================================================================*/
+#include "otbWrapperApplication.h"
+#include "otbWrapperApplicationFactory.h"
+
+#include "otbFrostImageFilter.h"
+#include "otbLeeImageFilter.h"
+#include "otbMultiToMonoChannelExtractROI.h"
+
+namespace otb
+{
+namespace Wrapper
+{
+
+class Despeckle : public Application
+{
+public:
+  /** Standard class typedefs. */
+  typedef Despeckle                           Self;
+  typedef Application                         Superclass;
+  typedef itk::SmartPointer<Self>             Pointer;
+  typedef itk::SmartPointer<const Self>       ConstPointer;
+
+  typedef itk::ImageToImageFilter<FloatImageType, FloatImageType> SpeckleFilterType;
+
+  typedef LeeImageFilter<FloatImageType, FloatImageType>   LeeFilterType;
+  typedef FrostImageFilter<FloatImageType, FloatImageType> FrostFilterType;
+
+  /** Standard macro */
+  itkNewMacro(Self);
+
+  itkTypeMacro(Despeckle, otb::Application);
+
+private:
+  void DoInit()
+  {
+    SetName("Despeckle");
+    SetDescription("Perform speckle noise reduction on SAR image.");
+
+    // Documentation
+    SetDocName("Despeckle");
+    SetDocLongDescription("This application reduce speckle noise. Two methods are available: Lee and Frost.");
+    SetDocLimitations("None");
+    SetDocAuthors("OTB-Team");
+    SetDocSeeAlso(" ");
+
+    AddDocTag(Tags::SAR);
+    AddDocTag(Tags::Filter);
+
+    AddParameter(ParameterType_InputImage,  "in",   "Input Image");
+    SetParameterDescription("in", "Input image.");
+    AddParameter(ParameterType_OutputImage, "out",  "Output Image");
+    SetParameterDescription("out", "Output image.");
+
+    AddRAMParameter();
+
+    AddParameter(ParameterType_Choice,"filter","speckle filtering method");
+    AddChoice("filter.lee","Lee");
+    SetParameterDescription("filter.lee","Lee filter");
+    AddChoice("filter.frost","Frost");
+    SetParameterDescription("filter.frost","Frost filter");
+
+    AddParameter(ParameterType_Int,"filter.lee.rad","Radius");
+    SetParameterDescription("filter.lee.rad","Radius for lee filter");
+
+    AddParameter(ParameterType_Float,"filter.lee.nblooks","nb looks");
+    SetParameterDescription("filter.lee.nblooks","Nb looks for lee filter");
+
+    AddParameter(ParameterType_Int,"filter.frost.rad","Radius");
+    SetParameterDescription("filter.frost.rad","Radius for frost filter");
+
+    AddParameter(ParameterType_Float,"filter.frost.deramp","deramp");
+    SetParameterDescription("filter.frost.deramp","Decrease factor declaration");
+
+    // Default values
+    SetDefaultParameterInt("filter.lee.rad", 1);
+    SetDefaultParameterFloat("filter.lee.nblooks", 1.);
+    SetDefaultParameterInt("filter.frost.rad",  1);
+    SetDefaultParameterFloat("filter.frost.deramp",  0.1);
+
+
+    // Doc example parameter settings
+    SetDocExampleParameterValue("in", "sar.tif");
+    SetDocExampleParameterValue("filter","lee");
+    SetDocExampleParameterValue("filter.lee.rad", "5");
+    SetDocExampleParameterValue("out", "despeckle.tif");
+  }
+
+  void DoUpdateParameters()
+  {
+    // Nothing to do here : all parameters are independent
+  }
+
+  void DoExecute()
+  {
+    FloatVectorImageType* inVImage = GetParameterImage("in");
+
+    // Transform to otb::Image
+    typedef otb::Image<FloatVectorImageType::InternalPixelType> FloatImageType;
+    typedef otb::MultiToMonoChannelExtractROI<float,float> ExtractFilterType;
+
+    ExtractFilterType::Pointer channelSelect = ExtractFilterType::New();
+    m_Ref.push_back(channelSelect.GetPointer());
+    channelSelect->SetChannel(1);
+    channelSelect->SetInput(inVImage);
+    channelSelect->UpdateOutputInformation();
+    FloatImageType::Pointer inImage = channelSelect->GetOutput();
+    inImage->UpdateOutputInformation();
+
+    switch (GetParameterInt("filter"))
+      {
+      case 0:
+      {
+      LeeFilterType::Pointer  filter = LeeFilterType::New();
+      m_Ref.push_back(filter.GetPointer());
+
+      filter->SetInput(inImage);
+
+      LeeFilterType::SizeType lradius;
+      lradius.Fill(GetParameterInt("filter.lee.rad"));
+
+      filter->SetRadius(lradius);
+      filter->SetNbLooks(GetParameterFloat("filter.lee.nblooks"));
+
+      otbAppLogINFO( << "Lee filter" );
+      m_SpeckleFilter = filter;
+      break;
+      }
+      case 1:
+      {
+      FrostFilterType::Pointer  filter = FrostFilterType::New();
+      m_Ref.push_back(filter.GetPointer());
+
+      filter->SetInput(inImage);
+
+      FrostFilterType::SizeType lradius;
+      lradius.Fill(GetParameterInt("filter.frost.rad"));
+
+      filter->SetRadius(lradius);
+      filter->SetDeramp(GetParameterFloat("filter.frost.deramp"));
+
+      otbAppLogINFO( << "Frost filter" );
+      m_SpeckleFilter = filter;
+      break;
+      }
+      default:
+      {
+      otbAppLogFATAL(<<"non defined speckle reduction filter "<<GetParameterInt("filter")<<std::endl);
+      break;
+      }
+      return;
+      }
+
+    SetParameterOutputImage("out", m_SpeckleFilter->GetOutput());
+  }
+  std::vector<itk::ProcessObject::Pointer> m_Ref;
+  SpeckleFilterType::Pointer m_SpeckleFilter;
+};
+
+} //end namespace Wrapper
+} //end namespace otb
+
+OTB_APPLICATION_EXPORT(otb::Wrapper::Despeckle)
diff --git a/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx b/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx
index 4dd933b..41f9305 100644
--- a/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx
+++ b/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx
@@ -27,14 +27,11 @@
 
 #include "otbVectorImageToMatrixImageFilter.h"
 
-
 namespace otb
 {
 namespace Wrapper
 {
 
-const unsigned int Dimension = 2;
-
 typedef otb::StreamingStatisticsVectorImageFilter<DoubleVectorImageType> StreamingStatisticsVectorImageFilterType;
 
 typedef otb::UnConstrainedLeastSquareImageFilter<DoubleVectorImageType, DoubleVectorImageType, double> UCLSUnmixingFilterType;
@@ -150,8 +147,8 @@ private:
   {
     m_ProcessObjects.clear();
 
-    DoubleVectorImageType::Pointer inputImage = GetParameterImage<DoubleVectorImageType>("in");
-    DoubleVectorImageType::Pointer endmembersImage = GetParameterImage<DoubleVectorImageType>("ie");
+    DoubleVectorImageType::Pointer inputImage = GetParameterDoubleVectorImage("in");
+    DoubleVectorImageType::Pointer endmembersImage = GetParameterDoubleVectorImage("ie");
 
     /*
      * Transform Endmembers image to matrix representation
diff --git a/Applications/Hyperspectral/otbVertexComponentAnalysis.cxx b/Applications/Hyperspectral/otbVertexComponentAnalysis.cxx
index ef22ca2..0668258 100644
--- a/Applications/Hyperspectral/otbVertexComponentAnalysis.cxx
+++ b/Applications/Hyperspectral/otbVertexComponentAnalysis.cxx
@@ -21,13 +21,11 @@
 #include "otbVcaImageFilter.h"
 #include "otbVectorImageToMatrixImageFilter.h"
 
-
 namespace otb
 {
 namespace Wrapper
 {
 
-const unsigned int Dimension = 2;
 
 typedef otb::VCAImageFilter<DoubleVectorImageType>                 VCAFilterType;
 typedef otb::VectorImageToMatrixImageFilter<DoubleVectorImageType> VectorImageToMatrixImageFilterType;
@@ -88,7 +86,7 @@ private:
 
   void DoExecute()
   {
-    DoubleVectorImageType::Pointer inputImage = GetParameterImage<DoubleVectorImageType>("in");
+    DoubleVectorImageType::Pointer inputImage = GetParameterDoubleVectorImage("in");
     DoubleVectorImageType::Pointer endmembersImage;
 
     const unsigned int nbEndmembers = GetParameterInt("ne");
diff --git a/Applications/Projections/CMakeLists.txt b/Applications/Projections/CMakeLists.txt
index 4323e63..d13b0c1 100644
--- a/Applications/Projections/CMakeLists.txt
+++ b/Applications/Projections/CMakeLists.txt
@@ -1,11 +1,11 @@
 
 OTB_CREATE_APPLICATION(NAME           BundleToPerfectSensor
                        SOURCES        otbBundleToPerfectSensor.cxx
-                       LINK_LIBRARIES OTBBasicFilters)
+                       LINK_LIBRARIES OTBBasicFilters;OTBProjections)
 
 OTB_CREATE_APPLICATION(NAME           OrthoRectification
                        SOURCES        otbOrthoRectification.cxx
-                       LINK_LIBRARIES OTBBasicFilters)
+                       LINK_LIBRARIES OTBBasicFilters;OTBProjections)
 
 OTB_CREATE_APPLICATION(NAME           RigidTransformResample
                        SOURCES        otbRigidTransformResample.cxx
@@ -13,23 +13,23 @@ OTB_CREATE_APPLICATION(NAME           RigidTransformResample
 
 OTB_CREATE_APPLICATION(NAME           Superimpose
                        SOURCES        otbSuperimpose.cxx
-                       LINK_LIBRARIES OTBBasicFilters)
+                       LINK_LIBRARIES OTBBasicFilters;OTBProjections)
 
 OTB_CREATE_APPLICATION(NAME           ConvertCartoToGeoPoint
                        SOURCES        otbConvertCartoToGeoPoint.cxx
-                       LINK_LIBRARIES OTBBasicFilters)
+                       LINK_LIBRARIES OTBBasicFilters;OTBProjections)
 
 OTB_CREATE_APPLICATION(NAME           ImageEnvelope
                        SOURCES        otbImageEnvelope.cxx
-                       LINK_LIBRARIES OTBBasicFilters)
+                       LINK_LIBRARIES OTBBasicFilters;OTBProjections)
 
 OTB_CREATE_APPLICATION(NAME           ObtainUTMZoneFromGeoPoint
                        SOURCES        otbObtainUTMZoneFromGeoPoint.cxx
-                       LINK_LIBRARIES OTBBasicFilters)
+                       LINK_LIBRARIES OTBBasicFilters;OTBProjections)
 
 OTB_CREATE_APPLICATION(NAME           ConvertSensorToGeoPoint
                        SOURCES        otbConvertSensorToGeoPoint.cxx
-                       LINK_LIBRARIES OTBBasicFilters)
+                       LINK_LIBRARIES OTBBasicFilters;OTBProjections)
 
 OTB_CREATE_APPLICATION(NAME           GridBasedImageResampling
                        SOURCES        otbGridBasedImageResampling.cxx
diff --git a/Applications/Projections/otbBundleToPerfectSensor.cxx b/Applications/Projections/otbBundleToPerfectSensor.cxx
index 45221e0..f1140a5 100644
--- a/Applications/Projections/otbBundleToPerfectSensor.cxx
+++ b/Applications/Projections/otbBundleToPerfectSensor.cxx
@@ -18,7 +18,7 @@
 #include "otbWrapperApplication.h"
 #include "otbWrapperApplicationFactory.h"
 
-#include "itkVectorIndexSelectionCastImageFilter.h"
+#include "otbMultiToMonoChannelExtractROI.h"
 #include "otbGenericRSResampleImageFilter.h"
 #include "otbBCOInterpolateImageFunction.h"
 #include "otbSimpleRcsPanSharpeningFusionImageFilter.h"
@@ -27,12 +27,13 @@
 // Elevation handler
 #include "otbWrapperElevationParametersHandler.h"
 
+#include "otbStreamingResampleImageFilter.h"
+#include "otbPleiadesPToXSAffineTransformCalculator.h"
+
 namespace otb
 {
 namespace Wrapper
 {
-
-
 class BundleToPerfectSensor : public Application
 {
 public:
@@ -56,7 +57,7 @@ private:
 
     // Documentation
     SetDocName("Bundle to perfect sensor");
-    SetDocLongDescription("This application performs P+XS pansharpening.");
+    SetDocLongDescription("This application performs P+XS pansharpening. The default mode use Pan and XS sensor models to estimate the transformation to superimpose XS over Pan before the fusion (\"default mode\"). The application provides also a PHR mode for Pleiades images which does not use sensor models as Pan and XS products are already coregistered but only estimate an affine transformation to superimpose XS over the Pan.Note that this option is automatically activated in case Plei [...]
     SetDocLimitations("None");
     SetDocAuthors("OTB-Team");
     SetDocSeeAlso(" ");
@@ -72,6 +73,20 @@ private:
     // Elevation
     ElevationParametersHandler::AddElevationParameters(this, "elev");
 
+    // Superposition mode
+    AddParameter(ParameterType_Choice,"mode", "Mode");
+    SetParameterDescription("mode", "Superimposition mode");
+    
+    AddChoice("mode.default", "Default mode");
+    SetParameterDescription("mode.default", "Default superimposition mode : "
+      "uses any projection reference or sensor model found in the images");
+    
+    AddChoice("mode.phr", "Pleiades mode");
+    SetParameterDescription("mode.phr", "Pleiades superimposition mode, "
+      "designed for the case of a P+XS bundle in SENSOR geometry. It uses"
+      " a simple transform on the XS image : a scaling and a residual "
+      "translation.");
+    
     AddParameter(ParameterType_Float,        "lms",   "Spacing of the deformation field");
     SetParameterDescription("lms"," Spacing of the deformation field. Default is 10 times the PAN image spacing.");
     AddParameter(ParameterType_OutputImage,  "out",   "Output image");
@@ -89,12 +104,18 @@ private:
 
   void DoUpdateParameters()
   {
-    // Nothing to do here : all parameters are independent
+    if(HasValue("inp") && HasValue("inxs") && otb::PleiadesPToXSAffineTransformCalculator::CanCompute(GetParameterImage("inp"),GetParameterImage("inxs")))
+      {
+      otbAppLogWARNING("Forcing PHR mode with PHR data. You need to add \"-mode default\" to force the default mode with PHR images.");
+      SetParameterString("mode","phr");
+      }
   }
 
   void DoExecute()
   {
     FloatVectorImageType* panchroV = GetParameterImage("inp");
+    FloatVectorImageType* xs = GetParameterImage("inxs");
+
     if ( panchroV->GetNumberOfComponentsPerPixel() != 1 )
       {
       itkExceptionMacro(<< "The panchromatic image must be a single channel image")
@@ -102,29 +123,36 @@ private:
 
     // Transform the PAN image to otb::Image
     typedef otb::Image<FloatVectorImageType::InternalPixelType> FloatImageType;
-    typedef itk::VectorIndexSelectionCastImageFilter<FloatVectorImageType, FloatImageType> VectorIndexSelectionCastImageFilterType;
+    typedef otb::MultiToMonoChannelExtractROI<float,float> ExtractFilterType;
 
-    VectorIndexSelectionCastImageFilterType::Pointer channelSelect = VectorIndexSelectionCastImageFilterType::New();
+    ExtractFilterType::Pointer channelSelect = ExtractFilterType::New();
     m_Ref.push_back(channelSelect.GetPointer());
-    channelSelect->SetIndex(0);
+    channelSelect->SetChannel(1);
     channelSelect->SetInput(panchroV);
     channelSelect->UpdateOutputInformation();
     FloatImageType::Pointer panchro = channelSelect->GetOutput();
 
-
-    FloatVectorImageType* xs = GetParameterImage("inxs");
-
     typedef otb::BCOInterpolateImageFunction<FloatVectorImageType> InterpolatorType;
     typedef otb::GenericRSResampleImageFilter<FloatVectorImageType, FloatVectorImageType>  ResamplerType;
+    typedef otb::StreamingResampleImageFilter<FloatVectorImageType, FloatVectorImageType>  BasicResamplerType;
     typedef otb::SimpleRcsPanSharpeningFusionImageFilter<FloatImageType, FloatVectorImageType, FloatVectorImageType> FusionFilterType;
 
     // Resample filter
     ResamplerType::Pointer    resampler = ResamplerType::New();
     m_Ref.push_back(resampler.GetPointer());
+    
+    BasicResamplerType::Pointer basicResampler = BasicResamplerType::New();
+    m_Ref.push_back(basicResampler.GetPointer());
 
     InterpolatorType::Pointer interpolator = InterpolatorType::New();
     resampler->SetInterpolator(interpolator);
+    basicResampler->SetInterpolator(interpolator);
 
+    // Fusion filter
+    FusionFilterType::Pointer  fusionFilter = FusionFilterType::New();
+    m_Ref.push_back(fusionFilter.GetPointer());
+    fusionFilter->SetPanInput(panchro);
+    
     // Setup the DEM Handler
     otb::Wrapper::ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(this,"elev");
 
@@ -134,47 +162,71 @@ private:
     FloatVectorImageType::SizeType    size = panchro->GetLargestPossibleRegion().GetSize();
     FloatVectorImageType::PointType   origin = panchro->GetOrigin();
 
-    if(IsParameterEnabled("lms") && HasValue("lms"))
-      {
-      double defScalarSpacing = GetParameterFloat("lms");
-      otbAppLogINFO(<< "Generating coarse deformation field (spacing="<<defScalarSpacing<<")" << std::endl);
-      FloatVectorImageType::SpacingType defSpacing;
-
-      defSpacing[0] = defScalarSpacing;
-      defSpacing[1] = defScalarSpacing;
+    FloatVectorImageType::PixelType defaultValue;
+    itk::NumericTraits<FloatVectorImageType::PixelType>::SetLength(defaultValue, xs->GetNumberOfComponentsPerPixel());
 
-      resampler->SetDisplacementFieldSpacing(defSpacing);
+    if(GetParameterString("mode") == "default")
+      {
+      otbAppLogINFO("Using the default mode");
+      if(IsParameterEnabled("lms") && HasValue("lms"))
+        {
+        double defScalarSpacing = GetParameterFloat("lms");
+        otbAppLogINFO(<< "Generating coarse deformation field (spacing="<<defScalarSpacing<<")" << std::endl);
+        FloatVectorImageType::SpacingType defSpacing;
+        
+        defSpacing[0] = defScalarSpacing;
+        defSpacing[1] = defScalarSpacing;
+        
+        resampler->SetDisplacementFieldSpacing(defSpacing);
+        }
+      else
+        {
+        FloatVectorImageType::SpacingType defSpacing;
+        defSpacing[0]=10*spacing[0];
+        defSpacing[1]=10*spacing[1];
+        resampler->SetDisplacementFieldSpacing(defSpacing);
+        }
+      
+      resampler->SetInput(xs);
+      resampler->SetOutputOrigin(origin);
+      resampler->SetOutputSpacing(spacing);
+      resampler->SetOutputSize(size);
+      resampler->SetOutputStartIndex(start);
+      resampler->SetOutputKeywordList(panchro->GetImageKeywordlist());
+      resampler->SetOutputProjectionRef(panchro->GetProjectionRef());
+      resampler->SetEdgePaddingValue(defaultValue);
+      fusionFilter->SetXsInput(resampler->GetOutput());
+      }
+    else if(GetParameterString("mode")=="phr")
+      {
+      otbAppLogINFO("Using the PHR mode");
+      
+      otb::PleiadesPToXSAffineTransformCalculator::TransformType::Pointer transform
+        = otb::PleiadesPToXSAffineTransformCalculator::Compute(panchro, xs);
+
+      basicResampler->SetInput(xs);
+      basicResampler->SetTransform(transform);
+      basicResampler->SetOutputOrigin(origin);
+      basicResampler->SetOutputSpacing(spacing);
+      basicResampler->SetOutputSize(size);
+      basicResampler->SetOutputStartIndex(start);
+      basicResampler->SetEdgePaddingValue(defaultValue);
+      
+      fusionFilter->SetXsInput(basicResampler->GetOutput());
+
+      // Set the profRef & Keywordlist from Pan into the resampled XS image
+      basicResampler->UpdateOutputInformation();
+      itk::MetaDataDictionary& dict = basicResampler->GetOutput()->GetMetaDataDictionary();
+      itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey,
+                                            panchro->GetProjectionRef());
+      itk::EncapsulateMetaData<ImageKeywordlist>(dict, MetaDataKey::OSSIMKeywordlistKey,
+                                                 panchro->GetImageKeywordlist());
       }
     else
       {
-      FloatVectorImageType::SpacingType defSpacing;
-      defSpacing[0]=10*spacing[0];
-      defSpacing[1]=10*spacing[1];
-      resampler->SetDisplacementFieldSpacing(defSpacing);
+      otbAppLogWARNING("Unknown mode");
       }
-
-    FloatVectorImageType::PixelType defaultValue;
-    itk::NumericTraits<FloatVectorImageType::PixelType>::SetLength(defaultValue, xs->GetNumberOfComponentsPerPixel());
-
-    resampler->SetInput(xs);
-    resampler->SetOutputOrigin(origin);
-    resampler->SetOutputSpacing(spacing);
-    resampler->SetOutputSize(size);
-    resampler->SetOutputStartIndex(start);
-    resampler->SetOutputKeywordList(panchro->GetImageKeywordlist());
-    resampler->SetOutputProjectionRef(panchro->GetProjectionRef());
-    resampler->SetEdgePaddingValue(defaultValue);
-
-    resampler->UpdateOutputInformation();
-    FloatVectorImageType::Pointer xsResample = resampler->GetOutput();
-
-    FusionFilterType::Pointer  fusionFilter = FusionFilterType::New();
-    m_Ref.push_back(fusionFilter.GetPointer());
-
-    fusionFilter->SetPanInput(panchro);
-    fusionFilter->SetXsInput(resampler->GetOutput());
-    fusionFilter->UpdateOutputInformation();
-
+    
     SetParameterOutputImage("out", fusionFilter->GetOutput());
   }
 
diff --git a/Applications/Projections/otbOrthoRectification.cxx b/Applications/Projections/otbOrthoRectification.cxx
index 9bbe920..f039cb2 100644
--- a/Applications/Projections/otbOrthoRectification.cxx
+++ b/Applications/Projections/otbOrthoRectification.cxx
@@ -265,14 +265,6 @@ private:
       genericRSEstimator->Compute();
 
       // Fill the Gui with the computed parameters
-      if (!HasUserValue("outputs.ulx"))
-        {
-        SetParameterFloat("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0]);
-        }
-
-      if (!HasUserValue("outputs.uly"))
-        SetParameterFloat("outputs.uly", genericRSEstimator->GetOutputOrigin()[1]);
-
       if (!HasUserValue("outputs.sizex"))
         SetParameterInt("outputs.sizex", genericRSEstimator->GetOutputSize()[0]);
 
@@ -285,6 +277,12 @@ private:
       if (!HasUserValue("outputs.spacingy"))
         SetParameterFloat("outputs.spacingy", genericRSEstimator->GetOutputSpacing()[1]);
 
+      if (!HasUserValue("outputs.ulx"))
+        SetParameterFloat("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0] - 0.5 * genericRSEstimator->GetOutputSpacing()[0]);
+
+      if (!HasUserValue("outputs.uly"))
+        SetParameterFloat("outputs.uly", genericRSEstimator->GetOutputOrigin()[1] - 0.5 * genericRSEstimator->GetOutputSpacing()[1]);
+
       if (!HasUserValue("outputs.lrx"))
        SetParameterFloat("outputs.lrx", GetParameterFloat("outputs.ulx") + GetParameterFloat("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
 
@@ -380,8 +378,8 @@ private:
         SetParameterInt("outputs.sizey", genericRSEstimator->GetOutputSize()[1]);
 
         // Reset Origin to default
-        SetParameterFloat("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0]);
-        SetParameterFloat("outputs.uly", genericRSEstimator->GetOutputOrigin()[1]);
+        SetParameterFloat("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0] - 0.5 * genericRSEstimator->GetOutputSpacing()[0]);
+        SetParameterFloat("outputs.uly", genericRSEstimator->GetOutputOrigin()[1] - 0.5 * genericRSEstimator->GetOutputSpacing()[1]);
 
         // Update lower right
         SetParameterFloat("outputs.lrx", GetParameterFloat("outputs.ulx") + GetParameterFloat("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
@@ -434,8 +432,8 @@ private:
         SetParameterFloat("outputs.spacingy", genericRSEstimator->GetOutputSpacing()[1]);
 
         // Reset Origin to default
-        SetParameterFloat("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0]);
-        SetParameterFloat("outputs.uly", genericRSEstimator->GetOutputOrigin()[1]);
+        SetParameterFloat("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0] - 0.5 * genericRSEstimator->GetOutputSpacing()[0]);
+        SetParameterFloat("outputs.uly", genericRSEstimator->GetOutputOrigin()[1] - 0.5 * genericRSEstimator->GetOutputSpacing()[1]);
 
         // Update lower right
         SetParameterFloat("outputs.lrx", GetParameterFloat("outputs.ulx") + GetParameterFloat("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
@@ -535,8 +533,8 @@ private:
             SetParameterInt("outputs.sizey",size[1]);
             SetParameterFloat("outputs.spacingx",spacing[0]);
             SetParameterFloat("outputs.spacingy",spacing[1]);
-            SetParameterFloat("outputs.ulx", orig[0]);
-            SetParameterFloat("outputs.uly", orig[1]);
+            SetParameterFloat("outputs.ulx", orig[0] - 0.5 * spacing[0]);
+            SetParameterFloat("outputs.uly", orig[1] - 0.5 * spacing[1]);
             // Update lower right
             SetParameterFloat("outputs.lrx", GetParameterFloat("outputs.ulx") + GetParameterFloat("outputs.spacingx") * static_cast<double>(GetParameterInt("outputs.sizex")));
             SetParameterFloat("outputs.lry", GetParameterFloat("outputs.uly") + GetParameterFloat("outputs.spacingy") * static_cast<double>(GetParameterInt("outputs.sizey")));
@@ -674,11 +672,11 @@ private:
     m_ResampleFilter->SetOutputSpacing(spacing);
     otbAppLogINFO("Generating output with pixel spacing = " << spacing);
 
-    ResampleFilterType::OriginType ul;
-    ul[0] = GetParameterFloat("outputs.ulx");
-    ul[1] = GetParameterFloat("outputs.uly");
-    m_ResampleFilter->SetOutputOrigin(ul);
-    otbAppLogINFO("Generating output with origin = " << ul);
+    ResampleFilterType::OriginType origin;
+    origin[0] = GetParameterFloat("outputs.ulx") + 0.5 * GetParameterFloat("outputs.spacingx");
+    origin[1] = GetParameterFloat("outputs.uly") + 0.5 * GetParameterFloat("outputs.spacingy");
+    m_ResampleFilter->SetOutputOrigin(origin);
+    otbAppLogINFO("Generating output with origin = " << origin);
 
     // Build the default pixel
     FloatVectorImageType::PixelType defaultValue;
diff --git a/Applications/Projections/otbRigidTransformResample.cxx b/Applications/Projections/otbRigidTransformResample.cxx
index 59fc302..91532f1 100644
--- a/Applications/Projections/otbRigidTransformResample.cxx
+++ b/Applications/Projections/otbRigidTransformResample.cxx
@@ -230,12 +230,18 @@ private:
       // Evaluate spacing
       FloatVectorImageType::SpacingType spacing = inputImage->GetSpacing();
       FloatVectorImageType::SpacingType OutputSpacing;
-      OutputSpacing=spacing;
-
       OutputSpacing[0] = spacing[0] * scale[0];
       OutputSpacing[1] = spacing[1] * scale[1];
 
       m_Resampler->SetOutputSpacing(OutputSpacing);
+
+      FloatVectorImageType::PointType origin = inputImage->GetOrigin();
+      FloatVectorImageType::PointType outputOrigin;
+      outputOrigin[0] = origin[0] + 0.5 * spacing[0] * (scale[0] - 1.0);
+      outputOrigin[1] = origin[1] + 0.5 * spacing[1] * (scale[1] - 1.0);
+
+      m_Resampler->SetOutputOrigin(outputOrigin);
+
       m_Resampler->SetTransform(transform);
 
       // Evaluate size
@@ -267,13 +273,18 @@ private:
       // Evaluate spacing
       FloatVectorImageType::SpacingType spacing = inputImage->GetSpacing();
       FloatVectorImageType::SpacingType OutputSpacing;
-      OutputSpacing=spacing;
-
       OutputSpacing[0] = spacing[0] * scale[0];
       OutputSpacing[1] = spacing[1] * scale[1];
 
       m_Resampler->SetOutputSpacing(OutputSpacing);
 
+      FloatVectorImageType::PointType origin = inputImage->GetOrigin();
+      FloatVectorImageType::PointType outputOrigin;
+      outputOrigin[0] = origin[0] + 0.5 * spacing[0] * (scale[0] - 1.0);
+      outputOrigin[1] = origin[1] + 0.5 * spacing[1] * (scale[1] - 1.0);
+
+      m_Resampler->SetOutputOrigin(outputOrigin);
+
       ResampleFilterType::SizeType recomputedSize;
       recomputedSize[0] = inputImage->GetLargestPossibleRegion().GetSize()[0] / scale[0];
       recomputedSize[1] = inputImage->GetLargestPossibleRegion().GetSize()[1] / scale[1];
@@ -290,34 +301,33 @@ private:
       {
       ScalableTransformType::Pointer transform = ScalableTransformType::New();
 
-      FloatVectorImageType::IndexType origin = inputImage->GetLargestPossibleRegion().GetIndex();
+      FloatVectorImageType::SizeType inSize = inputImage->GetLargestPossibleRegion().GetSize();
       FloatVectorImageType::SpacingType spacing = inputImage->GetSpacing();
 
-      FloatVectorImageType::IndexType center;
-      center[0] = origin[0] + inputImage->GetLargestPossibleRegion().GetSize()[0] / 2.0;
-      center[1] = origin[1] + inputImage->GetLargestPossibleRegion().GetSize()[1] / 2.0;
-
+      itk::ContinuousIndex<double,2> ULindex(inputImage->GetLargestPossibleRegion().GetIndex());
+      ULindex[0] += -0.5;
+      ULindex[1] += -0.5;
+      itk::ContinuousIndex<double,2> center, URindex, LRindex, LLindex;
+      center[0] = ULindex[0] + static_cast<double>(inSize[0]) / 2.0;
+      center[1] = ULindex[1] + static_cast<double>(inSize[1]) / 2.0;
+
+      URindex = ULindex;
+      LRindex = ULindex;
+      LLindex = ULindex;
+      URindex[0] += inSize[0];
+      LRindex[0] += inSize[0];
+      LRindex[1] += inSize[1];
+      LLindex[1] += inSize[1];
 
       FloatVectorImageType::PointType centerPoint;
-      inputImage->TransformIndexToPhysicalPoint(center, centerPoint);
+      inputImage->TransformContinuousIndexToPhysicalPoint(center, centerPoint);
 
       //image boundary
-      FloatVectorImageType::IndexType ULindex, URindex, LRindex, LLindex;
-
-      ULindex[0]=origin[0];
-      ULindex[1]=origin[1];
-      URindex[0]=origin[0]+ inputImage->GetLargestPossibleRegion().GetSize()[0];
-      URindex[1]=origin[1];
-      LRindex[0]=origin[0]+ inputImage->GetLargestPossibleRegion().GetSize()[0];
-      LRindex[1]=origin[1]+ inputImage->GetLargestPossibleRegion().GetSize()[1];
-      LLindex[0]=origin[0];
-      LLindex[1]=origin[1]+ inputImage->GetLargestPossibleRegion().GetSize()[1];
-
-      FloatVectorImageType::PointType orig, ULpoint, URpoint, LRpoint, LLpoint;
-      inputImage->TransformIndexToPhysicalPoint(ULindex, ULpoint);
-      inputImage->TransformIndexToPhysicalPoint(URindex, URpoint);
-      inputImage->TransformIndexToPhysicalPoint(LRindex, LRpoint);
-      inputImage->TransformIndexToPhysicalPoint(LLindex, LLpoint);
+      FloatVectorImageType::PointType ULpoint, URpoint, LRpoint, LLpoint;
+      inputImage->TransformContinuousIndexToPhysicalPoint(ULindex, ULpoint);
+      inputImage->TransformContinuousIndexToPhysicalPoint(URindex, URpoint);
+      inputImage->TransformContinuousIndexToPhysicalPoint(LRindex, LRpoint);
+      inputImage->TransformContinuousIndexToPhysicalPoint(LLindex, LLpoint);
 
       // Scale Transform
       OutputVectorType scale;
@@ -344,13 +354,11 @@ private:
       m_Resampler->SetTransform(transform);
 
 
-      FloatVectorImageType::PointType ULpointTrans, URpointTrans, LRpointTrans, LLpointTrans, CenterPointTrans;
-
+      FloatVectorImageType::PointType ULpointTrans, URpointTrans, LRpointTrans, LLpointTrans;
       ULpointTrans=inverseTransform->TransformPoint(ULpoint);
       URpointTrans=inverseTransform->TransformPoint(URpoint);
       LRpointTrans=inverseTransform->TransformPoint(LRpoint);
       LLpointTrans=inverseTransform->TransformPoint(LLpoint);
-      CenterPointTrans=inverseTransform->TransformPoint(centerPoint);
 
       //compute min and max
       std::vector<FloatVectorImageType::PointType>   voutput;
@@ -364,7 +372,7 @@ private:
       double minY = voutput[0][1];
       double maxY = voutput[0][1];
 
-      for(unsigned int i = 0; i<voutput.size(); i++)
+      for(unsigned int i = 1; i<voutput.size(); i++)
         {
         // Origins
         if ( minX > voutput[i][0] )
@@ -387,16 +395,15 @@ private:
           }
         }
 
-      if( spacing[0] > 0 ) orig[0] = minX;
-      else orig[0] = maxX;
+      FloatVectorImageType::PointType outputOrig;
+      if( spacing[0] > 0 ) outputOrig[0] = minX;
+      else outputOrig[0] = maxX;
 
-      if( spacing[1] > 0 ) orig[1] = minY;
-      else orig[1] = maxY;
-
-      m_Resampler->SetOutputOrigin(orig);
+      if( spacing[1] > 0 ) outputOrig[1] = minY;
+      else outputOrig[1] = maxY;
 
       //size of output image
-      ResampleFilterType::SizeType size;
+      FloatVectorImageType::PointType size;
       size[0]=vcl_abs(maxX-minX);
       size[1]=vcl_abs(maxY-minY);
 
@@ -407,6 +414,10 @@ private:
 
       m_Resampler->SetOutputSpacing(OutputSpacing);
 
+      outputOrig[0] += 0.5 * OutputSpacing[0];
+      outputOrig[1] += 0.5 * OutputSpacing[1];
+      m_Resampler->SetOutputOrigin(outputOrig);
+
       // Evaluate size
       ResampleFilterType::SizeType recomputedSize;
       recomputedSize[0] = static_cast<unsigned int>(vcl_floor(vcl_abs(size[0]/OutputSpacing[0])));
diff --git a/Applications/Projections/otbSuperimpose.cxx b/Applications/Projections/otbSuperimpose.cxx
index 536b8b4..15fe9cf 100644
--- a/Applications/Projections/otbSuperimpose.cxx
+++ b/Applications/Projections/otbSuperimpose.cxx
@@ -26,6 +26,8 @@
 
 // Elevation handler
 #include "otbWrapperElevationParametersHandler.h"
+#include "otbStreamingResampleImageFilter.h"
+#include "otbPleiadesPToXSAffineTransformCalculator.h"
 
 namespace otb
 {
@@ -68,6 +70,12 @@ public:
   typedef otb::GenericRSResampleImageFilter<FloatVectorImageType,
                                             FloatVectorImageType>  ResamplerType;
 
+  typedef itk::ScalableAffineTransform<double, 2>                 TransformType;
+  
+  typedef otb::StreamingResampleImageFilter
+    <FloatVectorImageType,
+     FloatVectorImageType>                                        BasicResamplerType;
+  
 private:
   void DoInit()
   {
@@ -100,6 +108,20 @@ private:
     AddParameter(ParameterType_OutputImage,  "out",   "Output image");
     SetParameterDescription("out","Output reprojected image.");
 
+    // Superposition mode
+    AddParameter(ParameterType_Choice,"mode", "Mode");
+    SetParameterDescription("mode", "Superimposition mode");
+    
+    AddChoice("mode.default", "Default mode");
+    SetParameterDescription("mode.default", "Default superimposition mode : "
+      "uses any projection reference or sensor model found in the images");
+    
+    AddChoice("mode.phr", "Pleiades mode");
+    SetParameterDescription("mode.phr", "Pleiades superimposition mode, "
+      "designed for the case of a P+XS bundle in SENSOR geometry. It uses"
+      " a simple transform on the XS image : a scaling and a residual "
+      "translation.");
+    
     // Interpolators
     AddParameter(ParameterType_Choice,   "interpolator", "Interpolation");
     SetParameterDescription("interpolator","This group of parameters allows to define how the input image will be interpolated during resampling.");
@@ -116,8 +138,7 @@ private:
 
     AddChoice("interpolator.linear", "Linear interpolation");
     SetParameterDescription("interpolator.linear","Linear interpolation leads to average image quality but is quite fast");
-
-
+    
     AddRAMParameter();
 
     // Doc example parameter settings
@@ -128,7 +149,11 @@ private:
 
   void DoUpdateParameters()
   {
-    // Nothing to do here : all parameters are independent
+    if(HasValue("inr") && HasValue("inm") && otb::PleiadesPToXSAffineTransformCalculator::CanCompute(GetParameterImage("inr"),GetParameterImage("inm")))
+      {
+      otbAppLogWARNING("Forcing PHR mode with PHR data. You need to add \"-mode default\" to force the default mode with PHR images.");
+      SetParameterString("mode","phr");
+      }
   }
 
 
@@ -140,6 +165,8 @@ private:
 
     // Resample filter
     m_Resampler = ResamplerType::New();
+    
+    m_BasicResampler = BasicResamplerType::New();
 
     // Get Interpolator
     switch ( GetParameterInt("interpolator") )
@@ -148,12 +175,14 @@ private:
       {
       LinInterpolatorType::Pointer interpolator = LinInterpolatorType::New();
       m_Resampler->SetInterpolator(interpolator);
+      m_BasicResampler->SetInterpolator(interpolator);
       }
       break;
       case Interpolator_NNeighbor:
       {
       NNInterpolatorType::Pointer interpolator = NNInterpolatorType::New();
       m_Resampler->SetInterpolator(interpolator);
+      m_BasicResampler->SetInterpolator(interpolator);
       }
       break;
       case Interpolator_BCO:
@@ -161,6 +190,7 @@ private:
       BCOInterpolatorType::Pointer interpolator = BCOInterpolatorType::New();
       interpolator->SetRadius(GetParameterInt("interpolator.bco.radius"));
       m_Resampler->SetInterpolator(interpolator);
+      m_BasicResampler->SetInterpolator(interpolator);
       }
       break;
       }
@@ -174,41 +204,79 @@ private:
     FloatVectorImageType::IndexType   start   = refImage->GetLargestPossibleRegion().GetIndex();
     FloatVectorImageType::SizeType    size    = refImage->GetLargestPossibleRegion().GetSize();
     FloatVectorImageType::PointType   origin  = refImage->GetOrigin();
-
-    if(IsParameterEnabled("lms"))
-      {
-      float defScalarSpacing = vcl_abs(GetParameterFloat("lms"));
-      otbAppLogDEBUG("Generating coarse deformation field (spacing="<<defScalarSpacing<<")");
-      FloatVectorImageType::SpacingType defSpacing;
-
-      defSpacing[0] = defScalarSpacing;
-      defSpacing[1] = defScalarSpacing;
-
-      if (spacing[0]<0.0) defSpacing[0] *= -1.0;
-      if (spacing[1]<0.0) defSpacing[1] *= -1.0;
-
-      m_Resampler->SetDisplacementFieldSpacing(defSpacing);
-      }
-
+    
     FloatVectorImageType::PixelType defaultValue;
     itk::NumericTraits<FloatVectorImageType::PixelType>::SetLength(defaultValue, movingImage->GetNumberOfComponentsPerPixel());
 
-    m_Resampler->SetInput(movingImage);
-    m_Resampler->SetInputKeywordList(movingImage->GetImageKeywordlist());
-    m_Resampler->SetInputProjectionRef(movingImage->GetProjectionRef());
-    m_Resampler->SetOutputOrigin(origin);
-    m_Resampler->SetOutputSpacing(spacing);
-    m_Resampler->SetOutputSize(size);
-    m_Resampler->SetOutputStartIndex(start);
-    m_Resampler->SetOutputKeywordList(refImage->GetImageKeywordlist());
-    m_Resampler->SetOutputProjectionRef(refImage->GetProjectionRef());
-    m_Resampler->SetEdgePaddingValue(defaultValue);
-
-    // Set the output image
-    SetParameterOutputImage("out", m_Resampler->GetOutput());
+    
+    if(GetParameterString("mode")=="default")
+      {
+      if(IsParameterEnabled("lms"))
+        {
+        float defScalarSpacing = vcl_abs(GetParameterFloat("lms"));
+        otbAppLogDEBUG("Generating coarse deformation field (spacing="<<defScalarSpacing<<")");
+        FloatVectorImageType::SpacingType defSpacing;
+
+        defSpacing[0] = defScalarSpacing;
+        defSpacing[1] = defScalarSpacing;
+
+        if (spacing[0]<0.0) defSpacing[0] *= -1.0;
+        if (spacing[1]<0.0) defSpacing[1] *= -1.0;
+
+        m_Resampler->SetDisplacementFieldSpacing(defSpacing);
+        }
+      
+      // Setup transform through projRef and Keywordlist
+      m_Resampler->SetInputKeywordList(movingImage->GetImageKeywordlist());
+      m_Resampler->SetInputProjectionRef(movingImage->GetProjectionRef());
+      
+      m_Resampler->SetOutputKeywordList(refImage->GetImageKeywordlist());
+      m_Resampler->SetOutputProjectionRef(refImage->GetProjectionRef());
+      
+      m_Resampler->SetInput(movingImage);
+      
+      m_Resampler->SetOutputOrigin(origin);
+      m_Resampler->SetOutputSpacing(spacing);
+      m_Resampler->SetOutputSize(size);
+      m_Resampler->SetOutputStartIndex(start);
+      
+      m_Resampler->SetEdgePaddingValue(defaultValue);
+
+      // Set the output image
+      SetParameterOutputImage("out", m_Resampler->GetOutput());
+      }
+    else if(GetParameterString("mode")=="phr")
+      {
+      otbAppLogINFO("Using the PHR mode");
+      
+      otb::PleiadesPToXSAffineTransformCalculator::TransformType::Pointer transform
+        = otb::PleiadesPToXSAffineTransformCalculator::Compute(GetParameterImage("inr"),
+                                                               GetParameterImage("inm"));
+
+      m_BasicResampler->SetTransform(transform);
+      
+      m_BasicResampler->SetInput(movingImage);
+      
+      m_BasicResampler->SetOutputOrigin(origin);
+      m_BasicResampler->SetOutputSpacing(spacing);
+      m_BasicResampler->SetOutputSize(size);
+      m_BasicResampler->SetOutputStartIndex(start);
+      
+      m_BasicResampler->SetEdgePaddingValue(defaultValue);
+
+      // Set the output image
+      SetParameterOutputImage("out", m_BasicResampler->GetOutput());
+      }
+    else
+      {
+      otbAppLogWARNING("Unknown mode");
+      }
   }
-
+   
   ResamplerType::Pointer           m_Resampler;
+  
+  BasicResamplerType::Pointer      m_BasicResampler;
+  
 };
 
 } // end namespace Wrapper
diff --git a/Applications/Radiometry/otbOpticalCalibration.cxx b/Applications/Radiometry/otbOpticalCalibration.cxx
index 527040e..1a8b795 100644
--- a/Applications/Radiometry/otbOpticalCalibration.cxx
+++ b/Applications/Radiometry/otbOpticalCalibration.cxx
@@ -20,19 +20,32 @@
 
 #include "otbImageToLuminanceImageFilter.h"
 #include "otbLuminanceToReflectanceImageFilter.h"
+#include "otbLuminanceToImageImageFilter.h"
+#include "otbReflectanceToLuminanceImageFilter.h"
 #include "otbReflectanceToSurfaceReflectanceImageFilter.h"
-#include "otbMultiplyByScalarImageFilter.h"
+#include "itkMultiplyImageFilter.h"
 #include "otbClampVectorImageFilter.h"
-#include "otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.h"
+#include "otbSurfaceAdjacencyEffectCorrectionSchemeFilter.h"
 #include "otbGroundSpacingImageFunction.h"
 #include "vnl/vnl_random.h"
 
+#include "itkMetaDataDictionary.h"
+#include "otbOpticalImageMetadataInterfaceFactory.h"
+#include "otbOpticalImageMetadataInterface.h"
+
+#include <fstream>
+#include <sstream>
+#include <vector>
+#include <itkVariableLengthVector.h>
+
+
 namespace otb
 {
 
 enum
 {
-  Level_TOA,
+  Level_IM_TOA,
+  Level_TOA_IM,
   Level_TOC
 };
 
@@ -63,45 +76,109 @@ public:
 
   itkTypeMacro(OpticalCalibration, Application);
 
-  typedef ImageToLuminanceImageFilter<UInt16VectorImageType,
+  typedef ImageToLuminanceImageFilter<FloatVectorImageType,
                                       DoubleVectorImageType>              ImageToLuminanceImageFilterType;
 
   typedef LuminanceToReflectanceImageFilter<DoubleVectorImageType,
                                             DoubleVectorImageType>        LuminanceToReflectanceImageFilterType;
 
-  typedef otb::MultiplyByScalarImageFilter<DoubleVectorImageType,
-                                           DoubleVectorImageType>         ScaleFilterType;
+  typedef LuminanceToImageImageFilter<DoubleVectorImageType,
+                                            DoubleVectorImageType>        LuminanceToImageImageFilterType;
+
+  typedef ReflectanceToLuminanceImageFilter<FloatVectorImageType,
+                                            DoubleVectorImageType>        ReflectanceToLuminanceImageFilterType;
+
+  typedef itk::MultiplyImageFilter<DoubleVectorImageType,DoubleImageType,DoubleVectorImageType>         ScaleFilterOutDoubleType;
 
   typedef otb::ClampVectorImageFilter<DoubleVectorImageType,
                                       DoubleVectorImageType>              ClampFilterType;
 
   typedef ReflectanceToSurfaceReflectanceImageFilter<DoubleVectorImageType,
-                                                     DoubleVectorImageType>         ReflectanceToSurfaceReflectanceImageFilterType;
+                                                     DoubleVectorImageType>          ReflectanceToSurfaceReflectanceImageFilterType;
   typedef ReflectanceToSurfaceReflectanceImageFilterType::FilterFunctionValuesType  FilterFunctionValuesType;
   typedef FilterFunctionValuesType::ValuesVectorType                                ValuesVectorType;
-  typedef AtmosphericCorrectionParameters                                           AtmosphericCorrectionParametersType;
-  typedef AtmosphericCorrectionParametersType::AerosolModelType                     AerosolModelType;
+  //typedef AtmosphericCorrectionParameters                                           AtmosphericCorrectionParametersType; chris
+  //typedef AtmosphericCorrectionParametersType::AerosolModelType                     AerosolModelType; chris
+
+  typedef otb::AtmosphericCorrectionParameters                              AtmoCorrectionParametersType;
+  typedef otb::AtmosphericCorrectionParameters::Pointer                     AtmoCorrectionParametersPointerType;
+  typedef AtmoCorrectionParametersType::AerosolModelType                    AerosolModelType;
 
-  typedef otb::SurfaceAdjacencyEffect6SCorrectionSchemeFilter<DoubleVectorImageType,DoubleVectorImageType>
-  SurfaceAdjacencyEffect6SCorrectionSchemeFilterType;
+  typedef otb::ImageMetadataCorrectionParameters                            AcquiCorrectionParametersType;
+  typedef otb::ImageMetadataCorrectionParameters::Pointer                   AcquiCorrectionParametersPointerType;
 
-  typedef otb::GroundSpacingImageFunction<UInt16VectorImageType> GroundSpacingImageType;
+  typedef otb::SurfaceAdjacencyEffectCorrectionSchemeFilter<DoubleVectorImageType,DoubleVectorImageType>
+  SurfaceAdjacencyEffectCorrectionSchemeFilterType;
 
-  typedef UInt16VectorImageType::IndexType   IndexType;
+  typedef otb::GroundSpacingImageFunction<FloatVectorImageType> GroundSpacingImageType;
+
+  typedef DoubleVectorImageType::IndexType   IndexType;
   typedef GroundSpacingImageType::FloatType  FloatType;
   typedef GroundSpacingImageType::ValueType  ValueType;
 
-  typedef IndexType::IndexValueType                IndexValueType;
+  typedef IndexType::IndexValueType          IndexValueType;
 
 
 private:
+
+  string m_inImageName;
+  bool m_currentEnabledStateOfFluxParam;
+
   void DoInit()
   {
     SetName("OpticalCalibration");
-    SetDescription("Perform optical calibration TOA/TOC (Top Of Atmosphere/Top Of Canopy). Supported sensors: QuickBird, Ikonos, WorldView2, Formosat, Spot5, Pleiades");
+    SetDescription("Perform optical calibration TOA/TOC (Top Of Atmosphere/Top Of Canopy). Supported sensors: QuickBird, Ikonos, WorldView2, Formosat, Spot5, Pleiades, Spot6. For other sensors the application also allows to provide calibration parameters manually.");
     // Documentation
     SetDocName("Optical calibration");
-    SetDocLongDescription("The application allows to convert pixel values from DN (for Digital Numbers) to physically interpretable and comparable values. Calibrated values are called surface reflectivity and its values lie in the range [0, 1].\nThe first level is called Top Of Atmosphere (TOA) reflectivity. It takes into account the sensor gain, sensor spectral response and the solar illumination.\nThe second level is called Top Of Canopy (TOC) reflectivity. In addition to sensor gain a [...]
+    SetDocLongDescription("The application allows to convert pixel values from DN (for Digital Numbers) to physically interpretable and comparable values. Calibrated values are called surface reflectivity and its values lie in the range [0, 1].\nThe first level is called Top Of Atmosphere (TOA) reflectivity. It takes into account the sensor gain, sensor spectral response and the solar illuminations.\nThe second level is called Top Of Canopy (TOC) reflectivity. In addition to sensor gain  [...]
+"\n--------------------------\n\n"
+"If the sensor is not supported by the metadata interface factory of OTB, users still have the possibility to give the needed parameters to the application.\n"
+"For TOA conversion, these parameters are : \n"
+"- day and month of acquisition, or flux normalization coefficient;\n"
+"- sun elevation angle;\n"
+"- gains and biases, one pair of values for each band (passed by a file);\n"
+"- solar illuminations, one value for each band (passed by a file).\n\n"
+"For the conversion from DN (for Digital Numbers) to spectral radiance (or 'TOA radiance') L, the following formula is used :\n\n"
+
+"(1)\tL(b) = DN(b)/gain(b)+bias(b)\t(in W/m2/steradians/micrometers)\twith b being a band ID.\n\n"
+
+"These values are provided by the user thanks to a simple txt file with two lines, one for the gains and one for the biases.\n"
+"Each value must be separated with colons (:), with eventual spaces. Blank lines are not allowed. If a line begins with the '#' symbol, then it is considered as comments.\n"
+"Note that sometimes, the values provided by certain metadata files assume the formula L(b) = gain(b)*DC(b)+bias(b).\n"
+"In this case, be sure to provide the inverse gain values so that the application can correctly interpret them.\n\n"
+
+"In order to convert TOA radiance to TOA reflectance, the following formula is used :\n\n"
+
+"(2)\tR(b) = (pi*L(b)*d*d) / (ESUN(b)*cos(θ))\t(no dimension)\twhere : \n\n"
+
+"- L(b) is the spectral radiance for band b \n"
+"- pi is the famous mathematical constant (3.14159...) \n"
+"- d is the earth-sun distance (in astronomical units) and depends on the acquisition's day and month \n"
+"- ESUN(b) is the mean TOA solar irradiance (or solar illumination) in W/m²/micrometers\n"
+"- θ is the solar zenith angle in degrees. \n"
+"Note that the application asks for the solar elevation angle, and will perfom the conversion to the zenith angle itself (ze. angle = 90° - el. angle).\n"
+"Note also that ESUN(b) not only depends on the band b, but also on the spectral sensitivity of the sensor in this particular band. "
+"In other words, the influence of spectral sensitivities is included within the ESUN different values.\n"
+"These values are provided by the user thanks to a txt file following the same convention as before.\n"
+"Instead of providing the date of acquisition, the user can also provide a flux normalization coefficient 'fn'. "
+"The formula used instead will be the following : \n\n"
+"(3) \tR(b) = (pi*L(b)) / (ESUN(b)*fn*fn*cos(θ)) \n\n"
+"Whatever the formula used (2 or 3), the user should pay attention to the interpretation of the parameters he will provide to the application, "
+"by taking into account the original formula that the metadata files assumes.\n\n"
+
+"Below, we give two examples of txt files containing information about gains/biases and solar illuminations :\n\n"
+"- gainbias.txt :\n"
+"# Gain values for each band. Each value must be separated with colons (:), with eventual spaces. Blank lines not allowed.\n"
+"10.4416 : 9.529 : 8.5175 : 14.0063\n"
+"# Bias values for each band.\n"
+"0.0 : 0.0 : 0.0 : 0.0\n\n"
+"- solarillumination.txt : \n"
+"# Solar illumination values in watt/m2/micron ('micron' means actually 'for each band').\n"
+"# Each value must be separated with colons (:), with eventual spaces. Blank lines not allowed.\n"
+"1540.494123 : 1826.087443 : 1982.671954 : 1094.747446\n\n"
+
+"Finally, the 'Logs' tab provides usefull messages that can help the user in knowing the process different status." );
+    
     SetDocLimitations("None");
     SetDocAuthors("OTB-Team");
     SetDocSeeAlso("The OTB CookBook");
@@ -117,13 +194,14 @@ private:
     AddRAMParameter();
 
     AddParameter(ParameterType_Choice,   "level", "Calibration Level");
-    AddChoice("level.toa",     "TOA : Top Of Atmosphere");
+    AddChoice("level.toa",     "Image to TOA reflectance");
+    AddChoice("level.toatoim",     "TOA reflectance to Image");
     AddChoice("level.toc",     "TOC : Top Of Canopy (EXPERIMENTAL)");
     SetParameterString("level", "toa");
 
     AddParameter(ParameterType_Empty, "milli", "Convert to milli reflectance");
     SetParameterDescription("milli", "Flag to use milli-reflectance instead of reflectance.\n"
-                            "This allows to save the image with integer pixel type (in the range [0, 1000]  instead of floating point in the range [0, 1]. In order to do that, use this option and set the output pixel type (-out filename uint16 for example)");
+                            "This allows to save the image with integer pixel type (in the range [0, 1000]  instead of floating point in the range [0, 1]. In order to do that, use this option and set the output pixel type (-out filename double for example)");
     DisableParameter("milli");
     MandatoryOff("milli");
 
@@ -132,14 +210,84 @@ private:
     EnableParameter("clamp");
     MandatoryOff("clamp");
 
-    AddParameter(ParameterType_InputFilename, "rsr", "Relative Spectral Response File");
-    std::ostringstream oss;
-    oss << "Sensor relative spectral response file"<<std::endl;
-    oss << "By default the application gets these informations in the metadata";
-    SetParameterDescription("rsr", oss.str());
-    MandatoryOff("rsr");
-
-    AddParameter(ParameterType_Group,"atmo","Atmospheric parameters");
+    //Acquisition parameters
+    AddParameter(ParameterType_Group,"acqui","Acquisition parameters");
+    SetParameterDescription("acqui","This group allows to set the parameters related to the acquisition conditions.");
+    //Minute
+    AddParameter(ParameterType_Int, "acqui.minute",   "Minute");
+    SetParameterDescription("acqui.minute", "Minute (0-59)");
+    SetMinimumParameterIntValue("acqui.minute", 0);
+    SetMaximumParameterIntValue("acqui.minute", 59);
+    SetDefaultParameterInt("acqui.minute", 0);
+    //Hour
+    AddParameter(ParameterType_Int, "acqui.hour",   "Hour");
+    SetParameterDescription("acqui.hour", "Hour (0-23)");
+    SetMinimumParameterIntValue("acqui.hour", 0);
+    SetMaximumParameterIntValue("acqui.hour", 23);
+    SetDefaultParameterInt("acqui.hour", 12);
+    //Day
+    AddParameter(ParameterType_Int, "acqui.day",   "Day");
+    SetParameterDescription("acqui.day", "Day (1-31)");
+    SetMinimumParameterIntValue("acqui.day", 1);
+    SetMaximumParameterIntValue("acqui.day", 31);
+    SetDefaultParameterInt("acqui.day", 1);
+    //Month
+    AddParameter(ParameterType_Int, "acqui.month",   "Month");
+    SetParameterDescription("acqui.month", "Month (1-12)");
+    SetMinimumParameterIntValue("acqui.month", 1);
+    SetMaximumParameterIntValue("acqui.month", 12);
+    SetDefaultParameterInt("acqui.month", 1);
+    //Year
+    AddParameter(ParameterType_Int, "acqui.year",   "Year");
+    SetParameterDescription("acqui.year", "Year");
+    SetDefaultParameterInt("acqui.year", 2000);
+    //Flux normalization coefficient
+    AddParameter(ParameterType_Float, "acqui.fluxnormcoeff",   "Flux Normalization");
+    SetParameterDescription("acqui.fluxnormcoeff", "Flux Normalization Coefficient");
+    SetMinimumParameterFloatValue("acqui.fluxnormcoeff", 0.);
+    MandatoryOff("acqui.fluxnormcoeff");
+
+    AddParameter(ParameterType_Group,"acqui.sun","Sun angles");
+    SetParameterDescription("acqui.sun","This group contains the sun angles");
+    //Sun elevation angle
+    AddParameter(ParameterType_Float, "acqui.sun.elev",   "Sun elevation angle (°)");
+    SetParameterDescription("acqui.sun.elev", "Sun elevation angle (in degrees)");
+    SetMinimumParameterFloatValue("acqui.sun.elev", 0.);
+    SetMaximumParameterFloatValue("acqui.sun.elev", 120.);
+    SetDefaultParameterFloat("acqui.sun.elev",90.0);
+    //Sun azimuth angle
+    AddParameter(ParameterType_Float, "acqui.sun.azim",   "Sun azimuth angle (°)");
+    SetParameterDescription("acqui.sun.azim", "Sun azimuth angle (in degrees)");
+    SetMinimumParameterFloatValue("acqui.sun.azim", 0.);
+    SetMaximumParameterFloatValue("acqui.sun.azim", 360.);
+    SetDefaultParameterFloat("acqui.sun.azim",0.0);
+
+    AddParameter(ParameterType_Group,"acqui.view","Viewing angles");
+    SetParameterDescription("acqui.view","This group contains the sensor viewing angles");
+    //Viewing elevation angle
+    AddParameter(ParameterType_Float, "acqui.view.elev",   "Viewing elevation angle (°)");
+    SetParameterDescription("acqui.view.elev", "Viewing elevation angle (in degrees)");
+    SetMinimumParameterFloatValue("acqui.view.elev", 0.);
+    SetMaximumParameterFloatValue("acqui.view.elev", 120.);
+    SetDefaultParameterFloat("acqui.view.elev",90.0);
+    //Viewing azimuth angle
+    AddParameter(ParameterType_Float, "acqui.view.azim",   "Viewing azimuth angle (°)");
+    SetParameterDescription("acqui.view.azim", "Viewing azimuth angle (in degrees)");
+    SetMinimumParameterFloatValue("acqui.view.azim", 0.);
+    SetMaximumParameterFloatValue("acqui.view.azim", 360.);
+    SetDefaultParameterFloat("acqui.view.azim",0.0);
+
+    //Gain & bias
+    AddParameter(ParameterType_InputFilename, "acqui.gainbias",   "Gains | biases");
+    SetParameterDescription("acqui.gainbias", "Gains | biases");
+    MandatoryOff("acqui.gainbias");
+    //Solar illuminations
+    AddParameter(ParameterType_InputFilename, "acqui.solarilluminations",   "Solar illuminations");
+    SetParameterDescription("acqui.solarilluminations", "Solar illuminations (one value per band)");
+    MandatoryOff("acqui.solarilluminations");
+
+    //Atmospheric parameters (TOC)
+    AddParameter(ParameterType_Group,"atmo","Atmospheric parameters (for TOC)");
     SetParameterDescription("atmo","This group allows to set the atmospheric parameters.");
     AddParameter(ParameterType_Choice,   "atmo.aerosol", "Aerosol Model");
     AddChoice("atmo.aerosol.noaersol",    "No Aerosol Model");
@@ -173,212 +321,620 @@ private:
     AddParameter(ParameterType_InputFilename, "atmo.aeronet", "Aeronet File");
     SetParameterDescription("atmo.aeronet","Aeronet file containing atmospheric parameters");
     MandatoryOff("atmo.aeronet");
+ 
+    AddParameter(ParameterType_InputFilename, "atmo.rsr", "Relative Spectral Response File");
+    std::ostringstream oss;
+    oss << "Sensor relative spectral response file"<<std::endl;
+    oss << "By default the application gets these informations in the metadata";
+    SetParameterDescription("atmo.rsr", oss.str());
+    MandatoryOff("atmo.rsr");
 
     // Window radius for adjacency effects correction
-    AddParameter(ParameterType_Int, "radius", "Window radius");
-    SetParameterDescription("radius","Window radius for adjacency effects corrections");
-    MandatoryOff("radius");
-    SetDefaultParameterInt("radius", 2);
+    AddParameter(ParameterType_Int, "atmo.radius", "Window radius (adjacency effects)");
+    SetParameterDescription("atmo.radius","Window radius for adjacency effects corrections"
+                            "Setting this parameters will enable the correction of"
+                            "adjacency effects");
+    MandatoryOff("atmo.radius");
+    SetDefaultParameterInt("atmo.radius", 2);
+    DisableParameter("atmo.radius");
+
+    // Pixel spacing
+    AddParameter(ParameterType_Float, "atmo.pixsize", "Pixel size (in km)");
+    SetParameterDescription("atmo.pixsize", "Pixel size (in km )used to"
+                            "compute adjacency effects, it doesn't have to"
+                            "match the image spacing");
+    SetMinimumParameterFloatValue("atmo.pixsize",0.0);
+    SetDefaultParameterFloat("atmo.pixsize", 1.);
+
+    MandatoryOff("atmo.pixsize");
 
     // Doc example parameter settings
     SetDocExampleParameterValue("in", "QB_1_ortho.tif");
     SetDocExampleParameterValue("level", "toa");
     SetDocExampleParameterValue("out", "OpticalCalibration.tif");
+
+    m_inImageName = "";
+    m_currentEnabledStateOfFluxParam=false;
   }
 
   void DoUpdateParameters()
   {
-    // Nothing to update
-  }
+    std::ostringstream ossOutput;
+    //ossOutput << std::endl << "--DoUpdateParameters--" << std::endl;
 
-  void DoExecute()
-  {
-    UInt16VectorImageType::Pointer inImage = GetParameterUInt16VectorImage("in");
+    // Manage the case where a new input is provided: we should try to retrieve image metadata
+    if (HasValue("in"))
+    {
+      bool newInputImage = false;
+      string tempName = GetParameterString("in");
 
-    //Check if valid metadata informations are available to compute ImageToLuminance and LuminanceToReflectance
-    itk::MetaDataDictionary             dict = inImage->GetMetaDataDictionary();
-    OpticalImageMetadataInterface::Pointer lImageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(dict);
+      // Check if the input image change
+      if (tempName != m_inImageName)
+      {
+        m_inImageName = tempName;
+        newInputImage = true;
+      }
+
+      if (newInputImage)
+      {
+        ossOutput << std::endl << "File: " << m_inImageName << std::endl;
+        
+        //Check if valid metadata informations are available to compute ImageToLuminance and LuminanceToReflectance
+        FloatVectorImageType::Pointer inImage = GetParameterFloatVectorImage("in");
+        itk::MetaDataDictionary             dict = inImage->GetMetaDataDictionary();
+        OpticalImageMetadataInterface::Pointer lImageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(dict);
+
+        string IMIName( lImageMetadataInterface->GetNameOfClass() ) , IMIOptDfltName("OpticalDefaultImageMetadataInterface");
+        if ( (IMIName != IMIOptDfltName))
+        {
+           ossOutput << "Sensor detected: " << lImageMetadataInterface->GetSensorID() << std::endl;
+
+           itk::VariableLengthVector<double> vlvector;
+           std::stringstream ss;
+
+           ossOutput << "Parameters extract from input image: "<< std::endl
+                     << "\tAcquisition Day: " << lImageMetadataInterface->GetDay() << std::endl
+                     << "\tAcquisition Month: " << lImageMetadataInterface->GetMonth() << std::endl
+                     << "\tAcquisition Year: " << lImageMetadataInterface->GetYear() << std::endl
+                     << "\tAcquisition Sun Elevation Angle: " << lImageMetadataInterface->GetSunElevation() << std::endl
+                     << "\tAcquisition Sun Azimuth Angle: " << lImageMetadataInterface->GetSunAzimuth() << std::endl
+                     << "\tAcquisition Viewing Elevation Angle: " << lImageMetadataInterface->GetSatElevation() << std::endl
+                     << "\tAcquisition Viewing Azimuth Angle: " << lImageMetadataInterface->GetSatAzimuth() << std::endl;
+         
+           vlvector = lImageMetadataInterface->GetPhysicalGain();
+           ossOutput << "\tAcquisition gain (per band): ";
+           for(unsigned int k=0; k<vlvector.Size(); k++)
+             ossOutput << vlvector[k] << " ";
+           ossOutput << std::endl;
+
+           vlvector = lImageMetadataInterface->GetPhysicalBias();
+           ossOutput << "\tAcquisition bias (per band): ";
+           for(unsigned int k=0; k<vlvector.Size(); k++)
+             ossOutput << vlvector[k] << " ";
+           ossOutput << std::endl;
+           DisableParameter("acqui.gainbias");
+           MandatoryOff("acqui.gainbias");
+
+           vlvector = lImageMetadataInterface->GetSolarIrradiance();
+           ossOutput << "\tSolar Irradiance (per band): ";
+           for(unsigned int k=0; k<vlvector.Size(); k++)
+             ossOutput << vlvector[k] << " ";
+           ossOutput << std::endl;
+           DisableParameter("acqui.solarilluminations");
+           MandatoryOff("acqui.solarilluminations");
+
+           if (HasUserValue("acqui.minute"))
+             ossOutput << "Acquisition Minute already set by user: no overload" <<std::endl;
+           else
+           {
+             SetParameterInt("acqui.minute", lImageMetadataInterface->GetMinute());
+           }
+
+           if (HasUserValue("acqui.hour"))
+             ossOutput << "Acquisition Hour already set by user: no overload" <<std::endl;
+           else
+           {
+             SetParameterInt("acqui.hour", lImageMetadataInterface->GetHour());
+           }
+
+           if (HasUserValue("acqui.day"))
+             ossOutput << "Acquisition Day already set by user: no overload" <<std::endl;
+           else
+           {
+             SetParameterInt("acqui.day", lImageMetadataInterface->GetDay());
+             if (IsParameterEnabled("acqui.fluxnormcoeff"))
+               DisableParameter("acqui.day");
+           }
+
+           if (HasUserValue("acqui.month"))
+             ossOutput << "Acquisition Month already set by user: no overload" <<std::endl;
+           else
+           {
+             SetParameterInt("acqui.month", lImageMetadataInterface->GetMonth());
+             if (IsParameterEnabled("acqui.fluxnormcoeff"))
+               DisableParameter("acqui.month");
+           }
+
+           if (HasUserValue("acqui.year"))
+             ossOutput << "Acquisition Year already set by user: no overload" <<std::endl;
+           else
+           {
+             SetParameterInt("acqui.year", lImageMetadataInterface->GetYear());
+           }
+
+           if (HasUserValue("acqui.sun.elev"))
+             ossOutput << "Acquisition Sun Elevation Angle already set by user: no overload" <<std::endl;
+           else
+             SetParameterFloat("acqui.sun.elev", lImageMetadataInterface->GetSunElevation());
+
+           if (HasUserValue("acqui.sun.azim"))
+             ossOutput << "Acquisition Sun Azimuth Angle already set by user: no overload" <<std::endl;
+           else
+             SetParameterFloat("acqui.sun.azim", lImageMetadataInterface->GetSunAzimuth());
+
+           if (HasUserValue("acqui.view.elev"))
+             ossOutput << "Acquisition Viewing Elevation Angle already set by user: no overload" <<std::endl;
+           else
+             SetParameterFloat("acqui.view.elev", lImageMetadataInterface->GetSatElevation());
+
+           if (HasUserValue("acqui.view.azim"))
+             ossOutput << "Acquisition Viewing Azimuth Angle already set by user: no overload" <<std::endl;
+           else
+             SetParameterFloat("acqui.view.azim", lImageMetadataInterface->GetSatAzimuth());
+
+           // Set default value so that they are stored somewhere even if
+           // they are overloaded by user values
+           SetDefaultParameterInt("acqui.minute", lImageMetadataInterface->GetMinute());
+           SetDefaultParameterInt("acqui.hour", lImageMetadataInterface->GetHour());
+           SetDefaultParameterInt("acqui.day", lImageMetadataInterface->GetDay());
+           SetDefaultParameterInt("acqui.month", lImageMetadataInterface->GetMonth());
+           SetDefaultParameterInt("acqui.year", lImageMetadataInterface->GetYear());
+           SetDefaultParameterFloat("acqui.sun.elev", lImageMetadataInterface->GetSunElevation());
+           SetDefaultParameterFloat("acqui.sun.azim", lImageMetadataInterface->GetSunAzimuth());
+           SetDefaultParameterFloat("acqui.view.elev", lImageMetadataInterface->GetSatElevation());
+           SetDefaultParameterFloat("acqui.view.azim", lImageMetadataInterface->GetSatAzimuth());
+        }
+        else
+        {
+          // Switch gain , bias and solar illumination to mandatory since
+          // they are not given in the image loaded
+          EnableParameter("acqui.gainbias");
+          EnableParameter("acqui.solarilluminations");
+          MandatoryOn("acqui.gainbias");
+          MandatoryOn("acqui.solarilluminations");
+
+          ossOutput << "Sensor unknown!"<< std::endl;
+          ossOutput << "Additional parameters are necessary, please provide them (cf. documentation)!"<< std::endl;
+
+          /*GetLogger()->Info("\n-------------------------------------------------------------\n"
+          "Sensor ID : unknown...\n"
+          "The application didn't manage to find an appropriate metadata interface; "
+          "custom values must be provided in order to perform TOA conversion.\nPlease, set the following fields :\n"
+          "- day and month of acquisition, or flux normalization coefficient;\n"
+          "- sun elevation angle;\n"
+          "- gains and biases for each band (passed by a file, see documentation);\n"
+          "- solar illuminationss for each band (passed by a file, see documentation).\n"
+          "-------------------------------------------------------------\n"); */
+        }
+      //Estimate ground spacing in kilometers
+      GroundSpacingImageType::Pointer groundSpacing = GroundSpacingImageType::New();
+      groundSpacing->SetInputImage(inImage);
+      IndexType  index;
+      vnl_random rand;
+      index[0] = static_cast<IndexValueType>(rand.lrand32(0, inImage->GetLargestPossibleRegion().GetSize()[0]));
+      index[1] = static_cast<IndexValueType>(rand.lrand32(0, inImage->GetLargestPossibleRegion().GetSize()[1]));
+      FloatType tmpSpacing = groundSpacing->EvaluateAtIndex(index);
+      const float spacingInKilometers = (std::max(tmpSpacing[0], tmpSpacing[1])) / 1000.;
+      SetDefaultParameterFloat("atmo.pixsize",spacingInKilometers);
+      if (!HasUserValue("atmo.pixsize"))
+        SetParameterFloat("atmo.pixsize",spacingInKilometers);
+      }
+    }
 
-    // Test if needed data are available : an exception will be thrown
-    // if one the following Get* return failure. the exception is then
-    // caught in the Wrapper::Application class which redirect it to
-    // the logger
-    // ImageToLuminance
-    lImageMetadataInterface->GetPhysicalGain();
-    lImageMetadataInterface->GetPhysicalBias();
+    // Manage the case where fluxnormcoeff is modified by user
+    if (m_currentEnabledStateOfFluxParam != IsParameterEnabled("acqui.fluxnormcoeff"))
+    {
+      if (IsParameterEnabled("acqui.fluxnormcoeff"))
+      {
+        ossOutput << std::endl << "Flux Normalization Coefficient will be used" << std::endl;
+        DisableParameter("acqui.day");
+        DisableParameter("acqui.month");
+        MandatoryOff("acqui.day");
+        MandatoryOff("acqui.month");
+        MandatoryOn("acqui.fluxnormcoeff");
+        m_currentEnabledStateOfFluxParam = true;
+      }
+      else
+      {
+        ossOutput << std::endl << "Day and Month will be used" << std::endl;
+        EnableParameter("acqui.day");
+        EnableParameter("acqui.month");
+        MandatoryOn("acqui.day");
+        MandatoryOn("acqui.month");
+        MandatoryOff("acqui.fluxnormcoeff");
+        m_currentEnabledStateOfFluxParam = false;
+      }
+    }
 
-    // LuminanceToReflectance
-    lImageMetadataInterface->GetDay();
-    lImageMetadataInterface->GetMonth();
+    if (!ossOutput.str().empty())
+      otbAppLogINFO(<< ossOutput.str());
 
-    lImageMetadataInterface->GetSolarIrradiance();
-    lImageMetadataInterface->GetSunElevation();
+  }
 
+  void DoExecute()
+  {
+    //Main filters instanciations
     m_ImageToLuminanceFilter                = ImageToLuminanceImageFilterType::New();
     m_LuminanceToReflectanceFilter          = LuminanceToReflectanceImageFilterType::New();
     m_ReflectanceToSurfaceReflectanceFilter = ReflectanceToSurfaceReflectanceImageFilterType::New();
+    m_ReflectanceToLuminanceFilter          = ReflectanceToLuminanceImageFilterType::New();
+    m_LuminanceToImageFilter                = LuminanceToImageImageFilterType::New();
 
-    m_ImageToLuminanceFilter->SetInput(inImage);
-    m_LuminanceToReflectanceFilter->SetInput(m_ImageToLuminanceFilter->GetOutput());
-    m_ReflectanceToSurfaceReflectanceFilter->SetInput(m_LuminanceToReflectanceFilter->GetOutput());
+    //Other instanciations
+    m_ScaleFilter = ScaleFilterOutDoubleType::New();
+    //m_ScaleFilter->InPlaceOn();
+    m_ClampFilter = ClampFilterType::New();
+    m_paramAcqui = AcquiCorrectionParametersType::New();
+    m_paramAtmo = AtmoCorrectionParametersType::New();
 
-    m_ScaleFilter = ScaleFilterType::New();
-    m_ScaleFilter->InPlaceOn();
+    FloatVectorImageType::Pointer inImage = GetParameterFloatVectorImage("in");
 
-    m_ClampFilter = ClampFilterType::New();
+    // Prepare a metadata interface on the input image.
+    itk::MetaDataDictionary           dict = inImage->GetMetaDataDictionary();
+    OpticalImageMetadataInterface::Pointer lImageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(dict);
+    std::string IMIName( lImageMetadataInterface->GetNameOfClass() );
+    std::string IMIOptDfltName("OpticalDefaultImageMetadataInterface");
+
+    // Set (Date and Day) OR FluxNormalizationCoef to corresponding filters
+    if ( !IsParameterEnabled("acqui.fluxnormcoeff") )
+    {
+      m_LuminanceToReflectanceFilter->SetDay(GetParameterInt("acqui.day"));
+      m_LuminanceToReflectanceFilter->SetMonth(GetParameterInt("acqui.month"));
+
+      m_ReflectanceToLuminanceFilter->SetDay(GetParameterInt("acqui.day"));
+      m_ReflectanceToLuminanceFilter->SetMonth(GetParameterInt("acqui.month"));
+    }
+    else
+    {
+      m_LuminanceToReflectanceFilter->SetFluxNormalizationCoefficient(GetParameterFloat("acqui.fluxnormcoeff"));
+
+      m_ReflectanceToLuminanceFilter->SetFluxNormalizationCoefficient(GetParameterFloat("acqui.fluxnormcoeff"));
+    }
+
+    // Set Sun Elevation Angle to corresponding filters
+    m_LuminanceToReflectanceFilter->SetElevationSolarAngle(GetParameterFloat("acqui.sun.elev"));
+    m_ReflectanceToLuminanceFilter->SetElevationSolarAngle(GetParameterFloat("acqui.sun.elev"));
+
+    // Set Gain and Bias to corresponding filters
+    if (IsParameterEnabled("acqui.gainbias") && HasValue("acqui.gainbias"))
+    {
+      // Try to retrieve information from file provided by user
+      string filename(GetParameterString("acqui.gainbias"));
+      
+      std::ifstream file(filename.c_str(), std::ios::in);
+      if(file)
+      {
+        string line;
+        unsigned int numLine = 0;
+        while (getline(file, line))
+        {
+          // clean line
+          std::string::size_type startPos = line.find_first_not_of(std::string(" \t\n\r"));
+          if (startPos == std::string::npos) continue;
+
+          line = line.substr(startPos);
+          if (line[0]!='#')
+          {
+            numLine++;
+            std::vector<double> values;
+            std::istringstream  iss(line);
+            string value; double dvalue;
+            while ( getline( iss, value, ':' ) )
+            {
+              std::istringstream  iss2(value);
+              iss2 >> dvalue;
+              values.push_back(dvalue);
+            }
+
+            itk::VariableLengthVector<double> vlvector;
+            vlvector.SetData(values.data(),values.size(),false);
+
+            switch (numLine)
+            {
+              case 1 :
+              m_ImageToLuminanceFilter->SetAlpha(vlvector);
+              m_LuminanceToImageFilter->SetAlpha(vlvector);
+              GetLogger()->Info("Trying to get gains/biases information... OK (1/2)\n");
+              break;
+              
+              case 2 :
+              m_ImageToLuminanceFilter->SetBeta(vlvector);
+              m_LuminanceToImageFilter->SetBeta(vlvector);
+              GetLogger()->Info("Trying to get gains/biases information... OK (2/2)\n");
+              break;
+              
+              default : itkExceptionMacro(<< "File : " << filename << " contains wrong number of lines (needs two, one for gains and one for biases)");
+            }
+          }
+        }
+        file.close();
+      }
+      else
+        itkExceptionMacro(<< "File : " << filename << " couldn't be opened");
+    }
+    else
+    {
+      //Try to retrieve information from image metadata
+      if (IMIName != IMIOptDfltName)
+      {
+        m_ImageToLuminanceFilter->SetAlpha(lImageMetadataInterface->GetPhysicalGain());
+        m_LuminanceToImageFilter->SetAlpha(lImageMetadataInterface->GetPhysicalGain());
+     
+        m_ImageToLuminanceFilter->SetBeta(lImageMetadataInterface->GetPhysicalBias());
+        m_LuminanceToImageFilter->SetBeta(lImageMetadataInterface->GetPhysicalBias());
+      }
+      else
+        itkExceptionMacro(<< "Please, provide a type of sensor supported by OTB for automatic metadata extraction! ");
+    }
+
+    // Set Solar Illumination to corresponding filters
+    if (IsParameterEnabled("acqui.solarilluminations") && HasValue("acqui.solarilluminations"))
+    {
+      // Try to retrieve information from file provided by user
+      string filename(GetParameterString("acqui.solarilluminations"));
+      
+      std::ifstream file(filename.c_str(), std::ios::in);
+      if(file)
+      {
+        std::string line;
+        while (getline(file, line))
+        {
+          // clean line
+          std::string::size_type startPos = line.find_first_not_of(std::string(" \t\n\r"));
+          if (startPos == std::string::npos) continue;
+
+          line = line.substr(startPos);
+          if (line[0]!='#')
+          {
+            std::vector<double> values;
+            std::istringstream  iss(line);
+            string value; double dvalue;
+            while ( getline( iss, value, ':' ) )
+            {
+              std::istringstream  iss2(value);
+              iss2 >> dvalue;
+              values.push_back(dvalue);
+            }
+
+            itk::VariableLengthVector<double> vlvector;
+            vlvector.SetData(values.data(),values.size(),false);
+
+            m_LuminanceToReflectanceFilter->SetSolarIllumination(vlvector);
+            m_ReflectanceToLuminanceFilter->SetSolarIllumination(vlvector);
+          }
+        }
+        file.close();
+      }
+      else
+        itkExceptionMacro(<< "File : " << filename << " couldn't be opened");
+    }
+    else
+    {
+      //Try to retrieve information from image metadata
+      if (IMIName != IMIOptDfltName)
+      {
+        m_LuminanceToReflectanceFilter->SetSolarIllumination(lImageMetadataInterface->GetSolarIrradiance());
+        m_ReflectanceToLuminanceFilter->SetSolarIllumination(lImageMetadataInterface->GetSolarIrradiance());
+      }
+      else
+        itkExceptionMacro(<< "Please, provide a type of sensor supported by OTB for automatic metadata extraction! ");
+    }
+
+    // Set acquisition parameters
+    m_paramAcqui->SetYear(GetParameterInt("acqui.year"));
+    m_paramAcqui->SetMonth(GetParameterInt("acqui.month"));
+    m_paramAcqui->SetDay(GetParameterInt("acqui.day"));
+    m_paramAcqui->SetSolarZenithalAngle(90.0 - GetParameterFloat("acqui.sun.elev"));
+    m_paramAcqui->SetSolarAzimutalAngle(GetParameterFloat("acqui.sun.azim"));
+    m_paramAcqui->SetViewingZenithalAngle(90.0 - GetParameterFloat("acqui.view.elev"));
+    m_paramAcqui->SetViewingAzimutalAngle(GetParameterFloat("acqui.view.azim"));
 
     switch ( GetParameterInt("level") )
+    {
+      case Level_IM_TOA:
       {
-      case Level_TOA:
+        GetLogger()->Info("Compute Top of Atmosphere reflectance\n");
+    
+        //Pipeline
+        m_ImageToLuminanceFilter->SetInput(inImage);
+        m_LuminanceToReflectanceFilter->SetInput(m_ImageToLuminanceFilter->GetOutput());
+
+        if (IsParameterEnabled("clamp"))
+          {
+          GetLogger()->Info("Clamp values between [0, 100]\n");
+          }
+
+        m_LuminanceToReflectanceFilter->SetUseClamp(IsParameterEnabled("clamp"));
+        m_LuminanceToReflectanceFilter->UpdateOutputInformation();
+        m_ScaleFilter->SetInput(m_LuminanceToReflectanceFilter->GetOutput());
+      }
+      break;
+      case Level_TOA_IM:
       {
-      GetLogger()->Info("Compute Top of Atmosphere reflectance\n");
-      m_LuminanceToReflectanceFilter->SetUseClamp(IsParameterEnabled("clamp"));
-
-      m_LuminanceToReflectanceFilter->UpdateOutputInformation();
-      m_ScaleFilter->SetInput(m_LuminanceToReflectanceFilter->GetOutput());
+        GetLogger()->Info("Convert Top of Atmosphere reflectance to image DN\n");
+    
+        //Pipeline
+        m_ReflectanceToLuminanceFilter->SetInput(inImage);
+        m_LuminanceToImageFilter->SetInput(m_ReflectanceToLuminanceFilter->GetOutput());
+        m_LuminanceToImageFilter->UpdateOutputInformation();
+        m_ScaleFilter->SetInput(m_LuminanceToImageFilter->GetOutput());
       }
       break;
       case Level_TOC:
       {
-      GetLogger()->Info("Compute Top of Canopy reflectance\n");
-      m_ReflectanceToSurfaceReflectanceFilter->SetIsSetAtmosphericRadiativeTerms(false);
-      m_ReflectanceToSurfaceReflectanceFilter->SetUseGenerateParameters(true);
-      m_ReflectanceToSurfaceReflectanceFilter->UpdateOutputInformation();
-      m_ReflectanceToSurfaceReflectanceFilter->SetUseGenerateParameters(false);
+        GetLogger()->Info("Compute Top of Canopy reflectance\n");
 
-      m_AtmosphericParam = m_ReflectanceToSurfaceReflectanceFilter->GetCorrectionParameters();
-      //AerosolModelType aeroMod = AtmosphericCorrectionParametersType::NO_AEROSOL;
+        //Pipeline
+        m_ImageToLuminanceFilter->SetInput(inImage);
+        m_LuminanceToReflectanceFilter->SetInput(m_ImageToLuminanceFilter->GetOutput());
+        m_ReflectanceToSurfaceReflectanceFilter->SetInput(m_LuminanceToReflectanceFilter->GetOutput());
+        m_ReflectanceToSurfaceReflectanceFilter->SetAcquiCorrectionParameters(m_paramAcqui);
+        m_ReflectanceToSurfaceReflectanceFilter->SetAtmoCorrectionParameters(m_paramAtmo);
 
-      switch ( GetParameterInt("atmo.aerosol") )
-        {
-        case Aerosol_Desertic:
+        //AerosolModelType aeroMod = AtmosphericCorrectionParametersType::NO_AEROSOL;
+
+        switch ( GetParameterInt("atmo.aerosol") )
         {
-        // Aerosol_Desertic correspond to 4 in the enum but actually in
-        // the class atmosphericParam it is known as parameter 5
-        m_AtmosphericParam->SetAerosolModel(static_cast<AerosolModelType>(5));
+          case Aerosol_Desertic:
+          {
+            // Aerosol_Desertic correspond to 4 in the enum but actually in
+            // the class atmosphericParam it is known as parameter 5
+            m_paramAtmo->SetAerosolModel(static_cast<AerosolModelType>(5));
+          }
+          break;
+          default:
+          {
+            m_paramAtmo->SetAerosolModel(static_cast<AerosolModelType>(GetParameterInt("atmo.aerosol")));
+          }
+          break;
         }
-        break;
-        default:
+        
+        // Set the atmospheric param
+        m_paramAtmo->SetOzoneAmount(GetParameterFloat("atmo.oz"));
+        m_paramAtmo->SetWaterVaporAmount(GetParameterFloat("atmo.wa"));
+        m_paramAtmo->SetAtmosphericPressure(GetParameterFloat("atmo.pressure"));
+        m_paramAtmo->SetAerosolOptical(GetParameterFloat("atmo.opt"));
+
+        // Relative Spectral Response File
+        if (IsParameterEnabled("atmo.rsr"))
         {
-        m_AtmosphericParam->SetAerosolModel(static_cast<AerosolModelType>(GetParameterInt("atmo.aerosol")));
-        }
-        break;
+          m_paramAcqui->LoadFilterFunctionValue(GetParameterString("atmo.rsr"));
         }
-      // Set the atmospheric param
-      m_AtmosphericParam->SetOzoneAmount(GetParameterFloat("atmo.oz"));
-      m_AtmosphericParam->SetWaterVaporAmount(GetParameterFloat("atmo.wa"));
-      m_AtmosphericParam->SetAtmosphericPressure(GetParameterFloat("atmo.pressure"));
-      m_AtmosphericParam->SetAerosolOptical(GetParameterFloat("atmo.opt"));
-
-      // Relative Spectral Response File
-      if (IsParameterEnabled("rsr"))
+        else if (IMIName != IMIOptDfltName)
         {
-        m_ReflectanceToSurfaceReflectanceFilter->SetFilterFunctionValuesFileName(GetParameterString("rsr"));
+          if (lImageMetadataInterface->GetSpectralSensitivity()->Size() > 0)
+            m_paramAcqui->SetWavelengthSpectralBand(lImageMetadataInterface->GetSpectralSensitivity());
         }
-
-      // Aeronet file
-      if (IsParameterEnabled("atmo.aeronet"))
+        // Check that m_paramAcqui contains a real spectral profile.
+        if (m_paramAcqui->GetWavelengthSpectralBand()->Size() == 0)
+          {
+          otbAppLogWARNING("No relative spectral response found, using "
+                           "default response (constant between 0.3 and 1.0µm)");
+          AcquiCorrectionParametersType::WavelengthSpectralBandVectorType spectralDummy;
+          spectralDummy->Clear();
+          for (unsigned int i = 0; i < inImage->GetNumberOfComponentsPerPixel(); ++i)
+            {
+              spectralDummy->PushBack(FilterFunctionValues::New());
+            }
+          }
+
+        // Aeronet file
+        if (IsParameterEnabled("atmo.aeronet"))
         {
-        GetLogger()->Info("Use aeronet file to retrieve atmospheric parameters");
-        m_ReflectanceToSurfaceReflectanceFilter->SetAeronetFileName(GetParameterString("atmo.aeronet"));
+          GetLogger()->Info("Use Aeronet file to retrieve atmospheric parameters\n");
+          m_paramAtmo->SetAeronetFileName(GetParameterString("atmo.aeronet"));
+          m_paramAtmo->UpdateAeronetData(GetParameterInt("acqui.year"),
+                                         GetParameterInt("acqui.month"),
+                                         GetParameterInt("acqui.day"),
+                                         GetParameterInt("acqui.hour"),
+                                         GetParameterInt("acqui.minute"),
+                                         0.4);
         }
 
-      m_ReflectanceToSurfaceReflectanceFilter->SetIsSetAtmosphericRadiativeTerms(false);
-      m_ReflectanceToSurfaceReflectanceFilter->SetUseGenerateParameters(true);
-      m_ReflectanceToSurfaceReflectanceFilter->GenerateParameters();
-      m_ReflectanceToSurfaceReflectanceFilter->UpdateOutputInformation();
-      m_ReflectanceToSurfaceReflectanceFilter->SetUseGenerateParameters(false);
-
-      // std::ostringstream oss_atmo;
-      // oss_atmo << "Atmospheric parameters: " << std::endl;
-      // oss_atmo << m_AtmosphericParam;
-
-      // GetLogger()->Info(oss_atmo.str());
-
-      std::ostringstream oss;
-      oss.str("");
-      oss << std::endl << m_AtmosphericParam;
-
-      AtmosphericRadiativeTerms::Pointer atmoTerms =  m_ReflectanceToSurfaceReflectanceFilter->GetAtmosphericRadiativeTerms();
-      oss << std::endl << std::endl << atmoTerms;
-
-      GetLogger()->Info("Atmospheric correction parameters compute by 6S : " + oss.str());
-
-      //Compute adjacency effect
-      //   m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter
-      //   = SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::New();
-
-      //   m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetInput(m_ReflectanceToSurfaceReflectanceFilter->GetOutput());
-      // m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->
-      //   SetAtmosphericRadiativeTerms(
-      //     m_ReflectanceToSurfaceReflectanceFilter->GetAtmosphericRadiativeTerms());
-      // m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetZenithalViewingAngle(
-      //   m_AtmosphericParam->GetViewingZenithalAngle());
-      // m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetWindowRadius(GetParameterInt("radius"));
+        m_ReflectanceToSurfaceReflectanceFilter->UpdateOutputInformation();
+        m_ReflectanceToSurfaceReflectanceFilter->SetIsSetAtmosphericRadiativeTerms(false);
+        m_ReflectanceToSurfaceReflectanceFilter->SetUseGenerateParameters(true);
+        m_ReflectanceToSurfaceReflectanceFilter->GenerateParameters();
+        m_ReflectanceToSurfaceReflectanceFilter->SetUseGenerateParameters(false);
 
-      // //estimate ground spacing in kilometers
-      // GroundSpacingImageType::Pointer groundSpacing = GroundSpacingImageType::New();
+        // std::ostringstream oss_atmo;
+        // oss_atmo << "Atmospheric parameters: " << std::endl;
+        // oss_atmo << m_AtmosphericParam;
+        // GetLogger()->Info(oss_atmo.str());
 
-      // groundSpacing->SetInputImage(inImage);
-      // IndexType  index;
+        std::ostringstream oss;
+        oss.str("");
+        oss << std::endl << m_paramAtmo;
 
-      // vnl_random rand;
+        AtmosphericRadiativeTerms::Pointer atmoTerms =  m_ReflectanceToSurfaceReflectanceFilter->GetAtmosphericRadiativeTerms();
+        oss << std::endl << std::endl << atmoTerms << std::endl;
 
-      // index[0] = static_cast<IndexValueType>(rand.lrand32(0, inImage->GetLargestPossibleRegion().GetSize()[0]));
-      // index[1] = static_cast<IndexValueType>(rand.lrand32(0, inImage->GetLargestPossibleRegion().GetSize()[1]));
-      // FloatType tmpSpacing = groundSpacing->EvaluateAtIndex(index);
+        GetLogger()->Info("Atmospheric correction parameters compute by 6S : " + oss.str());
 
-      // const float spacingInKilometers = (std::max(tmpSpacing[0], tmpSpacing[1])) / 1000.;
-
-      // // std::ostringstream oss2;
-      // //  oss2.str("");
-      // //  oss2 << spacingInKilometers;
-
-      // //  GetLogger()->Info("Spacing in kilometers " + oss2.str());
-      // m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->
-      //   SetPixelSpacingInKilometers(spacingInKilometers);
+        bool adjComputation=false;
+        if (IsParameterEnabled("atmo.radius"))
+        {
+          GetLogger()->Info("Compute adjacency effects\n");
+          adjComputation=true;
+          //Compute adjacency effect
+          m_SurfaceAdjacencyEffectCorrectionSchemeFilter
+            = SurfaceAdjacencyEffectCorrectionSchemeFilterType::New();
+
+          m_SurfaceAdjacencyEffectCorrectionSchemeFilter->SetInput(m_ReflectanceToSurfaceReflectanceFilter->GetOutput());
+          m_SurfaceAdjacencyEffectCorrectionSchemeFilter->
+            SetAtmosphericRadiativeTerms(
+              m_ReflectanceToSurfaceReflectanceFilter->GetAtmosphericRadiativeTerms());
+          m_SurfaceAdjacencyEffectCorrectionSchemeFilter->SetZenithalViewingAngle(
+            m_paramAcqui->GetViewingZenithalAngle());
+          m_SurfaceAdjacencyEffectCorrectionSchemeFilter->SetWindowRadius(GetParameterInt("atmo.radius"));
+          m_SurfaceAdjacencyEffectCorrectionSchemeFilter->
+            SetPixelSpacingInKilometers(GetParameterFloat("atmo.pixsize"));
+
+          m_SurfaceAdjacencyEffectCorrectionSchemeFilter->UpdateOutputInformation();
+        }
 
-      // //rescale the surface reflectance in milli-reflectance
-      // m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->UpdateOutputInformation();
-      // //m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->Update();
-      // m_ScaleFilter->SetInput(m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter->GetOutput());
-      if (!IsParameterEnabled("clamp"))
+        //Rescale the surface reflectance in milli-reflectance
+        if (!IsParameterEnabled("clamp"))
         {
-        m_ScaleFilter->SetInput(m_ReflectanceToSurfaceReflectanceFilter->GetOutput());
+          if (!adjComputation)
+            m_ScaleFilter->SetInput(m_ReflectanceToSurfaceReflectanceFilter->GetOutput());
+          else
+            m_ScaleFilter->SetInput(m_SurfaceAdjacencyEffectCorrectionSchemeFilter->GetOutput());
         }
-      else
+        else
         {
-        GetLogger()->Info("Clamp values between [0, 100]");
-        m_ClampFilter->SetInput(m_ReflectanceToSurfaceReflectanceFilter->GetOutput());
-        m_ClampFilter->ClampOutside(0.0, 1.0);
-        m_ScaleFilter->SetInput(m_ClampFilter->GetOutput());
+          GetLogger()->Info("Clamp values between [0, 100]\n");
+          
+          if (!adjComputation)
+            m_ClampFilter->SetInput(m_ReflectanceToSurfaceReflectanceFilter->GetOutput());
+          else
+            m_ClampFilter->SetInput(m_SurfaceAdjacencyEffectCorrectionSchemeFilter->GetOutput());
+          
+          m_ClampFilter->ClampOutside(0.0, 1.0);
+          m_ScaleFilter->SetInput(m_ClampFilter->GetOutput());
         }
       }
       break;
-      }
+    }
 
     // Output Image
-    double scale = 1.0;
+    double scale = 1.;
 
     if (IsParameterEnabled("milli"))
-      {
-      GetLogger()->Info("Use milli-reflectance");
-      scale = 1000.;
-      }
-
-    m_ScaleFilter->SetCoef(scale);
-
+    {
+    GetLogger()->Info("Use milli-reflectance\n");
+      if ( (GetParameterInt("level") == Level_IM_TOA) || (GetParameterInt("level") == Level_TOC) )
+        scale =1000.;
+      if (GetParameterInt("level") == Level_TOA_IM)
+        scale=1. / 1000.;
+    }
+    m_ScaleFilter->SetConstant(scale);
+    
     SetParameterOutputImage("out", m_ScaleFilter->GetOutput());
   }
 
+  //Keep object references as a members of the class, else the pipeline will be broken after exiting DoExecute().
   ImageToLuminanceImageFilterType ::Pointer               m_ImageToLuminanceFilter;
   LuminanceToReflectanceImageFilterType::Pointer          m_LuminanceToReflectanceFilter;
+  ReflectanceToLuminanceImageFilterType::Pointer          m_ReflectanceToLuminanceFilter;
+  LuminanceToImageImageFilterType::Pointer                m_LuminanceToImageFilter;
   ReflectanceToSurfaceReflectanceImageFilterType::Pointer m_ReflectanceToSurfaceReflectanceFilter;
-  ScaleFilterType::Pointer                                m_ScaleFilter;
-  AtmosphericCorrectionParametersType::Pointer            m_AtmosphericParam;
+  ScaleFilterOutDoubleType::Pointer                       m_ScaleFilter;
+  AtmoCorrectionParametersPointerType                     m_paramAtmo;
+  AcquiCorrectionParametersPointerType                    m_paramAcqui;
   ClampFilterType::Pointer                                m_ClampFilter;
 
-  SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::Pointer m_SurfaceAdjacencyEffect6SCorrectionSchemeFilter;
+  SurfaceAdjacencyEffectCorrectionSchemeFilterType::Pointer m_SurfaceAdjacencyEffectCorrectionSchemeFilter;
 };
 
 }// namespace Wrapper
diff --git a/Applications/Segmentation/otbLSMSVectorization.cxx b/Applications/Segmentation/otbLSMSVectorization.cxx
index 4cfa661..7b22a70 100644
--- a/Applications/Segmentation/otbLSMSVectorization.cxx
+++ b/Applications/Segmentation/otbLSMSVectorization.cxx
@@ -111,7 +111,7 @@ private:
   {
     clock_t tic = clock();
 
-    const char * shapefile   = GetParameterString("out").c_str();
+    std::string shapefile(GetParameterString("out"));
 
     unsigned long sizeTilesX = GetParameterInt("tilesizex");
     unsigned long sizeTilesY = GetParameterInt("tilesizey");
@@ -161,8 +161,8 @@ private:
     std::vector<std::string> options;
 
     ogrDS = otb::ogr::DataSource::New(shapefile, otb::ogr::DataSource::Modes::Overwrite);
-    std::string layername = itksys::SystemTools::GetFilenameName(shapefile);
-    std::string extension = itksys::SystemTools::GetFilenameLastExtension(shapefile);
+    std::string layername = itksys::SystemTools::GetFilenameName(shapefile.c_str());
+    std::string extension = itksys::SystemTools::GetFilenameLastExtension(shapefile.c_str());
     layername = layername.substr(0,layername.size()-(extension.size()));
     layer = ogrDS->CreateLayer(layername, &oSRS, wkbMultiPolygon, options);
 
@@ -260,10 +260,6 @@ private:
     sqloss.str("");
     sqloss<<"SELECT * FROM \""<<layername<<"\" ORDER BY label";
     otb::ogr::Layer layerTmp=ogrDS->ExecuteSQL(sqloss.str().c_str(), NULL, NULL);
-
-    bool goesOn = true;
-    int nbFeatures = layerTmp.ogr().GetFeatureCount(true);
-    int nb = 0;
     otb::ogr::Feature firstFeature = layerTmp.ogr().GetNextFeature();
 
     //Geometry fusion
@@ -360,5 +356,3 @@ private:
 }
 
 OTB_APPLICATION_EXPORT(otb::Wrapper::LSMSVectorization)
-
-
diff --git a/Applications/Segmentation/otbMeanShiftSmoothing.cxx b/Applications/Segmentation/otbMeanShiftSmoothing.cxx
index 3997612..8b1ade9 100644
--- a/Applications/Segmentation/otbMeanShiftSmoothing.cxx
+++ b/Applications/Segmentation/otbMeanShiftSmoothing.cxx
@@ -49,7 +49,7 @@ private:
     SetDescription("Perform mean shift filtering");
 
     // Documentation
-    SetDocName("Mean Shift filtering (can be used as Exact Large-Scale Mean-Shift segmentation, step 1)");
+    SetDocName("Exact Large-Scale Mean-Shift segmentation, step 1 (smoothing)");
     SetDocLongDescription("This application performs mean shift fitlering (multi-threaded).");
     SetDocLimitations("With mode search option, the result will slightly depend on thread number.");
     SetDocAuthors("OTB-Team");
@@ -66,6 +66,7 @@ private:
 
     AddParameter(ParameterType_OutputImage,  "foutpos",    "Spatial image");
     SetParameterDescription( "foutpos", " The spatial image output. Spatial image output is a displacement map (pixel position after convergence).");
+    MandatoryOff("foutpos");
 
     AddParameter(ParameterType_Int, "spatialr", "Spatial radius");
     SetParameterDescription("spatialr", "Spatial radius of the neighborhood.");
@@ -99,12 +100,12 @@ private:
     AddParameter(ParameterType_Empty, "modesearch", "Mode search.");
     SetParameterDescription("modesearch", "If activated pixel iterative convergence is stopped if the path . Be careful, with this option, the result will slightly depend on thread number");
     EnableParameter("modesearch");
-    MandatoryOff("modesearch");
 
 
     // Doc example parameter settings
     SetDocExampleParameterValue("in", "maur_rgb.png");
     SetDocExampleParameterValue("fout", "MeanShift_FilterOutput.tif");
+    SetDocExampleParameterValue("foutpos", "MeanShift_SpatialOutput.tif");
     SetDocExampleParameterValue("spatialr", "16");
     SetDocExampleParameterValue("ranger", "16");
     SetDocExampleParameterValue("thres", "0.1");
@@ -114,7 +115,16 @@ private:
 
   void DoUpdateParameters()
   {
-    // Nothing to do here : all parameters are independent
+    if(IsParameterEnabled("modesearch"))
+      {
+      MandatoryOn("foutpos");
+      EnableParameter("foutpos");
+      }
+    else
+      {
+      MandatoryOff("foutpos");
+      DisableParameter("foutpos");
+      }
   }
 
   void DoExecute()
@@ -131,6 +141,18 @@ private:
     m_Filter->SetMaxIterationNumber(GetParameterInt("maxiter"));
     m_Filter->SetRangeBandwidthRamp(GetParameterFloat("rangeramp"));
 
+    //Compute the margin used to ensure exact results (tile wise smoothing)
+    //This margin is valid for the default uniform kernel used by the
+    //MeanShiftSmoothing filter (bandwidth equal to radius in this case)
+    const unsigned int margin = (m_Filter->GetMaxIterationNumber() * m_Filter->GetSpatialBandwidth()) + 1;
+    
+    otbAppLogINFO(<<"Margin of " << margin << " pixels applied to each tile to stabilized mean shift filtering." << std::endl);
+
+    if ( margin > std::min(input->GetLargestPossibleRegion().GetSize()[0],input->GetLargestPossibleRegion().GetSize()[1]) )
+      {
+      otbAppLogWARNING(<<"Margin value exceed the input image size." << std::endl);
+      }
+
     SetParameterOutputImage("fout", m_Filter->GetOutput());
     SetParameterOutputImage("foutpos", m_Filter->GetSpatialOutput());
     if(!IsParameterEnabled("modesearch"))
diff --git a/Applications/Segmentation/otbSegmentation.cxx b/Applications/Segmentation/otbSegmentation.cxx
index 8ba85e4..5b07a5c 100644
--- a/Applications/Segmentation/otbSegmentation.cxx
+++ b/Applications/Segmentation/otbSegmentation.cxx
@@ -380,12 +380,6 @@ private:
   GenericApplySegmentation(otb::StreamingImageToOGRLayerSegmentationFilter<TInputImage,
                            TSegmentationFilter> * streamingVectorizedFilter, TInputImage * inputImage, const otb::ogr::Layer& layer, const unsigned int outputNb)
   {
-    typedef  TSegmentationFilter             SegmentationFilterType;
-    typedef  typename SegmentationFilterType::Pointer SegmentationFilterPointerType;
-    typedef otb::StreamingImageToOGRLayerSegmentationFilter
-      <TInputImage,
-       SegmentationFilterType>          StreamingVectorizedSegmentationOGRType;
-
     // Retrieve tile size parameter
     const unsigned int tileSize = static_cast<unsigned int> (this->GetParameterInt("mode.vector.tilesize"));
     // Retrieve the 8-connected option
diff --git a/Applications/Utils/CMakeLists.txt b/Applications/Utils/CMakeLists.txt
index d2bbbe6..929493b 100644
--- a/Applications/Utils/CMakeLists.txt
+++ b/Applications/Utils/CMakeLists.txt
@@ -59,8 +59,8 @@ OTB_CREATE_APPLICATION(NAME           VectorDataTransform
                        SOURCES        otbVectorDataTransform.cxx
                        LINK_LIBRARIES OTBBasicFilters)
 
-OTB_CREATE_APPLICATION(NAME           VectorDataExtractROIApplication
-                       SOURCES        otbVectorDataExtractROIApplication.cxx
+OTB_CREATE_APPLICATION(NAME           VectorDataExtractROI
+                       SOURCES        otbVectorDataExtractROI.cxx
                        LINK_LIBRARIES OTBBasicFilters)
 
 #OTB_CREATE_APPLICATION(NAME           DEMConvert
diff --git a/Applications/Utils/otbColorMapping.cxx b/Applications/Utils/otbColorMapping.cxx
index bae95de..e6fff31 100644
--- a/Applications/Utils/otbColorMapping.cxx
+++ b/Applications/Utils/otbColorMapping.cxx
@@ -636,8 +636,6 @@ private:
       otbAppLogINFO("The map contains :"<<labelToMeanIntensityMap.size()<<" labels."<<std::endl);
       VectorPixelType color(3);
 
-      typedef itk::NumericTraits<FloatVectorImageType::InternalPixelType> NumericTraitsType;
-
       for (mapIt = labelToMeanIntensityMap.begin();
            mapIt != labelToMeanIntensityMap.end();
            ++mapIt)
@@ -827,5 +825,3 @@ private:
 }
 
 OTB_APPLICATION_EXPORT(otb::Wrapper::ColorMapping)
-
-
diff --git a/Applications/Utils/otbCompareImages.cxx b/Applications/Utils/otbCompareImages.cxx
index 887a745..4b33618 100644
--- a/Applications/Utils/otbCompareImages.cxx
+++ b/Applications/Utils/otbCompareImages.cxx
@@ -201,6 +201,7 @@ private:
     // Compute comparaison
     m_CompareFilter->SetInput1(m_ExtractRefFilter->GetOutput());
     m_CompareFilter->SetInput2(m_ExtractMeasFilter->GetOutput());
+    m_CompareFilter->SetPhysicalSpaceCheck(false);
     m_CompareFilter->Update();
 
     // Show result
diff --git a/Applications/Utils/otbExtractROI.cxx b/Applications/Utils/otbExtractROI.cxx
index ad4c319..827e723 100644
--- a/Applications/Utils/otbExtractROI.cxx
+++ b/Applications/Utils/otbExtractROI.cxx
@@ -224,7 +224,7 @@ private:
       // Setup the DEM Handler
       otb::Wrapper::ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(this,"mode.fit.elev");
 
-      FloatVectorImageType::Pointer referencePtr = this->GetParameterImage<FloatVectorImageType>("mode.fit.ref");
+      FloatVectorImageType::Pointer referencePtr = this->GetParameterImage("mode.fit.ref");
       referencePtr->UpdateOutputInformation();
 
       RSTransformType::Pointer rsTransform = RSTransformType::New();
diff --git a/Applications/Utils/otbMultiResolutionPyramid.cxx b/Applications/Utils/otbMultiResolutionPyramid.cxx
index c50bce8..3718fee 100644
--- a/Applications/Utils/otbMultiResolutionPyramid.cxx
+++ b/Applications/Utils/otbMultiResolutionPyramid.cxx
@@ -188,6 +188,7 @@ private:
 
       // Set the filename of the current output image
       paramOut->SetFileName(oss.str());
+      otbAppLogINFO(<< "File: "<<paramOut->GetFileName() << " will be written.");
       paramOut->SetValue(m_ShrinkFilter->GetOutput());
       paramOut->SetPixelType(this->GetParameterOutputImagePixelType("out"));
       // Add the current level to be written
diff --git a/Applications/Utils/otbReadImageInfo.cxx b/Applications/Utils/otbReadImageInfo.cxx
index e198ff6..a1c1b49 100644
--- a/Applications/Utils/otbReadImageInfo.cxx
+++ b/Applications/Utils/otbReadImageInfo.cxx
@@ -281,7 +281,7 @@ private:
     SetParameterFloat("originx", inImage->GetOrigin()[0]);
     SetParameterFloat("originy", inImage->GetOrigin()[1]);
 
-    ossOutput << "\tOrigin :  [" << GetParameterFloat("originx") << "," << GetParameterInt("originy") << "]" << std::endl;
+    ossOutput << "\tOrigin :  [" << GetParameterFloat("originx") << "," << GetParameterFloat("originy") << "]" << std::endl;
 
     //Get image spacing
     SetParameterFloat("spacingx", inImage->GetSpacing()[0]);
diff --git a/Applications/Utils/otbSplitImage.cxx b/Applications/Utils/otbSplitImage.cxx
index 48e780b..7bbce90 100644
--- a/Applications/Utils/otbSplitImage.cxx
+++ b/Applications/Utils/otbSplitImage.cxx
@@ -120,6 +120,7 @@ private:
 
       // Set the filename of the current output image
       paramOut->SetFileName(oss.str());
+      otbAppLogINFO(<< "File: "<<paramOut->GetFileName() << " will be written.");
       paramOut->SetValue(m_Filter->GetOutput());
       paramOut->SetPixelType(this->GetParameterOutputImagePixelType("out"));
       // Add the current level to be written
diff --git a/Applications/Utils/otbVectorDataExtractROI.cxx b/Applications/Utils/otbVectorDataExtractROI.cxx
new file mode 100644
index 0000000..3084e59
--- /dev/null
+++ b/Applications/Utils/otbVectorDataExtractROI.cxx
@@ -0,0 +1,169 @@
+/*=========================================================================
+
+ Program:   ORFEO Toolbox
+ Language:  C++
+ Date:      $Date$
+ Version:   $Revision$
+
+
+ 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
+ PURPOSE.  See the above copyright notices for more information.
+
+ =========================================================================*/
+#include "otbWrapperApplication.h"
+#include "otbWrapperApplicationFactory.h"
+
+#include "otbVectorDataExtractROI.h"
+#include "otbVectorDataProperties.h"
+
+//Misc
+#include "otbRemoteSensingRegion.h"
+
+// Elevation handler
+#include "otbWrapperElevationParametersHandler.h"
+
+#include <iostream>
+
+namespace otb
+{
+namespace Wrapper
+{
+
+class VectorDataExtractROI : public Application
+{
+public:
+  /** Standard class typedefs. */
+  typedef VectorDataExtractROI  Self;
+  typedef Application                      Superclass;
+  typedef itk::SmartPointer<Self>          Pointer;
+  typedef itk::SmartPointer<const Self>    ConstPointer;
+
+  /** Standard macro */
+  itkNewMacro(Self);
+
+  itkTypeMacro(VectorDataExtractROI, otb::Application);
+
+  /** Filters typedef */
+  // Images
+
+  typedef FloatVectorImageType::PointType                 PointType;
+  typedef FloatVectorImageType::IndexType                 IndexType;
+  typedef FloatVectorImageType::SizeType                  SizeType;
+  typedef FloatVectorImageType::SpacingType               SpacingType;
+
+  typedef otb::VectorDataExtractROI<VectorDataType>       VectorDataExtractROIType;
+
+  // Misc
+  typedef otb::RemoteSensingRegion<double>                RemoteSensingRegionType;
+
+private:
+  void DoInit()
+  {
+    SetName("VectorDataExtractROI");
+    SetDescription("Perform an extract ROI on the input vector data according to the input image extent");
+
+    SetDocName("VectorData Extract ROI");
+    SetDocLongDescription("This application extracts the vector data features"
+                          " belonging to a region specified by the support "
+                          "image envelope. Any features intersecting the "
+                          "support region is copied to output. The output "
+                          "geometries are NOT cropped.");
+    SetDocLimitations("None");
+    SetDocAuthors("OTB-Team");
+    SetDocSeeAlso(" ");
+
+    AddDocTag(Tags::Vector);
+
+    AddParameter(ParameterType_Group,"io","Input and output data");
+    SetParameterDescription("io", "Group containing input and output parameters");
+
+    AddParameter(ParameterType_InputVectorData, "io.vd", "Input Vector data");
+    SetParameterDescription("io.vd", "Input vector data");
+
+    AddParameter(ParameterType_InputImage,      "io.in", "Support image");
+    SetParameterDescription("io.in", "Support image that specifies the extracted region");
+
+    AddParameter(ParameterType_OutputVectorData,"io.out","Output Vector data");
+    SetParameterDescription("io.out", "Output extracted vector data");
+
+    // Elevation
+    ElevationParametersHandler::AddElevationParameters(this, "elev");
+
+    // Doc example parameter settings
+    SetDocExampleParameterValue("io.in", "qb_RoadExtract.tif");
+    SetDocExampleParameterValue("io.vd", "qb_RoadExtract_classification.shp");
+    SetDocExampleParameterValue("io.out", "apTvUtVectorDataExtractROIApplicationTest.shp");
+  }
+
+  void DoUpdateParameters()
+  {
+    // Nothing to do here for the parameters : all are independent
+  }
+
+  void DoExecute()
+  {
+    // Get the inputs
+    VectorDataType*        vd      = GetParameterVectorData("io.vd");
+    FloatVectorImageType*  inImage = GetParameterImage("io.in");
+
+    // Extracting the VectorData
+    m_VdExtract = VectorDataExtractROIType::New();
+    m_VdExtract->SetInput(vd);
+
+    // Find the geographic region of interest
+    // Get the index of the corner of the image
+    itk::ContinuousIndex<double,2> ul(inImage->GetLargestPossibleRegion().GetIndex());
+    PointType pul, pur, pll, plr;
+    ul[0] += -0.5;
+    ul[1] += -0.5;
+    itk::ContinuousIndex<double,2> ur, ll, lr;
+    ur = ul;
+    ll = ul;
+    lr = ul;
+    ur[0] += inImage->GetLargestPossibleRegion().GetSize()[0];
+    lr[0] += inImage->GetLargestPossibleRegion().GetSize()[0];
+    lr[1] += inImage->GetLargestPossibleRegion().GetSize()[1];
+    ll[1] += inImage->GetLargestPossibleRegion().GetSize()[1];
+
+    // Transform to physical point
+    inImage->TransformContinuousIndexToPhysicalPoint(ul, pul);
+    inImage->TransformContinuousIndexToPhysicalPoint(ur, pur);
+    inImage->TransformContinuousIndexToPhysicalPoint(ll, pll);
+    inImage->TransformContinuousIndexToPhysicalPoint(lr, plr);
+
+    // Build the cartographic region
+    RemoteSensingRegionType            rsRegion;
+    RemoteSensingRegionType::IndexType rsOrigin;
+    RemoteSensingRegionType::SizeType  rsSize;
+    rsOrigin[0] = std::min(pul[0], plr[0]);
+    rsOrigin[1] = std::min(pul[1], plr[1]);
+    rsSize[0] = vcl_abs(pul[0] - plr[0]);
+    rsSize[1] = vcl_abs(pul[1] - plr[1]);
+
+    rsRegion.SetOrigin(rsOrigin);
+    rsRegion.SetSize(rsSize);
+    rsRegion.SetRegionProjection(inImage->GetProjectionRef());
+    rsRegion.SetKeywordList(inImage->GetImageKeywordlist());
+
+    // Set the cartographic region to the extract roi filter
+    m_VdExtract->SetRegion(rsRegion);
+
+    // Setup the DEM Handler
+    otb::Wrapper::ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(this,"elev");
+
+    // Set the output vectorData
+    SetParameterOutputVectorData("io.out", m_VdExtract->GetOutput());
+  }
+
+  VectorDataExtractROIType::Pointer       m_VdExtract;
+};
+
+}
+}
+
+OTB_APPLICATION_EXPORT(otb::Wrapper::VectorDataExtractROI)
diff --git a/Applications/Utils/otbVectorDataExtractROIApplication.cxx b/Applications/Utils/otbVectorDataExtractROIApplication.cxx
deleted file mode 100644
index 8fa1898..0000000
--- a/Applications/Utils/otbVectorDataExtractROIApplication.cxx
+++ /dev/null
@@ -1,176 +0,0 @@
-/*=========================================================================
-
- Program:   ORFEO Toolbox
- Language:  C++
- Date:      $Date$
- Version:   $Revision$
-
-
- 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
- PURPOSE.  See the above copyright notices for more information.
-
- =========================================================================*/
-#include "otbWrapperApplication.h"
-#include "otbWrapperApplicationFactory.h"
-
-#include "otbVectorDataExtractROI.h"
-#include "otbVectorDataProjectionFilter.h"
-#include "otbVectorDataProperties.h"
-
-//Misc
-#include "otbRemoteSensingRegion.h"
-
-// Elevation handler
-#include "otbWrapperElevationParametersHandler.h"
-
-#include <iostream>
-
-namespace otb
-{
-namespace Wrapper
-{
-
-class VectorDataExtractROIApplication : public Application
-{
-public:
-  /** Standard class typedefs. */
-  typedef VectorDataExtractROIApplication  Self;
-  typedef Application                      Superclass;
-  typedef itk::SmartPointer<Self>          Pointer;
-  typedef itk::SmartPointer<const Self>    ConstPointer;
-
-  /** Standard macro */
-  itkNewMacro(Self);
-
-  itkTypeMacro(VectorDataExtractROIApplication, otb::Application);
-
-  /** Filters typedef */
-  // Images
-
-  typedef FloatVectorImageType::PointType                 PointType;
-  typedef FloatVectorImageType::IndexType                 IndexType;
-  typedef FloatVectorImageType::SizeType                  SizeType;
-  typedef FloatVectorImageType::SpacingType               SpacingType;
-
-  typedef VectorDataProjectionFilter<
-    VectorDataType, VectorDataType>                       VectorDataProjectionFilterType;
-  typedef VectorDataExtractROI<VectorDataType>            VectorDataExtractROIType;
-
-  // Misc
-  typedef otb::RemoteSensingRegion<double>                RemoteSensingRegionType;
-
-private:
-  void DoInit()
-  {
-    SetName("VectorDataExtractROIApplication");
-    SetDescription("Perform an extract ROI on the input vector data according to the input image extent");
-
-    SetDocName("VectorData Extract ROI");
-    SetDocLongDescription("This application extracts the vector data features belonging to a region specified by the support image envelope");
-    SetDocLimitations("None");
-    SetDocAuthors("OTB-Team");
-    SetDocSeeAlso(" ");
-
-    AddDocTag(Tags::Vector);
-
-    AddParameter(ParameterType_Group,"io","Input and output data");
-    SetParameterDescription("io", "Group containing input and output parameters");
-
-    AddParameter(ParameterType_InputVectorData, "io.vd", "Input Vector data");
-    SetParameterDescription("io.vd", "Input vector data");
-
-    AddParameter(ParameterType_InputImage,      "io.in", "Support image");
-    SetParameterDescription("io.in", "Support image that specifies the extracted region");
-
-    AddParameter(ParameterType_OutputVectorData,"io.out","Output Vector data");
-    SetParameterDescription("io.out", "Output extracted vector data");
-
-    // Elevation
-    ElevationParametersHandler::AddElevationParameters(this, "elev");
-
-    // Doc example parameter settings
-    SetDocExampleParameterValue("io.in", "qb_RoadExtract.tif");
-    SetDocExampleParameterValue("io.vd", "qb_RoadExtract_classification.shp");
-    SetDocExampleParameterValue("io.out", "apTvUtVectorDataExtractROIApplicationTest.shp");
-  }
-
-  void DoUpdateParameters()
-  {
-    // Nothing to do here for the parameters : all are independent
-  }
-
-  void DoExecute()
-  {
-    // Get the inputs
-    VectorDataType*        vd      = GetParameterVectorData("io.vd");
-    FloatVectorImageType*  inImage = GetParameterImage("io.in");
-
-    // Extracting the VectorData
-    m_VdExtract = VectorDataExtractROIType::New();
-    m_VdExtract->SetInput(vd);
-
-    // Find the geographic region of interest
-    // Get the index of the corner of the image
-    IndexType ul, ur, ll, lr;
-    PointType pul, pur, pll, plr;
-    ul = inImage->GetLargestPossibleRegion().GetIndex();
-    ur = ul;
-    ll = ul;
-    lr = ul;
-    ur[0] += inImage->GetLargestPossibleRegion().GetSize()[0];
-    lr[0] += inImage->GetLargestPossibleRegion().GetSize()[0];
-    lr[1] += inImage->GetLargestPossibleRegion().GetSize()[1];
-    ll[1] += inImage->GetLargestPossibleRegion().GetSize()[1];
-
-    // Transform to physical point
-    inImage->TransformIndexToPhysicalPoint(ul, pul);
-    inImage->TransformIndexToPhysicalPoint(ur, pur);
-    inImage->TransformIndexToPhysicalPoint(ll, pll);
-    inImage->TransformIndexToPhysicalPoint(lr, plr);
-
-    // Build the cartographic region
-    RemoteSensingRegionType            rsRegion;
-    RemoteSensingRegionType::IndexType rsOrigin;
-    RemoteSensingRegionType::SizeType  rsSize;
-    rsOrigin[0] = std::min(pul[0], plr[0]);
-    rsOrigin[1] = std::min(pul[1], plr[1]);
-    rsSize[0] = vcl_abs(pul[0] - plr[0]);
-    rsSize[1] = vcl_abs(pul[1] - plr[1]);
-
-    rsRegion.SetOrigin(rsOrigin);
-    rsRegion.SetSize(rsSize);
-    rsRegion.SetRegionProjection(inImage->GetProjectionRef());
-    rsRegion.SetKeywordList(inImage->GetImageKeywordlist());
-
-    // Set the cartographic region to the extract roi filter
-    m_VdExtract->SetRegion(rsRegion);
-
-    // Reprojecting the VectorData
-    m_VdProj = VectorDataProjectionFilterType::New();
-    m_VdProj->SetInput(m_VdExtract->GetOutput());
-    m_VdProj->SetInputProjectionRef(inImage->GetProjectionRef());
-    m_VdProj->SetOutputKeywordList(inImage->GetImageKeywordlist());
-    m_VdProj->SetOutputProjectionRef(inImage->GetProjectionRef());
-    m_VdProj->SetOutputOrigin(inImage->GetOrigin());
-    m_VdProj->SetOutputSpacing(inImage->GetSpacing());
-
-    // Setup the DEM Handler
-    otb::Wrapper::ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(this,"elev");
-
-    // Set the output vectorData
-    SetParameterOutputVectorData("io.out", m_VdProj->GetOutput());
-  }
-
-  VectorDataExtractROIType::Pointer       m_VdExtract;
-  VectorDataProjectionFilterType::Pointer m_VdProj;
-};
-
-}
-}
-
-OTB_APPLICATION_EXPORT(otb::Wrapper::VectorDataExtractROIApplication)
diff --git a/CMake/CommonDefinitions.cmake b/CMake/CommonDefinitions.cmake
index 70dbf3d..56e8184 100644
--- a/CMake/CommonDefinitions.cmake
+++ b/CMake/CommonDefinitions.cmake
@@ -1,6 +1,6 @@
 # This file contains the common build definitions and flags used by default when building all targets
 
-if(WIN32)
+if(MSVC)
   # do not build shared lib under windows
   set(BUILD_SHARED_LIBS OFF)
   message(STATUS "Disabling build shared lib option on windows like OS.")
diff --git a/CMake/FindOssim.cmake b/CMake/FindOssim.cmake
index 27e59af..05c6d00 100644
--- a/CMake/FindOssim.cmake
+++ b/CMake/FindOssim.cmake
@@ -2,7 +2,7 @@
 # Find the native Ossim includes and library
 #
 #   OSSIM_FOUND        - True if Ossim found.
-#   OSSIM_INCLUDE_DIRS - where to find tinyxml.h, etc.
+#   OSSIM_INCLUDE_DIRS - where to find ossim/init/ossimInit.h, etc.
 #   OSSIM_LIBRARIES    - List of libraries when using Ossim.
 #
 
@@ -15,6 +15,16 @@ find_path( OSSIM_INCLUDE_DIR
            NAMES ossim/init/ossimInit.h
            PATHS $ENV{OSSIM_INCLUDE_DIR} /usr/local )
 
+  file(READ "${OSSIM_INCLUDE_DIR}/ossim/ossimVersion.h" _ossim_version_h_CONTENTS)
+  string(REGEX REPLACE ".*# *define OSSIM_VERSION *\"([0-9.]+)\".*" "\\1" OSSIM_VERSION "${_ossim_version_h_CONTENTS}")
+  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" OSSIM_MAJOR_VERSION_NUMBER "${OSSIM_VERSION}")
+  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" OSSIM_MINOR_VERSION_NUMBER "${OSSIM_VERSION}")
+  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" OSSIM_PATCH_VERSION_NUMBER "${OSSIM_VERSION}")
+  set(OSSIM_VERSION "${OSSIM_VERSION}" CACHE STRING "OSSIM version" FORCE)
+  math(EXPR OSSIM_VERSION_NUMBER
+    "((${OSSIM_MAJOR_VERSION_NUMBER})*100+${OSSIM_MINOR_VERSION_NUMBER})*100+${OSSIM_PATCH_VERSION_NUMBER}")
+  mark_as_advanced(OSSIM_VERSION)
+
 find_library(OSSIM_LIBRARY
              NAMES ossim
              PATHS /usr/local/lib/ossim)
@@ -25,12 +35,3 @@ include( FindPackageHandleStandardArgs )
 FIND_PACKAGE_HANDLE_STANDARD_ARGS( Ossim DEFAULT_MSG OSSIM_LIBRARY OSSIM_INCLUDE_DIR )
 
 mark_as_advanced( OSSIM_INCLUDE_DIR OSSIM_LIBRARY )
-
-if(OSSIM_FOUND)
-  set(OSSIM_INCLUDE_DIRS ${OSSIM_INCLUDE_DIR})
-  set(OSSIM_LIBRARIES ${OSSIM_LIBRARY})
-else()
-  set(OSSIM_INCLUDE_DIRS)
-  set(OSSIM_LIBRARIES)
-endif()
-
diff --git a/CMake/ImportBoost.cmake b/CMake/ImportBoost.cmake
index ec25d22..14bb7c4 100644
--- a/CMake/ImportBoost.cmake
+++ b/CMake/ImportBoost.cmake
@@ -6,17 +6,13 @@ mark_as_advanced(OTB_USE_EXTERNAL_BOOST)
 
 if(OTB_USE_EXTERNAL_BOOST)
   # Import the package
-  find_package(Boost)
+  find_package(Boost 1.35.0)
   mark_as_advanced(Boost_DIR)
   if(Boost_FOUND)
     message(STATUS "  Found Boost version ${Boost_VERSION}")
-    if( ${Boost_MINOR_VERSION} LESS 35)
-      message(WARNING "Boost >= 1.35 is required. Disabling OTB_USE_EXTERNAL_BOOST")
-      set(OTB_USE_EXTERNAL_BOOST  OFF)
-    endif()
   else()
     message(FATAL_ERROR
-                  "Cannot build OTB project without boost library.  Please set Boost directories or set OTB_USE_EXTERNAL_BOOST to OFF to use the INTERNAL Boost version")
+                  "Cannot build OTB project without boost library (>1.35.0). Please set Boost directories or set OTB_USE_EXTERNAL_BOOST to OFF to use the INTERNAL Boost version")
   endif()
 
   # Test package completeness
diff --git a/CMake/ImportCurl.cmake b/CMake/ImportCurl.cmake
index 70e524f..da434e1 100644
--- a/CMake/ImportCurl.cmake
+++ b/CMake/ImportCurl.cmake
@@ -9,7 +9,7 @@ endif()
 mark_as_advanced(OTB_USE_CURL)
 if(OTB_USE_CURL)
     if(CURL_FOUND)
-      message(STATUS "Using CURL external version")
+      message(STATUS "  Using CURL external version")
       try_compile(OTB_CURL_MULTI_AVAILABLE
                     ${CMAKE_CURRENT_BINARY_DIR}/CMake
                     ${CMAKE_CURRENT_SOURCE_DIR}/CMake/TestCurlMulti.cxx
diff --git a/CMake/ImportExpat.cmake b/CMake/ImportExpat.cmake
index dfb6a00..4679c6b 100644
--- a/CMake/ImportExpat.cmake
+++ b/CMake/ImportExpat.cmake
@@ -13,14 +13,14 @@ mark_as_advanced(OTB_USE_EXTERNAL_EXPAT)
 # Setup
 if(OTB_USE_EXTERNAL_EXPAT)
     if(EXPAT_FOUND)
-      message(STATUS "Using EXPAT external version")
+      message(STATUS "  Using EXPAT external version")
     else()
       # Generate an error if no external EXPAT is available
       message(FATAL_ERROR "EXPAT required but not found. "
                           "Turn OTB_USE_EXTERNAL_EXPAT to OFF to use the internal version.")
     endif()
 else()
-    message(STATUS "Using EXPAT internal version")
+    message(STATUS "  Using EXPAT internal version")
 
     set(EXPAT_LIBRARIES otbexpat)
     add_definitions(-DOTB_USE_INTERNAL_EXPAT)
diff --git a/CMake/ImportGdal.cmake b/CMake/ImportGdal.cmake
index 3b8149b..3ccc1d3 100644
--- a/CMake/ImportGdal.cmake
+++ b/CMake/ImportGdal.cmake
@@ -33,9 +33,21 @@ if(OTB_USE_EXTERNAL_GDAL)
     if( ${GDAL_FORMATS} MATCHES "hdf" )
        set(CHECK_GDAL_BUILT_WITH_HDF 1 CACHE INTERNAL "GDAL_BUILT_WITH_HDF" FORCE)
     else()
-       message(STATUS "CHECK_GDAL_BUILT_WITH_HDF test failed : GDAL is not built with hdf support. So the HDF tests will be deactivated. Formats supported by your GDAL: " [ ${GDAL_FORMATS} ] )
+       message(STATUS "CHECK_GDAL_BUILT_WITH_HDF test failed : GDAL is not built with hdf support. So the HDF tests will be deactivated. Formats supported by your GDAL: [ " ${GDAL_FORMATS} " ]")
        set(CHECK_GDAL_BUILT_WITH_HDF 0 CACHE INTERNAL "GDAL_BUILT_WITH_HDF" FORCE)
     endif()
+    
+    # Detect if gdal supports JPEG2000 format
+    set(GDAL_HAS_J2K OFF)
+    if ((${GDAL_FORMATS} MATCHES "openjpeg") OR 
+        (${GDAL_FORMATS} MATCHES "jp2kak") OR
+        (${GDAL_FORMATS} MATCHES "ecw"))
+      message(STATUS "  GDAL is built with a suitable Jpeg2000 driver (OpenJpeg, Kakadu, ECW).")
+      set(GDAL_HAS_J2K ON)
+    else()
+      message(STATUS "  GDAL has no suitable Jpeg2000 driver (compatible drivers are : OpenJpeg, Kakadu, ECW).")
+    endif()
+    
   else()
     # For WIN32 platform, we suppose that GDAL is built with HDF support (case with OSGeo4W)
     set(CHECK_GDAL_BUILT_WITH_HDF 1 CACHE INTERNAL "GDAL_BUILT_WITH_HDF" FORCE)
diff --git a/CMake/ImportJPEG2000.cmake b/CMake/ImportJPEG2000.cmake
index e72207f..895fb9d 100644
--- a/CMake/ImportJPEG2000.cmake
+++ b/CMake/ImportJPEG2000.cmake
@@ -1,8 +1,18 @@
 message(STATUS "Importing Jpeg2000...")
 # Use the openjpeg library.
-option(OTB_USE_JPEG2000 "Use to support jpeg2000 image file format." ON)
+if(GDAL_HAS_J2K)
+ set(USE_JPEG2000_DEFAULT OFF)
+else()
+ set(USE_JPEG2000_DEFAULT ON)
+endif()
+
+option(OTB_USE_JPEG2000 "Enable internal support for jpeg2000 image file format." ${USE_JPEG2000_DEFAULT})
 mark_as_advanced(OTB_USE_JPEG2000)
 
+cmake_dependent_option(OTB_USE_JPEG2000_TESTING "Use jpeg2000 images in tests." OFF
+                       "NOT OTB_USE_JPEG2000;NOT GDAL_HAS_J2K" ON)
+mark_as_advanced(OTB_USE_JPEG2000_TESTING)
+
 if(OTB_USE_JPEG2000)
  message(STATUS "  Enabling Jpeg2000 support")
 
diff --git a/CMake/ImportLibKML.cmake b/CMake/ImportLibKML.cmake
index 114702d..387c41d 100644
--- a/CMake/ImportLibKML.cmake
+++ b/CMake/ImportLibKML.cmake
@@ -5,7 +5,22 @@ if(LIBKML_FOUND)
   option(OTB_USE_EXTERNAL_LIBKML "Use external LibKML library." ON)
 else()
   option(OTB_USE_EXTERNAL_LIBKML "Use external LibKML library." OFF)
-  set(LIBKML_LIBRARIES otbkml)
-  message(STATUS "Using LibKML internal version")
 endif()
 mark_as_advanced(OTB_USE_EXTERNAL_LIBKML)
+
+if(OTB_USE_EXTERNAL_LIBKML)
+  if(NOT LIBKML_FOUND)
+    message(FATAL_ERROR "Can't build OTB without LibKML. Instal it "
+                        "on your system, or disable the option "
+                        "OTB_USE_EXTERNAL_LIBKML to use internal one")
+  endif()
+else()
+  set(LIBKML_LIBRARIES otbkml)
+  message(STATUS "  Using LibKML internal version")
+  # Known issue in OTB which does not compile with external ITK and internal libkml 
+  if (OTB_USE_EXTERNAL_ITK)
+    message(WARNING "There is a known issue which does not allow to use internal libKML with external ITK in OTB."
+                    "You might consider using an external LibKML. "
+                    "See http://bugs.orfeo-toolbox.org/view.php?id=896 for details")
+  endif()
+endif()
diff --git a/CMake/ImportMuParser.cmake b/CMake/ImportMuParser.cmake
index a41b733..3501eab 100644
--- a/CMake/ImportMuParser.cmake
+++ b/CMake/ImportMuParser.cmake
@@ -3,35 +3,49 @@ find_package(MuParser)
 
 if(MUPARSER_FOUND)
   option(OTB_USE_EXTERNAL_MUPARSER "Use external MuParser library." ON)
+else()
+  option(OTB_USE_EXTERNAL_MUPARSER "Use external MuParser library." OFF)
+endif()
+mark_as_advanced(OTB_USE_EXTERNAL_MUPARSER)
 
-  # Starting with muparser 2.0.0,
-  #  intrinsic operators "and", "or", "xor" have been removed
-  #  and intrinsic operators "&&" and "||" have been introduced as replacements
-  set(CMAKE_REQUIRED_INCLUDES ${MUPARSER_INCLUDE_DIR})
-  set(CMAKE_REQUIRED_LIBRARIES ${MUPARSER_LIBRARIES})
-  unset(CMAKE_REQUIRED_FLAGS)
-  unset(CMAKE_REQUIRED_DEFINES)
-  file(READ ${CMAKE_CURRENT_SOURCE_DIR}/CMake/otbTestMuParserHasCxxLogicalOperators.cxx
-       OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS_SOURCEFILE)
-  check_cxx_source_runs(
-    "${OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS_SOURCEFILE}"
-    OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS
-    )
-  unset(CMAKE_REQUIRED_INCLUDES)
-  unset(CMAKE_REQUIRED_LIBRARIES)
-  unset(CMAKE_REQUIRED_FLAGS)
-  unset(CMAKE_REQUIRED_DEFINES)
+if(OTB_USE_EXTERNAL_MUPARSER)
+  if(MUPARSER_FOUND)
+    # Starting with muparser 2.0.0,
+    #  intrinsic operators "and", "or", "xor" have been removed
+    #  and intrinsic operators "&&" and "||" have been introduced as replacements
+    set(CMAKE_REQUIRED_INCLUDES ${MUPARSER_INCLUDE_DIR})
+    set(CMAKE_REQUIRED_LIBRARIES ${MUPARSER_LIBRARIES})
+    unset(CMAKE_REQUIRED_FLAGS)
+    unset(CMAKE_REQUIRED_DEFINES)
+    file(READ ${CMAKE_CURRENT_SOURCE_DIR}/CMake/otbTestMuParserHasCxxLogicalOperators.cxx
+        OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS_SOURCEFILE)
+    check_cxx_source_runs(
+      "${OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS_SOURCEFILE}"
+      OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS
+      )
+    unset(CMAKE_REQUIRED_INCLUDES)
+    unset(CMAKE_REQUIRED_LIBRARIES)
+    unset(CMAKE_REQUIRED_FLAGS)
+    unset(CMAKE_REQUIRED_DEFINES)
 
-  if(OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS)
-    message(STATUS "  Testing if muParser has '&&' operator -- yes")
+    if(OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS)
+      message(STATUS "  MuParser version is >= 2.0.0 : "
+                     "uses '&&' and '||' logical operators, and C++ like "
+                     "ternary if-then-else operator")
+    else()
+      message(STATUS "  MuParser version is < 2.0.0  : "
+                     "uses 'and' and 'or' logical operators, and ternary "
+                     "operator 'if( ; ; )'")
+    endif()
   else()
-    message(STATUS "  Testing if muParser has '&&' operator -- no")
+    message(FATAL_ERROR "Can't build OTB without MuParser. Instal it "
+                        "on your system, or disable the option "
+                        "OTB_USE_EXTERNAL_MUPARSER to use internal one")
   endif()
-
 else()
-  option(OTB_USE_EXTERNAL_MUPARSER "Use external MuParser library." OFF)
   set(MUPARSER_LIBRARIES otbmuparser)
   unset(OTB_MUPARSER_HAS_CXX_LOGICAL_OPERATORS) # internal version is < 2.0.0
-  message(STATUS "  Using MuParser internal version")
+  message(STATUS "  Using MuParser internal version : uses 'and' and 'or' "
+                 "logical operators, and ternary operator 'if( ; ; )' ")
 endif()
-mark_as_advanced(OTB_USE_EXTERNAL_MUPARSER)
+
diff --git a/CMake/ImportOpenThreads.cmake b/CMake/ImportOpenThreads.cmake
index fc01568..b4f3037 100644
--- a/CMake/ImportOpenThreads.cmake
+++ b/CMake/ImportOpenThreads.cmake
@@ -6,27 +6,33 @@ mark_as_advanced(OPENTHREADS_INCLUDE_DIR)
 mark_as_advanced(OPENTHREADS_LIBRARY)
 mark_as_advanced(OPENTHREADS_LIBRARY_DEBUG)
 
-set(OTB_USE_EXTERNAL_OPENTHREADS ON CACHE INTERNAL "")
-if(OPENTHREADS_FOUND AND OTB_USE_EXTERNAL_OPENTHREADS)
-
-        include_directories(${OPENTHREADS_INCLUDE_DIR})
-        link_directories( ${OPENTHREADS_LIBRARY} )
-
-        message(STATUS "  Using OpenThreads external version")
-        message(STATUS "  OpenThreads includes : ${OPENTHREADS_INCLUDE_DIR}")
-        message(STATUS "  OpenThreads library  : ${OPENTHREADS_LIBRARY}")
-
+if(OPENTHREADS_FOUND)
+  option(OTB_USE_EXTERNAL_OPENTHREADS "Use external OpenThreads library." ON)
 else()
-
-        add_definitions(-DOTB_USE_INTERNAL_OPENTHREADS)
-        set(OTB_USE_EXTERNAL_OPENTHREADS OFF)
-        set(OPENTHREADS_INCLUDE_DIR "${OTB_SOURCE_DIR}/Utilities/otbopenthreads/OpenThreads/include")
-        set(OPENTHREADS_LIBRARY "OpenThreads" )
-        include_directories(${OPENTHREADS_INCLUDE_DIR})
-        if(NOT BUILD_SHARED_LIBS)
-          add_definitions(-DOT_LIBRARY_STATIC)
-        endif()
-
-        message(STATUS "  Using OpenThreads internal version")
-
+  option(OTB_USE_EXTERNAL_OPENTHREADS "Use external OpenThreads library." OFF)
+endif()
+mark_as_advanced(OTB_USE_EXTERNAL_OPENTHREADS)
+
+if(OTB_USE_EXTERNAL_OPENTHREADS)
+  if(OPENTHREADS_FOUND)
+    include_directories(${OPENTHREADS_INCLUDE_DIR})
+    link_directories( ${OPENTHREADS_LIBRARY} )
+
+    message(STATUS "  Using OpenThreads external version")
+    message(STATUS "  OpenThreads includes : ${OPENTHREADS_INCLUDE_DIR}")
+    message(STATUS "  OpenThreads library  : ${OPENTHREADS_LIBRARY}")
+  else()
+    message(FATAL_ERROR "Can't build OTB without OpenThreads. Install it "
+                        "on your system, or disable the option "
+                        "OTB_USE_EXTERNAL_OPENTHREADS to use the internal one")
+  endif()
+else()
+  add_definitions(-DOTB_USE_INTERNAL_OPENTHREADS)
+  set(OPENTHREADS_INCLUDE_DIR "${OTB_SOURCE_DIR}/Utilities/otbopenthreads/OpenThreads/include")
+  set(OPENTHREADS_LIBRARY "OpenThreads" )
+  include_directories(${OPENTHREADS_INCLUDE_DIR})
+  if(NOT BUILD_SHARED_LIBS)
+    add_definitions(-DOT_LIBRARY_STATIC)
+  endif()
+  message(STATUS "  Using OpenThreads internal version")
 endif()
diff --git a/CMake/ImportOssim.cmake b/CMake/ImportOssim.cmake
index b4ddba2..9d96134 100644
--- a/CMake/ImportOssim.cmake
+++ b/CMake/ImportOssim.cmake
@@ -8,15 +8,28 @@ if(WIN32)
   set(DEFAULT_OTB_USE_EXTERNAL_OSSIM  ON)
 endif()
 
-option(OTB_USE_EXTERNAL_OSSIM "Use an outside build of Ossim." ${DEFAULT_OTB_USE_EXTERNAL_OSSIM})
+option(OTB_USE_EXTERNAL_OSSIM "  Use an outside build of Ossim." ${DEFAULT_OTB_USE_EXTERNAL_OSSIM})
 mark_as_advanced(OTB_USE_EXTERNAL_OSSIM)
 
 if(OTB_USE_EXTERNAL_OSSIM)
   find_package(Ossim REQUIRED)
+  if(OSSIM_FOUND)
+    set(OSSIM_INCLUDE_DIRS ${OSSIM_INCLUDE_DIR})
+    set(OSSIM_LIBRARIES ${OSSIM_LIBRARY})
+    message(STATUS "  Found OSSIM library at ${OSSIM_LIBRARY}")
+    message(STATUS "  OSSIM version is " ${OSSIM_VERSION})
+    message(STATUS "  Using OSSIM external version")
+  else()
+    set(OSSIM_INCLUDE_DIRS)
+    set(OSSIM_LIBRARIES)
+    #No external ossim found
+    message(FATAL_ERROR "OSSIM library is required but not found. "
+      "Turn OTB_USE_EXTERNAL_OSSIM to OFF to use the internal version.")
+  endif()
 else()
   set(OSSIM_LIBRARIES otbossim)
   if(WIN32 AND NOT BUILD_SHARED_LIBS)
     add_definitions(-DOSSIM_STATIC)
   endif()
-  message(STATUS "Using Ossim internal version")
+  message(STATUS "  Using OSSIM internal version")
 endif()
diff --git a/CMake/ImportSiftFast.cmake b/CMake/ImportSiftFast.cmake
index 437071c..72240fb 100644
--- a/CMake/ImportSiftFast.cmake
+++ b/CMake/ImportSiftFast.cmake
@@ -1,4 +1,4 @@
 message(STATUS "Importing libSiftFast...")
 option(OTB_USE_SIFTFAST "Use Fast SIFT Image Features Library" ON)
-message(STATUS "Using libSiftFast internal version")
+message(STATUS "  Using libSiftFast internal version")
 mark_as_advanced(OTB_USE_SIFTFAST)
diff --git a/CMake/ImportTinyXML.cmake b/CMake/ImportTinyXML.cmake
index ac44535..5a9ac44 100644
--- a/CMake/ImportTinyXML.cmake
+++ b/CMake/ImportTinyXML.cmake
@@ -3,19 +3,27 @@ find_package(TinyXML)
 
 if(TINYXML_FOUND)
   option(OTB_USE_EXTERNAL_TINYXML "Use external TinyXML library." ON)
-
-  # Check if STL support is enabled with macro TIXML_USE_STL
-  try_compile(TIXML_USE_STL
-              ${CMAKE_CURRENT_BINARY_DIR}/CMake
-              ${CMAKE_CURRENT_SOURCE_DIR}/CMake/otbTestTinyXMLUseSTL.cxx
-              CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${TINYXML_INCLUDE_DIRS}" "-DLINK_LIBRARIES:STRING=${TINYXML_LIBRARIES}"
-              COMPILE_DEFINITIONS "-DTIXML_USE_STL"
-              OUTPUT_VARIABLE OUTPUT)
-
 else()
   option(OTB_USE_EXTERNAL_TINYXML "Use external TinyXML library." OFF)
+endif()
+mark_as_advanced(OTB_USE_EXTERNAL_TINYXML)
+
+if(OTB_USE_EXTERNAL_TINYXML)
+  if(TINYXML_FOUND)
+    # Check if STL support is enabled with macro TIXML_USE_STL
+    try_compile(TIXML_USE_STL
+                ${CMAKE_CURRENT_BINARY_DIR}/CMake
+                ${CMAKE_CURRENT_SOURCE_DIR}/CMake/otbTestTinyXMLUseSTL.cxx
+                CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${TINYXML_INCLUDE_DIRS}" "-DLINK_LIBRARIES:STRING=${TINYXML_LIBRARIES}"
+                COMPILE_DEFINITIONS "-DTIXML_USE_STL"
+                OUTPUT_VARIABLE OUTPUT)
+  else()
+    message(FATAL_ERROR "Can't build OTB without TinyXML. Install it "
+                        "on your system, or disable the option "
+                        "OTB_USE_EXTERNAL_TINYXML to use the internal one")
+  endif()
+else()
   set(TINYXML_LIBRARIES otbtinyXML)
   set(TIXML_USE_STL)
-  message(STATUS "Using TinyXML internal version")
+  message(STATUS "  Using TinyXML internal version")
 endif()
-mark_as_advanced(OTB_USE_EXTERNAL_TINYXML)
diff --git a/CMake/TestGDALHasOGR.cxx b/CMake/TestGDALHasOGR.cxx
index 3db8e0f..3787cec 100644
--- a/CMake/TestGDALHasOGR.cxx
+++ b/CMake/TestGDALHasOGR.cxx
@@ -1,10 +1,23 @@
 #ifdef WIN32
 #define CPL_DISABLE_DLL
 #endif
-#include "ogrsf_frmts.h"
+#include "ogr_api.h"
 
 int main(int argc,char * argv[])
 {
-  OGRSFDriverRegistrar::Open(argv[1], FALSE);
+  OGRDataSourceH	hDS;
+  OGRSFDriverH        *pahDriver;
+  
+  OGRRegisterAll(); 	
+
+  hDS = OGROpen(argv[1], FALSE, pahDriver );
+
+  if( hDS == NULL )
+    {
+    return -1;
+    }
+
+  OGRReleaseDataSource( hDS );
+  
   return 0;
 }
diff --git a/CMake/UseOTB.cmake.in b/CMake/UseOTB.cmake.in
index c04a9e2..47933c5 100644
--- a/CMake/UseOTB.cmake.in
+++ b/CMake/UseOTB.cmake.in
@@ -53,13 +53,22 @@ find_program(OTB_APPLICATION_LAUNCHER otbApplicationLauncherCommandLine PATHS
              NO_SYSTEM_PATH)
 
 if(OTB_USE_EXTERNAL_ITK)
-    find_package(ITK REQUIRED)
-    include(${ITK_USE_FILE})
+  find_package(ITK REQUIRED)
 else()
   find_package(ITK REQUIRED
     HINTS ${OTB_INSTALL_PREFIX} ${OTB_BINARY_DIRS}/../Utilities/ITK)
-  include(${ITK_USE_FILE})
 endif()
+# Don't call ITK_USE_FILE to avoid BEFORE includes of source directories, only
+# perform needed action from the ITK_USE_FILE script. ITK source directories
+# should be already contained in OTB_INCLUDE_DIRS.
+#   - Add compiler flags needed to use ITK.
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ITK_REQUIRED_C_FLAGS}")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ITK_REQUIRED_CXX_FLAGS}")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")
+set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")
+#   - Add link directories needed to use ITK.
+link_directories(${ITK_LIBRARY_DIRS})
 
 if(ITK_USE_FFTWF OR ITK_USE_FFTWD)
     find_package(FFTW REQUIRED)
@@ -89,7 +98,7 @@ endif()
 
 if(OTB_USE_EXTERNAL_LIBKML)
   find_package(LibKML REQUIRED)
-  include_directories(${LIBKML_INCLUDE_DIRS})
+  include_directories(${LIBKML_INCLUDE_DIR})
 endif()
 
 if(OTB_USE_EXTERNAL_TINYXML)
diff --git a/CMake/otbIncludeDirectories.cmake b/CMake/otbIncludeDirectories.cmake
index b100529..cb0a2a1 100644
--- a/CMake/otbIncludeDirectories.cmake
+++ b/CMake/otbIncludeDirectories.cmake
@@ -69,7 +69,7 @@ set(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
     ${JPEG_INCLUDE_DIRS}
     ${OGR_INCLUDE_DIRS})
 
-if(WIN32)
+if(MSVC)
   set(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
       ${OTB_SOURCE_DIR}/Utilities/otbmsinttypes )
 endif()
@@ -97,7 +97,7 @@ endif()
 
 if(OTB_USE_EXTERNAL_LIBKML)
   set(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
-      ${LIBKML_INCLUDE_DIRS})
+      ${LIBKML_INCLUDE_DIR})
 else()
   set(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
       ${OTB_SOURCE_DIR}/Utilities/otbkml/src)
@@ -296,7 +296,7 @@ endif()
 #For LibKML header file
 if(OTB_USE_EXTERNAL_LIBKML)
         set(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
-                ${LIBKML_INCLUDE_DIRS})
+                ${LIBKML_INCLUDE_DIR})
 else()
         set(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
                 Utilities/otbkml)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5d41ba8..426954a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,8 +30,8 @@ include(SourceStatus)
 #-----------------------------------------------------------------------------
 # OTB version number.  An even minor number corresponds to releases.
 set(OTB_VERSION_MAJOR "4")
-set(OTB_VERSION_MINOR "0")
-set(OTB_VERSION_PATCH "0")
+set(OTB_VERSION_MINOR "2")
+set(OTB_VERSION_PATCH "1")
 
 # Version string should not include patch level.  The major.minor is
 # enough to distinguish available features of the toolkit.
@@ -273,6 +273,13 @@ include_directories(${ITK_INCLUDE_DIRS})
 # generate OTBConfig.cmake
 list(APPEND OTB_INCLUDE_DIRS_BUILD_TREE ${ITK_INCLUDE_DIRS})
 
+if(OTB_COMPILE_WITH_FULL_WARNING)
+  if(CMAKE_COMPILER_IS_GNUCXX)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OTB_FULL_WARNING_LIST_PARAMETERS}")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OTB_FULL_WARNING_LIST_PARAMETERS}")
+  endif()
+endif()
+
 add_subdirectory(Code)
 
 if(BUILD_APPLICATIONS)
diff --git a/Code/ApplicationEngine/CMakeLists.txt b/Code/ApplicationEngine/CMakeLists.txt
index 65bbc1a..1f2bd26 100644
--- a/Code/ApplicationEngine/CMakeLists.txt
+++ b/Code/ApplicationEngine/CMakeLists.txt
@@ -2,7 +2,7 @@
 # Sources of non-templated classes.
 file(GLOB OTBApplicationEngine_SRCS "*.cxx" )
 
-if(WIN32)
+if(MSVC)
   set(CMAKE_C_FLAGS   "/bigobj ${CMAKE_CXX_FLAGS}")
   set(CMAKE_CXX_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}")
 endif()
diff --git a/Code/ApplicationEngine/otbWrapperAddProcessToWatchEvent.h b/Code/ApplicationEngine/otbWrapperAddProcessToWatchEvent.h
index 02c3baf..b95a8c2 100644
--- a/Code/ApplicationEngine/otbWrapperAddProcessToWatchEvent.h
+++ b/Code/ApplicationEngine/otbWrapperAddProcessToWatchEvent.h
@@ -31,7 +31,7 @@ namespace Wrapper
  *  itk::ProcessObject and a string describing the process.
  *
  */
-class ITK_EXPORT AddProcessToWatchEvent: public itk::EventObject
+class ITK_ABI_EXPORT AddProcessToWatchEvent: public itk::EventObject
 {
 public:
 
diff --git a/Code/ApplicationEngine/otbWrapperApplication.h b/Code/ApplicationEngine/otbWrapperApplication.h
index 4bebf08..97044f8 100644
--- a/Code/ApplicationEngine/otbWrapperApplication.h
+++ b/Code/ApplicationEngine/otbWrapperApplication.h
@@ -45,7 +45,7 @@ namespace Wrapper
  *  TODO
  *
  */
-class ITK_EXPORT Application: public itk::Object
+class ITK_ABI_EXPORT Application: public itk::Object
 {
 public:
   /** Standard class typedefs. */
diff --git a/Code/ApplicationEngine/otbWrapperApplicationFactory.h b/Code/ApplicationEngine/otbWrapperApplicationFactory.h
index 2ec4425..51f3bc9 100644
--- a/Code/ApplicationEngine/otbWrapperApplicationFactory.h
+++ b/Code/ApplicationEngine/otbWrapperApplicationFactory.h
@@ -27,7 +27,7 @@ namespace Wrapper
 {
 
 template < class TApplication >
-class ApplicationFactory : public itk::ObjectFactoryBase
+class ITK_ABI_EXPORT ApplicationFactory : public itk::ObjectFactoryBase
 {
 public:
   /** Standard class typedefs. */
diff --git a/Code/ApplicationEngine/otbWrapperApplicationHtmlDocGenerator.h b/Code/ApplicationEngine/otbWrapperApplicationHtmlDocGenerator.h
index 73698ff..ad03a42 100644
--- a/Code/ApplicationEngine/otbWrapperApplicationHtmlDocGenerator.h
+++ b/Code/ApplicationEngine/otbWrapperApplicationHtmlDocGenerator.h
@@ -29,7 +29,7 @@ namespace Wrapper
  *  class doc attributes.
  */
 
-class ITK_EXPORT ApplicationHtmlDocGenerator
+class ITK_ABI_EXPORT ApplicationHtmlDocGenerator
 {
 public:
  /** Standard class typedef */
diff --git a/Code/ApplicationEngine/otbWrapperApplicationRegistry.h b/Code/ApplicationEngine/otbWrapperApplicationRegistry.h
index a84f5a7..fb493c7 100644
--- a/Code/ApplicationEngine/otbWrapperApplicationRegistry.h
+++ b/Code/ApplicationEngine/otbWrapperApplicationRegistry.h
@@ -35,7 +35,7 @@ namespace Wrapper
  *  TODO
  *
  */
-class ITK_EXPORT ApplicationRegistry : public itk::Object
+class ITK_ABI_EXPORT ApplicationRegistry : public itk::Object
 {
 public:
   /** Standard class typedefs. */
diff --git a/Code/ApplicationEngine/otbWrapperChoiceParameter.h b/Code/ApplicationEngine/otbWrapperChoiceParameter.h
index b25a2e0..9809362 100644
--- a/Code/ApplicationEngine/otbWrapperChoiceParameter.h
+++ b/Code/ApplicationEngine/otbWrapperChoiceParameter.h
@@ -32,7 +32,7 @@ namespace Wrapper
  *  Represents an enumerated parameter.
  *  The different values of the enumeration can be associated with a parameter
  */
-class ChoiceParameter
+class ITK_ABI_EXPORT ChoiceParameter
   : public Parameter
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperComplexInputImageParameter.cxx b/Code/ApplicationEngine/otbWrapperComplexInputImageParameter.cxx
index 5fa1f36..392645e 100644
--- a/Code/ApplicationEngine/otbWrapperComplexInputImageParameter.cxx
+++ b/Code/ApplicationEngine/otbWrapperComplexInputImageParameter.cxx
@@ -17,9 +17,6 @@
 =========================================================================*/
 #include "otbWrapperComplexInputImageParameter.h"
 #include "itksys/SystemTools.hxx"
-#include "otbImageFileReader.h"
-#include "itkCastImageFilter.h"
-#include "otbImageToVectorImageCastFilter.h"
 #include "otbWrapperTypes.h"
 
 
@@ -96,133 +93,6 @@ otbGetImageMacro(ComplexDoubleImage);
 otbGetImageMacro(ComplexFloatVectorImage);
 otbGetImageMacro(ComplexDoubleVectorImage);
 
-template <class TOutputImage>
-TOutputImage *
-ComplexInputImageParameter::GetImage()
-{
-  // Used m_PreviousFileName because if not, when the user call twice GetImage,
-  // it without changing the filename, it returns 2 different
-  // image pointers
-  // Only one image type can be used
-
-  // 2 cases : the user set a filename vs. the user set an image
-  if (m_UseFilename)
-    {
-    if( m_PreviousFileName!=m_FileName && !m_FileName.empty() )
-      {
-      //////////////////////// Filename case:
-      // A new valid filename has been given : a reader is created
-      m_PreviousFileName = m_FileName;
-      typedef otb::ImageFileReader<TOutputImage> ReaderType;
-      typename ReaderType::Pointer reader = ReaderType::New();
-      reader->SetFileName(m_FileName);
-      try
-        {
-        reader->UpdateOutputInformation();
-        }
-      catch(itk::ExceptionObject &)
-        {
-        this->ClearValue();
-        }
-
-      m_Image = reader->GetOutput();
-      m_Reader = reader;
-
-      // Pay attention, don't return m_Image because it is a ImageBase...
-      return reader->GetOutput();
-      }
-    else
-      {
-      // In this case, the reader and the image should already be there
-      if (m_Image.IsNull())
-        {
-        itkExceptionMacro("No input image or filename detected...");
-        }
-      else
-        {
-        // Check if the image type asked here is the same as the one used for the reader
-        if (dynamic_cast<TOutputImage*> (m_Image.GetPointer()))
-          {
-          return dynamic_cast<TOutputImage*> (m_Image.GetPointer());
-          }
-        else
-          {
-          itkExceptionMacro("Cannot ask a different image type");
-          }
-        }
-      }
-    }
-  else
-    {
-    //////////////////////// Image case:
-    if( m_Image.IsNull() )
-      {
-      itkExceptionMacro("No input image or filename detected...");
-      }
-    else
-      {
-      if (dynamic_cast<ComplexFloatVectorImageType*>(m_Image.GetPointer()))
-        {
-        return CastImage<ComplexFloatVectorImageType, TOutputImage>();
-        }
-      else if (dynamic_cast<ComplexDoubleVectorImageType*>(m_Image.GetPointer()))
-        {
-        return CastImage<ComplexDoubleVectorImageType, TOutputImage>();
-        }
-      else if (dynamic_cast<ComplexFloatImageType*>(m_Image.GetPointer()))
-        {
-        return CastImage<ComplexFloatImageType, TOutputImage>();
-        }
-      else if (dynamic_cast<ComplexDoubleImageType*>(m_Image.GetPointer()))
-        {
-        return CastImage<ComplexDoubleImageType, TOutputImage>();
-        }
-      else
-        {
-        itkExceptionMacro("Unknown image type");
-        }
-      }
-    }
-}
-
-
-template <class TComplexInputImage, class TOutputImage>
-TOutputImage*
-ComplexInputImageParameter::SimpleCastImage()
-{
-  TComplexInputImage* realComplexInputImage = dynamic_cast<TComplexInputImage*>(m_Image.GetPointer());
-
-  typedef itk::CastImageFilter<TComplexInputImage, TOutputImage> CasterType;
-  typename CasterType::Pointer caster = CasterType::New();
-
-  caster->SetInput(realComplexInputImage);
-  caster->UpdateOutputInformation();
-
-  m_Image = caster->GetOutput();
-  m_Caster = caster;
-
-  return caster->GetOutput();
-}
-
-
-template <class TComplexInputImage, class TOutputImage>
-TOutputImage*
-ComplexInputImageParameter::CastVectorImageFromImage()
-{
-  TComplexInputImage* realComplexInputImage = dynamic_cast<TComplexInputImage*>(m_Image.GetPointer());
-
-  typedef ImageToVectorImageCastFilter<TComplexInputImage, TOutputImage> CasterType;
-  typename CasterType::Pointer caster = CasterType::New();
-
-  caster->SetInput(realComplexInputImage);
-  caster->UpdateOutputInformation();
-
-  m_Image = caster->GetOutput();
-  m_Caster = caster;
-
-  return caster->GetOutput();
-}
-
 
 #define otbCastImageMacro(ComplexInputImageType, OutputImageType, theMethod)   \
   template<> OutputImageType *                                          \
diff --git a/Code/ApplicationEngine/otbWrapperComplexInputImageParameter.h b/Code/ApplicationEngine/otbWrapperComplexInputImageParameter.h
index e735ab8..f5d8fb5 100644
--- a/Code/ApplicationEngine/otbWrapperComplexInputImageParameter.h
+++ b/Code/ApplicationEngine/otbWrapperComplexInputImageParameter.h
@@ -30,7 +30,7 @@ namespace Wrapper
  *  \brief This class represents a ComplexInputImage parameter
  */
 
-class ITK_EXPORT ComplexInputImageParameter : public Parameter
+class ITK_ABI_EXPORT ComplexInputImageParameter : public Parameter
 {
 public:
   /** Standard class typedef */
@@ -74,11 +74,7 @@ public:
 
   /** Generic cast method that will be specified for each image type. */
   template <class TComplexInputImage, class TOutputImage>
-    TOutputImage* CastImage()
-  {
-    itkExceptionMacro("Cast from "<<typeid(TComplexInputImage).name()
-                      <<" to "<<typeid(TOutputImage).name()<<" not authorized.");
-  }
+    TOutputImage* CastImage();
 
   /** Cast an image to an image of the same type
   * Image to Image, VectorImage to VectorImage, RGBAImage to RGBAImage. */
@@ -127,7 +123,38 @@ private:
 
 }; // End class ComplexInputImage Parameter
 
+
+// template specializations of CastImage<> should be declared in header
+// so that the linker knows they exist when building OTB Applications
+
+#define otbDefineCastImageMacro(ComplexInputImageType, OutputImageType)   \
+  template<> OutputImageType *                                          \
+  ComplexInputImageParameter::CastImage<ComplexInputImageType , OutputImageType>();   \
+
+#define otbGenericDefineCastImageMacro(ComplexInputImageType, prefix)     \
+  otbDefineCastImageMacro(ComplexInputImageType, ComplexFloat##prefix##ImageType) \
+  otbDefineCastImageMacro(ComplexInputImageType, ComplexDouble##prefix##ImageType)
+
+
+/*********************************************************************
+********************** Image -> Image
+**********************************************************************/
+
+  otbGenericDefineCastImageMacro(ComplexFloatImageType, )
+  otbGenericDefineCastImageMacro(ComplexDoubleImageType, )
+
+
+/*********************************************************************
+********************** VectorImage -> VectorImage
+**********************************************************************/
+  otbGenericDefineCastImageMacro(ComplexFloatVectorImageType, Vector)
+  otbGenericDefineCastImageMacro(ComplexDoubleVectorImageType, Vector)
+
 } // End namespace Wrapper
 } // End namespace otb
 
+#ifndef OTB_MANUAL_INSTANTIATION
+#include "otbWrapperComplexInputImageParameter.txx"
+#endif
+
 #endif
diff --git a/Code/ApplicationEngine/otbWrapperComplexInputImageParameter.txx b/Code/ApplicationEngine/otbWrapperComplexInputImageParameter.txx
new file mode 100644
index 0000000..9b19bf0
--- /dev/null
+++ b/Code/ApplicationEngine/otbWrapperComplexInputImageParameter.txx
@@ -0,0 +1,173 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef __otbWrapperComplexInputImageParameter_txx
+#define __otbWrapperComplexInputImageParameter_txx
+
+#include "otbWrapperComplexInputImageParameter.h"
+
+#include "otbImageFileReader.h"
+#include "itkCastImageFilter.h"
+#include "otbImageToVectorImageCastFilter.h"
+
+namespace otb
+{
+namespace Wrapper
+{
+
+
+template <class TOutputImage>
+TOutputImage *
+ComplexInputImageParameter::GetImage()
+{
+  // Used m_PreviousFileName because if not, when the user call twice GetImage,
+  // it without changing the filename, it returns 2 different
+  // image pointers
+  // Only one image type can be used
+
+  // 2 cases : the user set a filename vs. the user set an image
+  if (m_UseFilename)
+    {
+    if( m_PreviousFileName!=m_FileName && !m_FileName.empty() )
+      {
+      //////////////////////// Filename case:
+      // A new valid filename has been given : a reader is created
+      m_PreviousFileName = m_FileName;
+      typedef otb::ImageFileReader<TOutputImage> ReaderType;
+      typename ReaderType::Pointer reader = ReaderType::New();
+      reader->SetFileName(m_FileName);
+      try
+        {
+        reader->UpdateOutputInformation();
+        }
+      catch(itk::ExceptionObject &)
+        {
+        this->ClearValue();
+        }
+
+      m_Image = reader->GetOutput();
+      m_Reader = reader;
+
+      // Pay attention, don't return m_Image because it is a ImageBase...
+      return reader->GetOutput();
+      }
+    else
+      {
+      // In this case, the reader and the image should already be there
+      if (m_Image.IsNull())
+        {
+        itkExceptionMacro("No input image or filename detected...");
+        }
+      else
+        {
+        // Check if the image type asked here is the same as the one used for the reader
+        if (dynamic_cast<TOutputImage*> (m_Image.GetPointer()))
+          {
+          return dynamic_cast<TOutputImage*> (m_Image.GetPointer());
+          }
+        else
+          {
+          itkExceptionMacro("Cannot ask a different image type");
+          }
+        }
+      }
+    }
+  else
+    {
+    //////////////////////// Image case:
+    if( m_Image.IsNull() )
+      {
+      itkExceptionMacro("No input image or filename detected...");
+      }
+    else
+      {
+      if (dynamic_cast<ComplexFloatVectorImageType*>(m_Image.GetPointer()))
+        {
+        return CastImage<ComplexFloatVectorImageType, TOutputImage>();
+        }
+      else if (dynamic_cast<ComplexDoubleVectorImageType*>(m_Image.GetPointer()))
+        {
+        return CastImage<ComplexDoubleVectorImageType, TOutputImage>();
+        }
+      else if (dynamic_cast<ComplexFloatImageType*>(m_Image.GetPointer()))
+        {
+        return CastImage<ComplexFloatImageType, TOutputImage>();
+        }
+      else if (dynamic_cast<ComplexDoubleImageType*>(m_Image.GetPointer()))
+        {
+        return CastImage<ComplexDoubleImageType, TOutputImage>();
+        }
+      else
+        {
+        itkExceptionMacro("Unknown image type");
+        }
+      }
+    }
+}
+
+
+template <class TComplexInputImage, class TOutputImage>
+TOutputImage*
+ComplexInputImageParameter::CastImage()
+{
+  itkExceptionMacro("Cast from "<<typeid(TComplexInputImage).name()
+                    <<" to "<<typeid(TOutputImage).name()<<" not authorized.");
+}
+
+
+template <class TComplexInputImage, class TOutputImage>
+TOutputImage*
+ComplexInputImageParameter::SimpleCastImage()
+{
+  TComplexInputImage* realComplexInputImage = dynamic_cast<TComplexInputImage*>(m_Image.GetPointer());
+
+  typedef itk::CastImageFilter<TComplexInputImage, TOutputImage> CasterType;
+  typename CasterType::Pointer caster = CasterType::New();
+
+  caster->SetInput(realComplexInputImage);
+  caster->UpdateOutputInformation();
+
+  m_Image = caster->GetOutput();
+  m_Caster = caster;
+
+  return caster->GetOutput();
+}
+
+
+template <class TComplexInputImage, class TOutputImage>
+TOutputImage*
+ComplexInputImageParameter::CastVectorImageFromImage()
+{
+  TComplexInputImage* realComplexInputImage = dynamic_cast<TComplexInputImage*>(m_Image.GetPointer());
+
+  typedef ImageToVectorImageCastFilter<TComplexInputImage, TOutputImage> CasterType;
+  typename CasterType::Pointer caster = CasterType::New();
+
+  caster->SetInput(realComplexInputImage);
+  caster->UpdateOutputInformation();
+
+  m_Image = caster->GetOutput();
+  m_Caster = caster;
+
+  return caster->GetOutput();
+}
+
+
+} // End namespace Wrapper
+} // End namespace otb
+
+#endif
diff --git a/Code/ApplicationEngine/otbWrapperComplexOutputImageParameter.h b/Code/ApplicationEngine/otbWrapperComplexOutputImageParameter.h
index 4126cbe..59ee6d7 100644
--- a/Code/ApplicationEngine/otbWrapperComplexOutputImageParameter.h
+++ b/Code/ApplicationEngine/otbWrapperComplexOutputImageParameter.h
@@ -30,7 +30,7 @@ namespace Wrapper
  *  \brief This class represents a ComplexOutputImage parameter
  */
 
-class ITK_EXPORT ComplexOutputImageParameter : public Parameter
+class ITK_ABI_EXPORT ComplexOutputImageParameter : public Parameter
 {
 public:
   /** Standard class typedef */
diff --git a/Code/ApplicationEngine/otbWrapperDirectoryParameter.h b/Code/ApplicationEngine/otbWrapperDirectoryParameter.h
index ed5d1f1..079401a 100644
--- a/Code/ApplicationEngine/otbWrapperDirectoryParameter.h
+++ b/Code/ApplicationEngine/otbWrapperDirectoryParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class DirectoryParameter
  *  \brief This class represent a string parameter for the wrapper framework
  */
-class DirectoryParameter
+class ITK_ABI_EXPORT DirectoryParameter
   : public Parameter
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperDocExampleStructure.h b/Code/ApplicationEngine/otbWrapperDocExampleStructure.h
index 5f9df83..e6c38e2 100644
--- a/Code/ApplicationEngine/otbWrapperDocExampleStructure.h
+++ b/Code/ApplicationEngine/otbWrapperDocExampleStructure.h
@@ -41,7 +41,7 @@ namespace Wrapper
  * User has to set the application name, the binary path and a list of
  *  key/value couple.
  */
-class DocExampleStructure :
+class ITK_ABI_EXPORT DocExampleStructure :
   public itk::Object
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx b/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx
index 33a4ebb..6e0b153 100644
--- a/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx
+++ b/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx
@@ -91,7 +91,7 @@ void ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(const Ap
   otb::DEMHandler::Instance()->SetDefaultHeightAboveEllipsoid(GetDefaultElevation(app,key));
 
   std::ostringstream oss;
-  oss<<"Elevation management: setting default height above ellipsoid to  " << GetDefaultElevation(app,key) << " meters"<<std::endl;
+  oss<<"Elevation management: setting default height above ellipsoid to " << GetDefaultElevation(app,key) << " meters"<<std::endl;
 
   app->GetLogger()->Info(oss.str());
 
diff --git a/Code/ApplicationEngine/otbWrapperElevationParametersHandler.h b/Code/ApplicationEngine/otbWrapperElevationParametersHandler.h
index d960bb3..bc6ef2f 100644
--- a/Code/ApplicationEngine/otbWrapperElevationParametersHandler.h
+++ b/Code/ApplicationEngine/otbWrapperElevationParametersHandler.h
@@ -45,16 +45,16 @@ public:
     * Add a Group containing several choices for map projections
     *
     */
-  static void AddElevationParameters(Application::Pointer app, const std::string & key);
+  static ITK_ABI_EXPORT void AddElevationParameters(Application::Pointer app, const std::string & key);
 
   /** Method for getting the value of the elevation mode selected */
-  static float GetDefaultElevation(const Application::Pointer app, const std::string& key);
-  static const std::string GetGeoidFile(const Application::Pointer app, const std::string& key);
-  static const std::string GetDEMDirectory(const Application::Pointer app, const std::string& key);
-  static bool IsGeoidUsed(const Application::Pointer app, const std::string& key);
-  static bool IsDEMUsed(const Application::Pointer app, const std::string & key);
+  static ITK_ABI_EXPORT float GetDefaultElevation(const Application::Pointer app, const std::string& key);
+  static ITK_ABI_EXPORT const std::string GetGeoidFile(const Application::Pointer app, const std::string& key);
+  static ITK_ABI_EXPORT const std::string GetDEMDirectory(const Application::Pointer app, const std::string& key);
+  static ITK_ABI_EXPORT bool IsGeoidUsed(const Application::Pointer app, const std::string& key);
+  static ITK_ABI_EXPORT bool IsDEMUsed(const Application::Pointer app, const std::string & key);
 
-  static void SetupDEMHandlerFromElevationParameters(const Application::Pointer app, const std::string& key);
+  static ITK_ABI_EXPORT void SetupDEMHandlerFromElevationParameters(const Application::Pointer app, const std::string& key);
 
 protected:
   ElevationParametersHandler(); // not implemented
diff --git a/Code/ApplicationEngine/otbWrapperEmptyParameter.h b/Code/ApplicationEngine/otbWrapperEmptyParameter.h
index fa4d4ee..61a0df2 100644
--- a/Code/ApplicationEngine/otbWrapperEmptyParameter.h
+++ b/Code/ApplicationEngine/otbWrapperEmptyParameter.h
@@ -28,7 +28,7 @@ namespace Wrapper
 /** \class EmptyParameter
  *  \brief This class represent an empty parameter for the wrapper framework (boolean value)
  */
-class EmptyParameter
+class ITK_ABI_EXPORT EmptyParameter
   : public Parameter
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperInputFilenameListParameter.h b/Code/ApplicationEngine/otbWrapperInputFilenameListParameter.h
index 8b4e325..dfd690a 100644
--- a/Code/ApplicationEngine/otbWrapperInputFilenameListParameter.h
+++ b/Code/ApplicationEngine/otbWrapperInputFilenameListParameter.h
@@ -32,7 +32,7 @@ namespace Wrapper
  *  \brief This class represents a list of InputFilename parameter
  */
 
-class ITK_EXPORT InputFilenameListParameter : public Parameter
+class ITK_ABI_EXPORT InputFilenameListParameter : public Parameter
 {
 public:
   /** Standard class typedef */
diff --git a/Code/ApplicationEngine/otbWrapperInputFilenameParameter.h b/Code/ApplicationEngine/otbWrapperInputFilenameParameter.h
index 33b087f..db2e65f 100644
--- a/Code/ApplicationEngine/otbWrapperInputFilenameParameter.h
+++ b/Code/ApplicationEngine/otbWrapperInputFilenameParameter.h
@@ -29,7 +29,7 @@ namespace Wrapper
 /** \class InputFilenameParameter
  *  \brief This class represent a string parameter for the wrapper framework
  */
-class InputFilenameParameter
+class ITK_ABI_EXPORT InputFilenameParameter
   : public Parameter
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperInputImageListParameter.h b/Code/ApplicationEngine/otbWrapperInputImageListParameter.h
index ab73ff9..cc3fb56 100644
--- a/Code/ApplicationEngine/otbWrapperInputImageListParameter.h
+++ b/Code/ApplicationEngine/otbWrapperInputImageListParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
  *  \brief This class represents a list of InputImage parameter
  */
 
-class ITK_EXPORT InputImageListParameter : public Parameter
+class ITK_ABI_EXPORT InputImageListParameter : public Parameter
 {
 public:
   /** Standard class typedef */
diff --git a/Code/ApplicationEngine/otbWrapperInputImageParameter.cxx b/Code/ApplicationEngine/otbWrapperInputImageParameter.cxx
index 05bc201..623f771 100644
--- a/Code/ApplicationEngine/otbWrapperInputImageParameter.cxx
+++ b/Code/ApplicationEngine/otbWrapperInputImageParameter.cxx
@@ -17,9 +17,6 @@
 =========================================================================*/
 #include "otbWrapperInputImageParameter.h"
 #include "itksys/SystemTools.hxx"
-#include "otbImageFileReader.h"
-#include "itkCastImageFilter.h"
-#include "otbImageToVectorImageCastFilter.h"
 #include "otbWrapperTypes.h"
 
 #include <boost/algorithm/string.hpp>
@@ -111,183 +108,32 @@ otbGetImageMacro(UInt8RGBImage);
 otbGetImageMacro(UInt8RGBAImage);
 
 
-template <class TOutputImage>
-TOutputImage *
-InputImageParameter::GetImage()
+void
+InputImageParameter::SetImage(FloatVectorImageType* image)
 {
-  otbMsgDevMacro(<< "GetImage()");
-
-  // Used m_PreviousFileName because if not, when the user call twice GetImage,
-  // it without changing the filename, it returns 2 different
-  // image pointers
-  // Only one image type can be used
-
-  // 2 cases : the user set a filename vs. the user set an image
-  if (m_UseFilename)
-    {
-    if( m_PreviousFileName!=m_FileName && !m_FileName.empty() )
-      {
-      //////////////////////// Filename case:
-      // A new valid filename has been given : a reader is created
-      m_PreviousFileName = m_FileName;
-      typedef otb::ImageFileReader<TOutputImage> ReaderType;
-      typename ReaderType::Pointer reader = ReaderType::New();
-      reader->SetFileName(m_FileName);
-
-      try
-        {
-        reader->UpdateOutputInformation();
-        }
-      catch (itk::ExceptionObject &)
-        {
-        this->ClearValue();
-        }
-
-      m_Image = reader->GetOutput();
-      m_Reader = reader;
-
-      // Pay attention, don't return m_Image because it is a ImageBase...
-      return reader->GetOutput();
-      }
-    else
-      {
-      // In this case, the reader and the image should already be there
-      if (m_Image.IsNull())
-        {
-        itkExceptionMacro("No input image or filename detected...");
-        }
-      else
-        {
-        // Check if the image type asked here is the same as the one used for the reader
-        if (dynamic_cast<TOutputImage*> (m_Image.GetPointer()))
-          {
-          return dynamic_cast<TOutputImage*> (m_Image.GetPointer());
-          }
-        else
-          {
-          itkExceptionMacro("Cannot ask a different image type");
-          }
-        }
-      }
-    }
-  else
-    {
-    //////////////////////// Image case:
-    if (m_Image.IsNull())
-      {
-      itkExceptionMacro("No input image or filename detected...");
-      }
-    else
-      {
-      if (dynamic_cast<UInt8ImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<UInt8ImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<Int16ImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<Int16ImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<UInt16ImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<UInt16ImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<Int32ImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<Int32ImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<UInt32ImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<UInt32ImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<FloatImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<FloatImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<DoubleImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<DoubleImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<UInt8VectorImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<UInt8VectorImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<Int16VectorImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<Int16VectorImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<UInt16VectorImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<UInt16VectorImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<Int32VectorImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<Int32VectorImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<UInt32VectorImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<UInt32VectorImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<FloatVectorImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<FloatVectorImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<DoubleVectorImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<DoubleVectorImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<UInt8RGBAImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<UInt8RGBAImageType, TOutputImage> ();
-        }
-      else if (dynamic_cast<UInt8RGBImageType*> (m_Image.GetPointer()))
-        {
-        return CastImage<UInt8RGBImageType, TOutputImage> ();
-        }
-      else
-        {
-        itkExceptionMacro("Unknown image type");
-        }
-      }
-    }
-
+  m_UseFilename = false;
+  this->SetImage<FloatVectorImageType>( image );
 }
 
 
-template <class TInputImage, class TOutputImage>
-TOutputImage*
-InputImageParameter::SimpleCastImage()
+bool
+InputImageParameter::HasValue() const
 {
-  TInputImage* realInputImage = dynamic_cast<TInputImage*>(m_Image.GetPointer());
-
-  typedef itk::CastImageFilter<TInputImage, TOutputImage> CasterType;
-  typename CasterType::Pointer caster = CasterType::New();
-
-  caster->SetInput(realInputImage);
-  caster->UpdateOutputInformation();
-
-  m_Image = caster->GetOutput();
-  m_Caster = caster;
-
-  return caster->GetOutput();
+  if( m_FileName.empty() && m_Image.IsNull() )
+    return false;
+  else
+    return true;
 }
 
-
-template <class TInputImage, class TOutputImage>
-TOutputImage*
-InputImageParameter::CastVectorImageFromImage()
+void
+InputImageParameter::ClearValue()
 {
-  TInputImage* realInputImage = dynamic_cast<TInputImage*>(m_Image.GetPointer());
-
-  typedef ImageToVectorImageCastFilter<TInputImage, TOutputImage> CasterType;
-  typename CasterType::Pointer caster = CasterType::New();
-
-  caster->SetInput(realInputImage);
-  caster->UpdateOutputInformation();
-
-  m_Image = caster->GetOutput();
-  m_Caster = caster;
-
-  return caster->GetOutput();
+ m_Image  = NULL;
+ m_Reader = NULL;
+ m_Caster = NULL;
+ m_FileName = "";
+ m_PreviousFileName="";
+ m_UseFilename = true;
 }
 
 
@@ -344,44 +190,6 @@ otbGenericCastImageMacro(FloatImageType, CastVectorImageFromImage, Vector)
 otbGenericCastImageMacro(DoubleImageType, CastVectorImageFromImage, Vector)
 
 
-void
-InputImageParameter::SetImage(FloatVectorImageType* image)
-{
-  m_UseFilename = false;
-  this->SetImage<FloatVectorImageType>( image );
-}
-
-
-template <class TInputImage>
-void
-InputImageParameter::SetImage(TInputImage* image)
-{
-  m_UseFilename = false;
-  m_Image = image;
-}
-
-
-bool
-InputImageParameter::HasValue() const
-{
-  if( m_FileName.empty() && m_Image.IsNull() )
-    return false;
-  else
-    return true;
-}
-
-void
-InputImageParameter::ClearValue()
-{
- m_Image  = NULL;
- m_Reader = NULL;
- m_Caster = NULL;
- m_FileName = "";
- m_PreviousFileName="";
- m_UseFilename = true;
-}
-
-
 }
 }
 
diff --git a/Code/ApplicationEngine/otbWrapperInputImageParameter.h b/Code/ApplicationEngine/otbWrapperInputImageParameter.h
index fe912b7..b70ca1c 100644
--- a/Code/ApplicationEngine/otbWrapperInputImageParameter.h
+++ b/Code/ApplicationEngine/otbWrapperInputImageParameter.h
@@ -30,7 +30,7 @@ namespace Wrapper
  *  \brief This class represents a InputImage parameter
  */
 
-class ITK_EXPORT InputImageParameter : public Parameter
+class ITK_ABI_EXPORT InputImageParameter : public Parameter
 {
 public:
   /** Standard class typedef */
@@ -80,7 +80,6 @@ public:
   template <class TImageType>
     TImageType* GetImage();
 
-
   /** Set a FloatVectorImageType image.*/
   void SetImage(FloatVectorImageType* image);
 
@@ -89,13 +88,10 @@ public:
     void SetImage(TImageType* image);
 
 
-    /** Generic cast method that will be specified for each image type. */
+  /** Generic cast method that will be specified for each image type. */
   template <class TInputImage, class TOutputImage>
-    TOutputImage* CastImage()
-  {
-    itkExceptionMacro("Cast from "<<typeid(TInputImage).name()<<" to "<<typeid(TInputImage).name()<<" not authorized.");
-  }
-
+  ITK_ABI_EXPORT TOutputImage*  CastImage();
+    
   /** Cast an image to an image of the same type
   * Image to Image, VectorImage to VectorImage, RGBAImage to RGBAImage. */
   template <class TInputImage, class TOutputImage>
@@ -159,7 +155,68 @@ private:
 
 }; // End class InputImage Parameter
 
+
+// template specializations of CastImage<> should be declared in header
+// so that the linker knows they exist when building OTB Applications
+
+#define otbDeclareCastImageMacro(InputImageType, OutputImageType)   \
+  template<> OutputImageType *                                          \
+  InputImageParameter::CastImage<InputImageType , OutputImageType>();    \
+
+#define otbGenericDeclareCastImageMacro(InputImageType, prefix)     \
+  otbDeclareCastImageMacro(InputImageType, UInt8##prefix##ImageType) \
+  otbDeclareCastImageMacro(InputImageType, UInt16##prefix##ImageType) \
+  otbDeclareCastImageMacro(InputImageType, Int16##prefix##ImageType) \
+  otbDeclareCastImageMacro(InputImageType, UInt32##prefix##ImageType) \
+  otbDeclareCastImageMacro(InputImageType, Int32##prefix##ImageType) \
+  otbDeclareCastImageMacro(InputImageType, Float##prefix##ImageType) \
+  otbDeclareCastImageMacro(InputImageType, Double##prefix##ImageType)
+
+  
+/*********************************************************************
+********************** Image -> Image
+**********************************************************************/
+otbGenericDeclareCastImageMacro(UInt8ImageType, )
+otbGenericDeclareCastImageMacro(Int16ImageType, )
+otbGenericDeclareCastImageMacro(UInt16ImageType, )
+otbGenericDeclareCastImageMacro(Int32ImageType, )
+otbGenericDeclareCastImageMacro(UInt32ImageType, )
+otbGenericDeclareCastImageMacro(FloatImageType, )
+otbGenericDeclareCastImageMacro(DoubleImageType, )
+
+
+/*********************************************************************
+********************** VectorImage -> VectorImage
+**********************************************************************/
+otbGenericDeclareCastImageMacro(UInt8VectorImageType, Vector)
+otbGenericDeclareCastImageMacro(Int16VectorImageType, Vector)
+otbGenericDeclareCastImageMacro(UInt16VectorImageType, Vector)
+otbGenericDeclareCastImageMacro(Int32VectorImageType, Vector)
+otbGenericDeclareCastImageMacro(UInt32VectorImageType, Vector)
+otbGenericDeclareCastImageMacro(FloatVectorImageType, Vector)
+otbGenericDeclareCastImageMacro(DoubleVectorImageType, Vector)
+
+
+/*********************************************************************
+********************** Image -> VectorImage
+**********************************************************************/
+otbGenericDeclareCastImageMacro(UInt8ImageType, Vector)
+otbGenericDeclareCastImageMacro(Int16ImageType, Vector)
+otbGenericDeclareCastImageMacro(UInt16ImageType, Vector)
+otbGenericDeclareCastImageMacro(Int32ImageType, Vector)
+otbGenericDeclareCastImageMacro(UInt32ImageType, Vector)
+otbGenericDeclareCastImageMacro(FloatImageType, Vector)
+otbGenericDeclareCastImageMacro(DoubleImageType, Vector)
+
+#undef otbDeclareCastImageMacro
+#undef otbGenericDeclareCastImageMacro
+
+
 } // End namespace Wrapper
 } // End namespace otb
 
+#ifndef OTB_MANUAL_INSTANTIATION
+#include "otbWrapperInputImageParameter.txx"
+#endif
+
 #endif
diff --git a/Code/ApplicationEngine/otbWrapperInputImageParameter.txx b/Code/ApplicationEngine/otbWrapperInputImageParameter.txx
new file mode 100644
index 0000000..89dde1c
--- /dev/null
+++ b/Code/ApplicationEngine/otbWrapperInputImageParameter.txx
@@ -0,0 +1,232 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef __otbWrapperInputImageParameter_txx
+#define __otbWrapperInputImageParameter_txx
+
+#include "otbWrapperInputImageParameter.h"
+
+#include "otbImageFileReader.h"
+#include "itkCastImageFilter.h"
+#include "otbImageToVectorImageCastFilter.h"
+
+namespace otb
+{
+namespace Wrapper
+{
+
+
+template <class TImageType>
+TImageType*
+InputImageParameter::GetImage()
+{
+  otbMsgDevMacro(<< "GetImage()");
+
+  // Used m_PreviousFileName because if not, when the user call twice GetImage,
+  // it without changing the filename, it returns 2 different
+  // image pointers
+  // Only one image type can be used
+
+  // 2 cases : the user set a filename vs. the user set an image
+  if (m_UseFilename)
+    {
+    if( m_PreviousFileName!=m_FileName && !m_FileName.empty() )
+      {
+      //////////////////////// Filename case:
+      // A new valid filename has been given : a reader is created
+      m_PreviousFileName = m_FileName;
+      typedef otb::ImageFileReader<TImageType> ReaderType;
+      typename ReaderType::Pointer reader = ReaderType::New();
+      reader->SetFileName(m_FileName);
+
+      try
+        {
+        reader->UpdateOutputInformation();
+        }
+      catch (itk::ExceptionObject &)
+        {
+        this->ClearValue();
+        }
+
+      m_Image = reader->GetOutput();
+      m_Reader = reader;
+
+      // Pay attention, don't return m_Image because it is a ImageBase...
+      return reader->GetOutput();
+      }
+    else
+      {
+      // In this case, the reader and the image should already be there
+      if (m_Image.IsNull())
+        {
+        itkExceptionMacro("No input image or filename detected...");
+        }
+      else
+        {
+        // Check if the image type asked here is the same as the one used for the reader
+        if (dynamic_cast<TImageType*> (m_Image.GetPointer()))
+          {
+          return dynamic_cast<TImageType*> (m_Image.GetPointer());
+          }
+        else
+          {
+          itkExceptionMacro("Cannot ask a different image type");
+          }
+        }
+      }
+    }
+  else
+    {
+    //////////////////////// Image case:
+    if (m_Image.IsNull())
+      {
+      itkExceptionMacro("No input image or filename detected...");
+      }
+    else
+      {
+      if (dynamic_cast<UInt8ImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<UInt8ImageType, TImageType> ();
+        }
+      else if (dynamic_cast<Int16ImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<Int16ImageType, TImageType> ();
+        }
+      else if (dynamic_cast<UInt16ImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<UInt16ImageType, TImageType> ();
+        }
+      else if (dynamic_cast<Int32ImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<Int32ImageType, TImageType> ();
+        }
+      else if (dynamic_cast<UInt32ImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<UInt32ImageType, TImageType> ();
+        }
+      else if (dynamic_cast<FloatImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<FloatImageType, TImageType> ();
+        }
+      else if (dynamic_cast<DoubleImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<DoubleImageType, TImageType> ();
+        }
+      else if (dynamic_cast<UInt8VectorImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<UInt8VectorImageType, TImageType> ();
+        }
+      else if (dynamic_cast<Int16VectorImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<Int16VectorImageType, TImageType> ();
+        }
+      else if (dynamic_cast<UInt16VectorImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<UInt16VectorImageType, TImageType> ();
+        }
+      else if (dynamic_cast<Int32VectorImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<Int32VectorImageType, TImageType> ();
+        }
+      else if (dynamic_cast<UInt32VectorImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<UInt32VectorImageType, TImageType> ();
+        }
+      else if (dynamic_cast<FloatVectorImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<FloatVectorImageType, TImageType> ();
+        }
+      else if (dynamic_cast<DoubleVectorImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<DoubleVectorImageType, TImageType> ();
+        }
+      else if (dynamic_cast<UInt8RGBAImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<UInt8RGBAImageType, TImageType> ();
+        }
+      else if (dynamic_cast<UInt8RGBImageType*> (m_Image.GetPointer()))
+        {
+        return CastImage<UInt8RGBImageType, TImageType> ();
+        }
+      else
+        {
+        itkExceptionMacro("Unknown image type");
+        }
+      }
+    }
+}
+
+
+template <class TInputImage, class TOutputImage>
+TOutputImage*
+InputImageParameter::CastImage()
+{
+  itkExceptionMacro("Cast from "<<typeid(TInputImage).name()<<" to "<<typeid(TInputImage).name()<<" not authorized.");
+}
+
+
+template <class TInputImage, class TOutputImage>
+TOutputImage*
+InputImageParameter::SimpleCastImage()
+{
+  TInputImage* realInputImage = dynamic_cast<TInputImage*>(m_Image.GetPointer());
+
+  typedef itk::CastImageFilter<TInputImage, TOutputImage> CasterType;
+  typename CasterType::Pointer caster = CasterType::New();
+
+  caster->SetInput(realInputImage);
+  caster->UpdateOutputInformation();
+
+  m_Image = caster->GetOutput();
+  m_Caster = caster;
+
+  return caster->GetOutput();
+}
+
+
+template <class TInputImage, class TOutputImage>
+TOutputImage*
+InputImageParameter::CastVectorImageFromImage()
+{
+  TInputImage* realInputImage = dynamic_cast<TInputImage*>(m_Image.GetPointer());
+
+  typedef ImageToVectorImageCastFilter<TInputImage, TOutputImage> CasterType;
+  typename CasterType::Pointer caster = CasterType::New();
+
+  caster->SetInput(realInputImage);
+  caster->UpdateOutputInformation();
+
+  m_Image = caster->GetOutput();
+  m_Caster = caster;
+
+  return caster->GetOutput();
+}
+
+
+template <class TInputImage>
+void
+InputImageParameter::SetImage(TInputImage* image)
+{
+  m_UseFilename = false;
+  m_Image = image;
+}
+
+
+} // End namespace Wrapper
+} // End namespace otb
+
+#endif
diff --git a/Code/ApplicationEngine/otbWrapperInputProcessXMLParameter.cxx b/Code/ApplicationEngine/otbWrapperInputProcessXMLParameter.cxx
index 637d43c..37f0d3d 100644
--- a/Code/ApplicationEngine/otbWrapperInputProcessXMLParameter.cxx
+++ b/Code/ApplicationEngine/otbWrapperInputProcessXMLParameter.cxx
@@ -150,11 +150,15 @@ InputProcessXMLParameter::Read(Application::Pointer this_)
   // Open the xml file
   TiXmlDocument doc;
 
-  FILE* fp = TiXmlFOpen( m_FileName.c_str (), "rb" );
+  //Use itksys::SystemTools::FOpen() and close it below because
+  //TiXmlDocument::TiXmlFileOpen( ) is not exposed from tinyXML library. Even
+  //though its available in the TiXmlDocument::SaveFile().
+  FILE* fp =  itksys::SystemTools::Fopen(m_FileName.c_str(), "rb");
 
   if (!doc.LoadFile(fp , TIXML_ENCODING_UTF8))
     {
     itkExceptionMacro(<< "Can't open file " << m_FileName);
+    fclose(fp);
     }
 
   TiXmlHandle handle(&doc);
@@ -221,12 +225,11 @@ InputProcessXMLParameter::Read(Application::Pointer this_)
     /*
     std::string message = "Input XML was generated for a different application( "
         + app_Name + ") while application loaded is:" + this_->GetName();
-
-    std::cerr << message << "\n\n";
     */
     itkWarningMacro( << "Input XML was generated for a different application( " <<
                        app_Name << ") while application loaded is:" <<this_->GetName());
 
+              fclose(fp);
     return -1;
     }
 
@@ -390,6 +393,9 @@ InputProcessXMLParameter::Read(Application::Pointer this_)
     //choice also comes as setint and setstring why??
     }
   ret = 0; //resetting return to zero, we dont use it anyway for now.
+
+  fclose(fp);
+
   return ret;
 }
 
diff --git a/Code/ApplicationEngine/otbWrapperInputProcessXMLParameter.h b/Code/ApplicationEngine/otbWrapperInputProcessXMLParameter.h
index dc251d0..f6ee859 100644
--- a/Code/ApplicationEngine/otbWrapperInputProcessXMLParameter.h
+++ b/Code/ApplicationEngine/otbWrapperInputProcessXMLParameter.h
@@ -12,7 +12,7 @@ namespace Wrapper
 /** \class InputProcessXMLParameter
  *  \brief This class represent a xml filename parameter for the wrapper framework to load otb application.
  */
-class InputProcessXMLParameter
+class ITK_ABI_EXPORT InputProcessXMLParameter
   : public Parameter
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperInputVectorDataListParameter.h b/Code/ApplicationEngine/otbWrapperInputVectorDataListParameter.h
index e23aaa9..738d4bc 100644
--- a/Code/ApplicationEngine/otbWrapperInputVectorDataListParameter.h
+++ b/Code/ApplicationEngine/otbWrapperInputVectorDataListParameter.h
@@ -16,7 +16,7 @@
 
 =========================================================================*/
 #ifndef __otbWrapperInputVectorDataListParameter_h
-#define __otbWrapperInputvectorDataListParameter_h
+#define __otbWrapperInputVectorDataListParameter_h
 
 #include "otbVectorDataFileReader.h"
 
@@ -31,7 +31,7 @@ namespace Wrapper
  *  \brief This class represents a list of VectorData parameter
  */
 
-class ITK_EXPORT InputVectorDataListParameter : public Parameter
+class ITK_ABI_EXPORT InputVectorDataListParameter : public Parameter
 {
 public:
   /** Standard class typedef */
diff --git a/Code/ApplicationEngine/otbWrapperInputVectorDataParameter.h b/Code/ApplicationEngine/otbWrapperInputVectorDataParameter.h
index e6df4fc..5a38da9 100644
--- a/Code/ApplicationEngine/otbWrapperInputVectorDataParameter.h
+++ b/Code/ApplicationEngine/otbWrapperInputVectorDataParameter.h
@@ -29,7 +29,7 @@ namespace Wrapper
  *  \brief This class represents a InputVectorData parameter
  */
 
-class ITK_EXPORT InputVectorDataParameter : public Parameter
+class ITK_ABI_EXPORT InputVectorDataParameter : public Parameter
 {
 public:
   /** Standard class typedef */
diff --git a/Code/ApplicationEngine/otbWrapperListViewParameter.h b/Code/ApplicationEngine/otbWrapperListViewParameter.h
index bfdb6a6..66bed6f 100644
--- a/Code/ApplicationEngine/otbWrapperListViewParameter.h
+++ b/Code/ApplicationEngine/otbWrapperListViewParameter.h
@@ -33,7 +33,7 @@ namespace Wrapper
  * method GetSelectedItems() allow the user to access to this method.
  *
  */
-class ListViewParameter
+class ITK_ABI_EXPORT ListViewParameter
   : public Parameter
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperMapProjectionParametersHandler.h b/Code/ApplicationEngine/otbWrapperMapProjectionParametersHandler.h
index 3a5880e..b2edd31 100644
--- a/Code/ApplicationEngine/otbWrapperMapProjectionParametersHandler.h
+++ b/Code/ApplicationEngine/otbWrapperMapProjectionParametersHandler.h
@@ -50,14 +50,14 @@ public:
     * Add a Group containing several choices for map projections
     *
     */
-  static void AddMapProjectionParameters(Application::Pointer app, const std::string & key);
+  static ITK_ABI_EXPORT void AddMapProjectionParameters(Application::Pointer app, const std::string & key);
 
   /**
     * Helper method : Compute the ProjectionRef knowing the map
     * projection picked up by the user
     *
     */
-  static const std::string GetProjectionRefFromChoice(const Application::Pointer app,
+  static ITK_ABI_EXPORT const std::string GetProjectionRefFromChoice(const Application::Pointer app,
                                                       const std::string & key);
 
 
@@ -67,7 +67,7 @@ public:
     *       The key must be totally if the InputImageParameter belongs
     *       to a ParamaterGroup, ie set io.in
     */
-  static void InitializeUTMParameters(Application::Pointer app,
+  static ITK_ABI_EXPORT void InitializeUTMParameters(Application::Pointer app,
                                       const std::string & imageKey,
                                       const std::string & mapKey );
 
diff --git a/Code/ApplicationEngine/otbWrapperNumericalParameter.h b/Code/ApplicationEngine/otbWrapperNumericalParameter.h
index 2234613..e233a32 100644
--- a/Code/ApplicationEngine/otbWrapperNumericalParameter.h
+++ b/Code/ApplicationEngine/otbWrapperNumericalParameter.h
@@ -30,7 +30,7 @@ namespace Wrapper
  *  \brief This class represents a numerical parameter
  */
 template <class T>
-class ITK_EXPORT NumericalParameter : public Parameter
+class ITK_ABI_EXPORT NumericalParameter : public Parameter
 {
 public:
   /** Standard class typedef */
diff --git a/Code/ApplicationEngine/otbWrapperOutputFilenameParameter.h b/Code/ApplicationEngine/otbWrapperOutputFilenameParameter.h
index 1b5babf..e960bd4 100644
--- a/Code/ApplicationEngine/otbWrapperOutputFilenameParameter.h
+++ b/Code/ApplicationEngine/otbWrapperOutputFilenameParameter.h
@@ -29,7 +29,7 @@ namespace Wrapper
 /** \class OutputFilenameParameter
  *  \brief This class represent a string parameter for the wrapper framework
  */
-class OutputFilenameParameter
+class ITK_ABI_EXPORT OutputFilenameParameter
   : public Parameter
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperOutputImageParameter.h b/Code/ApplicationEngine/otbWrapperOutputImageParameter.h
index 4351da3..33cc62d 100644
--- a/Code/ApplicationEngine/otbWrapperOutputImageParameter.h
+++ b/Code/ApplicationEngine/otbWrapperOutputImageParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
  *  \brief This class represents a OutputImage parameter
  */
 
-class ITK_EXPORT OutputImageParameter : public Parameter
+class ITK_ABI_EXPORT OutputImageParameter : public Parameter
 {
 public:
   /** Standard class typedef */
diff --git a/Code/ApplicationEngine/otbWrapperOutputProcessXMLParameter.h b/Code/ApplicationEngine/otbWrapperOutputProcessXMLParameter.h
index 7ae28e5..3d829ed 100644
--- a/Code/ApplicationEngine/otbWrapperOutputProcessXMLParameter.h
+++ b/Code/ApplicationEngine/otbWrapperOutputProcessXMLParameter.h
@@ -11,7 +11,7 @@ namespace Wrapper
 /** \class OutputProcessXMLParameter
  *  \brief This class represent a xml filename parameter for the wrapper framework to save otb application.
  */
-class OutputProcessXMLParameter
+class ITK_ABI_EXPORT OutputProcessXMLParameter
   : public Parameter
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperOutputVectorDataParameter.h b/Code/ApplicationEngine/otbWrapperOutputVectorDataParameter.h
index 987c7de..afee491 100644
--- a/Code/ApplicationEngine/otbWrapperOutputVectorDataParameter.h
+++ b/Code/ApplicationEngine/otbWrapperOutputVectorDataParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
  *  \brief This class represents a OutputVectorData parameter
  */
 
-class ITK_EXPORT OutputVectorDataParameter : public Parameter
+class ITK_ABI_EXPORT OutputVectorDataParameter : public Parameter
 {
 public:
   /** Standard class typedef */
diff --git a/Code/ApplicationEngine/otbWrapperParameter.h b/Code/ApplicationEngine/otbWrapperParameter.h
index f816f37..d8e0da9 100644
--- a/Code/ApplicationEngine/otbWrapperParameter.h
+++ b/Code/ApplicationEngine/otbWrapperParameter.h
@@ -55,7 +55,7 @@ enum DefaultValueMode
  *  wrapper framework. It should be subclassed to represent different
  *  kinds of parameters
  */
-class Parameter
+class ITK_ABI_EXPORT Parameter
   : public itk::Object
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperParameterGroup.h b/Code/ApplicationEngine/otbWrapperParameterGroup.h
index b09e92a..ecef2a7 100644
--- a/Code/ApplicationEngine/otbWrapperParameterGroup.h
+++ b/Code/ApplicationEngine/otbWrapperParameterGroup.h
@@ -30,7 +30,7 @@ namespace Wrapper
 /**
  * \class Group
  */
-class ITK_EXPORT ParameterGroup
+class ITK_ABI_EXPORT ParameterGroup
   : public Parameter
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperParameterKey.h b/Code/ApplicationEngine/otbWrapperParameterKey.h
index be04835..fa3bb79 100644
--- a/Code/ApplicationEngine/otbWrapperParameterKey.h
+++ b/Code/ApplicationEngine/otbWrapperParameterKey.h
@@ -34,7 +34,7 @@ namespace Wrapper
  *  The constructor accepts a string key constructed as follow : parent.me.child.
  *  It implements some key manipulation as described in the code.
  */
-class ITK_EXPORT ParameterKey
+class ITK_ABI_EXPORT ParameterKey
 {
 public:
 
diff --git a/Code/ApplicationEngine/otbWrapperRAMParameter.h b/Code/ApplicationEngine/otbWrapperRAMParameter.h
index 5c2c774..990adda 100644
--- a/Code/ApplicationEngine/otbWrapperRAMParameter.h
+++ b/Code/ApplicationEngine/otbWrapperRAMParameter.h
@@ -28,7 +28,7 @@ namespace Wrapper
 /** \class RAMParameter
  *  \brief This class represent a RAM parameter for the wrapper framework
  */
-class RAMParameter : public Parameter
+class ITK_ABI_EXPORT RAMParameter : public Parameter
 {
 public:
   /** Standard class typedef */
diff --git a/Code/ApplicationEngine/otbWrapperRadiusParameter.h b/Code/ApplicationEngine/otbWrapperRadiusParameter.h
index 7d9585f..13fd1fc 100644
--- a/Code/ApplicationEngine/otbWrapperRadiusParameter.h
+++ b/Code/ApplicationEngine/otbWrapperRadiusParameter.h
@@ -28,7 +28,7 @@ namespace Wrapper
 /** \class StringParameter
  *  \brief This class represent a radius parameter for the wrapper framework
  */
-class RadiusParameter
+class ITK_ABI_EXPORT RadiusParameter
   : public IntParameter
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperStringListParameter.h b/Code/ApplicationEngine/otbWrapperStringListParameter.h
index 42d8f90..1a17121 100644
--- a/Code/ApplicationEngine/otbWrapperStringListParameter.h
+++ b/Code/ApplicationEngine/otbWrapperStringListParameter.h
@@ -29,7 +29,7 @@ namespace Wrapper
 /** \class StringListParameter
  *  \brief This class represent a list of string parameter for the wrapper framework
  */
-class StringListParameter
+class ITK_ABI_EXPORT StringListParameter
   : public Parameter
 {
 public:
diff --git a/Code/ApplicationEngine/otbWrapperStringParameter.h b/Code/ApplicationEngine/otbWrapperStringParameter.h
index 06f11f2..f0f6254 100644
--- a/Code/ApplicationEngine/otbWrapperStringParameter.h
+++ b/Code/ApplicationEngine/otbWrapperStringParameter.h
@@ -29,7 +29,7 @@ namespace Wrapper
 /** \class StringParameter
  *  \brief This class represent a string parameter for the wrapper framework
  */
-class StringParameter
+class ITK_ABI_EXPORT StringParameter
   : public Parameter
 {
 public:
diff --git a/Code/BasicFilters/otbFrostImageFilter.txx b/Code/BasicFilters/otbFrostImageFilter.txx
index 4fa5521..39e6649 100644
--- a/Code/BasicFilters/otbFrostImageFilter.txx
+++ b/Code/BasicFilters/otbFrostImageFilter.txx
@@ -40,6 +40,7 @@ template <class TInputImage, class TOutputImage>
 FrostImageFilter<TInputImage, TOutputImage>::FrostImageFilter()
 {
   m_Radius.Fill(1);
+  m_Deramp = 0.1;
 }
 
 template <class TInputImage, class TOutputImage>
diff --git a/Code/BasicFilters/otbLabelImageRegionMergingFilter.txx b/Code/BasicFilters/otbLabelImageRegionMergingFilter.txx
index acbccde..da53930 100644
--- a/Code/BasicFilters/otbLabelImageRegionMergingFilter.txx
+++ b/Code/BasicFilters/otbLabelImageRegionMergingFilter.txx
@@ -150,7 +150,7 @@ LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
 template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage, class TOutputClusteredImage>
 void
 LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage, TOutputClusteredImage>
-::EnlargeOutputRequestedRegion( itk::DataObject *output )
+::EnlargeOutputRequestedRegion( itk::DataObject *itkNotUsed(output) )
  {
   // This filter requires all of the output images in the buffer.
   for ( unsigned int j = 0; j < this->GetNumberOfOutputs(); j++ )
diff --git a/Code/BasicFilters/otbLabelImageRegionPruningFilter.txx b/Code/BasicFilters/otbLabelImageRegionPruningFilter.txx
index 71ea773..f0cbe92 100644
--- a/Code/BasicFilters/otbLabelImageRegionPruningFilter.txx
+++ b/Code/BasicFilters/otbLabelImageRegionPruningFilter.txx
@@ -151,7 +151,7 @@ LabelImageRegionPruningFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
 template <class TInputLabelImage, class TInputSpectralImage, class TOutputLabelImage, class TOutputClusteredImage>
 void
 LabelImageRegionPruningFilter<TInputLabelImage, TInputSpectralImage, TOutputLabelImage, TOutputClusteredImage>
-::EnlargeOutputRequestedRegion( itk::DataObject *output )
+::EnlargeOutputRequestedRegion( itk::DataObject *itkNotUsed(output) )
  {
   // This filter requires all of the output images in the buffer.
   for ( unsigned int j = 0; j < this->GetNumberOfOutputs(); j++ )
@@ -402,13 +402,13 @@ LabelImageRegionPruningFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
 
       LabelType l = outputIt.Get();
       LabelType canLabel;
-      assert(m_CanonicalLabels[l] <= oldRegionCount);
+      itkAssertOrThrowMacro(m_CanonicalLabels[l] <= oldRegionCount,"Found a label greater than region count")
       canLabel = newLabels[m_CanonicalLabels[l]];
       outputIt.Set( canLabel );
-
       ++outputIt;
       }
 
+
     finishedPruning =  !minRegionCount ||  regionCount == 1 ||  pruneIterations>=10;
 
     // only one iteration for now
diff --git a/Code/BasicFilters/otbLabelizeImageFilterBase.h b/Code/BasicFilters/otbLabelizeImageFilterBase.h
index 7208ace..c1827a1 100644
--- a/Code/BasicFilters/otbLabelizeImageFilterBase.h
+++ b/Code/BasicFilters/otbLabelizeImageFilterBase.h
@@ -98,7 +98,7 @@ protected:
   virtual void GenerateData();
 
   /** Region growing */
-  virtual void RegionGrowing(const IndexType indexSeed) {}
+  virtual void RegionGrowing(const IndexType itkNotUsed(indexSeed)) {}
 
   /** Instance region growing filter*/
   RegionGrowingFilterPointerType m_RegionGrowingFilter;
diff --git a/Code/BasicFilters/otbListSampleToHistogramListGenerator.h b/Code/BasicFilters/otbListSampleToHistogramListGenerator.h
index f18bb83..e62a8af 100644
--- a/Code/BasicFilters/otbListSampleToHistogramListGenerator.h
+++ b/Code/BasicFilters/otbListSampleToHistogramListGenerator.h
@@ -146,7 +146,7 @@ protected:
   ListSampleToHistogramListGenerator();
   virtual ~ListSampleToHistogramListGenerator() {}
   void GenerateData();
-  DataObjectPointer MakeOutput(unsigned int idx);
+  DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
diff --git a/Code/BasicFilters/otbListSampleToHistogramListGenerator.txx b/Code/BasicFilters/otbListSampleToHistogramListGenerator.txx
index 014e50b..46a907e 100644
--- a/Code/BasicFilters/otbListSampleToHistogramListGenerator.txx
+++ b/Code/BasicFilters/otbListSampleToHistogramListGenerator.txx
@@ -90,7 +90,7 @@ template<class TListSample, class THistogramMeasurement, class TFrequencyContain
 typename ListSampleToHistogramListGenerator<TListSample,THistogramMeasurement, TFrequencyContainer>
 ::DataObjectPointer
 ListSampleToHistogramListGenerator<TListSample,THistogramMeasurement, TFrequencyContainer>
-::MakeOutput(unsigned int idx)
+::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx))
 {
   DataObjectPointer output;
   output = static_cast<itk::DataObject*>(HistogramListType::New().GetPointer());
diff --git a/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGenerator.txx b/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGenerator.txx
index 8a383cd..8ecdf69 100644
--- a/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGenerator.txx
+++ b/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGenerator.txx
@@ -85,7 +85,7 @@ template<class TListSample, class THistogramMeasurement, class TFrequencyContain
 typename ListSampleToVariableDimensionHistogramGenerator<TListSample,THistogramMeasurement, TFrequencyContainer>
 ::DataObjectPointer
 ListSampleToVariableDimensionHistogramGenerator<TListSample, THistogramMeasurement,TFrequencyContainer>
-::MakeOutput(unsigned int idx)
+::MakeOutput(unsigned int itkNotUsed(idx))
 {
   DataObjectPointer output;
   output = static_cast<itk::DataObject*>(HistogramType::New().GetPointer());
diff --git a/Code/BasicFilters/otbMeanShiftImageFilter.txx b/Code/BasicFilters/otbMeanShiftImageFilter.txx
index d5a54cb..0e577c0 100644
--- a/Code/BasicFilters/otbMeanShiftImageFilter.txx
+++ b/Code/BasicFilters/otbMeanShiftImageFilter.txx
@@ -143,7 +143,7 @@ MeanShiftImageFilter<TInputImage, TOutputImage, TLabeledOutput, TBufferConverter
 
 template <class TInputImage, class TOutputImage, class TLabeledOutput, class TBufferConverter>
 void
-MeanShiftImageFilter<TInputImage, TOutputImage, TLabeledOutput, TBufferConverter>::EnlargeOutputRequestedRegion( itk::DataObject *output )
+MeanShiftImageFilter<TInputImage, TOutputImage, TLabeledOutput, TBufferConverter>::EnlargeOutputRequestedRegion( itk::DataObject *itkNotUsed(output) )
 {
 
   // This filter requires all of the output images in the buffer.
diff --git a/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.txx b/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.txx
index 87b62ff..7a2f302 100644
--- a/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.txx
+++ b/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.txx
@@ -181,7 +181,7 @@ void MeanShiftSmoothingImageFilter<TInputImage, TOutputImage, TKernel, TOutputIt
 
   for(unsigned int comp = 0; comp < ImageDimension; ++comp)
     {
-      margin[comp] = (m_MaxIterationNumber+1) * m_SpatialRadius[comp];
+    margin[comp] = (m_MaxIterationNumber * m_SpatialRadius[comp]) + 1;
     }
 
   inputRequestedRegion.PadByRadius(margin);
diff --git a/Code/BasicFilters/otbPointSetExtractROI.txx b/Code/BasicFilters/otbPointSetExtractROI.txx
index 2ac82c9..cca471a 100644
--- a/Code/BasicFilters/otbPointSetExtractROI.txx
+++ b/Code/BasicFilters/otbPointSetExtractROI.txx
@@ -54,11 +54,6 @@ PointSetExtractROI<TInputPointSet, TOutputPointSet>
 ::GenerateData(void)
 {
   typedef typename TInputPointSet::PointsContainer  InputPointsContainer;
-  typedef typename TOutputPointSet::PointsContainer OutputPointsContainer;
-
-  typedef typename TInputPointSet::PointDataContainer  InputPointDataContainer;
-  typedef typename TOutputPointSet::PointDataContainer OutputPointDataContainer;
-
   typedef typename TInputPointSet::PointsContainerPointer  InputPointsContainerPointer;
   typedef typename TOutputPointSet::PointsContainerPointer OutputPointsContainerPointer;
 
diff --git a/Code/BasicFilters/otbProlateInterpolateImageFunction.h b/Code/BasicFilters/otbProlateInterpolateImageFunction.h
index 555dfe4..cf6c0b6 100644
--- a/Code/BasicFilters/otbProlateInterpolateImageFunction.h
+++ b/Code/BasicFilters/otbProlateInterpolateImageFunction.h
@@ -201,15 +201,15 @@ public:
     TOutput val = itk::NumericTraits<TOutput>::Zero;
     if (A != itk::NumericTraits<TInput>::Zero && vcl_abs(A) != static_cast<TInput>(m_Radius) && m_Radius != 0)
       {
-      double ival = static_cast<double>(originalProfileSize) * static_cast<double>(vcl_abs(A)) /
+      double ival = static_cast<double>(originalProfileSize - 1) * static_cast<double>(vcl_abs(A)) /
                     static_cast<double>(m_Radius);
       double ivalFloor = vcl_floor(ival);
       double left = ival - ivalFloor;
 
-      if (ivalFloor < originalProfileSize - 1)
+      if (static_cast<unsigned int>(ivalFloor) + 1 < originalProfileSize)
         {
-        val = left * m_OriginalProfile[static_cast<unsigned int>(ivalFloor)] +
-              (1 - left) * m_OriginalProfile[static_cast<unsigned int>(ivalFloor) + 1];
+        val = (1.0 - left) * m_OriginalProfile[static_cast<unsigned int>(ivalFloor)] +
+              left * m_OriginalProfile[static_cast<unsigned int>(ivalFloor) + 1];
         }
       else
         {
diff --git a/Code/BasicFilters/otbRasterizeVectorDataFilter.txx b/Code/BasicFilters/otbRasterizeVectorDataFilter.txx
index 40a7dc3..4b417b0 100644
--- a/Code/BasicFilters/otbRasterizeVectorDataFilter.txx
+++ b/Code/BasicFilters/otbRasterizeVectorDataFilter.txx
@@ -174,8 +174,8 @@ RasterizeVectorDataFilter<TVectorData, TInputImage, TOutputImage>::GenerateData(
   InputIndexType  bufferIndexOrigin = bufferedRegion.GetIndex();
   InputPointType  bufferOrigin;
   this->GetOutput()->TransformIndexToPhysicalPoint(bufferIndexOrigin, bufferOrigin);
-  geoTransform[0] = bufferOrigin[0];
-  geoTransform[3] = bufferOrigin[1];
+  geoTransform[0] = bufferOrigin[0] - 0.5 * this->GetOutput()->GetSpacing()[0];
+  geoTransform[3] = bufferOrigin[1] - 0.5 * this->GetOutput()->GetSpacing()[1];
   geoTransform[1] = this->GetOutput()->GetSpacing()[0];
   geoTransform[5] = this->GetOutput()->GetSpacing()[1];
 
diff --git a/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.txx b/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.txx
index cf83271..7501ba3 100644
--- a/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.txx
+++ b/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.txx
@@ -370,6 +370,8 @@ SpatialObjectToImageDrawingFilter<TInputSpatialObject, TOutputImage>
 
   if (originspecified)
     {
+    origine[0] += 0.5 * m_Spacing[0];
+    origine[1] += 0.5 * m_Spacing[1];
     OutputImage->SetOrigin(origine);     //   and origin
     m_Origin[0] = OutputImage->GetOrigin()[0];
     m_Origin[1] = OutputImage->GetOrigin()[1];
diff --git a/Code/BasicFilters/otbStreamingCompareImageFilter.h b/Code/BasicFilters/otbStreamingCompareImageFilter.h
index d88a014..e1d1aed 100644
--- a/Code/BasicFilters/otbStreamingCompareImageFilter.h
+++ b/Code/BasicFilters/otbStreamingCompareImageFilter.h
@@ -121,6 +121,9 @@ public:
   RealObjectType* GetMAEOutput();
   const RealObjectType* GetMAEOutput() const;
 
+  itkGetMacro(PhysicalSpaceCheck,bool);
+  itkSetMacro(PhysicalSpaceCheck,bool);
+
   /** Make a DataObject of the correct type to be used as the specified
    * output. */
   virtual DataObjectPointer MakeOutput(unsigned int idx);
@@ -143,6 +146,11 @@ protected:
                              outputRegionForThread,
                              itk::ThreadIdType threadId);
 
+  /** Allows to skip the verification of physical space between
+   *  the two input images (see flag m_PhysicalSpaceCheck)
+   */
+  virtual void VerifyInputInformation();
+
 private:
   PersistentCompareImageFilter(const Self &); //purposely not implemented
   void operator =(const Self&); //purposely not implemented
@@ -152,6 +160,7 @@ private:
   itk::Array<PixelType> m_ThreadMinRef;
   itk::Array<PixelType> m_ThreadMaxRef;
   itk::Array<long>      m_Count;
+  bool                  m_PhysicalSpaceCheck;
 }; // end of class PersistentCompareImageFilter
 
 /*===========================================================================*/
@@ -264,6 +273,18 @@ public:
     return this->GetFilter()->GetMAEOutput();
   }
 
+  /** Set the PhysicalSpaceCheck flag */
+  void SetPhysicalSpaceCheck(bool flag)
+  {
+    this->GetFilter()->SetPhysicalSpaceCheck(flag);
+  }
+
+  /** Get the PhysicalSpaceCheck flag */
+  bool GetPhysicalSpaceCheck()
+  {
+    return this->GetFilter()->GetPhysicalSpaceCheck();
+  }
+
 protected:
   /** Constructor */
   StreamingCompareImageFilter() {};
diff --git a/Code/BasicFilters/otbStreamingCompareImageFilter.txx b/Code/BasicFilters/otbStreamingCompareImageFilter.txx
index 5ae411f..ecf4a05 100644
--- a/Code/BasicFilters/otbStreamingCompareImageFilter.txx
+++ b/Code/BasicFilters/otbStreamingCompareImageFilter.txx
@@ -31,7 +31,7 @@ namespace otb
 template<class TInputImage>
 PersistentCompareImageFilter<TInputImage>
 ::PersistentCompareImageFilter() : m_SquareOfDifferences(1), m_AbsoluteValueOfDifferences(1),
- m_ThreadMinRef(1), m_ThreadMaxRef(1), m_Count(1)
+ m_ThreadMinRef(1), m_ThreadMaxRef(1), m_Count(1), m_PhysicalSpaceCheck(true)
 {
   this->SetNumberOfRequiredInputs( 2 );
   // first output is a copy of the image, DataObject created by
@@ -278,6 +278,15 @@ PersistentCompareImageFilter<TInputImage>
 template<class TInputImage>
 void
 PersistentCompareImageFilter<TInputImage>
+::VerifyInputInformation()
+{
+  if (m_PhysicalSpaceCheck)
+    Superclass::VerifyInputInformation();
+}
+
+template<class TInputImage>
+void
+PersistentCompareImageFilter<TInputImage>
 ::ThreadedGenerateData(const RegionType& outputRegionForThread,
                        itk::ThreadIdType threadId)
 {
diff --git a/Code/BasicFilters/otbStreamingHistogramVectorImageFilter.h b/Code/BasicFilters/otbStreamingHistogramVectorImageFilter.h
index d6c63ea..bdd179f 100644
--- a/Code/BasicFilters/otbStreamingHistogramVectorImageFilter.h
+++ b/Code/BasicFilters/otbStreamingHistogramVectorImageFilter.h
@@ -26,7 +26,7 @@
 
 #include "otbObjectList.h"
 #include "itkStatisticsAlgorithm.h"
-#include "itkDenseFrequencyContainer.h"
+#include "itkDenseFrequencyContainer2.h"
 #include "itkNumericTraits.h"
 #include "itkHistogram.h"
 
@@ -37,11 +37,11 @@ namespace otb
  * \brief Compute the histogram of a large image using streaming
  *
  *  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.
+ * requested regions, the output histogram will be the histogram of the whole set of n regions.
  *
  * 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.
+ * To get the histogram once the regions have been processed via the pipeline, use the Synthetize() method.
  *
  * \sa PersistentImageFilter
  * \ingroup Streamed
@@ -88,12 +88,18 @@ public:
   typedef typename itk::DataObject::Pointer       DataObjectPointer;
 
   /** Types for histogram */
-  typedef itk::Statistics::DenseFrequencyContainer        DFContainerType;
-  typedef typename itk::NumericTraits
-    <InternalPixelType>::RealType                         HistogramMeasurementRealType;
-  typedef itk::Statistics::Histogram<HistogramMeasurementRealType, 1,
-      DFContainerType>                                    HistogramType;
-  typedef typename HistogramType::SizeType                HistogramSizeType;
+  typedef itk::Statistics::DenseFrequencyContainer2        DFContainerType;
+
+  typedef
+    typename itk::NumericTraits<InternalPixelType>::RealType
+    HistogramMeasurementRealType;
+
+  typedef
+    itk::Statistics::Histogram<HistogramMeasurementRealType, DFContainerType>
+    HistogramType;
+
+  typedef itk::VariableLengthVector< unsigned int > CountVectorType;
+
   typedef PixelType                                       MeasurementVectorType;
   typedef ObjectList<HistogramType>                       HistogramListType;
   typedef typename HistogramListType::Pointer             HistogramListPointerType;
@@ -125,9 +131,14 @@ public:
    */
   itkBooleanMacro(NoDataFlag);
 
-  void SetNumberOfBins(unsigned int size)
+  inline void SetNumberOfBins( unsigned int i, CountVectorType::ValueType size )
+  {
+    m_Size[ i ] = size;
+  }
+
+  inline void SetNumberOfBins( const CountVectorType& size )
   {
-    m_Size[0] = size;
+    m_Size = size;
   }
 
   /** Return the computed histogram list */
@@ -177,7 +188,7 @@ private:
   void operator =(const Self&); //purposely not implemented
 
   ArrayHistogramListType   m_ThreadHistogramList;
-  HistogramSizeType        m_Size;
+  CountVectorType          m_Size;
   MeasurementVectorType    m_HistogramMin;
   MeasurementVectorType    m_HistogramMax;
   bool                     m_NoDataFlag;
diff --git a/Code/BasicFilters/otbStreamingHistogramVectorImageFilter.txx b/Code/BasicFilters/otbStreamingHistogramVectorImageFilter.txx
index 4202221..2b1bb2f 100644
--- a/Code/BasicFilters/otbStreamingHistogramVectorImageFilter.txx
+++ b/Code/BasicFilters/otbStreamingHistogramVectorImageFilter.txx
@@ -33,11 +33,14 @@ namespace otb
 
 template<class TInputImage>
 PersistentHistogramVectorImageFilter<TInputImage>
-::PersistentHistogramVectorImageFilter() : m_HistogramMin(),
-                                           m_HistogramMax(),
-                                           m_NoDataFlag(false),
-                                           m_NoDataValue(itk::NumericTraits<InternalPixelType>::Zero),
-                                           m_SubSamplingRate(1)
+::PersistentHistogramVectorImageFilter() :
+  m_ThreadHistogramList(),
+  m_Size(),
+  m_HistogramMin(),
+  m_HistogramMax(),
+  m_NoDataFlag(false),
+  m_NoDataValue(itk::NumericTraits<InternalPixelType>::Zero),
+  m_SubSamplingRate(1)
 {
   // first output is a copy of the image, DataObject created by
   // superclass
@@ -126,7 +129,8 @@ PersistentHistogramVectorImageFilter<TInputImage>
   unsigned int numberOfThreads = this->GetNumberOfThreads();
   unsigned int numberOfComponent = inputPtr->GetNumberOfComponentsPerPixel();
 
-  bool clipBins = true;
+// TODO which is the good value ? (false in MVD2)
+  bool clipBins = false;
 
   // if histogram Min and Max have the wrong size : set to default [0, 255]
   if (m_HistogramMin.Size() != numberOfComponent ||
@@ -145,16 +149,24 @@ PersistentHistogramVectorImageFilter<TInputImage>
   for (unsigned int k=0; k<numberOfComponent; ++k)
     {
     typename HistogramType::MeasurementVectorType bandMin, bandMax;
-    bandMin[0] = m_HistogramMin[k];
-    bandMax[0] = m_HistogramMax[k];
+    bandMin.SetSize(1);
+    bandMax.SetSize(1);
+    bandMin.Fill(m_HistogramMin[k]);
+    bandMax.Fill(m_HistogramMax[k]);
 
     typename HistogramType::Pointer histogram = HistogramType::New();
     histogram->SetClipBinsAtEnds(clipBins);
-    histogram->Initialize(m_Size, bandMin, bandMax);
-    outputHisto->PushBack(histogram);
-    }
 
+    typename HistogramType::SizeType size;
+    size.SetSize(1);
+    size.Fill( m_Size[ k ] );
+    histogram->SetMeasurementVectorSize(1);
+    histogram->Initialize( size, bandMin, bandMax );
 
+    outputHisto->PushBack(histogram);
+    }
+  
+  
   // Setup HistogramLists for each thread
   m_ThreadHistogramList.clear();
   for (unsigned int i=0; i<numberOfThreads; ++i)
@@ -164,12 +176,20 @@ PersistentHistogramVectorImageFilter<TInputImage>
     for (unsigned int k=0; k<numberOfComponent; ++k)
       {
       typename HistogramType::MeasurementVectorType bandMin, bandMax;
-      bandMin[0] = m_HistogramMin[k];
-      bandMax[0] = m_HistogramMax[k];
-
+      bandMin.SetSize(1);
+      bandMax.SetSize(1);
+      bandMin.Fill(m_HistogramMin[k]);
+      bandMax.Fill(m_HistogramMax[k]);
+      
       typename HistogramType::Pointer histogram = HistogramType::New();
       histogram->SetClipBinsAtEnds(clipBins);
-      histogram->Initialize(m_Size, bandMin, bandMax);
+
+      typename HistogramType::SizeType size;
+      size.SetSize(1);
+      size.Fill( m_Size[ k ] );
+      histogram->SetMeasurementVectorSize(1);
+      histogram->Initialize(size, bandMin, bandMax );
+
       histoList->PushBack(histogram);
       }
     m_ThreadHistogramList.push_back(histoList);
@@ -251,11 +271,34 @@ PersistentHistogramVectorImageFilter<TInputImage>
       }
 
     PixelType vectorValue = it.Get();
-    for (unsigned int j = 0; j < vectorValue.GetSize(); ++j)
+
+       bool skipSampleNoData=false;
+       if(m_NoDataFlag)
       {
-      InternalPixelType value = vectorValue[j];
-      if( (!m_NoDataFlag) || value!=m_NoDataValue )
+      unsigned int itComp=0;
+         while( itComp < vectorValue.GetSize() )
+           {
+           if (vectorValue[itComp]==m_NoDataValue)
+                {
+          skipSampleNoData=true;
+          itComp++;
+          }
+        else
+          {
+          skipSampleNoData=false;
+          break;
+          }
+           }
+      }
+
+    if( !skipSampleNoData )
+      {
+      for (unsigned int j = 0; j < vectorValue.GetSize(); ++j)
         {
+        typename HistogramType::MeasurementVectorType value;
+        value.SetSize(1);
+        value.Fill(vectorValue[j]);
+
         m_ThreadHistogramList[threadId]->GetNthElement(j)->GetIndex(value, index);
         if (!m_ThreadHistogramList[threadId]->GetNthElement(j)->IsIndexOutOfBounds(index))
           {
@@ -265,10 +308,11 @@ PersistentHistogramVectorImageFilter<TInputImage>
           // bin value.
           // If the index isn't valid, we don't increase the frequency.
           // See the comments in Histogram->GetIndex() for more info.
-          m_ThreadHistogramList[threadId]->GetNthElement(j)->IncreaseFrequency(index, 1);
+          m_ThreadHistogramList[threadId]->GetNthElement(j)->IncreaseFrequencyOfIndex(index, 1);
           }
         }
       }
+      
     ++it;
     progress.CompletedPixel();
     }
diff --git a/Code/BasicFilters/otbStreamingShrinkImageFilter.cxx b/Code/BasicFilters/otbStreamingShrinkImageFilter.cxx
index 1dd50d0..e1e2064 100644
--- a/Code/BasicFilters/otbStreamingShrinkImageFilter.cxx
+++ b/Code/BasicFilters/otbStreamingShrinkImageFilter.cxx
@@ -59,7 +59,7 @@ StreamingShrinkImageRegionSplitter
 
 StreamingShrinkImageRegionSplitter::RegionType
 StreamingShrinkImageRegionSplitter
-::GetSplit(unsigned int i, unsigned int numberOfPieces, const RegionType& region)
+::GetSplit(unsigned int i, unsigned int itkNotUsed(numberOfPieces), const RegionType& region)
 {
   RegionType splitRegion;
   IndexType  splitIndex;
diff --git a/Code/BasicFilters/otbStreamingShrinkImageFilter.txx b/Code/BasicFilters/otbStreamingShrinkImageFilter.txx
index 76043b1..ae38785 100644
--- a/Code/BasicFilters/otbStreamingShrinkImageFilter.txx
+++ b/Code/BasicFilters/otbStreamingShrinkImageFilter.txx
@@ -129,18 +129,24 @@ PersistentShrinkImageFilter<TInputImage, TOutputImage>
   typename OutputImageType::RegionType  shrinkedOutputLargestPossibleRegion;
   typename OutputImageType::SizeType    shrinkedOutputSize;
   typename OutputImageType::IndexType   shrinkedOutputStartIndex;
+  typename OutputImageType::PointType   shrinkedOutputOrigin;
 
   for (unsigned int i = 0; i < OutputImageType::ImageDimension; ++i)
     {
     shrinkedOutputSpacing[i] = inputSpacing[i] * static_cast<double>(m_ShrinkFactor);
     shrinkedOutputSize[i] = inputSize[i] > m_ShrinkFactor ? inputSize[i] / m_ShrinkFactor : 1;
+    
+    shrinkedOutputOrigin[i] = inputPtr->GetOrigin()[i] + inputSpacing[i] *
+      (static_cast<double>(inputPtr->GetLargestPossibleRegion().GetIndex(i)) - 0.5)
+      + shrinkedOutputSpacing[i] * 0.5;
 
-    // TODO : don't know what to do here.
-    // dividing the input index by the shrink factor does not make a lot of sense...
+    // we choose to output a region with a start index [0,0]
+    // the origin is set accordingly
     shrinkedOutputStartIndex[i] = 0;
     }
 
   m_ShrinkedOutput->SetSpacing(shrinkedOutputSpacing);
+  m_ShrinkedOutput->SetOrigin(shrinkedOutputOrigin);
 
   shrinkedOutputLargestPossibleRegion.SetSize(shrinkedOutputSize);
   shrinkedOutputLargestPossibleRegion.SetIndex(shrinkedOutputStartIndex);
@@ -176,6 +182,7 @@ PersistentShrinkImageFilter<TInputImage, TOutputImage>
   for(inIt.GoToBegin(); !inIt.IsAtEnd(); ++inIt, progress.CompletedPixel())
     {
     const IndexType& inIndex = inIt.GetIndex();
+    // TODO the pixel value should be taken near the centre of the cell, not at the corners
     if (inIndex[0] % m_ShrinkFactor == 0
         && inIndex[1] % m_ShrinkFactor == 0 )
       {
diff --git a/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.txx b/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.txx
index 1378d7a..d916d57 100644
--- a/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.txx
+++ b/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.txx
@@ -452,13 +452,21 @@ PersistentStreamingStatisticsVectorImageFilter<TInputImage, TPrecision>
     const RealPixelType& mean = this->GetMeanOutput()->Get();
 
     double regul = 1.0;
+    double regulComponent = 1.0;
 
-    if( m_UseUnbiasedEstimator && nbPixels>1 )
+    if( m_UseUnbiasedEstimator && nbRelevantPixels>1 )
       {
       regul =
        static_cast< double >( nbRelevantPixels ) /
        ( static_cast< double >( nbRelevantPixels ) - 1.0 );
       }
+    
+    if( m_UseUnbiasedEstimator && (nbRelevantPixels * numberOfComponent) > 1 )
+      {
+      regulComponent =
+        static_cast< double >(nbRelevantPixels * numberOfComponent) /
+       ( static_cast< double >(nbRelevantPixels * numberOfComponent) - 1.0 );
+      }
 
     MatrixType cov  = cor;
     for (unsigned int r = 0; r < numberOfComponent; ++r)
@@ -473,8 +481,7 @@ PersistentStreamingStatisticsVectorImageFilter<TInputImage, TPrecision>
     this->GetComponentMeanOutput()->Set(streamFirstOrderComponentAccumulator / (nbRelevantPixels * numberOfComponent));
     this->GetComponentCorrelationOutput()->Set(streamSecondOrderComponentAccumulator / (nbRelevantPixels * numberOfComponent));
     this->GetComponentCovarianceOutput()->Set(
-        (nbRelevantPixels * numberOfComponent) / (nbRelevantPixels * numberOfComponent - 1)
-        * (this->GetComponentCorrelation()
+        regulComponent * (this->GetComponentCorrelation()
            - (this->GetComponentMean() * this->GetComponentMean())));
     }
 }
diff --git a/Code/BasicFilters/otbTileImageFilter.txx b/Code/BasicFilters/otbTileImageFilter.txx
index dbb8c7a..0049f91 100644
--- a/Code/BasicFilters/otbTileImageFilter.txx
+++ b/Code/BasicFilters/otbTileImageFilter.txx
@@ -164,7 +164,7 @@ TileImageFilter<TImage>
 template <class TImage>
 void
 TileImageFilter<TImage>
-::ThreadedGenerateData(const RegionType& outputRegionForThread, itk::ThreadIdType threadId)
+::ThreadedGenerateData(const RegionType& outputRegionForThread, itk::ThreadIdType itkNotUsed(threadId))
 {
   // Retrieve output image pointer
   ImageType * outputPtr = this->GetOutput();
diff --git a/Code/BasicFilters/otbVectorDataToLabelImageFilter.txx b/Code/BasicFilters/otbVectorDataToLabelImageFilter.txx
index 2c956ac..9e2eea4 100644
--- a/Code/BasicFilters/otbVectorDataToLabelImageFilter.txx
+++ b/Code/BasicFilters/otbVectorDataToLabelImageFilter.txx
@@ -288,8 +288,8 @@ VectorDataToLabelImageFilter<TVectorData, TOutputImage>::GenerateData()
   OutputIndexType  bufferIndexOrigin = bufferedRegion.GetIndex();
   OutputOriginType bufferOrigin;
   this->GetOutput()->TransformIndexToPhysicalPoint(bufferIndexOrigin, bufferOrigin);
-  geoTransform[0] = bufferOrigin[0];
-  geoTransform[3] = bufferOrigin[1];
+  geoTransform[0] = bufferOrigin[0] - 0.5 * this->GetOutput()->GetSpacing()[0];
+  geoTransform[3] = bufferOrigin[1] - 0.5 * this->GetOutput()->GetSpacing()[1];
   geoTransform[1] = this->GetOutput()->GetSpacing()[0];
   geoTransform[5] = this->GetOutput()->GetSpacing()[1];
 
diff --git a/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.txx b/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.txx
index 35849e7..2f05d6d 100644
--- a/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.txx
+++ b/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.txx
@@ -84,7 +84,7 @@ template <class TInputImage, class TOutputImage>
 void
 VectorImageTo3DScalarImageFilter<TInputImage, TOutputImage>
 ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
-                       itk::ThreadIdType threadId)
+                       itk::ThreadIdType itkNotUsed(threadId))
 {
   const InputImageType* inputPtr = this->GetInput();
   OutputImageType*      outputPtr = this->GetOutput();
diff --git a/Code/CMakeLists.txt b/Code/CMakeLists.txt
index 8a776cd..d597327 100644
--- a/Code/CMakeLists.txt
+++ b/Code/CMakeLists.txt
@@ -27,9 +27,3 @@ if(BUILD_APPLICATIONS)
   add_subdirectory(Wrappers)
 endif()
 
-if(OTB_COMPILE_WITH_FULL_WARNING)
-  if(CMAKE_COMPILER_IS_GNUCXX)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OTB_FULL_WARNING_LIST_PARAMETERS}")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OTB_FULL_WARNING_LIST_PARAMETERS}")
-  endif()
-endif()
diff --git a/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h b/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h
index 8a987c7..64ee4ff 100644
--- a/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h
+++ b/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h
@@ -72,6 +72,24 @@ public:
 
   typedef itk::ProcessObject ProcessObjectType;
 
+  typedef itk::ConstNeighborhoodIterator<TInputImage1>
+  NeighborhoodIteratorType1;
+  typedef itk::ConstNeighborhoodIterator<TInputImage2>
+  NeighborhoodIteratorType2;
+
+  typedef typename NeighborhoodIteratorType1::RadiusType RadiusType1;
+  typedef typename NeighborhoodIteratorType2::RadiusType RadiusType2;
+
+  typedef unsigned char RadiusSizeType;
+
+  /** Typedefs for histogram. This should have been defined as
+      Histogram<RealType, 2> but a bug in VC++7 produced an internal compiler
+      error with such declaration. */
+  typedef typename itk::Statistics::Histogram<double,
+             itk::Statistics::DenseFrequencyContainer2 > HistogramType;
+  typedef typename HistogramType::MeasurementVectorType  MeasurementVectorType;
+  typedef typename HistogramType::SizeType               HistogramSizeType;
+
   /** Connect one of the operands for pixel-wise addition */
   void SetInput1(const TInputImage1 * image1);
 
@@ -103,33 +121,9 @@ public:
     this->Modified();
   }
 
-  typedef itk::ConstNeighborhoodIterator<TInputImage1>
-  NeighborhoodIteratorType1;
-  typedef itk::ConstNeighborhoodIterator<TInputImage2>
-  NeighborhoodIteratorType2;
-
-  typedef typename NeighborhoodIteratorType1::RadiusType RadiusType1;
-  typedef typename NeighborhoodIteratorType2::RadiusType RadiusType2;
-
-  typedef unsigned char RadiusSizeType;
-
+  /** Neighborhood radius */
   itkSetMacro(Radius, RadiusSizeType);
 
-  /** Typedefs for histogram. This should have been defined as
-      Histogram<RealType, 2> but a bug in VC++7 produced an internal compiler
-      error with such declaration. */
-  typedef typename itk::Statistics::Histogram<double,
-             itk::Statistics::DenseFrequencyContainer2 > HistogramType;
-  typedef typename HistogramType::MeasurementVectorType  MeasurementVectorType;
-  typedef typename HistogramType::SizeType               HistogramSizeType;
-
-  /** Sets the histogram size. Note this function must be called before
-    \c Initialize(). */
-  itkSetMacro(HistogramSize, HistogramSizeType);
-
-  /** Gets the histogram size. */
-  itkGetConstReferenceMacro(HistogramSize, HistogramSizeType);
-
   /** Factor to increase the upper bound for the samples in the histogram.
       Default value is 0.001 */
   itkSetMacro(UpperBoundIncreaseFactor, double);
@@ -151,6 +145,8 @@ protected:
   BinaryFunctorNeighborhoodJoinHistogramImageFilter();
   virtual ~BinaryFunctorNeighborhoodJoinHistogramImageFilter() {}
 
+  virtual void BeforeThreadedGenerateData();
+
   /** BinaryFunctorNeighborhoodJoinHistogramImageFilter 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
@@ -173,19 +169,12 @@ protected:
 
   HistogramType::Pointer m_Histogram;
 
-  /** The histogram size. */
-  HistogramSizeType m_HistogramSize;
-  /** The lower bound for samples in the histogram. */
-  mutable MeasurementVectorType m_LowerBound;
-  /** The upper bound for samples in the histogram. */
-  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
 
+  void ComputeHistogram();
+
   FunctorType m_Functor;
 
   /** The padding value. */
@@ -195,8 +184,9 @@ private:
       padding value should be ignored when calculating the similarity
       measure. */
   bool m_UsePaddingValue;
-
-  HistogramType::Pointer ComputeHistogram();
+  
+  /** The increase in the upper bound. */
+  double m_UpperBoundIncreaseFactor;
 };
 
 } // end namespace otb
diff --git a/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx b/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx
index ee87029..b2491f8 100644
--- a/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx
+++ b/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx
@@ -33,11 +33,10 @@ namespace otb
 template <class TInputImage1, class TInputImage2,
     class TOutputImage, class TFunction>
 BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TOutputImage, TFunction>
-::BinaryFunctorNeighborhoodJoinHistogramImageFilter(): m_HistogramSize(2)
+::BinaryFunctorNeighborhoodJoinHistogramImageFilter()
 {
   this->SetNumberOfRequiredInputs(2);
   m_Radius = 3;
-  m_HistogramSize.Fill(256);
   m_UsePaddingValue = false;
   m_UpperBoundIncreaseFactor = 0.001;
 }
@@ -171,13 +170,21 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
   return;
 }
 
+template <class TInputImage1, class TInputImage2,
+    class TOutputImage, class TFunction>
+void
+BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TOutputImage, TFunction>
+::BeforeThreadedGenerateData()
+{
+  this->ComputeHistogram();
+}
+
 /**
  * Initialize the histogram
  */
 template <class TInputImage1, class TInputImage2,
     class TOutputImage, class TFunction>
-BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TOutputImage, TFunction>
-::HistogramType::Pointer
+void
 BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TOutputImage, TFunction>
 ::ComputeHistogram()
 {
@@ -235,15 +242,16 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
 
 
   // Set the size of the upper and lower bounds of the histogram:
-  m_LowerBound.SetSize(2);
-  m_UpperBound.SetSize(2);
+  MeasurementVectorType lowerBound, upperBound;
+  lowerBound.SetSize(2);
+  upperBound.SetSize(2);
 
   // Initialize the upper and lower bounds of the histogram.
-  m_LowerBound[0] = minInput1;
-  m_LowerBound[1] = minInput2;
-  m_UpperBound[0] =
+  lowerBound[0] = minInput1;
+  lowerBound[1] = minInput2;
+  upperBound[0] =
     maxInput1 + (maxInput1 - minInput1) * m_UpperBoundIncreaseFactor;
-  m_UpperBound[1] =
+  upperBound[1] =
     maxInput2 + (maxInput2 - minInput2) * m_UpperBoundIncreaseFactor;
 
   typedef itk::ImageRegionConstIteratorWithIndex<Input1ImageType> Input1IteratorType;
@@ -259,8 +267,10 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
   Input2IteratorType ti2(pInput2Image, input2Region);
 
   typename HistogramType::Pointer histogram = HistogramType::New();
+  HistogramSizeType histogramSize(2);
+  histogramSize.Fill(256);
   histogram->SetMeasurementVectorSize(2);
-  histogram->Initialize(m_HistogramSize, m_LowerBound, m_UpperBound);
+  histogram->Initialize(histogramSize, lowerBound, upperBound);
 
   ti1.GoToBegin();
   ti2.GoToBegin();
@@ -277,8 +287,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
     ++ti2;
     }
 
-  return histogram;
-
+  m_Histogram = histogram;
 }
 
 /**
@@ -290,19 +299,12 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
 ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
                        itk::ThreadIdType threadId)
 {
-
-  //this->Initialize();
-
-  typename HistogramType::Pointer histogram = ComputeHistogram();
-
-  //m_Functor->SetHistogram(m_Histogram);
-//  unsigned int i;
   itk::ZeroFluxNeumannBoundaryCondition<TInputImage1> nbc1;
   itk::ZeroFluxNeumannBoundaryCondition<TInputImage2> nbc2;
 
-// We use dynamic_cast since inputs are stored as DataObjects.  The
-// ImageToJoinHistogramImageFilter::GetInput(int) always returns a pointer to a
-// TInputImage1 so it cannot be used for the second input.
+  // We use dynamic_cast since inputs are stored as DataObjects.  The
+  // ImageToJoinHistogramImageFilter::GetInput(int) always returns a pointer to a
+  // TInputImage1 so it cannot be used for the second input.
   Input1ImageConstPointer inputPtr1
     = dynamic_cast<const TInputImage1*>(ProcessObjectType::GetInput(0));
   Input2ImageConstPointer inputPtr2
@@ -353,7 +355,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
     while (!outputIt.IsAtEnd())
       {
 
-      outputIt.Set(m_Functor(neighInputIt1, neighInputIt2, histogram));
+      outputIt.Set(m_Functor(neighInputIt1, neighInputIt2, m_Histogram));
 
       ++neighInputIt1;
       ++neighInputIt2;
@@ -361,7 +363,6 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
       progress.CompletedPixel();
       }
     }
-
 }
 
 } // end namespace otb
diff --git a/Code/ChangeDetection/otbJoinHistogramMI.h b/Code/ChangeDetection/otbJoinHistogramMI.h
index 3a74d49..559cebc 100644
--- a/Code/ChangeDetection/otbJoinHistogramMI.h
+++ b/Code/ChangeDetection/otbJoinHistogramMI.h
@@ -41,48 +41,6 @@ public:
     TOutput                jointEntropy = itk::NumericTraits<TOutput>::Zero;
     HistogramFrequencyType totalFreq = histogram->GetTotalFrequency();
 
-    /*    for(unsigned long pos = 0; pos< itA.Size(); ++pos)
-          {
-          double value = static_cast<double>(itA.GetPixel(pos));
-
-          unsigned int bin =
-          HistogramFrequencyType freq = histogram.GetFrequency(, 0);
-          if (freq > 0)
-          {
-            entropyX += freq*vcl_log(freq);
-          }
-        }
-
-        entropyX = -entropyX/static_cast<TOutput>(totalFreq) + vcl_log(totalFreq);
-
-        for (unsigned int i = 0; i < this->GetHistogramSize()[1]; ++i)
-        {
-          HistogramFrequencyType freq = histogram.GetFrequency(i, 1);
-          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)
-        {
-          HistogramFrequencyType freq = it.GetFrequency();
-          if (freq > 0)
-          {
-            jointEntropy += freq*vcl_log(freq);
-          }
-          ++it;
-        }
-
-        jointEntropy = -jointEntropy/static_cast<TOutput>(totalFreq) +
-          vcl_log(totalFreq);
-
-        return entropyX + entropyY - jointEntropy; */
-
     typename HistogramType::MeasurementVectorType sample(2);
     for (unsigned long pos = 0; pos < itA.Size(); ++pos)
       {
@@ -106,28 +64,8 @@ public:
                    vcl_log(totalFreq);
 
     return jointEntropy;
-
-    /*    TOutput meanA = 0.0;
-        TOutput meanB = 0.0;
-
-        for(unsigned long pos = 0; pos< itA.Size(); ++pos)
-          {
-
-          meanA += static_cast<TOutput>(itA.GetPixel(pos));
-          meanB += static_cast<TOutput>(itB.GetPixel(pos));
-
-
-          }*/
-    return static_cast<TOutput>(0);
   }
 
-  /*  void SetHistogram(HistogramType* histo)
-    {
-      m_Histogram = histo;
-    }
-
-  protected:
-    HistogramType::Pointer m_Histogram; */
 };
 }
 } // end namespace otb
diff --git a/Code/Common/otbCommandLineArgumentParser.cxx b/Code/Common/otbCommandLineArgumentParser.cxx
index 67f0c21..eff12c5 100644
--- a/Code/Common/otbCommandLineArgumentParser.cxx
+++ b/Code/Common/otbCommandLineArgumentParser.cxx
@@ -33,7 +33,7 @@ CommandLineArgumentParseResult::CommandLineArgumentParseResult() {}
 CommandLineArgumentParseResult::~CommandLineArgumentParseResult() {}
 
 void CommandLineArgumentParseResult
-::PrintSelf(std::ostream& itkNotUsed(os), itk::Indent indent) const
+::PrintSelf(std::ostream& itkNotUsed(os), itk::Indent itkNotUsed(indent)) const
 {
 
 }
diff --git a/Code/Common/otbDrawLineSpatialObjectListFilter.txx b/Code/Common/otbDrawLineSpatialObjectListFilter.txx
index f25b1ec..eff28f2 100644
--- a/Code/Common/otbDrawLineSpatialObjectListFilter.txx
+++ b/Code/Common/otbDrawLineSpatialObjectListFilter.txx
@@ -64,7 +64,7 @@ DrawLineSpatialObjectListFilter<TInputImage, TOutputImage>
 template <class TInputImage, class TOutputImage>
 void
 DrawLineSpatialObjectListFilter<TInputImage, TOutputImage>
-::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId)
+::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType itkNotUsed(threadId))
 
 {
   typename InputImageType::ConstPointer input  = this->GetInput();
@@ -280,7 +280,7 @@ void
 DrawLineSpatialObjectListFilter<TInputImage, TOutput>
 ::CropSegment(OutputIndexType *indexToCrop,
               OutputIndexType *otherIndex,
-              const OutputImageRegionType *outputRegionForThread) const
+              const OutputImageRegionType *itkNotUsed(outputRegionForThread)) const
 
 {
   OutputIndexType tempIndex;
diff --git a/Code/Common/otbLabelImageToOGRDataSourceFilter.txx b/Code/Common/otbLabelImageToOGRDataSourceFilter.txx
index 807ff59..85ff64a 100644
--- a/Code/Common/otbLabelImageToOGRDataSourceFilter.txx
+++ b/Code/Common/otbLabelImageToOGRDataSourceFilter.txx
@@ -21,18 +21,16 @@
 #include "otbLabelImageToOGRDataSourceFilter.h"
 #include "otbGdalDataTypeBridge.h"
 
-
 //gdal libraries
 #include "gdal.h"
 #include "gdal_priv.h"
 #include "cpl_conv.h"
 #include "gdal_alg.h"
 
+#include "stdint.h" //needed for uintptr_t
 
 namespace otb
 {
-
-
 template <class TInputImage>
 LabelImageToOGRDataSourceFilter<TInputImage>
 ::LabelImageToOGRDataSourceFilter() : m_FieldName("DN"), m_Use8Connected(false)
@@ -163,7 +161,7 @@ LabelImageToOGRDataSourceFilter<TInputImage>
     // integer make us pointing to an non allowed memory block => Crash.
     std::ostringstream stream;
     stream << "MEM:::"
-           <<  "DATAPOINTER=" << (unsigned long)(this->GetInput()->GetBufferPointer()) << ","
+           <<  "DATAPOINTER=" << (uintptr_t)(this->GetInput()->GetBufferPointer()) << ","
            <<  "PIXELS=" << size[0] << ","
            <<  "LINES=" << size[1] << ","
            <<  "BANDS=" << nbBands << ","
@@ -186,8 +184,8 @@ LabelImageToOGRDataSourceFilter<TInputImage>
     IndexType  bufferIndexOrigin = this->GetInput()->GetBufferedRegion().GetIndex();
     OriginType  bufferOrigin;
     this->GetInput()->TransformIndexToPhysicalPoint(bufferIndexOrigin, bufferOrigin);
-    geoTransform[0] = bufferOrigin[0];
-    geoTransform[3] = bufferOrigin[1];
+    geoTransform[0] = bufferOrigin[0] - 0.5 * this->GetInput()->GetSpacing()[0];
+    geoTransform[3] = bufferOrigin[1] - 0.5 * this->GetInput()->GetSpacing()[1];
     geoTransform[1] = this->GetInput()->GetSpacing()[0];
     geoTransform[5] = this->GetInput()->GetSpacing()[1];
     // FIXME: Here component 1 and 4 should be replaced by the orientation parameters
@@ -235,7 +233,7 @@ LabelImageToOGRDataSourceFilter<TInputImage>
       // integer make us pointing to an non allowed memory block => Crash.
       std::ostringstream maskstream;
       maskstream << "MEM:::"
-            <<  "DATAPOINTER=" << (unsigned long)(this->GetInputMask()->GetBufferPointer()) << ","
+            <<  "DATAPOINTER=" << (uintptr_t)(this->GetInputMask()->GetBufferPointer()) << ","
             <<  "PIXELS=" << size[0] << ","
             <<  "LINES=" << size[1] << ","
             <<  "BANDS=" << nbBands << ","
@@ -256,8 +254,8 @@ LabelImageToOGRDataSourceFilter<TInputImage>
       // the spacing is unchanged, the origin is relative to the buffered region
       bufferIndexOrigin = this->GetInputMask()->GetBufferedRegion().GetIndex();
       this->GetInputMask()->TransformIndexToPhysicalPoint(bufferIndexOrigin, bufferOrigin);
-      geoTransform[0] = bufferOrigin[0];
-      geoTransform[3] = bufferOrigin[1];
+      geoTransform[0] = bufferOrigin[0] - 0.5 * this->GetInputMask()->GetSpacing()[0];
+      geoTransform[3] = bufferOrigin[1] - 0.5 * this->GetInputMask()->GetSpacing()[1];
       geoTransform[1] = this->GetInputMask()->GetSpacing()[0];
       geoTransform[5] = this->GetInputMask()->GetSpacing()[1];
       // FIXME: Here component 1 and 4 should be replaced by the orientation parameters
diff --git a/Code/Common/otbLabelImageToVectorDataFilter.txx b/Code/Common/otbLabelImageToVectorDataFilter.txx
index f512ced..6a5f9f8 100644
--- a/Code/Common/otbLabelImageToVectorDataFilter.txx
+++ b/Code/Common/otbLabelImageToVectorDataFilter.txx
@@ -164,8 +164,8 @@ LabelImageToVectorDataFilter<TInputImage, TPrecision>
     IndexType  bufferIndexOrigin = this->GetInput()->GetBufferedRegion().GetIndex();
     OriginType  bufferOrigin;
     this->GetInput()->TransformIndexToPhysicalPoint(bufferIndexOrigin, bufferOrigin);
-    geoTransform[0] = bufferOrigin[0];
-    geoTransform[3] = bufferOrigin[1];
+    geoTransform[0] = bufferOrigin[0] - 0.5 * this->GetInput()->GetSpacing()[0];
+    geoTransform[3] = bufferOrigin[1] - 0.5 * this->GetInput()->GetSpacing()[1];
     geoTransform[1] = this->GetInput()->GetSpacing()[0];
     geoTransform[5] = this->GetInput()->GetSpacing()[1];
     // FIXME: Here component 1 and 4 should be replaced by the orientation parameters
@@ -234,8 +234,8 @@ LabelImageToVectorDataFilter<TInputImage, TPrecision>
       // the spacing is unchanged, the origin is relative to the buffered region
       bufferIndexOrigin = this->GetInputMask()->GetBufferedRegion().GetIndex();
       this->GetInputMask()->TransformIndexToPhysicalPoint(bufferIndexOrigin, bufferOrigin);
-      geoTransform[0] = bufferOrigin[0];
-      geoTransform[3] = bufferOrigin[1];
+      geoTransform[0] = bufferOrigin[0] - 0.5 * this->GetInputMask()->GetSpacing()[0];
+      geoTransform[3] = bufferOrigin[1] - 0.5 * this->GetInputMask()->GetSpacing()[1];
       geoTransform[1] = this->GetInputMask()->GetSpacing()[0];
       geoTransform[5] = this->GetInputMask()->GetSpacing()[1];
       // FIXME: Here component 1 and 4 should be replaced by the orientation parameters
diff --git a/Code/Common/otbMacro.h b/Code/Common/otbMacro.h
index 5d0f801..8bd3cab 100644
--- a/Code/Common/otbMacro.h
+++ b/Code/Common/otbMacro.h
@@ -222,4 +222,6 @@ namespace otb
       } \
     }
 
+#  define otbUnusedMacro(x) do { (void)sizeof(x); } while(0)
+
 #endif //end of otbMacro.h
diff --git a/Code/Common/otbOGRDataSourceToLabelImageFilter.txx b/Code/Common/otbOGRDataSourceToLabelImageFilter.txx
index f79902d..9174fef 100644
--- a/Code/Common/otbOGRDataSourceToLabelImageFilter.txx
+++ b/Code/Common/otbOGRDataSourceToLabelImageFilter.txx
@@ -22,6 +22,7 @@
 #include "otbMacro.h"
 
 #include "gdal_alg.h"
+#include "stdint.h" //needed for uintptr_t
 
 namespace otb
 {
@@ -184,7 +185,7 @@ OGRDataSourceToLabelImageFilter<TOutputImage>::GenerateData()
 
   std::ostringstream stream;
   stream << "MEM:::"
-         <<  "DATAPOINTER=" << (unsigned long)(this->GetOutput()->GetBufferPointer()) << ","
+         <<  "DATAPOINTER=" << (uintptr_t)(this->GetOutput()->GetBufferPointer()) << ","
          <<  "PIXELS=" << bufferedRegion.GetSize()[0] << ","
          <<  "LINES=" << bufferedRegion.GetSize()[1]<< ","
          <<  "BANDS=" << nbBands << ","
@@ -213,8 +214,8 @@ OGRDataSourceToLabelImageFilter<TOutputImage>::GenerateData()
   OutputIndexType  bufferIndexOrigin = bufferedRegion.GetIndex();
   OutputOriginType bufferOrigin;
   this->GetOutput()->TransformIndexToPhysicalPoint(bufferIndexOrigin, bufferOrigin);
-  geoTransform[0] = bufferOrigin[0];
-  geoTransform[3] = bufferOrigin[1];
+  geoTransform[0] = bufferOrigin[0] - 0.5 * this->GetOutput()->GetSpacing()[0];
+  geoTransform[3] = bufferOrigin[1] - 0.5 * this->GetOutput()->GetSpacing()[1];
   geoTransform[1] = this->GetOutput()->GetSpacing()[0];
   geoTransform[5] = this->GetOutput()->GetSpacing()[1];
 
@@ -256,4 +257,3 @@ OGRDataSourceToLabelImageFilter<TOutputImage>
 }
 
 } // end namespace otb
-
diff --git a/Code/Common/otbParser.cxx b/Code/Common/otbParser.cxx
index 04eff53..7d5eeae 100644
--- a/Code/Common/otbParser.cxx
+++ b/Code/Common/otbParser.cxx
@@ -135,7 +135,7 @@ public:
     }
    catch(ExceptionType &e)
     {
-     ExceptionHandlerDebug(e);
+     ExceptionHandler(e);
      return false;
     }
 
@@ -172,16 +172,9 @@ public:
   /** Convert parser specific exception into itk debug macro */
    virtual void ExceptionHandlerDebug(ExceptionType &e)
    {
-     otbGenericMsgDebugMacro(                                     << std::endl
-           << "Message:     "   << e.GetMsg()   << std::endl
-           << "Formula:     "   << e.GetExpr()  << std::endl
-           << "Token:       "   << e.GetToken() << std::endl
-           << "Position:    "   << e.GetPos()   << std::endl
-                  << std::endl);
-   //        << "Errc:        "   << e.GetCode()  << std::endl);
+     ExceptionHandler(e);
    }
 
-
 protected:
   ParserImpl()
   {
diff --git a/Code/Common/otbPolyLineImageConstIterator.txx b/Code/Common/otbPolyLineImageConstIterator.txx
index fa82b35..2016bf5 100644
--- a/Code/Common/otbPolyLineImageConstIterator.txx
+++ b/Code/Common/otbPolyLineImageConstIterator.txx
@@ -39,7 +39,7 @@ PolyLineImageConstIterator<TImage, TPath>
   IndexType source, target;
   for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
     {
-    source[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
+    source[i] = static_cast<unsigned int> (vcl_floor(m_InternalVertexIterator.Value()[i] + 0.5));
     }
   ++m_InternalVertexIterator;
   if (m_InternalVertexIterator != m_Path->GetVertexList()->End())
@@ -47,7 +47,7 @@ PolyLineImageConstIterator<TImage, TPath>
 
     for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
       {
-      target[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
+      target[i] = static_cast<unsigned int> (vcl_floor(m_InternalVertexIterator.Value()[i] + 0.5));
       }
     }
   else
@@ -78,7 +78,7 @@ PolyLineImageConstIterator<TImage, TPath>
   IndexType source, target;
   for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
     {
-    source[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
+    source[i] = static_cast<unsigned int> (vcl_floor(m_InternalVertexIterator.Value()[i] + 0.5));
     }
   ++m_InternalVertexIterator;
   if (m_InternalVertexIterator != m_Path->GetVertexList()->End())
@@ -86,7 +86,7 @@ PolyLineImageConstIterator<TImage, TPath>
 
     for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
       {
-      target[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
+      target[i] = static_cast<unsigned int> (vcl_floor(m_InternalVertexIterator.Value()[i] + 0.5));
       }
     }
   else
@@ -110,7 +110,7 @@ PolyLineImageConstIterator<TImage, TPath>
       IndexType source;
       for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
         {
-        source[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
+        source[i] = static_cast<unsigned int> (vcl_floor(m_InternalVertexIterator.Value()[i] + 0.5));
         }
       // otbMsgDebugMacro(<<"Source: "<<source);
       ++m_InternalVertexIterator;
@@ -119,7 +119,7 @@ PolyLineImageConstIterator<TImage, TPath>
         IndexType target;
         for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
           {
-          target[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
+          target[i] = static_cast<unsigned int> (vcl_floor(m_InternalVertexIterator.Value()[i] + 0.5));
           }
         // otbMsgDebugMacro(<<"Target: "<<target);
         m_InternalImageIterator = InternalImageIteratorType(const_cast<ImageType *> (m_Image.GetPointer()), source,
diff --git a/Code/Common/otbSubsampledImageRegionConstIterator.h b/Code/Common/otbSubsampledImageRegionConstIterator.h
index 4876305..ea8276f 100644
--- a/Code/Common/otbSubsampledImageRegionConstIterator.h
+++ b/Code/Common/otbSubsampledImageRegionConstIterator.h
@@ -222,7 +222,7 @@ public:
    * No Bound checking is performed when setting the position.
    */
   void SetOffset(const OffsetType& offset);
-  const OffsetType GetOffset() const
+  OffsetType GetOffset() const
   {
     return this->m_Offset;
   }
diff --git a/Code/Common/otbTransform.h b/Code/Common/otbTransform.h
index 4721baf..7399144 100644
--- a/Code/Common/otbTransform.h
+++ b/Code/Common/otbTransform.h
@@ -119,6 +119,11 @@ public:
     virtual void SetParameters( const ParametersType & )
     { itkExceptionMacro( << "Subclasses should override this method (SetParameters)" ) }
 
+  virtual void ComputeJacobianWithRespectToParameters(const InputPointType  &, JacobianType& ) const
+  {
+    itkExceptionMacro(<<  "Subclasses should override this method (ComputeJacobianWithRespectToParamters)" );
+  }
+
   /** Set the transformation parameters and update internal transformation.
    * This method forces the transform to copy the parameters.  The
    * default implementation is to call SetParameters.  This call must
diff --git a/Code/Common/otbVectorDataToImageFilter.txx b/Code/Common/otbVectorDataToImageFilter.txx
index b303904..5266e4b 100644
--- a/Code/Common/otbVectorDataToImageFilter.txx
+++ b/Code/Common/otbVectorDataToImageFilter.txx
@@ -402,8 +402,8 @@ VectorDataToImageFilter<TVectorData, TImage>
           sizePhy[1] = size[1] * m_Spacing[1];
           rsRegion.SetSize(sizePhy);
           OriginType              origin;
-          origin[0] = m_Origin[0] + index[0] * m_Spacing[0];
-          origin[1] = m_Origin[1] + index[1] * m_Spacing[1];
+          origin[0] = m_Origin[0] + (static_cast<double>(index[0]) - 0.5) * m_Spacing[0];
+          origin[1] = m_Origin[1] + (static_cast<double>(index[1]) - 0.5) * m_Spacing[1];
           rsRegion.SetOrigin(origin);
           rsRegion.SetRegionProjection(m_VectorDataProjectionWKT);
 
@@ -470,6 +470,8 @@ VectorDataToImageFilter<TVectorData, TImage>
       m_Maps[tileIdx].removeLayer(i);
       }
     m_Maps[tileIdx].resize(m_TilingRegions[tileIdx].GetSize()[0], m_TilingRegions[tileIdx].GetSize()[1]);
+  
+    RemoteSensingRegionType rsRegion;
 
     for (unsigned int vdIdx = 0; vdIdx < this->GetNumberOfInputs(); ++vdIdx)
       {
@@ -477,6 +479,8 @@ VectorDataToImageFilter<TVectorData, TImage>
         {
         datasource_ptr mDatasource = datasource_ptr(new mapnik::memory_datasource);
 
+        rsRegion = m_VectorDataExtractors[tileIdx][vdIdx]->GetRegion();
+
         m_VectorDataExtractors[tileIdx][vdIdx]->Update();
         VectorDataConstPointer input = m_VectorDataExtractors[tileIdx][vdIdx]->GetOutput();
         InternalTreeNodeType * inputRoot = const_cast<InternalTreeNodeType *>(input->GetDataTree()->GetRoot());
@@ -501,12 +505,10 @@ VectorDataToImageFilter<TVectorData, TImage>
     assert((m_SensorModelFlip == 1) || (m_SensorModelFlip == -1));
 
     mapnik_otb::box2d envelope(
-      m_Origin[0] + m_TilingRegions[tileIdx].GetIndex()[0]*m_Spacing[0],
-      m_SensorModelFlip*(m_Origin[1] + m_TilingRegions[tileIdx].GetIndex()[1] * m_Spacing[1]
-                         + m_TilingRegions[tileIdx].GetSize()[1] * m_Spacing[1]),
-      m_Origin[0] + m_TilingRegions[tileIdx].GetIndex()[0] * m_Spacing[0]
-      + m_TilingRegions[tileIdx].GetSize()[0] * m_Spacing[0],
-      m_SensorModelFlip*(m_Origin[1] + m_TilingRegions[tileIdx].GetIndex()[1] * m_Spacing[1])
+      rsRegion.GetOrigin(0),
+      m_SensorModelFlip*(rsRegion.GetOrigin(1) + rsRegion.GetSize(1)),
+      rsRegion.GetOrigin(0) + rsRegion.GetSize(0),
+      m_SensorModelFlip*(rsRegion.GetOrigin(1))
       );
 
     mapnik_otb::zoom_to_box(&m_Maps[tileIdx], envelope);
diff --git a/Code/Common/otbVectorDataToMapFilter.txx b/Code/Common/otbVectorDataToMapFilter.txx
index 653fecb..6a34e33 100644
--- a/Code/Common/otbVectorDataToMapFilter.txx
+++ b/Code/Common/otbVectorDataToMapFilter.txx
@@ -402,8 +402,8 @@ VectorDataToMapFilter<TVectorData, TImage>
           sizePhy[1] = size[1] * m_Spacing[1];
           rsRegion.SetSize(sizePhy);
           OriginType              origin;
-          origin[0] = m_Origin[0] + index[0] * m_Spacing[0];
-          origin[1] = m_Origin[1] + index[1] * m_Spacing[1];
+          origin[0] = m_Origin[0] + (static_cast<double>(index[0]) - 0.5) * m_Spacing[0];
+          origin[1] = m_Origin[1] + (static_cast<double>(index[1]) - 0.5) * m_Spacing[1];
           rsRegion.SetOrigin(origin);
           rsRegion.SetRegionProjection(m_VectorDataProjectionWKT);
 
@@ -471,12 +471,16 @@ VectorDataToMapFilter<TVectorData, TImage>
       }
     m_Maps[tileIdx].resize(m_TilingRegions[tileIdx].GetSize()[0], m_TilingRegions[tileIdx].GetSize()[1]);
 
+    RemoteSensingRegionType rsRegion;
+
     for (unsigned int vdIdx = 0; vdIdx < this->GetNumberOfInputs(); ++vdIdx)
       {
       if (this->GetInput(vdIdx))
         {
         datasource_ptr mDatasource = datasource_ptr(new mapnik::memory_datasource);
 
+        rsRegion = m_VectorDataExtractors[tileIdx][vdIdx]->GetRegion();
+
         m_VectorDataExtractors[tileIdx][vdIdx]->Update();
         VectorDataConstPointer input = m_VectorDataExtractors[tileIdx][vdIdx]->GetOutput();
         InternalTreeNodeType * inputRoot = const_cast<InternalTreeNodeType *>(input->GetDataTree()->GetRoot());
@@ -501,12 +505,10 @@ VectorDataToMapFilter<TVectorData, TImage>
     assert((m_SensorModelFlip == 1) || (m_SensorModelFlip == -1));
 
     mapnik_otb::box2d envelope(
-      m_Origin[0] + m_TilingRegions[tileIdx].GetIndex()[0]*m_Spacing[0],
-      m_SensorModelFlip*(m_Origin[1] + m_TilingRegions[tileIdx].GetIndex()[1] * m_Spacing[1]
-                         + m_TilingRegions[tileIdx].GetSize()[1] * m_Spacing[1]),
-      m_Origin[0] + m_TilingRegions[tileIdx].GetIndex()[0] * m_Spacing[0]
-      + m_TilingRegions[tileIdx].GetSize()[0] * m_Spacing[0],
-      m_SensorModelFlip*(m_Origin[1] + m_TilingRegions[tileIdx].GetIndex()[1] * m_Spacing[1])
+      rsRegion.GetOrigin(0),
+      m_SensorModelFlip*(rsRegion.GetOrigin(1) + rsRegion.GetSize(1)),
+      rsRegion.GetOrigin(0) + rsRegion.GetSize(0),
+      m_SensorModelFlip*(rsRegion.GetOrigin(1))
       );
 
     mapnik_otb::zoom_to_box(&m_Maps[tileIdx], envelope);
diff --git a/Code/DisparityMap/otbAdhesionCorrectionFilter.txx b/Code/DisparityMap/otbAdhesionCorrectionFilter.txx
index e000e54..8fd8030 100644
--- a/Code/DisparityMap/otbAdhesionCorrectionFilter.txx
+++ b/Code/DisparityMap/otbAdhesionCorrectionFilter.txx
@@ -571,7 +571,7 @@ AdhesionCorrectionFilter<TImage, TMask>
       }
     index_pos = new_disparityIt.GetIndex();
     old_disparityIt.SetIndex(index_pos);
-    double disp = old_disparityIt.Get();
+//    double disp = old_disparityIt.Get();
     while (new_disparityIt.GetIndex()[0]<static_cast<int>(outputPtr->GetRequestedRegion().GetSize()[0]) + outputPtr->GetRequestedRegion().GetIndex()[0] - 1)
       {
       index_pos = new_disparityIt.GetIndex();
@@ -930,7 +930,7 @@ AdhesionCorrectionFilter<TImage, TMask>
 
   int Count;
   int big_win = win + 1;
-  int half_big_win = (2*big_win +1)*(2*big_win +1) /2;
+//  int half_big_win = (2*big_win +1)*(2*big_win +1) /2;
   double Tol2 = m_Tolerance/2;
 
   new_disparityIt.GoToBegin();
diff --git a/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGenerator.txx b/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGenerator.txx
index 3a6817a..5c080f9 100644
--- a/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGenerator.txx
+++ b/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGenerator.txx
@@ -45,7 +45,6 @@ BSplinesInterpolateDisplacementFieldGenerator<TPointSet, TDisplacementField>
   typedef itk::Vector<ValueType, 2>                                      VectorType;
   typedef otb::Image<VectorType, DisplacementFieldType::ImageDimension>  ImageType;
   typedef itk::LandmarkDisplacementFieldSource<ImageType>                DisplacementFieldSourceType;
-  typedef typename DisplacementFieldSourceType::LandmarkContainerPointer LandmarkContainerPointer;
   typedef typename DisplacementFieldSourceType::LandmarkContainer        LandmarkContainerType;
   typedef typename DisplacementFieldSourceType::LandmarkPointType        LandmarkPointType;
   typedef typename PointSetType::PointsContainer                         PointsContainer;
diff --git a/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGenerator.txx b/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGenerator.txx
index 118afce..3311ed7 100644
--- a/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGenerator.txx
+++ b/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGenerator.txx
@@ -62,7 +62,6 @@ BSplinesInterpolateTransformDisplacementFieldGenerator<TPointSet, TDisplacementF
 
   typedef otb::ObjectList<BSplinerType>                         SPlineInterpolatorListType;
   typedef typename PointSetType::PointsContainer::ConstIterator PointSetIteratorType;
-  typedef typename PointSetType::PointsContainer                PointsContainerType;
 
   // Initialization of the splines interpolator
   typename SPlineInterpolatorListType::Pointer splineIntList = SPlineInterpolatorListType::New();
diff --git a/Code/DisparityMap/otbBijectionCoherencyFilter.txx b/Code/DisparityMap/otbBijectionCoherencyFilter.txx
index 4029840..1723af8 100644
--- a/Code/DisparityMap/otbBijectionCoherencyFilter.txx
+++ b/Code/DisparityMap/otbBijectionCoherencyFilter.txx
@@ -215,7 +215,7 @@ BijectionCoherencyFilter<TDisparityImage,TOutputImage>
 template <class TDisparityImage, class TOutputImage>
 void
 BijectionCoherencyFilter<TDisparityImage,TOutputImage>
-::ThreadedGenerateData(const OutputRegionType & outputRegionForThread, itk::ThreadIdType threadId)
+::ThreadedGenerateData(const OutputRegionType & outputRegionForThread, itk::ThreadIdType itkNotUsed(threadId))
 {
   const TDisparityImage * directHmap = this->GetDirectHorizontalDisparityMapInput();
   const TDisparityImage * directVmap = this->GetDirectVerticalDisparityMapInput();
@@ -251,13 +251,18 @@ BijectionCoherencyFilter<TDisparityImage,TOutputImage>
     if (directVmap) tmpIndex[1] += directVertiIter.Get();
 
     // Interpolate in reverse disparity map
+    typedef typename IndexType::IndexValueType IndexValueType;
     IndexType ul,ur,ll,lr;
     ul[0] = static_cast<long>(vcl_floor(tmpIndex[0]));
     ul[1] = static_cast<long>(vcl_floor(tmpIndex[1]));
-    if (ul[0]<buffered.GetIndex()[0]) ul[0]=buffered.GetIndex()[0];
-    if (ul[1]<buffered.GetIndex()[1]) ul[1]=buffered.GetIndex()[1];
-    if (ul[0]>(unsigned int)(buffered.GetIndex()[0]+buffered.GetSize()[0]-1)) ul[0]=(buffered.GetIndex()[0]+buffered.GetSize()[0]-1);
-    if (ul[1]>(unsigned int)(buffered.GetIndex()[1]+buffered.GetSize()[1]-1)) ul[1]=(buffered.GetIndex()[1]+buffered.GetSize()[1]-1);
+    if (ul[0] < buffered.GetIndex()[0])
+      ul[0] = buffered.GetIndex()[0];
+    if (ul[1] < buffered.GetIndex()[1])
+      ul[1] = buffered.GetIndex()[1];
+    if (ul[0] > static_cast<IndexValueType>(buffered.GetIndex()[0] + buffered.GetSize()[0]-1))
+      ul[0]=(buffered.GetIndex()[0]+buffered.GetSize()[0]-1);
+    if (ul[1] > static_cast<IndexValueType>(buffered.GetIndex()[1] + buffered.GetSize()[1]-1))
+      ul[1] = (buffered.GetIndex()[1]+buffered.GetSize()[1]-1);
 
     ur = ul;
     ur[0] += 1;
diff --git a/Code/DisparityMap/otbDisparityMapTo3DFilter.txx b/Code/DisparityMap/otbDisparityMapTo3DFilter.txx
index f72c295..284e63b 100644
--- a/Code/DisparityMap/otbDisparityMapTo3DFilter.txx
+++ b/Code/DisparityMap/otbDisparityMapTo3DFilter.txx
@@ -251,7 +251,7 @@ template <class TDisparityImage, class TOutputImage,
 class TEpipolarGridImage, class TMaskImage>
 void
 DisparityMapTo3DFilter<TDisparityImage,TOutputImage,TEpipolarGridImage,TMaskImage>
-::ThreadedGenerateData(const RegionType & outputRegionForThread, itk::ThreadIdType threadId)
+::ThreadedGenerateData(const RegionType & itkNotUsed(outputRegionForThread), itk::ThreadIdType itkNotUsed(threadId))
 {
   const TDisparityImage * horizDisp = this->GetHorizontalDisparityMapInput();
   const TDisparityImage * vertiDisp = this->GetVerticalDisparityMapInput();
diff --git a/Code/DisparityMap/otbDisparityMapToDEMFilter.h b/Code/DisparityMap/otbDisparityMapToDEMFilter.h
index 411226a..fc12dd6 100644
--- a/Code/DisparityMap/otbDisparityMapToDEMFilter.h
+++ b/Code/DisparityMap/otbDisparityMapToDEMFilter.h
@@ -190,6 +190,13 @@ private:
 
   /** Temporary DEMs for mutlithreading */
   std::vector<typename DEMImageType::Pointer> m_TempDEMRegions;
+  
+  /** Left sensor image transform */
+  RSTransformType::Pointer m_LeftToGroundTransform;
+  
+  /** Right sensor image transform */
+  RSTransformType::Pointer m_RightToGroundTransform;
+  
 };
 } // end namespace otb
 
diff --git a/Code/DisparityMap/otbDisparityMapToDEMFilter.txx b/Code/DisparityMap/otbDisparityMapToDEMFilter.txx
index 5b4c9c9..ba5bb46 100644
--- a/Code/DisparityMap/otbDisparityMapToDEMFilter.txx
+++ b/Code/DisparityMap/otbDisparityMapToDEMFilter.txx
@@ -263,38 +263,53 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri
 
   // left image
   typename SensorImageType::SizeType inputSize = leftImgPtr->GetLargestPossibleRegion().GetSize();
-  typename SensorImageType::PointType tmpPoint;
-  tmpPoint = leftImgPtr->GetOrigin();
-  RSTransform2DType::OutputPointType left_ul = leftToGroundTransform->TransformPoint(tmpPoint);
-
-  tmpPoint[0] = (leftImgPtr->GetOrigin())[0] + (leftImgPtr->GetSpacing())[0] * static_cast<double>(inputSize[0]);
-  tmpPoint[1] = (leftImgPtr->GetOrigin())[1];
-  RSTransform2DType::OutputPointType left_ur = leftToGroundTransform->TransformPoint(tmpPoint);
-
-  tmpPoint[0] = (leftImgPtr->GetOrigin())[0] + (leftImgPtr->GetSpacing())[0] * static_cast<double>(inputSize[0]);
-  tmpPoint[1] = (leftImgPtr->GetOrigin())[1] + (leftImgPtr->GetSpacing())[1] * static_cast<double>(inputSize[1]);
-  RSTransform2DType::OutputPointType left_lr = leftToGroundTransform->TransformPoint(tmpPoint);
-
-  tmpPoint[0] = (leftImgPtr->GetOrigin())[0];
-  tmpPoint[1] = (leftImgPtr->GetOrigin())[1] + (leftImgPtr->GetSpacing())[1] * static_cast<double>(inputSize[1]);
-  RSTransform2DType::OutputPointType left_ll = leftToGroundTransform->TransformPoint(tmpPoint);
+  typename SensorImageType::PointType ulp, urp, llp, lrp;
+  itk::ContinuousIndex<double,2> ul(leftImgPtr->GetLargestPossibleRegion().GetIndex());
+  ul[0] += -0.5;
+  ul[1] += -0.5;
+
+  itk::ContinuousIndex<double,2> ur(ul);
+  itk::ContinuousIndex<double,2> lr(ul);
+  itk::ContinuousIndex<double,2> ll(ul);
+  ur[0] += static_cast<double>(inputSize[0]);
+  lr[0] += static_cast<double>(inputSize[0]);
+  lr[1] += static_cast<double>(inputSize[1]);
+  ll[1] += static_cast<double>(inputSize[1]);
+
+  leftImgPtr->TransformContinuousIndexToPhysicalPoint(ul,ulp);
+  leftImgPtr->TransformContinuousIndexToPhysicalPoint(ur,urp);
+  leftImgPtr->TransformContinuousIndexToPhysicalPoint(ll,llp);
+  leftImgPtr->TransformContinuousIndexToPhysicalPoint(lr,lrp);
+
+  RSTransform2DType::OutputPointType left_ul, left_ur, left_ll, left_lr;
+  left_ul = leftToGroundTransform->TransformPoint(ulp);
+  left_ur = leftToGroundTransform->TransformPoint(urp);
+  left_ll = leftToGroundTransform->TransformPoint(llp);
+  left_lr = leftToGroundTransform->TransformPoint(lrp);
 
   // right image
   inputSize = rightImgPtr->GetLargestPossibleRegion().GetSize();
-  tmpPoint = rightImgPtr->GetOrigin();
-  RSTransform2DType::OutputPointType right_ul = rightToGroundTransform->TransformPoint(tmpPoint);
-
-  tmpPoint[0] = (rightImgPtr->GetOrigin())[0] + (rightImgPtr->GetSpacing())[0] * static_cast<double>(inputSize[0]);
-  tmpPoint[1] = (rightImgPtr->GetOrigin())[1];
-  RSTransform2DType::OutputPointType right_ur = rightToGroundTransform->TransformPoint(tmpPoint);
-
-  tmpPoint[0] = (rightImgPtr->GetOrigin())[0] + (rightImgPtr->GetSpacing())[0] * static_cast<double>(inputSize[0]);
-  tmpPoint[1] = (rightImgPtr->GetOrigin())[1] + (rightImgPtr->GetSpacing())[1] * static_cast<double>(inputSize[1]);
-  RSTransform2DType::OutputPointType right_lr = rightToGroundTransform->TransformPoint(tmpPoint);
-
-  tmpPoint[0] = (rightImgPtr->GetOrigin())[0];
-  tmpPoint[1] = (rightImgPtr->GetOrigin())[1] + (rightImgPtr->GetSpacing())[1] * static_cast<double>(inputSize[1]);
-  RSTransform2DType::OutputPointType right_ll = rightToGroundTransform->TransformPoint(tmpPoint);
+  ul = rightImgPtr->GetLargestPossibleRegion().GetIndex();
+  ul[0] += -0.5;
+  ul[1] += -0.5;
+  ur = ul;
+  lr = ul;
+  ll = ul;
+  ur[0] += static_cast<double>(inputSize[0]);
+  lr[0] += static_cast<double>(inputSize[0]);
+  lr[1] += static_cast<double>(inputSize[1]);
+  ll[1] += static_cast<double>(inputSize[1]);
+
+  rightImgPtr->TransformContinuousIndexToPhysicalPoint(ul,ulp);
+  rightImgPtr->TransformContinuousIndexToPhysicalPoint(ur,urp);
+  rightImgPtr->TransformContinuousIndexToPhysicalPoint(ll,llp);
+  rightImgPtr->TransformContinuousIndexToPhysicalPoint(lr,lrp);
+
+  RSTransform2DType::OutputPointType right_ul, right_ur, right_lr, right_ll;
+  right_ul = rightToGroundTransform->TransformPoint(ulp);
+  right_ur = rightToGroundTransform->TransformPoint(urp);
+  right_ll = rightToGroundTransform->TransformPoint(llp);
+  right_lr = rightToGroundTransform->TransformPoint(lrp);
 
   double left_xmin = std::min(std::min(std::min(left_ul[0],left_ur[0]),left_lr[0]),left_ll[0]);
   double left_xmax = std::max(std::max(std::max(left_ul[0],left_ur[0]),left_lr[0]),left_ll[0]);
@@ -316,12 +331,6 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri
     itkExceptionMacro(<<"Wrong reconstruction area, images don't overlap, check image corners");
     }
 
-  // Choose origin
-  typename TOutputDEMImage::PointType outOrigin;
-  outOrigin[0] = box_xmin;
-  outOrigin[1] = box_ymax;
-  outputPtr->SetOrigin(outOrigin);
-
   // Compute step :
   // TODO : use a clean RS transform instead
   typename TOutputDEMImage::SpacingType outSpacing;
@@ -329,6 +338,12 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri
   outSpacing[1] = -57.295779513 * m_DEMGridStep / 6378137.0;
   outputPtr->SetSpacing(outSpacing);
 
+  // Choose origin
+  typename TOutputDEMImage::PointType outOrigin;
+  outOrigin[0] = box_xmin + 0.5 * outSpacing[0];
+  outOrigin[1] = box_ymax + 0.5 * outSpacing[1];
+  outputPtr->SetOrigin(outOrigin);
+
   // Compute output size
   typename DEMImageType::RegionType outRegion;
   outRegion.SetIndex(0,0);
@@ -391,32 +406,32 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri
 
   // up left at elevation min
   TDPointType corners[8];
-  corners[0][0]= outOrigin[0] + outSpacing[0] * outRegion.GetIndex(0);
-  corners[0][1]= outOrigin[1] + outSpacing[1] * outRegion.GetIndex(1);
+  corners[0][0]= outOrigin[0] + outSpacing[0] * (-0.5 + static_cast<double>(outRegion.GetIndex(0)));
+  corners[0][1]= outOrigin[1] + outSpacing[1] * (-0.5 + static_cast<double>(outRegion.GetIndex(1)));
   corners[0][2]= m_ElevationMin;
   // up left at elevation max
   corners[1][0]= corners[0][0];
   corners[1][1]= corners[0][1];
   corners[1][2]= m_ElevationMax;
   // up right at elevation min
-  corners[2][0]= outOrigin[0] + outSpacing[0] * (outRegion.GetIndex(0) + outRegion.GetSize(0));
-  corners[2][1]= outOrigin[1] + outSpacing[1] * outRegion.GetIndex(1);
+  corners[2][0]= corners[0][0] + outSpacing[0] * static_cast<double>(outRegion.GetSize(0));
+  corners[2][1]= corners[0][1];
   corners[2][2]= m_ElevationMin;
   // up right at elevation max
   corners[3][0]= corners[2][0];
   corners[3][1]= corners[2][1];
   corners[3][2]= m_ElevationMax;
   // low right at elevation min
-  corners[4][0]= outOrigin[0] + outSpacing[0] * (outRegion.GetIndex(0) + outRegion.GetSize(0));
-  corners[4][1]= outOrigin[1] + outSpacing[1] * (outRegion.GetIndex(1) + outRegion.GetSize(1));
+  corners[4][0]= corners[0][0] + outSpacing[0] * static_cast<double>(outRegion.GetSize(0));
+  corners[4][1]= corners[0][1] + outSpacing[1] * static_cast<double>(outRegion.GetSize(1));
   corners[4][2]= m_ElevationMin;
   // low right at elevation max
   corners[5][0]= corners[4][0];
   corners[5][1]= corners[4][1];
   corners[5][2]= m_ElevationMax;
   // low left at elevation min
-  corners[6][0]= outOrigin[0] + outSpacing[0] * outRegion.GetIndex(0);
-  corners[6][1]= outOrigin[1] + outSpacing[1] * (outRegion.GetIndex(1) + outRegion.GetSize(1));
+  corners[6][0]= corners[0][0];
+  corners[6][1]= corners[0][1] + outSpacing[1] * static_cast<double>(outRegion.GetSize(1));
   corners[6][2]= m_ElevationMin;
   // low left at elevation max
   corners[7][0]= corners[6][0];
@@ -446,6 +461,13 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri
   double epiIndexMax[2];
   int maxGridIndex[2];
   int minGridIndex[2];
+
+  epiIndexMin[0] = itk::NumericTraits<double>::Zero;
+  epiIndexMin[1] = itk::NumericTraits<double>::Zero;
+
+  epiIndexMax[0] = itk::NumericTraits<double>::Zero;
+  epiIndexMax[1] = itk::NumericTraits<double>::Zero;
+
   maxGridIndex[0] = static_cast<int>(gridRegion.GetIndex(0) + gridRegion.GetSize(0)) - 2;
   maxGridIndex[1] = static_cast<int>(gridRegion.GetIndex(1) + gridRegion.GetSize(1)) - 2;
   minGridIndex[0] = static_cast<int>(gridRegion.GetIndex(0));
@@ -540,8 +562,8 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri
     }
 
   typename DisparityMapType::RegionType inputDisparityRegion;
-  inputDisparityRegion.SetIndex(0, static_cast<int>(vcl_floor(epiIndexMin[0])));
-  inputDisparityRegion.SetIndex(1, static_cast<int>(vcl_floor(epiIndexMin[1])));
+  inputDisparityRegion.SetIndex(0, static_cast<int>(vcl_floor(epiIndexMin[0] + 0.5)));
+  inputDisparityRegion.SetIndex(1, static_cast<int>(vcl_floor(epiIndexMin[1] + 0.5)));
   inputDisparityRegion.SetSize(0, 1 + static_cast<unsigned int>(vcl_floor(epiIndexMax[0] - epiIndexMin[0] + 0.5)));
   inputDisparityRegion.SetSize(1, 1 + static_cast<unsigned int>(vcl_floor(epiIndexMax[1] - epiIndexMin[1] + 0.5)));
 
@@ -601,6 +623,8 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri
 ::BeforeThreadedGenerateData()
 {
   const TDisparityImage * horizDisp = this->GetHorizontalDisparityMapInput();
+  const TInputImage * leftSensor = this->GetLeftInput();
+  const TInputImage * rightSensor = this->GetRightInput();
 
   const TOutputDEMImage * outputDEM = this->GetDEMOutput();
 
@@ -608,6 +632,15 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri
 
   m_UsedInputSplits = m_InputSplitter->GetNumberOfSplits(requestedRegion, this->GetNumberOfThreads());
 
+  m_LeftToGroundTransform = RSTransformType::New();
+  m_RightToGroundTransform = RSTransformType::New();
+
+  m_LeftToGroundTransform->SetInputKeywordList(leftSensor->GetImageKeywordlist());
+  m_RightToGroundTransform->SetInputKeywordList(rightSensor->GetImageKeywordlist());
+
+  m_LeftToGroundTransform->InstanciateTransform();
+  m_RightToGroundTransform->InstanciateTransform();
+
   // ensure empty regions are not processed
   if (requestedRegion.GetSize(0) == 0 && requestedRegion.GetSize(1) == 0)
     {
@@ -641,27 +674,15 @@ template <class TDisparityImage, class TInputImage, class TOutputDEMImage,
 class TEpipolarGridImage, class TMaskImage>
 void
 DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGridImage,TMaskImage>
-::ThreadedGenerateData(const RegionType & outputRegionForThread, itk::ThreadIdType threadId)
+::ThreadedGenerateData(const RegionType & itkNotUsed(outputRegionForThread), itk::ThreadIdType threadId)
 {
   const TDisparityImage * horizDisp = this->GetHorizontalDisparityMapInput();
   const TDisparityImage * vertiDisp = this->GetVerticalDisparityMapInput();
 
-  const TInputImage * leftSensor = this->GetLeftInput();
-  const TInputImage * rightSensor = this->GetRightInput();
-
   const TMaskImage * disparityMask = this->GetDisparityMaskInput();
 
   const TOutputDEMImage * outputDEM = this->GetDEMOutput();
 
-  RSTransformType::Pointer leftToGroundTransform = RSTransformType::New();
-  RSTransformType::Pointer rightToGroundTransform = RSTransformType::New();
-
-  leftToGroundTransform->SetInputKeywordList(leftSensor->GetImageKeywordlist());
-  rightToGroundTransform->SetInputKeywordList(rightSensor->GetImageKeywordlist());
-
-  leftToGroundTransform->InstanciateTransform();
-  rightToGroundTransform->InstanciateTransform();
-
   const TEpipolarGridImage * leftGrid = this->GetLeftEpipolarGridInput();
   const TEpipolarGridImage * rightGrid = this->GetRightEpipolarGridInput();
 
@@ -775,10 +796,10 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri
     sensorPoint[0] = cPixel[0];
     sensorPoint[1] = cPixel[1];
     sensorPoint[2] = m_ElevationMin;
-    leftGroundHmin = leftToGroundTransform->TransformPoint(sensorPoint);
+    leftGroundHmin = m_LeftToGroundTransform->TransformPoint(sensorPoint);
 
     sensorPoint[2] = m_ElevationMax;
-    leftGroundHmax = leftToGroundTransform->TransformPoint(sensorPoint);
+    leftGroundHmax = m_LeftToGroundTransform->TransformPoint(sensorPoint);
 
     // compute right ray
     itk::ContinuousIndex<double,2> rightIndexEstimate;
@@ -828,10 +849,10 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri
     sensorPoint[0] = cPixel[0];
     sensorPoint[1] = cPixel[1];
     sensorPoint[2] = m_ElevationMin;
-    rightGroundHmin = rightToGroundTransform->TransformPoint(sensorPoint);
+    rightGroundHmin = m_RightToGroundTransform->TransformPoint(sensorPoint);
 
     sensorPoint[2] = m_ElevationMax;
-    rightGroundHmax = rightToGroundTransform->TransformPoint(sensorPoint);
+    rightGroundHmax = m_RightToGroundTransform->TransformPoint(sensorPoint);
 
     // Compute ray intersection (mid-point method), TODO : implement non-iterative method from Hartley & Sturm
     double a = (leftGroundHmax[0] - leftGroundHmin[0]) * (leftGroundHmax[0] - leftGroundHmin[0]) +
diff --git a/Code/DisparityMap/otbDisparityTranslateFilter.h b/Code/DisparityMap/otbDisparityTranslateFilter.h
index 6754a9f..71fcfe7 100644
--- a/Code/DisparityMap/otbDisparityTranslateFilter.h
+++ b/Code/DisparityMap/otbDisparityTranslateFilter.h
@@ -69,6 +69,7 @@ public:
   typedef typename DispMapType::IndexType    IndexType;
   typedef typename DispMapType::SpacingType  SpacingType;
   typedef typename DispMapType::PointType    PointType;
+  typedef typename DispMapType::IndexValueType IndexValueType;
 
   typedef typename GridType::RegionType      GridRegionType;
 
diff --git a/Code/DisparityMap/otbDisparityTranslateFilter.txx b/Code/DisparityMap/otbDisparityTranslateFilter.txx
index 5a75e75..2a0932c 100644
--- a/Code/DisparityMap/otbDisparityTranslateFilter.txx
+++ b/Code/DisparityMap/otbDisparityTranslateFilter.txx
@@ -242,15 +242,23 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage>
   GridRegionType gridLargest = leftGrid->GetLargestPossibleRegion();
 
   IndexType minIndex,maxIndex;
+  // -Wmaybe-uninitialized
+  typedef typename IndexType::IndexValueType IndexValueType;
+  minIndex.Fill(itk::NumericTraits<IndexValueType>::Zero);
+  maxIndex.Fill(itk::NumericTraits<IndexValueType>::Zero);
+
   IndexType corners[4];
+  for(int i = 0; i < 4; i++)
+    corners[i].Fill(itk::NumericTraits<IndexValueType>::Zero);
+
   corners[0] = requested.GetIndex();
   corners[1] = requested.GetIndex();
-  corners[1][0] += requested.GetSize()[0];
+  corners[1][0] += static_cast<IndexValueType>(requested.GetSize()[0]) - 1;
   corners[2] = requested.GetIndex();
-  corners[2][1] += requested.GetSize()[1];
+  corners[2][1] += static_cast<IndexValueType>(requested.GetSize()[1]) - 1;
   corners[3] = requested.GetIndex();
-  corners[3][0] += requested.GetSize()[0];
-  corners[3][1] += requested.GetSize()[1];
+  corners[3][0] += static_cast<IndexValueType>(requested.GetSize()[0]) - 1;
+  corners[3][1] += static_cast<IndexValueType>(requested.GetSize()[1]) - 1;
   for (unsigned int k=0; k<4; ++k)
     {
     PointType pointSensor;
@@ -260,10 +268,12 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage>
     IndexType ul;
     ul[0] = static_cast<long>(vcl_floor(indexGrid[0]));
     ul[1] = static_cast<long>(vcl_floor(indexGrid[1]));
-    if (ul[0]<gridLargest.GetIndex()[0]) ul[0]=gridLargest.GetIndex()[0];
-    if (ul[1]<gridLargest.GetIndex()[1]) ul[1]=gridLargest.GetIndex()[1];
-    if (ul[0]>(unsigned int)(gridLargest.GetIndex()[0]+gridLargest.GetSize()[0]-2)) ul[0]=(gridLargest.GetIndex()[0]+gridLargest.GetSize()[0]-2);
-    if (ul[1]>(unsigned int)(gridLargest.GetIndex()[1]+gridLargest.GetSize()[1]-2)) ul[1]=(gridLargest.GetIndex()[1]+gridLargest.GetSize()[1]-2);
+    if (ul[0] < gridLargest.GetIndex()[0]) ul[0] = gridLargest.GetIndex()[0];
+    if (ul[1] < gridLargest.GetIndex()[1]) ul[1] = gridLargest.GetIndex()[1];
+    if (ul[0] > static_cast<IndexValueType>(gridLargest.GetIndex()[0] + gridLargest.GetSize()[0]-2))
+      ul[0] = (gridLargest.GetIndex()[0] + gridLargest.GetSize()[0]-2);
+    if (ul[1] > static_cast<IndexValueType>(gridLargest.GetIndex()[1] + gridLargest.GetSize()[1]-2))
+      ul[1] = (gridLargest.GetIndex()[1] + gridLargest.GetSize()[1]-2);
 
     IndexType ur = ul;
     ur[0] += 1;
@@ -319,7 +329,7 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage>
 template <class TDisparityImage, class TGridImage, class TSensorImage, class TMaskImage>
 void
 DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage>
-::ThreadedGenerateData(const RegionType & outputRegionForThread, itk::ThreadIdType threadId)
+::ThreadedGenerateData(const RegionType & outputRegionForThread, itk::ThreadIdType itkNotUsed(threadId))
 {
   const TGridImage * leftGrid = this->GetInverseEpipolarLeftGrid();
   const TGridImage * rightGrid = this->GetDirectEpipolarRightGrid();
@@ -357,15 +367,16 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage>
       leftGrid->TransformPhysicalPointToContinuousIndex(pointSensor, indexGrid);
 
       // Interpolate in left grid
+      typedef typename IndexType::IndexValueType IndexValueType;
       IndexType ul;
       ul[0] = static_cast<long> (vcl_floor(indexGrid[0]));
       ul[1] = static_cast<long> (vcl_floor(indexGrid[1]));
       if (ul[0] < leftLargest.GetIndex()[0]) ul[0] = leftLargest.GetIndex()[0];
       if (ul[1] < leftLargest.GetIndex()[1]) ul[1] = leftLargest.GetIndex()[1];
-      if (ul[0] > (unsigned int) (leftLargest.GetIndex()[0] + leftLargest.GetSize()[0] - 2)) ul[0] = (
-          leftLargest.GetIndex()[0] + leftLargest.GetSize()[0] - 2);
-      if (ul[1] > (unsigned int) (leftLargest.GetIndex()[1] + leftLargest.GetSize()[1] - 2)) ul[1] = (
-          leftLargest.GetIndex()[1] + leftLargest.GetSize()[1] - 2);
+      if (ul[0] > static_cast<IndexValueType>(leftLargest.GetIndex()[0] + leftLargest.GetSize()[0] - 2))
+        ul[0] = (leftLargest.GetIndex()[0] + leftLargest.GetSize()[0] - 2);
+      if (ul[1] > static_cast<IndexValueType>(leftLargest.GetIndex()[1] + leftLargest.GetSize()[1] - 2))
+        ul[1] = (leftLargest.GetIndex()[1] + leftLargest.GetSize()[1] - 2);
 
       IndexType ur = ul;
       ur[0] += 1;
@@ -392,10 +403,10 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage>
       ul[1] = static_cast<long> (vcl_floor(indexEpi[1]));
       if (ul[0] < buffered.GetIndex()[0]) ul[0] = buffered.GetIndex()[0];
       if (ul[1] < buffered.GetIndex()[1]) ul[1] = buffered.GetIndex()[1];
-      if (ul[0] > (unsigned int) (buffered.GetIndex()[0] + buffered.GetSize()[0] - 2)) ul[0] = (buffered.GetIndex()[0]
-          + buffered.GetSize()[0] - 2);
-      if (ul[1] > (unsigned int) (buffered.GetIndex()[1] + buffered.GetSize()[1] - 2)) ul[1] = (buffered.GetIndex()[1]
-          + buffered.GetSize()[1] - 2);
+      if (ul[0] > static_cast<IndexValueType>(buffered.GetIndex()[0] + buffered.GetSize()[0] - 2))
+        ul[0] = (buffered.GetIndex()[0] + buffered.GetSize()[0] - 2);
+      if (ul[1] > static_cast<IndexValueType>(buffered.GetIndex()[1] + buffered.GetSize()[1] - 2))
+        ul[1] = (buffered.GetIndex()[1] + buffered.GetSize()[1] - 2);
 
       ur = ul;
       ur[0] += 1;
@@ -433,10 +444,10 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage>
         ul[1] = static_cast<long> (vcl_floor(indexGridRight[1]));
         if (ul[0] < rightLargest.GetIndex()[0]) ul[0] = rightLargest.GetIndex()[0];
         if (ul[1] < rightLargest.GetIndex()[1]) ul[1] = rightLargest.GetIndex()[1];
-        if (ul[0] > (unsigned int) (rightLargest.GetIndex()[0] + rightLargest.GetSize()[0] - 2)) ul[0] = (
-            rightLargest.GetIndex()[0] + rightLargest.GetSize()[0] - 2);
-        if (ul[1] > (unsigned int) (rightLargest.GetIndex()[1] + rightLargest.GetSize()[1] - 2)) ul[1] = (
-            rightLargest.GetIndex()[1] + rightLargest.GetSize()[1] - 2);
+        if (ul[0] > static_cast<IndexValueType>(rightLargest.GetIndex()[0] + rightLargest.GetSize()[0] - 2))
+          ul[0] = (rightLargest.GetIndex()[0] + rightLargest.GetSize()[0] - 2);
+        if (ul[1] > static_cast<IndexValueType>(rightLargest.GetIndex()[1] + rightLargest.GetSize()[1] - 2))
+          ul[1] = (rightLargest.GetIndex()[1] + rightLargest.GetSize()[1] - 2);
 
         ur = ul;
         ur[0] += 1;
diff --git a/Code/DisparityMap/otbMulti3DMapToDEMFilter.h b/Code/DisparityMap/otbMulti3DMapToDEMFilter.h
index 00e7bf2..95f2ae1 100644
--- a/Code/DisparityMap/otbMulti3DMapToDEMFilter.h
+++ b/Code/DisparityMap/otbMulti3DMapToDEMFilter.h
@@ -120,6 +120,9 @@ public:
   // 3D points
   typedef typename RSTransformType::InputPointType  TDPointType;
 
+  // 2D Transform
+  typedef otb::GenericRSTransform<>                 RSTransform2DType;
+
   typedef otb::ImageKeywordlist                     ImageKeywordListType;
 
   typedef std::map
@@ -303,7 +306,9 @@ private:
 
   int           m_OutputParametersFrom3DMap;
   bool          m_IsGeographic;
-
+  
+  /** internal transform between WGS84 and user's ProjRef */
+  RSTransform2DType::Pointer m_GroundTransform;
 
 };
 } // end namespace otb
diff --git a/Code/DisparityMap/otbMulti3DMapToDEMFilter.txx b/Code/DisparityMap/otbMulti3DMapToDEMFilter.txx
index d144307..1b1f76a 100644
--- a/Code/DisparityMap/otbMulti3DMapToDEMFilter.txx
+++ b/Code/DisparityMap/otbMulti3DMapToDEMFilter.txx
@@ -169,7 +169,6 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::SetOutputPara
   TOutputDEMImage * outputPtr = this->GetDEMOutput();
 
   // Set-up a transform to use the DEMHandler
-  typedef otb::GenericRSTransform<> RSTransform2DType;
 
   // DEM BBox
   itk::NumericTraits<DEMPixelType>::max();
@@ -194,21 +193,29 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::SetOutputPara
 
     typename InputMapType::SizeType inputSize = imgPtr->GetLargestPossibleRegion().GetSize();
 
-    typename InputMapType::PointType tmpPoint;
-    tmpPoint = imgPtr->GetOrigin();
-    RSTransform2DType::OutputPointType ul = mapToGroundTransform->TransformPoint(tmpPoint);
-
-    tmpPoint[0] = (imgPtr->GetOrigin())[0] + (imgPtr->GetSpacing())[0] * static_cast<double> (inputSize[0]);
-    tmpPoint[1] = (imgPtr->GetOrigin())[1];
-    RSTransform2DType::OutputPointType ur = mapToGroundTransform->TransformPoint(tmpPoint);
-
-    tmpPoint[0] = (imgPtr->GetOrigin())[0] + (imgPtr->GetSpacing())[0] * static_cast<double> (inputSize[0]);
-    tmpPoint[1] = (imgPtr->GetOrigin())[1] + (imgPtr->GetSpacing())[1] * static_cast<double> (inputSize[1]);
-    RSTransform2DType::OutputPointType lr = mapToGroundTransform->TransformPoint(tmpPoint);
-
-    tmpPoint[0] = (imgPtr->GetOrigin())[0];
-    tmpPoint[1] = (imgPtr->GetOrigin())[1] + (imgPtr->GetSpacing())[1] * static_cast<double> (inputSize[1]);
-    RSTransform2DType::OutputPointType ll = mapToGroundTransform->TransformPoint(tmpPoint);
+    typename InputMapType::PointType ulPt, urPt, llPt, lrPt;
+    itk::ContinuousIndex<double,2> ulIdx(imgPtr->GetLargestPossibleRegion().GetIndex());
+    ulIdx[0] += -0.5;
+    ulIdx[1] += -0.5;
+
+    itk::ContinuousIndex<double,2> urIdx(ulIdx);
+    itk::ContinuousIndex<double,2> lrIdx(ulIdx);
+    itk::ContinuousIndex<double,2> llIdx(ulIdx);
+    urIdx[0] += static_cast<double>(inputSize[0]);
+    lrIdx[0] += static_cast<double>(inputSize[0]);
+    lrIdx[1] += static_cast<double>(inputSize[1]);
+    llIdx[1] += static_cast<double>(inputSize[1]);
+
+    imgPtr->TransformContinuousIndexToPhysicalPoint(ulIdx,ulPt);
+    imgPtr->TransformContinuousIndexToPhysicalPoint(urIdx,urPt);
+    imgPtr->TransformContinuousIndexToPhysicalPoint(llIdx,llPt);
+    imgPtr->TransformContinuousIndexToPhysicalPoint(lrIdx,lrPt);
+
+    RSTransform2DType::OutputPointType ul, ur, lr, ll;
+    ul = mapToGroundTransform->TransformPoint(ulPt);
+    ur = mapToGroundTransform->TransformPoint(urPt);
+    ll = mapToGroundTransform->TransformPoint(llPt);
+    lr = mapToGroundTransform->TransformPoint(lrPt);
 
     double xmin = std::min(std::min(std::min(ul[0], ur[0]), lr[0]), ll[0]);
     double xmax = std::max(std::max(std::max(ul[0], ur[0]), lr[0]), ll[0]);
@@ -228,12 +235,6 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::SetOutputPara
 
     }
 
-  // Choose origin
-  typename TOutputDEMImage::PointType outOrigin;
-  outOrigin[0] = box_xmin;
-  outOrigin[1] = box_ymax;
-  outputPtr->SetOrigin(outOrigin);
-
   // Compute step :
   // TODO : use a clean RS transform instead
   typename TOutputDEMImage::SpacingType outSpacing;
@@ -241,14 +242,19 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::SetOutputPara
   outSpacing[0] = 57.295779513 * m_DEMGridStep / (6378137.0 * vcl_cos((box_ymin + box_ymax) * 0.5 * 0.01745329251));
   outSpacing[1] = -57.295779513 * m_DEMGridStep / 6378137.0;
   outputPtr->SetSpacing(outSpacing);
+
+  // Choose origin
+  typename TOutputDEMImage::PointType outOrigin;
+  outOrigin[0] = box_xmin + 0.5 * outSpacing[0];
+  outOrigin[1] = box_ymax + 0.5 * outSpacing[1];
+  outputPtr->SetOrigin(outOrigin);
+
   // Compute output size
   typename TOutputDEMImage::RegionType outRegion;
   outRegion.SetIndex(0, 0);
   outRegion.SetIndex(1, 0);
-  outRegion.SetSize(0, static_cast<unsigned int> ((box_xmax - box_xmin) / vcl_abs(outSpacing[0]) + 1));
-  //TODO JGT check the size
-  //outRegion.SetSize(1, static_cast<unsigned int> ((box_ymax - box_ymin) / vcl_abs(outSpacing[1])+1));
-  outRegion.SetSize(1, static_cast<unsigned int> ((box_ymax - box_ymin) / vcl_abs(outSpacing[1])));
+  outRegion.SetSize(0, static_cast<unsigned int>(vcl_floor((box_xmax - box_xmin) / vcl_abs(outSpacing[0]) + 0.5)));
+  outRegion.SetSize(1, static_cast<unsigned int>(vcl_floor((box_ymax - box_ymin) / vcl_abs(outSpacing[1]) + 0.5)));
   outputPtr->SetLargestPossibleRegion(outRegion);
   outputPtr->SetNumberOfComponentsPerPixel(1);
 
@@ -347,32 +353,32 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::GenerateInput
 
   // up left at elevation min
   TDPointType corners[8];
-  corners[0][0] = outOrigin[0] + outSpacing[0] * outRegion.GetIndex(0);
-  corners[0][1] = outOrigin[1] + outSpacing[1] * outRegion.GetIndex(1);
+  corners[0][0] = outOrigin[0] + outSpacing[0] * (-0.5 + static_cast<double>(outRegion.GetIndex(0)));
+  corners[0][1] = outOrigin[1] + outSpacing[1] * (-0.5 + static_cast<double>(outRegion.GetIndex(1)));
   corners[0][2] = m_ElevationMin;
   // up left at elevation max
   corners[1][0] = corners[0][0];
   corners[1][1] = corners[0][1];
   corners[1][2] = m_ElevationMax;
   // up right at elevation min
-  corners[2][0] = outOrigin[0] + outSpacing[0] * (outRegion.GetIndex(0) + outRegion.GetSize(0));
-  corners[2][1] = outOrigin[1] + outSpacing[1] * outRegion.GetIndex(1);
+  corners[2][0] = corners[0][0] + outSpacing[0] * static_cast<double>(outRegion.GetSize(0));
+  corners[2][1] = corners[0][1];
   corners[2][2] = m_ElevationMin;
   // up right at elevation max
   corners[3][0] = corners[2][0];
   corners[3][1] = corners[2][1];
   corners[3][2] = m_ElevationMax;
   // low right at elevation min
-  corners[4][0] = outOrigin[0] + outSpacing[0] * (outRegion.GetIndex(0) + outRegion.GetSize(0));
-  corners[4][1] = outOrigin[1] + outSpacing[1] * (outRegion.GetIndex(1) + outRegion.GetSize(1));
+  corners[4][0] = corners[0][0] + outSpacing[0] * static_cast<double>(outRegion.GetSize(0));
+  corners[4][1] = corners[0][1] + outSpacing[1] * static_cast<double>(outRegion.GetSize(1));
   corners[4][2] = m_ElevationMin;
   // low right at elevation max
   corners[5][0] = corners[4][0];
   corners[5][1] = corners[4][1];
   corners[5][2] = m_ElevationMax;
   // low left at elevation min
-  corners[6][0] = outOrigin[0] + outSpacing[0] * outRegion.GetIndex(0);
-  corners[6][1] = outOrigin[1] + outSpacing[1] * (outRegion.GetIndex(1) + outRegion.GetSize(1));
+  corners[6][0] = corners[0][0];
+  corners[6][1] = corners[0][1] + outSpacing[1] * static_cast<double>(outRegion.GetSize(1));
   corners[6][2] = m_ElevationMin;
   // low left at elevation max
   corners[7][0] = corners[6][0];
@@ -516,13 +522,20 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::BeforeThreade
     m_TempDEMAccumulatorRegions.push_back(tmpImg2);
     }
 
+  if (!this->m_IsGeographic)
+    {
+    m_GroundTransform = RSTransform2DType::New();
+    m_GroundTransform->SetInputProjectionRef(static_cast<std::string> (otb::GeoInformationConversion::ToWKT(4326)));
+    m_GroundTransform->SetOutputProjectionRef(m_ProjectionRef);
+    m_GroundTransform->InstanciateTransform();
+    }
 
 }
 
 template<class T3DImage, class TMaskImage, class TOutputDEMImage>
 void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::ThreadedGenerateData(
-                                                                                        const RegionType & outputRegionForThread,
-                                                                                        itk::ThreadIdType threadId)
+  const RegionType & itkNotUsed(outputRegionForThread),
+  itk::ThreadIdType threadId)
 {
   TOutputDEMImage * outputPtr = this->GetOutput();
 
@@ -543,11 +556,9 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::ThreadedGener
   InputInternalPixelType regionLong2 = pointRef[0] + size[0] * step[0];
   InputInternalPixelType regionLat2 = pointRef[1] + size[1] * step[1];
   InputInternalPixelType minLong = std::min(regionLong1, regionLong2);
-  InputInternalPixelType minLat = std::min(regionLat1, regionLat2);
-  InputInternalPixelType maxLong = std::max(regionLong1, regionLong2);
-  InputInternalPixelType maxLat = std::max(regionLat1, regionLat2);
-
-  typedef otb::GenericRSTransform<> RSTransform2DType;
+  // InputInternalPixelType minLat = std::min(regionLat1, regionLat2);
+  // InputInternalPixelType maxLong = std::max(regionLong1, regionLong2);
+  // InputInternalPixelType maxLat = std::max(regionLat1, regionLat2);
 
   TOutputDEMImage * tmpDEM = NULL;
   AccumulatorImageType *tmpAcc = NULL;
@@ -570,18 +581,6 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::ThreadedGener
       origin = imgPtr->GetOrigin();
       typename InputMapType::SpacingType spacing;
       spacing = imgPtr->GetSpacing();
-      RSTransform2DType::Pointer groundTransform;
-      if (!this->m_IsGeographic)
-        {
-        groundTransform = RSTransform2DType::New();
-        ImageKeywordListType imageKWL = imgPtr->GetImageKeywordlist();
-        //groundTransform->SetInputKeywordList(imageKWL);
-        groundTransform->SetInputProjectionRef(static_cast<std::string> (otb::GeoInformationConversion::ToWKT(4326)));
-        groundTransform->SetOutputProjectionRef(m_ProjectionRef);
-        //groundTransform->SetInputOrigin(origin);
-        //groundTransform->SetInputSpacing(spacing);
-        groundTransform->InstanciateTransform();
-        }
 
       if (static_cast<unsigned int> (threadId) < m_NumberOfSplit[k])
         {
@@ -624,7 +623,7 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::ThreadedGener
             typename RSTransform2DType::InputPointType tmpPoint;
             tmpPoint[0] = position[0];
             tmpPoint[1] = position[1];
-            RSTransform2DType::OutputPointType groundPosition = groundTransform->TransformPoint(tmpPoint);
+            RSTransform2DType::OutputPointType groundPosition = m_GroundTransform->TransformPoint(tmpPoint);
             position[0] = groundPosition[0];
             position[1] = groundPosition[1];
             }
@@ -641,10 +640,11 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::ThreadedGener
           itk::ContinuousIndex<double, 2> continuousIndex;
 
           //std::cout<<"point2D "<<point2D<<std::endl;
+          // The DEM cell at index 'n' contains continuous indexes from 'n-0.5' to 'n+0.5'
           outputPtr->TransformPhysicalPointToContinuousIndex(point2D, continuousIndex);
           typename OutputImageType::IndexType cellIndex;
-          cellIndex[0] = static_cast<int> (vcl_floor(continuousIndex[0]));
-          cellIndex[1] = static_cast<int> (vcl_floor(continuousIndex[1]));
+          cellIndex[0] = static_cast<int> (vcl_floor(continuousIndex[0] + 0.5));
+          cellIndex[1] = static_cast<int> (vcl_floor(continuousIndex[1] + 0.5));
           //std::cout<<"cellindex "<<cellIndex<<std::endl;
           //index from physical
           /** -Wunused-variable
diff --git a/Code/DisparityMap/otbMultiDisparityMapTo3DFilter.txx b/Code/DisparityMap/otbMultiDisparityMapTo3DFilter.txx
index d931c40..14229f5 100644
--- a/Code/DisparityMap/otbMultiDisparityMapTo3DFilter.txx
+++ b/Code/DisparityMap/otbMultiDisparityMapTo3DFilter.txx
@@ -342,7 +342,7 @@ template <class TDisparityImage, class TOutputImage,
 class TMaskImage, class TResidueImage>
 void
 MultiDisparityMapTo3DFilter<TDisparityImage,TOutputImage,TMaskImage,TResidueImage>
-::ThreadedGenerateData(const RegionType & outputRegionForThread, itk::ThreadIdType threadId)
+::ThreadedGenerateData(const RegionType & outputRegionForThread, itk::ThreadIdType itkNotUsed(threadId))
 {
   TOutputImage * outputPtr = this->GetOutput();
   TResidueImage * residuePtr = this->GetResidueOutput();
diff --git a/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.txx b/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.txx
index 31db307..22f088c 100644
--- a/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.txx
+++ b/Code/DisparityMap/otbPointSetToDisplacementFieldGenerator.txx
@@ -98,7 +98,7 @@ PointSetToDisplacementFieldGenerator<TPointSet, TDisplacementField>
   unsigned int       j = 0;
 
   typedef typename PointSetType::PointsContainer::ConstIterator PointSetIteratorType;
-  typedef typename PointSetType::PointsContainer                PointsContainerType;
+
   PointSetIteratorType it = this->GetPointSet()->GetPoints()->Begin();
   for (; it != this->GetPointSet()->GetPoints()->End(); ++it)
     {
diff --git a/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.h b/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.h
index b8eda53..83dead8 100644
--- a/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.h
+++ b/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.h
@@ -242,6 +242,10 @@ private:
    *  difference between the estimated elevation and the initial
    *  one. If set to false, elevation is absolute. Default is false. */
   bool m_SubtractInitialElevation;
+  
+  /** Master to slave transform */
+  GenericRSTransform3DType::Pointer m_MasterToSlave;
+  
 };
 } // End namespace otb
 
diff --git a/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.txx b/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.txx
index a0bb5a2..40a3289 100644
--- a/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.txx
+++ b/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.txx
@@ -298,6 +298,15 @@ StereoSensorModelToElevationFilter<TInputImage, TOutputHeight>
     outputIt.Set(otb::DEMHandler::Instance()->GetHeightAboveEllipsoid(geoPoint));
     }
 
+  const InputImageType* masterPtr  = this->GetMasterInput();
+  const InputImageType* slavePtr   = this->GetSlaveInput();
+
+  // Set-up the forward-inverse sensor model transform
+  m_MasterToSlave = GenericRSTransform3DType::New();
+  m_MasterToSlave->SetInputKeywordList(masterPtr->GetImageKeywordlist());
+  m_MasterToSlave->SetOutputKeywordList(slavePtr->GetImageKeywordlist());
+  m_MasterToSlave->InstanciateTransform();
+
 }
 
 template <class TInputImage, class TOutputHeight>
@@ -307,16 +316,9 @@ StereoSensorModelToElevationFilter<TInputImage, TOutputHeight>
 {
   // Retrieve pointers
   const InputImageType* masterPtr  = this->GetMasterInput();
-  const InputImageType* slavePtr   = this->GetSlaveInput();
   OutputImageType* outputPtr  = this->GetOutput();
   OutputImageType* correlPtr = this->GetCorrelationOutput();
 
-  // Set-up the forward-inverse sensor model transform
-  typename GenericRSTransform3DType::Pointer transform = GenericRSTransform3DType::New();
-  transform->SetInputKeywordList(masterPtr->GetImageKeywordlist());
-  transform->SetOutputKeywordList(slavePtr->GetImageKeywordlist());
-
-
   // TODO: Uncomment when model optimization pushed
   // // GCP refinement
   // unsigned int gcpCount1 = this->GetMasterInput()->GetGCPCount();
@@ -375,9 +377,6 @@ StereoSensorModelToElevationFilter<TInputImage, TOutputHeight>
   itk::ImageRegionIterator<OutputImageType> outputIt(outputPtr, outputRegionForThread);
   itk::ImageRegionIteratorWithIndex<OutputImageType> correlIt(correlPtr, outputRegionForThread);
 
-  // Transform elevation set-up
-  transform->InstanciateTransform();
-
   // Start visiting buffer again
   outputIt.GoToBegin();
   correlIt.GoToBegin();
@@ -458,7 +457,7 @@ StereoSensorModelToElevationFilter<TInputImage, TOutputHeight>
             in3DPoint[2] = height;
 
             // Transform to slave
-            out3DPoint = transform->TransformPoint(in3DPoint);
+            out3DPoint = m_MasterToSlave->TransformPoint(in3DPoint);
             outPoint[0] = out3DPoint[0];
             outPoint[1] = out3DPoint[1];
 
diff --git a/Code/DisparityMap/otbStereorectificationDisplacementFieldSource.txx b/Code/DisparityMap/otbStereorectificationDisplacementFieldSource.txx
index 11eebf9..aa66e6e 100644
--- a/Code/DisparityMap/otbStereorectificationDisplacementFieldSource.txx
+++ b/Code/DisparityMap/otbStereorectificationDisplacementFieldSource.txx
@@ -213,7 +213,6 @@ StereorectificationDisplacementFieldSource<TInputImage, TOutputImage>
     {
     double a = (leftEpiLineEnd[1] - leftEpiLineStart[1])
              / (leftEpiLineEnd[0] - leftEpiLineStart[0]);
-    double b = leftEpiLineStart[1] - a * leftEpiLineStart[0];
     if (leftEpiLineEnd[0] > leftEpiLineStart[0])
       {
       alpha = vcl_atan(a);
diff --git a/Code/DisparityMap/otbSubPixelDisparityImageFilter.h b/Code/DisparityMap/otbSubPixelDisparityImageFilter.h
index 5398762..fac1fb4 100644
--- a/Code/DisparityMap/otbSubPixelDisparityImageFilter.h
+++ b/Code/DisparityMap/otbSubPixelDisparityImageFilter.h
@@ -207,6 +207,13 @@ protected:
   /** Destructor */
   virtual ~SubPixelDisparityImageFilter();
 
+  /** \brief Verify that the input images are compatible
+   *
+   * This method needs to be re-implemented from ImageToImageFilter since
+   * the initial images and disparity maps may not have the same size
+   */
+  virtual void VerifyInputInformation();
+  
   /** Generate output information */
   virtual void GenerateOutputInformation();
 
diff --git a/Code/DisparityMap/otbSubPixelDisparityImageFilter.txx b/Code/DisparityMap/otbSubPixelDisparityImageFilter.txx
index fb1d382..2c9e23b 100644
--- a/Code/DisparityMap/otbSubPixelDisparityImageFilter.txx
+++ b/Code/DisparityMap/otbSubPixelDisparityImageFilter.txx
@@ -357,6 +357,59 @@ class TDisparityImage, class TMaskImage, class TBlockMatchingFunctor>
 void
 SubPixelDisparityImageFilter<TInputImage,TOutputMetricImage,
 TDisparityImage,TMaskImage,TBlockMatchingFunctor>
+::VerifyInputInformation()
+{
+  // Retrieve input pointers
+  const TInputImage *     inLeftPtr       = this->GetLeftInput();
+  const TInputImage *     inRightPtr      = this->GetRightInput();
+  const TMaskImage *      inLeftMaskPtr   = this->GetLeftMaskInput();
+  const TMaskImage *      inRightMaskPtr  = this->GetRightMaskInput();
+  const TDisparityImage * inHDispPtr      = this->GetHorizontalDisparityInput();
+  const TDisparityImage * inVDispPtr      = this->GetVerticalDisparityInput();
+
+  // Check pointers before using them
+  if(!inLeftPtr || !inRightPtr)
+    {
+    itkExceptionMacro(<<"Missing input, need left and right input images.");
+    }
+
+  if (!inHDispPtr)
+    {
+    itkExceptionMacro(<<"Input horizontal disparity map is missing");
+    }
+
+  // Now, we impose that both inputs have the same size
+  if(inLeftPtr->GetLargestPossibleRegion()
+     != inRightPtr->GetLargestPossibleRegion())
+    {
+    itkExceptionMacro(<<"Left and right images do not have the same size ! Left largest region: "<<inLeftPtr->GetLargestPossibleRegion()<<", right largest region: "<<inRightPtr->GetLargestPossibleRegion());
+    }
+
+  // We also check that left mask image has same size if present
+  if(inLeftMaskPtr && inLeftPtr->GetLargestPossibleRegion() != inLeftMaskPtr->GetLargestPossibleRegion())
+    {
+    itkExceptionMacro(<<"Left and mask images do not have the same size ! Left largest region: "<<inLeftPtr->GetLargestPossibleRegion()<<", mask largest region: "<<inLeftMaskPtr->GetLargestPossibleRegion());
+    }
+
+  // We also check that right mask image has same size if present
+  if(inRightMaskPtr && inRightPtr->GetLargestPossibleRegion() != inRightMaskPtr->GetLargestPossibleRegion())
+    {
+    itkExceptionMacro(<<"Right and mask images do not have the same size ! Right largest region: "<<inRightPtr->GetLargestPossibleRegion()<<", mask largest region: "<<inRightMaskPtr->GetLargestPossibleRegion());
+    }
+
+  // We check that the input initial disparity maps have the same size if present
+  if (inHDispPtr && inVDispPtr && inHDispPtr->GetLargestPossibleRegion() != inVDispPtr->GetLargestPossibleRegion())
+    {
+    itkExceptionMacro(<<"Initial horizontal and vertical disparity maps don't have the same size ! Horizontal disparity largest region: "<<inHDispPtr->GetLargestPossibleRegion()<<", vertical disparity largest region: "<<inVDispPtr->GetLargestPossibleRegion());
+    }
+
+}
+
+template <class TInputImage, class TOutputMetricImage,
+class TDisparityImage, class TMaskImage, class TBlockMatchingFunctor>
+void
+SubPixelDisparityImageFilter<TInputImage,TOutputMetricImage,
+TDisparityImage,TMaskImage,TBlockMatchingFunctor>
 ::GenerateOutputInformation()
 {
   // Retrieve input pointers
@@ -367,11 +420,6 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor>
   TDisparityImage * outHDispPtr = this->GetHorizontalDisparityOutput();
   TDisparityImage * outVDispPtr = this->GetVerticalDisparityOutput();
 
-  if (!inHDispPtr)
-    {
-    itkExceptionMacro(<<"Input horizontal disparity map is missing");
-    }
-
   outMetricPtr->CopyInformation(inHDispPtr);
   outHDispPtr->CopyInformation(inHDispPtr);
   outVDispPtr->CopyInformation(inHDispPtr);
@@ -416,40 +464,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor>
   TDisparityImage * inHDispPtr = const_cast<TDisparityImage * >(this->GetHorizontalDisparityInput());
   TDisparityImage * inVDispPtr = const_cast<TDisparityImage * >(this->GetVerticalDisparityInput());
 
-  TOutputMetricImage    * outMetricPtr = this->GetMetricOutput();
   TDisparityImage * outHDispPtr = this->GetHorizontalDisparityOutput();
-  TDisparityImage * outVDispPtr = this->GetVerticalDisparityOutput();
-
-  // Check pointers before using them
-  if(!inLeftPtr || !inRightPtr || !outMetricPtr || !outHDispPtr || !outVDispPtr)
-    {
-    return;
-    }
-
-  // Now, we impose that both inputs have the same size
-  if(inLeftPtr->GetLargestPossibleRegion()
-     != inRightPtr->GetLargestPossibleRegion())
-    {
-    itkExceptionMacro(<<"Left and right images do not have the same size ! Left largest region: "<<inLeftPtr->GetLargestPossibleRegion()<<", right largest region: "<<inRightPtr->GetLargestPossibleRegion());
-    }
-
-  // We also check that left mask image has same size if present
-  if(inLeftMaskPtr && inLeftPtr->GetLargestPossibleRegion() != inLeftMaskPtr->GetLargestPossibleRegion())
-    {
-    itkExceptionMacro(<<"Left and mask images do not have the same size ! Left largest region: "<<inLeftPtr->GetLargestPossibleRegion()<<", mask largest region: "<<inLeftMaskPtr->GetLargestPossibleRegion());
-    }
-
-  // We also check that right mask image has same size if present
-  if(inRightMaskPtr && inRightPtr->GetLargestPossibleRegion() != inRightMaskPtr->GetLargestPossibleRegion())
-    {
-    itkExceptionMacro(<<"Right and mask images do not have the same size ! Right largest region: "<<inRightPtr->GetLargestPossibleRegion()<<", mask largest region: "<<inRightMaskPtr->GetLargestPossibleRegion());
-    }
-
-  // We check that the input initial disparity maps have the same size if present
-  if (inHDispPtr && inVDispPtr && inHDispPtr->GetLargestPossibleRegion() != inVDispPtr->GetLargestPossibleRegion())
-    {
-    itkExceptionMacro(<<"Initial horizontal and vertical disparity maps don't have the same size ! Horizontal disparity largest region: "<<inHDispPtr->GetLargestPossibleRegion()<<", vertical disparity largest region: "<<inVDispPtr->GetLargestPossibleRegion());
-    }
 
   // Retrieve requested region (TODO: check if we need to handle
   // region for outHDispPtr)
diff --git a/Code/FeatureExtraction/otbExtractSegmentsImageFilter.h b/Code/FeatureExtraction/otbExtractSegmentsImageFilter.h
index 9680402..b745fe9 100644
--- a/Code/FeatureExtraction/otbExtractSegmentsImageFilter.h
+++ b/Code/FeatureExtraction/otbExtractSegmentsImageFilter.h
@@ -80,45 +80,45 @@ public:
 
   /** Set/Get the radius of the region of the pixel suppression by direction image filter. */
   void SetPixelSuppressionRadius(SizeType Radius);
-  const SizeType GetPixelSuppressionRadius(void);
+  const SizeType GetPixelSuppressionRadius();
 
   /** 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);
+  float GetPixelSuppressionAngularBeam();
 
   /** Set/Get the radius used to define the region of local hough filter. */
   void SetLocalHoughRadius(SizeType Radius);
-  const SizeType GetLocalHoughRadius(void);
+  const SizeType GetLocalHoughRadius();
 
   /** 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);
+  unsigned int GetLocalHoughNumberOfLines();
 
   /** Set/Get the radius of the disc to remove from the accumulator
    *  for each line found */
   void SetLocalHoughDiscRadius(float DiscRadius);
-  const float GetLocalHoughDiscRadius(void);
+  float GetLocalHoughDiscRadius();
 
   /** Set/Get the variance of the gaussian bluring for the accumulator */
   void SetLocalHoughVariance(float Variance);
-  const float GetLocalHoughVariance(void);
+  float GetLocalHoughVariance();
 
   /** Set/Get the radius between two segments in the fill gaps filter. */
   void SetFillGapsRadius(float Radius);
-  const float GetFillGapsRadius(void);
+  float GetFillGapsRadius();
 
   /** Set/Get Angular Beam between two segments in the fill gaps filter. */
   void SetFillGapsAngularBeam(float AngularBeam);
-  const float GetFillGapsAngularBeam(void);
+  float GetFillGapsAngularBeam();
 
   /** Set/Get the image input of this filter.  */
   void SetInputImage(const InputImageType *image);
-  const InputImageType * GetInputImage(void);
+  const InputImageType * GetInputImage();
 
   /** Set/Get the image direction of this filter.  */
   void SetInputImageDirection(const InputImageType *image);
-  const InputImageType * GetInputImageDirection(void);
+  const InputImageType * GetInputImageDirection();
 
   /** Set/Get the value of the drawed line*/
   itkGetMacro(LineValue, typename OutputImageType::PixelType);
diff --git a/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx b/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx
index 58ffb39..18d6146 100644
--- a/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx
+++ b/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx
@@ -55,7 +55,7 @@ void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 template <class TInputImage, class TOutputImage>
 const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::InputImageType *
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetInputImage(void)
+::GetInputImage()
 {
   return static_cast<const InputImageType *>
            (this->GetInput(0));
@@ -74,7 +74,7 @@ void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 template <class TInputImage, class TOutputImage>
 const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::InputImageType *
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetInputImageDirection(void)
+::GetInputImageDirection()
 {
   return static_cast<const InputImageType *>
            (this->GetInput(1));
@@ -93,7 +93,7 @@ void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 template <class TInputImage, class TOutputImage>
 const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::SizeType
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetPixelSuppressionRadius(void)
+::GetPixelSuppressionRadius()
 {
   return (m_PixelSuppression->GetRadius());
 }
@@ -106,9 +106,9 @@ void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-const float
+float
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetPixelSuppressionAngularBeam(void)
+::GetPixelSuppressionAngularBeam()
 {
   return (m_PixelSuppression->GetAngularBeam());
 }
@@ -126,7 +126,7 @@ void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 template <class TInputImage, class TOutputImage>
 const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::SizeType
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetLocalHoughRadius(void)
+::GetLocalHoughRadius()
 {
   return (m_LocalHough->GetRadius());
 }
@@ -139,9 +139,9 @@ void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-const unsigned int
+unsigned int
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetLocalHoughNumberOfLines(void)
+::GetLocalHoughNumberOfLines()
 {
   return (m_LocalHough->GetNumberOfLines());
 }
@@ -154,9 +154,9 @@ void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-const float
+float
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetLocalHoughDiscRadius(void)
+::GetLocalHoughDiscRadius()
 {
   return (m_LocalHough->GetDiscRadius());
 }
@@ -169,9 +169,9 @@ void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-const float
+float
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetLocalHoughVariance(void)
+::GetLocalHoughVariance()
 {
   return (m_LocalHough->GetVariance());
 }
@@ -187,9 +187,9 @@ void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-const float
+float
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetFillGapsRadius(void)
+::GetFillGapsRadius()
 {
   return (m_FillGaps->GetRadius());
 }
@@ -202,9 +202,9 @@ void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-const float
+float
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetFillGapsAngularBeam(void)
+::GetFillGapsAngularBeam()
 {
   return (m_FillGaps->GetAngularBeam());
 }
diff --git a/Code/FeatureExtraction/otbFlusserPathFunction.txx b/Code/FeatureExtraction/otbFlusserPathFunction.txx
index 2c55546..328aef4 100644
--- a/Code/FeatureExtraction/otbFlusserPathFunction.txx
+++ b/Code/FeatureExtraction/otbFlusserPathFunction.txx
@@ -51,7 +51,7 @@ FlusserPathFunction<TInputPath, TOutput, TPrecision>
 template <class TInputPath, class TOutput, class TPrecision>
 typename FlusserPathFunction<TInputPath, TOutput, TPrecision>::RealType
 FlusserPathFunction<TInputPath, TOutput, TPrecision>
-::Evaluate(const PathType& path) const
+::Evaluate(const PathType& itkNotUsed(path)) const
 {
   typedef ComplexMomentPathFunction<PathType> FunctionType;
   typedef typename FunctionType::ComplexType  ComplexType;
diff --git a/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.h b/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.h
index 7996d4a..cbb9511 100644
--- a/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.h
+++ b/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.h
@@ -79,6 +79,8 @@ public:
   typedef typename InputImageType::IndexType    IndexType;
   typedef typename InputImageType::Pointer      ImagePointer;
   typedef typename InputImageType::ConstPointer ImageConstPointer;
+  typedef typename InputImageType::SizeType     SizeType;
+  typedef typename InputImageType::SpacingType  SpacingType;
 
   /** InputImageType typedef support. */
   typedef typename OutputImageType::PixelType    OutputPixelType;
@@ -118,8 +120,6 @@ public:
   itkSetMacro(DefaultPixelValue, PixelType);
   itkGetMacro(DefaultPixelValue, PixelType);
 
-  virtual void GenerateOutputInformation(void);
-
   /** Set/Get the Interpolator pointer for the Log-polar resampler  */
   itkSetObjectMacro(Interpolator, InterpolatorType);
   itkGetObjectMacro(Interpolator, InterpolatorType);
@@ -128,6 +128,11 @@ protected:
   ForwardFourierMellinTransformImageFilter();
   virtual ~ForwardFourierMellinTransformImageFilter() {}
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
+
+  virtual void GenerateOutputInformation(void);
+
+  virtual void GenerateInputRequestedRegion(void);
+
   /** Main Computation Method */
   void GenerateData();
 
@@ -156,9 +161,6 @@ private:
   /** FFT Filter */
   FourierImageFilterPointer m_FFTFilter;
 
-  /** Iterator */
-  IteratorType m_Iterator;
-
 };
 
 } // namespace otb
diff --git a/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.txx b/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.txx
index 882ba85..c2f92e9 100644
--- a/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.txx
+++ b/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.txx
@@ -63,27 +63,60 @@ ForwardFourierMellinTransformImageFilter<TPixel, TInterpol, Dimension>
 template <class TPixel, class TInterpol, unsigned int Dimension>
 void
 ForwardFourierMellinTransformImageFilter<TPixel, TInterpol, Dimension>
+::GenerateInputRequestedRegion(void)
+{
+  ImagePointer input = const_cast<InputImageType*>(this->GetInput());
+  input->SetRequestedRegion(input->GetLargestPossibleRegion());
+}
+
+template <class TPixel, class TInterpol, unsigned int Dimension>
+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]);
-  params[1] = 0.5 * static_cast<double>(this->GetInput()->GetLargestPossibleRegion().GetSize()[1]);
+
+  // Compute centre of the transform
+  SizeType inputSize = this->GetInput()->GetLargestPossibleRegion().GetSize();
+  SpacingType inputSpacing = this->GetInput()->GetSpacing();
+  itk::ContinuousIndex<double,2> centre;
+  centre[0] = -0.5 + 0.5 * static_cast<double>(inputSize[0]);
+  centre[1] = -0.5 + 0.5 * static_cast<double>(inputSize[1]);
+  PointType centrePt;
+  this->GetInput()->TransformContinuousIndexToPhysicalPoint(centre,centrePt);
+
+  // Compute physical radius in the input image
+  double radius = vcl_log(vcl_sqrt(
+    vcl_pow(static_cast<double>(inputSize[0])*inputSpacing[0],2.0) +
+    vcl_pow(static_cast<double>(inputSize[1])*inputSpacing[1],2.0)) / 2.0);
+
+  params[0] = centrePt[0];
+  params[1] = centrePt[1];
   params[2] = 360. / m_OutputSize[0];
-  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];
+  params[3] = radius  / m_OutputSize[1];
   m_Transform->SetParameters(params);
 
+  // Compute rho scaling parameter in index space
+  double rhoScaleIndex = vcl_log(vcl_sqrt(
+    vcl_pow(static_cast<double>(inputSize[0]),2.0) +
+    vcl_pow(static_cast<double>(inputSize[1]),2.0)) / 2.0) / m_OutputSize[1];
+
   // log polar resampling
   m_ResampleFilter->SetInput(this->GetInput());
   m_ResampleFilter->SetDefaultPixelValue(m_DefaultPixelValue);
   m_ResampleFilter->SetSize(m_OutputSize);
+
+  PointType outOrigin;
+  outOrigin.Fill(0.5);
+  m_ResampleFilter->SetOutputOrigin(outOrigin);
+  SpacingType outSpacing;
+  outSpacing.Fill(1.0);
+  m_ResampleFilter->SetOutputSpacing(outSpacing);
+
   m_ResampleFilter->Update();
 
   typename InputImageType::Pointer tempImage = m_ResampleFilter->GetOutput();
-  m_Iterator = IteratorType(tempImage, tempImage->GetRequestedRegion());
+  IteratorType iter(tempImage, tempImage->GetRequestedRegion());
 
   // Min/max values of the output pixel type AND these values
   // represented as the output type of the interpolator
@@ -92,13 +125,14 @@ ForwardFourierMellinTransformImageFilter<TPixel, TInterpol, Dimension>
 
   // Normalization is specific to FourierMellin convergence conditions, and
   // thus should be implemented here instead of in the resample filter.
-  for (m_Iterator.GoToBegin(); !m_Iterator.IsAtEnd(); ++m_Iterator)
+  for (iter.GoToBegin(); !iter.IsAtEnd(); ++iter)
     {
-    double    Rho   = m_Iterator.GetIndex()[1] * params[3];
+    // 0.5 shift in order to follow output image physical space
+    double    Rho   = (0.5 + static_cast<double>(iter.GetIndex()[1])) * rhoScaleIndex;
     PixelType pixval;
-    double    valueTemp = static_cast<double>(m_Iterator.Get());
+    double    valueTemp = static_cast<double>(iter.Get());
     valueTemp *= vcl_exp(m_Sigma * Rho);
-    valueTemp *= params[3];
+    valueTemp *= rhoScaleIndex;
     PixelType value = static_cast<PixelType>(valueTemp);
 
     if (value < minOutputValue)
@@ -113,7 +147,7 @@ ForwardFourierMellinTransformImageFilter<TPixel, TInterpol, Dimension>
       {
       pixval = static_cast<PixelType>(value);
       }
-    m_Iterator.Set(pixval);
+    iter.Set(pixval);
     }
   m_FFTFilter->SetInput(tempImage);
 
diff --git a/Code/FeatureExtraction/otbGenericRoadExtractionFilter.h b/Code/FeatureExtraction/otbGenericRoadExtractionFilter.h
index e5778c4..ff2eda4 100644
--- a/Code/FeatureExtraction/otbGenericRoadExtractionFilter.h
+++ b/Code/FeatureExtraction/otbGenericRoadExtractionFilter.h
@@ -187,7 +187,9 @@ protected:
   /** Destructor */
   ~GenericRoadExtractionFilter() {}
 
-  /** Prepare main computation method */
+  /** Prepare main computation method
+   *  Note : this function isn't called
+   */
   void BeforeGenerateData(void);
 
   /** Main computation method */
diff --git a/Code/FeatureExtraction/otbGenericRoadExtractionFilter.txx b/Code/FeatureExtraction/otbGenericRoadExtractionFilter.txx
index 9671526..6ed3e03 100644
--- a/Code/FeatureExtraction/otbGenericRoadExtractionFilter.txx
+++ b/Code/FeatureExtraction/otbGenericRoadExtractionFilter.txx
@@ -113,6 +113,7 @@ GenericRoadExtractionFilter<TInputImage, TOutputPath>
   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_GradientFilter->SetUseImageDirection(false);
 
   m_NeighborhoodScalarProductFilter->SetInput(m_GradientFilter->GetOutput());
 
diff --git a/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedList.h b/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedList.h
new file mode 100644
index 0000000..0552303
--- /dev/null
+++ b/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedList.h
@@ -0,0 +1,192 @@
+/*=========================================================================
+
+Program:   ORFEO Toolbox
+Language:  C++
+Date:      $Date$
+Version:   $Revision$
+
+
+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
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+#ifndef __otbGreyLevelCooccurrenceIndexedList_h
+#define __otbGreyLevelCooccurrenceIndexedList_h
+
+#include "itkNumericTraits.h"
+#include "itkObjectFactory.h"
+#include "itkLightObject.h"
+#include "itkArray.h"
+#include "itkIndex.h"
+#include "itkSize.h"
+#include <utility>
+#include <vector>
+
+namespace otb
+{
+/** \class GreyLevelCooccurrenceIndexedList
+* \brief This class holds a VectorType of CooccurrencePairType with each pair is
+* a combination of pixel index and frequency.
+*
+* GreyLevelCooccurrenceIndexedList instance is created for every neighborhood
+* iteration over the given input image. This class keep an internal itk::Array
+* as a lookup array with size as [nbbins x nbbins]. The lookup array stores
+* position CooccurrencePairType in the VectorType. It ensures us that all elements
+* in Vector are unqiue in terms of the index value in the pair. For any given
+* pixel index, -1 value indicates zero existance of the index in the
+* VectorType. This avoid searching all elements in VectorType for each pixel
+* index added during neighborhood iterator. It is also used to decide wheather
+* to update the frequency of pair or to insert a new element in the vector.
+*
+* Print references:
+* David A. Clausi and Yongping Zhao. 2002. Rapid extraction of image texture by
+* co-occurrence using a hybrid data structure. Comput. Geosci. 28, 6 (July
+* 2002), 763-774. DOI=10.1016/S0098-3004(01)00108-X
+* http://dx.doi.org/10.1016/S0098-3004(01)00108-X
+*
+* de O.Bastos, L.; Liatsis, P.; Conci, A., Automatic texture segmentation based
+* on k-means clustering and efficient calculation of co-occurrence
+* features. Systems, Signals and Image Processing, 2008. IWSSIP 2008. 15th
+* International Conference on , vol., no., pp.141,144, 25-28 June 2008
+* doi: 10.1109/IWSSIP.2008.4604387
+*/
+
+template <class TPixel>
+class ITK_EXPORT GreyLevelCooccurrenceIndexedList : public itk::LightObject
+{
+public:
+
+  /** Standard typedefs */
+  typedef GreyLevelCooccurrenceIndexedList Self;
+  typedef itk::LightObject                 Superclass;
+  typedef itk::SmartPointer<Self>          Pointer;
+  typedef itk::SmartPointer<const Self>    ConstPointer;
+
+  /** Creation through the object factory */
+  itkNewMacro(Self);
+
+  /** RTTI */
+  itkTypeMacro(GreyLevelCooccurrenceIndexedList, itk::LightObject);
+
+  typedef TPixel PixelType;
+
+  itkStaticConstMacro(PixelPairSize, unsigned int, 2);
+
+  typedef itk::Index<PixelPairSize>  IndexType;
+  typedef itk::Size<PixelPairSize>   SizeType;
+  typedef typename itk::IndexValueType    IndexValueType;
+
+  typedef typename itk::IdentifierType InstanceIdentifier;
+  typedef InstanceIdentifier FrequencyType;
+  typedef typename itk::NumericTraits< FrequencyType >::RealType RelativeFrequencyType;
+  typedef typename itk::NumericTraits< FrequencyType >::AccumulateType TotalFrequencyType;
+
+  typedef typename itk::NumericTraits< PixelType >::RealType PixelValueType;
+  typedef itk::FixedArray<PixelValueType, PixelPairSize> PixelPairType;
+  // lower bound of each bin
+  std::vector< std::vector< PixelValueType > > m_Min;
+  // upper bound of each bin
+  std::vector< std::vector< PixelValueType > > m_Max;
+
+  /* std::pair to hold pixel pair and its frequency count */
+  typedef std::pair<IndexType, FrequencyType> CooccurrencePairType;
+
+  /** Lookup array used to store the index of the given pixel pair. Size of
+    * LookupAray is equal to the nbins * nbins. Values in the array represents 1D
+    * index of the IndexType*/
+  typedef itk::Array<int> LookupArrayType;
+
+  /** std::vector to hold CooccurrencePairType. Index of the array where the
+    * cooccurrence is stored is saved in the LookupArrayType.*/
+  typedef std::vector<CooccurrencePairType> VectorType;
+
+  /** Get the total frequency of Co-occurrence pairs. */
+  itkGetMacro(TotalFrequency, TotalFrequencyType);
+
+  /** Get the total frequency of Co-occurrence pairs. */
+  itkGetMacro(Symmetry, bool);
+
+  /** Get std::vector containing non-zero co-occurrence pairs */
+  VectorType GetVector();
+
+  /** Initialize the lowerbound and upper bound vecotor, Fill m_LookupArray with
+    * -1 and set m_TotalFreqency to zero */
+  void Initialize(const unsigned int nbins, const PixelValueType min,
+                  const PixelValueType max, const bool symmetry = true);
+
+  //check if both pixel values fall between m_InputImageMinimum and
+  //m_InputImageMaximum. If so add to m_Vector via AddPairToVector method */
+  void AddPixelPair(const PixelValueType& pixelvalue1, const PixelValueType& pixelvalue2);
+
+  /* Get the frequency value from Vector with index =[j,i] */
+  RelativeFrequencyType GetFrequency(IndexValueType i, IndexValueType j);
+
+  /* Get the frequency value from Vector with index =[j,i] from given
+   * vector. This is used if we have a copy of m_Vector normalized. */
+  RelativeFrequencyType GetFrequency(IndexValueType i, IndexValueType j, const VectorType& vect) const;
+
+protected:
+  GreyLevelCooccurrenceIndexedList();
+  ~GreyLevelCooccurrenceIndexedList() { }
+
+  /** create a cooccurrence pair with given index and frequency = 1
+    * value. Next occurrence of same index is checked via m_LookupArray and the
+    * correspoding frequency value is incremented. If m_Symmetry is true the
+    * co-occurrence pair is added again with index values swapped */
+  void AddPairToVector(IndexType index);
+
+  void SetBinMin(const unsigned int dimension, const InstanceIdentifier nbin,
+                 PixelValueType min);
+
+  void SetBinMax(const unsigned int dimension, const InstanceIdentifier nbin,
+                 PixelValueType max);
+
+  /** Get index of the pixelPair combination and save the result in index **/
+  bool GetIndex(const PixelPairType & pixelPair, IndexType & index) const;
+
+  void PrintSelf(std::ostream & os, itk::Indent indent) const;
+
+private:
+
+  GreyLevelCooccurrenceIndexedList(const Self&); //purposely not implemented
+  void operator =(const Self&); //purposely not implemented
+
+  /** LookupArray instance */
+  LookupArrayType m_LookupArray;
+
+  /* std::vector holding actual co-occurrence pairs */
+  VectorType m_Vector;
+
+  /* Size instance */
+  SizeType m_Size;
+
+  /** booleab to check if co-occurrene list is a symmtrical. true by default */
+  bool m_Symmetry;
+
+  /* Store the total frequency of co-occurrence pairs in GreyLevelCooccureneIndexedList class */
+  TotalFrequencyType m_TotalFrequency;
+
+  /** boolean to check pixel values fall under m_InputImageMinimum and
+    * m_InputImageMaximum. Used in GetIndex method. false by default */
+  bool m_ClipBinsAtEnds;
+
+  /** Input image minimum */
+  PixelValueType m_InputImageMinimum;
+
+  /** Input image maximum */
+  PixelValueType m_InputImageMaximum;
+};
+
+} // End namespace otb
+
+#ifndef OTB_MANUAL_INSTANTIATION
+#include "otbGreyLevelCooccurrenceIndexedList.txx"
+#endif
+
+#endif
diff --git a/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedList.txx b/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedList.txx
new file mode 100644
index 0000000..07b1e5c
--- /dev/null
+++ b/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedList.txx
@@ -0,0 +1,329 @@
+/*=========================================================================
+
+Program:   ORFEO Toolbox
+Language:  C++
+Date:      $Date$
+Version:   $Revision$
+
+
+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
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+#ifndef __otbGreyLevelCooccurrenceIndexedList_txx
+#define __otbGreyLevelCooccurrenceIndexedList_txx
+
+#include "otbGreyLevelCooccurrenceIndexedList.h"
+
+namespace otb
+{
+template <class TPixel>
+GreyLevelCooccurrenceIndexedList<TPixel>::
+GreyLevelCooccurrenceIndexedList():
+m_Size(),
+m_Symmetry(true),
+m_TotalFrequency(0),
+m_ClipBinsAtEnds(true),
+m_InputImageMinimum(0),
+m_InputImageMaximum(255)
+{
+
+}
+
+template <class TPixel >
+void
+GreyLevelCooccurrenceIndexedList<TPixel>::
+Initialize(const unsigned int nbins, const PixelValueType min,
+                  const PixelValueType max, const bool symmetry)
+{
+  PixelPairType lowerBound;
+  PixelPairType upperBound;
+
+  m_Size.Fill(nbins);
+  m_InputImageMinimum = min;
+  m_InputImageMaximum = max;
+  lowerBound.Fill(min);
+  upperBound.Fill(max+1);
+
+  m_Symmetry = symmetry;
+  m_LookupArray = LookupArrayType(m_Size[0] * m_Size[1]);
+  m_LookupArray.Fill(-1);
+  m_TotalFrequency = 0;
+
+  // adjust the sizes of min max value containers
+  unsigned int dim;
+  m_Min.resize( PixelPairSize );
+  for ( dim = 0; dim < PixelPairSize; dim++ )
+    {
+    m_Min[dim].resize(m_Size[dim]);
+    }
+
+  m_Max.resize( PixelPairSize );
+  for ( dim = 0; dim < PixelPairSize; dim++ )
+    {
+    m_Max[dim].resize(m_Size[dim]);
+    }
+
+  float interval;
+  for ( unsigned int i = 0; i < PixelPairSize; i++ )
+    {
+    if ( m_Size[i] > 0 )
+      {
+      interval = static_cast<float>( upperBound[i] - lowerBound[i] )
+        / static_cast< PixelValueType >( m_Size[i] );
+
+      // Set the min vector and max vector
+      for ( unsigned int j = 0; j < static_cast< unsigned int >( m_Size[i] - 1 ); j++ )
+        {
+        this->SetBinMin( i, j, (PixelValueType)( lowerBound[i]
+                                                 + ( (float)j * interval ) ) );
+        this->SetBinMax( i, j, (PixelValueType)( lowerBound[i]
+                                                 + ( ( (float)j + 1 ) * interval ) ) );
+        }
+      this->SetBinMin( i, m_Size[i] - 1,
+                       (PixelValueType)( lowerBound[i]
+                                         + ( ( (float)m_Size[i] - 1 ) * interval ) ) );
+      this->SetBinMax( i, m_Size[i] - 1,
+                       (PixelValueType)( upperBound[i] ) );
+      }
+    }
+}
+
+template <class TPixel >
+void
+GreyLevelCooccurrenceIndexedList<TPixel>::
+SetBinMin(const unsigned int dimension, const InstanceIdentifier nbin,
+            PixelValueType min)
+{
+  m_Min[dimension][nbin] = min;
+}
+
+template <class TPixel >
+void
+GreyLevelCooccurrenceIndexedList<TPixel>::
+SetBinMax(const unsigned int dimension, const InstanceIdentifier nbin,
+            PixelValueType max)
+{
+  m_Max[dimension][nbin] = max;
+}
+
+template <class TPixel >
+bool
+GreyLevelCooccurrenceIndexedList<TPixel>::
+GetIndex(const PixelPairType & pixelPair, IndexType & index) const
+{
+  // now using something similar to binary search to find
+  // index.
+  unsigned int dim;
+
+  int begin;
+  int mid;
+  int end;
+
+  PixelValueType median;
+  PixelValueType tempPixelValue;
+
+  for ( dim = 0; dim < PixelPairSize; dim++ )
+    {
+    tempPixelValue = pixelPair[dim];
+    begin = 0;
+
+    if ( tempPixelValue < m_Min[dim][begin] )
+      {
+      // one of measurement is below the minimum
+      // its ok if we extend the bins to infinity.. not ok if we don't
+      if ( !m_ClipBinsAtEnds )
+        {
+        index[dim] = (IndexValueType)0;
+        continue;
+        }
+      else
+        {   // set an illegal value and return 0
+        index[dim] = (IndexValueType)m_Size[dim];
+        return false;
+        }
+      }
+
+    end = m_Min[dim].size() - 1;
+    if ( tempPixelValue >= m_Max[dim][end] )
+      {
+      // one of measurement is above the maximum
+      // its ok if we extend the bins to infinity.. not ok if we don't
+      // Need to include the last endpoint in the last bin.
+      if ( !m_ClipBinsAtEnds || tempPixelValue ==  m_Max[dim][end])
+        {
+        index[dim] = (IndexValueType)m_Size[dim] - 1;
+        continue;
+        }
+      else
+        {   // set an illegal value and return 0
+        index[dim] = (IndexValueType)m_Size[dim];
+        return false;
+        }
+      }
+
+    // Binary search for the bin where this measurement could be
+    mid = ( end + 1 ) / 2;
+    median = m_Min[dim][mid];
+
+    while ( true )
+      {
+      if ( tempPixelValue < median )
+        {
+        end = mid - 1;
+        }
+      else if ( tempPixelValue > median )
+        {
+        // test whether it is inside the current bin by comparing to the max of
+        // this bin.
+        if ( tempPixelValue <  m_Max[dim][mid]
+             && tempPixelValue >= m_Min[dim][mid] )
+          {
+          index[dim] = mid;
+          break;
+          }
+        // otherwise, continue binary search
+        begin = mid + 1;
+        }
+      else
+        {
+        index[dim] = mid;
+        break;
+        }
+      mid = begin + ( end - begin ) / 2;
+      median = m_Min[dim][mid];
+      } // end of while
+    }   // end of for()
+  return true;
+}
+
+template <class TPixel >
+void
+GreyLevelCooccurrenceIndexedList<TPixel>::
+AddPixelPair(const PixelValueType& pixelvalue1, const PixelValueType& pixelvalue2)
+{
+
+  if ( pixelvalue1 < m_InputImageMinimum
+       || pixelvalue1 > m_InputImageMaximum )
+    {
+    return; // don't put a pixel in the co-occurrence list if pixelvalue1
+            // is out-of-bounds.
+    }
+
+  if ( pixelvalue2 < m_InputImageMinimum
+       || pixelvalue2 > m_InputImageMaximum )
+    {
+    return; // don't put a pixel in the co-occurrence list if the pixelvalue2
+           // is out-of-bounds.
+    }
+
+  IndexType index;
+  PixelPairType ppair( PixelPairSize);
+  ppair[0] = pixelvalue1;
+  ppair[1] = pixelvalue2;
+
+  //Get Index of the given pixel pair;
+  this->GetIndex(ppair, index);
+  //Add the index and set/update the frequency of the pixel pair. if m_Symmetry
+  //is true the index is swapped and added to vector again.
+  this->AddPairToVector(index);
+  if(m_Symmetry)
+    {
+    IndexValueType temp;
+    temp = index[0];
+    index[0] = index[1];
+    index[1] = temp;
+    this->AddPairToVector(index);
+    }
+}
+
+template <class TPixel>
+typename GreyLevelCooccurrenceIndexedList<TPixel>::RelativeFrequencyType
+GreyLevelCooccurrenceIndexedList<TPixel>::
+GetFrequency(IndexValueType i, IndexValueType j)
+{
+  double frequency = 0;
+  InstanceIdentifier instanceId = i * m_Size[0] + j;
+  if (instanceId < m_LookupArray.size())
+    {
+    int findex = m_LookupArray[instanceId];
+    if(findex > -1 )
+      frequency = m_Vector[findex].second / m_TotalFrequency;
+    }
+  return frequency;
+}
+
+template <class TPixel>
+typename GreyLevelCooccurrenceIndexedList<TPixel>::RelativeFrequencyType
+GreyLevelCooccurrenceIndexedList<TPixel>::
+GetFrequency(IndexValueType i, IndexValueType j, const VectorType& vect) const
+{
+  double frequency = 0;
+  InstanceIdentifier instanceId = i * m_Size[0] + j;
+  if (instanceId < m_LookupArray.size())
+    {
+    int findex = m_LookupArray[instanceId];
+    if(findex > -1 )
+      frequency = vect[findex].second;
+    }
+  return frequency;
+}
+
+template <class TPixel>
+typename GreyLevelCooccurrenceIndexedList<TPixel>::VectorType
+GreyLevelCooccurrenceIndexedList<TPixel>
+::GetVector()
+{
+  return m_Vector;
+}
+
+template <class TPixel>
+void
+GreyLevelCooccurrenceIndexedList<TPixel>
+::AddPairToVector(IndexType index)
+{
+  InstanceIdentifier instanceId = 0;
+  instanceId = index[1] * m_Size[0] + index[0];
+  int vindex = m_LookupArray[instanceId];
+  if( vindex < 0)
+    {
+    m_LookupArray[instanceId] = m_Vector.size();
+
+    CooccurrencePairType cooccur;
+    cooccur = std::make_pair(index,1);
+    m_Vector.push_back(cooccur);
+    }
+  else
+    {
+    m_Vector[vindex].second++;
+    }
+  m_TotalFrequency = m_TotalFrequency + 1;
+}
+
+template <class TPixel>
+void
+GreyLevelCooccurrenceIndexedList<TPixel>
+::PrintSelf(std::ostream & os, itk::Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+  os << indent << "Symmetry: " << this->m_Symmetry << std::endl;
+  os << indent << "TotalFrequency: " << this->m_TotalFrequency << std::endl;
+  os << indent << "Size: " << m_Size;
+  os << indent << "CooccurrenceIndexedList: " << std::endl;
+  typename VectorType::const_iterator it;
+  for (it = m_Vector.begin(); it != m_Vector.end(); ++it)
+    {
+    std::cerr << "index=" << (*it).first << ", frequency=" << (*it).second << std::endl;
+    }
+  std::cerr << std::endl;
+}
+
+} //end namespace otb
+
+#endif
diff --git a/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.h b/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.h
index 61ed030..d2c791d 100644
--- a/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.h
+++ b/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.h
@@ -18,6 +18,8 @@
 #ifndef __otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator_h
 #define __otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator_h
 
+#include "vcl_deprecated_header.h"
+
 #include "itkHistogram.h"
 #include "itkMacro.h"
 
diff --git a/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.txx b/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.txx
index 21d6908..823d848 100644
--- a/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.txx
+++ b/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.txx
@@ -20,6 +20,7 @@
 
 #include "itkNumericTraits.h"
 #include "vnl/vnl_math.h"
+#include <algorithm>
 
 namespace otb {
 
diff --git a/Code/FeatureExtraction/otbHaralickTexturesImageFunction.h b/Code/FeatureExtraction/otbHaralickTexturesImageFunction.h
index 4e3811e..075dda7 100644
--- a/Code/FeatureExtraction/otbHaralickTexturesImageFunction.h
+++ b/Code/FeatureExtraction/otbHaralickTexturesImageFunction.h
@@ -18,10 +18,10 @@
 #ifndef __otbHaralickTexturesImageFunction_h
 #define __otbHaralickTexturesImageFunction_h
 
+#include "otbGreyLevelCooccurrenceIndexedList.h"
+#include "itkImageToImageFilter.h"
 #include "itkImageFunction.h"
 #include "itkFixedArray.h"
-#include "itkScalarImageToCooccurrenceMatrixFilter.h"
-#include "itkHistogramToTextureFeaturesFilter.h"
 
 namespace otb
 {
@@ -29,9 +29,14 @@ namespace otb
  * \class HaralickTexturesImageFunction
  * \brief Compute the 8 Haralick texture indices on the neighborhood of the point
  *
- * This class computes the 8 Haralick texture indices on the neighborhood of the point
- * (where \f$ g(i, j) \f$ is the element in
- * cell i, j of a normalized GLCM):
+ * To improve the speed of computation, a variant of Grey Level Co-occurrence
+ * Matrix(GLCM) called Grey Level Co-occurrence Indexed List (GLCIL) is
+ * used. Given below is the mathematical explanation on the computation of each
+ * textures. Here $ g(i, j) $ is the frequency of element in the GLCIL whose
+ * index is i, j. GLCIL stores a pair of frequency of two pixels from the given
+ * offset and the cell index (i, j) of the pixel in the neighborhood
+ * window. :(where each element in GLCIL is a pair of pixel index and it's
+ * frequency, $ g(i, j) $ is the frequency value of the pair having index is i, j).
  *
  * "Energy" \f$ = f_1 = \sum_{i, j}g(i, j)^2 \f$
  *
@@ -56,15 +61,30 @@ namespace otb
  *
  * \f$ \sigma =  \f$ (weighted pixel variance) \f$ = \sum_{i, j}(i - \mu)^2 \cdot g(i, j) =
  * \sum_{i, j}(j - \mu)^2 \cdot g(i, j)  \f$  (due to matrix summetry)
- * This class is templated over the input image type and the
- * coordinate representation type (e.g. float or double).
  *
- * \sa otb::MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator
- * \sa itk::HistogramToTextureFeaturesFilter
+ * Print references:
+ *
+ * Haralick, R.M., K. Shanmugam and I. Dinstein. 1973.  Textural Features for
+ * Image Classification. IEEE Transactions on Systems, Man and Cybernetics.
+ * SMC-3(6):610-620.
+ *
+ * David A. Clausi and Yongping Zhao. 2002. Rapid extraction of image texture by
+ * co-occurrence using a hybrid data structure. Comput. Geosci. 28, 6 (July
+ * 2002), 763-774. DOI=10.1016/S0098-3004(01)00108-X
+ * http://dx.doi.org/10.1016/S0098-3004(01)00108-X
+ *
+ * de O.Bastos, L.; Liatsis, P.; Conci, A., Automatic texture segmentation based
+ * on k-means clustering and efficient calculation of co-occurrence
+ * features. Systems, Signals and Image Processing, 2008. IWSSIP 2008. 15th
+ * International Conference on , vol., no., pp.141,144, 25-28 June 2008
+ * doi: 10.1109/IWSSIP.2008.4604387
+ *
+ * \sa otb::GreyLevelCo-occurrenceIndexedList
  *
  * \ingroup ImageFunctions
  */
 
+
 template <class TInputImage, class TCoordRep = double >
 class ITK_EXPORT HaralickTexturesImageFunction :
   public itk::ImageFunction< TInputImage,
@@ -99,27 +119,23 @@ public:
   typedef typename InputImageType::Pointer         InputImagePointerType;
   typedef typename InputImageType::PixelType       InputPixelType;
   typedef typename InputImageType::RegionType      InputRegionType;
+  typedef typename InputImageType::OffsetType   OffsetType;
   typedef typename InputRegionType::SizeType       SizeType;
 
-  // Textures tools
-  /** Co-occurence matrix and textures calculator */
-    typedef itk::Statistics::ScalarImageToCooccurrenceMatrixFilter
-    <InputImageType>                               CoocurrenceMatrixGeneratorType;
-    typedef typename CoocurrenceMatrixGeneratorType
-        ::Pointer                                  CoocurrenceMatrixGeneratorPointerType;
-    typedef typename CoocurrenceMatrixGeneratorType
-        ::OffsetType                               OffsetType;
-    typedef typename CoocurrenceMatrixGeneratorType
-        ::HistogramType                            HistogramType;
-    typedef itk::Statistics::HistogramToTextureFeaturesFilter
-    <HistogramType>                                TextureCoefficientsCalculatorType;
-    typedef typename TextureCoefficientsCalculatorType
-        ::Pointer                                  TextureCoefficientsCalculatorPointerType;
-
   // Output typedef support
   typedef typename Superclass::OutputType          OutputType;
   typedef typename OutputType::ValueType           ScalarRealType;
-
+  // Textures tools
+  typedef GreyLevelCooccurrenceIndexedList< InputPixelType >   CooccurrenceIndexedListType;
+  typedef typename CooccurrenceIndexedListType::Pointer       CooccurrenceIndexedListPointerType;
+  typedef typename CooccurrenceIndexedListType::ConstPointer  CooccurrenceIndexedListConstPointerType;
+  typedef typename CooccurrenceIndexedListType::IndexType              CooccurrenceIndexType;
+  typedef typename CooccurrenceIndexedListType::PixelValueType         PixelValueType;
+  typedef typename CooccurrenceIndexedListType::RelativeFrequencyType  RelativeFrequencyType;
+  typedef typename CooccurrenceIndexedListType::VectorType             VectorType;
+
+  typedef typename VectorType::iterator                    VectorIteratorType;
+  typedef typename VectorType::const_iterator              VectorConstIteratorType;
   // Coord rep
   typedef TCoordRep                                CoordRepType;
 
@@ -154,7 +170,7 @@ public:
      * Get the radius of the neighborhood over which the
      * statistics are evaluated
      */
-    itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int );
+  itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int );
 
   /** Set the offset for co-occurence computation */
   itkSetMacro(Offset, OffsetType);
@@ -162,10 +178,10 @@ public:
     /** Get the offset for co-occurence computation */
     itkGetMacro(Offset, OffsetType);
 
-    /** Set the number of bin per axis for histogram generation */
+    /** Set the number of bin per axis */
     itkSetMacro(NumberOfBinsPerAxis, unsigned int);
 
-    /** Get the number of bin per axis for histogram generation */
+    /** Get the number of bin per axis */
     itkGetMacro(NumberOfBinsPerAxis, unsigned int);
 
     /** Set the input image minimum */
@@ -195,7 +211,7 @@ private:
   /** Offset for co-occurences generation */
   OffsetType   m_Offset;
 
-  /** Number of bins per axis for histogram generation */
+  /** Number of bins per axis */
   unsigned int m_NumberOfBinsPerAxis;
 
   /** Input image minimum */
@@ -203,6 +219,10 @@ private:
 
   /** Input image maximum */
   InputPixelType m_InputImageMaximum;
+
+  //TODO: should we use constexpr? only c++11 and problem for msvc
+  inline double GetPixelValueTolerance() const {return 0.0001; }
+
 };
 
 } // namespace otb
@@ -212,4 +232,3 @@ private:
 #endif
 
 #endif
-
diff --git a/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx b/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx
index 923caf5..0503767 100644
--- a/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx
+++ b/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx
@@ -24,6 +24,7 @@
 #include "itkNumericTraits.h"
 #include "itkMacro.h"
 #include <complex>
+#include <cmath>
 
 namespace otb
 {
@@ -38,7 +39,7 @@ HaralickTexturesImageFunction<TInputImage, TCoordRep>
  m_Offset(),
  m_NumberOfBinsPerAxis(8),
  m_InputImageMinimum(0),
- m_InputImageMaximum(256)
+ m_InputImageMaximum(255)
 {}
 
 template <class TInputImage, class TCoordRep>
@@ -77,24 +78,18 @@ HaralickTexturesImageFunction<TInputImage, TCoordRep>
     return textures;
     }
 
-
+  const double log2 = vcl_log(2.0);
   // Retrieve the input pointer
   InputImagePointerType inputPtr = const_cast<InputImageType *> (this->GetInputImage());
 
   // Compute the region on which co-occurence will be estimated
-  typename InputRegionType::IndexType inputIndex, inputIndexWithTwiceOffset;
-  typename InputRegionType::SizeType inputSize, inputSizeWithTwiceOffset;
+  typename InputRegionType::IndexType inputIndex;
+  typename InputRegionType::SizeType inputSize;
 
-  for(unsigned int dim = 0; dim<InputImageType::ImageDimension; ++dim)
+  for (unsigned int dim = 0; dim < InputImageType::ImageDimension; ++dim)
     {
-    inputIndex[dim] = std::min(
-                               (index[dim] - m_NeighborhoodRadius),
-                               (index[dim] - m_NeighborhoodRadius + m_Offset[dim])
-                              );
-    inputSize[dim] = 2 * m_NeighborhoodRadius + 1 + std::abs(m_Offset[dim]);
-
-    inputIndexWithTwiceOffset[dim] = index[dim] - m_NeighborhoodRadius - std::abs(m_Offset[dim]);
-    inputSizeWithTwiceOffset[dim] = inputSize[dim] + std::abs(m_Offset[dim]);
+    inputIndex[dim] = index[dim] - m_NeighborhoodRadius;
+    inputSize[dim] = 2 * m_NeighborhoodRadius + 1;
     }
 
   // Build the input  region
@@ -103,64 +98,124 @@ HaralickTexturesImageFunction<TInputImage, TCoordRep>
   inputRegion.SetSize(inputSize);
   inputRegion.Crop(inputPtr->GetRequestedRegion());
 
-  InputRegionType inputRegionWithTwiceOffset;
-  inputRegionWithTwiceOffset.SetIndex(inputIndexWithTwiceOffset);
-  inputRegionWithTwiceOffset.SetSize(inputSizeWithTwiceOffset);
-  inputRegionWithTwiceOffset.Crop(inputPtr->GetRequestedRegion());
-
-
-  /*********************************************************************************/
-  //Local copy of the input image around the processed pixel index
-  InputImagePointerType localInputImage = InputImageType::New();
-  localInputImage->SetRegions(inputRegionWithTwiceOffset);
-  localInputImage->Allocate();
-  typedef itk::ImageRegionIteratorWithIndex<InputImageType> ImageRegionIteratorType;
-  ImageRegionIteratorType itInputPtr(inputPtr, inputRegionWithTwiceOffset);
-  ImageRegionIteratorType itLocalInputImage(localInputImage, inputRegionWithTwiceOffset);
-  for (itInputPtr.GoToBegin(), itLocalInputImage.GoToBegin(); !itInputPtr.IsAtEnd(); ++itInputPtr, ++itLocalInputImage)
+  CooccurrenceIndexedListPointerType GLCIList = CooccurrenceIndexedListType::New();
+  GLCIList->Initialize(m_NumberOfBinsPerAxis, m_InputImageMinimum, m_InputImageMaximum);
+
+  // Next, find the minimum radius that encloses all the offsets.
+  unsigned int minRadius = 0;
+  for ( unsigned int i = 0; i < m_Offset.GetOffsetDimension(); i++ )
+    {
+    unsigned int distance = vcl_abs(m_Offset[i]);
+    if ( distance > minRadius )
+      {
+      minRadius = distance;
+      }
+    }
+  SizeType radius;
+  radius.Fill(minRadius);
+
+
+  typedef itk::ConstNeighborhoodIterator< InputImageType > NeighborhoodIteratorType;
+  NeighborhoodIteratorType neighborIt;
+  neighborIt = NeighborhoodIteratorType(radius, inputPtr, inputRegion);
+  for ( neighborIt.GoToBegin(); !neighborIt.IsAtEnd(); ++neighborIt )
+    {
+    const InputPixelType centerPixelIntensity = neighborIt.GetCenterPixel();
+    bool pixelInBounds;
+    const InputPixelType pixelIntensity =  neighborIt.GetPixel(m_Offset, pixelInBounds);
+    if ( !pixelInBounds )
+      {
+      continue; // don't put a pixel in the value if it's out-of-bounds.
+      }
+    GLCIList->AddPixelPair(centerPixelIntensity, pixelIntensity);
+    }
+
+
+  double pixelMean = 0.;
+  double marginalMean;
+  double marginalDevSquared = 0.;
+  double pixelVariance = 0.;
+
+  //Create and Intialize marginalSums
+  std::vector<double> marginalSums(m_NumberOfBinsPerAxis, 0);
+
+  //get co-occurrence vector and totalfrequency
+  VectorType glcVector = GLCIList->GetVector();
+  double totalFrequency = static_cast<double> (GLCIList->GetTotalFrequency());
+
+  //Normalize the co-occurrence indexed list and compute mean, marginalSum
+  typename VectorType::iterator it = glcVector.begin();
+  while( it != glcVector.end())
+    {
+    double frequency = (*it).second / totalFrequency;
+    CooccurrenceIndexType index = (*it).first;
+    pixelMean += index[0] * frequency;
+    marginalSums[index[0]] += frequency;
+    ++it;
+    }
+
+  /* Now get the mean and deviaton of the marginal sums.
+     Compute incremental mean and SD, a la Knuth, "The  Art of Computer
+     Programming, Volume 2: Seminumerical Algorithms",  section 4.2.2.
+     Compute mean and standard deviation using the recurrence relation:
+     M(1) = x(1), M(k) = M(k-1) + (x(k) - M(k-1) ) / k
+     S(1) = 0, S(k) = S(k-1) + (x(k) - M(k-1)) * (x(k) - M(k))
+     for 2 <= k <= n, then
+     sigma = vcl_sqrt(S(n) / n) (or divide by n-1 for sample SD instead of
+     population SD).
+  */
+  std::vector<double>::const_iterator msIt = marginalSums.begin();
+  marginalMean = *msIt;
+  //Increment iterator to start with index 1
+  ++msIt;
+  for(int k= 2; msIt != marginalSums.end(); ++k, ++msIt)
     {
-    itLocalInputImage.Set(itInputPtr.Get());
+    double M_k_minus_1 = marginalMean;
+    double S_k_minus_1 = marginalDevSquared;
+    double x_k = *msIt;
+    double M_k = M_k_minus_1 + ( x_k - M_k_minus_1 ) / k;
+    double S_k = S_k_minus_1 + ( x_k - M_k_minus_1 ) * ( x_k - M_k );
+    marginalMean = M_k;
+    marginalDevSquared = S_k;
     }
-  /*********************************************************************************/
+  marginalDevSquared = marginalDevSquared / m_NumberOfBinsPerAxis;
 
-  // Build the maskImage corresponding to inputRegion included in inputRegionWithTwiceOffset
-  InputImagePointerType maskImage = InputImageType::New();
-  maskImage->SetRegions(inputRegionWithTwiceOffset);
-  maskImage->Allocate();
-  maskImage->FillBuffer(0);
+  VectorConstIteratorType constVectorIt;
+  constVectorIt = glcVector.begin();
+  while( constVectorIt != glcVector.end())
+    {
+    RelativeFrequencyType frequency = (*constVectorIt).second / totalFrequency;
+    CooccurrenceIndexType        index = (*constVectorIt).first;
+    pixelVariance += ( index[0] - pixelMean ) * ( index[0] - pixelMean ) * frequency;
+    ++constVectorIt;
+    }
 
-  ImageRegionIteratorType itMask(maskImage, inputRegion);
-  for (itMask.GoToBegin(); !itMask.IsAtEnd(); ++itMask)
+  double pixelVarianceSquared = pixelVariance * pixelVariance;
+  // Variance is only used in correlation. If variance is 0, then (index[0] - pixelMean) * (index[1] - pixelMean)
+  // should be zero as well. In this case, set the variance to 1. in order to
+  // avoid NaN correlation.
+  if(pixelVarianceSquared < GetPixelValueTolerance())
     {
-    itMask.Set(1);
+    pixelVarianceSquared = 1.;
     }
 
-  // Build the co-occurence matrix generator
-  CoocurrenceMatrixGeneratorPointerType coOccurenceMatrixGenerator = CoocurrenceMatrixGeneratorType::New();
-  coOccurenceMatrixGenerator->SetInput(localInputImage);
-  coOccurenceMatrixGenerator->SetOffset(m_Offset);
-  coOccurenceMatrixGenerator->SetNumberOfBinsPerAxis(m_NumberOfBinsPerAxis);
-  coOccurenceMatrixGenerator->SetPixelValueMinMax(m_InputImageMinimum, m_InputImageMaximum);
-  coOccurenceMatrixGenerator->SetMaskImage(maskImage);
-  coOccurenceMatrixGenerator->SetInsidePixelValue(1);
-  coOccurenceMatrixGenerator->Update();
-
-  // Build the texture calculator
-  TextureCoefficientsCalculatorPointerType texturesCalculator = TextureCoefficientsCalculatorType::New();
-
-  // Compute textures indices
-  texturesCalculator->SetInput(coOccurenceMatrixGenerator->GetOutput());
-  texturesCalculator->Update();
-
-  // Fill the output vector
-  textures[0]=texturesCalculator->GetEnergy();
-  textures[1]=texturesCalculator->GetEntropy();
-  textures[2]=texturesCalculator->GetCorrelation();
-  textures[3]=texturesCalculator->GetInverseDifferenceMoment();
-  textures[4]=texturesCalculator->GetInertia();
-  textures[5]=texturesCalculator->GetClusterShade();
-  textures[6]=texturesCalculator->GetClusterProminence();
-  textures[7]=texturesCalculator->GetHaralickCorrelation();
+  //Compute textures
+  constVectorIt = glcVector.begin();
+  while( constVectorIt != glcVector.end())
+    {
+    CooccurrenceIndexType index = (*constVectorIt).first;
+    RelativeFrequencyType frequency = (*constVectorIt).second / totalFrequency;
+    textures[0] += frequency * frequency;
+    textures[1] -= ( frequency > GetPixelValueTolerance() ) ? frequency *vcl_log(frequency) / log2:0;
+    textures[2] += ( ( index[0] - pixelMean ) * ( index[1] - pixelMean ) * frequency ) / pixelVarianceSquared;
+    textures[3] += frequency / ( 1.0 + ( index[0] - index[1] ) * ( index[0] - index[1] ) );
+    textures[4] += ( index[0] - index[1] ) * ( index[0] - index[1] ) * frequency;
+    textures[5] += vcl_pow( ( index[0] - pixelMean ) + ( index[1] - pixelMean ), 3 ) * frequency;
+    textures[6] += vcl_pow( ( index[0] - pixelMean ) + ( index[1] - pixelMean ), 4 ) * frequency;
+    textures[7] += index[0] * index[1] * frequency;
+    ++constVectorIt;
+    }
+  textures[7] = (fabs(marginalDevSquared) > 1E-8) ?  ( textures[7] - marginalMean * marginalMean )  / marginalDevSquared : 0;
 
   // Return result
   return textures;
diff --git a/Code/FeatureExtraction/otbHuPathFunction.txx b/Code/FeatureExtraction/otbHuPathFunction.txx
index 914d43f..1d9d585 100644
--- a/Code/FeatureExtraction/otbHuPathFunction.txx
+++ b/Code/FeatureExtraction/otbHuPathFunction.txx
@@ -52,7 +52,7 @@ HuPathFunction<TInputPath, TOutput, TPrecision>
 template <class TInputPath, class TOutput, class TPrecision>
 typename HuPathFunction<TInputPath, TOutput, TPrecision>::RealType
 HuPathFunction<TInputPath, TOutput, TPrecision>
-::Evaluate(const PathType& path) const
+::Evaluate(const PathType& itkNotUsed(path)) const
 {
   typedef ComplexMomentPathFunction<PathType> FunctionType;
   typedef typename FunctionType::ComplexType  ComplexType;
diff --git a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx
index fd95dd4..0f8e270 100644
--- a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx
+++ b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx
@@ -278,6 +278,7 @@ ImageToSIFTKeyPointSetFilter<TInputImage, TOutputPointSet>
     while ((lIterDoG + 1) != m_DoGList->End())
       {
       otbGenericMsgDebugMacro(<< "ImageToSIFTKeyPointSetFilter:: octave: " << octave << " scale: " << lScale);
+      otbUnusedMacro(octave);
       // Compute max of DoG
       MinimumMaximumCalculatorPointerType lMaximumCalculator = MinimumMaximumCalculatorType::New();
       lMaximumCalculator->SetImage(lIterDoG.Get());
@@ -561,7 +562,7 @@ std::vector<typename ImageToSIFTKeyPointSetFilter<TInputImage, TOutputPointSet>:
 ImageToSIFTKeyPointSetFilter<TInputImage, TOutputPointSet>
 ::ComputeKeyPointOrientations(const NeighborhoodIteratorType& currentScale,
                               const unsigned int scale,
-                              const PixelType translation)
+                              const PixelType itkNotUsed(translation))
 {
   // radius of the neighborhood
   unsigned int radius = 4;
@@ -892,8 +893,7 @@ void
 ImageToSIFTKeyPointSetFilter<TInputImage, TOutputPointSet>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
-  typedef typename TOutputPointSet::PointsContainerConstIterator PointsIteratorType;
-  typedef typename TOutputPointSet::PointDataContainerIterator   PointsDataIteratorType;
+
   typedef itk::ProcessObject                                     ProcessObjectType;
   const OutputPointSetType* output = dynamic_cast<const OutputPointSetType*>(this->ProcessObjectType::GetOutput(0));
 
diff --git a/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx b/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx
index da334bd..bdf1796 100644
--- a/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx
+++ b/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx
@@ -155,8 +155,6 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
   typename itk::ConstNeighborhoodIterator<InputImageType>::OffsetType off;
   itk::ImageRegionIterator<OutputImageType>                           it;
   itk::ImageRegionIterator<OutputImageType>                           itdir;
-  typedef  itk::ImageRegionIterator<InputImageType>     InputIteratorType;
-  typedef itk::ImageRegionConstIterator<InputImageType> ConstInputIteratorType;
 
   // Allocate output
   typename OutputImageType::Pointer output = this->GetOutput();
@@ -394,7 +392,7 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
 template <class TInputImage, class TOutputImage, class TOutputImageDirection, class InterpolatorType>
 double
 LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, InterpolatorType>
-::ComputeMeasure(std::vector<double>* m1, std::vector<double>* m2, std::vector<double>* m3)
+::ComputeMeasure(std::vector<double>* itkNotUsed(m1), std::vector<double>* itkNotUsed(m2), std::vector<double>* itkNotUsed(m3))
 {
   return 0;
 }
diff --git a/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx b/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx
index cae40a2..727fd02 100644
--- a/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx
+++ b/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx
@@ -45,7 +45,6 @@ NeighborhoodScalarProductFilter<TInputImage, TOutputModulus, TOutputDirection>
   typedef itk::ConstNeighborhoodIterator<InputImageType>                           NeighborhoodIteratorType;
   typedef typename NeighborhoodIteratorType::RadiusType                            RadiusType;
   typedef typename NeighborhoodIteratorType::OffsetType                            OffsetType;
-  typedef itk::ZeroFluxNeumannBoundaryCondition<InputImageType>                    BoundaryConditionType;
   typedef itk::ImageRegionIterator<OutputModulusType>                              OutputIteratorType;
   typedef itk::ImageRegionIterator<OutputDirectionType>                            OutputDirectionIteratorType;
   typedef itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType> BoundaryFacesCalculatorType;
diff --git a/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h b/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h
index 88211f6..ae37c0d 100644
--- a/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h
+++ b/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h
@@ -44,6 +44,8 @@ public:
     if (itA.GetCenterPixel() != 0)
       {
       typename TInput1::OffsetType offset1, offset2;
+      offset1.Fill(0);
+      offset2.Fill(0);
       int neighborhoodNumber;
       if (itB.GetCenterPixel() > 0)
         {
diff --git a/Code/FeatureExtraction/otbParallelLinePathListFilter.txx b/Code/FeatureExtraction/otbParallelLinePathListFilter.txx
index d11525d..a598834 100644
--- a/Code/FeatureExtraction/otbParallelLinePathListFilter.txx
+++ b/Code/FeatureExtraction/otbParallelLinePathListFilter.txx
@@ -212,7 +212,7 @@ ParallelLinePathListFilter<TPath>
 template <class TPath>
 bool
 ParallelLinePathListFilter<TPath>
-::VerifyMaxDistanceCondition(VertexType v1, VertexType v2, VertexType v3, VertexType v4)
+::VerifyMaxDistanceCondition(VertexType v1, VertexType v2, VertexType v3, VertexType itkNotUsed(v4))
 {
   // Compute the direction vector of the first line
   VertexType vectorDir12;
diff --git a/Code/FeatureExtraction/otbSFSTexturesFunctor.h b/Code/FeatureExtraction/otbSFSTexturesFunctor.h
index 67ce4fb..f121533 100644
--- a/Code/FeatureExtraction/otbSFSTexturesFunctor.h
+++ b/Code/FeatureExtraction/otbSFSTexturesFunctor.h
@@ -80,7 +80,7 @@ public:
   void SetNumberOfDirections(unsigned int D)
   {
     m_NumberOfDirections = D;
-    m_DirectionStep = CONST_2PI / static_cast<double>(D);
+    m_DirectionStep = CONST_PI / static_cast<double>(D);
   }
   void SetDirectionStep(double step){ m_DirectionStep = step; }
   void SetSelectedTextures(std::vector<bool> vect)
@@ -123,15 +123,21 @@ public:
     for (unsigned int d = 0; d < m_NumberOfDirections; d++)
       {
       // Current angle direction
-      angle = m_Alpha * static_cast<double>(d);
+      angle = m_DirectionStep * static_cast<double>(d);
 
-      // last offset in the diraction respecting spatial threshold
+      // last offset in the direction respecting spatial threshold
       off[0] = static_cast<int>(vcl_floor(SpatialThresholdDouble * vcl_cos(angle) + 0.5));
       off[1] = static_cast<int>(vcl_floor(SpatialThresholdDouble * vcl_sin(angle) + 0.5));
-      // last indices in the diration respecting spectral threshold
+      // last indices in the direction respecting spectral threshold
       OffsetType offEnd = this->FindLastOffset(it, off);
-      // computes distance = dist between the 2 segment point. One of them is the center pixel -> (0, 0)
-      dist = vcl_sqrt(vcl_pow(static_cast<double>(offEnd[0]), 2) + vcl_pow(static_cast<double>(offEnd[1]), 2));
+
+      // Check the opposite side
+      off[0] *= -1.0;
+      off[1] *= -1.0;
+      OffsetType offStart = this->FindLastOffset(it, off);
+
+      // computes distance = dist between the 2 segment point.
+      dist = vcl_sqrt(vcl_pow(static_cast<double>(offEnd[0]-offStart[0]), 2) + vcl_pow(static_cast<double>(offEnd[1]-offStart[1]), 2));
 
       // for length computation
       if (m_SelectedTextures[0] == true) if (dist > length) length = dist;
diff --git a/Code/FeatureExtraction/otbSFSTexturesImageFilter.h b/Code/FeatureExtraction/otbSFSTexturesImageFilter.h
index 5132f85..ddf98a9 100644
--- a/Code/FeatureExtraction/otbSFSTexturesImageFilter.h
+++ b/Code/FeatureExtraction/otbSFSTexturesImageFilter.h
@@ -145,7 +145,7 @@ public:
   void SetNumberOfDirections(unsigned int D)
   {
     this->GetFunctor().SetNumberOfDirections(D);
-    double step = CONST_2PI / static_cast<double>(D);
+    double step = CONST_PI / static_cast<double>(D);
     this->GetFunctor().SetDirectionStep(step);
   }
   unsigned int GetNumberOfDirections()
diff --git a/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.h b/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.h
index ee76758..811d14e 100644
--- a/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.h
+++ b/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.h
@@ -18,15 +18,81 @@
 #ifndef __otbScalarImageToAdvancedTexturesFilter_h
 #define __otbScalarImageToAdvancedTexturesFilter_h
 
+#include "otbGreyLevelCooccurrenceIndexedList.h"
 #include "itkImageToImageFilter.h"
-#include "itkScalarImageToCooccurrenceMatrixFilter.h"
-#include "otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.h"
 
 namespace otb
 {
 /**
  * \class ScalarImageToAdvancedTexturesFilter
- * \brief TODO
+ * \brief In this case, 10 advanced texture features will be processed. The 10
+ * output image channels are: Mean, Variance, Dissimilarity, Sum Average, Sum
+ * Variance, Sum Entropy, Difference of Entropies, Difference of Variances, IC1
+ * and IC2. They are provided in this exact order in the output image. The
+ * textures are computed over a sliding window with user defined radius.
+ *
+ * To improve the speed of computation, a variant of Grey Level Co-occurrence
+ * Matrix(GLCM) called Grey Level Co-occurrence Indexed List (GLCIL) is
+ * used. Given below is the mathematical explanation on the computation of each
+ * textures. Here $ g(i, j) $ is the frequency of element in the GLCIL whose
+ * index is i, j. GLCIL stores a pair of frequency of two pixels from the given
+ * offset and the cell index (i, j) of the pixel in the neighborhood
+ * window. :(where each element in GLCIL is a pair of pixel index and it's
+ * frequency, $ g(i, j) $ is the frequency value of the pair having index is i, j).
+ *
+ * "Mean" \f$ = \sum_{i, j}i g(i, j) \f$
+ *
+ * "Sum of squares: Variance" \f$ = f_4 = \sum_{i, j}(i - \mu)^2 g(i, j) \f$
+ *
+ * "Dissimilarity" \f$ = f_5 = \sum_{i, j}(i - j) g(i, j)^2 \f$
+ *
+ * "Sum average" \f$ = f_6 = -\sum_{i}i g_{x+y}(i) \f$
+ *
+ * "Sum Variance" \f$ = f_7 = \sum_{i}(i - f_8)^2 g_{x+y}(i) \f$
+ *
+ * "Sum Entropy" \f$= f_8 = -\sum_{i}g_{x+y}(i) log (g_{x+y}(i)) \f$
+ *
+ * "Difference variance" \f$ = f_10 = variance of g_{x-y}(i) \f$
+ *
+ * "Difference entropy" \f$ = f_11 = -\sum_{i}g_{x-y}(i) log (g_{x-y}(i)) \f$
+ *
+ * "Information Measures of Correlation IC1" \f$ = f_12 = \frac{f_9 - HXY1}{H} \f$
+ *
+ * "Information Measures of Correlation IC2" \f$ = f_13 = \sqrt{1 - \exp{-2}|HXY2 - f_9|} \f$
+ *
+ * Above, \f$ \mu =  \f$ (weighted pixel average) \f$ = \sum_{i, j}i \cdot g(i, j) =
+ * \sum_{i, j}j \cdot g(i, j) \f$ (due to matrix summetry), and
+ *
+ * \f$ \g_{x+y}(k) =  \sum_{i}\sum_{j}g(i)\f$ where \f$ i+j=k \f$ and \f$ k = 2, 3, .., 2N_[g}  \f$ and
+ *
+ * \f$ \g_{x-y}(k) =  \sum_{i}\sum_{j}g(i)\f$ where \f$ i-j=k \f$ and \f$ k = 0, 1, .., N_[g}-1  \f$
+ *
+ * Print references:
+ *
+ * Haralick, R.M., K. Shanmugam and I. Dinstein. 1973.  Textural Features for
+ * Image Classification. IEEE Transactions on Systems, Man and Cybernetics.
+ * SMC-3(6):610-620.
+ *
+ * David A. Clausi and Yongping Zhao. 2002. Rapid extraction of image texture by
+ * co-occurrence using a hybrid data structure. Comput. Geosci. 28, 6 (July
+ * 2002), 763-774. DOI=10.1016/S0098-3004(01)00108-X
+ * http://dx.doi.org/10.1016/S0098-3004(01)00108-X
+ *
+ * de O.Bastos, L.; Liatsis, P.; Conci, A., Automatic texture segmentation based
+ * on k-means clustering and efficient calculation of co-occurrence
+ * features. Systems, Signals and Image Processing, 2008. IWSSIP 2008. 15th
+ * International Conference on , vol., no., pp.141,144, 25-28 June 2008
+ * doi: 10.1109/IWSSIP.2008.4604387
+ *
+ * Neighborhood size can be set using the SetRadius() method. Offset for co-occurence estimation
+ * is set using the SetOffset() method.
+ *
+ * \sa otb::ScalarImageToCooccurrenceIndexedList
+ * \sa otb::ScalarImageToTexturesFiler
+ * \sa otb::ScalarImageToHigherOrderTexturesFilter
+ * \ingroup Streamed
+ * \ingroup Threaded
+ *
  */
 template<class TInpuImage, class TOutputImage>
 class ScalarImageToAdvancedTexturesFilter : public itk::ImageToImageFilter
@@ -50,19 +116,22 @@ public:
   typedef typename InputImageType::Pointer     InputImagePointerType;
   typedef typename InputImageType::PixelType   InputPixelType;
   typedef typename InputImageType::RegionType  InputRegionType;
+  typedef typename InputImageType::OffsetType  OffsetType;
   typedef typename InputRegionType::SizeType   SizeType;
   typedef TOutputImage                         OutputImageType;
   typedef typename OutputImageType::Pointer    OutputImagePointerType;
   typedef typename OutputImageType::RegionType OutputRegionType;
 
-  /** Co-occurence matrix and textures calculator */
-  typedef itk::Statistics::ScalarImageToCooccurrenceMatrixFilter<InputImageType> CoocurrenceMatrixGeneratorType;
-  typedef typename CoocurrenceMatrixGeneratorType::Pointer       CoocurrenceMatrixGeneratorPointerType;
-  typedef typename CoocurrenceMatrixGeneratorType::OffsetType    OffsetType;
-  typedef typename CoocurrenceMatrixGeneratorType::HistogramType HistogramType;
-  typedef GreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator
-  <HistogramType>                                                TextureCoefficientsCalculatorType;
-  typedef typename TextureCoefficientsCalculatorType::Pointer TextureCoefficientsCalculatorPointerType;
+  typedef GreyLevelCooccurrenceIndexedList< InputPixelType >   CooccurrenceIndexedListType;
+  typedef typename CooccurrenceIndexedListType::Pointer       CooccurrenceIndexedListPointerType;
+  typedef typename CooccurrenceIndexedListType::ConstPointer  CooccurrenceIndexedListConstPointerType;
+  typedef typename CooccurrenceIndexedListType::IndexType              CooccurrenceIndexType;
+  typedef typename CooccurrenceIndexedListType::PixelValueType         PixelValueType;
+  typedef typename CooccurrenceIndexedListType::RelativeFrequencyType  RelativeFrequencyType;
+  typedef typename CooccurrenceIndexedListType::VectorType             VectorType;
+
+  typedef typename VectorType::iterator                    VectorIteratorType;
+  typedef typename VectorType::const_iterator              VectorConstIteratorType;
 
   /** Set the radius of the window on which textures will be computed */
   itkSetMacro(Radius, SizeType);
@@ -75,10 +144,10 @@ public:
   /** Get the offset for co-occurence computation */
   itkGetMacro(Offset, OffsetType);
 
-  /** Set the number of bin per axis for histogram generation */
+  /** Set the number of bin per axis */
   itkSetMacro(NumberOfBinsPerAxis, unsigned int);
 
-  /** Get the number of bin per axis for histogram generation */
+  /** Get the number of bin per axis*/
   itkGetMacro(NumberOfBinsPerAxis, unsigned int);
 
   /** Set the input image minimum */
@@ -99,6 +168,9 @@ public:
   /** Get the variance output image */
   OutputImageType * GetVarianceOutput();
 
+  /** Get the dissimilarity output image */
+  OutputImageType * GetDissimilarityOutput();
+
   /** Get the sum average output image */
   OutputImageType * GetSumAverageOutput();
 
@@ -127,6 +199,8 @@ protected:
   ~ScalarImageToAdvancedTexturesFilter();
   /** Generate the input requested region */
   virtual void GenerateInputRequestedRegion();
+  /** Before Parallel textures extraction */
+  virtual void BeforeThreadedGenerateData();
   /** Parallel textures extraction */
   virtual void ThreadedGenerateData(const OutputRegionType& outputRegion, itk::ThreadIdType threadId);
 
@@ -143,7 +217,10 @@ private:
   /** Offset for co-occurence */
   OffsetType m_Offset;
 
-  /** Number of bins per axis for histogram generation */
+  /** Radius of the neighborhood iterator which is minumum of m_Radius */
+  SizeType m_NeighborhoodRadius;
+
+  /** Number of bins per axis */
   unsigned int m_NumberOfBinsPerAxis;
 
   /** Input image minimum */
@@ -151,6 +228,7 @@ private:
 
   /** Input image maximum */
   InputPixelType m_InputImageMaximum;
+
 };
 } // End namespace otb
 
diff --git a/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.txx b/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.txx
index f59c3e4..a4ac974 100644
--- a/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.txx
+++ b/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.txx
@@ -20,23 +20,28 @@
 
 #include "otbScalarImageToAdvancedTexturesFilter.h"
 #include "itkImageRegionIteratorWithIndex.h"
+#include "itkConstNeighborhoodIterator.h"
 #include "itkImageRegionIterator.h"
 #include "itkProgressReporter.h"
+#include "itkNumericTraits.h"
+#include <algorithm>
 
 namespace otb
 {
 template <class TInputImage, class TOutputImage>
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
-::ScalarImageToAdvancedTexturesFilter() : m_Radius(),
-  m_Offset(),
-  m_NumberOfBinsPerAxis(8),
-  m_InputImageMinimum(0),
-  m_InputImageMaximum(256)
+::ScalarImageToAdvancedTexturesFilter()
+: m_Radius()
+, m_Offset()
+, m_NeighborhoodRadius()
+, m_NumberOfBinsPerAxis(8)
+, m_InputImageMinimum(0)
+, m_InputImageMaximum(255)
 {
-  // There are 9 outputs corresponding to the 8 textures indices
-  this->SetNumberOfRequiredOutputs(9);
+  // There are 10 outputs corresponding to the 9 textures indices
+  this->SetNumberOfRequiredOutputs(10);
 
-  // Create the 9 outputs
+  // Create the 10 outputs
   this->SetNthOutput(0, OutputImageType::New());
   this->SetNthOutput(1, OutputImageType::New());
   this->SetNthOutput(2, OutputImageType::New());
@@ -46,18 +51,18 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
   this->SetNthOutput(6, OutputImageType::New());
   this->SetNthOutput(7, OutputImageType::New());
   this->SetNthOutput(8, OutputImageType::New());
+  this->SetNthOutput(9, OutputImageType::New());
 }
 
 template <class TInputImage, class TOutputImage>
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::~ScalarImageToAdvancedTexturesFilter()
 {}
-
 template <class TInputImage, class TOutputImage>
 typename ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::OutputImageType *
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
-::GetVarianceOutput()
+::GetMeanOutput()
 {
   if (this->GetNumberOfOutputs() < 1)
     {
@@ -70,7 +75,7 @@ template <class TInputImage, class TOutputImage>
 typename ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::OutputImageType *
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
-::GetSumAverageOutput()
+::GetVarianceOutput()
 {
   if (this->GetNumberOfOutputs() < 2)
     {
@@ -83,7 +88,7 @@ template <class TInputImage, class TOutputImage>
 typename ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::OutputImageType *
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
-::GetSumVarianceOutput()
+::GetDissimilarityOutput()
 {
   if (this->GetNumberOfOutputs() < 3)
     {
@@ -96,7 +101,7 @@ template <class TInputImage, class TOutputImage>
 typename ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::OutputImageType *
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
-::GetSumEntropyOutput()
+::GetSumAverageOutput()
 {
   if (this->GetNumberOfOutputs() < 4)
     {
@@ -109,7 +114,7 @@ template <class TInputImage, class TOutputImage>
 typename ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::OutputImageType *
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
-::GetDifferenceEntropyOutput()
+::GetSumVarianceOutput()
 {
   if (this->GetNumberOfOutputs() < 5)
     {
@@ -122,7 +127,7 @@ template <class TInputImage, class TOutputImage>
 typename ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::OutputImageType *
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
-::GetDifferenceVarianceOutput()
+::GetSumEntropyOutput()
 {
   if (this->GetNumberOfOutputs() < 6)
     {
@@ -135,7 +140,7 @@ template <class TInputImage, class TOutputImage>
 typename ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::OutputImageType *
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
-::GetIC1Output()
+::GetDifferenceEntropyOutput()
 {
   if (this->GetNumberOfOutputs() < 7)
     {
@@ -148,7 +153,7 @@ template <class TInputImage, class TOutputImage>
 typename ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::OutputImageType *
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
-::GetIC2Output()
+::GetDifferenceVarianceOutput()
 {
   if (this->GetNumberOfOutputs() < 8)
     {
@@ -161,9 +166,9 @@ template <class TInputImage, class TOutputImage>
 typename ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::OutputImageType *
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
-::GetMeanOutput()
+::GetIC1Output()
 {
-  if (this->GetNumberOfOutputs() < 1)
+  if (this->GetNumberOfOutputs() < 9)
     {
     return 0;
     }
@@ -171,6 +176,19 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
+typename ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
+::OutputImageType *
+ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
+::GetIC2Output()
+{
+  if (this->GetNumberOfOutputs() < 10)
+    {
+    return 0;
+    }
+  return static_cast<OutputImageType *>(this->GetOutput(9));
+}
+
+template <class TInputImage, class TOutputImage>
 void
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::GenerateInputRequestedRegion()
@@ -233,23 +251,42 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 template <class TInputImage, class TOutputImage>
 void
 ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
+::BeforeThreadedGenerateData()
+{
+  unsigned int minRadius = 0;
+  for ( unsigned int i = 0; i < m_Offset.GetOffsetDimension(); i++ )
+    {
+    unsigned int distance = vcl_abs(m_Offset[i]);
+    if ( distance > minRadius )
+      {
+      minRadius = distance;
+      }
+    }
+  m_NeighborhoodRadius.Fill(minRadius);
+}
+
+template <class TInputImage, class TOutputImage>
+void
+ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
 ::ThreadedGenerateData(const OutputRegionType& outputRegionForThread, itk::ThreadIdType threadId)
 {
   // Retrieve the input and output pointers
-  InputImagePointerType  inputPtr             =      const_cast<InputImageType *>(this->GetInput());
-  OutputImagePointerType meanPtr              =      this->GetMeanOutput();
-  OutputImagePointerType variancePtr          =      this->GetVarianceOutput();
-  OutputImagePointerType sumAveragePtr        =      this->GetSumAverageOutput();
-  OutputImagePointerType sumVariancePtr       =      this->GetSumVarianceOutput();
-  OutputImagePointerType sumEntropytPtr       =      this->GetSumEntropyOutput();
-  OutputImagePointerType differenceEntropyPtr =      this->GetDifferenceEntropyOutput();
+  InputImagePointerType  inputPtr              =      const_cast<InputImageType *>(this->GetInput());
+  OutputImagePointerType meanPtr               =      this->GetMeanOutput();
+  OutputImagePointerType variancePtr           =      this->GetVarianceOutput();
+  OutputImagePointerType dissimilarityPtr      =      this->GetDissimilarityOutput();
+  OutputImagePointerType sumAveragePtr         =      this->GetSumAverageOutput();
+  OutputImagePointerType sumVariancePtr        =      this->GetSumVarianceOutput();
+  OutputImagePointerType sumEntropytPtr        =      this->GetSumEntropyOutput();
+  OutputImagePointerType differenceEntropyPtr  =      this->GetDifferenceEntropyOutput();
   OutputImagePointerType differenceVariancePtr =      this->GetDifferenceVarianceOutput();
-  OutputImagePointerType ic1Ptr               =      this->GetIC1Output();
-  OutputImagePointerType ic2Ptr               =      this->GetIC2Output();
+  OutputImagePointerType ic1Ptr                =      this->GetIC1Output();
+  OutputImagePointerType ic2Ptr                =      this->GetIC2Output();
 
   // Build output iterators
   itk::ImageRegionIteratorWithIndex<OutputImageType> varianceIt(variancePtr, outputRegionForThread);
   itk::ImageRegionIterator<OutputImageType>          meanIt(meanPtr, outputRegionForThread);
+  itk::ImageRegionIterator<OutputImageType>          dissimilarityIt(dissimilarityPtr, outputRegionForThread);
   itk::ImageRegionIterator<OutputImageType>          sumAverageIt(sumAveragePtr, outputRegionForThread);
   itk::ImageRegionIterator<OutputImageType>          sumVarianceIt(sumVariancePtr, outputRegionForThread);
   itk::ImageRegionIterator<OutputImageType>          sumEntropytIt(sumEntropytPtr, outputRegionForThread);
@@ -261,6 +298,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
   // Go to begin
   varianceIt.GoToBegin();
   meanIt.GoToBegin();
+  dissimilarityIt.GoToBegin();
   sumAverageIt.GoToBegin();
   sumVarianceIt.GoToBegin();
   sumEntropytIt.GoToBegin();
@@ -269,15 +307,9 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
   ic1It.GoToBegin();
   ic2It.GoToBegin();
 
-
-  // Build the co-occurence matrix generator
-  CoocurrenceMatrixGeneratorPointerType coOccurenceMatrixGenerator = CoocurrenceMatrixGeneratorType::New();
-  coOccurenceMatrixGenerator->SetOffset(m_Offset);
-  coOccurenceMatrixGenerator->SetNumberOfBinsPerAxis(m_NumberOfBinsPerAxis);
-  coOccurenceMatrixGenerator->SetPixelValueMinMax(m_InputImageMinimum, m_InputImageMaximum);
-
-  // Build the texture calculator
-  TextureCoefficientsCalculatorPointerType texturesCalculator = TextureCoefficientsCalculatorType::New();
+  const double log2 = vcl_log(2.0);
+  const unsigned int histSize = m_NumberOfBinsPerAxis;
+  const long unsigned int twiceHistSize = 2 * m_NumberOfBinsPerAxis;
 
   // Set-up progress reporting
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
@@ -285,6 +317,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
   // Iterate on outputs to compute textures
   while (!varianceIt.IsAtEnd()
          && !meanIt.IsAtEnd()
+         && !dissimilarityIt.IsAtEnd()
          && !sumAverageIt.IsAtEnd()
          && !sumVarianceIt.IsAtEnd()
          && !sumEntropytIt.IsAtEnd()
@@ -294,20 +327,15 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
          && !ic2It.IsAtEnd())
     {
     // Compute the region on which co-occurence will be estimated
-    typename InputRegionType::IndexType inputIndex, inputIndexWithTwiceOffset;
-    typename InputRegionType::SizeType inputSize, inputSizeWithTwiceOffset;
+    typename InputRegionType::IndexType inputIndex;
+    typename InputRegionType::SizeType inputSize;
 
-    // First, apply offset
+    // First, create an window for neighborhood iterator based on m_Radius
+    // For example, if xradius and yradius is 2. window size is 5x5 (2 * radius + 1).
     for (unsigned int dim = 0; dim < InputImageType::ImageDimension; ++dim)
       {
-      inputIndex[dim] = std::min(
-                                static_cast<int>(varianceIt.GetIndex()[dim] - m_Radius[dim]),
-                                static_cast<int>(varianceIt.GetIndex()[dim] - m_Radius[dim] + m_Offset[dim])
-                                );
-      inputSize[dim] = 2 * m_Radius[dim] + 1 + std::abs(m_Offset[dim]);
-
-      inputIndexWithTwiceOffset[dim] = static_cast<int>(varianceIt.GetIndex()[dim] - m_Radius[dim] - std::abs(m_Offset[dim]));
-      inputSizeWithTwiceOffset[dim] = inputSize[dim] + std::abs(m_Offset[dim]);
+      inputIndex[dim] = varianceIt.GetIndex()[dim] - m_Radius[dim];
+      inputSize[dim] = 2 * m_Radius[dim] + 1;
       }
 
     // Build the input  region
@@ -316,56 +344,164 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
     inputRegion.SetSize(inputSize);
     inputRegion.Crop(inputPtr->GetRequestedRegion());
 
-    InputRegionType inputRegionWithTwiceOffset;
-    inputRegionWithTwiceOffset.SetIndex(inputIndexWithTwiceOffset);
-    inputRegionWithTwiceOffset.SetSize(inputSizeWithTwiceOffset);
-    inputRegionWithTwiceOffset.Crop(inputPtr->GetRequestedRegion());
-
-    /*********************************************************************************/
-    //Local copy of the input image around the processed pixel *outputIt
-    InputImagePointerType localInputImage = InputImageType::New();
-    localInputImage->SetRegions(inputRegionWithTwiceOffset);
-    localInputImage->Allocate();
-    typedef itk::ImageRegionIteratorWithIndex<InputImageType> ImageRegionIteratorType;
-    ImageRegionIteratorType itInputPtr(inputPtr, inputRegionWithTwiceOffset);
-    ImageRegionIteratorType itLocalInputImage(localInputImage, inputRegionWithTwiceOffset);
-    for (itInputPtr.GoToBegin(), itLocalInputImage.GoToBegin(); !itInputPtr.IsAtEnd(); ++itInputPtr, ++itLocalInputImage)
+    CooccurrenceIndexedListPointerType GLCIList = CooccurrenceIndexedListType::New();
+    GLCIList->Initialize(m_NumberOfBinsPerAxis, m_InputImageMinimum, m_InputImageMaximum);
+
+    typedef itk::ConstNeighborhoodIterator< InputImageType > NeighborhoodIteratorType;
+    NeighborhoodIteratorType neighborIt;
+    neighborIt = NeighborhoodIteratorType(m_NeighborhoodRadius, inputPtr, inputRegion);
+    for ( neighborIt.GoToBegin(); !neighborIt.IsAtEnd(); ++neighborIt )
+    {
+    const InputPixelType centerPixelIntensity = neighborIt.GetCenterPixel();
+    bool pixelInBounds;
+    const InputPixelType pixelIntensity =  neighborIt.GetPixel(m_Offset, pixelInBounds);
+    if ( !pixelInBounds )
+      {
+      continue; // don't put a pixel in the co-occurrence list if the value is
+               // out of bounds
+      }
+    GLCIList->AddPixelPair(centerPixelIntensity, pixelIntensity);
+    }
+
+    PixelValueType m_Mean                    = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType m_Variance                = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType m_Dissimilarity           = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType m_SumAverage              = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType m_SumEntropy              = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType m_SumVariance             = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType m_DifferenceEntropy       = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType m_DifferenceVariance      = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType m_IC1                     = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType m_IC2                     = itk::NumericTraits< PixelValueType >::Zero;
+
+    double Entropy = 0;
+
+    typedef itk::Array<double> DoubleArrayType;
+    DoubleArrayType hx(histSize);
+    DoubleArrayType hy(histSize);
+    DoubleArrayType pdxy(twiceHistSize);
+
+    for(long unsigned int i = 0; i < histSize; i++)
+      {
+      hx[i] = 0.0;
+      hy[i] = 0.0;
+      pdxy[i] = 0.0;
+      }
+    for(long unsigned int i = histSize; i < twiceHistSize; i++)
+      {
+      pdxy[i] = 0.0;
+      }
+
+    /*   hx.Fill(0.0);    hy.Fill(0.0);    pdxy.Fill(0.0);   */
+    double hxy1 = 0;
+
+    //get co-occurrence vector and totalfrequency
+    VectorType glcVector = GLCIList->GetVector();
+    double totalFrequency = static_cast<double> (GLCIList->GetTotalFrequency());
+
+    VectorConstIteratorType constVectorIt;
+    //Normalize the GreyLevelCooccurrenceListType
+    //Compute Mean, Entropy (f12), hx, hy, pdxy
+    constVectorIt = glcVector.begin();
+    while( constVectorIt != glcVector.end())
+      {
+      CooccurrenceIndexType index = (*constVectorIt).first;
+      double frequency = (*constVectorIt).second / totalFrequency;
+      m_Mean += static_cast<double>(index[0]) * frequency;
+      Entropy -= (frequency > 0.0001) ? frequency * vcl_log(frequency) / log2 : 0.;
+      unsigned int i = index[1];
+      unsigned int j = index[0];
+      hx[j] += frequency;
+      hy[i] += frequency;
+
+      if( i+j > histSize-1)
+        {
+        pdxy[i+j] += frequency;
+        }
+      if( i <= j )
+        {
+        pdxy[j-i] += frequency;
+        }
+      ++constVectorIt;
+      }
+
+    //second pass over normalized co-occurrence list to find variance and pipj.
+    //pipj is needed to calculate f11
+    constVectorIt = glcVector.begin();
+    while( constVectorIt != glcVector.end())
+      {
+      double frequency = (*constVectorIt).second / totalFrequency;
+      CooccurrenceIndexType index = (*constVectorIt).first;
+      unsigned int i = index[1];
+      unsigned int j = index[0];
+      double index0 = static_cast<double>(index[0]);
+      m_Variance += ((index0 - m_Mean) * (index0 - m_Mean)) * frequency;
+      double pipj = hx[j] * hy[i];
+      hxy1 -= (pipj > 0.0001) ? frequency * vcl_log(pipj) : 0.;
+      ++constVectorIt;
+      }
+
+    //iterate histSize to compute sumEntropy
+    double PSSquareCumul = 0;
+    for(long unsigned int k = histSize; k < twiceHistSize; k++)
       {
-      itLocalInputImage.Set(itInputPtr.Get());
+      m_SumAverage += k * pdxy[k];
+      m_SumEntropy -= (pdxy[k] > 0.0001) ? pdxy[k] * vcl_log(pdxy[k]) / log2 : 0;
+      PSSquareCumul += k * k * pdxy[k];
       }
-    /*********************************************************************************/
+    m_SumVariance = PSSquareCumul - m_SumAverage * m_SumAverage;
 
-    InputImagePointerType maskImage = InputImageType::New();
-    maskImage->SetRegions(inputRegionWithTwiceOffset);
-    maskImage->Allocate();
-    maskImage->FillBuffer(0);
+    double PDSquareCumul = 0;
+    double PDCumul = 0;
+    double hxCumul = 0;
+    double hyCumul = 0;
 
-    ImageRegionIteratorType itMask(maskImage, inputRegion);
-    for (itMask.GoToBegin(); !itMask.IsAtEnd(); ++itMask)
+    for (long unsigned int i = 0; i < histSize; ++i)
       {
-      itMask.Set(1);
+      double pdTmp = pdxy[i];
+      PDCumul += i * pdTmp;
+      m_DifferenceEntropy -= (pdTmp > 0.0001) ? pdTmp * vcl_log(pdTmp) / log2 : 0;
+      PDSquareCumul += i * i * pdTmp;
+
+      //comput hxCumul and hyCumul
+      double marginalfreq = hx[i];
+      hxCumul += (marginalfreq > 0.0001) ? vcl_log (marginalfreq) * marginalfreq : 0;
+
+      marginalfreq = hy[i];
+      hyCumul += (marginalfreq > 0.0001) ? vcl_log (marginalfreq) * marginalfreq : 0;
       }
+    m_DifferenceVariance = PDSquareCumul - PDCumul * PDCumul;
 
-    // Compute the co-occurence matrix
-    coOccurenceMatrixGenerator->SetInput(localInputImage);
-    coOccurenceMatrixGenerator->SetMaskImage(maskImage);
-    coOccurenceMatrixGenerator->SetInsidePixelValue(1);
-    coOccurenceMatrixGenerator->Update();
+    /* pipj computed below is totally different from earlier one which was used
+     * to compute hxy1. */
+    double hxy2 = 0;
+    for(unsigned int i = 0; i < histSize; ++i)
+      {
+      for(unsigned int j = 0; j < histSize; ++j)
+        {
+        double pipj = hx[j] * hy[i];
+        hxy2 -= (pipj > 0.0001) ? pipj * vcl_log(pipj) : 0.;
+        double frequency = GLCIList->GetFrequency(i,j, glcVector) / totalFrequency;
+        m_Dissimilarity+= ( static_cast<double>(j) - static_cast<double>(i) ) * (frequency * frequency);
+        }
+      }
 
-    // Compute textures indices
-    texturesCalculator->SetHistogram(const_cast<HistogramType*>(coOccurenceMatrixGenerator->GetOutput())); //FIXME const correctness
-    texturesCalculator->Compute();
+    //Information measures of correlation 1 & 2
+    m_IC1 = (vcl_abs(std::max (hxCumul, hyCumul)) > 0.0001) ? (Entropy - hxy1) / (std::max (hxCumul, hyCumul)) : 0;
+    m_IC2 = 1 - vcl_exp (-2. * vcl_abs (hxy2 - Entropy));
+    m_IC2 = (m_IC2 >= 0) ? vcl_sqrt (m_IC2) : 0;
 
     // Fill outputs
-    varianceIt.Set(texturesCalculator->GetVariance());
-    meanIt.Set(texturesCalculator->GetMean());
-    sumAverageIt.Set(texturesCalculator->GetSumAverage());
-    sumVarianceIt.Set(texturesCalculator->GetSumVariance());
-    sumEntropytIt.Set(texturesCalculator->GetSumEntropy());
-    differenceEntropyIt.Set(texturesCalculator->GetDifferenceEntropy());
-    differenceVarianceIt.Set(texturesCalculator->GetDifferenceVariance());
-    ic1It.Set(texturesCalculator->GetIC1());
-    ic2It.Set(texturesCalculator->GetIC2());
+    meanIt.Set(m_Mean);
+    varianceIt.Set(m_Variance);
+    dissimilarityIt.Set(m_Dissimilarity);
+    sumAverageIt.Set(m_SumAverage);
+    sumVarianceIt.Set(m_SumVariance);
+    sumEntropytIt.Set(m_SumEntropy);
+    differenceEntropyIt.Set(m_DifferenceEntropy);
+    differenceVarianceIt.Set(m_DifferenceVariance);
+    ic1It.Set(m_IC1);
+    ic2It.Set(m_IC2);
 
     // Update progress
     progress.CompletedPixel();
@@ -373,6 +509,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage>
     // Increment iterators
     ++varianceIt;
     ++meanIt;
+    ++dissimilarityIt;
     ++sumAverageIt;
     ++sumVarianceIt;
     ++sumEntropytIt;
diff --git a/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.h b/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.h
index 01f2f78..b179674 100644
--- a/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.h
+++ b/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.h
@@ -18,8 +18,8 @@
 #ifndef __otbScalarImageToPanTexTextureFilter_h
 #define __otbScalarImageToPanTexTextureFilter_h
 
+#include "otbGreyLevelCooccurrenceIndexedList.h"
 #include "itkImageToImageFilter.h"
-#include "itkScalarImageToCooccurrenceMatrixFilter.h"
 
 namespace otb
 {
@@ -37,9 +37,7 @@ namespace otb
  * Vol1, NO3.
  *
  *
- * \sa ScalarImageToGreyLevelCooccurrenceMatrixGenerator
- * \sa GreyLevelCooccurrenceMatrixTextureCoefficientsCalculator
- * \sa ScalarImageTextureCalculator
+ * \sa otb::GreyLevelCooccurrenceIndexedList
  *
  */
 
@@ -66,19 +64,23 @@ public:
   typedef typename InputImageType::PixelType   InputPixelType;
   typedef typename InputImageType::RegionType  InputRegionType;
   typedef typename InputRegionType::SizeType   SizeType;
+  typedef typename InputImageType::OffsetType   OffsetType;
+  typedef typename std::vector< OffsetType>  OffsetListType;
   typedef TOutputImage                         OutputImageType;
   typedef typename OutputImageType::Pointer    OutputImagePointerType;
   typedef typename OutputImageType::RegionType OutputRegionType;
 
-  /** Co-occurence matrix and textures calculator */
-  typedef itk::Statistics::ScalarImageToCooccurrenceMatrixFilter<InputImageType> CoocurrenceMatrixGeneratorType;
-  typedef typename CoocurrenceMatrixGeneratorType::Pointer       CoocurrenceMatrixGeneratorPointerType;
-  typedef typename CoocurrenceMatrixGeneratorType::OffsetType    OffsetType;
-  typedef typename std::vector<OffsetType>                       OffsetListType;
-  typedef typename CoocurrenceMatrixGeneratorType::HistogramType HistogramType;
-  typedef typename HistogramType::AbsoluteFrequencyType                  FrequencyType; //FIXME stat framework
-  typedef typename HistogramType::MeasurementType                MeasurementType;
-  typedef typename HistogramType::Iterator                       HistogramIterator;
+  typedef GreyLevelCooccurrenceIndexedList< InputPixelType >   CooccurrenceIndexedListType;
+  typedef typename CooccurrenceIndexedListType::Pointer       CooccurrenceIndexedListPointerType;
+  typedef typename CooccurrenceIndexedListType::ConstPointer  CooccurrenceIndexedListConstPointerType;
+  typedef typename CooccurrenceIndexedListType::IndexType              CooccurrenceIndexType;
+  typedef typename CooccurrenceIndexedListType::PixelValueType         PixelValueType;
+  typedef typename CooccurrenceIndexedListType::RelativeFrequencyType  RelativeFrequencyType;
+  typedef typename CooccurrenceIndexedListType::VectorType             VectorType;
+
+  typedef typename VectorType::iterator                    VectorIteratorType;
+  typedef typename VectorType::const_iterator              VectorConstIteratorType;
+
 
   /** Set the radius of the window on which textures will be computed */
   itkSetMacro(Radius, SizeType);
@@ -134,6 +136,7 @@ private:
 
   /** Input image maximum */
   InputPixelType m_InputImageMaximum;
+
 };
 } // End namespace otb
 
diff --git a/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.txx b/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.txx
index da5e685..4647a2c 100644
--- a/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.txx
+++ b/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.txx
@@ -20,17 +20,19 @@
 
 #include "otbScalarImageToPanTexTextureFilter.h"
 #include "itkImageRegionIteratorWithIndex.h"
+#include "itkConstNeighborhoodIterator.h"
 #include "itkImageRegionIterator.h"
 #include "itkProgressReporter.h"
+#include "itkNumericTraits.h"
 
 namespace otb
 {
 template <class TInputImage, class TOutputImage>
 ScalarImageToPanTexTextureFilter<TInputImage, TOutputImage>
 ::ScalarImageToPanTexTextureFilter() : m_Radius(),
-  m_NumberOfBinsPerAxis(8),
-  m_InputImageMinimum(0),
-  m_InputImageMaximum(256)
+ m_NumberOfBinsPerAxis(8),
+ m_InputImageMinimum(0),
+ m_InputImageMaximum(255)
 {
   // There are 1 output corresponding to the Pan Tex texture indice
   this->SetNumberOfRequiredOutputs(1);
@@ -144,86 +146,68 @@ ScalarImageToPanTexTextureFilter<TInputImage, TOutputImage>
       OffsetType currentOffset = *offIt;
 
       // Compute the region on which co-occurence will be estimated
-      typename InputRegionType::IndexType inputIndex, inputIndexWithTwiceOffset;
-      typename InputRegionType::SizeType inputSize, inputSizeWithTwiceOffset;
+      typename InputRegionType::IndexType inputIndex;
+      typename InputRegionType::SizeType inputSize;
 
-      // First, apply offset
+      // First, create an window for neighborhood iterator based on m_Radius
+      // For example, if xradius and yradius is 2. window size is 5x5 (2 *
+      // radius + 1).
       for (unsigned int dim = 0; dim < InputImageType::ImageDimension; ++dim)
         {
-        inputIndex[dim] = std::min(
-                                  static_cast<int>(outputIt.GetIndex()[dim] - m_Radius[dim]),
-                                  static_cast<int>(outputIt.GetIndex()[dim] - m_Radius[dim] + currentOffset[dim])
-                                  );
-        inputSize[dim] = 2 * m_Radius[dim] + 1 + std::abs(currentOffset[dim]);
-
-        inputIndexWithTwiceOffset[dim] = static_cast<int>(outputIt.GetIndex()[dim] - m_Radius[dim] - std::abs(currentOffset[dim]));
-        inputSizeWithTwiceOffset[dim] = inputSize[dim] + std::abs(currentOffset[dim]);
+        inputIndex[dim] = outputIt.GetIndex()[dim] - m_Radius[dim];
+        inputSize[dim] = 2 * m_Radius[dim] + 1;
         }
-
       // Build the input  region
       InputRegionType inputRegion;
       inputRegion.SetIndex(inputIndex);
       inputRegion.SetSize(inputSize);
       inputRegion.Crop(inputPtr->GetRequestedRegion());
 
-      InputRegionType inputRegionWithTwiceOffset;
-      inputRegionWithTwiceOffset.SetIndex(inputIndexWithTwiceOffset);
-      inputRegionWithTwiceOffset.SetSize(inputSizeWithTwiceOffset);
-      inputRegionWithTwiceOffset.Crop(inputPtr->GetRequestedRegion());
-
-      /*********************************************************************************/
-      //Local copy of the input image around the processed pixel *outputIt
-      InputImagePointerType localInputImage = InputImageType::New();
-      localInputImage->SetRegions(inputRegionWithTwiceOffset);
-      localInputImage->Allocate();
-      typedef itk::ImageRegionIteratorWithIndex<InputImageType> ImageRegionIteratorType;
-      ImageRegionIteratorType itInputPtr(inputPtr, inputRegionWithTwiceOffset);
-      ImageRegionIteratorType itLocalInputImage(localInputImage, inputRegionWithTwiceOffset);
-      for (itInputPtr.GoToBegin(), itLocalInputImage.GoToBegin(); !itInputPtr.IsAtEnd(); ++itInputPtr, ++itLocalInputImage)
+
+      SizeType neighborhoodRadius;
+      /** calulate minimum offset and set it as neigborhood radius **/
+      unsigned int minRadius = 0;
+      for ( unsigned int i = 0; i < currentOffset.GetOffsetDimension(); i++ )
         {
-        itLocalInputImage.Set(itInputPtr.Get());
+        unsigned int distance = vcl_abs(currentOffset[i]);
+        if ( distance > minRadius )
+          {
+          minRadius = distance;
+          }
         }
-      /*********************************************************************************/
+      neighborhoodRadius.Fill(minRadius);
 
-      InputImagePointerType maskImage = InputImageType::New();
-      maskImage->SetRegions(inputRegionWithTwiceOffset);
-      maskImage->Allocate();
-      maskImage->FillBuffer(0);
+      CooccurrenceIndexedListPointerType GLCIList = CooccurrenceIndexedListType::New();
+      GLCIList->Initialize(m_NumberOfBinsPerAxis, m_InputImageMinimum, m_InputImageMaximum);
 
-      ImageRegionIteratorType itMask(maskImage, inputRegion);
-      for (itMask.GoToBegin(); !itMask.IsAtEnd(); ++itMask)
+      typedef itk::ConstNeighborhoodIterator< InputImageType > NeighborhoodIteratorType;
+      NeighborhoodIteratorType neighborIt;
+      neighborIt = NeighborhoodIteratorType(neighborhoodRadius, inputPtr, inputRegion);
+      for ( neighborIt.GoToBegin(); !neighborIt.IsAtEnd(); ++neighborIt )
         {
-        itMask.Set(1);
+        const InputPixelType centerPixelIntensity = neighborIt.GetCenterPixel();
+        bool pixelInBounds;
+        const InputPixelType pixelIntensity =  neighborIt.GetPixel(currentOffset, pixelInBounds);
+        if ( !pixelInBounds )
+          {
+          continue; // don't put a pixel in the histogram if it's out-of-bounds.
+          }
+        GLCIList->AddPixelPair(centerPixelIntensity, pixelIntensity);
         }
 
+      VectorConstIteratorType constVectorIt;
+      VectorType glcVector = GLCIList->GetVector();
+      double totalFrequency = static_cast<double> (GLCIList->GetTotalFrequency());
 
-      // Build the co-occurence matrix generator
-      CoocurrenceMatrixGeneratorPointerType coOccurenceMatrixGenerator = CoocurrenceMatrixGeneratorType::New();
-      coOccurenceMatrixGenerator->SetInput(localInputImage);
-      coOccurenceMatrixGenerator->SetOffset(currentOffset);
-      coOccurenceMatrixGenerator->SetNumberOfBinsPerAxis(m_NumberOfBinsPerAxis);
-      coOccurenceMatrixGenerator->SetPixelValueMinMax(m_InputImageMinimum, m_InputImageMaximum);
-
-      // Compute the co-occurence matrix
-      coOccurenceMatrixGenerator->SetMaskImage(maskImage);
-      coOccurenceMatrixGenerator->SetInsidePixelValue(1);
-      coOccurenceMatrixGenerator->Update();
-
-      typename HistogramType::ConstPointer histo = coOccurenceMatrixGenerator->GetOutput();
-
+      //Compute inertia aka contrast
       double inertia = 0;
-      typename HistogramType::TotalAbsoluteFrequencyType  totalFrequency = histo->GetTotalFrequency();
-      typename HistogramType::ConstIterator itr = histo->Begin();
-      typename HistogramType::ConstIterator end = histo->End();
-      for(; itr != end; ++itr )
+      constVectorIt = glcVector.begin();
+      while( constVectorIt != glcVector.end())
         {
-        MeasurementType frequency = itr.GetFrequency();
-        if (frequency == 0)
-          {
-          continue; // no use doing these calculations if we're just multiplying by zero.
-          }
-        typename HistogramType::IndexType index = histo->GetIndex(itr.GetInstanceIdentifier());
-        inertia += (index[0] - index[1]) * (index[0] - index[1]) * frequency / totalFrequency;
+        CooccurrenceIndexType index = (*constVectorIt).first;
+        RelativeFrequencyType frequency = (*constVectorIt).second / totalFrequency;
+        inertia += ( index[0] - index[1] ) * ( index[0] - index[1] ) * frequency;
+        ++constVectorIt;
         }
 
       if (inertia < out)
diff --git a/Code/FeatureExtraction/otbScalarImageToTexturesFilter.h b/Code/FeatureExtraction/otbScalarImageToTexturesFilter.h
index 37ca3cd..cf543ea 100644
--- a/Code/FeatureExtraction/otbScalarImageToTexturesFilter.h
+++ b/Code/FeatureExtraction/otbScalarImageToTexturesFilter.h
@@ -1,37 +1,46 @@
 /*=========================================================================
 
- Program:   ORFEO Toolbox
- Language:  C++
- Date:      $Date$
- Version:   $Revision$
+Program:   ORFEO Toolbox
+Language:  C++
+Date:      $Date$
+Version:   $Revision$
 
 
- Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
- See OTBCopyright.txt for details.
+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
- PURPOSE.  See the above copyright notices for more information.
+This software is distributed 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 __otbScalarImageToTexturesFilter_h
 #define __otbScalarImageToTexturesFilter_h
 
+#include "otbGreyLevelCooccurrenceIndexedList.h"
 #include "itkImageToImageFilter.h"
 
-#include "itkScalarImageToCooccurrenceMatrixFilter.h"
-#include "itkHistogramToTextureFeaturesFilter.h"
-
 namespace otb
 {
-/** \class ScalarImageToTexturesFilter
- *  \brief This class compute 8 local Haralick textures features.
+/**
+ * \class ScalarImageToTexturesFilter
+ * \brief This class compute 8 local Haralick textures features. The 8 output
+ * image channels are: Energy, Entropy, Correlation, Inverse Difference Moment,
+ * Inertia, Cluster Shade, Cluster Prominence and Haralick Correlation. They
+ * are provided in this exact order in the output image. Thus, this application
+ * computes the following Haralick textures over a neighborhood with user
+ * defined radius.
  *
- *  This filter computes the following Haralick textures over a sliding windows with
- *  user defined radius:
- *  (where \f$ g(i, j) \f$ is the element in
- * cell i, j of a normalized GLCM):
+ * To improve the speed of computation, a variant of Grey Level Co-occurrence
+ * Matrix(GLCM) called Grey Level Co-occurrence Indexed List (GLCIL) is
+ * used. Given below is the mathematical explanation on the computation of each
+ * textures. Here $ g(i, j) $ is the frequency of element in the GLCIL whose
+ * index is i, j. GLCIL stores a pair of frequency of two pixels from the given
+ * offset and the cell index (i, j) of the pixel in the neighborhood
+ * window. :(where each element in GLCIL is a pair of pixel index and it's
+ * frequency, $ g(i, j) $ is the frequency value of the pair having index is i, j).
  *
  * "Energy" \f$ = f_1 = \sum_{i, j}g(i, j)^2 \f$
  *
@@ -57,11 +66,30 @@ namespace otb
  * \f$ \sigma =  \f$ (weighted pixel variance) \f$ = \sum_{i, j}(i - \mu)^2 \cdot g(i, j) =
  * \sum_{i, j}(j - \mu)^2 \cdot g(i, j)  \f$  (due to matrix summetry)
  *
+
+ * Print references:
+ *
+ * Haralick, R.M., K. Shanmugam and I. Dinstein. 1973.  Textural Features for
+ * Image Classification. IEEE Transactions on Systems, Man and Cybernetics.
+ * SMC-3(6):610-620.
+ *
+ * David A. Clausi and Yongping Zhao. 2002. Rapid extraction of image texture by
+ * co-occurrence using a hybrid data structure. Comput. Geosci. 28, 6 (July
+ * 2002), 763-774. DOI=10.1016/S0098-3004(01)00108-X
+ * http://dx.doi.org/10.1016/S0098-3004(01)00108-X
+ *
+ * de O.Bastos, L.; Liatsis, P.; Conci, A., Automatic texture segmentation based
+ * on k-means clustering and efficient calculation of co-occurrence
+ * features. Systems, Signals and Image Processing, 2008. IWSSIP 2008. 15th
+ * International Conference on , vol., no., pp.141,144, 25-28 June 2008
+ * doi: 10.1109/IWSSIP.2008.4604387
+ *
  * Neighborhood size can be set using the SetRadius() method. Offset for co-occurence estimation
  * is set using the SetOffset() method.
  *
- * \sa otb::MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator
- * \sa itk::GreyLevelCooccurrenceMatrixTextureCoefficientsCalculator
+ * \sa otb::GreyLevelCooccurrenceIndexedList
+ * \sa otb::ScalarImageToAdvancedTexturesFiler
+ * \sa otb::ScalarImageToHigherOrderTexturesFilter
  *
  * \ingroup Streamed
  * \ingroup Threaded
@@ -90,18 +118,22 @@ public:
   typedef typename InputImageType::PixelType   InputPixelType;
   typedef typename InputImageType::RegionType  InputRegionType;
   typedef typename InputRegionType::SizeType   SizeType;
+  typedef typename InputImageType::OffsetType   OffsetType;
+
   typedef TOutputImage                         OutputImageType;
   typedef typename OutputImageType::Pointer    OutputImagePointerType;
   typedef typename OutputImageType::RegionType OutputRegionType;
 
-  /** Co-occurence matrix and textures calculator */
-  typedef itk::Statistics::ScalarImageToCooccurrenceMatrixFilter<InputImageType> CoocurrenceMatrixGeneratorType;
-  typedef typename CoocurrenceMatrixGeneratorType::Pointer       CoocurrenceMatrixGeneratorPointerType;
-  typedef typename CoocurrenceMatrixGeneratorType::OffsetType    OffsetType;
-  typedef typename CoocurrenceMatrixGeneratorType::HistogramType HistogramType;
-  typedef itk::Statistics::HistogramToTextureFeaturesFilter
-  <HistogramType>                                                TextureCoefficientsCalculatorType;
-  typedef typename TextureCoefficientsCalculatorType::Pointer TextureCoefficientsCalculatorPointerType;
+  typedef GreyLevelCooccurrenceIndexedList< InputPixelType >   CooccurrenceIndexedListType;
+  typedef typename CooccurrenceIndexedListType::Pointer       CooccurrenceIndexedListPointerType;
+  typedef typename CooccurrenceIndexedListType::ConstPointer  CooccurrenceIndexedListConstPointerType;
+  typedef typename CooccurrenceIndexedListType::IndexType              CooccurrenceIndexType;
+  typedef typename CooccurrenceIndexedListType::PixelValueType         PixelValueType;
+  typedef typename CooccurrenceIndexedListType::RelativeFrequencyType  RelativeFrequencyType;
+  typedef typename CooccurrenceIndexedListType::VectorType             VectorType;
+
+  typedef typename VectorType::iterator                    VectorIteratorType;
+  typedef typename VectorType::const_iterator              VectorConstIteratorType;
 
   /** Set the radius of the window on which textures will be computed */
   itkSetMacro(Radius, SizeType);
@@ -114,10 +146,10 @@ public:
   /** Get the offset for co-occurence computation */
   itkGetMacro(Offset, OffsetType);
 
-  /** Set the number of bin per axis for histogram generation */
+  /** Set the number of bin per axis */
   itkSetMacro(NumberOfBinsPerAxis, unsigned int);
 
-  /** Get the number of bin per axis for histogram generation */
+  /** Get the number of bin per axis */
   itkGetMacro(NumberOfBinsPerAxis, unsigned int);
 
   /** Set the input image minimum */
@@ -163,6 +195,8 @@ protected:
   ~ScalarImageToTexturesFilter();
   /** Generate the input requested region */
   virtual void GenerateInputRequestedRegion();
+  /** Before Parallel textures extraction */
+  virtual void BeforeThreadedGenerateData();
   /** Parallel textures extraction */
   virtual void ThreadedGenerateData(const OutputRegionType& outputRegion, itk::ThreadIdType threadId);
 
@@ -179,7 +213,10 @@ private:
   /** Offset for co-occurence */
   OffsetType m_Offset;
 
-  /** Number of bins per axis for histogram generation */
+  /** Radius of the neighborhood iterator which is minumum of m_Radius */
+  SizeType m_NeighborhoodRadius;
+
+  /** Number of bins per axis */
   unsigned int m_NumberOfBinsPerAxis;
 
   /** Input image minimum */
@@ -187,6 +224,10 @@ private:
 
   /** Input image maximum */
   InputPixelType m_InputImageMaximum;
+
+  //TODO: should we use constexpr? only c++11 and problem for msvc
+  inline double GetPixelValueTolerance() const {return 0.0001; }
+
 };
 } // End namespace otb
 
diff --git a/Code/FeatureExtraction/otbScalarImageToTexturesFilter.txx b/Code/FeatureExtraction/otbScalarImageToTexturesFilter.txx
index 18d768e..e8587d9 100644
--- a/Code/FeatureExtraction/otbScalarImageToTexturesFilter.txx
+++ b/Code/FeatureExtraction/otbScalarImageToTexturesFilter.txx
@@ -1,37 +1,44 @@
 /*=========================================================================
 
-  Program:   ORFEO Toolbox
-  Language:  C++
-  Date:      $Date$
-  Version:   $Revision$
+Program:   ORFEO Toolbox
+Language:  C++
+Date:      $Date$
+Version:   $Revision$
 
 
-  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
-  See OTBCopyright.txt for details.
+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
-     PURPOSE.  See the above copyright notices for more information.
+This software is distributed 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 __otbScalarImageToTexturesFilter_txx
 #define __otbScalarImageToTexturesFilter_txx
 
 #include "otbScalarImageToTexturesFilter.h"
 #include "itkImageRegionIteratorWithIndex.h"
+#include "itkConstNeighborhoodIterator.h"
 #include "itkImageRegionIterator.h"
 #include "itkProgressReporter.h"
+#include "itkNumericTraits.h"
+#include <vector>
+#include <cmath>
 
 namespace otb
 {
 template <class TInputImage, class TOutputImage>
 ScalarImageToTexturesFilter<TInputImage, TOutputImage>
-::ScalarImageToTexturesFilter() : m_Radius(),
-  m_Offset(),
-  m_NumberOfBinsPerAxis(8),
-  m_InputImageMinimum(0),
-  m_InputImageMaximum(256)
+::ScalarImageToTexturesFilter()
+: m_Radius()
+, m_Offset()
+, m_NeighborhoodRadius()
+, m_NumberOfBinsPerAxis(8)
+, m_InputImageMinimum(0)
+, m_InputImageMaximum(255)
 {
   // There are 8 outputs corresponding to the 8 textures indices
   this->SetNumberOfRequiredOutputs(8);
@@ -219,6 +226,23 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage>
 template <class TInputImage, class TOutputImage>
 void
 ScalarImageToTexturesFilter<TInputImage, TOutputImage>
+::BeforeThreadedGenerateData()
+{
+  unsigned int minRadius = 0;
+  for ( unsigned int i = 0; i < m_Offset.GetOffsetDimension(); i++ )
+    {
+    unsigned int distance = vcl_abs(m_Offset[i]);
+    if ( distance > minRadius )
+      {
+      minRadius = distance;
+      }
+    }
+  m_NeighborhoodRadius.Fill(minRadius);
+}
+
+template <class TInputImage, class TOutputImage>
+void
+ScalarImageToTexturesFilter<TInputImage, TOutputImage>
 ::ThreadedGenerateData(const OutputRegionType& outputRegionForThread, itk::ThreadIdType threadId)
 {
   // Retrieve the input and output pointers
@@ -252,15 +276,7 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage>
   clusterProminenceIt.GoToBegin();
   haralickCorIt.GoToBegin();
 
-
-  // Build the co-occurence matrix generator
-  CoocurrenceMatrixGeneratorPointerType coOccurenceMatrixGenerator = CoocurrenceMatrixGeneratorType::New();
-  coOccurenceMatrixGenerator->SetOffset(m_Offset);
-  coOccurenceMatrixGenerator->SetNumberOfBinsPerAxis(m_NumberOfBinsPerAxis);
-  coOccurenceMatrixGenerator->SetPixelValueMinMax(m_InputImageMinimum, m_InputImageMaximum);
-
-  // Build the texture calculator
-  TextureCoefficientsCalculatorPointerType texturesCalculator = TextureCoefficientsCalculatorType::New();
+  const double log2 = vcl_log(2.0);
 
   // Set-up progress reporting
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
@@ -276,20 +292,15 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage>
          && !haralickCorIt.IsAtEnd())
     {
     // Compute the region on which co-occurence will be estimated
-    typename InputRegionType::IndexType inputIndex, inputIndexWithTwiceOffset;
-    typename InputRegionType::SizeType inputSize, inputSizeWithTwiceOffset;
+    typename InputRegionType::IndexType inputIndex;
+    typename InputRegionType::SizeType inputSize;
 
-    // First, apply offset
+    // First, create an window for neighborhood iterator based on m_Radius
+    // For example, if xradius and yradius is 2. window size is 5x5 (2 * radius + 1).
     for (unsigned int dim = 0; dim < InputImageType::ImageDimension; ++dim)
       {
-      inputIndex[dim] = std::min(
-                                static_cast<int>(energyIt.GetIndex()[dim] - m_Radius[dim]),
-                                static_cast<int>(energyIt.GetIndex()[dim] - m_Radius[dim] + m_Offset[dim])
-                                );
-      inputSize[dim] = 2 * m_Radius[dim] + 1 + std::abs(m_Offset[dim]);
-
-      inputIndexWithTwiceOffset[dim] = static_cast<int>(energyIt.GetIndex()[dim] - m_Radius[dim] - std::abs(m_Offset[dim]));
-      inputSizeWithTwiceOffset[dim] = inputSize[dim] + std::abs(m_Offset[dim]);
+      inputIndex[dim] = energyIt.GetIndex()[dim] - m_Radius[dim];
+      inputSize[dim] = 2 * m_Radius[dim] + 1;
       }
 
     // Build the input  region
@@ -298,55 +309,132 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage>
     inputRegion.SetSize(inputSize);
     inputRegion.Crop(inputPtr->GetRequestedRegion());
 
-    InputRegionType inputRegionWithTwiceOffset;
-    inputRegionWithTwiceOffset.SetIndex(inputIndexWithTwiceOffset);
-    inputRegionWithTwiceOffset.SetSize(inputSizeWithTwiceOffset);
-    inputRegionWithTwiceOffset.Crop(inputPtr->GetRequestedRegion());
-
-    /*********************************************************************************/
-    //Local copy of the input image around the processed pixel *outputIt
-    InputImagePointerType localInputImage = InputImageType::New();
-    localInputImage->SetRegions(inputRegionWithTwiceOffset);
-    localInputImage->Allocate();
-    typedef itk::ImageRegionIteratorWithIndex<InputImageType> ImageRegionIteratorType;
-    ImageRegionIteratorType itInputPtr(inputPtr, inputRegionWithTwiceOffset);
-    ImageRegionIteratorType itLocalInputImage(localInputImage, inputRegionWithTwiceOffset);
-    for (itInputPtr.GoToBegin(), itLocalInputImage.GoToBegin(); !itInputPtr.IsAtEnd(); ++itInputPtr, ++itLocalInputImage)
+    CooccurrenceIndexedListPointerType GLCIList = CooccurrenceIndexedListType::New();
+    GLCIList->Initialize(m_NumberOfBinsPerAxis, m_InputImageMinimum, m_InputImageMaximum);
+
+    typedef itk::ConstNeighborhoodIterator< InputImageType > NeighborhoodIteratorType;
+    NeighborhoodIteratorType neighborIt;
+    neighborIt = NeighborhoodIteratorType(m_NeighborhoodRadius, inputPtr, inputRegion);
+    for ( neighborIt.GoToBegin(); !neighborIt.IsAtEnd(); ++neighborIt )
       {
-      itLocalInputImage.Set(itInputPtr.Get());
+      const InputPixelType centerPixelIntensity = neighborIt.GetCenterPixel();
+      bool pixelInBounds;
+      const InputPixelType pixelIntensity =  neighborIt.GetPixel(m_Offset, pixelInBounds);
+      if ( !pixelInBounds )
+        {
+        continue; // don't put a pixel in the co-occurrence list if the value is
+                  // out of bounds
+        }
+      GLCIList->AddPixelPair(centerPixelIntensity, pixelIntensity);
       }
-    /*********************************************************************************/
 
-    InputImagePointerType maskImage = InputImageType::New();
-    maskImage->SetRegions(inputRegionWithTwiceOffset);
-    maskImage->Allocate();
-    maskImage->FillBuffer(0);
+    double pixelMean = 0.;
+    double marginalMean;
+    double marginalDevSquared = 0.;
+    double pixelVariance = 0.;
 
-    ImageRegionIteratorType itMask(maskImage, inputRegion);
-    for (itMask.GoToBegin(); !itMask.IsAtEnd(); ++itMask)
+    //Create and Intialize marginalSums
+    std::vector<double> marginalSums(m_NumberOfBinsPerAxis, 0);
+
+    //get co-occurrence vector and totalfrequency
+    VectorType glcVector = GLCIList->GetVector();
+    double totalFrequency = static_cast<double> (GLCIList->GetTotalFrequency());
+
+    //Normalize the co-occurrence indexed list and compute mean, marginalSum
+    typename VectorType::iterator it = glcVector.begin();
+    while( it != glcVector.end())
+      {
+      double frequency = (*it).second / totalFrequency;
+      CooccurrenceIndexType index = (*it).first;
+      pixelMean += index[0] * frequency;
+      marginalSums[index[0]] += frequency;
+      ++it;
+      }
+
+    /* Now get the mean and deviaton of the marginal sums.
+       Compute incremental mean and SD, a la Knuth, "The  Art of Computer
+       Programming, Volume 2: Seminumerical Algorithms",  section 4.2.2.
+       Compute mean and standard deviation using the recurrence relation:
+       M(1) = x(1), M(k) = M(k-1) + (x(k) - M(k-1) ) / k
+       S(1) = 0, S(k) = S(k-1) + (x(k) - M(k-1)) * (x(k) - M(k))
+       for 2 <= k <= n, then
+       sigma = vcl_sqrt(S(n) / n) (or divide by n-1 for sample SD instead of
+       population SD).
+     */
+    std::vector<double>::const_iterator msIt = marginalSums.begin();
+    marginalMean = *msIt;
+    //Increment iterator to start with index 1
+    ++msIt;
+    for(int k= 2; msIt != marginalSums.end(); ++k, ++msIt)
+      {
+      double M_k_minus_1 = marginalMean;
+      double S_k_minus_1 = marginalDevSquared;
+      double x_k = *msIt;
+      double M_k = M_k_minus_1 + ( x_k - M_k_minus_1 ) / k;
+      double S_k = S_k_minus_1 + ( x_k - M_k_minus_1 ) * ( x_k - M_k );
+      marginalMean = M_k;
+      marginalDevSquared = S_k;
+      }
+    marginalDevSquared = marginalDevSquared / m_NumberOfBinsPerAxis;
+
+    VectorConstIteratorType constVectorIt;
+    constVectorIt = glcVector.begin();
+    while( constVectorIt != glcVector.end())
+    {
+    RelativeFrequencyType frequency = (*constVectorIt).second / totalFrequency;
+    CooccurrenceIndexType        index = (*constVectorIt).first;
+    pixelVariance += ( index[0] - pixelMean ) * ( index[0] - pixelMean ) * frequency;
+    ++constVectorIt;
+    }
+
+    double pixelVarianceSquared = pixelVariance * pixelVariance;
+    // Variance is only used in correlation. If variance is 0, then (index[0] - pixelMean) * (index[1] - pixelMean)
+    // should be zero as well. In this case, set the variance to 1. in order to
+    // avoid NaN correlation.
+    if(pixelVarianceSquared < GetPixelValueTolerance())
       {
-      itMask.Set(1);
+      pixelVarianceSquared = 1.;
       }
 
-    // Compute the co-occurence matrix
-    coOccurenceMatrixGenerator->SetInput(localInputImage);
-    coOccurenceMatrixGenerator->SetMaskImage(maskImage);
-    coOccurenceMatrixGenerator->SetInsidePixelValue(1);
-    coOccurenceMatrixGenerator->Update();
+    //Initalize texture variables;
+    PixelValueType energy      = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType entropy     = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType correlation = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType inverseDifferenceMoment      = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType inertia             = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType clusterShade        = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType clusterProminence   = itk::NumericTraits< PixelValueType >::Zero;
+    PixelValueType haralickCorrelation = itk::NumericTraits< PixelValueType >::Zero;
+
+    //Compute textures
+    constVectorIt = glcVector.begin();
+    while( constVectorIt != glcVector.end())
+      {
+      CooccurrenceIndexType index = (*constVectorIt).first;
+      RelativeFrequencyType frequency = (*constVectorIt).second / totalFrequency;
+      energy += frequency * frequency;
+      entropy -= ( frequency > GetPixelValueTolerance() ) ? frequency *vcl_log(frequency) / log2 : 0;
+      correlation += ( ( index[0] - pixelMean ) * ( index[1] - pixelMean ) * frequency ) / pixelVarianceSquared;
+      inverseDifferenceMoment += frequency / ( 1.0 + ( index[0] - index[1] ) * ( index[0] - index[1] ) );
+      inertia += ( index[0] - index[1] ) * ( index[0] - index[1] ) * frequency;
+      clusterShade += vcl_pow( ( index[0] - pixelMean ) + ( index[1] - pixelMean ), 3 ) * frequency;
+      clusterProminence += vcl_pow( ( index[0] - pixelMean ) + ( index[1] - pixelMean ), 4 ) * frequency;
+      haralickCorrelation += index[0] * index[1] * frequency;
+      ++constVectorIt;
+      }
 
-    // Compute textures indices
-    texturesCalculator->SetInput(coOccurenceMatrixGenerator->GetOutput());
-    texturesCalculator->Update();
+    haralickCorrelation = (fabs(marginalDevSquared) > 1E-8) ?
+      ( haralickCorrelation - marginalMean * marginalMean )  / marginalDevSquared : 0;
 
     // Fill outputs
-    energyIt.Set(texturesCalculator->GetEnergy());
-    entropyIt.Set(texturesCalculator->GetEntropy());
-    correlationIt.Set(texturesCalculator->GetCorrelation());
-    invDiffMomentIt.Set(texturesCalculator->GetInverseDifferenceMoment());
-    inertiaIt.Set(texturesCalculator->GetInertia());
-    clusterShadeIt.Set(texturesCalculator->GetClusterShade());
-    clusterProminenceIt.Set(texturesCalculator->GetClusterProminence());
-    haralickCorIt.Set(texturesCalculator->GetHaralickCorrelation());
+    energyIt.Set(energy);
+    entropyIt.Set(entropy);
+    correlationIt.Set(correlation);
+    invDiffMomentIt.Set(inverseDifferenceMoment);
+    inertiaIt.Set(inertia);
+    clusterShadeIt.Set(clusterShade);
+    clusterProminenceIt.Set(clusterProminence);
+    haralickCorIt.Set(haralickCorrelation);
 
     // Update progress
     progress.CompletedPixel();
@@ -361,7 +449,6 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage>
     ++clusterProminenceIt;
     ++haralickCorIt;
     }
-
 }
 
 } // End namespace otb
diff --git a/Code/Fusion/otbBayesianFusionFilter.h b/Code/Fusion/otbBayesianFusionFilter.h
index b1c1202..111bbb7 100644
--- a/Code/Fusion/otbBayesianFusionFilter.h
+++ b/Code/Fusion/otbBayesianFusionFilter.h
@@ -102,7 +102,7 @@ public:
     return m_Vcondopt;
   }
 
-  inline TOutput operator ()(const TInputMultiSpectral& ms,
+  inline TOutput operator ()(const TInputMultiSpectral& itkNotUsed(ms),
                              const TInputMultiSpectralInterp& msi,
                              const TInputPanchro& p)
   {
diff --git a/Code/Fuzzy/otbMassOfBelief.txx b/Code/Fuzzy/otbMassOfBelief.txx
index 741a3cb..6a453de 100644
--- a/Code/Fuzzy/otbMassOfBelief.txx
+++ b/Code/Fuzzy/otbMassOfBelief.txx
@@ -373,24 +373,24 @@ MassOfBelief<TLabel, TMass>
   Superclass::PrintSelf(os, indent);
 
   // Display mass of belief universe
-  os << indent << "Mass of belief universe: "
-     << PrintLabelSet(os, this->GetUniverse())
-     << std::endl;
+  os << indent << "Mass of belief universe: ";
+  PrintLabelSet(os, this->GetUniverse());
+  os << std::endl;
 
   // Display mass of belief support
-  os<<indent<<"Mass of belief support: "
-    <<PrintLabelSetOfSet(os, this->GetSupport())
-    <<std::endl;
+  os << indent << "Mass of belief support: ";
+  PrintLabelSetOfSet(os, this->GetSupport());
+  os << std::endl;
 
   // Display individual masses
   for(typename MassMapType::const_iterator it = m_MassesMap.begin();
       it!=m_MassesMap.end(); ++it)
     {
-    os<< indent
-      << PrintLabelSet(os, it->first)
-      << " has mass "<<(it->second)<<std::endl;
+    os<< indent;
+    PrintLabelSet(os, it->first);
+    os << " has mass " << (it->second) << std::endl;
     }
-  os<<indent<<"Other masses are null"<<std::endl;
+  os << indent << "Other masses are null" << std::endl;
 }
 
 template <class TLabel, class TMass>
@@ -428,7 +428,6 @@ MassOfBelief<TLabel, TMass>
                      const LabelSetOfSetType & labelSet)
 {
   // Define an iterator on the label set
-  typedef std::set<TLabel> LabelSetType;
   typename LabelSetOfSetType::const_iterator it = labelSet.begin();
 
   // Open the set
diff --git a/Code/Fuzzy/otbStandardDSCostFunction.txx b/Code/Fuzzy/otbStandardDSCostFunction.txx
index bc58a1f..f47c10d 100644
--- a/Code/Fuzzy/otbStandardDSCostFunction.txx
+++ b/Code/Fuzzy/otbStandardDSCostFunction.txx
@@ -148,7 +148,7 @@ typename StandardDSCostFunction<TDSValidationFilter>
 template <class TDSValidationFilter>
 void
 StandardDSCostFunction<TDSValidationFilter>
-::GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const
+::GetDerivative(const ParametersType & itkNotUsed(parameters), DerivativeType & itkNotUsed(derivative)) const
  {
   //Not necessary for Amoeba Optimizer
   itkExceptionMacro(<< "Not Supposed to be used when using Amoeba Optimizer!")
diff --git a/Code/Hyperspectral/otbMDMDNMFImageFilter.txx b/Code/Hyperspectral/otbMDMDNMFImageFilter.txx
index 054e898..32172e5 100644
--- a/Code/Hyperspectral/otbMDMDNMFImageFilter.txx
+++ b/Code/Hyperspectral/otbMDMDNMFImageFilter.txx
@@ -87,7 +87,7 @@ MDMDNMFImageFilter<TInputImage, TOutputImage>
 ::Criterion(const MatrixType & X,
             const MatrixType & A,
             const MatrixType & S,
-            const double &m_Delt,
+            const double &itkNotUsed(m_Delt),
             const double &m_LambdS,
             const double &m_LambdD)
 {
@@ -164,7 +164,7 @@ MDMDNMFImageFilter<TInputImage, TOutputImage>
 ::EvalGradS(const MatrixType &X,
             const MatrixType &A,
             const MatrixType &S,
-            const double &m_Delt,
+            const double &itkNotUsed(m_Delt),
             const double &m_LambdS,
             MatrixType & gradS)
 {
@@ -185,7 +185,7 @@ MDMDNMFImageFilter<TInputImage, TOutputImage>
 ::EvalGradA(const MatrixType &X,
             const MatrixType &A,
             const MatrixType &S,
-            const double &m_Delt,
+            const double &itkNotUsed(m_Delt),
             const double &m_LambdD,
             MatrixType &gradA)
 {
diff --git a/Code/IO/CMakeLists.txt b/Code/IO/CMakeLists.txt
index 2e8d48b..f6fdbde 100644
--- a/Code/IO/CMakeLists.txt
+++ b/Code/IO/CMakeLists.txt
@@ -15,7 +15,7 @@ endif()
 if(OTB_USE_JPEG2000)
 
   if(WIN32)
-    if(OTB_BUILD_SHARED_LIBS)
+    if(BUILD_SHARED_LIBS)
       add_definitions(-DOPJ_EXPORTS)
     else()
       add_definitions(-DOPJ_STATIC)
diff --git a/Code/IO/otbBSQImageIO.cxx b/Code/IO/otbBSQImageIO.cxx
index 97828ec..d4fcc39 100644
--- a/Code/IO/otbBSQImageIO.cxx
+++ b/Code/IO/otbBSQImageIO.cxx
@@ -50,9 +50,10 @@ BSQImageIO::BSQImageIO()
   // Set default spacing to one
   m_Spacing[0] = 1.0;
   m_Spacing[1] = 1.0;
-  // Set default origin to zero
-  m_Origin[0] = 0.0;
-  m_Origin[1] = 0.0;
+  // Set default origin to [0.5 , 0.5]
+  // (consistency between ImageIO, see Mantis #942)
+  m_Origin[0] = 0.5;
+  m_Origin[1] = 0.5;
   m_ChannelsFile = NULL;
   m_FlagWriteImageInformation = true;
 
diff --git a/Code/IO/otbDefaultConvertPixelTraits.h b/Code/IO/otbDefaultConvertPixelTraits.h
index 688e3c4..b8f1c48 100644
--- a/Code/IO/otbDefaultConvertPixelTraits.h
+++ b/Code/IO/otbDefaultConvertPixelTraits.h
@@ -55,7 +55,7 @@ public:
   /** Set the nth component of the pixel. */
   static void SetNthComponent(int c, PixelType& pixel, const ComponentType& v)
   { pixel.SetNthComponent(c, v); }
-  static void SetNthComponent(int c, PixelType & pixel, const PixelType& v)
+  static void SetNthComponent(int itkNotUsed(c), PixelType & pixel, const PixelType& v)
   { pixel = v; }
 
   /** Return a single scalar value from this pixel. */
diff --git a/Code/IO/otbExtendedFilenameToReaderOptions.cxx b/Code/IO/otbExtendedFilenameToReaderOptions.cxx
index 2a07e15..9b71a02 100644
--- a/Code/IO/otbExtendedFilenameToReaderOptions.cxx
+++ b/Code/IO/otbExtendedFilenameToReaderOptions.cxx
@@ -43,12 +43,16 @@ ExtendedFilenameToReaderOptions
 
   m_Options.skipGeom.first  = false;
   m_Options.skipGeom.second = false;
+  
+  m_Options.skipRpcTag.first  = false;
+  m_Options.skipRpcTag.second = false;
 
   m_Options.optionList.push_back("geom");
   m_Options.optionList.push_back("sdataidx");
   m_Options.optionList.push_back("resol");
   m_Options.optionList.push_back("skipcarto");
   m_Options.optionList.push_back("skipgeom");
+  m_Options.optionList.push_back("skiprpctag");
 }
 
 void
@@ -105,6 +109,20 @@ ExtendedFilenameToReaderOptions
       }
     }
 
+  if (!map["skiprpctag"].empty())
+    {
+    m_Options.skipRpcTag.first = true;
+    if (   map["skiprpctag"] == "On"
+        || map["skiprpctag"] == "on"
+        || map["skiprpctag"] == "ON"
+        || map["skiprpctag"] == "true"
+        || map["skiprpctag"] == "True"
+        || map["skiprpctag"] == "1"   )
+      {
+      m_Options.skipRpcTag.second = true;
+      }
+    }
+  
   //Option Checking
   MapIteratorType it;
   for ( it=map.begin(); it != map.end(); it++ )
@@ -198,4 +216,17 @@ ExtendedFilenameToReaderOptions
   return m_Options.skipGeom.second;
 }
 
+bool
+ExtendedFilenameToReaderOptions
+::SkipRpcTagIsSet () const
+{
+  return m_Options.skipRpcTag.first;
+}
+bool
+ExtendedFilenameToReaderOptions
+::GetSkipRpcTag () const
+{
+  return m_Options.skipRpcTag.second;
+}
+
 } // end namespace otb
diff --git a/Code/IO/otbExtendedFilenameToReaderOptions.h b/Code/IO/otbExtendedFilenameToReaderOptions.h
index 7af1283..f22e7d0 100644
--- a/Code/IO/otbExtendedFilenameToReaderOptions.h
+++ b/Code/IO/otbExtendedFilenameToReaderOptions.h
@@ -62,6 +62,7 @@ public:
     std::pair< bool, unsigned int >  resolutionFactor;
     std::pair< bool, bool         >  skipCarto;
     std::pair< bool, bool         >  skipGeom;
+    std::pair< bool, bool         >  skipRpcTag;
     std::vector<std::string>         optionList;
   };
 
@@ -80,6 +81,8 @@ public:
   bool GetSkipCarto () const;
   bool SkipGeomIsSet () const;
   bool GetSkipGeom () const;
+  bool SkipRpcTagIsSet () const;
+  bool GetSkipRpcTag () const;
 
 protected:
   ExtendedFilenameToReaderOptions();
diff --git a/Code/IO/otbGDALDriverManagerWrapper.cxx b/Code/IO/otbGDALDriverManagerWrapper.cxx
index 685d0d1..2ca24ca 100644
--- a/Code/IO/otbGDALDriverManagerWrapper.cxx
+++ b/Code/IO/otbGDALDriverManagerWrapper.cxx
@@ -43,15 +43,43 @@ GDALDatasetWrapper::GetDataSet() const
   return m_Dataset;
 }
 
+// IsJPEG2000
+bool
+GDALDatasetWrapper::IsJPEG2000() const
+{
+  if (m_Dataset == NULL)
+    {
+    return false;
+    }
+  std::string driverName(m_Dataset->GetDriver()->GetDescription());
+  if (driverName.compare("JP2OpenJPEG") == 0 ||
+      driverName.compare("JP2KAK") == 0 ||
+      driverName.compare("JP2ECW") == 0)
+    {
+    return true;
+    }
+  return false;
+}
+
 // GDALDriverManagerWrapper method implementation
 
 GDALDriverManagerWrapper::GDALDriverManagerWrapper()
 {
     GDALAllRegister();
 
+    // Ignore incompatible Jpeg2000 drivers (Jasper)
+    /*
+    driver = GetGDALDriverManager()->GetDriverByName( "JPEG2000" );
+    if (driver)
+      GetGDALDriverManager()->DeregisterDriver( driver );
+    */
+
 #ifndef CHECK_HDF4OPEN_SYMBOL
+
+    GDALDriver* driver = 0;
+
     // Get rid of the HDF4 driver when it is buggy
-    GDALDriver* driver = GetGDALDriverManager()->GetDriverByName( "hdf4" );
+    driver = GetGDALDriverManager()->GetDriverByName( "hdf4" );
     if (driver)
       GetGDALDriverManager()->DeregisterDriver( driver );
 #endif
@@ -67,6 +95,26 @@ GDALDatasetWrapper::Pointer
 GDALDriverManagerWrapper::Open( std::string filename ) const
 {
   GDALDatasetWrapper::Pointer datasetWrapper;
+
+  // first : test if a driver can identify the dataset
+  GDALDriverH identifyDriverH = GDALIdentifyDriver(filename.c_str(), NULL);
+  if(identifyDriverH == NULL)
+    {
+    // don't try to open it and exit
+    return datasetWrapper;
+    }
+
+  GDALDriver *identifyDriver = static_cast<GDALDriver*>(identifyDriverH);
+
+  // check if Jasper will be used
+  if (strcmp(identifyDriver->GetDescription(),"JPEG2000") == 0)
+    {
+    itkGenericExceptionMacro(<< "Error : tried to open the file "
+      << filename.c_str() << " with GDAL driver Jasper "
+      "(which fails on OTB). Try setting the environment variable GDAL_SKIP"
+      " in order to avoid this driver.");
+    }
+
   GDALDatasetH dataset = GDALOpen(filename.c_str(), GA_ReadOnly);
 
   if (dataset != NULL)
@@ -164,7 +212,7 @@ void GDALOverviewsBuilder::GetGDALResamplingMethod(std::string &resamplingMethod
 extern "C"
 {
   static int CPL_STDCALL otb_UpdateGDALProgress(double dfComplete,
-                                                const char *pszMessage,
+                                                const char *itkNotUsed(pszMessage),
                                                 void * pProgressArg)
   {
     otb::GDALOverviewsBuilder* _this = (otb::GDALOverviewsBuilder*)pProgressArg;
@@ -225,4 +273,3 @@ void GDALOverviewsBuilder::Update()
 }
 
 } // end namespace otb
-
diff --git a/Code/IO/otbGDALDriverManagerWrapper.h b/Code/IO/otbGDALDriverManagerWrapper.h
index edc8a4e..4c81c83 100644
--- a/Code/IO/otbGDALDriverManagerWrapper.h
+++ b/Code/IO/otbGDALDriverManagerWrapper.h
@@ -25,7 +25,9 @@ class GDALDriver;
 
 /* GDAL Libraries */
 #include "gdal.h"
+#include "gdaljp2metadata.h"
 #include "gdal_priv.h"
+#include "gdal_alg.h"
 
 namespace otb
 {
@@ -50,6 +52,11 @@ public:
   /** Easy access to the internal GDALDataset object.
    *  Don't close it, it will be automatic */
   GDALDataset* GetDataSet() const;
+  
+  /** Test if the dataset corresponds to a Jpeg2000 file format
+   *  Return true if the dataset exists and has a JPEG2000 driver
+   *  Return false in all other cases */
+  bool IsJPEG2000() const;
 
 protected :
   GDALDatasetWrapper();
diff --git a/Code/IO/otbGDALImageIO.cxx b/Code/IO/otbGDALImageIO.cxx
index 1d9cd1e..171a732 100644
--- a/Code/IO/otbGDALImageIO.cxx
+++ b/Code/IO/otbGDALImageIO.cxx
@@ -25,6 +25,8 @@
 #include "itksys/SystemTools.hxx"
 #include "otbImage.h"
 #include "itkVariableLengthVector.h"
+#include "otbTinyXML.h"
+#include "otbImageKeywordlist.h"
 
 #include "itkMetaDataObject.h"
 #include "otbMetaDataKey.h"
@@ -42,6 +44,8 @@
 #include <boost/algorithm/string/predicate.hpp>
 #include "otbOGRHelpers.h"
 
+#include "stdint.h" //needed for uintptr_t
+
 inline unsigned int uint_ceildivpow2(unsigned int a, unsigned int b) {
   return (a + (1 << b) - 1) >> b;
 }
@@ -134,9 +138,9 @@ GDALImageIO::GDALImageIO()
   // Set default spacing to one
   m_Spacing[0] = 1.0;
   m_Spacing[1] = 1.0;
-  // Set default origin to zero
-  m_Origin[0] = 0.0;
-  m_Origin[1] = 0.0;
+  // Set default origin to half a pixel (centered pixel convention)
+  m_Origin[0] = 0.5;
+  m_Origin[1] = 0.5;
 
   m_IsIndexed   = false;
   m_DatasetNumber = 0;
@@ -331,8 +335,8 @@ void GDALImageIO::Read(void* buffer)
     // TODO: This is a very special case and seems to be working only
     // for unsigned char pixels. There might be a gdal method to do
     // the work in a cleaner way
-    std::streamoff lNbPixels = (static_cast<std::streamoff>(lNbColumns))
-                             * (static_cast<std::streamoff>(lNbLines));
+    std::streamoff lNbPixels = (static_cast<std::streamoff>(lNbColumnsRegion))
+                             * (static_cast<std::streamoff>(lNbLinesRegion));
     std::streamoff lBufferSize = static_cast<std::streamoff>(m_BytePerPixel) * lNbPixels;
     itk::VariableLengthVector<unsigned char> value(lBufferSize);
 
@@ -352,7 +356,8 @@ void GDALImageIO::Read(void* buffer)
                                      0);
     if (lCrGdal == CE_Failure)
       {
-      itkExceptionMacro(<< "Error while reading image (GDAL format) " << m_FileName.c_str() << ".");
+      itkExceptionMacro(<< "Error while reading image (GDAL format) '"
+        << m_FileName.c_str() << "' : " << CPLGetLastErrorMsg());
       }
     // Interpret index as color
     std::streamoff cpt(0);
@@ -422,7 +427,8 @@ void GDALImageIO::Read(void* buffer)
     // Check if gdal call succeed
     if (lCrGdal == CE_Failure)
       {
-      itkExceptionMacro(<< "Error while reading image (GDAL format) " << m_FileName.c_str() << ".");
+      itkExceptionMacro(<< "Error while reading image (GDAL format) '"
+        << m_FileName.c_str() << "' : " << CPLGetLastErrorMsg());
       return;
       }
     //printDataBuffer(p, m_PxType->pixType, m_NbBands, lNbColumnsRegion*lNbLinesRegion);
@@ -485,6 +491,22 @@ bool GDALImageIO::GetAvailableResolutions(std::vector<unsigned int>& res)
 {
   GDALDataset* dataset = m_Dataset->GetDataSet();
 
+  if (m_Dataset->IsJPEG2000())
+    {
+    // JPEG2000 case : use the number of overviews actually in the dataset
+    // Original resolution
+    res.push_back(0);
+
+    // available overviews
+    for (unsigned int k=0; k<m_NumberOfOverviews; ++k)
+      {
+      res.push_back(k+1);
+      }
+
+    return true;
+    }
+
+  // default case : compute overviews until one of the dimensions is 1
   bool flagStop = false;
   unsigned int resFactor = 0;
   while (!flagStop)
@@ -515,6 +537,24 @@ bool GDALImageIO::GetResolutionInfo(std::vector<unsigned int>& res, std::vector<
   unsigned int originalWidth = m_OriginalDimensions[0];
   unsigned int originalHeight = m_OriginalDimensions[1];
 
+  bool computeBlockSize = false;
+  int blockSizeX = 0;
+  int blockSizeY = 0;
+  // For Jpeg2000 files, retrieve the tile size.
+  // TODO : the image and tile sizes at different resolution should be
+  // read in the GDAL dataset, when available
+  GDALDataset* dataset = m_Dataset->GetDataSet();
+  if (m_Dataset->IsJPEG2000())
+    {
+    computeBlockSize = true;
+    dataset->GetRasterBand(1)->GetBlockSize(&blockSizeX, &blockSizeY);
+    if (blockSizeX==0 || blockSizeY==0)
+      {
+      computeBlockSize = false;
+      }
+    }
+
+
   for (std::vector<unsigned int>::iterator itRes = res.begin(); itRes < res.end(); itRes++)
     {
     // For each resolution we will compute the tile dim and image dim
@@ -523,7 +563,17 @@ bool GDALImageIO::GetResolutionInfo(std::vector<unsigned int>& res, std::vector<
     unsigned int w = uint_ceildivpow2( originalWidth, *itRes);
     unsigned int h = uint_ceildivpow2( originalHeight, *itRes);
 
-    oss << "Resolution: " << *itRes << " (Image [w x h]: " << w << "x" << h << ", Tile [w x h]: " <<  "not defined x not defined" << ")";
+    oss << "Resolution: " << *itRes << " (Image [w x h]: " << w << "x" << h << ", Tile [w x h]: ";
+    if (computeBlockSize)
+      {
+      unsigned int tw = uint_ceildivpow2( static_cast<unsigned int>(blockSizeX), *itRes);
+      unsigned int th = uint_ceildivpow2( static_cast<unsigned int>(blockSizeY), *itRes);
+      oss << tw << "x" << th << ")";
+      }
+    else
+      {
+      oss <<  "not defined x not defined" << ")";
+      }
 
     desc.push_back(oss.str());
     }
@@ -805,9 +855,17 @@ void GDALImageIO::InternalReadImageInformation()
       {
       otbMsgDevMacro(<< "Original blockSize: "<< blockSizeX << " x " << blockSizeY );
 
-      // Try to keep the GDAL block memory constant
       blockSizeX = uint_ceildivpow2(blockSizeX,m_ResolutionFactor);
-      blockSizeY = blockSizeY * (1 << m_ResolutionFactor);
+      if (m_Dataset->IsJPEG2000())
+        {
+        // Jpeg2000 case : use the real block size Y
+        blockSizeY = uint_ceildivpow2(blockSizeY,m_ResolutionFactor);
+        }
+      else
+        {
+        // Try to keep the GDAL block memory constant
+        blockSizeY = blockSizeY * (1 << m_ResolutionFactor);
+        }
 
       otbMsgDevMacro(<< "Decimated blockSize: "<< blockSizeX << " x " << blockSizeY );
 
@@ -825,6 +883,13 @@ void GDALImageIO::InternalReadImageInformation()
   m_Spacing[0] = 1;
   m_Spacing[1] = 1;
 
+  // Reset origin to GDAL convention default
+  m_Origin[0] = 0.0;
+  m_Origin[1] = 0.0;
+
+  // flag to detect images in sensor geometry
+  bool isSensor = false;
+
   if (m_NumberOfDimensions == 3) m_Spacing[2] = 1;
 
   char** papszMetadata;
@@ -843,6 +908,12 @@ void GDALImageIO::InternalReadImageInformation()
   itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::DriverShortNameKey, driverShortName);
   itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::DriverLongNameKey,  driverLongName);
 
+  if (m_Dataset->IsJPEG2000())
+    {
+    // store the cache size used for Jpeg2000 files
+    itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::CacheSizeInBytes , GDALGetCacheMax64());
+    }
+
   /* -------------------------------------------------------------------- */
   /* Get the projection coordinate system of the image : ProjectionRef  */
   /* -------------------------------------------------------------------- */
@@ -875,6 +946,15 @@ void GDALImageIO::InternalReadImageInformation()
       pSR = NULL;
       }
     }
+  else
+    {
+    otbMsgDevMacro( << "No projection => sensor model" );
+    // Special case for Jpeg2000 files : try to read the origin in the GML box
+    if (m_Dataset->IsJPEG2000())
+      {
+      isSensor = GetOriginFromGMLBox(m_Origin);
+      }
+    }
 
   /* -------------------------------------------------------------------- */
   /* Get the GCP projection coordinates of the image : GCPProjection  */
@@ -937,14 +1017,43 @@ void GDALImageIO::InternalReadImageInformation()
 
     itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::GeoTransformKey, VadfGeoTransform);
 
-    /// retrieve origin and spacing from the geo transform
-    m_Origin[0] = VadfGeoTransform[0];
-    m_Origin[1] = VadfGeoTransform[3];
-    m_Spacing[0] = VadfGeoTransform[1];
-    m_Spacing[1] = VadfGeoTransform[5];
+    if (!isSensor)
+      {
+      /// retrieve origin and spacing from the geo transform
+      m_Spacing[0] = VadfGeoTransform[1];
+      m_Spacing[1] = VadfGeoTransform[5];
 
+      if ( m_Spacing[0]== 0 || m_Spacing[1] == 0)
+        {
+        // Manage case where axis are not standard
+        if (VadfGeoTransform[2] != 0  && VadfGeoTransform[4] != 0 )
+          {
+          m_Spacing[0] = VadfGeoTransform[2];
+          m_Spacing[1] = VadfGeoTransform[4];
+          }
+        else
+          {
+          otbWarningMacro(<< "Incorrect geotransform  (spacing = 0)!");
+          m_Spacing[0] = 1;
+          m_Spacing[1] = 1;
+          }
+        }
+      // Geotransforms with a non-null rotation are not supported
+      // Beware : GDAL origin is at the corner of the top-left pixel
+      // whereas OTB/ITK origin is at the centre of the top-left pixel
+      // The origin computed here is in GDAL convention for now
+      m_Origin[0] = VadfGeoTransform[0];
+      m_Origin[1] = VadfGeoTransform[3];
+      }
     }
 
+  // Compute final spacing with the resolution factor
+  m_Spacing[0] *= vcl_pow(2.0, static_cast<double>(m_ResolutionFactor));
+  m_Spacing[1] *= vcl_pow(2.0, static_cast<double>(m_ResolutionFactor));
+  // Now that the spacing is known, apply the half-pixel shift
+  m_Origin[0] += 0.5*m_Spacing[0];
+  m_Origin[1] += 0.5*m_Spacing[1];
+
   // Dataset info
   otbMsgDevMacro(<< "**** ReadImageInformation() DATASET INFO: ****" );
   otbMsgDevMacro(<< "Projection Ref: "<< dataset->GetProjectionRef() );
@@ -982,6 +1091,34 @@ void GDALImageIO::InternalReadImageInformation()
       }
     }
 
+  /* Special case for JPEG2000, also look in the GML boxes */
+  if (m_Dataset->IsJPEG2000())
+    {
+    char **gmlMetadata = NULL;
+    GDALJP2Metadata jp2Metadata;
+    if (jp2Metadata.ReadAndParse(m_FileName.c_str()))
+      {
+      gmlMetadata = jp2Metadata.papszGMLMetadata;
+      }
+
+    if (CSLCount(gmlMetadata) > 0)
+      {
+      std::string key;
+      int cptOffset = CSLCount(papszMetadata);
+
+      for (int cpt = 0; gmlMetadata[cpt] != NULL; ++cpt)
+        {
+        std::ostringstream lStream;
+        lStream << MetaDataKey::MetadataKey << (cpt+cptOffset);
+        key = lStream.str();
+
+        itk::EncapsulateMetaData<std::string>(dict, key,
+                                              static_cast<std::string>(gmlMetadata[cpt]));
+        }
+      }
+    }
+
+
   /* -------------------------------------------------------------------- */
   /*      Report subdatasets.                                             */
   /* -------------------------------------------------------------------- */
@@ -1087,9 +1224,6 @@ void GDALImageIO::InternalReadImageInformation()
     this->SetPixelType(VECTOR);
     }
 
-  // Adapt the spacing to the resolution read
-  m_Spacing[0] *= vcl_pow(2.0, static_cast<double>(m_ResolutionFactor));
-  m_Spacing[1] *= vcl_pow(2.0, static_cast<double>(m_ResolutionFactor));
 }
 
 bool GDALImageIO::CanWriteFile(const char* name)
@@ -1140,7 +1274,6 @@ bool GDALImageIO::CanStreamWrite()
     {
     m_CanStreamWrite = false;
     }
-
   return m_CanStreamWrite;
 }
 
@@ -1223,13 +1356,14 @@ void GDALImageIO::Write(const void* buffer)
     // Check if writing succeed
     if (lCrGdal == CE_Failure)
       {
-      itkExceptionMacro(<< "Error while writing image (GDAL format) " << m_FileName.c_str() << ".");
+      itkExceptionMacro(<< "Error while writing image (GDAL format) '"
+        << m_FileName.c_str() << "' : " << CPLGetLastErrorMsg());
       }
     // Flush dataset cache
     m_Dataset->GetDataSet()->FlushCache();
     }
   else
-    {
+  {
     // We only wrote data to the memory dataset
     // Now write it to the real file with CreateCopy()
     std::string gdalDriverShortName = FilenameToGdalDriverShortName(m_FileName);
@@ -1245,8 +1379,16 @@ void GDALImageIO::Write(const void* buffer)
     GDALDataset* hOutputDS = driver->CreateCopy( realFileName.c_str(), m_Dataset->GetDataSet(), FALSE,
                                                  otb::ogr::StringListConverter(creationOptions).to_ogr(),
                                                  NULL, NULL );
-    GDALClose(hOutputDS);
+    if(!hOutputDS)
+    {
+      itkExceptionMacro(<< "Error while writing image (GDAL format) '"
+        << m_FileName.c_str() << "' : " << CPLGetLastErrorMsg());
+    }
+    else
+    {
+      GDALClose(hOutputDS);
     }
+  }
 
 
   if (lFirstLine + lNbLines == m_Dimensions[1]
@@ -1445,9 +1587,11 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer)
     // doesn't begin with 0x, the address in not interpreted as
     // hexadecimal but alpha numeric value, then the conversion to
     // integer make us pointing to an non allowed memory block => Crash.
+    //use intptr_t to cast void* to unsigned long. included stdint.h for
+    // uintptr_t typedef.
     std::ostringstream stream;
     stream << "MEM:::"
-           <<  "DATAPOINTER=" << (unsigned long)(buffer) << ","
+           <<  "DATAPOINTER=" << (uintptr_t)(buffer) << ","
            <<  "PIXELS=" << m_Dimensions[0] << ","
            <<  "LINES=" << m_Dimensions[1] << ","
            <<  "BANDS=" << m_NbBands << ","
@@ -1462,7 +1606,8 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer)
   if (m_Dataset.IsNull())
     {
     itkExceptionMacro(
-      << "GDAL Writing failed : Impossible to create the image file name '" << m_FileName << "'.");
+      << "GDAL Writing failed : Impossible to create the image file name '"
+      << m_FileName << "' : " << CPLGetLastErrorMsg() );
     }
 
   /*----------------------------------------------------------------------*/
@@ -1482,10 +1627,10 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer)
   /* -------------------------------------------------------------------- */
   const double Epsilon = 1E-10;
   if (projectionRef.empty()
-      &&  (vcl_abs(m_Origin[0]) > Epsilon
-           || vcl_abs(m_Origin[1]) > Epsilon
-           || vcl_abs(m_Spacing[0] - 1) > Epsilon
-           || vcl_abs(m_Spacing[1] - 1) > Epsilon) )
+      &&  (vcl_abs(m_Origin[0] - 0.5) > Epsilon
+           || vcl_abs(m_Origin[1] - 0.5) > Epsilon
+           || vcl_abs(m_Spacing[0] - 1.0) > Epsilon
+           || vcl_abs(m_Spacing[1] - 1.0) > Epsilon) )
     {
     // See issue #303 :
     // If there is no ProjectionRef, and the GeoTransform is not the identity,
@@ -1544,8 +1689,10 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer)
   /* -------------------------------------------------------------------- */
   itk::VariableLengthVector<double> geoTransform(6);
   /// Reporting origin and spacing
-  geoTransform[0] = m_Origin[0];
-  geoTransform[3] = m_Origin[1];
+  // Beware : GDAL origin is at the corner of the top-left pixel
+  // whereas OTB/ITK origin is at the centre of the top-left pixel
+  geoTransform[0] = m_Origin[0] - 0.5*m_Spacing[0];
+  geoTransform[3] = m_Origin[1] - 0.5*m_Spacing[1];
   geoTransform[1] = m_Spacing[0];
   geoTransform[5] = m_Spacing[1];
 
@@ -1575,6 +1722,25 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer)
       dataset->SetMetadataItem(tag.c_str(), value.c_str(), NULL);
       }
     }
+
+#if GDAL_VERSION_NUM >= 1100000
+  // Report any RPC coefficients (feature available since GDAL 1.10.0)
+  ImageKeywordlist otb_kwl;
+  itk::ExposeMetaData<ImageKeywordlist>(dict,
+                                        MetaDataKey::OSSIMKeywordlistKey,
+                                        otb_kwl);
+  if( otb_kwl.GetSize() != 0 )
+    {
+    GDALRPCInfo gdalRpcStruct;
+    if ( otb_kwl.convertToGDALRPC(gdalRpcStruct) )
+      {
+      char **rpcMetadata = RPCInfoToMD(&gdalRpcStruct);
+      dataset->SetMetadata(rpcMetadata, "RPC");
+      CSLDestroy( rpcMetadata );
+      }
+    }
+#endif
+
   // END
 
   // Dataset info
@@ -1621,12 +1787,103 @@ std::string GDALImageIO::FilenameToGdalDriverShortName(const std::string& name)
     gdalDriverShortName="PCIDSK";
   else if ( extension == ".lbl" || extension == ".pds" )
     gdalDriverShortName="ISIS2";
+  else if ( extension == ".j2k" || extension == ".jp2" || extension == ".jpx")
+  {
+    // Try different JPEG2000 drivers
+    GDALDriver *driver = NULL;
+    driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName("JP2OpenJPEG");
+    if (driver)
+      {
+      gdalDriverShortName = "JP2OpenJPEG";
+      }
+
+    if (!driver)
+      {
+      driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName("JP2KAK");
+      if (driver)
+        {
+        gdalDriverShortName = "JP2KAK";
+        }
+      }
+
+    if (!driver)
+      {
+      driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName("JP2ECW");
+      if (driver)
+        {
+        gdalDriverShortName = "JP2ECW";
+        }
+      }
+
+    if (!driver)
+      {
+      gdalDriverShortName = "NOT-FOUND";
+      }
+  }
+
   else
     gdalDriverShortName = "NOT-FOUND";
 
   return gdalDriverShortName;
 }
 
+bool GDALImageIO::GetOriginFromGMLBox(std::vector<double> &origin)
+{
+  GDALJP2Metadata jp2Metadata;
+  if (!jp2Metadata.ReadAndParse(m_FileName.c_str()))
+    {
+    return false;
+    }
+
+  if (!jp2Metadata.papszGMLMetadata)
+    {
+    return false;
+    }
+
+  std::string gmlString = static_cast<std::string>(jp2Metadata.papszGMLMetadata[0]);
+  gmlString.erase(0,18); // We need to remove first part to create a true xml stream
+  otbMsgDevMacro( << "XML extract from GML box: " << gmlString );
+
+  TiXmlDocument doc;
+  doc.Parse(gmlString.c_str()); // Create xml doc from a string
+
+  TiXmlHandle docHandle( &doc );
+  TiXmlElement* originTag = docHandle.FirstChild( "gml:FeatureCollection" )
+                                     .FirstChild( "gml:featureMember" )
+                                     .FirstChild( "gml:FeatureCollection" )
+                                     .FirstChild( "gml:featureMember" )
+                                     .FirstChild( "gml:GridCoverage" )
+                                     .FirstChild( "gml:gridDomain")
+                                     .FirstChild( "gml:Grid" )
+                                     .FirstChild( "gml:limits" )
+                                     .FirstChild( "gml:GridEnvelope" )
+                                     .FirstChild( "gml:low").ToElement();
+  if(originTag)
+    {
+    otbMsgDevMacro( << "\t Origin (" <<  originTag->Value() <<" tag)= "<<  originTag->GetText());
+    }
+  else
+    {
+    otbMsgDevMacro( << "Didn't find the GML element which indicate the origin!" );
+    return false;
+    }
+
+  std::vector<itksys::String> originValues;
+  originValues = itksys::SystemTools::SplitString(originTag->GetText(),' ', false);
+
+  // Compute origin in GDAL convention (the half-pixel shift is applied later)
+  std::istringstream ss0 (originValues[0]);
+  std::istringstream ss1 (originValues[1]);
+  ss0 >> origin[1];
+  ss1 >> origin[0];
+  origin[0] += -1.0;
+  origin[1] += -1.0;
+
+  otbMsgDevMacro( << "\t Origin from GML box: " <<  origin[0] << ", " << origin[1] );
+
+  return true;
+}
+
 std::string GDALImageIO::GetGdalWriteImageFileName(const std::string& gdalDriverShortName, const std::string& filename) const
 {
   std::string gdalFileName;
diff --git a/Code/IO/otbGDALImageIO.h b/Code/IO/otbGDALImageIO.h
index c6d00cb..f52dce3 100644
--- a/Code/IO/otbGDALImageIO.h
+++ b/Code/IO/otbGDALImageIO.h
@@ -32,7 +32,29 @@ class GDALDataTypeWrapper;
 
 /** \class GDALImageIO
  *
- * \brief ImageIO object for reading (not writing) GDAL images
+ * \brief ImageIO object for reading and writing images with GDAL
+ *
+ * This ImageIO uses GDAL interface to read/write images. The
+ * origin and spacing are translated from/to GDAL geotransform
+ * matrix (even in the case of a sensor image). It means that
+ * extracts from sensor images are well supported. Typical
+ * sensor images in OTB have a spacing of [1,1] and an origin
+ * at [0.5,0.5] (when there is no GDAL geotransform, GDAL
+ * physical space is identical to GDAL index space).
+ *
+ * Note that the geotransform matrix supports any rotated physical
+ * space whereas OTB doesn't.
+ *
+ * \em Warning : the index coordinate system used in GDAL is attached
+ * to the corner of the top left pixel, whereas in OTB, the index
+ * coordinate system is attached to the centre of the top-left
+ * pixel. It means that the origin coefficents read from the
+ * GDAL geotransform are the location of the top-left pixel
+ * corner. This is why this location has to be shifted by
+ * half a pixel to be used as an OTB origin. In a nutshell,
+ * OTB images read/written by this ImageIO have the \em same
+ * physical space as GDAL physical space : a given point of
+ * image has the same physical location in OTB and in GDAL.
  *
  * The streaming read is implemented.
  *
@@ -142,7 +164,11 @@ public:
 
 
 protected:
-  /** Constructor.*/
+  /**
+   * Constructor.
+   * Spacing is set to [1,1] and origin to [0.5,0.5] as it would correspond
+   * to an image without geotransform
+   */
   GDALImageIO();
   /** Destructor.*/
   virtual ~GDALImageIO();
@@ -175,6 +201,9 @@ private:
 
   std::string FilenameToGdalDriverShortName(const std::string& name) const;
 
+  /** Parse a GML box from a Jpeg2000 file and get the origin */
+  bool GetOriginFromGMLBox(std::vector<double> &origin);
+  
   /** Test whether m_CreationOptions has an option
    *  \param partialOption The beginning of a creation option (for example "QUALITY=")
    */
diff --git a/Code/IO/otbImageFileReader.txx b/Code/IO/otbImageFileReader.txx
index ac5bb42..753c15e 100644
--- a/Code/IO/otbImageFileReader.txx
+++ b/Code/IO/otbImageFileReader.txx
@@ -403,7 +403,7 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
       // spacing, origin and direction for the final (degenerate) dimensions.
       dimSize[i] = 1;
       spacing[i] = 1.0;
-      origin[i] = 0.0;
+      origin[i] = 0.5;
       for (unsigned j = 0; j < TOutputImage::ImageDimension; ++j)
         {
         if (i == j)
@@ -422,7 +422,6 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
     {
     for (unsigned int i = 0; i < TOutputImage::ImageDimension; ++i)
       {
-      origin[i] = 0.0;
       if ( m_FilenameHelper->GetResolutionFactor() != 0 )
         {
         spacing[i] = 1.0*vcl_pow((double)2, (double)m_FilenameHelper->GetResolutionFactor());
@@ -431,6 +430,7 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
         {
         spacing[i] = 1.0;
         }
+      origin[i] = 0.5*spacing[i];
       }
     }
 
@@ -442,7 +442,7 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
   ImageKeywordlist otb_kwl;
   if (!m_FilenameHelper->ExtGEOMFileNameIsSet())
     {
-    otb_kwl = ReadGeometryFromImage(lFileNameOssimKeywordlist);
+    otb_kwl = ReadGeometryFromImage(lFileNameOssimKeywordlist,!m_FilenameHelper->GetSkipRpcTag());
     otbMsgDevMacro(<< "Loading internal kwl");
     }
   else
@@ -478,12 +478,21 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
     std::string projRef;
     itk::ExposeMetaData(dict, MetaDataKey::ProjectionRefKey, projRef);
 
+    // Compute spacing for an identity geotransform at current resolution
+    unsigned int resolution;
+    itk::ExposeMetaData<unsigned int>(dict,
+                                      MetaDataKey::ResolutionFactor,
+                                      resolution);
+    double idSpacing = 1.0;
+    if (resolution != 0)
+      idSpacing = 1.0 * vcl_pow((double)2.0, (double)resolution);
+
     const double Epsilon = 1.0E-12;
     if ( projRef.empty()
-         && vcl_abs(origin[0]) > Epsilon
-         && vcl_abs(origin[1]) > Epsilon
-         && vcl_abs(spacing[0] - 1) > Epsilon
-         && vcl_abs(spacing[1] - 1) > Epsilon)
+         && vcl_abs(origin[0] - 0.5 * spacing[0]) > Epsilon
+         && vcl_abs(origin[1] - 0.5 * spacing[1]) > Epsilon
+         && vcl_abs(spacing[0] - idSpacing) > Epsilon
+         && vcl_abs(spacing[1] - idSpacing) > Epsilon)
       {
       std::string wgs84ProjRef =
               "GEOGCS[\"GCS_WGS_1984\", DATUM[\"D_WGS_1984\", SPHEROID[\"WGS_1984\", 6378137, 298.257223563]],"
@@ -671,9 +680,12 @@ void
 ImageFileReader<TOutputImage, ConvertPixelTraits>
 ::SetFileName(const char* extendedFileName)
 {
-  this->m_FilenameHelper->SetExtendedFileName(extendedFileName);
-  this->m_FileName = this->m_FilenameHelper->GetSimpleFileName();
-  this->Modified();
+  if (extendedFileName)
+    {
+    this->m_FilenameHelper->SetExtendedFileName(extendedFileName);
+    this->m_FileName = this->m_FilenameHelper->GetSimpleFileName();
+    this->Modified();
+    }
 }
 
 template <class TOutputImage, class ConvertPixelTraits>
diff --git a/Code/IO/otbImageIOBase.cxx b/Code/IO/otbImageIOBase.cxx
index 163db77..b22ccb1 100644
--- a/Code/IO/otbImageIOBase.cxx
+++ b/Code/IO/otbImageIOBase.cxx
@@ -430,7 +430,7 @@ template <typename T>
 bool
 itkSetPixelType(ImageIOBase *This,
                 const std::type_info &ptype,
-                ImageIOBase::IOComponentType ntype,
+                ImageIOBase::IOComponentType itkNotUsed(ntype),
                 std::complex<T> itkNotUsed( dummy ) )
 {
   if (ptype == typeid(std::complex<short>))
diff --git a/Code/IO/otbImageMetadataInterfaceFactory.cxx b/Code/IO/otbImageMetadataInterfaceFactory.cxx
index ace40c0..07c1b1e 100644
--- a/Code/IO/otbImageMetadataInterfaceFactory.cxx
+++ b/Code/IO/otbImageMetadataInterfaceFactory.cxx
@@ -25,6 +25,7 @@
 #include "otbIkonosImageMetadataInterfaceFactory.h"
 #include "otbSpotImageMetadataInterfaceFactory.h"
 #include "otbPleiadesImageMetadataInterfaceFactory.h"
+#include "otbSpot6ImageMetadataInterfaceFactory.h"
 #include "otbFormosatImageMetadataInterfaceFactory.h"
 #include "otbQuickBirdImageMetadataInterfaceFactory.h"
 #include "otbWorldView2ImageMetadataInterfaceFactory.h"
@@ -105,6 +106,7 @@ ImageMetadataInterfaceFactory
       itk::ObjectFactoryBase::RegisterFactory(IkonosImageMetadataInterfaceFactory::New());
       itk::ObjectFactoryBase::RegisterFactory(SpotImageMetadataInterfaceFactory::New());
       itk::ObjectFactoryBase::RegisterFactory(PleiadesImageMetadataInterfaceFactory::New());
+      itk::ObjectFactoryBase::RegisterFactory(Spot6ImageMetadataInterfaceFactory::New());
       itk::ObjectFactoryBase::RegisterFactory(FormosatImageMetadataInterfaceFactory::New());
       itk::ObjectFactoryBase::RegisterFactory(QuickBirdImageMetadataInterfaceFactory::New());
       itk::ObjectFactoryBase::RegisterFactory(WorldView2ImageMetadataInterfaceFactory::New());
diff --git a/Code/IO/otbImageSeriesFileReader.h b/Code/IO/otbImageSeriesFileReader.h
index ea76aef..f653f2f 100644
--- a/Code/IO/otbImageSeriesFileReader.h
+++ b/Code/IO/otbImageSeriesFileReader.h
@@ -414,7 +414,7 @@ protected:
   /**
    * Tests the coherency of the Meta File (especifically band selection) with the image types
    */
-  virtual void TestBandSelection(std::vector<unsigned int>& bands){}
+  virtual void TestBandSelection(std::vector<unsigned int>& itkNotUsed(bands)){}
 
   /** GenerateData
    * This method will be specialised if template definitions follow:
diff --git a/Code/IO/otbImageSeriesFileReaderBase.h b/Code/IO/otbImageSeriesFileReaderBase.h
index f74692a..d072da0 100644
--- a/Code/IO/otbImageSeriesFileReaderBase.h
+++ b/Code/IO/otbImageSeriesFileReaderBase.h
@@ -153,7 +153,7 @@ protected:
    * order to add the appropriated path
    */
   virtual void TestFileExistanceAndReadability(std::string& file, FileType fileType);
-  virtual void TestBandSelection(std::vector<unsigned int>& bands) {}
+  virtual void TestBandSelection(std::vector<unsigned int>& itkNotUsed(bands)) {}
 
   virtual void GenerateData(void);
 
diff --git a/Code/IO/otbImageSeriesFileReaderBase.txx b/Code/IO/otbImageSeriesFileReaderBase.txx
index 3852dfb..364e844 100644
--- a/Code/IO/otbImageSeriesFileReaderBase.txx
+++ b/Code/IO/otbImageSeriesFileReaderBase.txx
@@ -332,7 +332,7 @@ ImageSeriesFileReaderBase<TImage, TInternalImage>
 template <class TImage, class TInternalImage>
 void
 ImageSeriesFileReaderBase<TImage, TInternalImage>
-::GenerateData(unsigned int idx)
+::GenerateData(unsigned int itkNotUsed(idx))
 {
   std::ostringstream msg;
   msg << "Something wrong... Check the template definition of this class in the program...\n";
diff --git a/Code/IO/otbJPEG2000ImageIO.cxx b/Code/IO/otbJPEG2000ImageIO.cxx
index 00019d7..698d47e 100644
--- a/Code/IO/otbJPEG2000ImageIO.cxx
+++ b/Code/IO/otbJPEG2000ImageIO.cxx
@@ -238,12 +238,13 @@ bool JPEG2000MetadataReader::GetOriginFromGMLBox (std::vector<double> &origin)
   std::vector<itksys::String> originValues;
   originValues = itksys::SystemTools::SplitString(originTag->GetText(),' ', false);
 
+  // Compute origin in GDAL convention (half pixel shift is applied later)
   std::istringstream ss0 (originValues[0]);
   std::istringstream ss1 (originValues[1]);
   ss0 >> origin[1];
   ss1 >> origin[0];
-  origin[0]--;
-  origin[1]--;
+  origin[0] += -1.0;
+  origin[1] += -1.0;
 
   otbMsgDevMacro( << "\t Origin from GML box: " <<  origin[0] << ", " << origin[1] );
 
@@ -666,7 +667,7 @@ JPEG2000TileCache::~JPEG2000TileCache()
 
 void JPEG2000TileCache::EstimateTileCacheSize(unsigned int originalWidthTile, unsigned int originalHeightTile,
                                               unsigned int nbComponent,
-                                              unsigned int precision,
+                                              unsigned int itkNotUsed(precision),
                                               unsigned int resolution)
 {
   this->m_TileCacheSizeInByte = originalWidthTile * originalHeightTile
@@ -761,8 +762,8 @@ JPEG2000ImageIO::JPEG2000ImageIO()
   m_Spacing[0] = 1.0;
   m_Spacing[1] = 1.0;
   // Set default origin to zero
-  m_Origin[0] = 0.0;
-  m_Origin[1] = 0.0;
+  m_Origin[0] = 0.5;
+  m_Origin[1] = 0.5;
 
   m_BytePerPixel = 1;
   m_ResolutionFactor = 0; // Full resolution by default
@@ -1239,6 +1240,10 @@ void JPEG2000ImageIO::ReadImageInformation()
     {
     otbMsgDevMacro(<<"JPEG2000 file has metadata available!");
 
+    // reset the origin to [0,0] as in GDAL convention
+    m_Origin[0] = 0.0;
+    m_Origin[1] = 0.0;
+
     /* GEOTRANSFORM */
     if (lJP2MetadataReader.HaveGeoTransform())
       {
@@ -1255,8 +1260,6 @@ void JPEG2000ImageIO::ReadImageInformation()
       std::cout << std::endl; */
 
       // Retrieve origin and spacing from the geo transform
-      m_Origin[0] = geoTransform[0];
-      m_Origin[1] = geoTransform[3];
       m_Spacing[0] = geoTransform[1];
       m_Spacing[1] = geoTransform[5];
 
@@ -1275,6 +1278,13 @@ void JPEG2000ImageIO::ReadImageInformation()
           m_Spacing[1] = 1;
           }
         }
+      // Geotransforms with a non-null rotation are not supported
+      // Beware : GDAL origin is at the corner of the top-left pixel
+      // whereas OTB/ITK origin is at the centre of the top-left pixel
+      // The origin is first stored in GDAL convention. The halft pixel
+      // shift is applied later (when the final spacing is known)
+      m_Origin[0] = geoTransform[0];
+      m_Origin[1] = geoTransform[3];
       }
 
     /* GCPs */
@@ -1365,7 +1375,7 @@ void JPEG2000ImageIO::ReadImageInformation()
     else
       {
       otbMsgDevMacro( << "NO PROJECTION IN GML BOX => SENSOR MODEL " );
-      m_Origin[0] = 0; m_Origin[1] = 0;
+      m_Origin[0] = 0.0; m_Origin[1] = 0.0;
       m_Spacing[0] = 1; m_Spacing[1] = 1;
 
       lJP2MetadataReader.GetOriginFromGMLBox(m_Origin);
@@ -1378,12 +1388,18 @@ void JPEG2000ImageIO::ReadImageInformation()
   else
     {
     otbMsgDevMacro( << "JPEG2000 file has NO metadata available!");
-    m_Origin[0] = 0;
-    m_Origin[1] = 0;
-    m_Spacing[0] = 1;
-    m_Spacing[1] = 1;
+    m_Origin[0] = 0.0;
+    m_Origin[1] = 0.0;
+    m_Spacing[0] = 1.0;
+    m_Spacing[1] = 1.0;
     }
 
+  // Compute final spacing using the resolution factor
+  m_Spacing[0] *= vcl_pow(2.0, static_cast<double>(m_ResolutionFactor));
+  m_Spacing[1] *= vcl_pow(2.0, static_cast<double>(m_ResolutionFactor));
+  // Now that the spacing is known, apply the half-pixel shift
+  m_Origin[0] += 0.5*m_Spacing[0];
+  m_Origin[1] += 0.5*m_Spacing[1];
 
   // If the internal image was not open we open it.
   // This is usually done when the user sets the ImageIO manually
@@ -1450,9 +1466,6 @@ void JPEG2000ImageIO::ReadImageInformation()
   itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::TileHintX, tileHintX);
   itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::TileHintY, tileHintY);
 
-  m_Spacing[0] *= vcl_pow(2.0, static_cast<double>(m_ResolutionFactor));
-  m_Spacing[1] *= vcl_pow(2.0, static_cast<double>(m_ResolutionFactor));
-
   // If we have some spacing information we use it
   // could be needed for other j2k image but not for pleiades
   // if ( (m_InternalReaders.front()->m_XResolution.front() > 0) && (m_InternalReaders.front()->m_YResolution.front() > 0) )
diff --git a/Code/IO/otbKmzProductWriter.txx b/Code/IO/otbKmzProductWriter.txx
index f69bd97..c5bfec7 100644
--- a/Code/IO/otbKmzProductWriter.txx
+++ b/Code/IO/otbKmzProductWriter.txx
@@ -447,78 +447,77 @@ KmzProductWriter<TInputImage>
 
         InputPointType  inputPoint;
         OutputPointType outputPoint;
-        IndexType       indexTile;
-        SizeType        sizeTile, demiSizeTile;
+        double          sizeTile[2];
+        double          halfSizeTile[2];
 
-        sizeTile = extractSize;
-        demiSizeTile[0] = (sizeTile[0] / 2) - 1;
-        demiSizeTile[1] = (sizeTile[1] / 2) - 1;
+        sizeTile[0] = static_cast<double>(extractSize[0]);
+        sizeTile[1] = static_cast<double>(extractSize[1]);
+        halfSizeTile[0] = sizeTile[0] / 2.0;
+        halfSizeTile[1] = sizeTile[1] / 2.0;
+
+        itk::ContinuousIndex<double, 2> indexRef(extractIndex);
+        indexRef[0] += -0.5;
+        indexRef[1] += -0.5;
+        itk::ContinuousIndex<double, 2> indexTile(indexRef);
 
         // Compute North value
-        indexTile[0] = extractIndex[0] + demiSizeTile[0];
-        indexTile[1] = extractIndex[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
+        indexTile[0] += halfSizeTile[0];
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
         outputPoint = m_Transform->TransformPoint(inputPoint);
         double north = outputPoint[1];
 
         // Compute South value
-        indexTile[0] = extractIndex[0] + demiSizeTile[0];
-        indexTile[1] = extractIndex[1] + sizeTile[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
+        indexTile[1] += sizeTile[1];
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
         outputPoint = m_Transform->TransformPoint(inputPoint);
         double south = outputPoint[1];
 
-        // Compute East value
-        indexTile[0] = extractIndex[0] + sizeTile[0];
-        indexTile[1] = extractIndex[1] + demiSizeTile[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
-        outputPoint = m_Transform->TransformPoint(inputPoint);
-        double east = outputPoint[0];
-
         // Compute West value
-        indexTile[0] = extractIndex[0];
-        indexTile[1] = extractIndex[1] + demiSizeTile[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
+        indexTile = indexRef;
+        indexTile[1] += halfSizeTile[1];
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
         outputPoint = m_Transform->TransformPoint(inputPoint);
         double west = outputPoint[0];
 
+        // Compute East value
+        indexTile[0] += sizeTile[0];
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
+        outputPoint = m_Transform->TransformPoint(inputPoint);
+        double east = outputPoint[0];
+
         // Compute center value (lat / long)
-        indexTile[0] = extractIndex[0] + demiSizeTile[0];
-        indexTile[1] = extractIndex[1] + demiSizeTile[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
+        indexTile = indexRef;
+        indexTile[0] += halfSizeTile[0];
+        indexTile[1] += halfSizeTile[1];
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
         outputPoint = m_Transform->TransformPoint(inputPoint);
         double centerLat = outputPoint[1];
         double centerLong = outputPoint[0];
 
         /** GX LAT LON **/
+        // Compute upper left corner
+        indexTile = indexRef;
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
+        outputPoint = m_Transform->TransformPoint(inputPoint);
+        OutputPointType upperLeftCorner = outputPoint;
+
         // Compute lower left corner
-        indexTile[0] = extractIndex[0];
-        indexTile[1] = extractIndex[1] + sizeTile[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
+        indexTile[1] += sizeTile[1];
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
         outputPoint = m_Transform->TransformPoint(inputPoint);
         OutputPointType lowerLeftCorner = outputPoint;
 
         // Compute lower right corner
-        indexTile[0] = extractIndex[0] + sizeTile[0];
-        indexTile[1] = extractIndex[1] + sizeTile[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
+        indexTile[0] += sizeTile[0];
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
         outputPoint = m_Transform->TransformPoint(inputPoint);
         OutputPointType lowerRightCorner = outputPoint;
 
         // Compute upper right corner
-        indexTile[0] = extractIndex[0] + sizeTile[0];
-        indexTile[1] = extractIndex[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
+        indexTile[1] -= sizeTile[1];
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
         outputPoint = m_Transform->TransformPoint(inputPoint);
         OutputPointType upperRightCorner = outputPoint;
-
-        // Compute upper left corner
-        indexTile[0] = extractIndex[0];
-        indexTile[1] = extractIndex[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
-        outputPoint = m_Transform->TransformPoint(inputPoint);
-        OutputPointType upperLeftCorner = outputPoint;
-
         /** END GX LAT LON */
 
         // Create KML - Filename - PathName - tile number - North - South - East - West
@@ -635,7 +634,7 @@ KmzProductWriter<TInputImage>
       double south,
       double east,
       double west,
-      bool extended)
+      bool itkNotUsed(extended))
 {
   // Give a name to the root file
   std::ostringstream kmlname;
@@ -884,7 +883,7 @@ KmzProductWriter<TInputImage>
 template <class TInputImage>
 void
 KmzProductWriter<TInputImage>
-::GenerateKMLExtended(const std::string& pathname, int depth, int x, int y,
+::GenerateKMLExtended(const std::string& pathname, int depth, int itkNotUsed(x), int y,
           OutputPointType lowerLeft, OutputPointType lowerRight,
           OutputPointType upperRight, OutputPointType upperLeft)
 {
@@ -940,7 +939,7 @@ template <class TInputImage>
 void
 KmzProductWriter<TInputImage>
 ::GenerateKML(const std::string& pathname, int depth,
-              int x, int y, double north, double south,
+              int itkNotUsed(x), int y, double north, double south,
               double east, double west)
 {
   std::ostringstream kmlname;
@@ -991,10 +990,10 @@ template <class TInputImage>
 void
 KmzProductWriter<TInputImage>
 ::GenerateKMLExtendedWithLink(const std::string& pathname,
-            int depth, int x, int y, int tileStartX, int tileStartY,
-            OutputPointType lowerLeft, OutputPointType lowerRight,
-            OutputPointType upperRight, OutputPointType upperLeft,
-            double centerLong, double centerLat)
+                              int depth, int itkNotUsed(x), int y, int tileStartX, int tileStartY,
+                              OutputPointType lowerLeft, OutputPointType lowerRight,
+                              OutputPointType upperRight, OutputPointType upperLeft,
+                              double centerLong, double centerLat)
 {
   std::ostringstream kmlname;
   kmlname << pathname;
@@ -1176,8 +1175,8 @@ template <class TInputImage>
 void
 KmzProductWriter<TInputImage>
 ::GenerateKMLWithLink(const std::string& pathname,
-          int depth, int x, int y, int tileStartX, int tileStartY,
-          double north, double south, double east, double west, double centerLong, double centerLat)
+                      int depth, int itkNotUsed(x), int y, int tileStartX, int tileStartY,
+                      double north, double south, double east, double west, double centerLong, double centerLat)
 {
   std::ostringstream kmlname;
   kmlname << pathname;
@@ -1403,7 +1402,7 @@ KmzProductWriter<TInputImage>
 template <class TInputImage>
 std::string
 KmzProductWriter<TInputImage>
-::GetCuttenFileName(const std::string& description, unsigned int idx)
+::GetCuttenFileName(const std::string& itkNotUsed(description), unsigned int idx)
 {
   std::string currentImageName;
   std::string tempName;
diff --git a/Code/IO/otbLUMImageIO.cxx b/Code/IO/otbLUMImageIO.cxx
index ab2d6e4..d523cf2 100644
--- a/Code/IO/otbLUMImageIO.cxx
+++ b/Code/IO/otbLUMImageIO.cxx
@@ -46,9 +46,10 @@ LUMImageIO::LUMImageIO()
   // Set default spacing to one
   m_Spacing[0] = 1.0;
   m_Spacing[1] = 1.0;
-  // Set default origin to zero
-  m_Origin[0] = 0.0;
-  m_Origin[1] = 0.0;
+  // Set default origin to [0.5 , 0.5]
+  // (consistency between ImageIO, see Mantis #942)
+  m_Origin[0] = 0.5;
+  m_Origin[1] = 0.5;
 
   m_FlagWriteImageInformation = true;
 
diff --git a/Code/IO/otbMSTARImageIO.cxx b/Code/IO/otbMSTARImageIO.cxx
index 70c74ec..9fe8a4c 100644
--- a/Code/IO/otbMSTARImageIO.cxx
+++ b/Code/IO/otbMSTARImageIO.cxx
@@ -53,8 +53,10 @@ MSTARImageIO::MSTARImageIO()
   m_Spacing[0] = 1.0;
   m_Spacing[1] = 1.0;
 
-  m_Origin[0] = 0.0;
-  m_Origin[1] = 0.0;
+  // Set default origin to [0.5 , 0.5]
+  // (consistency between ImageIO, see Mantis #942)
+  m_Origin[0] = 0.5;
+  m_Origin[1] = 0.5;
 
   m_BytePerPixel = 0;
 
diff --git a/Code/IO/otbMWImageIO.cxx b/Code/IO/otbMWImageIO.cxx
index 606d75a..64edd45 100644
--- a/Code/IO/otbMWImageIO.cxx
+++ b/Code/IO/otbMWImageIO.cxx
@@ -46,9 +46,10 @@ MWImageIO::MWImageIO()
   // Set default spacing to one
   m_Spacing[0] = 1.0;
   m_Spacing[1] = 1.0;
-  // Set default origin to zero
-  m_Origin[0] = 0.0;
-  m_Origin[1] = 0.0;
+  // Set default origin to [0.5 , 0.5]
+  // (consistency between ImageIO, see Mantis #942)
+  m_Origin[0] = 0.5;
+  m_Origin[1] = 0.5;
 
   m_FlagWriteImageInformation = true;
   m_Ncom = 0;
diff --git a/Code/IO/otbMapFileProductWriter.txx b/Code/IO/otbMapFileProductWriter.txx
index 08f05af..5a940ce 100644
--- a/Code/IO/otbMapFileProductWriter.txx
+++ b/Code/IO/otbMapFileProductWriter.txx
@@ -365,39 +365,36 @@ MapFileProductWriter<TInputImage>
         m_Transform->InstanciateTransform();
 
         InputPointType  inputPoint;
-        IndexType       indexTile;
         SizeType        sizeTile;
         sizeTile = extractSize;
 
         /** GX LAT LON **/
+        // Compute upper left corner
+        itk::ContinuousIndex<double, 2> indexTile(extractIndex);
+        indexTile[0] += -0.5;
+        indexTile[1] += -0.5;
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
+        OutputPointType upperLeftCorner = m_Transform->TransformPoint(inputPoint);
+        //std::cout <<"indexTile "<< indexTile <<" --> input Point "<< inputPoint << " upperLeftCorner "<< upperLeftCorner  << std::endl;
+        
         // Compute lower left corner
-        indexTile[0] = extractIndex[0];
-        indexTile[1] = extractIndex[1] + sizeTile[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
+        indexTile[1] += static_cast<double>(sizeTile[1]);
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
         OutputPointType lowerLeftCorner = m_Transform->TransformPoint(inputPoint);
         //std::cout <<"indexTile "<< indexTile <<" --> input Point "<< inputPoint << " lowerLeftCorner "<<  lowerLeftCorner << std::endl;
 
         // Compute lower right corner
-        indexTile[0] = extractIndex[0] + sizeTile[0];
-        indexTile[1] = extractIndex[1] + sizeTile[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
+        indexTile[0] += static_cast<double>(sizeTile[0]);
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
         OutputPointType lowerRightCorner = m_Transform->TransformPoint(inputPoint);
         //std::cout <<"indexTile "<< indexTile <<" --> input Point "<< inputPoint << " lowerRightCorner   "<< lowerRightCorner  << std::endl;
 
         // Compute upper right corner
-        indexTile[0] = extractIndex[0]+ sizeTile[0];
-        indexTile[1] = extractIndex[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
+        indexTile[1] -= static_cast<double>(sizeTile[1]);
+        m_ResampleVectorImage->TransformContinuousIndexToPhysicalPoint(indexTile, inputPoint);
         OutputPointType upperRightCorner = m_Transform->TransformPoint(inputPoint);
         //std::cout <<"indexTile "<< indexTile <<" --> input Point "<< inputPoint << " upperRightCorner "<< upperRightCorner  << std::endl;
 
-        // Compute upper left corner
-        indexTile[0] = extractIndex[0];
-        indexTile[1] = extractIndex[1];
-        m_ResampleVectorImage->TransformIndexToPhysicalPoint(indexTile, inputPoint);
-        OutputPointType upperLeftCorner = m_Transform->TransformPoint(inputPoint);
-        //std::cout <<"indexTile "<< indexTile <<" --> input Point "<< inputPoint << " upperLeftCorner "<< upperLeftCorner  << std::endl;
-
         // Build The indexTile
         this->AddBBoxToIndexTile(lowerLeftCorner,
                                  lowerRightCorner,
diff --git a/Code/IO/otbONERAImageIO.cxx b/Code/IO/otbONERAImageIO.cxx
index 8ae5643..9f9f51c 100644
--- a/Code/IO/otbONERAImageIO.cxx
+++ b/Code/IO/otbONERAImageIO.cxx
@@ -41,9 +41,10 @@ ONERAImageIO::ONERAImageIO()
   // Set default spacing to one
   m_Spacing[0] = 1.0;
   m_Spacing[1] = 1.0;
-  // Set default origin to zero
-  m_Origin[0] = 0.0;
-  m_Origin[1] = 0.0;
+  // Set default origin to [0.5 , 0.5]
+  // (consistency between ImageIO, see Mantis #942)
+  m_Origin[0] = 0.5;
+  m_Origin[1] = 0.5;
 
   m_FlagWriteImageInformation = true;
 
diff --git a/Code/IO/otbOpticalImageMetadataInterfaceFactory.cxx b/Code/IO/otbOpticalImageMetadataInterfaceFactory.cxx
index 590710e..252a14e 100644
--- a/Code/IO/otbOpticalImageMetadataInterfaceFactory.cxx
+++ b/Code/IO/otbOpticalImageMetadataInterfaceFactory.cxx
@@ -27,7 +27,7 @@
 #include "otbQuickBirdImageMetadataInterfaceFactory.h"
 #include "otbWorldView2ImageMetadataInterfaceFactory.h"
 #include "otbPleiadesImageMetadataInterfaceFactory.h"
-
+#include "otbSpot6ImageMetadataInterfaceFactory.h"
 
 #include "itkObjectFactoryBase.h"
 #include "itkMutexLock.h"
@@ -91,6 +91,7 @@ OpticalImageMetadataInterfaceFactory
       itk::ObjectFactoryBase::RegisterFactory(QuickBirdImageMetadataInterfaceFactory::New());
       itk::ObjectFactoryBase::RegisterFactory(WorldView2ImageMetadataInterfaceFactory::New());
       itk::ObjectFactoryBase::RegisterFactory(PleiadesImageMetadataInterfaceFactory::New());
+      itk::ObjectFactoryBase::RegisterFactory(Spot6ImageMetadataInterfaceFactory::New());
       firstTime = false;
       }
     }
diff --git a/Code/IO/otbPleiadesImageMetadataInterface.cxx b/Code/IO/otbPleiadesImageMetadataInterface.cxx
index f8b0afc..309d803 100644
--- a/Code/IO/otbPleiadesImageMetadataInterface.cxx
+++ b/Code/IO/otbPleiadesImageMetadataInterface.cxx
@@ -24,6 +24,8 @@
 #include "otbImageKeywordlist.h"
 #include <boost/lexical_cast.hpp>
 
+//uyseful constants
+#include <otbMath.h>
 
 namespace otb
 {
@@ -78,7 +80,6 @@ PleiadesImageMetadataInterface::GetInstrumentIndex() const
     {
     itkExceptionMacro(<< "Invalid Metadata, no Pleiades Image");
     }
-
   ImageKeywordlistType imageKeywordlist;
 
   if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
@@ -678,9 +679,20 @@ PleiadesImageMetadataInterface::GetSatElevation() const
     return 0;
     }
 
-  // MSD: for the moment take only topCenter value
   std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.incident_angle");
-  double value = atof(valueString.c_str());
+
+  std::istringstream is(valueString);
+  std::vector<double> vecValues = std::vector<double>(std::istream_iterator<double>(is), std::istream_iterator<double>());
+
+  //Take the second value (Center value)
+  double value = vecValues[1];
+
+  //Convention use in input of atmospheric correction parameters computation is
+  //"90 - satOrientation". Pleiades does not seem to follow this convention so
+  //inverse the formula here to be able to take the angle read in the metadata
+  //as input for 6S
+  value = 90. - value;
+
   return value;
 }
 
@@ -704,12 +716,56 @@ PleiadesImageMetadataInterface::GetSatAzimuth() const
     {
     return 0;
     }
+  else if (!imageKeywordlist.HasKey("support_data.along_track_incidence_angle") || !imageKeywordlist.HasKey("support_data.across_track_incidence_angle"))
+    {
+    std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.scene_orientation");
+
+    std::istringstream is(valueString);
+    std::vector<double> vecCap = std::vector<double>(std::istream_iterator<double>(is), std::istream_iterator<double>());
+
+    //Take the second value (Center value)
+    double cap = vecCap[1];
+
+    //return only orientation if across/along track incidence are not available
+    return cap;
+    }
+  else
+    {
+    //Got orientation and incidences angle which allow to compute satellite
+    // azimuthal angle
+
+    // MSD: for the moment take only topCenter value
+    std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.scene_orientation");
+
+    std::istringstream is(valueString);
+    std::vector<double> vecCap = std::vector<double>(std::istream_iterator<double>(is), std::istream_iterator<double>());
+
+    //Take the second value (Center value)
+    double cap = vecCap[1];
+
+    valueString = imageKeywordlist.GetMetadataByKey("support_data.along_track_incidence_angle");
+    std::istringstream isAlong(valueString);
+    std::vector<double> vecAlong = std::vector<double>(std::istream_iterator<double>(isAlong), std::istream_iterator<double>());
+
+    //Take the second value (Center value)
+    double along = vecAlong[1];
+
+    valueString = imageKeywordlist.GetMetadataByKey("support_data.across_track_incidence_angle");
+    std::istringstream isAcross(valueString);
+    std::vector<double> vecAcross = std::vector<double>(std::istream_iterator<double>(isAcross), std::istream_iterator<double>());
 
-  // MSD: for the moment take only topCenter value
-  std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.scene_orientation");
-  double satAz = atof(valueString.c_str());
+    //Take the second value (Center value)
+    double ortho = vecAcross[1];
 
-  return satAz;
+    //Compute Satellite azimuthal angle using the azimuthal angle and the along
+    //and across track incidence angle
+
+    double satAz = (cap - vcl_atan2(vcl_tan(ortho * CONST_PI_180),vcl_tan(along * CONST_PI_180)) * CONST_180_PI);
+
+    satAz = fmod(satAz,360);
+
+    return satAz;
+    }
 }
 
 PleiadesImageMetadataInterface::VariableLengthVectorType
@@ -810,7 +866,7 @@ PleiadesImageMetadataInterface
     }
   else
     {
-    otbMsgDevMacro(<< "Pleiades detected: band 0 and 2 inverted");
+    otbMsgDevMacro(<< "Pleiades detected: first file component is red band and third component is blue one");
     if (i == 0) return 2;
     if (i == 2) return 0;
     }
@@ -886,45 +942,12 @@ PleiadesImageMetadataInterface
     itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
     }
 
-  int nbBands = this->GetNumberOfBands();
 
-  std::string key = "support_data.band_name_list";
   std::vector<unsigned int> rgb(3);
 
-  // TODO MSD remove this limitation when we get a real pleiades image
-  // Band order in PHR products seems to be always the same : RGB => keep the flag off
-  bool realProduct = false;
-  if (realProduct)
-    {
-    if (imageKeywordlist.HasKey(key) && (nbBands > 1))
-      {
-      std::string keywordStringBandNameList = imageKeywordlist.GetMetadataByKey(key);
-      std::vector<std::string> bandNameList;
-      boost::trim(keywordStringBandNameList);
-      boost::split(bandNameList, keywordStringBandNameList, boost::is_any_of(" "));
-
-      for (int i = 0; i < nbBands && i < 3; i++)
-        {
-        size_t found;
-        found = bandNameList[i].find_first_not_of("B");
-        rgb[i] = lexical_cast<int> (bandNameList[i].at(found));
-        }
-      }
-    else
-      {
-      // Default values
-      rgb[0] = 2;
-      rgb[1] = 1;
-      rgb[2] = 0;
-      }
-    }
-  else
-    {
-    // Default values for simulation product
-    rgb[0] = 0;
-    rgb[1] = 1;
-    rgb[2] = 2;
-    }
+  rgb[0] = 0;
+  rgb[1] = 1;
+  rgb[2] = 2;
 
   return rgb;
 }
diff --git a/Code/IO/otbRADImageIO.cxx b/Code/IO/otbRADImageIO.cxx
index a638acb..016a1ef 100644
--- a/Code/IO/otbRADImageIO.cxx
+++ b/Code/IO/otbRADImageIO.cxx
@@ -57,9 +57,10 @@ RADImageIO::RADImageIO()
   // Set default spacing to one
   m_Spacing[0] = 1.0;
   m_Spacing[1] = 1.0;
-  // Set default origin to zero
-  m_Origin[0] = 0.0;
-  m_Origin[1] = 0.0;
+  // Set default origin to [0.5 , 0.5]
+  // (consistency between ImageIO, see Mantis #942)
+  m_Origin[0] = 0.5;
+  m_Origin[1] = 0.5;
   m_ChannelsFile = NULL;
   m_FlagWriteImageInformation = true;
 
diff --git a/Code/IO/otbSpectralSensitivityReader.cxx b/Code/IO/otbSpectralSensitivityReader.cxx
index ab8958a..5015183 100644
--- a/Code/IO/otbSpectralSensitivityReader.cxx
+++ b/Code/IO/otbSpectralSensitivityReader.cxx
@@ -136,6 +136,14 @@ SpectralSensitivityReader
 
   while (std::getline(file, line))
     {
+    // Replace any tabulation by a space
+    std::string::size_type tabpos = line.find('\t');
+    while (tabpos != std::string::npos)
+      {
+      line.at(tabpos) = ' ';
+      tabpos = line.find('\t');
+      }
+
     // Replace multiple spaces by a unique space
     std::unique(line.begin(), line.end(), SpectralSensitivityReader::BothAre(' '));
 
diff --git a/Code/IO/otbSpot6ImageMetadataInterface.cxx b/Code/IO/otbSpot6ImageMetadataInterface.cxx
new file mode 100644
index 0000000..aafa1f5
--- /dev/null
+++ b/Code/IO/otbSpot6ImageMetadataInterface.cxx
@@ -0,0 +1,3868 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+#include "otbSpot6ImageMetadataInterface.h"
+
+#include <boost/algorithm/string.hpp>
+#include "otbMacro.h"
+#include "itkMetaDataObject.h"
+#include "otbImageKeywordlist.h"
+#include <boost/lexical_cast.hpp>
+
+
+namespace otb
+{
+using boost::lexical_cast;
+using boost::bad_lexical_cast;
+
+Spot6ImageMetadataInterface
+::Spot6ImageMetadataInterface()
+{
+}
+
+bool
+Spot6ImageMetadataInterface::CanRead() const
+{
+  std::string sensorID = GetSensorID();
+  if (sensorID.find("SPOT 6") != std::string::npos)
+    return true;
+  else
+    return false;
+}
+
+std::string
+Spot6ImageMetadataInterface::GetInstrument() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  if (imageKeywordlist.HasKey("support_data.instrument"))
+    {
+    std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.instrument");
+    return valueString;
+    }
+
+  return "";
+}
+
+std::string
+Spot6ImageMetadataInterface::GetInstrumentIndex() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+  if (imageKeywordlist.HasKey("support_data.instrument_index"))
+    {
+    std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.instrument_index");
+    return valueString;
+    }
+
+  return ""; // Invalid value
+}
+
+Spot6ImageMetadataInterface::VariableLengthVectorType
+Spot6ImageMetadataInterface::GetSolarIrradiance() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  std::vector<double>      outputValues;
+  if (imageKeywordlist.HasKey("support_data.solar_irradiance"))
+    {
+    std::vector<std::string> outputValuesString;
+    std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.solar_irradiance");
+    boost::trim(valueString);
+    boost::split(outputValuesString, valueString, boost::is_any_of(" "));
+    for (unsigned int i = 0; i < outputValuesString.size(); ++i)
+      {
+      outputValues.push_back(atof(outputValuesString[i].c_str()));
+      }
+    }
+
+  VariableLengthVectorType outputValuesVariableLengthVector;
+  outputValuesVariableLengthVector.SetSize(outputValues.size());
+  outputValuesVariableLengthVector.Fill(0);
+
+  if (outputValues.size() > 0)
+    {
+           for (unsigned int i = 0; i < outputValues.size(); ++i)
+              outputValuesVariableLengthVector[i] = outputValues[this->BandIndexToWavelengthPosition(i)];
+    }
+  else
+    {
+           itkExceptionMacro("Invalid Physical Irradiance");
+    }
+
+  return outputValuesVariableLengthVector;
+}
+
+
+int
+Spot6ImageMetadataInterface::GetDay() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  if (!imageKeywordlist.HasKey("support_data.image_date"))
+    {
+    return -1;
+    }
+
+  std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.image_date");
+  std::vector<std::string> outputValues;
+
+  boost::split(outputValues, valueString, boost::is_any_of(" T:-."));
+
+  int value;
+  try
+    {
+    value = lexical_cast<int> (outputValues[2]);
+    }
+  catch (bad_lexical_cast &)
+    {
+    itkExceptionMacro(<< "Invalid Day");
+    }
+
+  return value;
+}
+
+int
+Spot6ImageMetadataInterface::GetMonth() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  if (!imageKeywordlist.HasKey("support_data.image_date"))
+    {
+    return -1;
+    }
+
+  std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.image_date");
+  std::vector<std::string> outputValues;
+  boost::split(outputValues, valueString, boost::is_any_of(" T:-."));
+
+  int value;
+  try
+    {
+    value = lexical_cast<int> (outputValues[1]);
+    }
+  catch (bad_lexical_cast &)
+    {
+    itkExceptionMacro(<< "Invalid Month");
+    }
+  return value;
+}
+
+int
+Spot6ImageMetadataInterface::GetYear() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  if (!imageKeywordlist.HasKey("support_data.image_date"))
+    {
+    return -1;
+    }
+
+  std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.image_date");
+  std::vector<std::string> outputValues;
+  boost::split(outputValues, valueString, boost::is_any_of(" T:-."));
+
+  int value;
+  try
+    {
+    value = lexical_cast<int> (outputValues[0]);
+    }
+  catch (bad_lexical_cast &)
+    {
+    itkExceptionMacro(<< "Invalid Year");
+    }
+  return value;
+}
+
+int
+Spot6ImageMetadataInterface::GetHour() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  if (!imageKeywordlist.HasKey("support_data.image_date"))
+    {
+    return -1;
+    }
+
+  std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.image_date");
+  std::vector<std::string> outputValues;
+  boost::split(outputValues, valueString, boost::is_any_of(" T:-."));
+
+  int value;
+  try
+    {
+    value = lexical_cast<int> (outputValues[3]);
+    }
+  catch (bad_lexical_cast &)
+    {
+    itkExceptionMacro(<< "Invalid Hour");
+    }
+  return value;
+}
+
+int
+Spot6ImageMetadataInterface::GetMinute() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  if (!imageKeywordlist.HasKey("support_data.image_date"))
+    {
+    return -1;
+    }
+
+  std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.image_date");
+  std::vector<std::string> outputValues;
+  boost::split(outputValues, valueString, boost::is_any_of(" T:-."));
+
+  int value;
+  try
+    {
+    value = lexical_cast<int> (outputValues[4]);
+    }
+  catch (bad_lexical_cast &)
+    {
+    itkExceptionMacro(<< "Invalid Minute");
+    }
+  return value;
+}
+
+int
+Spot6ImageMetadataInterface::GetProductionDay() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  if (!imageKeywordlist.HasKey("support_data.production_date"))
+    {
+    return -1;
+    }
+
+  std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.production_date");
+  std::vector<std::string> outputValues;
+  boost::split(outputValues, valueString, boost::is_any_of(" T:-"));
+
+  int value;
+  try
+    {
+    value = lexical_cast<int> (outputValues[2]);
+    }
+  catch (bad_lexical_cast &)
+    {
+    itkExceptionMacro(<< "Invalid Day");
+    }
+  return value;
+}
+
+int
+Spot6ImageMetadataInterface::GetProductionMonth() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  if (!imageKeywordlist.HasKey("support_data.production_date"))
+    {
+    return -1;
+    }
+
+  std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.production_date");
+  std::vector<std::string> outputValues;
+  boost::split(outputValues, valueString, boost::is_any_of(" T:-"));
+
+  int value;
+  try
+    {
+    value = lexical_cast<int> (outputValues[1]);
+    }
+  catch (bad_lexical_cast &)
+    {
+    itkExceptionMacro(<< "Invalid Month");
+    }
+  return value;
+}
+
+int
+Spot6ImageMetadataInterface::GetProductionYear() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  if (!imageKeywordlist.HasKey("support_data.production_date"))
+    {
+    return -1;
+    }
+
+  std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.production_date");
+  std::vector<std::string> outputValues;
+  boost::split(outputValues, valueString, boost::is_any_of(" T:-"));
+
+  if (outputValues.size() <= 2) itkExceptionMacro(<< "Invalid Year");
+
+  int value;
+  try
+    {
+    value = lexical_cast<int> (outputValues[0]);
+    }
+  catch (bad_lexical_cast &)
+    {
+    itkExceptionMacro(<< "Invalid Year");
+    }
+  return value;
+}
+
+
+Spot6ImageMetadataInterface::VariableLengthVectorType
+Spot6ImageMetadataInterface
+::GetPhysicalBias() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  std::vector<double>      outputValues;
+  if (imageKeywordlist.HasKey("support_data.physical_bias"))
+    {
+    std::vector<std::string> outputValuesString;
+    std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.physical_bias");
+    boost::trim(valueString);
+    boost::split(outputValuesString, valueString, boost::is_any_of(" "));
+    for (unsigned int i = 0; i < outputValuesString.size(); ++i)
+      {
+      outputValues.push_back(atof(outputValuesString[i].c_str()));
+      }
+    }
+
+  VariableLengthVectorType outputValuesVariableLengthVector;
+  outputValuesVariableLengthVector.SetSize(outputValues.size());
+  outputValuesVariableLengthVector.Fill(0);
+
+  if (outputValues.size() > 0)
+    {
+           for (unsigned int i = 0; i < outputValues.size(); ++i)
+              outputValuesVariableLengthVector[i] = outputValues[this->BandIndexToWavelengthPosition(i)];
+    }
+  else
+    {
+           itkExceptionMacro("Invalid Physical Bias");
+    }
+
+  return outputValuesVariableLengthVector;
+}
+
+Spot6ImageMetadataInterface::VariableLengthVectorType
+Spot6ImageMetadataInterface
+::GetPhysicalGain() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  std::vector<double>      outputValues;
+  if (imageKeywordlist.HasKey("support_data.physical_gain"))
+    {
+    std::vector<std::string> outputValuesString;
+    std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.physical_gain");
+    boost::trim(valueString);
+    boost::split(outputValuesString, valueString, boost::is_any_of(" "));
+    for (unsigned int i = 0; i < outputValuesString.size(); ++i)
+      {
+      outputValues.push_back(atof(outputValuesString[i].c_str()));
+      }
+    }
+
+  VariableLengthVectorType outputValuesVariableLengthVector;
+  outputValuesVariableLengthVector.SetSize(outputValues.size());
+  outputValuesVariableLengthVector.Fill(0);
+
+  if (outputValues.size() > 0)
+    {
+           for (unsigned int i = 0; i < outputValues.size(); ++i)
+              outputValuesVariableLengthVector[i] = outputValues[this->BandIndexToWavelengthPosition(i)];
+    }
+  else
+    {
+           itkExceptionMacro("Invalid Physical Bias");
+    }
+
+  return outputValuesVariableLengthVector;
+}
+
+
+double
+Spot6ImageMetadataInterface::GetSatElevation() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  if (!imageKeywordlist.HasKey("support_data.incident_angle"))
+    {
+    return 0;
+    }
+
+  // MSD: for the moment take only topCenter value
+  std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.incident_angle");
+  double value = atof(valueString.c_str());
+  return value;
+}
+
+double
+Spot6ImageMetadataInterface::GetSatAzimuth() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  if (!imageKeywordlist.HasKey("support_data.scene_orientation"))
+    {
+    return 0;
+    }
+
+  // MSD: for the moment take only topCenter value
+  std::string valueString = imageKeywordlist.GetMetadataByKey("support_data.scene_orientation");
+  double satAz = atof(valueString.c_str());
+
+  return satAz;
+}
+
+Spot6ImageMetadataInterface::VariableLengthVectorType
+Spot6ImageMetadataInterface
+::GetFirstWavelengths() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  VariableLengthVectorType wavel(1);
+  wavel.Fill(0.);
+
+  int         nbBands = this->GetNumberOfBands();
+  std::string sensorId = this->GetSensorID();
+
+  // Panchromatic case
+  if (nbBands == 1)
+    {
+    wavel.SetSize(1);
+    wavel.Fill(0.455); // todo
+    }
+  else if (nbBands > 1 && nbBands < 5) // todo
+    {
+    wavel.SetSize(4);
+    wavel[0] = 0.454;
+    wavel[1] = 0.527;
+    wavel[2] = 0.624;
+    wavel[3] = 0.756;
+    }
+  else itkExceptionMacro(<< "Invalid number of bands...");
+
+  return wavel;
+}
+
+Spot6ImageMetadataInterface::VariableLengthVectorType
+Spot6ImageMetadataInterface
+::GetLastWavelengths() const
+{
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+           itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  VariableLengthVectorType wavel(1);
+  wavel.Fill(0.);
+
+  int nbBands = this->GetNumberOfBands();
+
+  // Panchromatic case
+  if (nbBands == 1) // todo
+    {
+    wavel.SetSize(1);
+    wavel.Fill(0.744);
+    }
+  else if (nbBands > 1 && nbBands < 5) // todo
+    {
+    wavel.SetSize(4);
+    wavel[0] = 0.519;
+    wavel[1] = 0.587;
+    wavel[2] = 0.694;
+    wavel[3] = 0.880;
+    }
+  else itkExceptionMacro(<< "Invalid number of bands...");
+
+  return wavel;
+}
+
+// TODO MSD need to update this function
+// Comment this part as relative response
+// FIXME check if this is coherent with other sensor
+unsigned int
+Spot6ImageMetadataInterface
+::BandIndexToWavelengthPosition(unsigned int i) const // todo
+{
+  int nbBands = this->GetNumberOfBands();
+  //Panchromatic case
+  if (nbBands == 1)
+    {
+    return 0;
+    }
+  else
+    {
+    otbMsgDevMacro(<< "Spot6 detected: first file component is red band and third component is blue one");
+    if (i == 0) return 2;
+    if (i == 2) return 0;
+    }
+
+  return i;
+}
+
+std::vector<std::string>
+Spot6ImageMetadataInterface
+::GetEnhancedBandNames() const // todo
+{
+  std::vector<std::string> enhBandNames;
+  std::vector<std::string> rawBandNames = this->Superclass::GetBandName();
+
+  if(rawBandNames.size())
+    {
+    for (std::vector<std::string>::iterator it = rawBandNames.begin(); it != rawBandNames.end(); ++it)
+      {
+      // Manage Panchro case
+      if ( (rawBandNames.size() == 1) && !(*it).compare("P") )
+        {
+        enhBandNames.push_back("PAN");
+        break;
+        }
+      else if ((rawBandNames.size() != 1) && !(*it).compare("P"))
+        {
+        /* Launch exception situation not valid*/
+        itkExceptionMacro(<< "Invalid Metadata, we cannot provide an consistent name to the band");
+        }
+
+      // Manage MS case
+      if ( !(*it).compare("B0") )
+        {
+        enhBandNames.push_back("Blue");
+        }
+      else if ( !(*it).compare("B1") )
+        {
+        enhBandNames.push_back("Green");
+        }
+      else if ( !(*it).compare("B2") )
+        {
+        enhBandNames.push_back("Red");
+        }
+      else if ( !(*it).compare("B3") )
+        {
+        enhBandNames.push_back("NIR");
+        }
+      else
+        {
+        enhBandNames.push_back("Unknown");
+        }
+      }
+    }
+
+  return enhBandNames;
+
+}
+
+std::vector<unsigned int>
+Spot6ImageMetadataInterface
+::GetDefaultDisplay() const // todo
+{
+
+  std::vector<unsigned int> rgb(3);
+  rgb[0] = 0;
+  rgb[1] = 1;
+  rgb[2] = 2;
+  return rgb;
+
+}
+
+Spot6ImageMetadataInterface::WavelengthSpectralBandVectorType
+Spot6ImageMetadataInterface
+::GetSpectralSensitivity()  const // todo
+{
+  //TODO tabulate spectral responses
+  WavelengthSpectralBandVectorType wavelengthSpectralBand = InternalWavelengthSpectralBandVectorType::New();
+
+  std::list <std::vector<float> > tmpSpectralBandList;
+
+  const MetaDataDictionaryType& dict = this->GetMetaDataDictionary();
+  if (!this->CanRead())
+    {
+    itkExceptionMacro(<< "Invalid Metadata, no Spot6 Image");
+    }
+
+  ImageKeywordlistType imageKeywordlist;
+
+  if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
+    {
+    itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::OSSIMKeywordlistKey, imageKeywordlist);
+    }
+
+  const int nbBands = this->GetNumberOfBands();
+  const std::string sensorId = this->GetSensorID();
+
+  // Panchromatic case
+  if (nbBands == 1)
+    {
+    //if (sensorId.find("PHR") != std::string::npos)
+    if (sensorId == "SPOT 6") // todo
+      {
+      const float pan[601] =
+        {
+0.00007493,
+0.00008750,
+0.00009848,
+0.00010843,
+0.00011646,
+0.00012259,
+0.00012552,
+0.00012814,
+0.00013531,
+0.00015014,
+0.00017236,
+0.00019564,
+0.00021235,
+0.00022348,
+0.00022676,
+0.00022299,
+0.00021213,
+0.00020083,
+0.00019926,
+0.00021359,
+0.00025083,
+0.00030983,
+0.00038670,
+0.00047229,
+0.00056950,
+0.00067560,
+0.00078669,
+0.00090069,
+0.00103421,
+0.00131540,
+0.00169029,
+0.00228198,
+0.00312648,
+0.00417071,
+0.00533582,
+0.00661006,
+0.00802817,
+0.00960467,
+0.01132980,
+0.01334611,
+0.01609231,
+0.02038299,
+0.02732543,
+0.03802347,
+0.05294767,
+0.07167096,
+0.09348728,
+0.11872659,
+0.14830802,
+0.18269957,
+0.22269040,
+0.26906796,
+0.32263521,
+0.38325366,
+0.44824011,
+0.51559417,
+0.58258589,
+0.64645021,
+0.70236661,
+0.74583583,
+0.77585237,
+0.79433792,
+0.80499388,
+0.81090952,
+0.81371638,
+0.81431418,
+0.81316313,
+0.81141755,
+0.81097193,
+0.81322836,
+0.81878063,
+0.82800769,
+0.83916423,
+0.85084085,
+0.86161004,
+0.87040692,
+0.87637562,
+0.87967534,
+0.88047879,
+0.88112137,
+0.88175192,
+0.88365397,
+0.88759508,
+0.89291809,
+0.89912245,
+0.90543957,
+0.91146456,
+0.91547923,
+0.91843965,
+0.91963891,
+0.91975983,
+0.91963913,
+0.91947516,
+0.92025788,
+0.92260193,
+0.92575482,
+0.93070662,
+0.93550391,
+0.94001389,
+0.94383039,
+0.94609629,
+0.94688618,
+0.94624211,
+0.94455744,
+0.94265988,
+0.94120799,
+0.94079078,
+0.94176327,
+0.94473408,
+0.94915584,
+0.95419339,
+0.95954236,
+0.96459688,
+0.96902841,
+0.97179112,
+0.97317857,
+0.97320070,
+0.97218736,
+0.97091309,
+0.97035732,
+0.96996616,
+0.97140258,
+0.97376942,
+0.97636229,
+0.97957895,
+0.98311659,
+0.98550114,
+0.98688700,
+0.98705275,
+0.98569258,
+0.98301588,
+0.97915984,
+0.97493690,
+0.97129138,
+0.96813872,
+0.96649466,
+0.96685400,
+0.96849224,
+0.97201807,
+0.97702694,
+0.98197923,
+0.98753229,
+0.99230951,
+0.99540351,
+0.99740084,
+0.99730413,
+0.99558763,
+0.99262103,
+0.98803927,
+0.98368879,
+0.97966358,
+0.97601679,
+0.97409076,
+0.97356455,
+0.97460306,
+0.97733165,
+0.98142794,
+0.98607299,
+0.99104944,
+0.99556304,
+0.99892911,
+1.00128281,
+1.00206838,
+1.00124192,
+0.99879621,
+0.99466280,
+0.99032401,
+0.98568114,
+0.98102690,
+0.97756954,
+0.97495949,
+0.97366152,
+0.97436348,
+0.97596613,
+0.97930722,
+0.98307748,
+0.98726114,
+0.99154671,
+0.99533904,
+0.99803299,
+0.99950550,
+1.00000000,
+0.99848218,
+0.99593416,
+0.99288307,
+0.98834389,
+0.98366197,
+0.97971238,
+0.97601117,
+0.97307044,
+0.97155305,
+0.97102663,
+0.97152475,
+0.97341779,
+0.97585074,
+0.97896590,
+0.98255796,
+0.98543794,
+0.98789503,
+0.98994151,
+0.99059899,
+0.99029895,
+0.98922305,
+0.98676544,
+0.98389430,
+0.98067297,
+0.97675508,
+0.97324400,
+0.97055473,
+0.96803100,
+0.96629732,
+0.96561899,
+0.96564173,
+0.96639591,
+0.96771777,
+0.96934976,
+0.97124886,
+0.97291816,
+0.97432735,
+0.97530655,
+0.97542227,
+0.97463623,
+0.97308990,
+0.97065297,
+0.96750332,
+0.96379792,
+0.95963369,
+0.95522586,
+0.95099476,
+0.94711647,
+0.94373897,
+0.94086191,
+0.93909609,
+0.93751312,
+0.93716161,
+0.93749275,
+0.93844552,
+0.93992284,
+0.94157292,
+0.94327292,
+0.94494878,
+0.94621266,
+0.94689150,
+0.94695971,
+0.94601526,
+0.94485162,
+0.94216490,
+0.93936780,
+0.93516770,
+0.93117984,
+0.92600825,
+0.92184558,
+0.91679022,
+0.91281220,
+0.90873714,
+0.90559995,
+0.90280144,
+0.90151379,
+0.90018969,
+0.90026306,
+0.90055224,
+0.90169504,
+0.90303974,
+0.90479165,
+0.90660298,
+0.90788333,
+0.90928294,
+0.90961910,
+0.91044105,
+0.90941307,
+0.90884628,
+0.90648792,
+0.90426184,
+0.90090015,
+0.89728707,
+0.89360311,
+0.88921759,
+0.88536863,
+0.88109823,
+0.87784434,
+0.87367129,
+0.87100044,
+0.86849439,
+0.86645265,
+0.86555715,
+0.86486409,
+0.86444275,
+0.86462554,
+0.86421244,
+0.86509991,
+0.86504142,
+0.86574075,
+0.86547448,
+0.86537728,
+0.86481040,
+0.86329140,
+0.86242059,
+0.85986818,
+0.85807444,
+0.85502168,
+0.85224705,
+0.84852762,
+0.84517422,
+0.84157685,
+0.83807810,
+0.83443274,
+0.83120263,
+0.82819085,
+0.82520041,
+0.82259510,
+0.82050631,
+0.81863236,
+0.81673157,
+0.81518962,
+0.81376687,
+0.81276571,
+0.81111987,
+0.81039972,
+0.80884166,
+0.80742716,
+0.80605476,
+0.80328088,
+0.80094601,
+0.79797843,
+0.79448406,
+0.79079478,
+0.78664955,
+0.78403080,
+0.77837404,
+0.77671056,
+0.77071265,
+0.76860809,
+0.76568459,
+0.76096821,
+0.75943556,
+0.75440145,
+0.74853854,
+0.73756232,
+0.72050194,
+0.69619742,
+0.66466129,
+0.62570237,
+0.58042003,
+0.52946690,
+0.47429123,
+0.41572304,
+0.35577781,
+0.29694274,
+0.24182875,
+0.19245049,
+0.15026362,
+0.11482153,
+0.08854978,
+0.06698482,
+0.05109390,
+0.03916000,
+0.03018623,
+0.02342899,
+0.01832614,
+0.01444326,
+0.01147024,
+0.00918513,
+0.00740254,
+0.00609562,
+0.00491959,
+0.00435297,
+0.00335678,
+0.00291823,
+0.00234224,
+0.00205113,
+0.00167084,
+0.00145104,
+0.00124552,
+0.00104170,
+0.00108470,
+0.00077931,
+0.00084497,
+0.00059188,
+0.00063835,
+0.00045747,
+0.00040248,
+0.00043271,
+0.00031792,
+0.00033871,
+0.00025452,
+0.00026931,
+0.00020572,
+0.00018559,
+0.00019577,
+0.00015320,
+0.00016086,
+0.00012704,
+0.00011590,
+0.00012165,
+0.00009829,
+0.00010178,
+0.00008372,
+0.00007722,
+0.00008098,
+0.00007448,
+0.00006262,
+0.00006513,
+0.00005514,
+0.00005663,
+0.00004857,
+0.00004996,
+0.00004369,
+0.00004402,
+0.00003879,
+0.00003626,
+0.00003796,
+0.00003303,
+0.00003435,
+0.00003053,
+0.00003118,
+0.00002826,
+0.00002628,
+0.00002754,
+0.00002484,
+0.00002559,
+0.00002406,
+0.00002348,
+0.00002237,
+0.00002233,
+0.00002269,
+0.00002170,
+0.00001996,
+0.00002062,
+0.00001880,
+0.00002003,
+0.00001893,
+0.00001935,
+0.00001823,
+0.00001794,
+0.00001879,
+0.00001726,
+0.00001797,
+0.00001774,
+0.00001520,
+0.00001784,
+0.00001500,
+0.00001790,
+0.00001464,
+0.00001317,
+0.00001633,
+0.00001127,
+0.00001471,
+0.00001314,
+0.00001114,
+0.00000968,
+0.00001262,
+0.00001126,
+0.00002112,
+0.00001135,
+0.00001674,
+0.00001146,
+0.00001572,
+0.00002157,
+0.00001166,
+0.00002111,
+0.00001206,
+0.00002362,
+0.00002815,
+0.00001740,
+0.00001816,
+0.00002519,
+0.00001627,
+0.00002405,
+0.00002027,
+0.00002469,
+0.00002124,
+0.00001758,
+0.00002971,
+0.00002051,
+0.00002437,
+0.00002119,
+0.00001926,
+0.00001850,
+0.00001774,
+0.00002056,
+0.00002202,
+0.00001602,
+0.00001436,
+0.00001710,
+0.00001369,
+0.00001827,
+0.00001218,
+0.00001567,
+0.00001596,
+0.00001348,
+0.00001857,
+0.00001662,
+0.00001805,
+0.00002361,
+0.00001927,
+0.00003019,
+0.00003036,
+0.00003602,
+0.00003469,
+0.00004530,
+0.00004918,
+0.00005892,
+0.00005708,
+0.00006488,
+0.00006319,
+0.00007284,
+0.00006971,
+0.00007822,
+0.00007143,
+0.00007223,
+0.00007024,
+0.00007097,
+0.00007120,
+0.00006619,
+0.00006294,
+0.00005778,
+0.00005333,
+0.00005405,
+0.00004915,
+0.00004779,
+0.00004379,
+0.00004087,
+0.00003311,
+0.00003608,
+0.00003592,
+0.00002213,
+0.00002159,
+0.00002350,
+0.00001705,
+0.00002055,
+0.00001764,
+0.00001453,
+0.00001636,
+0.00001197,
+0.00001123,
+0.00001127,
+0.00001042,
+0.00001021,
+0.00001099,
+0.00001171,
+0.00001030,
+0.00001236,
+0.00001192,
+0.00000823,
+0.00000820,
+0.00000893,
+0.00001115,
+0.00001001,
+0.00000802,
+0.00000976,
+0.00000966,
+0.00000957,
+0.00000726,
+0.00000967,
+0.00001001,
+0.00000803,
+0.00000726,
+0.00000739,
+0.00000845,
+0.00000698,
+0.00000568,
+0.00000472,
+0.00000650,
+0.00000706,
+0.00000546,
+0.00000433,
+0.00000607,
+0.00000408,
+0.00000788,
+0.00000464,
+0.00000958,
+0.00000689,
+0.00000976,
+0.00000672,
+0.00000574,
+0.00000980,
+0.00000503,
+0.00000796,
+0.00000325,
+0.00000636,
+0.00000334,
+0.00000562,
+0.00000413,
+0.00000400,
+0.00000610,
+0.00000240,
+0.00000486,
+0.00000262,
+0.00000333,
+0.00000152,
+0.00000236,
+0.00000152,
+0.00000228,
+0.00000070,
+0.00000185,
+0.00000162,
+0.00000093,
+0.00000188,
+0.00000116,
+0.00000041,
+0.00000126
+        };
+      //add panchromatic band to the temporary list
+      const std::vector<float> vpan (pan, pan + sizeof(pan) / sizeof(float) );
+      tmpSpectralBandList.push_back(vpan);
+      }
+    else
+      {
+      itkExceptionMacro(<< "Invalid Spot6 Sensor ID");
+      }
+    }
+  else if (nbBands > 1 && nbBands < 5)
+    {
+    if (sensorId == "SPOT 6") // todo
+      {
+      //band B0 (blue band)
+      const float b0[601] =
+        {
+0.00006627,
+0.00006114,
+0.00005964,
+0.00006755,
+0.00007354,
+0.00007335,
+0.00007303,
+0.00006988,
+0.00006669,
+0.00006467,
+0.00008891,
+0.00010731,
+0.00006420,
+0.00008781,
+0.00008978,
+0.00008292,
+0.00008193,
+0.00005499,
+0.00008203,
+0.00011262,
+0.00009092,
+0.00010575,
+0.00013926,
+0.00016613,
+0.00019666,
+0.00019375,
+0.00021841,
+0.00033008,
+0.00059283,
+0.00096710,
+0.00120426,
+0.00143132,
+0.00190776,
+0.00246548,
+0.00314995,
+0.00393858,
+0.00502501,
+0.00693758,
+0.00995331,
+0.01395395,
+0.01816332,
+0.02248784,
+0.02806060,
+0.03582005,
+0.04774668,
+0.06795621,
+0.09842750,
+0.13108997,
+0.16221496,
+0.20486488,
+0.26488470,
+0.33784410,
+0.41558626,
+0.48567541,
+0.54882896,
+0.61466150,
+0.68475833,
+0.75228611,
+0.80736646,
+0.84246227,
+0.85754473,
+0.85841741,
+0.85407547,
+0.85129313,
+0.85144931,
+0.85321674,
+0.85405128,
+0.85387063,
+0.85555834,
+0.86252514,
+0.87558536,
+0.89251130,
+0.90900546,
+0.92154349,
+0.92918777,
+0.93306769,
+0.93515923,
+0.93666027,
+0.93739349,
+0.93661481,
+0.93379608,
+0.92929650,
+0.92442581,
+0.92058032,
+0.91895381,
+0.92090421,
+0.92631122,
+0.93455782,
+0.94463030,
+0.95473194,
+0.96364502,
+0.97043568,
+0.97436437,
+0.97495098,
+0.97200508,
+0.96636029,
+0.95962307,
+0.95371958,
+0.95061152,
+0.95192705,
+0.95818895,
+0.96856416,
+0.98070274,
+0.99142860,
+0.99788650,
+1.00000000,
+0.99910819,
+0.99808156,
+0.99650360,
+0.99314712,
+0.98404465,
+0.96550845,
+0.93867401,
+0.90804427,
+0.87480177,
+0.83387151,
+0.77606904,
+0.69859059,
+0.60871934,
+0.51759429,
+0.43125686,
+0.34977809,
+0.27392459,
+0.20473488,
+0.14738691,
+0.10459452,
+0.07555179,
+0.05654570,
+0.04380857,
+0.03477386,
+0.02793581,
+0.02225302,
+0.01751704,
+0.01359022,
+0.01046026,
+0.00814691,
+0.00649078,
+0.00530930,
+0.00446096,
+0.00383097,
+0.00333164,
+0.00292664,
+0.00257637,
+0.00225949,
+0.00198202,
+0.00172287,
+0.00150439,
+0.00130359,
+0.00113903,
+0.00099076,
+0.00086925,
+0.00076142,
+0.00067853,
+0.00060841,
+0.00055953,
+0.00051880,
+0.00049699,
+0.00047445,
+0.00045863,
+0.00044229,
+0.00042470,
+0.00040647,
+0.00038780,
+0.00035963,
+0.00033330,
+0.00029660,
+0.00027179,
+0.00024451,
+0.00022875,
+0.00021524,
+0.00021255,
+0.00021004,
+0.00021079,
+0.00021138,
+0.00021521,
+0.00021336,
+0.00021459,
+0.00020993,
+0.00020747,
+0.00019888,
+0.00019065,
+0.00018249,
+0.00017164,
+0.00016473,
+0.00015826,
+0.00015437,
+0.00015378,
+0.00015002,
+0.00015089,
+0.00015050,
+0.00015245,
+0.00015136,
+0.00015264,
+0.00015147,
+0.00015009,
+0.00014792,
+0.00014493,
+0.00014083,
+0.00013665,
+0.00013056,
+0.00012700,
+0.00012212,
+0.00011620,
+0.00011384,
+0.00010918,
+0.00010782,
+0.00010377,
+0.00010231,
+0.00010126,
+0.00010021,
+0.00009925,
+0.00009923,
+0.00009906,
+0.00009850,
+0.00009892,
+0.00009742,
+0.00009802,
+0.00009809,
+0.00009662,
+0.00009692,
+0.00009575,
+0.00009546,
+0.00009575,
+0.00009469,
+0.00009485,
+0.00009453,
+0.00009384,
+0.00009463,
+0.00009451,
+0.00009458,
+0.00009520,
+0.00009478,
+0.00009588,
+0.00009579,
+0.00009545,
+0.00009560,
+0.00009549,
+0.00009549,
+0.00009551,
+0.00009535,
+0.00009579,
+0.00009570,
+0.00009544,
+0.00009552,
+0.00009622,
+0.00009645,
+0.00009648,
+0.00009799,
+0.00009797,
+0.00009864,
+0.00009916,
+0.00010183,
+0.00010153,
+0.00010358,
+0.00010461,
+0.00010712,
+0.00010718,
+0.00011085,
+0.00011321,
+0.00011173,
+0.00011398,
+0.00011982,
+0.00011831,
+0.00012135,
+0.00012902,
+0.00012720,
+0.00013658,
+0.00013538,
+0.00014397,
+0.00014356,
+0.00015119,
+0.00015202,
+0.00015693,
+0.00015686,
+0.00015130,
+0.00015184,
+0.00013690,
+0.00013092,
+0.00013335,
+0.00011361,
+0.00010715,
+0.00010823,
+0.00009932,
+0.00009856,
+0.00009765,
+0.00009914,
+0.00010008,
+0.00010777,
+0.00010686,
+0.00011218,
+0.00012769,
+0.00012456,
+0.00014074,
+0.00014680,
+0.00014400,
+0.00015360,
+0.00015552,
+0.00015166,
+0.00015221,
+0.00014625,
+0.00014561,
+0.00013613,
+0.00013172,
+0.00013242,
+0.00012141,
+0.00012300,
+0.00011836,
+0.00010821,
+0.00010974,
+0.00010309,
+0.00010302,
+0.00010127,
+0.00009629,
+0.00009854,
+0.00009280,
+0.00009475,
+0.00009054,
+0.00009196,
+0.00008822,
+0.00008866,
+0.00008744,
+0.00008550,
+0.00008673,
+0.00008483,
+0.00008628,
+0.00008449,
+0.00009254,
+0.00008532,
+0.00009594,
+0.00008917,
+0.00009084,
+0.00010183,
+0.00009128,
+0.00010000,
+0.00008800,
+0.00009430,
+0.00008055,
+0.00008475,
+0.00007796,
+0.00007850,
+0.00007713,
+0.00007770,
+0.00007623,
+0.00007664,
+0.00007474,
+0.00007405,
+0.00007519,
+0.00007318,
+0.00007349,
+0.00007204,
+0.00007375,
+0.00007369,
+0.00007149,
+0.00007148,
+0.00007312,
+0.00007167,
+0.00007255,
+0.00007120,
+0.00007186,
+0.00007087,
+0.00007145,
+0.00007024,
+0.00007096,
+0.00007041,
+0.00007088,
+0.00006995,
+0.00007149,
+0.00006924,
+0.00007103,
+0.00006949,
+0.00007093,
+0.00006951,
+0.00007194,
+0.00007193,
+0.00006859,
+0.00006781,
+0.00007056,
+0.00006741,
+0.00006870,
+0.00006628,
+0.00006687,
+0.00006601,
+0.00006595,
+0.00006670,
+0.00006450,
+0.00006595,
+0.00006433,
+0.00006569,
+0.00006431,
+0.00006573,
+0.00006406,
+0.00006507,
+0.00006298,
+0.00006428,
+0.00006201,
+0.00006357,
+0.00006101,
+0.00006096,
+0.00006309,
+0.00006103,
+0.00006314,
+0.00006382,
+0.00006164,
+0.00006245,
+0.00006061,
+0.00005973,
+0.00006261,
+0.00005982,
+0.00006197,
+0.00005956,
+0.00006099,
+0.00005881,
+0.00005972,
+0.00006005,
+0.00005691,
+0.00005647,
+0.00005823,
+0.00005603,
+0.00005759,
+0.00005605,
+0.00005558,
+0.00005646,
+0.00005480,
+0.00005543,
+0.00005551,
+0.00005357,
+0.00005295,
+0.00005549,
+0.00005286,
+0.00005495,
+0.00005278,
+0.00005414,
+0.00005475,
+0.00005169,
+0.00005307,
+0.00005117,
+0.00005068,
+0.00005036,
+0.00005270,
+0.00004991,
+0.00005177,
+0.00005900,
+0.00004889,
+0.00006116,
+0.00005285,
+0.00006427,
+0.00005589,
+0.00006943,
+0.00006195,
+0.00007219,
+0.00007275,
+0.00006694,
+0.00007232,
+0.00006712,
+0.00007044,
+0.00006607,
+0.00007040,
+0.00007120,
+0.00006047,
+0.00006863,
+0.00006547,
+0.00005919,
+0.00006852,
+0.00005996,
+0.00006589,
+0.00006938,
+0.00006013,
+0.00007365,
+0.00006702,
+0.00007595,
+0.00008089,
+0.00006987,
+0.00008784,
+0.00007751,
+0.00009504,
+0.00010978,
+0.00008984,
+0.00012777,
+0.00010534,
+0.00014784,
+0.00012341,
+0.00017455,
+0.00018601,
+0.00015342,
+0.00020484,
+0.00017984,
+0.00018931,
+0.00022557,
+0.00022780,
+0.00021393,
+0.00022939,
+0.00023016,
+0.00021920,
+0.00021508,
+0.00022046,
+0.00020159,
+0.00021016,
+0.00018988,
+0.00019842,
+0.00017117,
+0.00018205,
+0.00015240,
+0.00014443,
+0.00015946,
+0.00014629,
+0.00012207,
+0.00013127,
+0.00010545,
+0.00011422,
+0.00009446,
+0.00009843,
+0.00008316,
+0.00008914,
+0.00008435,
+0.00006511,
+0.00007269,
+0.00006160,
+0.00006279,
+0.00005814,
+0.00005882,
+0.00005406,
+0.00005351,
+0.00005183,
+0.00005084,
+0.00004786,
+0.00004877,
+0.00004859,
+0.00004583,
+0.00004279,
+0.00004263,
+0.00004130,
+0.00004093,
+0.00004059,
+0.00004012,
+0.00004037,
+0.00004396,
+0.00004304,
+0.00004054,
+0.00004200,
+0.00004073,
+0.00004199,
+0.00004077,
+0.00004125,
+0.00003820,
+0.00003723,
+0.00003610,
+0.00003503,
+0.00003232,
+0.00003214,
+0.00003263,
+0.00003065,
+0.00003127,
+0.00002955,
+0.00002956,
+0.00002840,
+0.00002896,
+0.00002780,
+0.00002805,
+0.00002680,
+0.00002585,
+0.00002704,
+0.00002540,
+0.00002576,
+0.00002438,
+0.00002409,
+0.00002110,
+0.00002288,
+0.00001930,
+0.00002147,
+0.00001830,
+0.00001907,
+0.00001917,
+0.00001634,
+0.00001778,
+0.00001705,
+0.00001506,
+0.00001555,
+0.00001544,
+0.00001376,
+0.00001432,
+0.00001256,
+0.00001321,
+0.00001143,
+0.00001207,
+0.00001040,
+0.00001079,
+0.00001077,
+0.00000938,
+0.00000992,
+0.00000926,
+0.00000875,
+0.00000915,
+0.00000791,
+0.00000858,
+0.00000757,
+0.00000885,
+0.00000740,
+0.00000859,
+0.00000871,
+0.00000732,
+0.00000711
+        };
+      //B1 green band
+      const float b1[601] =
+        {
+0.00001010,
+0.00001389,
+0.00001902,
+0.00001356,
+0.00001327,
+0.00002873,
+0.00003122,
+0.00002184,
+0.00002860,
+0.00002274,
+0.00006723,
+0.00008343,
+0.00001226,
+0.00006171,
+0.00005563,
+0.00004426,
+0.00004539,
+0.00000677,
+0.00002035,
+0.00001522,
+0.00000528,
+0.00001865,
+0.00001834,
+0.00002028,
+0.00001608,
+0.00000017,
+0.00000057,
+0.00001313,
+0.00001658,
+0.00000224,
+0.00001983,
+0.00001885,
+0.00001859,
+0.00001975,
+0.00000023,
+0.00000139,
+0.00001634,
+0.00001789,
+0.00000616,
+0.00002267,
+0.00001903,
+0.00001956,
+0.00001844,
+0.00000342,
+0.00001448,
+0.00001340,
+0.00000774,
+0.00001880,
+0.00001632,
+0.00001912,
+0.00001915,
+0.00000950,
+0.00000865,
+0.00000927,
+0.00001089,
+0.00001236,
+0.00001349,
+0.00001273,
+0.00001062,
+0.00000958,
+0.00000938,
+0.00000973,
+0.00000998,
+0.00001014,
+0.00001042,
+0.00001060,
+0.00001115,
+0.00001174,
+0.00001254,
+0.00001338,
+0.00001400,
+0.00001431,
+0.00001481,
+0.00001528,
+0.00001646,
+0.00001812,
+0.00001991,
+0.00002232,
+0.00002548,
+0.00002855,
+0.00003235,
+0.00003705,
+0.00004200,
+0.00004766,
+0.00005414,
+0.00006070,
+0.00006821,
+0.00007648,
+0.00008464,
+0.00009410,
+0.00010524,
+0.00011803,
+0.00013402,
+0.00015319,
+0.00017614,
+0.00020243,
+0.00023094,
+0.00026260,
+0.00029673,
+0.00033499,
+0.00038048,
+0.00043594,
+0.00050952,
+0.00061362,
+0.00076395,
+0.00097908,
+0.00126923,
+0.00163382,
+0.00207590,
+0.00261314,
+0.00327921,
+0.00413303,
+0.00526369,
+0.00684627,
+0.00915649,
+0.01267648,
+0.01800685,
+0.02585007,
+0.03667779,
+0.05118064,
+0.07035894,
+0.09617429,
+0.13094754,
+0.17727190,
+0.23641290,
+0.30751157,
+0.38790047,
+0.47436827,
+0.56468213,
+0.65643377,
+0.74674718,
+0.82841738,
+0.89713046,
+0.94858047,
+0.98476388,
+1.00572477,
+1.01799762,
+1.02241761,
+1.02351216,
+1.02270186,
+1.02115905,
+1.01965328,
+1.01731773,
+1.01540955,
+1.01129946,
+1.00955329,
+1.00573235,
+1.00407549,
+1.00164097,
+1.00130077,
+0.99962912,
+1.00130006,
+1.00140898,
+1.00384853,
+1.00599723,
+1.00910590,
+1.01051975,
+1.01099594,
+1.00890543,
+1.00483865,
+0.99901144,
+0.99220799,
+0.98468953,
+0.97823873,
+0.97314859,
+0.97022501,
+0.96868569,
+0.97004107,
+0.97166154,
+0.97626613,
+0.98067188,
+0.98683373,
+0.99219054,
+0.99666299,
+1.00000000,
+0.99912543,
+0.99696320,
+0.99036225,
+0.98384547,
+0.97519907,
+0.96391617,
+0.94573906,
+0.91096960,
+0.85904551,
+0.79290657,
+0.72361833,
+0.65257621,
+0.57623116,
+0.48870213,
+0.39405229,
+0.29840580,
+0.21347365,
+0.14739732,
+0.10143634,
+0.07106678,
+0.05101665,
+0.03753145,
+0.02803887,
+0.02107987,
+0.01582745,
+0.01178705,
+0.00868732,
+0.00634606,
+0.00461992,
+0.00337907,
+0.00250694,
+0.00189987,
+0.00147499,
+0.00117574,
+0.00096470,
+0.00080813,
+0.00069267,
+0.00060187,
+0.00053101,
+0.00046977,
+0.00041864,
+0.00037515,
+0.00033197,
+0.00029595,
+0.00026098,
+0.00022974,
+0.00020299,
+0.00017878,
+0.00015870,
+0.00014470,
+0.00012912,
+0.00012281,
+0.00011148,
+0.00010580,
+0.00010508,
+0.00009942,
+0.00009982,
+0.00009664,
+0.00009667,
+0.00009589,
+0.00009628,
+0.00009600,
+0.00009459,
+0.00009484,
+0.00009162,
+0.00009246,
+0.00008883,
+0.00008616,
+0.00008688,
+0.00008318,
+0.00008295,
+0.00008153,
+0.00008262,
+0.00008265,
+0.00008855,
+0.00009224,
+0.00008974,
+0.00010120,
+0.00010537,
+0.00010299,
+0.00011271,
+0.00011213,
+0.00011810,
+0.00011639,
+0.00011824,
+0.00011152,
+0.00011302,
+0.00010361,
+0.00010441,
+0.00009482,
+0.00009519,
+0.00008675,
+0.00008735,
+0.00008078,
+0.00008067,
+0.00007509,
+0.00007486,
+0.00006895,
+0.00006944,
+0.00006375,
+0.00006358,
+0.00005878,
+0.00005896,
+0.00005523,
+0.00005501,
+0.00005343,
+0.00005281,
+0.00005140,
+0.00005170,
+0.00005134,
+0.00005138,
+0.00005107,
+0.00005085,
+0.00005096,
+0.00005018,
+0.00005046,
+0.00004904,
+0.00004833,
+0.00004769,
+0.00004781,
+0.00004694,
+0.00004600,
+0.00004584,
+0.00004562,
+0.00004584,
+0.00004525,
+0.00004562,
+0.00004612,
+0.00004747,
+0.00004854,
+0.00004734,
+0.00004932,
+0.00004894,
+0.00005047,
+0.00004972,
+0.00005030,
+0.00005129,
+0.00004999,
+0.00005048,
+0.00004864,
+0.00004901,
+0.00004923,
+0.00004719,
+0.00004950,
+0.00004776,
+0.00005348,
+0.00005702,
+0.00005214,
+0.00006320,
+0.00005556,
+0.00007144,
+0.00005903,
+0.00005649,
+0.00007807,
+0.00004800,
+0.00004042,
+0.00005618,
+0.00002571,
+0.00003251,
+0.00002175,
+0.00000592,
+0.00001077,
+0.00000286,
+0.00000380,
+0.00000323,
+0.00000149,
+0.00000247,
+0.00000112,
+0.00000145,
+0.00000111,
+0.00000139,
+0.00000105,
+0.00000141,
+0.00000097,
+0.00000085,
+0.00000123,
+0.00000158,
+0.00000089,
+0.00000137,
+0.00000086,
+0.00000158,
+0.00000202,
+0.00000091,
+0.00000174,
+0.00000102,
+0.00000200,
+0.00000128,
+0.00000479,
+0.00000149,
+0.00000719,
+0.00000417,
+0.00000502,
+0.00000963,
+0.00000561,
+0.00000984,
+0.00000949,
+0.00000318,
+0.00000643,
+0.00000153,
+0.00000184,
+0.00000116,
+0.00000173,
+0.00000086,
+0.00000185,
+0.00000089,
+0.00000193,
+0.00000096,
+0.00000196,
+0.00000116,
+0.00000200,
+0.00000115,
+0.00000195,
+0.00000131,
+0.00000197,
+0.00000125,
+0.00000187,
+0.00000099,
+0.00000070,
+0.00000049,
+0.00000119,
+0.00000051,
+0.00000135,
+0.00000086,
+0.00000153,
+0.00000104,
+0.00000186,
+0.00000156,
+0.00000205,
+0.00000293,
+0.00000170,
+0.00000296,
+0.00000182,
+0.00000266,
+0.00000171,
+0.00000236,
+0.00000240,
+0.00000093,
+0.00000174,
+0.00000183,
+0.00000096,
+0.00000144,
+0.00000177,
+0.00000076,
+0.00000198,
+0.00000079,
+0.00000160,
+0.00000058,
+0.00000154,
+0.00000070,
+0.00000161,
+0.00000076,
+0.00000068,
+0.00000245,
+0.00000079,
+0.00000299,
+0.00000128,
+0.00000285,
+0.00000154,
+0.00000296,
+0.00000178,
+0.00000333,
+0.00000130,
+0.00000347,
+0.00000220,
+0.00000159,
+0.00000449,
+0.00000188,
+0.00000635,
+0.00000903,
+0.00000344,
+0.00001051,
+0.00000601,
+0.00000991,
+0.00001299,
+0.00000632,
+0.00001514,
+0.00000941,
+0.00001426,
+0.00000749,
+0.00001524,
+0.00000887,
+0.00000743,
+0.00001404,
+0.00000558,
+0.00001092,
+0.00001135,
+0.00000460,
+0.00001024,
+0.00000547,
+0.00001036,
+0.00000503,
+0.00001140,
+0.00000557,
+0.00001124,
+0.00000612,
+0.00001120,
+0.00000642,
+0.00001093,
+0.00000638,
+0.00001191,
+0.00000531,
+0.00000907,
+0.00000487,
+0.00000794,
+0.00000998,
+0.00000316,
+0.00000322,
+0.00001260,
+0.00000365,
+0.00000446,
+0.00001209,
+0.00000567,
+0.00001173,
+0.00000705,
+0.00001006,
+0.00000466,
+0.00000325,
+0.00000921,
+0.00000755,
+0.00000493,
+0.00000922,
+0.00000673,
+0.00001643,
+0.00001135,
+0.00001160,
+0.00002335,
+0.00001573,
+0.00002364,
+0.00001931,
+0.00002613,
+0.00002318,
+0.00001698,
+0.00001954,
+0.00001127,
+0.00001395,
+0.00001618,
+0.00000862,
+0.00001383,
+0.00000962,
+0.00000696,
+0.00000696,
+0.00000561,
+0.00000807,
+0.00000905,
+0.00000632,
+0.00000850,
+0.00000820,
+0.00001222,
+0.00000921,
+0.00001027,
+0.00001204,
+0.00001323,
+0.00001373,
+0.00001579,
+0.00001521,
+0.00002156,
+0.00001894,
+0.00002375,
+0.00002243,
+0.00002409,
+0.00002019,
+0.00002182,
+0.00001452,
+0.00001755,
+0.00001475,
+0.00000805,
+0.00001071,
+0.00000537,
+0.00000682,
+0.00000663,
+0.00000526,
+0.00000418,
+0.00000477,
+0.00000426,
+0.00000405,
+0.00000367,
+0.00000399,
+0.00000340,
+0.00000339,
+0.00000169,
+0.00000178,
+0.00000242,
+0.00000171,
+0.00000172,
+0.00000233,
+0.00000182,
+0.00000230,
+0.00000204,
+0.00000245,
+0.00000243,
+0.00000136,
+0.00000259,
+0.00000105,
+0.00000239,
+0.00000090,
+0.00000213,
+0.00000104,
+0.00000226,
+0.00000088,
+0.00000229,
+0.00000065,
+0.00000246,
+0.00000063,
+0.00000238,
+0.00000072,
+0.00000210,
+0.00000091,
+0.00000122,
+0.00000184,
+0.00000177,
+0.00000066,
+0.00000153,
+0.00000065,
+0.00000147,
+0.00000054,
+0.00000145,
+0.00000023,
+0.00000134,
+0.00000029,
+0.00000141,
+0.00000045,
+0.00000127,
+0.00000146,
+0.00000040,
+0.00000142,
+0.00000038
+        };
+      //B2 red band
+      const float b2[601] =
+        {
+0.00001168,
+0.00001419,
+0.00001348,
+0.00000996,
+0.00001009,
+0.00001366,
+0.00003289,
+0.00001748,
+0.00002207,
+0.00002377,
+0.00002383,
+0.00002470,
+0.00001811,
+0.00001353,
+0.00001155,
+0.00001303,
+0.00001374,
+0.00001126,
+0.00000712,
+0.00000464,
+0.00000438,
+0.00000381,
+0.00000312,
+0.00000581,
+0.00000319,
+0.00000473,
+0.00000585,
+0.00000644,
+0.00000967,
+0.00000918,
+0.00000742,
+0.00001090,
+0.00001649,
+0.00002016,
+0.00001631,
+0.00001673,
+0.00001578,
+0.00001766,
+0.00002209,
+0.00003114,
+0.00003091,
+0.00001848,
+0.00003451,
+0.00003492,
+0.00004332,
+0.00004770,
+0.00004658,
+0.00004547,
+0.00004239,
+0.00005155,
+0.00005834,
+0.00006365,
+0.00005824,
+0.00004581,
+0.00003799,
+0.00003584,
+0.00003689,
+0.00003817,
+0.00003951,
+0.00004017,
+0.00003987,
+0.00003754,
+0.00003651,
+0.00003781,
+0.00003645,
+0.00003408,
+0.00003160,
+0.00003251,
+0.00003509,
+0.00003935,
+0.00004494,
+0.00005115,
+0.00005707,
+0.00006145,
+0.00006038,
+0.00005716,
+0.00005354,
+0.00004978,
+0.00004759,
+0.00004735,
+0.00005985,
+0.00006501,
+0.00005803,
+0.00006474,
+0.00006650,
+0.00006908,
+0.00006585,
+0.00005102,
+0.00003616,
+0.00002648,
+0.00002034,
+0.00001645,
+0.00001363,
+0.00001142,
+0.00000950,
+0.00000755,
+0.00000648,
+0.00000560,
+0.00000476,
+0.00000466,
+0.00000444,
+0.00000389,
+0.00000408,
+0.00000399,
+0.00000392,
+0.00000436,
+0.00000413,
+0.00000397,
+0.00000424,
+0.00000400,
+0.00000389,
+0.00000385,
+0.00000390,
+0.00000379,
+0.00000357,
+0.00000383,
+0.00000386,
+0.00000378,
+0.00000439,
+0.00000377,
+0.00000416,
+0.00000494,
+0.00000455,
+0.00000553,
+0.00000605,
+0.00000613,
+0.00000672,
+0.00000696,
+0.00000744,
+0.00000760,
+0.00000766,
+0.00000770,
+0.00000725,
+0.00000682,
+0.00000716,
+0.00000758,
+0.00000759,
+0.00000722,
+0.00000805,
+0.00000826,
+0.00000816,
+0.00000835,
+0.00000798,
+0.00000798,
+0.00000796,
+0.00000817,
+0.00000856,
+0.00000897,
+0.00000920,
+0.00000935,
+0.00000980,
+0.00001003,
+0.00000998,
+0.00001038,
+0.00001044,
+0.00001035,
+0.00001090,
+0.00001143,
+0.00001155,
+0.00001240,
+0.00001322,
+0.00001374,
+0.00001466,
+0.00001507,
+0.00001561,
+0.00001799,
+0.00001806,
+0.00001990,
+0.00002207,
+0.00002400,
+0.00002768,
+0.00003153,
+0.00003519,
+0.00003855,
+0.00004048,
+0.00004339,
+0.00004685,
+0.00004712,
+0.00004885,
+0.00005031,
+0.00005058,
+0.00005380,
+0.00006109,
+0.00006875,
+0.00008360,
+0.00010367,
+0.00013385,
+0.00017220,
+0.00021349,
+0.00025613,
+0.00029745,
+0.00033957,
+0.00038077,
+0.00042014,
+0.00045664,
+0.00049082,
+0.00052462,
+0.00057202,
+0.00064046,
+0.00073788,
+0.00088389,
+0.00109195,
+0.00138377,
+0.00179072,
+0.00234897,
+0.00310035,
+0.00409611,
+0.00539886,
+0.00764596,
+0.00982485,
+0.01250677,
+0.01576553,
+0.01971871,
+0.02460136,
+0.03076162,
+0.03870973,
+0.04932564,
+0.06405112,
+0.08527458,
+0.11683854,
+0.16336997,
+0.22811553,
+0.30778033,
+0.39105868,
+0.46939880,
+0.54633346,
+0.62987089,
+0.71765372,
+0.80227884,
+0.87400338,
+0.92669327,
+0.95728386,
+0.97246242,
+0.98093913,
+0.98815314,
+0.99512479,
+1.00000000,
+1.00071278,
+0.99509151,
+0.98322813,
+0.96618038,
+0.94726377,
+0.92911907,
+0.91427200,
+0.90407257,
+0.89868685,
+0.89729260,
+0.90048309,
+0.90619876,
+0.91486402,
+0.92548194,
+0.93716217,
+0.95109280,
+0.96341044,
+0.97756310,
+0.98873468,
+1.00002059,
+1.00784176,
+1.01361246,
+1.01518655,
+1.01365106,
+1.00889905,
+1.00094470,
+0.99098939,
+0.97907661,
+0.96736515,
+0.95491923,
+0.94403019,
+0.93408742,
+0.92588661,
+0.91979557,
+0.91551236,
+0.91345541,
+0.91406966,
+0.91586446,
+0.92112352,
+0.92637606,
+0.93343259,
+0.93977000,
+0.94511856,
+0.94655018,
+0.94482431,
+0.93695460,
+0.92470622,
+0.90515848,
+0.87651239,
+0.84722733,
+0.81626058,
+0.77926628,
+0.74095072,
+0.69853161,
+0.65530863,
+0.60957078,
+0.56408506,
+0.51760530,
+0.47150814,
+0.42482252,
+0.37706746,
+0.32909071,
+0.28093192,
+0.23513938,
+0.19289082,
+0.15584587,
+0.12438828,
+0.09857760,
+0.07759031,
+0.06074302,
+0.04708451,
+0.03618668,
+0.02749464,
+0.02064713,
+0.01533676,
+0.01131374,
+0.00832392,
+0.00613477,
+0.00454626,
+0.00340798,
+0.00258536,
+0.00199356,
+0.00156305,
+0.00125005,
+0.00101327,
+0.00085049,
+0.00071368,
+0.00062520,
+0.00054959,
+0.00049985,
+0.00047162,
+0.00043891,
+0.00042848,
+0.00040347,
+0.00038227,
+0.00035692,
+0.00033769,
+0.00030789,
+0.00029814,
+0.00024879,
+0.00021170,
+0.00018471,
+0.00013393,
+0.00012509,
+0.00007240,
+0.00006419,
+0.00003891,
+0.00003294,
+0.00002353,
+0.00002711,
+0.00001690,
+0.00001474,
+0.00001598,
+0.00001292,
+0.00001366,
+0.00001329,
+0.00001411,
+0.00002354,
+0.00009563,
+0.00012882,
+0.00011528,
+0.00001687,
+0.00015343,
+0.00012777,
+0.00015354,
+0.00024298,
+0.00015520,
+0.00024274,
+0.00012696,
+0.00014910,
+0.00000979,
+0.00000629,
+0.00000738,
+0.00000483,
+0.00000489,
+0.00000536,
+0.00000458,
+0.00000528,
+0.00000438,
+0.00000475,
+0.00000446,
+0.00000488,
+0.00000456,
+0.00000547,
+0.00000448,
+0.00000478,
+0.00000435,
+0.00000470,
+0.00000425,
+0.00000458,
+0.00000435,
+0.00000380,
+0.00000373,
+0.00000298,
+0.00000390,
+0.00000278,
+0.00000290,
+0.00000277,
+0.00000307,
+0.00000247,
+0.00000231,
+0.00000301,
+0.00000293,
+0.00000319,
+0.00000351,
+0.00000323,
+0.00000339,
+0.00000318,
+0.00000318,
+0.00000396,
+0.00000313,
+0.00000364,
+0.00000310,
+0.00000419,
+0.00000349,
+0.00000396,
+0.00000341,
+0.00000365,
+0.00000362,
+0.00000290,
+0.00000345,
+0.00000289,
+0.00000288,
+0.00000429,
+0.00000323,
+0.00000329,
+0.00000329,
+0.00000455,
+0.00000497,
+0.00000353,
+0.00000556,
+0.00000383,
+0.00000507,
+0.00000482,
+0.00000484,
+0.00000546,
+0.00000374,
+0.00000601,
+0.00000422,
+0.00000512,
+0.00000509,
+0.00000286,
+0.00000637,
+0.00000539,
+0.00000579,
+0.00000462,
+0.00000647,
+0.00000604,
+0.00000432,
+0.00000662,
+0.00000521,
+0.00000680,
+0.00001180,
+0.00000638,
+0.00000805,
+0.00000389,
+0.00001200,
+0.00001134,
+0.00000562,
+0.00001181,
+0.00000868,
+0.00001541,
+0.00001086,
+0.00001222,
+0.00000823,
+0.00000960,
+0.00000871,
+0.00001051,
+0.00001235,
+0.00000864,
+0.00001357,
+0.00001158,
+0.00001522,
+0.00001091,
+0.00001237,
+0.00000928,
+0.00000973,
+0.00000865,
+0.00001333,
+0.00000847,
+0.00001329,
+0.00000740,
+0.00000974,
+0.00001229,
+0.00001128,
+0.00000704,
+0.00001244,
+0.00000915,
+0.00001448,
+0.00001164,
+0.00000861,
+0.00001441,
+0.00000700,
+0.00001461,
+0.00001401,
+0.00001007,
+0.00001695,
+0.00002042,
+0.00002108,
+0.00003064,
+0.00003171,
+0.00004339,
+0.00004171,
+0.00005692,
+0.00007019,
+0.00007121,
+0.00007122,
+0.00008504,
+0.00007450,
+0.00008010,
+0.00008936,
+0.00008826,
+0.00008831,
+0.00009721,
+0.00009019,
+0.00008741,
+0.00008467,
+0.00007373,
+0.00006748,
+0.00006984,
+0.00005307,
+0.00004844,
+0.00005417,
+0.00004482,
+0.00004483,
+0.00003814,
+0.00003524,
+0.00002726,
+0.00002455,
+0.00002566,
+0.00002043,
+0.00001759,
+0.00001473,
+0.00001512,
+0.00001132,
+0.00000862,
+0.00001262,
+0.00000857,
+0.00000918,
+0.00000689,
+0.00000671,
+0.00000434,
+0.00000648,
+0.00000513,
+0.00000748,
+0.00000691,
+0.00000789,
+0.00000754,
+0.00000715,
+0.00000806,
+0.00000701,
+0.00000449,
+0.00000640,
+0.00000595,
+0.00000877,
+0.00000724,
+0.00000837,
+0.00000733,
+0.00000815,
+0.00000621,
+0.00000755,
+0.00000444,
+0.00000580,
+0.00000524,
+0.00000343,
+0.00000356,
+0.00000340,
+0.00000361,
+0.00000245,
+0.00000146,
+0.00000232,
+0.00000165,
+0.00000168,
+0.00000491,
+0.00000168,
+0.00000411,
+0.00000122,
+0.00000367,
+0.00000244,
+0.00000179,
+0.00000395,
+0.00000177,
+0.00000108,
+0.00000330,
+0.00000166,
+0.00000258,
+0.00000204,
+0.00000054,
+0.00000259,
+0.00000133,
+0.00000205,
+0.00000101,
+0.00000210,
+0.00000084,
+0.00000090,
+0.00000176,
+0.00000079,
+0.00000165,
+0.00000071,
+0.00000173,
+0.00000070,
+0.00000043,
+0.00000056,
+0.00000159
+        };
+      //B3 nir band
+      const float b3[601] =
+        {
+0.00000184,
+0.00000202,
+0.00000371,
+0.00000470,
+0.00000487,
+0.00000512,
+0.00000521,
+0.00000490,
+0.00000308,
+0.00000160,
+0.00000126,
+0.00000131,
+0.00000119,
+0.00000105,
+0.00000082,
+0.00000078,
+0.00000076,
+0.00000059,
+0.00000058,
+0.00000052,
+0.00000064,
+0.00000070,
+0.00000068,
+0.00000068,
+0.00000079,
+0.00000093,
+0.00000124,
+0.00000092,
+0.00000124,
+0.00000117,
+0.00000125,
+0.00000129,
+0.00000121,
+0.00000153,
+0.00000149,
+0.00000148,
+0.00000139,
+0.00000166,
+0.00000211,
+0.00000193,
+0.00000241,
+0.00000211,
+0.00000228,
+0.00000294,
+0.00000406,
+0.00000507,
+0.00001753,
+0.00062612,
+0.00099041,
+0.00038281,
+0.00084800,
+0.00090343,
+0.00098820,
+0.00100027,
+0.00030612,
+0.00003473,
+0.00002650,
+0.00002396,
+0.00002429,
+0.00002735,
+0.00003712,
+0.00005612,
+0.00007768,
+0.00008914,
+0.00009611,
+0.00010759,
+0.00011246,
+0.00011011,
+0.00009290,
+0.00006854,
+0.00005014,
+0.00003890,
+0.00003142,
+0.00002673,
+0.00002266,
+0.00002061,
+0.00002008,
+0.00002029,
+0.00002207,
+0.00002564,
+0.00003063,
+0.00003885,
+0.00004812,
+0.00005996,
+0.00007077,
+0.00007965,
+0.00008609,
+0.00008841,
+0.00008691,
+0.00008090,
+0.00007026,
+0.00005867,
+0.00004706,
+0.00003684,
+0.00002888,
+0.00002252,
+0.00001864,
+0.00001631,
+0.00001512,
+0.00001579,
+0.00001740,
+0.00002076,
+0.00002500,
+0.00002970,
+0.00003324,
+0.00003568,
+0.00003719,
+0.00003637,
+0.00003522,
+0.00003204,
+0.00002806,
+0.00002554,
+0.00002401,
+0.00002509,
+0.00002676,
+0.00003097,
+0.00003703,
+0.00004613,
+0.00006025,
+0.00007876,
+0.00010325,
+0.00012473,
+0.00014349,
+0.00015902,
+0.00017128,
+0.00017677,
+0.00017814,
+0.00017111,
+0.00016498,
+0.00016271,
+0.00016590,
+0.00017244,
+0.00018189,
+0.00018854,
+0.00019224,
+0.00019405,
+0.00019354,
+0.00018898,
+0.00018087,
+0.00017218,
+0.00016359,
+0.00015899,
+0.00015586,
+0.00015606,
+0.00015819,
+0.00016068,
+0.00016530,
+0.00016816,
+0.00017049,
+0.00017164,
+0.00017169,
+0.00017074,
+0.00017054,
+0.00016913,
+0.00016744,
+0.00016766,
+0.00016951,
+0.00017426,
+0.00018167,
+0.00019232,
+0.00020428,
+0.00021790,
+0.00023244,
+0.00024402,
+0.00025416,
+0.00026158,
+0.00026375,
+0.00026297,
+0.00026655,
+0.00026988,
+0.00027504,
+0.00028070,
+0.00028807,
+0.00030046,
+0.00031707,
+0.00033920,
+0.00036610,
+0.00039570,
+0.00043575,
+0.00048703,
+0.00053825,
+0.00057909,
+0.00060314,
+0.00061674,
+0.00061491,
+0.00059039,
+0.00054258,
+0.00047833,
+0.00039787,
+0.00031987,
+0.00025214,
+0.00019590,
+0.00015376,
+0.00012305,
+0.00010304,
+0.00008730,
+0.00007548,
+0.00006686,
+0.00006139,
+0.00005448,
+0.00005006,
+0.00004759,
+0.00004287,
+0.00003904,
+0.00003667,
+0.00003331,
+0.00003138,
+0.00002877,
+0.00002657,
+0.00002417,
+0.00002328,
+0.00002129,
+0.00002036,
+0.00001896,
+0.00001779,
+0.00001738,
+0.00001579,
+0.00001598,
+0.00001498,
+0.00001430,
+0.00001381,
+0.00001310,
+0.00001315,
+0.00001249,
+0.00001236,
+0.00001250,
+0.00001178,
+0.00001194,
+0.00001165,
+0.00001136,
+0.00001177,
+0.00001162,
+0.00001149,
+0.00001162,
+0.00001162,
+0.00001183,
+0.00001163,
+0.00001211,
+0.00001182,
+0.00001142,
+0.00001146,
+0.00001129,
+0.00001064,
+0.00001038,
+0.00001123,
+0.00001061,
+0.00001039,
+0.00001007,
+0.00001068,
+0.00001053,
+0.00001131,
+0.00001150,
+0.00001210,
+0.00001199,
+0.00001228,
+0.00001244,
+0.00001267,
+0.00001226,
+0.00001236,
+0.00001242,
+0.00001236,
+0.00001227,
+0.00001222,
+0.00001218,
+0.00001214,
+0.00001206,
+0.00001202,
+0.00001242,
+0.00001231,
+0.00001283,
+0.00001325,
+0.00001395,
+0.00001410,
+0.00001399,
+0.00001534,
+0.00001580,
+0.00001690,
+0.00001748,
+0.00001885,
+0.00001898,
+0.00001988,
+0.00002137,
+0.00002320,
+0.00002504,
+0.00002641,
+0.00002837,
+0.00003079,
+0.00003251,
+0.00003533,
+0.00003740,
+0.00004081,
+0.00004361,
+0.00004639,
+0.00004986,
+0.00005346,
+0.00005805,
+0.00006226,
+0.00006694,
+0.00007188,
+0.00007800,
+0.00008485,
+0.00009055,
+0.00010008,
+0.00010713,
+0.00011933,
+0.00012975,
+0.00014324,
+0.00015785,
+0.00017539,
+0.00019507,
+0.00021689,
+0.00024318,
+0.00027135,
+0.00030518,
+0.00034281,
+0.00039712,
+0.00044651,
+0.00050188,
+0.00056707,
+0.00063984,
+0.00072378,
+0.00081879,
+0.00092782,
+0.00105511,
+0.00120160,
+0.00137088,
+0.00156792,
+0.00180276,
+0.00207920,
+0.00240799,
+0.00280298,
+0.00327494,
+0.00384821,
+0.00454832,
+0.00540493,
+0.00645469,
+0.00774941,
+0.00936399,
+0.01137832,
+0.01388118,
+0.01700597,
+0.02092752,
+0.02586928,
+0.03206911,
+0.03985523,
+0.04956652,
+0.06173849,
+0.07680296,
+0.09550239,
+0.11837088,
+0.14615821,
+0.19110224,
+0.23178705,
+0.27801636,
+0.33031673,
+0.38771033,
+0.44914649,
+0.51370254,
+0.57939644,
+0.64484781,
+0.70835304,
+0.76788190,
+0.82252523,
+0.87063314,
+0.91086251,
+0.94360264,
+0.96734308,
+0.98447500,
+0.99402844,
+0.99904759,
+1.00000000,
+0.99829749,
+0.99534944,
+0.99113813,
+0.98712837,
+0.98344438,
+0.97955733,
+0.97683333,
+0.97381307,
+0.97171326,
+0.96937935,
+0.96682308,
+0.96494693,
+0.96155704,
+0.95914861,
+0.95524656,
+0.95141098,
+0.94725240,
+0.94238136,
+0.93805030,
+0.93299243,
+0.92787669,
+0.92261726,
+0.91765026,
+0.91344782,
+0.90866986,
+0.90481152,
+0.90031693,
+0.89720732,
+0.89342505,
+0.89040645,
+0.88745245,
+0.88446834,
+0.88140255,
+0.87825555,
+0.87487903,
+0.87077850,
+0.86665463,
+0.86193864,
+0.85704385,
+0.85203260,
+0.84608531,
+0.84067874,
+0.83464870,
+0.82847182,
+0.82237664,
+0.81646034,
+0.81067178,
+0.80547624,
+0.79996761,
+0.79538371,
+0.79048464,
+0.78593335,
+0.78246221,
+0.77854086,
+0.77505353,
+0.77183963,
+0.76834628,
+0.76559075,
+0.76238953,
+0.75915219,
+0.75631414,
+0.75288758,
+0.74984835,
+0.74648701,
+0.74311251,
+0.73936992,
+0.73559705,
+0.73163277,
+0.72765295,
+0.72334537,
+0.71892768,
+0.71424776,
+0.70932732,
+0.70417024,
+0.69865547,
+0.69314542,
+0.68706957,
+0.68120878,
+0.67553032,
+0.66989091,
+0.66440763,
+0.65922988,
+0.65415969,
+0.64965635,
+0.64537477,
+0.64153052,
+0.63820324,
+0.63506916,
+0.63264959,
+0.62992135,
+0.62726732,
+0.62445640,
+0.62156999,
+0.61847181,
+0.61501909,
+0.61133939,
+0.60744762,
+0.60314205,
+0.59883705,
+0.59425662,
+0.58928886,
+0.58381508,
+0.57719033,
+0.56857851,
+0.55699311,
+0.54163099,
+0.52202898,
+0.49847084,
+0.47191641,
+0.44270534,
+0.41155122,
+0.37843868,
+0.34304355,
+0.30590964,
+0.26730226,
+0.22805403,
+0.18974714,
+0.15369596,
+0.12145605,
+0.09413162,
+0.07189929,
+0.05457376,
+0.04144546,
+0.03158417,
+0.02425525,
+0.01879617,
+0.01470317,
+0.01163795,
+0.00930858,
+0.00744330,
+0.00607348,
+0.00501379,
+0.00413379,
+0.00347084,
+0.00293573,
+0.00250919,
+0.00215786,
+0.00186591,
+0.00163284,
+0.00142997,
+0.00127599,
+0.00112918,
+0.00102171,
+0.00091069,
+0.00083541,
+0.00075489,
+0.00069931,
+0.00063879,
+0.00059080,
+0.00055023,
+0.00050660,
+0.00047777,
+0.00044789,
+0.00041317,
+0.00039493,
+0.00035947,
+0.00033744,
+0.00031989,
+0.00028719,
+0.00027707,
+0.00025430,
+0.00023132,
+0.00022543,
+0.00019537,
+0.00018380,
+0.00016713,
+0.00014542,
+0.00013876,
+0.00011616,
+0.00011019,
+0.00009086,
+0.00009183,
+0.00006774,
+0.00006181,
+0.00006360,
+0.00004633,
+0.00005224,
+0.00003735,
+0.00003902,
+0.00002393,
+0.00003180,
+0.00001716,
+0.00001762,
+0.00002033,
+0.00001262,
+0.00001259,
+0.00001118,
+0.00001421,
+0.00000830,
+0.00001294,
+0.00000699,
+0.00000782,
+0.00000718,
+0.00000642,
+0.00000548,
+0.00000427,
+0.00000417,
+0.00000440,
+0.00000377,
+0.00000253,
+0.00000456,
+0.00000202,
+0.00000373,
+0.00000325,
+0.00000341,
+0.00000232,
+0.00000301,
+0.00000117,
+0.00000319,
+0.00000169,
+0.00000286,
+0.00000184,
+0.00000260,
+0.00000212,
+0.00000293,
+0.00000175,
+0.00000229,
+0.00000126,
+0.00000232,
+0.00000099,
+0.00000250,
+0.00000135,
+0.00000090,
+0.00000289,
+0.00000070,
+0.00000210,
+0.00000118,
+0.00000072,
+0.00000182,
+0.00000111
+        };
+      //Add multispectral bands to the temporary list
+      const std::vector<float> vb0 (b0, b0 + sizeof(b0) / sizeof(float) );
+      const std::vector<float> vb1 (b1, b1 + sizeof(b1) / sizeof(float) );
+      const std::vector<float> vb2 (b2, b2 + sizeof(b2) / sizeof(float) );
+      const std::vector<float> vb3 (b3, b3 + sizeof(b3) / sizeof(float) );
+      //For Spot6 MS image the order of band is: B2 B1 B0 B3
+      //(BandIndexToWavelength method could be used here)
+      tmpSpectralBandList.push_back(vb2);
+      tmpSpectralBandList.push_back(vb1);
+      tmpSpectralBandList.push_back(vb0);
+      tmpSpectralBandList.push_back(vb3);
+      }
+    else
+      {
+      itkExceptionMacro(<< "Invalid Spot6 Sensor ID");
+      }
+    }
+  else
+    {
+    itkExceptionMacro(<< "Invalid number of bands...");
+    }
+
+  unsigned int j = 0;
+  for (std::list <std::vector<float> >::const_iterator it = tmpSpectralBandList.begin(); it != tmpSpectralBandList.end(); ++it)
+    {
+    wavelengthSpectralBand->PushBack(FilterFunctionValues::New());
+    wavelengthSpectralBand->GetNthElement(j)->SetFilterFunctionValues(*it);
+    wavelengthSpectralBand->GetNthElement(j)->SetMinSpectralValue(0.4);
+    wavelengthSpectralBand->GetNthElement(j)->SetMaxSpectralValue(1.0);
+    wavelengthSpectralBand->GetNthElement(j)->SetUserStep(0.001);
+    ++j;
+    }
+  return wavelengthSpectralBand;
+}
+
+} // end namespace otb
diff --git a/Code/IO/otbSpot6ImageMetadataInterface.h b/Code/IO/otbSpot6ImageMetadataInterface.h
new file mode 100644
index 0000000..c56fea3
--- /dev/null
+++ b/Code/IO/otbSpot6ImageMetadataInterface.h
@@ -0,0 +1,135 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef __otbSpot6ImageMetadataInterface_h
+#define __otbSpot6ImageMetadataInterface_h
+
+#include "otbOpticalImageMetadataInterface.h"
+
+namespace otb
+{
+/** \class Spot6ImageMetadataInterface
+ *
+ * \brief Creation of an "otb" Spot6ImageMetadataInterface that gets metadata.
+ *
+ */
+class ITK_EXPORT Spot6ImageMetadataInterface : public OpticalImageMetadataInterface
+{
+public:
+
+  typedef Spot6ImageMetadataInterface    Self;
+  typedef OpticalImageMetadataInterface    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(Spot6ImageMetadataInterface, OpticalImageMetadataInterface);
+
+  typedef Superclass::ImageType                ImageType;
+  typedef Superclass::MetaDataDictionaryType   MetaDataDictionaryType;
+  typedef Superclass::VectorType               VectorType;
+  typedef Superclass::VariableLengthVectorType VariableLengthVectorType;
+  typedef Superclass::ImageKeywordlistType     ImageKeywordlistType;
+
+  /** Get the radiometric bias from the ossim metadata */
+  VariableLengthVectorType GetPhysicalBias() const;
+
+  /** Get the radiometric gain from the ossim metadata */
+  VariableLengthVectorType GetPhysicalGain() const;
+
+  /** Get the solar irradiance from the ossim metadata */
+  VariableLengthVectorType GetSolarIrradiance() const;
+
+  /** Get the imaging acquisition day from the ossim metadata : IMAGING_DATE metadata variable */
+  int GetDay() const;
+
+  /** Get the imaging acquisition month from the ossim metadata : IMAGING_DATE metadata variable */
+  int GetMonth() const;
+
+  /** Get the imaging acquisition year from the ossim metadata : IMAGING_DATE metadata variable */
+  int GetYear() const;
+
+  /** Get the imaging acquisition hour from the ossim metadata : IMAGING_DATE metadata variable */
+  int GetHour() const;
+
+  /** Get the imaging acquisition year from the ossim metadata : IMAGING_DATE metadata variable */
+  int GetMinute() const;
+
+  /** Get the imaging production day from the ossim metadata : DATASET_PRODUCTION_DATE metadata variable */
+  int GetProductionDay() const;
+
+  /** Get the imaging production month from the ossim metadata : DATASET_PRODUCTION_DATE metadata variable */
+  int GetProductionMonth() const;
+
+  /** Get the imaging production year from the ossim metadata : DATASET_PRODUCTION_DATE metadata variable */
+  int GetProductionYear() const;
+
+  /** Get the sat elevation from the ossim metadata */
+  double GetSatElevation() const;
+
+  /** Get the sat azimuth from the ossim metadata */
+  double GetSatAzimuth() const;
+
+  /** Get the first wavelength for the spectral band definition */
+  VariableLengthVectorType GetFirstWavelengths() const;
+
+  /** Get the last wavelength for the spectral band definition */
+  VariableLengthVectorType GetLastWavelengths() const;
+
+  /** Get Instrument */
+  std::string GetInstrument() const;
+
+  /** Get Instrument Index */
+  std::string GetInstrumentIndex() const;
+
+  /** This method is to handle the permutation of the spectral band by some image provider
+   * in most cases, this method won't change the value, but for SPOT data, the bands are set up as
+   *  2 1 0 3 in the tiff file, this method which is overloaded for SPOT enables to retrieve the
+   *  proper band. */
+  unsigned int BandIndexToWavelengthPosition(unsigned int i) const;
+
+  /** Get the 3 spectral band numbers corresponding to the default display for visualization,
+   *  in the order R, G, B */
+  std::vector<unsigned int> GetDefaultDisplay() const;
+
+  bool CanRead() const;
+
+  /** Get the enhanced band names of the Spot6 data */
+  std::vector<std::string> GetEnhancedBandNames() const;
+
+
+  /** Vector that contains the filter function value in 6S format (step of 0.0025 micro m).
+     * There values a computed by 6S. */
+  WavelengthSpectralBandVectorType GetSpectralSensitivity()  const;
+
+protected:
+  Spot6ImageMetadataInterface();
+  virtual ~Spot6ImageMetadataInterface() {}
+
+private:
+
+  Spot6ImageMetadataInterface(const Self &); //purposely not implemented
+  void operator =(const Self&); //purposely not implemented
+
+};
+
+} // end namespace otb
+
+#endif
diff --git a/Code/IO/otbSpot6ImageMetadataInterfaceFactory.cxx b/Code/IO/otbSpot6ImageMetadataInterfaceFactory.cxx
new file mode 100644
index 0000000..efad155
--- /dev/null
+++ b/Code/IO/otbSpot6ImageMetadataInterfaceFactory.cxx
@@ -0,0 +1,60 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+
+#include <typeinfo>
+#include <cassert>
+
+#include "otbMacro.h"
+
+#include "otbSpot6ImageMetadataInterfaceFactory.h"
+#include "otbSpot6ImageMetadataInterface.h"
+
+#include "itkCreateObjectFunction.h"
+#include "itkVersion.h"
+
+namespace otb
+{
+Spot6ImageMetadataInterfaceFactory
+::Spot6ImageMetadataInterfaceFactory()
+{
+  this->RegisterOverride("OpticalImageMetadataInterface",
+                         "otbSpot6ImageMetadataInterface",
+                         "Spot6 Metadata Interface",
+                         1,
+                         itk::CreateObjectFunction<Spot6ImageMetadataInterface>::New());
+}
+
+Spot6ImageMetadataInterfaceFactory
+::~Spot6ImageMetadataInterfaceFactory()
+{
+}
+
+const char*
+Spot6ImageMetadataInterfaceFactory::GetITKSourceVersion(void) const
+{
+  return ITK_SOURCE_VERSION;
+}
+
+const char*
+Spot6ImageMetadataInterfaceFactory::GetDescription() const
+{
+  return "Spot6 Metadata Interface Factory, handle Spot6 metadata in OTB";
+}
+
+} // end namespace otb
diff --git a/Code/IO/otbSpot6ImageMetadataInterfaceFactory.h b/Code/IO/otbSpot6ImageMetadataInterfaceFactory.h
new file mode 100644
index 0000000..d72ac30
--- /dev/null
+++ b/Code/IO/otbSpot6ImageMetadataInterfaceFactory.h
@@ -0,0 +1,67 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef __otbSpot6ImageMetadataInterfaceFactory_h
+#define __otbSpot6ImageMetadataInterfaceFactory_h
+
+
+#include "itkObjectFactoryBase.h"
+
+namespace otb
+{
+/** \class Spot6ImageMetadataInterfaceFactory
+ * \brief Creating an instance of a ImageMetadataInterface object using object factory.
+ */
+class ITK_EXPORT Spot6ImageMetadataInterfaceFactory : public itk::ObjectFactoryBase
+{
+public:
+  /** Standard class typedefs. */
+  typedef Spot6ImageMetadataInterfaceFactory 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);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(Spot6ImageMetadataInterfaceFactory, itk::ObjectFactoryBase);
+
+  /** Register one factory of this type  */
+  static void RegisterOneFactory(void)
+  {
+    Spot6ImageMetadataInterfaceFactory::Pointer Spot6IMIFactory = Spot6ImageMetadataInterfaceFactory::New();
+    itk::ObjectFactoryBase::RegisterFactory(Spot6IMIFactory);
+  }
+
+protected:
+  Spot6ImageMetadataInterfaceFactory();
+  virtual ~Spot6ImageMetadataInterfaceFactory();
+
+private:
+  Spot6ImageMetadataInterfaceFactory(const Self &); //purposely not implemented
+  void operator =(const Self&); //purposely not implemented
+
+};
+
+} // end namespace otb
+
+#endif
diff --git a/Code/IO/otbTileMapImageIO.cxx b/Code/IO/otbTileMapImageIO.cxx
index 1943ced..571ab92 100644
--- a/Code/IO/otbTileMapImageIO.cxx
+++ b/Code/IO/otbTileMapImageIO.cxx
@@ -54,9 +54,10 @@ TileMapImageIO::TileMapImageIO()
   // Set default spacing to one
   m_Spacing[0] = 1.0;
   m_Spacing[1] = 1.0;
-  // Set default origin to zero
-  m_Origin[0] = 0.0;
-  m_Origin[1] = 0.0;
+  // Set default origin to [0.5 , 0.5]
+  // (consistency between ImageIO, see Mantis #942)
+  m_Origin[0] = 0.5;
+  m_Origin[1] = 0.5;
 
   m_NbBands = 3;
   m_FlagWriteImageInformation = true;
@@ -412,8 +413,8 @@ void TileMapImageIO::ReadImageInformation()
   // Default Spacing
   m_Spacing[0] = 1;
   m_Spacing[1] = 1;
-  m_Origin[0] = 0;
-  m_Origin[1] = 0;
+  m_Origin[0] = 0.5;
+  m_Origin[1] = 0.5;
 
 
   if (m_FileName.empty() == true)
@@ -657,8 +658,8 @@ void TileMapImageIO::InternalWrite(double x, double y, const void* buffer)
     imageIO->SetDimensions(1, m_TileSize);
     imageIO->SetSpacing(0, 1);
     imageIO->SetSpacing(1, 1);
-    imageIO->SetOrigin(0, 0);
-    imageIO->SetOrigin(1, 0);
+    imageIO->SetOrigin(0, 0.5);
+    imageIO->SetOrigin(1, 0.5);
     imageIO->SetNumberOfComponents(3);
 
     vnl_vector<double> axisDirection(2);
diff --git a/Code/Learning/otbKMeansImageClassificationFilter.txx b/Code/Learning/otbKMeansImageClassificationFilter.txx
index 58fd1a2..258134e 100644
--- a/Code/Learning/otbKMeansImageClassificationFilter.txx
+++ b/Code/Learning/otbKMeansImageClassificationFilter.txx
@@ -82,7 +82,7 @@ KMeansImageClassificationFilter<TInputImage, TOutputImage, VMaxSampleDimension,
 template <class TInputImage, class TOutputImage, unsigned int VMaxSampleDimension, class TMaskImage>
 void
 KMeansImageClassificationFilter<TInputImage, TOutputImage, VMaxSampleDimension, TMaskImage>
-::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId)
+::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType itkNotUsed(threadId))
 {
   InputImageConstPointerType inputPtr     = this->GetInput();
   MaskImageConstPointerType  inputMaskPtr  = this->GetInputMask();
diff --git a/Code/Learning/otbLibSVMMachineLearningModel.txx b/Code/Learning/otbLibSVMMachineLearningModel.txx
index 100193c..131db54 100644
--- a/Code/Learning/otbLibSVMMachineLearningModel.txx
+++ b/Code/Learning/otbLibSVMMachineLearningModel.txx
@@ -94,7 +94,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue>
 template <class TInputValue, class TOutputValue>
 void
 LibSVMMachineLearningModel<TInputValue,TOutputValue>
-::Save(const std::string & filename, const std::string & name)
+::Save(const std::string & filename, const std::string & itkNotUsed(name))
 {
   m_SVMestimator->GetModel()->SaveModel(filename.c_str());
 }
@@ -102,7 +102,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue>
 template <class TInputValue, class TOutputValue>
 void
 LibSVMMachineLearningModel<TInputValue,TOutputValue>
-::Load(const std::string & filename, const std::string & name)
+::Load(const std::string & filename, const std::string & itkNotUsed(name))
 {
   m_SVMestimator->GetModel()->LoadModel(filename.c_str());
 }
@@ -139,7 +139,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue>
 template <class TInputValue, class TOutputValue>
 bool
 LibSVMMachineLearningModel<TInputValue,TOutputValue>
-::CanWriteFile(const std::string & file)
+::CanWriteFile(const std::string & itkNotUsed(file))
 {
   return false;
 }
diff --git a/Code/Learning/otbListSampleGenerator.h b/Code/Learning/otbListSampleGenerator.h
index 62a16ae..bebfea7 100644
--- a/Code/Learning/otbListSampleGenerator.h
+++ b/Code/Learning/otbListSampleGenerator.h
@@ -145,7 +145,9 @@ protected:
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
   /** Triggers the Computation of the sample list */
-  void GenerateData(void);
+  virtual void GenerateData(void);
+
+  virtual void GenerateInputRequestedRegion(void);
 
   /** Compute the calss statistics*/
   void GenerateClassStatistics();
diff --git a/Code/Learning/otbListSampleGenerator.txx b/Code/Learning/otbListSampleGenerator.txx
index 5351fe1..c1a7ea6 100644
--- a/Code/Learning/otbListSampleGenerator.txx
+++ b/Code/Learning/otbListSampleGenerator.txx
@@ -188,6 +188,27 @@ ListSampleGenerator<TImage, TVectorData>
   return dynamic_cast<ListLabelType*>(this->itk::ProcessObject::GetOutput(3));
 }
 
+template <class TImage, class TVectorData>
+void
+ListSampleGenerator<TImage, TVectorData>
+::GenerateInputRequestedRegion()
+{
+  ImagePointerType img = static_cast<ImageType *>(this->ProcessObject::GetInput(0));
+
+  if(img.IsNotNull())
+    {
+
+    // Requested regions will be generated during GenerateData
+    // call. For now request an empty region so as to avoid requesting
+    // the largest possible region (fixes bug #943 )
+    typename ImageType::RegionType dummyRegion;
+    typename ImageType::SizeType dummySize;
+    dummySize.Fill(0);
+    dummyRegion.SetSize(dummySize);
+    img->SetRequestedRegion(dummyRegion);
+    }
+}
+
 
 template <class TImage, class TVectorData>
 void
diff --git a/Code/Learning/otbSOMImageClassificationFilter.txx b/Code/Learning/otbSOMImageClassificationFilter.txx
index cd02384..7b2331e 100644
--- a/Code/Learning/otbSOMImageClassificationFilter.txx
+++ b/Code/Learning/otbSOMImageClassificationFilter.txx
@@ -71,7 +71,7 @@ SOMImageClassificationFilter<TInputImage, TOutputImage, TSOMMap, TMaskImage>
 template <class TInputImage, class TOutputImage, class TSOMMap, class TMaskImage>
 void
 SOMImageClassificationFilter<TInputImage, TOutputImage, TSOMMap, TMaskImage>
-::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId)
+::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType itkNotUsed(threadId))
 {
   InputImageConstPointerType inputPtr     = this->GetInput();
   MaskImageConstPointerType  inputMaskPtr  = this->GetInputMask();
diff --git a/Code/Markov/otbMRFEnergy.h b/Code/Markov/otbMRFEnergy.h
index f537df2..8ad4fef 100644
--- a/Code/Markov/otbMRFEnergy.h
+++ b/Code/Markov/otbMRFEnergy.h
@@ -78,7 +78,7 @@ public:
     this->Modified();
   }
 
-  virtual double GetSingleValue(const InputImagePixelType& value1, const LabelledImagePixelType& value2)
+  virtual double GetSingleValue(const InputImagePixelType& itkNotUsed(value1), const LabelledImagePixelType& itkNotUsed(value2))
   {
     itkExceptionMacro(<< "GetSingleValue() has to be declared in child classes.");
   }
@@ -181,7 +181,7 @@ public:
     this->Modified();
   }
 
-  virtual double GetSingleValue(const LabelledImagePixelType& value1, const LabelledImagePixelType& value2)
+  virtual double GetSingleValue(const LabelledImagePixelType& itkNotUsed(value1), const LabelledImagePixelType& itkNotUsed(value2))
   {
     itkExceptionMacro(<< "GetSingleValue() has to be declared in child classes.");
   }
diff --git a/Code/MultiScale/otbMorphologicalPyramidResampler.txx b/Code/MultiScale/otbMorphologicalPyramidResampler.txx
index 6fabafd..be6a8a6 100644
--- a/Code/MultiScale/otbMorphologicalPyramidResampler.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidResampler.txx
@@ -19,7 +19,7 @@
 #define __otbMorphologicalPyramidResampler_txx
 #include "otbMorphologicalPyramidResampler.h"
 #include "itkResampleImageFilter.h"
-#include "itkScaleTransform.h"
+#include "itkScalableAffineTransform.h"
 #include "itkNearestNeighborInterpolateImageFunction.h"
 #include "itkLinearInterpolateImageFunction.h"
 #include "itkProgressAccumulator.h"
@@ -123,10 +123,8 @@ Resampler<TInputImage, TOutputImage>
 
   // Filters typedefs
   typedef itk::ResampleImageFilter<InputImageType, OutputImageType>   ResampleFilterType;
-  typedef itk::ScaleTransform<double, InputImageType::ImageDimension> TransformType;
+  typedef itk::ScalableAffineTransform<double, InputImageType::ImageDimension> TransformType;
   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();
@@ -134,13 +132,18 @@ Resampler<TInputImage, TOutputImage>
   typename TransformType::Pointer      transform = TransformType::New();
 
   // Scale parameters computation
-  typename TransformType::ParametersType scales(2);
+  typename TransformType::InputVectorType scales;
   typename InputImageType::SizeType    inputSize = this->GetInput()->GetLargestPossibleRegion().GetSize();
   typename InputImageType::SpacingType inputSpacing = this->GetInput()->GetSpacing();
-  scales[0] = static_cast<double>(inputSize[0] - 1) / static_cast<double>(m_Size[0] - 1);
-  scales[1] = static_cast<double>(inputSize[1] - 1) / static_cast<double>(m_Size[1] - 1);
-  transform->SetParameters(scales);
+  scales[0] = static_cast<double>(inputSize[0]) / static_cast<double>(m_Size[0]);
+  scales[1] = static_cast<double>(inputSize[1]) / static_cast<double>(m_Size[1]);
+  transform->SetScale(scales);
   transform->SetCenter(this->GetInput()->GetOrigin());
+  typename TransformType::OutputVectorType translation;
+  translation[0] = 0.5 * inputSpacing[0] * (scales[0] - 1.0);
+  translation[1] = 0.5 * inputSpacing[1] * (scales[1] - 1.0);
+  transform->SetTranslation(translation);
+
 
   // Resampling filter set up
   resampler->SetTransform(transform);
diff --git a/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx b/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx
index cc6c1bd..ed5d99c 100644
--- a/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx
@@ -159,7 +159,6 @@ Segmenter<TInputImage, TOutputImage>
   typedef itk::PointSet<InputPixelType, InputImageType::ImageDimension>     PointSetType;
   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;
@@ -169,7 +168,6 @@ Segmenter<TInputImage, TOutputImage>
 
   // Typedefs for statistics computation
   typedef itk::Statistics::ScalarImageToHistogramGenerator<InputImageType> HistGeneratorType;
-  typedef typename HistGeneratorType::HistogramType                        HistogramType;
 
   /////////////////////////////////////
   //// Details image enhancement //////
diff --git a/Code/MultiScale/otbSubsampleImageFilter.txx b/Code/MultiScale/otbSubsampleImageFilter.txx
index b26c161..1645652 100644
--- a/Code/MultiScale/otbSubsampleImageFilter.txx
+++ b/Code/MultiScale/otbSubsampleImageFilter.txx
@@ -148,7 +148,7 @@ template <class TInputImage, class TOutputImage,
 void
 SubsampleImageFilter<TInputImage, TOutputImage, TDirectionOfTransformation>
 ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
-                       itk::ThreadIdType threadId)
+                       itk::ThreadIdType itkNotUsed(threadId))
 {
   OutputImagePointerType output = this->GetOutput();
 
diff --git a/Code/MultiScale/otbWaveletFilterBank.txx b/Code/MultiScale/otbWaveletFilterBank.txx
index 0ec3afd..8d2cb6d 100644
--- a/Code/MultiScale/otbWaveletFilterBank.txx
+++ b/Code/MultiScale/otbWaveletFilterBank.txx
@@ -960,7 +960,6 @@ WaveletFilterBank<TInputImage, TOutputImage, TWaveletOperator, Wavelet::INVERSE>
   // typedef for the iterations over the input image
   typedef itk::ConstNeighborhoodIterator<OutputImageType>                                    NeighborhoodIteratorType;
   typedef itk::NeighborhoodInnerProduct<OutputImageType>                                     InnerProductType;
-  typedef itk::ImageRegionIterator<OutputImageType>                                          IteratorType;
 
   // Faces iterations
   typename NeighborhoodIteratorType::RadiusType radiusMax;
@@ -1137,8 +1136,6 @@ WaveletFilterBank<TInputImage, TOutputImage, TWaveletOperator, Wavelet::INVERSE>
   // typedef for the iterations over the input image
   typedef itk::ConstNeighborhoodIterator<OutputImageType>                                    NeighborhoodIteratorType;
   typedef itk::NeighborhoodInnerProduct<OutputImageType>                                     InnerProductType;
-  typedef itk::ImageRegionIterator<OutputImageType>                                          IteratorType;
-
   // Faces iterations
   typename NeighborhoodIteratorType::RadiusType radiusMax;
   for (unsigned int i = 0; i < InputImageDimension; ++i)
diff --git a/Code/MultiScale/otbWaveletPacketDecompositionCosts.h b/Code/MultiScale/otbWaveletPacketDecompositionCosts.h
index 5b8832c..838e938 100644
--- a/Code/MultiScale/otbWaveletPacketDecompositionCosts.h
+++ b/Code/MultiScale/otbWaveletPacketDecompositionCosts.h
@@ -57,7 +57,7 @@ public:
   static unsigned int NumberOfAllowedDecompositions;
 
   /** Evaluate the cost */
-  bool Evaluate(unsigned int decomposition, const ImageType * image)
+  bool Evaluate(unsigned int decomposition, const ImageType * itkNotUsed(image))
   {
     return (decomposition < NumberOfAllowedDecompositions);
   }
diff --git a/Code/OBIA/otbLabelMapToSampleListFilter.txx b/Code/OBIA/otbLabelMapToSampleListFilter.txx
index ad39cfa..de36949 100644
--- a/Code/OBIA/otbLabelMapToSampleListFilter.txx
+++ b/Code/OBIA/otbLabelMapToSampleListFilter.txx
@@ -43,7 +43,7 @@ template <class TInputLabelMap, class TOutputListSample, class TMeasurementFunct
 typename LabelMapToSampleListFilter<TInputLabelMap,TOutputListSample,TMeasurementFunctor>
 ::DataObjectPointerType
 LabelMapToSampleListFilter<TInputLabelMap,TOutputListSample,TMeasurementFunctor>
-::MakeOutput(unsigned int idx)
+::MakeOutput(unsigned int itkNotUsed(idx))
 {
   DataObjectPointerType output;
   output = static_cast<itk::DataObject*>(OutputSampleListType::New().GetPointer());
diff --git a/Code/OBIA/otbLabelMapToVectorDataFilter.h b/Code/OBIA/otbLabelMapToVectorDataFilter.h
index f620b2c..f2feecc 100644
--- a/Code/OBIA/otbLabelMapToVectorDataFilter.h
+++ b/Code/OBIA/otbLabelMapToVectorDataFilter.h
@@ -40,7 +40,11 @@ namespace otb {
    * "An algorithm for the rapid computation of boundaries of run-length
    * encoded regions", Francis K. H. Queck, in Pattern Recognition 33
    * (2000), p 1637-1649.
- *
+   *
+   * Note : the output vector data contains index coordinates (not physical coordinates).
+   * For instance, a polygon around the pixel at index (0,0) would have the following
+   * points : [-0.5,-0.5] , [0.5,-0.5] , [0.5,0.5] , [-0.5,0.5]
+   *
    * \sa VectorDataSource
  * \ingroup GeoSpatialAnalysis
  */
diff --git a/Code/OBIA/otbLabelObjectToPolygonFunctor.txx b/Code/OBIA/otbLabelObjectToPolygonFunctor.txx
index 90c1a73..cce9ffe 100644
--- a/Code/OBIA/otbLabelObjectToPolygonFunctor.txx
+++ b/Code/OBIA/otbLabelObjectToPolygonFunctor.txx
@@ -486,30 +486,32 @@ LabelObjectToPolygonFunctor<TLabelObject, TPolygon>
      }
 
   typename PolygonType::VertexType::VectorType offset;
+  typedef typename PolygonType::VertexType::VectorType::ValueType VectorValueType;
+  offset.Fill(itk::NumericTraits<VectorValueType>::Zero);
 
   switch (state)
     {
     case UP_RIGHT:
-      offset[1] = 1;
+      offset[1] = 0.5;
       break;
     case UP_LEFT:
-      offset[1] = 1;
+      offset[1] = 0.5;
       break;
     case DOWN_RIGHT:
-      offset[1] = 0;
+      offset[1] = -0.5;
       break;
     case DOWN_LEFT:
-      offset[1] = 0;
+      offset[1] = -0.5;
       break;
     }
 
   switch (m_PositionFlag)
     {
     case LEFT_END:
-      offset[0] = 0;
+      offset[0] = -0.5;
       break;
     case RIGHT_END:
-      offset[0] = 1;
+      offset[0] = 0.5;
       break;
     }
   typename PolygonType::VertexType newPoint;
@@ -560,24 +562,26 @@ LabelObjectToPolygonFunctor<TLabelObject, TPolygon>
      }
 
   typename PolygonType::VertexType::VectorType offset;
+  typedef typename PolygonType::VertexType::VectorType::ValueType VectorValueType;
+  offset.Fill(itk::NumericTraits<VectorValueType>::Zero);
 
   switch (state)
     {
     case UP_RIGHT:
-      offset[0] = 1;
-      offset[1] = 1;
+      offset[0] = 0.5;
+      offset[1] = 0.5;
       break;
     case UP_LEFT:
-      offset[0] = 0;
-      offset[1] = 1;
+      offset[0] = -0.5;
+      offset[1] = 0.5;
       break;
     case DOWN_RIGHT:
-      offset[0] = 1;
-      offset[1] = 0;
+      offset[0] = 0.5;
+      offset[1] = -0.5;
       break;
     case DOWN_LEFT:
-      offset[0] = 0;
-      offset[1] = 0;
+      offset[0] = -0.5;
+      offset[1] = -0.5;
       break;
     }
 
@@ -622,8 +626,10 @@ LabelObjectToPolygonFunctor<TLabelObject, TPolygon>
   VertexType resp;
 
   // Apply origin and spacing
-  resp[0] = (index[0] - m_StartIndex[0]) * m_Spacing[0] + m_Origin[0];
-  resp[1] = (index[1] - m_StartIndex[1]) * m_Spacing[1] + m_Origin[1];
+  //resp[0] = (index[0] - m_StartIndex[0]) * m_Spacing[0] + m_Origin[0];
+  //resp[1] = (index[1] - m_StartIndex[1]) * m_Spacing[1] + m_Origin[1];
+  resp[0] = index[0] * m_Spacing[0] + m_Origin[0];
+  resp[1] = index[1] * m_Spacing[1] + m_Origin[1];
 
   return resp;
 }
diff --git a/Code/OBIA/otbVectorDataToLabelMapWithAttributesFilter.h b/Code/OBIA/otbVectorDataToLabelMapWithAttributesFilter.h
index 07eba6e..bbdbf55 100644
--- a/Code/OBIA/otbVectorDataToLabelMapWithAttributesFilter.h
+++ b/Code/OBIA/otbVectorDataToLabelMapWithAttributesFilter.h
@@ -48,6 +48,12 @@ namespace otb
  * The first Label is set using SetInitialLabel (by default it is 0), and increases 1 by 1.
  * The vector data attributes are also assigned to the object in the label map.
  *
+ * When AutomaticSizeComputation=True, the spacing from the vector data object
+ * is used. Then the size and origin are computed so that the image extent
+ * covers exactly the vector data bounding region.
+ *
+ * Note : the coordinates in the vector data are assumed to be physical coordinates.
+ *
  * \sa LabelMapSource
  */
 
diff --git a/Code/OBIA/otbVectorDataToLabelMapWithAttributesFilter.txx b/Code/OBIA/otbVectorDataToLabelMapWithAttributesFilter.txx
index a117f17..1b79e75 100644
--- a/Code/OBIA/otbVectorDataToLabelMapWithAttributesFilter.txx
+++ b/Code/OBIA/otbVectorDataToLabelMapWithAttributesFilter.txx
@@ -135,25 +135,36 @@ void VectorDataToLabelMapWithAttributesFilter<TVectorData, TLabelMap>
      outputPtr->SetDirection(m_Direction);
   }
   else
-  {
-      typename PolygonType::RegionType  region;
-      OriginType origin;
-      m_VectorDataProperties->SetVectorDataObject(this->GetInput());
-      m_VectorDataProperties->SetBoundingRegion(region);
-      //Compute the global bounding box of the vectordata
-      m_VectorDataProperties->ComputeBoundingRegion();
-      origin[0] = m_VectorDataProperties->GetBoundingRegion().GetImageRegion().GetIndex(0);
-      origin[1] = m_VectorDataProperties->GetBoundingRegion().GetImageRegion().GetIndex(1);
-
-      // Set spacing and origin
-      outputLargestPossibleRegion.SetSize(m_VectorDataProperties->GetBoundingRegion().GetImageRegion().GetSize());
-      outputLargestPossibleRegion.SetIndex(m_StartIndex);
-
-      outputPtr->SetLargestPossibleRegion(outputLargestPossibleRegion);
-      outputPtr->SetSpacing(this->GetInput()->GetSpacing());
-      outputPtr->SetOrigin(origin);
-      outputPtr->SetDirection(m_Direction);
-  }
+    {
+    //typename PolygonType::RegionType  region;
+    m_VectorDataProperties->SetVectorDataObject(this->GetInput());
+    //m_VectorDataProperties->SetBoundingRegion(region);
+    //Compute the global bounding box of the vectordata
+    m_VectorDataProperties->ComputeBoundingRegion();
+
+    // Compute origin and size
+    SizeType size;
+    SpacingType spacing = this->GetInput()->GetSpacing();
+    OriginType origin = m_VectorDataProperties->GetBoundingRegion().GetOrigin();
+    for (unsigned int i=0; i<2; ++i)
+      {
+      if (spacing[i] < 0.0)
+        {
+        origin[i] += m_VectorDataProperties->GetBoundingRegion().GetSize(i);
+        }
+      origin[i] += (0.5 - m_StartIndex[i]) * spacing[i];
+      size[i] = static_cast<unsigned long>(vcl_ceil(vcl_abs(
+        m_VectorDataProperties->GetBoundingRegion().GetSize(i)/spacing[i])));
+      }
+
+    outputLargestPossibleRegion.SetSize(size);
+    outputLargestPossibleRegion.SetIndex(m_StartIndex);
+
+    outputPtr->SetLargestPossibleRegion(outputLargestPossibleRegion);
+    outputPtr->SetSpacing(spacing);
+    outputPtr->SetOrigin(origin);
+    outputPtr->SetDirection(m_Direction);
+    }
   return;
 }
 /*
@@ -298,9 +309,11 @@ VectorDataToLabelMapWithAttributesFilter<TVectorData, TLabelMap>
         otbGenericMsgDebugMacro(<< "Insert Point from vectorData");
         IndexType index;
         this->GetOutput()->TransformPhysicalPointToIndex(dataNode->GetPoint(), index);
-
-        this->GetOutput()->SetPixel(index, m_lab);
-        m_lab += 1;
+        if (this->GetOutput()->GetLargestPossibleRegion().IsInside(index))
+          {
+          this->GetOutput()->SetPixel(index, m_lab);
+          m_lab += 1;
+          }
         break;
         }
       case otb::FEATURE_LINE:
@@ -317,55 +330,90 @@ VectorDataToLabelMapWithAttributesFilter<TVectorData, TLabelMap>
         CorrectFunctorType correct;
         PolygonPointerType correctPolygonExtRing = correct(dataNode->GetPolygonExteriorRing());
 
-        typedef typename DataNodeType::PolygonType PolygonType;
-        typedef typename PolygonType::RegionType   RegionType;
+        //typedef typename DataNodeType::PolygonType PolygonType;
+        typedef typename PolygonType::RegionType   RSRegionType;
         typedef typename PolygonType::VertexType   VertexType;
         typedef typename IndexType::IndexValueType IndexValueType;
-        typedef typename VertexType::ValueType     VertexValueType;
-        RegionType polygonExtRingBoundReg = correctPolygonExtRing->GetBoundingRegion();
+        RSRegionType polygonExtRingBoundReg = correctPolygonExtRing->GetBoundingRegion();
+
+        IndexType startIdx,endIdx,tmpIdx;
+        OriginType physCorners[4];
+        physCorners[0][0] = polygonExtRingBoundReg.GetOrigin(0);
+        physCorners[0][1] = polygonExtRingBoundReg.GetOrigin(1);
+        physCorners[1] = physCorners[0];
+        physCorners[2] = physCorners[0];
+        physCorners[3] = physCorners[0];
+
+        physCorners[1][1] += polygonExtRingBoundReg.GetSize(1);
+        physCorners[2][1] += polygonExtRingBoundReg.GetSize(1);
+        physCorners[2][0] += polygonExtRingBoundReg.GetSize(0);
+        physCorners[3][0] += polygonExtRingBoundReg.GetSize(0);
+
+        for (unsigned int k=0; k<4; ++k)
+          {
+          this->GetOutput()->TransformPhysicalPointToIndex(physCorners[k],tmpIdx);
+          if (k == 0)
+            {
+            startIdx = tmpIdx;
+            endIdx = tmpIdx;
+            }
+          else
+            {
+            startIdx[0] = std::min(startIdx[0],tmpIdx[0]);
+            startIdx[1] = std::min(startIdx[1],tmpIdx[1]);
+            endIdx[0] = std::max(endIdx[0],tmpIdx[0]);
+            endIdx[1] = std::max(endIdx[1],tmpIdx[1]);
+            }
+          }
+        // Check that the polygon intersects the largest possible region
+        RegionType polyRegion;
+        polyRegion.SetIndex(startIdx);
+        polyRegion.SetSize(0,endIdx[0] - startIdx[0] + 1);
+        polyRegion.SetSize(1,endIdx[1] - startIdx[1] + 1);
+        if (polyRegion.Crop(this->GetOutput()->GetLargestPossibleRegion()))
+          {
+          startIdx = polyRegion.GetIndex();
+          endIdx[0] = startIdx[0] - 1 + polyRegion.GetSize(0);
+          endIdx[1] = startIdx[1] - 1 + polyRegion.GetSize(1);
+          }
+        else
+          {
+          // No intersection
+          break;
+          }
 
+        OriginType tmpPoint;
         VertexType vertex;
-
-        // For each position in the bounding region of the polygon
-        for (double i = polygonExtRingBoundReg.GetOrigin(0);
-             i < polygonExtRingBoundReg.GetOrigin(0) + polygonExtRingBoundReg.GetSize(0);
-             i += this->GetOutput()->GetSpacing()[0])
+        for (IndexValueType j=startIdx[1]; j<=endIdx[1]; ++j)
           {
-          vertex[0] = static_cast<VertexValueType>(i);
-          for (double j = polygonExtRingBoundReg.GetOrigin(1);
-               j < polygonExtRingBoundReg.GetOrigin(1) + polygonExtRingBoundReg.GetSize(1);
-               j += this->GetOutput()->GetSpacing()[1])
+          for (IndexValueType i=startIdx[0]; i<=endIdx[0]; ++i)
             {
-            vertex[1] = static_cast<VertexValueType>(j);
-
+            tmpIdx[0] = i;
+            tmpIdx[1] = j;
+            this->GetOutput()->TransformIndexToPhysicalPoint(tmpIdx,tmpPoint);
+            vertex[0] = tmpPoint[0];
+            vertex[1] = tmpPoint[1];
             if (correctPolygonExtRing->IsInside(vertex) || correctPolygonExtRing->IsOnEdge (vertex))
               {
-              IndexType index;
-//               index[0] = static_cast<IndexValueType>(vertex[0] - polygonExtRingBoundReg.GetOrigin(0));
-//               index[1] = static_cast<IndexValueType>(vertex[1] - polygonExtRingBoundReg.GetOrigin(1));
-                 index[0] = static_cast<IndexValueType>(vertex[0]-this->GetOutput()->GetOrigin()[0]);
-                 index[1] = static_cast<IndexValueType>(vertex[1]-this->GetOutput()->GetOrigin()[1]);
-//               index[0] += this->GetOutput()->GetOrigin()[0];
-//               index[1] += this->GetOutput()->GetOrigin()[1];
-//               std::cout << "index " << index << std::endl;
+              // TODO : should also test interior rings
               if (this->GetOutput()->HasLabel(m_lab))
                 {
-                if (!this->GetOutput()->GetLabelObject(m_lab)->HasIndex(index))
+                if (!this->GetOutput()->GetLabelObject(m_lab)->HasIndex(tmpIdx))
                   { //Add a pixel to the current labelObject
-                  this->GetOutput()->SetPixel(index, m_lab);
+                  this->GetOutput()->SetPixel(tmpIdx, m_lab);
                   }
                 }
               else
                 {
                 //Add a pixel to the current labelObject
-                this->GetOutput()->SetPixel(index, m_lab);
-                }
+                this->GetOutput()->SetPixel(tmpIdx, m_lab);
                 //add attributes
                 AttributesValueType fieldValue;
                 for(unsigned int ii=0; ii<dataNode->GetFieldList().size(); ii++)
-                {
+                  {
                   fieldValue = static_cast<AttributesValueType>( dataNode->GetFieldAsString(dataNode->GetFieldList()[ii]) );
                   this->GetOutput()->GetLabelObject(m_lab)->SetAttribute( dataNode->GetFieldList()[ii].c_str(), fieldValue );
+                  }
                 }
               }
             }
diff --git a/Code/ObjectDetection/otbDescriptorsListSampleGenerator.txx b/Code/ObjectDetection/otbDescriptorsListSampleGenerator.txx
index b336f63..998fc70 100644
--- a/Code/ObjectDetection/otbDescriptorsListSampleGenerator.txx
+++ b/Code/ObjectDetection/otbDescriptorsListSampleGenerator.txx
@@ -314,10 +314,6 @@ PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType
       ContinuousIndexType cidx;
       this->GetInput()->TransformPhysicalPointToContinuousIndex(point, cidx);
 
-      // OGR convention : vector data are recorded with a 0.5 shift
-      cidx[0] -= 0.5;
-      cidx[1] -= 0.5;
-
       RegionType paddedRegion = outputRegionForThread;
       paddedRegion.PadByRadius(m_NeighborhoodRadius);
       if (this->IsInsideWithNeighborhoodRadius(paddedRegion, cidx))
diff --git a/Code/ObjectDetection/otbHaralickTexturesIFFactory.txx b/Code/ObjectDetection/otbHaralickTexturesIFFactory.txx
index f4a2843..53dde8a 100644
--- a/Code/ObjectDetection/otbHaralickTexturesIFFactory.txx
+++ b/Code/ObjectDetection/otbHaralickTexturesIFFactory.txx
@@ -43,9 +43,9 @@ HaralickTexturesIFFactory<TImageType, TCoordRep, TPrecision>
 
   function->SetInputImage(image);
   function->GetInternalImageFunction()->SetNeighborhoodRadius(param[0]);
-  function->GetInternalImageFunction()->SetInputImageMinimum(param[1]);
-  function->GetInternalImageFunction()->SetInputImageMaximum(param[2]);
-  function->GetInternalImageFunction()->SetNumberOfBinsPerAxis(param[3]);
+  function->SetInputImageMinimum(param[1]);
+  function->SetInputImageMaximum(param[2]);
+  function->SetNumberOfBinsPerAxis(param[3]);
 
   OffsetType offset;
   offset.Fill(param[4]);
diff --git a/Code/ObjectDetection/otbObjectDetectionClassifier.txx b/Code/ObjectDetection/otbObjectDetectionClassifier.txx
index 2cfec80..53ae4d9 100644
--- a/Code/ObjectDetection/otbObjectDetectionClassifier.txx
+++ b/Code/ObjectDetection/otbObjectDetectionClassifier.txx
@@ -245,8 +245,6 @@ PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFun
   SVMModelType*   model = static_cast<SVMModelType*>(this->itk::ProcessObject::GetInput(1));
 
   typedef typename RegionType::IndexType      IndexType;
-  typedef typename RegionType::IndexValueType IndexValueType;
-
   IndexType begin = outputRegionForThread.GetIndex();
   IndexType end = begin;
   end[0] += outputRegionForThread.GetSize(0);
@@ -264,12 +262,6 @@ PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFun
           DescriptorsFunctionPointType point;
           input->TransformIndexToPhysicalPoint(current, point);
 
-          ContinuousIndexType currentContinuous(current);
-          currentContinuous[0] += 0.5;
-          currentContinuous[1] += 0.5;
-          DescriptorsFunctionPointType pointOGR;
-          input->TransformContinuousIndexToPhysicalPoint(currentContinuous, pointOGR);
-
           DescriptorType descriptor = m_DescriptorsFunction->Evaluate(point);
           SVMModelMeasurementType modelMeasurement(descriptor.GetSize());
           for (unsigned int i = 0; i < descriptor.GetSize(); ++i)
@@ -280,7 +272,7 @@ PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFun
 
           if (label != m_NoClassLabel)
             {
-            m_ThreadPointArray[threadId].push_back(std::make_pair(pointOGR, label));
+            m_ThreadPointArray[threadId].push_back(std::make_pair(point, label));
             }
           }
         }
diff --git a/Code/ObjectDetection/otbStatisticsXMLFileReader.txx b/Code/ObjectDetection/otbStatisticsXMLFileReader.txx
index c756719..5068aba 100644
--- a/Code/ObjectDetection/otbStatisticsXMLFileReader.txx
+++ b/Code/ObjectDetection/otbStatisticsXMLFileReader.txx
@@ -134,7 +134,7 @@ StatisticsXMLFileReader<TMeasurementVector>
 template < class TMeasurementVector >
 void
 StatisticsXMLFileReader<TMeasurementVector>
-::PrintSelf(std::ostream& os, itk::Indent indent) const
+::PrintSelf(std::ostream& itkNotUsed(os), itk::Indent itkNotUsed(indent)) const
 {
   // Call superclass implementation
   //Superclass::PrintSelf(os, indent);
diff --git a/Code/ObjectDetection/otbStatisticsXMLFileWriter.txx b/Code/ObjectDetection/otbStatisticsXMLFileWriter.txx
index e99d99b..a13ef48 100644
--- a/Code/ObjectDetection/otbStatisticsXMLFileWriter.txx
+++ b/Code/ObjectDetection/otbStatisticsXMLFileWriter.txx
@@ -105,14 +105,20 @@ StatisticsXMLFileWriter<TMeasurementVector>
     }
 
   // Finally, write the file
-  doc.SaveFile( m_FileName.c_str() );
+  if (! doc.SaveFile( m_FileName.c_str() ) )
+    {
+    itkExceptionMacro(<<"Unable to write the XML file in "
+                      << itksys::SystemTools::GetFilenamePath(m_FileName)
+                      << " (permission issue? Directory does not exist?)." );
+    }
+
 }
 
 
 template < class TMeasurementVector >
 void
 StatisticsXMLFileWriter<TMeasurementVector>
-::PrintSelf(std::ostream& os, itk::Indent indent) const
+::PrintSelf(std::ostream& itkNotUsed(os), itk::Indent itkNotUsed(indent)) const
 {
   // Call superclass implementation
   //Superclass::PrintSelf(os, indent);
diff --git a/Code/Projections/otbGenericRSTransform.h b/Code/Projections/otbGenericRSTransform.h
index b6b7b3b..c84e8a6 100644
--- a/Code/Projections/otbGenericRSTransform.h
+++ b/Code/Projections/otbGenericRSTransform.h
@@ -60,6 +60,7 @@ public:
   //@}
 
   typedef typename Superclass::ScalarType           ScalarType;
+  typedef typename Superclass::JacobianType         JacobianType;
   typedef itk::Point<ScalarType, NInputDimensions>  InputPointType;
   typedef itk::Point<ScalarType, NOutputDimensions> OutputPointType;
 
@@ -173,8 +174,10 @@ public:
   virtual InverseTransformBasePointer GetInverseTransform() const;
 
   // Dummy set parameter method
-  virtual void SetParameters(const typename Superclass::ParametersType &)
-  {}
+  virtual void SetParameters(const typename Superclass::ParametersType &)  {}
+
+  // Dummy ComputeJacobianWithRespectToParameters method
+  virtual void ComputeJacobianWithRespectToParameters(const InputPointType  &, JacobianType& ) const {}
 
 protected:
   GenericRSTransform();
diff --git a/Code/Projections/otbGeometriesProjectionFilter.cxx b/Code/Projections/otbGeometriesProjectionFilter.cxx
index aff8b27..7d73f31 100644
--- a/Code/Projections/otbGeometriesProjectionFilter.cxx
+++ b/Code/Projections/otbGeometriesProjectionFilter.cxx
@@ -214,7 +214,7 @@ void otb::GeometriesProjectionFilter::DoFinalizeInitialisation()
 
 /*virtual*/
 OGRSpatialReference* otb::GeometriesProjectionFilter::DoDefineNewLayerSpatialReference(
-  ogr::Layer const& source) const
+  ogr::Layer const& itkNotUsed(source)) const
 {
   if (!m_OutputProjectionRef.empty())
     {
diff --git a/Code/Projections/otbImageToEnvelopeVectorDataFilter.txx b/Code/Projections/otbImageToEnvelopeVectorDataFilter.txx
index 38ba173..cdd2263 100644
--- a/Code/Projections/otbImageToEnvelopeVectorDataFilter.txx
+++ b/Code/Projections/otbImageToEnvelopeVectorDataFilter.txx
@@ -125,11 +125,16 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
   OutputVectorDataPointer outputPtr = this->GetOutput();
 
   // Compute corners as index
-  typename InputImageType::IndexType ul, ur, lr, ll;
-  ul = inputPtr->GetLargestPossibleRegion().GetIndex();
-  ur = ul;
-  ll=ul;
-  lr=ul;
+  itk::ContinuousIndex<double,2> ul(
+    inputPtr->GetLargestPossibleRegion().GetIndex());
+  // move 'ul' to the corner of the first pixel
+  ul[0] += -0.5;
+  ul[1] += -0.5;
+
+  itk::ContinuousIndex<double,2> ur(ul);
+  itk::ContinuousIndex<double,2> lr(ul);
+  itk::ContinuousIndex<double,2> ll(ul);
+
   typename InputImageType::SizeType size = inputPtr->GetLargestPossibleRegion().GetSize();
   ur[0]+=size[0];
   ll[1]+=size[1];
@@ -138,14 +143,14 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
 
   // Get corners as physical points
   typename InputImageType::PointType ulp, urp, lrp, llp, current;
-  inputPtr->TransformIndexToPhysicalPoint(ul, ulp);
-  inputPtr->TransformIndexToPhysicalPoint(ur, urp);
-  inputPtr->TransformIndexToPhysicalPoint(lr, lrp);
-  inputPtr->TransformIndexToPhysicalPoint(ll, llp);
+  inputPtr->TransformContinuousIndexToPhysicalPoint(ul, ulp);
+  inputPtr->TransformContinuousIndexToPhysicalPoint(ur, urp);
+  inputPtr->TransformContinuousIndexToPhysicalPoint(lr, lrp);
+  inputPtr->TransformContinuousIndexToPhysicalPoint(ll, llp);
 
   this->InstantiateTransform();
 
-  typename InputImageType::IndexType edgeIndex;
+  itk::ContinuousIndex<double,2> edgeIndex;
   typename InputImageType::PointType edgePoint;
 
   // Build envelope polygon
@@ -162,7 +167,7 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
     edgeIndex[0]+=m_SamplingRate;
     while (edgeIndex[0]<ur[0])
       {
-      inputPtr->TransformIndexToPhysicalPoint(edgeIndex, edgePoint);
+      inputPtr->TransformContinuousIndexToPhysicalPoint(edgeIndex, edgePoint);
       current = m_Transform->TransformPoint(edgePoint);
       vertex[0] = current[0];
       vertex[1] = current[1];
@@ -182,7 +187,7 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
     edgeIndex[1]+=m_SamplingRate;
     while (edgeIndex[1]<lr[1])
       {
-      inputPtr->TransformIndexToPhysicalPoint(edgeIndex, edgePoint);
+      inputPtr->TransformContinuousIndexToPhysicalPoint(edgeIndex, edgePoint);
       current = m_Transform->TransformPoint(edgePoint);
       vertex[0] = current[0];
       vertex[1] = current[1];
@@ -202,7 +207,7 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
     edgeIndex[0]-=m_SamplingRate;
     while (edgeIndex[0]>ll[0])
       {
-      inputPtr->TransformIndexToPhysicalPoint(edgeIndex, edgePoint);
+      inputPtr->TransformContinuousIndexToPhysicalPoint(edgeIndex, edgePoint);
       current = m_Transform->TransformPoint(edgePoint);
       vertex[0] = current[0];
       vertex[1] = current[1];
@@ -222,7 +227,7 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData>
     edgeIndex[1]-=m_SamplingRate;
     while (edgeIndex[1]>ul[1])
       {
-      inputPtr->TransformIndexToPhysicalPoint(edgeIndex, edgePoint);
+      inputPtr->TransformContinuousIndexToPhysicalPoint(edgeIndex, edgePoint);
       current = m_Transform->TransformPoint(edgePoint);
       vertex[0] = current[0];
       vertex[1] = current[1];
diff --git a/Code/Projections/otbImageToGenericRSOutputParameters.txx b/Code/Projections/otbImageToGenericRSOutputParameters.txx
index 3f266c7..54a8997 100644
--- a/Code/Projections/otbImageToGenericRSOutputParameters.txx
+++ b/Code/Projections/otbImageToGenericRSOutputParameters.txx
@@ -21,6 +21,7 @@
 
 #include "otbImageToGenericRSOutputParameters.h"
 #include "itkMacro.h"
+#include "itkContinuousIndex.h"
 
 namespace otb {
 
@@ -56,15 +57,15 @@ ImageToGenericRSOutputParameters<TImage>
   // Estimate the Output image Extent
   this->EstimateOutputImageExtent();
 
-  // Estimate the Output Origin
-  this->EstimateOutputOrigin();
-
   // Estimate the Output Spacing
   if(!m_ForceSpacing)
     this->EstimateOutputSpacing();
 
   // Finally Estimate the Output Size
   this->EstimateOutputSize();
+
+  // Estimate the Output Origin
+  this->EstimateOutputOrigin();
 }
 
 
@@ -94,25 +95,24 @@ ImageToGenericRSOutputParameters<TImage>
   m_Transform->GetInverse(invTransform);
 
   // Compute the 4 corners in the cartographic coordinate system
-  std::vector<IndexType>       vindex;
+  std::vector< itk::ContinuousIndex<double,2> > vindex;
   std::vector<PointType> voutput;
 
-  IndexType index1, index2, index3, index4;
-  SizeType  size;
+  itk::ContinuousIndex<double,2> index1(m_Input->GetLargestPossibleRegion().GetIndex());
+  index1[0] += -0.5;
+  index1[1] += -0.5;
+  itk::ContinuousIndex<double,2> index2(index1);
+  itk::ContinuousIndex<double,2> index3(index1);
+  itk::ContinuousIndex<double,2> index4(index1);
 
   // Image size
-  size = m_Input->GetLargestPossibleRegion().GetSize();
+  SizeType size = m_Input->GetLargestPossibleRegion().GetSize();
 
   // project the 4 corners
-  index1 = m_Input->GetLargestPossibleRegion().GetIndex();
-  index2 = m_Input->GetLargestPossibleRegion().GetIndex();
-  index3 = m_Input->GetLargestPossibleRegion().GetIndex();
-  index4 = m_Input->GetLargestPossibleRegion().GetIndex();
-
-  index2[0] += size[0] - 1;
-  index3[0] += size[0] - 1;
-  index3[1] += size[1] - 1;
-  index4[1] += size[1] - 1;
+  index2[0] += size[0];
+  index3[0] += size[0];
+  index3[1] += size[1];
+  index4[1] += size[1];
 
   vindex.push_back(index1);
   vindex.push_back(index2);
@@ -122,7 +122,7 @@ ImageToGenericRSOutputParameters<TImage>
   for (unsigned int i = 0; i < vindex.size(); ++i)
     {
     PointType physicalPoint;
-    m_Input->TransformIndexToPhysicalPoint(vindex[i], physicalPoint);
+    m_Input->TransformContinuousIndexToPhysicalPoint(vindex[i], physicalPoint);
     voutput.push_back(invTransform->TransformPoint(physicalPoint));
     }
 
@@ -168,8 +168,8 @@ ImageToGenericRSOutputParameters<TImage>
   // Set the output orgin in carto
   // projection
   PointType   origin;
-  origin[0] = m_OutputExtent.minX;
-  origin[1] = m_OutputExtent.maxY;
+  origin[0] = m_OutputExtent.minX + 0.5 * this->GetOutputSpacing()[0];
+  origin[1] = m_OutputExtent.maxY + 0.5 * this->GetOutputSpacing()[1];
   this->SetOutputOrigin(origin);
 }
 
@@ -187,8 +187,8 @@ ImageToGenericRSOutputParameters<TImage>
   double sizeCartoY = vcl_abs(m_OutputExtent.minY - m_OutputExtent.maxY);
 
   PointType o, oX, oY;
-  o[0] = this->GetOutputOrigin()[0];
-  o[1] = this->GetOutputOrigin()[1];
+  o[0] = m_OutputExtent.minX;
+  o[1] = m_OutputExtent.maxY;
 
   oX = o;
   oY = o;
diff --git a/Code/Projections/otbPleiadesPToXSAffineTransformCalculator.cxx b/Code/Projections/otbPleiadesPToXSAffineTransformCalculator.cxx
new file mode 100644
index 0000000..109dd44
--- /dev/null
+++ b/Code/Projections/otbPleiadesPToXSAffineTransformCalculator.cxx
@@ -0,0 +1,155 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef __otbPleiadesPToXSAffineTransformCalculator__cxx
+#define __otbPleiadesPToXSAffineTransformCalculator__cxx
+
+#include "otbPleiadesPToXSAffineTransformCalculator.h"
+#include "otbPleiadesImageMetadataInterface.h"
+#include "otbDateTimeAdapter.h"
+#include "otbImageKeywordlist.h"
+#include "itkMetaDataObject.h"
+
+namespace otb {
+
+bool
+PleiadesPToXSAffineTransformCalculator
+::CanCompute(const itk::ImageBase<2> * panchromaticImage, const itk::ImageBase<2> * xsImage)
+{
+  bool isPanPHR = false;
+  bool isXSPHR = false;
+      
+  otb::PleiadesImageMetadataInterface::Pointer phrIMI =
+    otb::PleiadesImageMetadataInterface::New();
+  phrIMI->SetMetaDataDictionary(panchromaticImage->GetMetaDataDictionary());
+  isPanPHR = phrIMI->CanRead();
+      
+  phrIMI->SetMetaDataDictionary(xsImage->GetMetaDataDictionary());
+  isXSPHR = phrIMI->CanRead();
+      
+  if (isPanPHR && isXSPHR)
+    {
+    ImageKeywordlist kwlPan;
+    ImageKeywordlist kwlXS;
+        
+    itk::ExposeMetaData<ImageKeywordlist>(
+      panchromaticImage->GetMetaDataDictionary(),
+      MetaDataKey::OSSIMKeywordlistKey,
+      kwlPan);
+        
+    itk::ExposeMetaData<ImageKeywordlist>(
+      xsImage->GetMetaDataDictionary(),
+      MetaDataKey::OSSIMKeywordlistKey,
+      kwlXS);
+    
+    // Get geometric processing
+    std::string panProcessing = kwlPan.GetMetadataByKey("support_data.processing_level");
+    std::string xsProcessing = kwlXS.GetMetadataByKey("support_data.processing_level");
+        
+    if (panProcessing.compare("SENSOR") == 0 &&
+        xsProcessing.compare("SENSOR") == 0)
+      {
+      
+      std::string pid = kwlPan.GetMetadataByKey("image_id");
+      std::string xsid = kwlXS.GetMetadataByKey("image_id");
+      
+      pid  = pid.substr(0,pid.size()-4);
+      xsid = xsid.substr(0,xsid.size()-4);
+
+      if(pid == xsid)
+        {
+        return true;
+        }
+      }
+    }
+  return false;
+}
+
+PleiadesPToXSAffineTransformCalculator
+::TransformType::Pointer
+PleiadesPToXSAffineTransformCalculator
+::Compute(const itk::ImageBase<2> * panchromaticImage, const itk::ImageBase<2> * xsImage)
+{
+  if(!CanCompute(panchromaticImage,xsImage))
+    {
+    itkGenericExceptionMacro("Can not compute affine transform between images, they do not correspond to Pleiades sensor bundle.");
+    }
+
+    ImageKeywordlist kwlPan;
+    ImageKeywordlist kwlXS;
+    
+    itk::ExposeMetaData<ImageKeywordlist>(
+      panchromaticImage->GetMetaDataDictionary(),
+      MetaDataKey::OSSIMKeywordlistKey,
+      kwlPan);
+        
+    itk::ExposeMetaData<ImageKeywordlist>(
+      xsImage->GetMetaDataDictionary(),
+      MetaDataKey::OSSIMKeywordlistKey,
+      kwlXS);
+
+    // Compute time delta
+    std::string strStartTimePan = kwlPan.GetMetadataByKey("support_data.time_range_start");
+    std::string strStartTimeXS = kwlXS.GetMetadataByKey("support_data.time_range_start");
+      
+    DateTimeAdapter::Pointer startTimePan = DateTimeAdapter::New();
+    DateTimeAdapter::Pointer startTimeXS = DateTimeAdapter::New();
+      
+    startTimePan->SetFromIso8601(strStartTimePan);
+    startTimeXS->SetFromIso8601(strStartTimeXS);
+      
+    double timeDelta = startTimeXS->GetDeltaInSeconds(startTimePan);
+      
+    // Retrieve line period in Pan
+    std::string tmpStr = kwlPan.GetMetadataByKey("support_data.line_period");
+    double linePeriodPan = atof(tmpStr.c_str());
+      
+    // Retrieve column start
+    tmpStr = kwlPan.GetMetadataByKey("support_data.swath_first_col");
+    int colStartPan = atoi(tmpStr.c_str());
+    tmpStr = kwlXS.GetMetadataByKey("support_data.swath_first_col");
+    int colStartXS = atoi(tmpStr.c_str());
+      
+    // Compute shift between MS and P (in Pan pixels)
+    // in order to keep the top left corners unchanged, apply an
+    // additional offset of (3/2) panchro pixels, or 0.375 xs pixels
+    int lineShift_MS_P =int(vcl_floor((timeDelta/(linePeriodPan/1000))  + 0.5)) + 0.375;
+    int colShift_MS_P = colStartXS*4 - colStartPan-4 + 0.375;
+     
+    // Apply the scaling
+    typedef itk::ScalableAffineTransform<double, 2>  TransformType;
+    TransformType::Pointer transform = TransformType::New();
+    transform->Scale(4.0);
+
+    // Apply the offset
+    TransformType::OutputVectorType offset;
+    offset[0] = static_cast<double>(colShift_MS_P);
+    offset[1] = static_cast<double>(lineShift_MS_P);
+    transform->Translate(offset);
+    
+    // Invert the transform to get the P to XS transform
+    TransformType::Pointer realTransform = TransformType::New();
+    transform->GetInverse(realTransform);
+    
+    return realTransform;
+    }
+
+} // End namespace otb
+
+#endif
+
+
diff --git a/Code/Projections/otbPleiadesPToXSAffineTransformCalculator.h b/Code/Projections/otbPleiadesPToXSAffineTransformCalculator.h
new file mode 100644
index 0000000..8b97470
--- /dev/null
+++ b/Code/Projections/otbPleiadesPToXSAffineTransformCalculator.h
@@ -0,0 +1,94 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef __otbPleiadesPToXSAffineTransformCalculator__h
+#define __otbPleiadesPToXSAffineTransformCalculator__h
+
+#include "itkLightObject.h"
+#include "itkObjectFactory.h"
+#include "itkScalableAffineTransform.h"
+#include "itkImageBase.h"
+
+namespace otb {
+/**
+ * \class PleiadesPToXSAffineTransformCalculator
+ * \brief Compute the affine transform linking P and XS pixel position for Pleiades sensor bundles
+ *
+ * Pleiades sensor bundle are exactly homotetic, it is therefore
+ * possible to corregister the pancrhomatic and multispectral images
+ * with a simple affine transform without using any sensor
+ * modelling. This yelds a very accurate corregistration and avoid the
+ * use of a DSM which may cause registration errors due to height errors.
+ *
+ * This calculator is a helper class to build the affine transform. It
+ * consists in only two static methods: one to check if the transform
+ * calculation applies to the given pair of images, the other to
+ * actually estimate the transfrom.
+ *
+ * The estimated transform returned by the latter transforms
+ * pancrhomatic image positions to multispectral image positions. If
+ * the inverse transform is needed, one can call the GetInverse()
+ * method of the transform to retrieve it.
+ *
+ */
+class ITK_EXPORT PleiadesPToXSAffineTransformCalculator
+  : public itk::LightObject
+{
+public:
+  typedef PleiadesPToXSAffineTransformCalculator Self;
+  typedef itk::LightObject                       Superclass;
+  typedef itk::SmartPointer<Self>                Pointer;
+  typedef itk::SmartPointer<const Self>          ConstPointer;
+
+  itkTypeMacro(PleiadesPToXSAffineTransformCalculator,itk::LightObject);
+  
+  typedef itk::ScalableAffineTransform<double,2> TransformType;
+  
+  /**
+   * This function checks if the transform calculation applies to the
+   * given pair of images. Checked items are:
+   * - Both images are sucessfully undertood by OTB as Pleiades images,
+   * - Both images processing level is SENSOR",
+   * - XS and Pan ids (except last 4 letters) are equal.
+   * \return True if the calculation applies
+   */
+  static bool CanCompute(const itk::ImageBase<2> * panchromaticImage, const itk::ImageBase<2> * xsImage);
+     
+
+  /**
+   * This function computes the transform for a pair of image. Note
+   * that the CanCompute() method is first called, and that an
+   * exception will be raised if computation can not be done.
+   *
+   * This function reads both images support data and builds a
+   * transform that will exactly coregister the images.
+   *
+   * \return The computed transform
+   */
+  static TransformType::Pointer Compute(const itk::ImageBase<2> * panchromaticImage, const itk::ImageBase<2> * xsImage);
+                  
+private:
+  PleiadesPToXSAffineTransformCalculator(); // purposely not implemented
+  PleiadesPToXSAffineTransformCalculator(const Self &); // purposely not implemented
+  void operator =(const Self&); // purposely not implemented
+};
+
+
+} // End namespace otb
+
+
+#endif
diff --git a/Code/Projections/otbVectorDataIntoImageProjectionFilter.txx b/Code/Projections/otbVectorDataIntoImageProjectionFilter.txx
index 636e6e6..0f88a55 100644
--- a/Code/Projections/otbVectorDataIntoImageProjectionFilter.txx
+++ b/Code/Projections/otbVectorDataIntoImageProjectionFilter.txx
@@ -117,8 +117,8 @@ VectorDataIntoImageProjectionFilter<TInputVectorData, TInputImage>
 {
   m_VdExtractFilter->SetInput(this->GetInput());
 
-  typedef typename ImageType::IndexType       IndexType;
   typedef typename ImageType::PointType       PointType;
+  typedef typename ImageType::SizeType       SizeType;
 
   if (m_InputImage.IsNull())
     {
@@ -132,24 +132,28 @@ VectorDataIntoImageProjectionFilter<TInputVectorData, TInputImage>
   std::cout << "ProjRef of the input vector data: "<< this->GetInput()->GetProjectionRef() << std::endl; */
 
   // Get the index of the corner of the image
-  IndexType ul, ur, ll, lr;
   PointType pul, pur, pll, plr;
-  ul = m_InputImage->GetLargestPossibleRegion().GetIndex();
-  ur = ul;
-  ll = ul;
-  lr = ul;
-  ur[0] += m_InputImage->GetLargestPossibleRegion().GetSize()[0];
-  lr[0] += m_InputImage->GetLargestPossibleRegion().GetSize()[0];
-  lr[1] += m_InputImage->GetLargestPossibleRegion().GetSize()[1];
-  ll[1] += m_InputImage->GetLargestPossibleRegion().GetSize()[1];
+  itk::ContinuousIndex<double,2> ul(m_InputImage->GetLargestPossibleRegion().GetIndex());
+  ul[0] += -0.5;
+  ul[1] += -0.5;
+
+  itk::ContinuousIndex<double,2> ur(ul);
+  itk::ContinuousIndex<double,2> ll(ul);
+  itk::ContinuousIndex<double,2> lr(ul);
+
+  SizeType size = m_InputImage->GetLargestPossibleRegion().GetSize();
+  ur[0] += size[0];
+  lr[0] += size[0];
+  lr[1] += size[1];
+  ll[1] += size[1];
 
   //std::cout << "bounding box of the input image (pixel): "<< ur << ", " << ul << ", " << lr << ", " << ll << std::endl;
 
   // Transform to physical point
-  m_InputImage->TransformIndexToPhysicalPoint(ul, pul);
-  m_InputImage->TransformIndexToPhysicalPoint(ur, pur);
-  m_InputImage->TransformIndexToPhysicalPoint(ll, pll);
-  m_InputImage->TransformIndexToPhysicalPoint(lr, plr);
+  m_InputImage->TransformContinuousIndexToPhysicalPoint(ul, pul);
+  m_InputImage->TransformContinuousIndexToPhysicalPoint(ur, pur);
+  m_InputImage->TransformContinuousIndexToPhysicalPoint(ll, pll);
+  m_InputImage->TransformContinuousIndexToPhysicalPoint(lr, plr);
   //std::cout << "bounding box of the input image (physical): "<< pur << ", " << pul << ", " << plr << ", " << pll << std::endl;
 
   // Build the cartographic region
diff --git a/Code/Radiometry/otbAtmosphericCorrectionParameters.cxx b/Code/Radiometry/otbAtmosphericCorrectionParameters.cxx
index 4cb40b7..3a68212 100644
--- a/Code/Radiometry/otbAtmosphericCorrectionParameters.cxx
+++ b/Code/Radiometry/otbAtmosphericCorrectionParameters.cxx
@@ -26,83 +26,21 @@
 
 namespace otb
 {
-///***********************      FilterFunctionValues **************************/
-//FilterFunctionValues
-//::FilterFunctionValues()
-//{
-//  m_MinSpectralValue = 0;
-//  m_MaxSpectralValue = 1;
-//  // Fill with 1. Size 3 for 6S interpolation
-//  m_FilterFunctionValues = ValuesVectorType(3, 1.);
-//  m_UserStep = 0.0025;
-//}
-//
-//FilterFunctionValues::WavelengthSpectralBandType
-//FilterFunctionValues
-//::GetCenterSpectralValue() const
-//{
-//  // The computation is done by taking the weighted average of the
-//  // filter. The computation is done each time the value is requested.
-//  // It is anticipated that this method won't be called much and that
-//  // the cost will be negligible compared to the rest of the processing
-//  double total = 0;
-//  for (unsigned int i = 0; i < m_FilterFunctionValues6S.size(); ++i)
-//    {
-//    total += m_FilterFunctionValues6S[i];
-//    }
-//  unsigned int centerIndex = 0;
-//  double       total2 = 0;
-//  for (centerIndex = 0; centerIndex < m_FilterFunctionValues6S.size(); ++centerIndex)
-//    {
-//    total2 += m_FilterFunctionValues6S[centerIndex];
-//    if (total2 > total / 2) break;
-//    }
-//  return m_MinSpectralValue + m_UserStep * centerIndex;
-//}
-//
-///**PrintSelf method */
-//void
-//FilterFunctionValues
-//::PrintSelf(std::ostream& os, itk::Indent indent) const
-//{
-//  os << indent << "Minimum spectral value       : " << m_MinSpectralValue << std::endl;
-//  os << indent << "Maximum spectral value       : " << m_MaxSpectralValue << std::endl;
-//  os << indent << "Wavelength spectral band step: " << m_UserStep << std::endl;
-//  os << indent << "Filter function values: " << std::endl;
-//  for (unsigned int i = 0; i < m_FilterFunctionValues.size(); ++i)
-//    {
-//    os << indent << m_FilterFunctionValues[i] << std::endl;
-//    }
-//  os << indent << "6S Filter function values: " << std::endl;
-//  for (unsigned int i = 0; i < m_FilterFunctionValues6S.size(); ++i)
-//    {
-//    os << indent << m_FilterFunctionValues6S[i] << std::endl;
-//    }
-//}
-
-/***********************      AtmosphericCorrectionParameters **************************/
-/**
- * Constructor
- */
+
 
 AtmosphericCorrectionParameters
 ::AtmosphericCorrectionParameters()
 {
-  m_SolarZenithalAngle   = 361.;
-  m_SolarAzimutalAngle   = 361.;
-  m_ViewingZenithalAngle = 361.;
-  m_ViewingAzimutalAngle = 361.;
-  m_Month                = 0;
-  m_Day                  = 0;
+
   m_AtmosphericPressure  = 1030.;
   m_WaterVaporAmount     = 2.5;
   m_OzoneAmount          = 0.28;
   m_AerosolModel         = CONTINENTAL;
   m_AerosolOptical       = 0.2;
-
-  m_WavelengthSpectralBand = InternalWavelengthSpectralBandVectorType::New();
-  m_WavelengthSpectralBand->Clear();
-
+  m_AeronetFileName      = "";
+  m_Day                  = 1;
+  m_Month                = 1;
+ 
 }
 
 /** Get data from aeronet file*/
@@ -127,41 +65,18 @@ AtmosphericCorrectionParameters
   m_WaterVaporAmount = reader->GetOutput()->GetWater();
 }
 
-/** Get data from filter function file*/
-void
-AtmosphericCorrectionParameters
-::LoadFilterFunctionValue(const std::string& filename)
-{
-  m_WavelengthSpectralBand->Clear();
-  SpectralSensitivityReader::Pointer spectralSensitivityReader = SpectralSensitivityReader::New();
-  spectralSensitivityReader->SetFileName(filename);
-  spectralSensitivityReader->Update();
-  m_WavelengthSpectralBand = spectralSensitivityReader->GetOutput();
-}
 
 /**PrintSelf method */
 void
 AtmosphericCorrectionParameters
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
-  os << "Solar zenithal angle  : " << m_SolarZenithalAngle << std::endl;
-  os << "Solar azimutal angle  : " << m_SolarAzimutalAngle << std::endl;
-  os << "Viewing zenithal angle: " << m_ViewingZenithalAngle << std::endl;
-  os << "Viewing azimutal angle: " << m_ViewingAzimutalAngle << std::endl;
-  os << "Month                 : " << m_Month << std::endl;
-  os << "Day                   : " << m_Day << std::endl;
+
   os << "Atmospheric pressure  : " << m_AtmosphericPressure << std::endl;
   os << "Water vapor amount    : " << m_WaterVaporAmount << std::endl;
   os << "Ozone amount          : " << m_OzoneAmount << std::endl;
   os << "Aerosol model         : " << m_AerosolModel << std::endl;
   os << "Aerosol optical       : " << m_AerosolOptical << std::endl;
 
-  // Function values print :
-  os << "Filter function values: " << std::endl;
-  for (unsigned int i = 0; i < m_WavelengthSpectralBand->Size(); ++i)
-    {
-    os << indent << "Channel " << i + 1 << " : " << std::endl;
-    os << indent << m_WavelengthSpectralBand->GetNthElement(i) << std::endl;
-    }
 }
 } // end namespace otb
diff --git a/Code/Radiometry/otbAtmosphericCorrectionParameters.h b/Code/Radiometry/otbAtmosphericCorrectionParameters.h
index 12e1697..fe1ba25 100644
--- a/Code/Radiometry/otbAtmosphericCorrectionParameters.h
+++ b/Code/Radiometry/otbAtmosphericCorrectionParameters.h
@@ -18,7 +18,7 @@
 #ifndef __otbAtmosphericCorrectionParameters_h
 #define __otbAtmosphericCorrectionParameters_h
 
-#include "itkDataObject.h"
+#include "itkObject.h"
 #include "itkObjectFactory.h"
 #include "itkMacro.h"
 #include "itkVariableSizeMatrix.h"
@@ -44,56 +44,22 @@ class ITK_EXPORT AtmosphericCorrectionParameters : public itk::DataObject
 public:
   /** Standard typedefs */
   typedef AtmosphericCorrectionParameters Self;
-  typedef itk::DataObject                 Superclass;
+  typedef itk::Object                 Superclass;
   typedef itk::SmartPointer<Self>         Pointer;
   typedef itk::SmartPointer<const Self>   ConstPointer;
 
   /** Type macro */
-  itkTypeMacro(AtmosphericCorrectionParameters, DataObject);
+  itkTypeMacro(AtmosphericCorrectionParameters, Object);
 
   /** Creation through object factory macro */
   itkNewMacro(Self);
 
-  typedef enum {NO_AEROSOL = 0, CONTINENTAL = 1, MARITIME = 2, URBAN = 3, DESERTIC = 5} AerosolModelType;
+  typedef enum {NO_AEROSOL = 0, CONTINENTAL = 1, MARITIME = 2, URBAN = 3, DESERTIC = 4} AerosolModelType;
 
   typedef ObjectList<FilterFunctionValues>                  InternalWavelengthSpectralBandVectorType;
   typedef InternalWavelengthSpectralBandVectorType::Pointer WavelengthSpectralBandVectorType;
 
   /**
-   * Set/Get the solar zenithal angle.
-   */
-  itkSetMacro(SolarZenithalAngle, double);
-  itkGetMacro(SolarZenithalAngle, double);
-  /**
-   * Set/Get the solar azimutal angle.
-   */
-  itkSetMacro(SolarAzimutalAngle, double);
-  itkGetMacro(SolarAzimutalAngle, double);
-
-  /**
-   * Set/Get the viewing zenithal angle.
-   */
-  itkSetMacro(ViewingZenithalAngle, double);
-  itkGetMacro(ViewingZenithalAngle, double);
-  /**
-   * Set/Get the viewing azimutal angle.
-   */
-  itkSetMacro(ViewingAzimutalAngle, double);
-  itkGetMacro(ViewingAzimutalAngle, double);
-
-  /**
-   * Set/Get the month.
-   */
-  itkSetClampMacro(Month, unsigned int, 1, 12);
-  itkGetMacro(Month, unsigned int);
-
-  /**
-   * Set/Get the day.
-   */
-  itkSetClampMacro(Day, unsigned int, 1, 31);
-  itkGetMacro(Day, unsigned int);
-
-  /**
    * Set/Get the atmospheric pressure.
    */
   itkSetMacro(AtmosphericPressure, double);
@@ -123,53 +89,46 @@ public:
   itkSetMacro(AerosolOptical, double);
   itkGetMacro(AerosolOptical, double);
 
-  /**
-   * Set/Get the wavelength spectral band.
-   */
-  void SetWavelengthSpectralBand(const WavelengthSpectralBandVectorType& waveband)
+  
+  /** Get/Set Aeronet file name. */
+  itkSetMacro(AeronetFileName, std::string);
+  itkGetMacro(AeronetFileName, std::string);
+
+
+  /** Read the aeronet data and extract aerosol optical and water vapor amount. */
+  void ReadAeronetData(const std::string& file, int year, int month, int day, int hour, int minute, double epsi);
+
+
+  void UpdateAeronetData(const std::string& file, int year, int month, int day, int hour, int minute, double epsi);
+  void UpdateAeronetData(const std::string& file, int year, int month, int day, int hour, int minute)
   {
-    m_WavelengthSpectralBand = waveband;
+    this->UpdateAeronetData(file, year, month, day, hour, minute, 0.4);
   }
-  void SetWavelengthSpectralBandWithIndex(unsigned int id, const FilterFunctionValues::Pointer& function)
+  void UpdateAeronetData(int year, int month, int day, int hour, int minute, double epsi)
   {
-    if (m_WavelengthSpectralBand->Size() <  id + 1)
-      {
-      for (unsigned int j = 0; j < (id + 1 - m_WavelengthSpectralBand->Size()); ++j)
-        {
-        FilterFunctionValues::Pointer temp;
-        m_WavelengthSpectralBand->PushBack(temp);
-        }
-      }
-    m_WavelengthSpectralBand->SetNthElement(id, function);
+    this->UpdateAeronetData(m_AeronetFileName, year, month, day, hour, minute, epsi);
   }
-  WavelengthSpectralBandVectorType GetWavelengthSpectralBand() const
+  void UpdateAeronetData(int year, int month, int day, int hour, int minute)
   {
-    return m_WavelengthSpectralBand;
+    this->UpdateAeronetData(m_AeronetFileName, year, month, day, hour, minute, 0.4);
   }
-  const WavelengthSpectralBandVectorType * GetWavelengthSpectralBandRef() const
+  void UpdateAeronetData(const std::string& file, int year, int hour, int minute)
   {
-    return &m_WavelengthSpectralBand;
+    this->UpdateAeronetData(file, year, m_Month, m_Day, hour, minute, 0.4);
   }
-
-  /** Read the aeronet data and extract aerosol optical and water vapor amount. */
-  void UpdateAeronetData(const std::string& file, int year, int month, int day, int hour, int minute, double epsi);
-  void UpdateAeronetData(const std::string& file, int year, int month, int day, int hour, int minute)
+  void UpdateAeronetData(int year, int hour, int minute)
   {
-    this->UpdateAeronetData(file, year, month, day, hour, minute, 0.4);
+    this->UpdateAeronetData(m_AeronetFileName, year, m_Month, m_Day, hour, minute, 0.4);
   }
-  void UpdateAeronetData(const std::string& file, int year, int hour, int minute, double epsi)
+
+  /*void UpdateAeronetData(const std::string& file, int year, int hour, int minute, double epsi) CHRIS
   {
     this->UpdateAeronetData(file, year, m_Month, m_Day, hour, minute, epsi);
   }
   void UpdateAeronetData(const std::string& file, int year, int hour, int minute)
   {
     this->UpdateAeronetData(file, year, m_Month, m_Day, hour, minute, 0.4);
-  }
-
-  /**
-   * Read a file that contains filter function values on the 6S format.
-   */
-  void LoadFilterFunctionValue(const std::string& filename);
+  }*/
 
   /** Constructor */
   AtmosphericCorrectionParameters();
@@ -184,19 +143,12 @@ protected:
 private:
   AtmosphericCorrectionParameters(const Self &); //purposely not implemented
   void operator =(const Self&); //purposely not implemented
-
-  /** The Solar zenithal angle */
-  double m_SolarZenithalAngle;
-  /** The Solar azimutal angle */
-  double m_SolarAzimutalAngle;
-  /** The Viewing zenithal angle */
-  double m_ViewingZenithalAngle;
-  /** The Viewing azimutal angle */
-  double m_ViewingAzimutalAngle;
-  /** The Month */
-  unsigned int m_Month;
-  /** The Day (in the month) */
-  unsigned int m_Day;
+  /** Path to an Aeronet data file, allows to compute aerosol optical and water vapor amounts. */
+  std::string m_AeronetFileName;
+  /** Day */
+  int m_Day;
+  /** Month */
+  int m_Month;
   /** The Atmospheric pressure */
   double m_AtmosphericPressure;
   /** The Water vapor amount (Total water vapor content over vertical atmospheric column) */
@@ -207,8 +159,6 @@ private:
   AerosolModelType m_AerosolModel;
   /** The Aerosol optical (radiative impact of aerosol for the reference wavelength 550-nm) */
   double m_AerosolOptical;
-  /** Wavelength for the each spectral band definition */
-  WavelengthSpectralBandVectorType m_WavelengthSpectralBand;
 };
 
 } // end namespace otb
diff --git a/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx b/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
index 0cef1e2..83357a4 100644
--- a/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
+++ b/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
@@ -135,7 +135,11 @@ void
 AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
 ::GenerateData()
 {
-
+  itkExceptionMacro("This class is not compatible with the new radiometry"
+    " framework. It is kept in the sources for documentation purpose. Check"
+    " Example/Radiometry/AtmosphericCorrectionSequencement.cxx for details"
+    " on the new framework");
+#if 0
   AtmosphericCorrectionParametersPointer input = this->GetInput();
   AtmosphericRadiativeTermsPointer       output = this->GetOutput();
 
@@ -201,6 +205,7 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
     output->SetUpwardDiffuseTransmittanceForAerosol(i, upwardDiffuseTransmittanceForAerosol);
     output->SetWavelengthSpectralBand(i, input->GetWavelengthSpectralBand()->GetNthElement(i)->GetCenterSpectralValue());
     }
+#endif
 }
 
 /**
diff --git a/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h b/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h
index 70d7a3d..f37f35a 100644
--- a/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h
+++ b/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h
@@ -37,6 +37,9 @@ namespace otb
  * \sa ReflectanceToSurfaceReflectanceImageFilter
  * \ingroup DataSources
  * \ingroup Radiometry
+ * \deprecated This class has been replaced by
+ *  otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms,
+ *  which only contains a static function that computes the radiative terms.
  */
 class ITK_EXPORT AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
   : public itk::ProcessObject
diff --git a/Code/Radiometry/otbImageMetadataCorrectionParameters.cxx b/Code/Radiometry/otbImageMetadataCorrectionParameters.cxx
new file mode 100644
index 0000000..4f6cbcf
--- /dev/null
+++ b/Code/Radiometry/otbImageMetadataCorrectionParameters.cxx
@@ -0,0 +1,81 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+#include "otbImageMetadataCorrectionParameters.h"
+#include "otbSpectralSensitivityReader.h"
+
+namespace otb
+{
+
+
+/***********************      ImageMetadataCorrectionParameters **************************/
+/**
+ * Constructor
+ */
+
+ImageMetadataCorrectionParameters
+::ImageMetadataCorrectionParameters()
+{
+  m_SolarZenithalAngle   = 361.;
+  m_SolarAzimutalAngle   = 361.;
+  m_ViewingZenithalAngle = 361.;
+  m_ViewingAzimutalAngle = 361.;
+  m_Month                = 0;
+  m_Day                  = 0;
+  m_Year                 = 0;
+  m_FilterFunctionValuesFileName = "";
+  
+  m_WavelengthSpectralBand = InternalWavelengthSpectralBandVectorType::New();
+  m_WavelengthSpectralBand->Clear();
+}
+
+
+/** Get data from filter function file*/
+void
+ImageMetadataCorrectionParameters
+::LoadFilterFunctionValue(const std::string& filename)
+{
+  m_WavelengthSpectralBand->Clear();
+  SpectralSensitivityReader::Pointer spectralSensitivityReader = SpectralSensitivityReader::New();
+  spectralSensitivityReader->SetFileName(filename);
+  spectralSensitivityReader->Update();
+  m_WavelengthSpectralBand = spectralSensitivityReader->GetOutput();
+}
+
+/**PrintSelf method */
+void
+ImageMetadataCorrectionParameters
+::PrintSelf(std::ostream& os, itk::Indent indent) const
+{
+  os << "Solar zenithal angle  : " << m_SolarZenithalAngle << std::endl;
+  os << "Solar azimutal angle  : " << m_SolarAzimutalAngle << std::endl;
+  os << "Viewing zenithal angle: " << m_ViewingZenithalAngle << std::endl;
+  os << "Viewing azimutal angle: " << m_ViewingAzimutalAngle << std::endl;
+  os << "Month                 : " << m_Month << std::endl;
+  os << "Day                   : " << m_Day << std::endl;
+  os << "Year                  : " << m_Year << std::endl;
+
+  // Function values print :
+  os << "Filter function values: " << std::endl;
+  for (unsigned int i = 0; i < m_WavelengthSpectralBand->Size(); ++i)
+    {
+    os << indent << "Channel " << i + 1 << " : " << std::endl;
+    os << indent << m_WavelengthSpectralBand->GetNthElement(i) << std::endl;
+    }
+}
+} // end namespace otb
diff --git a/Code/Radiometry/otbImageMetadataCorrectionParameters.h b/Code/Radiometry/otbImageMetadataCorrectionParameters.h
new file mode 100644
index 0000000..0bde6a0
--- /dev/null
+++ b/Code/Radiometry/otbImageMetadataCorrectionParameters.h
@@ -0,0 +1,176 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef __otbImageMetadataCorrectionParameters_h
+#define __otbImageMetadataCorrectionParameters_h
+
+#include "itkObject.h"
+#include "itkMacro.h"
+#include "itkVariableSizeMatrix.h"
+#include "itkVariableLengthVector.h"
+#include "otbObjectList.h"
+#include "otbFilterFunctionValues.h"
+#include <vector>
+#include <iostream>
+
+namespace otb
+{
+/** \class ImageMetadataCorrectionParameters
+ *  \brief This class contains all atmospheric correction parameters.
+ *
+ * Each value can be read in the metadata of an image (ex: SPOT5, ...) or directly set by the user.
+ *
+ * \ingroup Radiometry
+ *
+ */
+
+class ITK_EXPORT ImageMetadataCorrectionParameters : public itk::DataObject
+{
+public:
+  /** Standard typedefs */
+  typedef ImageMetadataCorrectionParameters Self;
+  typedef itk::Object                 Superclass;
+  typedef itk::SmartPointer<Self>         Pointer;
+  typedef itk::SmartPointer<const Self>   ConstPointer;
+
+  /** Type macro */
+  itkTypeMacro(ImageMetadataCorrectionParameters, Object);
+
+  /** Creation through object factory macro */
+  itkNewMacro(Self);
+
+  typedef ObjectList<FilterFunctionValues>                  InternalWavelengthSpectralBandVectorType;
+  typedef InternalWavelengthSpectralBandVectorType::Pointer WavelengthSpectralBandVectorType;
+
+  /**
+   * Set/Get the solar zenithal angle.
+   */
+  itkSetMacro(SolarZenithalAngle, double);
+  itkGetMacro(SolarZenithalAngle, double);
+  /**
+   * Set/Get the solar azimutal angle.
+   */
+  itkSetMacro(SolarAzimutalAngle, double);
+  itkGetMacro(SolarAzimutalAngle, double);
+
+  /**
+   * Set/Get the viewing zenithal angle.
+   */
+  itkSetMacro(ViewingZenithalAngle, double);
+  itkGetMacro(ViewingZenithalAngle, double);
+  /**
+   * Set/Get the viewing azimutal angle.
+   */
+  itkSetMacro(ViewingAzimutalAngle, double);
+  itkGetMacro(ViewingAzimutalAngle, double);
+
+  /**
+   * Set/Get the month.
+   */
+  itkSetClampMacro(Month, unsigned int, 1, 12);
+  itkGetMacro(Month, unsigned int);
+
+  /**
+   * Set/Get the day.
+   */
+  itkSetClampMacro(Day, unsigned int, 1, 31);
+  itkGetMacro(Day, unsigned int);
+
+  /**
+  * Set/Get the year.
+  */
+  itkSetMacro(Year, unsigned int);
+  itkGetMacro(Year, unsigned int);
+
+  /** Get/Set FilterFunction file name. */
+  itkSetMacro(FilterFunctionValuesFileName, std::string);
+  itkGetMacro(FilterFunctionValuesFileName, std::string);
+ 
+  /**
+   * Set/Get the wavelength spectral band.
+   */
+  void SetWavelengthSpectralBand(const WavelengthSpectralBandVectorType& waveband)
+  {
+    m_WavelengthSpectralBand = waveband;
+  }
+  void SetWavelengthSpectralBandWithIndex(unsigned int id, const FilterFunctionValues::Pointer& function)
+  {
+    if (m_WavelengthSpectralBand->Size() <  id + 1)
+      {
+      for (unsigned int j = 0; j < (id + 1 - m_WavelengthSpectralBand->Size()); ++j)
+        {
+        FilterFunctionValues::Pointer temp;
+        m_WavelengthSpectralBand->PushBack(temp);
+        }
+      }
+    m_WavelengthSpectralBand->SetNthElement(id, function);
+  }
+  WavelengthSpectralBandVectorType GetWavelengthSpectralBand() const
+  {
+    return m_WavelengthSpectralBand;
+  }
+  const WavelengthSpectralBandVectorType * GetWavelengthSpectralBandRef() const
+  {
+    return &m_WavelengthSpectralBand;
+  }
+
+   /**
+   * Read a file that contains filter function values on the 6S format.
+   */
+  void LoadFilterFunctionValue(const std::string& filename);
+  void LoadFilterFunctionValue()
+  {
+    this->LoadFilterFunctionValue(m_FilterFunctionValuesFileName);
+  }
+
+  /** Constructor */
+  ImageMetadataCorrectionParameters();
+  /** Destructor */
+  ~ImageMetadataCorrectionParameters() {}
+
+protected:
+
+  /**PrintSelf method */
+  void PrintSelf(std::ostream& os, itk::Indent indent) const;
+
+private:
+  ImageMetadataCorrectionParameters(const Self &); //purposely not implemented
+  void operator =(const Self&); //purposely not implemented
+
+  /** The Solar zenithal angle */
+  double m_SolarZenithalAngle;
+  /** The Solar azimutal angle */
+  double m_SolarAzimutalAngle;
+  /** The Viewing zenithal angle */
+  double m_ViewingZenithalAngle;
+  /** The Viewing azimutal angle */
+  double m_ViewingAzimutalAngle;
+  /** The Month */
+  unsigned int m_Month;
+  /** The Day (in the month) */
+  unsigned int m_Day;
+  /** The Year */
+  unsigned int m_Year;
+  std::string m_FilterFunctionValuesFileName;
+ 
+  /** Wavelength for the each spectral band definition */
+  WavelengthSpectralBandVectorType m_WavelengthSpectralBand;
+};
+
+} // end namespace otb
+
+#endif
diff --git a/Code/Radiometry/otbImageToReflectanceImageFilter.h b/Code/Radiometry/otbImageToReflectanceImageFilter.h
index fbf467e..a3151a4 100644
--- a/Code/Radiometry/otbImageToReflectanceImageFilter.h
+++ b/Code/Radiometry/otbImageToReflectanceImageFilter.h
@@ -22,6 +22,7 @@
 #ifndef __otbImageToReflectanceImageFilter_h
 #define __otbImageToReflectanceImageFilter_h
 
+#include "otbVarSol.h"
 #include "otbUnaryImageFunctorWithVectorImageFilter.h"
 #include "otbImageToLuminanceImageFilter.h"
 #include "otbLuminanceToReflectanceImageFilter.h"
@@ -315,12 +316,8 @@ protected:
         {
         if (m_Day * m_Month != 0 && m_Day < 32 && m_Month < 13)
           {
-          otb_6s_doublereal dsol = 0.;
-          otb_6s_integer    day = static_cast<otb_6s_integer>(m_Day);
-          otb_6s_integer    month = static_cast<otb_6s_integer>(m_Month);
-          //int               cr(0);
-          otb_6s_varsol_(&day, &month, &dsol);
-          coefTemp = vcl_cos(m_ZenithalSolarAngle * CONST_PI_180) * static_cast<double>(dsol);
+          double dsol = VarSol::GetVarSol(m_Day, m_Month);
+          coefTemp = vcl_cos(m_ZenithalSolarAngle * CONST_PI_180) * dsol;
           }
         else
           {
diff --git a/Code/Radiometry/otbLuminanceToImageImageFilter.h b/Code/Radiometry/otbLuminanceToImageImageFilter.h
new file mode 100644
index 0000000..b3c660c
--- /dev/null
+++ b/Code/Radiometry/otbLuminanceToImageImageFilter.h
@@ -0,0 +1,225 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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.
+
+
+     This software is distributed 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 __otbLuminanceToImageImageFilter_h
+#define __otbLuminanceToImageImageFilter_h
+
+#include "otb_6S.h"
+#include "otbUnaryImageFunctorWithVectorImageFilter.h"
+#include "otbVectorImage.h"
+#include "itkNumericTraits.h"
+#include "itkVariableLengthVector.h"
+#include "otbMacro.h"
+#include "otbOpticalImageMetadataInterface.h"
+#include "otbOpticalImageMetadataInterfaceFactory.h"
+
+#include <fstream>
+
+namespace otb
+{
+namespace Functor
+{
+/**
+   * \class LuminanceToImageImageFunctor
+   * \brief Substract beta to the Input and multiply by alpha.
+   *
+   * \sa LuminanceToImageImageFilter
+   * \ingroup Functor
+   * \ingroup Radiometry
+ */
+
+template <class TInput, class TOutput>
+class LuminanceToImageImageFunctor
+{
+public:
+  LuminanceToImageImageFunctor() :
+    m_Alpha(1.),
+    m_Beta(0.)
+  {}
+
+  virtual ~LuminanceToImageImageFunctor() {}
+
+  void SetAlpha(double alpha)
+  {
+    m_Alpha = alpha;
+  }
+  void SetBeta(double beta)
+  {
+    m_Beta = beta;
+  }
+  double GetAlpha()
+  {
+    return m_Alpha;
+  }
+  double GetBeta()
+  {
+    return m_Beta;
+  }
+
+  inline TOutput operator ()(const TInput& inPixel) const
+  {
+    TOutput outPixel;
+    double  temp;
+    temp = (static_cast<double>(inPixel) - m_Beta) * m_Alpha;
+    outPixel = static_cast<TOutput>(temp);
+    return outPixel;
+  }
+
+private:
+  double m_Alpha;
+  double m_Beta;
+};
+}
+
+/** \class LuminanceToImageImageFilter
+ *  \brief Convert a raw value into a luminance value
+ *
+ * Transform a luminance image into a classical image. For this it
+ * uses the functor LuminanceToImageImageFunctor calling for each component of each pixel.
+ *
+ *
+ * For Spot image in the dimap format, the correction parameters are
+ * retrieved automatically from the metadata
+ *
+ * \ingroup LuminanceToImageImageFunctor
+ * \ingroup Radiometry
+ *
+ * \example Radiometry/AtmosphericCorrectionSequencement.cxx
+ */
+template <class TInputImage, class TOutputImage>
+class ITK_EXPORT LuminanceToImageImageFilter :
+  public UnaryImageFunctorWithVectorImageFilter<TInputImage,
+      TOutputImage,
+      typename Functor::LuminanceToImageImageFunctor<typename
+          TInputImage::
+          InternalPixelType,
+          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::LuminanceToImageImageFunctor<typename InputImageType::InternalPixelType,
+      typename OutputImageType::InternalPixelType> FunctorType;
+
+  /** "typedef" for standard classes. */
+  typedef LuminanceToImageImageFilter                                                          Self;
+  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(LuminanceToImageImageFilter, UnaryImageFunctorWithVectorImageFiltermageFilter);
+
+  /** Supported images definition. */
+  typedef typename InputImageType::PixelType          InputPixelType;
+  typedef typename InputImageType::InternalPixelType  InputInternalPixelType;
+  typedef typename InputImageType::RegionType         InputImageRegionType;
+  typedef typename OutputImageType::PixelType         OutputPixelType;
+  typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
+  typedef typename OutputImageType::RegionType        OutputImageRegionType;
+
+  typedef typename itk::VariableLengthVector<double> VectorType;
+
+  /** Image size "typedef" definition. */
+  typedef typename InputImageType::SizeType SizeType;
+
+  /** Set the absolute calibration gains. */
+  itkSetMacro(Alpha, VectorType);
+
+  /** Give the absolute calibration gains. */
+  itkGetConstReferenceMacro(Alpha, VectorType);
+
+  /** Set the absolute calibration bias. */
+  itkSetMacro(Beta, VectorType);
+  /** Give the absolute calibration bias. */
+  itkGetConstReferenceMacro(Beta, VectorType);
+
+protected:
+  /** Constructor */
+  LuminanceToImageImageFilter()
+    {
+    m_Alpha.SetSize(0);
+    m_Beta.SetSize(0);
+    };
+
+  /** Destructor */
+  virtual ~LuminanceToImageImageFilter() {}
+
+  /** Update the functor list and input parameters */
+  virtual void BeforeThreadedGenerateData(void)
+  {
+    OpticalImageMetadataInterface::Pointer imageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(
+      this->GetInput()->GetMetaDataDictionary());
+    if (m_Alpha.GetSize() == 0)
+      {
+      m_Alpha = imageMetadataInterface->GetPhysicalGain();
+      }
+
+    if (m_Beta.GetSize() == 0)
+      {
+      m_Beta = imageMetadataInterface->GetPhysicalBias();
+      }
+
+    otbMsgDevMacro(<< "Dimension: ");
+    otbMsgDevMacro(<< "m_Alpha.GetSize(): " << m_Alpha.GetSize());
+    otbMsgDevMacro(<< "m_Beta.GetSize() : " << m_Beta.GetSize());
+    otbMsgDevMacro(
+      << "this->GetInput()->GetNumberOfComponentsPerPixel() : " << this->GetInput()->GetNumberOfComponentsPerPixel());
+
+    if ((m_Alpha.GetSize() != this->GetInput()->GetNumberOfComponentsPerPixel())
+        || (m_Beta.GetSize() != this->GetInput()->GetNumberOfComponentsPerPixel()))
+      {
+      itkExceptionMacro(<< "Alpha and Beta parameters should have the same size as the number of bands");
+      }
+
+    otbMsgDevMacro(<< "Using correction parameters: ");
+    otbMsgDevMacro(<< "Alpha (gain): " << m_Alpha);
+    otbMsgDevMacro(<< "Beta (bias):  " << m_Beta);
+
+    this->GetFunctorVector().clear();
+    for (unsigned int i = 0; i < this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
+      {
+      FunctorType functor;
+      functor.SetAlpha(m_Alpha[i]);
+      functor.SetBeta(m_Beta[i]);
+      this->GetFunctorVector().push_back(functor);
+      }
+  }
+
+private:
+  /** Ponderation declaration*/
+  VectorType m_Alpha;
+  VectorType m_Beta;
+};
+
+} // end namespace otb
+
+#endif
diff --git a/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h b/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h
index 65dd878..2d29e7d 100644
--- a/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h
+++ b/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h
@@ -22,7 +22,7 @@
 #ifndef __otbLuminanceToReflectanceImageFilter_h
 #define __otbLuminanceToReflectanceImageFilter_h
 
-#include "otb_6S.h"
+#include "otbVarSol.h"
 #include "otbUnaryImageFunctorWithVectorImageFilter.h"
 #include "otbVectorImage.h"
 #include "otbMath.h"
@@ -297,12 +297,8 @@ protected:
         {
         if (m_Day * m_Month != 0 && m_Day < 32 && m_Month < 13)
           {
-          otb_6s_doublereal dsol = 0.;
-          otb_6s_integer    day = static_cast<otb_6s_integer>(m_Day);
-          otb_6s_integer    month = static_cast<otb_6s_integer>(m_Month);
-          //int               cr(0);
-          otb_6s_varsol_(&day, &month, &dsol);
-          coefTemp = vcl_cos(m_ZenithalSolarAngle * CONST_PI_180) * static_cast<double>(dsol);
+          double dsol = VarSol::GetVarSol(m_Day, m_Month);
+          coefTemp = vcl_cos(m_ZenithalSolarAngle * CONST_PI_180) * dsol;
           }
         else
           {
diff --git a/Code/Radiometry/otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h b/Code/Radiometry/otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h
new file mode 100644
index 0000000..03c683f
--- /dev/null
+++ b/Code/Radiometry/otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h
@@ -0,0 +1,113 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef __otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms_h
+#define __otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms_h
+
+#include "otbAtmosphericRadiativeTerms.h"
+#include "otbAtmosphericCorrectionParameters.h"
+#include "otbImageMetadataCorrectionParameters.h"
+#include "otbSIXSTraits.h"
+
+namespace otb
+{
+
+/** \class RadiometryCorrectionParametersToAtmosphericRadiativeTerms
+   * \brief TODO.
+   *
+   * TODO
+   * \ingroup Radiometry
+   *
+ */
+  class ITK_EXPORT RadiometryCorrectionParametersToAtmosphericRadiativeTerms
+  {
+  public:
+
+    /** Call the varSol function*/
+    static AtmosphericRadiativeTerms::Pointer Compute(AtmosphericCorrectionParameters* paramAtmo, ImageMetadataCorrectionParameters* paramAcqui)
+    {
+      AtmosphericRadiativeTerms::Pointer radTermsOut = AtmosphericRadiativeTerms::New();
+
+      typedef AtmosphericCorrectionParameters::WavelengthSpectralBandVectorType WavelengthSpectralBandVectorType;
+      WavelengthSpectralBandVectorType WavelengthSpectralBandVector = paramAcqui->GetWavelengthSpectralBand();
+      unsigned int NbBand = WavelengthSpectralBandVector->Size();
+
+      radTermsOut->ValuesInitialization(NbBand);
+
+      double atmosphericReflectance(0.);
+      double atmosphericSphericalAlbedo(0.);
+      double totalGaseousTransmission(0.);
+      double downwardTransmittance(0.);
+      double upwardTransmittance(0.);
+      double upwardDiffuseTransmittance(0.);
+      double upwardDirectTransmittance(0.);
+      double upwardDiffuseTransmittanceForRayleigh(0.);
+      double upwardDiffuseTransmittanceForAerosol(0.);
+  
+        for (unsigned int i = 0; i < NbBand; ++i)
+        {
+          atmosphericReflectance = 0.;
+          atmosphericSphericalAlbedo = 0.;
+          totalGaseousTransmission = 0.;
+          downwardTransmittance = 0.;
+          upwardTransmittance = 0.;
+          upwardDiffuseTransmittance = 0.;
+          upwardDirectTransmittance = 0.;
+          upwardDiffuseTransmittanceForRayleigh = 0.;
+          upwardDiffuseTransmittanceForAerosol = 0.;
+          SIXSTraits::ComputeAtmosphericParameters(
+            paramAcqui->GetSolarZenithalAngle(),                  /** The Solar zenithal angle */
+            paramAcqui->GetSolarAzimutalAngle(),                  /** The Solar azimutal angle */
+            paramAcqui->GetViewingZenithalAngle(),                /** The Viewing zenithal angle */
+            paramAcqui->GetViewingAzimutalAngle(),                /** The Viewing azimutal angle */
+            paramAcqui->GetMonth(),                               /** The Month */
+            paramAcqui->GetDay(),                                 /** The Day (in the month) */
+            paramAtmo->GetAtmosphericPressure(),                 /** The Atmospheric pressure */
+            paramAtmo->GetWaterVaporAmount(),                    /** The Water vapor amount (Total water vapor content over vertical atmospheric column) */
+            paramAtmo->GetOzoneAmount(),                         /** The Ozone amount (Stratospheric ozone layer content) */
+            paramAtmo->GetAerosolModel(),                        /** The Aerosol model */
+            paramAtmo->GetAerosolOptical(),                      /** The Aerosol optical (radiative impact of aerosol for the reference wavelength 550-nm) */
+            paramAcqui->GetWavelengthSpectralBand()->GetNthElement(i), /** Wavelength for the spectral band definition */
+            /** Note : The Max wavelength spectral band value must be updated ! */
+            atmosphericReflectance,                          /** Atmospheric reflectance */
+            atmosphericSphericalAlbedo,                      /** atmospheric spherical albedo */
+            totalGaseousTransmission,                        /** Total gaseous transmission */
+            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 */
+            );
+
+          radTermsOut->SetIntrinsicAtmosphericReflectance(i, atmosphericReflectance);
+          radTermsOut->SetSphericalAlbedo(i, atmosphericSphericalAlbedo);
+          radTermsOut->SetTotalGaseousTransmission(i, totalGaseousTransmission);
+          radTermsOut->SetDownwardTransmittance(i, downwardTransmittance);
+          radTermsOut->SetUpwardTransmittance(i, upwardTransmittance);
+          radTermsOut->SetUpwardDiffuseTransmittance(i, upwardDiffuseTransmittance);
+          radTermsOut->SetUpwardDirectTransmittance(i, upwardDirectTransmittance);
+          radTermsOut->SetUpwardDiffuseTransmittanceForRayleigh(i, upwardDiffuseTransmittanceForRayleigh);
+          radTermsOut->SetUpwardDiffuseTransmittanceForAerosol(i, upwardDiffuseTransmittanceForAerosol);
+          radTermsOut->SetWavelengthSpectralBand(i, paramAcqui->GetWavelengthSpectralBand()->GetNthElement(i)->GetCenterSpectralValue());
+        }
+
+      return radTermsOut;
+    }
+  };
+} //end namespace otb
+#endif
diff --git a/Code/Radiometry/otbReflectanceToImageImageFilter.h b/Code/Radiometry/otbReflectanceToImageImageFilter.h
new file mode 100644
index 0000000..32e8d33
--- /dev/null
+++ b/Code/Radiometry/otbReflectanceToImageImageFilter.h
@@ -0,0 +1,351 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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.
+
+
+     This software is distributed 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 __otbReflectanceToImageImageFilter_h
+#define __otbReflectanceToImageImageFilter_h
+
+#include "otbUnaryImageFunctorWithVectorImageFilter.h"
+#include "otbLuminanceToImageImageFilter.h"
+#include "otbReflectanceToLuminanceImageFilter.h"
+#include "otbVectorImage.h"
+#include "itkNumericTraits.h"
+#include "itkVariableLengthVector.h"
+
+namespace otb
+{
+namespace Functor
+{
+/** \class ReflectanceToImageImageFunctor
+   *  \brief Call the ReflectanceToLuminanceFunctor over the input and the LuminanceToImageFunctor to this result.
+   *
+   *
+   * \sa ReflectanceToImageImageFilter
+   *
+   * \ingroup Functor
+   * \ingroup LuminanceToImageFunctor
+   * \ingroup ReflectanceToLuminanceFunctor
+   * \ingroup Radiometry
+ */
+template <class TInput, class TOutput>
+class ReflectanceToImageImageFunctor
+{
+public:
+  ReflectanceToImageImageFunctor() {}
+  virtual ~ReflectanceToImageImageFunctor() {}
+
+  typedef Functor::LuminanceToImageImageFunctor<TInput, TOutput>       LumToImFunctorType;
+  typedef Functor::ReflectanceToLuminanceImageFunctor<TInput, TOutput> ReflecToLumFunctorType;
+
+  void SetAlpha(double alpha)
+  {
+    m_LumToImFunctor.SetAlpha(alpha);
+  }
+  void SetBeta(double beta)
+  {
+    m_LumToImFunctor.SetBeta(beta);
+  }
+  void SetSolarIllumination(double solarIllumination)
+  {
+    m_ReflecToLumFunctor.SetSolarIllumination(solarIllumination);
+  }
+  void SetIlluminationCorrectionCoefficient(double coef)
+  {
+    m_ReflecToLumFunctor.SetIlluminationCorrectionCoefficient(coef);
+  }
+
+  double GetAlpha()
+  {
+    return m_LumToImFunctor.GetAlpha();
+  }
+  double GetBeta()
+  {
+    return m_LumToImFunctor.GetBeta();
+  }
+  double GetSolarIllumination()
+  {
+    return m_ReflecToLumFunctor.GetSolarIllumination();
+  }
+  double GetIlluminationCorrectionCoefficient()
+  {
+    return m_ReflecToLumFunctor.GetIlluminationCorrectionCoefficient();
+  }
+
+  inline TOutput operator ()(const TInput& inPixel) const
+  {
+    TOutput outPixel;
+    TOutput tempPix;
+    tempPix = m_ReflecToLumFunctor(inPixel);
+    outPixel = m_LumToImFunctor(tempPix);
+
+    return outPixel;
+  }
+
+private:
+  LumToImFunctorType     m_LumToImFunctor;
+  ReflecToLumFunctorType m_ReflecToLumFunctor;
+
+};
+}
+
+/** \class ReflectanceToImageImageFilter
+ *  \brief Convert a reflectance into a raw value value
+ *
+ *  Transform a reflectance image into a classical image image. For this it uses the functor ReflectanceToImageFunctor 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.
+ *  To note that in the case, 6S gives the square of the distances ratio.
+ *
+ *
+ * For Spot image in the dimap format, the correction parameters are
+ * retrieved automatically from the metadata
+ *
+ * \ingroup ReflectanceToImageImageFunctor
+ * \ingroup LuminanceToImageImageFilter
+ * \ingroup ReflectanceToLuminanceImageFilter
+ * \ingroup Radiometry
+ */
+template <class TInputImage, class TOutputImage>
+class ITK_EXPORT ReflectanceToImageImageFilter :
+  public UnaryImageFunctorWithVectorImageFilter<TInputImage,
+      TOutputImage,
+      typename Functor::ReflectanceToImageImageFunctor<typename
+          TInputImage::
+          InternalPixelType,
+          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::ReflectanceToImageImageFunctor<typename InputImageType::InternalPixelType,
+      typename OutputImageType::InternalPixelType> FunctorType;
+
+  /** "typedef" for standard classes. */
+  typedef ReflectanceToImageImageFilter                                                        Self;
+  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(ReflectanceToImageImageFilter, UnaryImageFunctorWithVectorImageFiltermageFilter);
+
+  /** Supported images definition. */
+  typedef typename InputImageType::PixelType          InputPixelType;
+  typedef typename InputImageType::InternalPixelType  InputInternalPixelType;
+  typedef typename InputImageType::RegionType         InputImageRegionType;
+  typedef typename OutputImageType::PixelType         OutputPixelType;
+  typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
+  typedef typename OutputImageType::RegionType        OutputImageRegionType;
+
+  typedef typename itk::VariableLengthVector<double> VectorType;
+
+  /** Image size "typedef" definition. */
+  typedef typename InputImageType::SizeType SizeType;
+
+  /** Set the absolute calibration gains. */
+  itkSetMacro(Alpha, VectorType);
+  /** Give the absolute calibration gains. */
+  itkGetConstReferenceMacro(Alpha, VectorType);
+
+  /** Set the absolute calibration bias. */
+  itkSetMacro(Beta, VectorType);
+  /** Give the absolute calibration bias. */
+  itkGetConstReferenceMacro(Beta, VectorType);
+  /** Set the solar illumination value. */
+  itkSetMacro(SolarIllumination, VectorType);
+
+  /** Give the solar illumination value. */
+  itkGetConstReferenceMacro(SolarIllumination, VectorType);
+
+  /** Set the zenithal solar angle. */
+  itkSetMacro(ZenithalSolarAngle, double);
+  /** Give the zenithal solar angle. */
+  itkGetConstReferenceMacro(ZenithalSolarAngle, double);
+
+  /** Set/Get the sun elevation angle (internally handled by the zenithal angle)*/
+  virtual void SetElevationSolarAngle(double elevationAngle)
+  {
+    double zenithalAngle = 90.0 - elevationAngle;
+    if (this->m_ZenithalSolarAngle != zenithalAngle)
+      {
+      this->m_ZenithalSolarAngle = zenithalAngle;
+      this->Modified();
+      }
+  }
+
+  virtual double GetElevationSolarAngle() const
+  {
+    return 90.0 - this->m_ZenithalSolarAngle;
+  }
+
+  /** Set the flux normalization coefficient. */
+  void SetFluxNormalizationCoefficient(double coef)
+  {
+    m_FluxNormalizationCoefficient = coef;
+    m_IsSetFluxNormalizationCoefficient = true;
+    this->Modified();
+  }
+
+  /** Set the acquisition day. */
+  itkSetClampMacro(Day, int, 1, 31);
+  /** Get the acquisition day. */
+  itkGetConstReferenceMacro(Day, int);
+  /** Set the acquisition mounth. */
+  itkSetClampMacro(Month, int, 1, 12);
+  /** Set the  acquisition mounth. */
+  itkGetConstReferenceMacro(Month, int);
+
+protected:
+  /** Constructor */
+  ReflectanceToImageImageFilter() :
+    m_ZenithalSolarAngle(120.), //invalid value which will lead to negative radiometry
+    m_FluxNormalizationCoefficient(1.),
+    m_IsSetFluxNormalizationCoefficient(false),
+    m_Day(0),
+    m_Month(0)
+    {
+    m_Alpha.SetSize(0);
+    m_Beta.SetSize(0);
+    m_SolarIllumination.SetSize(0);
+    };
+
+  /** Destructor */
+  virtual ~ReflectanceToImageImageFilter() {}
+
+  /** Update the functor list and input parameters */
+  virtual void BeforeThreadedGenerateData(void)
+  {
+
+    OpticalImageMetadataInterface::Pointer imageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(
+      this->GetInput()->GetMetaDataDictionary());
+    if (m_Alpha.GetSize() == 0)
+      {
+      m_Alpha = imageMetadataInterface->GetPhysicalGain();
+      }
+
+    if (m_Beta.GetSize() == 0)
+      {
+      m_Beta = imageMetadataInterface->GetPhysicalBias();
+      }
+
+    if ((m_Day == 0) && (!m_IsSetFluxNormalizationCoefficient))
+      {
+      m_Day = imageMetadataInterface->GetDay();
+      }
+
+    if ((m_Month == 0) && (!m_IsSetFluxNormalizationCoefficient))
+      {
+      m_Month = imageMetadataInterface->GetMonth();
+      }
+
+    if (m_SolarIllumination.GetSize() == 0)
+      {
+      m_SolarIllumination = imageMetadataInterface->GetSolarIrradiance();
+      }
+
+    if (m_ZenithalSolarAngle == 120.0)
+      {
+      //the zenithal angle is the complementary of the elevation angle
+      m_ZenithalSolarAngle = 90.0 - imageMetadataInterface->GetSunElevation();
+      }
+
+    otbMsgDevMacro(<< "Using correction parameters: ");
+    otbMsgDevMacro(<< "Alpha (gain): " << m_Alpha);
+    otbMsgDevMacro(<< "Beta (bias):  " << m_Beta);
+    otbMsgDevMacro(<< "Day:               " << m_Day);
+    otbMsgDevMacro(<< "Month:             " << m_Month);
+    otbMsgDevMacro(<< "Solar irradiance:  " << m_SolarIllumination);
+    otbMsgDevMacro(<< "Zenithal angle:    " << m_ZenithalSolarAngle);
+
+    if ((m_Alpha.GetSize() != this->GetInput()->GetNumberOfComponentsPerPixel())
+        || (m_Beta.GetSize() != this->GetInput()->GetNumberOfComponentsPerPixel())
+        || (m_SolarIllumination.GetSize() != this->GetInput()->GetNumberOfComponentsPerPixel()))
+      {
+      itkExceptionMacro(
+        << "Alpha, Beta and SolarIllumination parameters should have the same size as the number of bands");
+      }
+
+    this->GetFunctorVector().clear();
+    for (unsigned int i = 0; i < this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
+      {
+      FunctorType functor;
+      double      coefTemp = 0.;
+      if (!m_IsSetFluxNormalizationCoefficient)
+        {
+        if (m_Day * m_Month != 0 && m_Day < 32 && m_Month < 13)
+          {
+          otb_6s_doublereal dsol = 0.;
+          otb_6s_integer    day = static_cast<otb_6s_integer>(m_Day);
+          otb_6s_integer    month = static_cast<otb_6s_integer>(m_Month);
+          //int               cr(0);
+          otb_6s_varsol_(&day, &month, &dsol);
+          coefTemp = vcl_cos(m_ZenithalSolarAngle * CONST_PI_180) * static_cast<double>(dsol);
+          }
+        else
+          {
+          itkExceptionMacro(<< "Day has to be included between 1 and 31, Month beetween 1 and 12.");
+          }
+        }
+      else
+        {
+        coefTemp =
+          vcl_cos(m_ZenithalSolarAngle *
+                  CONST_PI_180) * m_FluxNormalizationCoefficient * m_FluxNormalizationCoefficient;
+        }
+      functor.SetIlluminationCorrectionCoefficient(coefTemp);
+      functor.SetAlpha(m_Alpha[i]);
+      functor.SetBeta(m_Beta[i]);
+      functor.SetSolarIllumination(m_SolarIllumination[i]);
+      this->GetFunctorVector().push_back(functor);
+      }
+  }
+
+private:
+  /** Ponderation declaration*/
+  VectorType m_Alpha;
+  VectorType m_Beta;
+  /** Set the zenithal soalr angle. */
+  double m_ZenithalSolarAngle;
+  /** Flux normalization coefficient. */
+  double m_FluxNormalizationCoefficient;
+  /** Solar illumination value. */
+  VectorType m_SolarIllumination;
+  /** 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;
+  /** Acquisition Day*/
+  int m_Day;
+  /** Acquisition Month*/
+  int m_Month;
+};
+
+} // end namespace otb
+
+#endif
diff --git a/Code/Radiometry/otbReflectanceToLuminanceImageFilter.h b/Code/Radiometry/otbReflectanceToLuminanceImageFilter.h
new file mode 100644
index 0000000..b91b0bc
--- /dev/null
+++ b/Code/Radiometry/otbReflectanceToLuminanceImageFilter.h
@@ -0,0 +1,329 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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.
+
+
+     This software is distributed 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 __otbReflectanceToLuminanceImageFilter_h
+#define __otbReflectanceToLuminanceImageFilter_h
+
+#include "otb_6S.h"
+#include "otbUnaryImageFunctorWithVectorImageFilter.h"
+#include "otbVectorImage.h"
+#include "otbMath.h"
+#include "itkNumericTraits.h"
+#include "itkVariableLengthVector.h"
+#include "otbMacro.h"
+#include "otbOpticalImageMetadataInterface.h"
+#include "otbOpticalImageMetadataInterfaceFactory.h"
+#include <iomanip>
+
+namespace otb
+{
+namespace Functor
+{
+/**
+   * \class ReflectanceToLuminanceImageFunctor
+   * \brief Compupute luminance from the reflectance value
+   *
+   *  Divide by Pi and multiply by an illumination correction coefficient
+   *  and the given solar illumination.
+   *
+   *
+   * \sa ReflectanceToLuminanceImageFilter
+   *
+   * \ingroup Functor
+   * \ingroup Radiometry
+   *
+ */
+template <class TInput, class TOutput>
+class ReflectanceToLuminanceImageFunctor
+{
+public:
+  ReflectanceToLuminanceImageFunctor() :
+    m_SolarIllumination(1.0),
+    m_IlluminationCorrectionCoefficient(1.0)
+  {}
+
+  virtual ~ReflectanceToLuminanceImageFunctor() {}
+
+  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) const
+  {
+    TOutput outPixel;
+    double  temp;
+    temp = static_cast<double>(inPixel)
+           / static_cast<double>(CONST_PI)
+           * m_IlluminationCorrectionCoefficient
+           * m_SolarIllumination;
+
+    outPixel = static_cast<TOutput>(temp);
+    return outPixel;
+  }
+
+private:
+  double m_SolarIllumination;
+  double m_IlluminationCorrectionCoefficient;
+};
+}
+
+/** \class ReflectanceToLuminanceImageFilter
+ *  \brief Convert reflectance value into luminance value
+ *
+ * Transform a reflectance image into the luminance. For this it uses the
+ * functor ReflectanceToLuminanceImageFunctor calling for each component of each pixel.
+ *
+ *
+ * For Spot image in the dimap format, the correction parameters are
+ * retrieved automatically from the metadata
+ *
+ * \ingroup ImageToLuminanceImageFunctor
+ * \ingroup Radiometry
+ *
+ * \example Radiometry/AtmosphericCorrectionSequencement.cxx
+ */
+template <class TInputImage, class TOutputImage>
+class ITK_EXPORT ReflectanceToLuminanceImageFilter :
+  public UnaryImageFunctorWithVectorImageFilter<TInputImage,
+      TOutputImage,
+      typename Functor::ReflectanceToLuminanceImageFunctor<typename
+          TInputImage::
+          InternalPixelType,
+          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::ReflectanceToLuminanceImageFunctor<typename InputImageType::InternalPixelType,
+      typename OutputImageType::InternalPixelType>
+  FunctorType;
+
+  /** "typedef" for standard classes. */
+  typedef ReflectanceToLuminanceImageFilter                                                    Self;
+  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(ReflectanceToLuminanceImageFilter, UnaryImageFunctorWithVectorImageFiltermageFilter);
+
+  /** Supported images definition. */
+  typedef typename InputImageType::PixelType          InputPixelType;
+  typedef typename InputImageType::InternalPixelType  InputInternalPixelType;
+  typedef typename InputImageType::RegionType         InputImageRegionType;
+  typedef typename OutputImageType::PixelType         OutputPixelType;
+  typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
+  typedef typename OutputImageType::RegionType        OutputImageRegionType;
+
+  typedef typename itk::VariableLengthVector<double> VectorType;
+
+  /** Image size "typedef" definition. */
+  typedef typename InputImageType::SizeType SizeType;
+
+  /** Set the solar illumination value. */
+  itkSetMacro(SolarIllumination, VectorType);
+  /** Give the solar illumination value. */
+  itkGetConstReferenceMacro(SolarIllumination, VectorType);
+
+  /** Set the zenithal solar angle. */
+  itkSetMacro(ZenithalSolarAngle, double);
+  /** Give the zenithal solar angle. */
+  itkGetConstReferenceMacro(ZenithalSolarAngle, double);
+
+  /** Set/Get the sun elevation angle (internally handled by the zenithal angle)*/
+  virtual void SetElevationSolarAngle(double elevationAngle)
+  {
+    double zenithalAngle = 90.0 - elevationAngle;
+    if (this->m_ZenithalSolarAngle != zenithalAngle)
+      {
+      this->m_ZenithalSolarAngle = zenithalAngle;
+      this->Modified();
+      }
+  }
+
+  virtual double GetElevationSolarAngle() const
+  {
+    return 90.0 - this->m_ZenithalSolarAngle;
+  }
+
+  /** Set the day. */
+  itkSetClampMacro(Day, int, 1, 31);
+  /** Give the day. */
+  itkGetConstReferenceMacro(Day, int);
+
+  /** Set the mounth. */
+  itkSetClampMacro(Month, int, 1, 12);
+  /** Give the mounth. */
+  itkGetConstReferenceMacro(Month, int);
+
+  /** Set the flux normalization coefficient. */
+  void SetFluxNormalizationCoefficient(double coef)
+  {
+    m_FluxNormalizationCoefficient = coef;
+    m_IsSetFluxNormalizationCoefficient = true;
+    this->Modified();
+  }
+  /** Give the flux normalization coefficient. */
+  itkGetConstReferenceMacro(FluxNormalizationCoefficient, double);
+
+  /** Set the IsSetFluxNormalizationCoefficient boolean. */
+  itkSetMacro(IsSetFluxNormalizationCoefficient, bool);
+  /** Give the IsSetFluxNormalizationCoefficient boolean. */
+  itkGetConstReferenceMacro(IsSetFluxNormalizationCoefficient, bool);
+
+  /** Set the UseClamp boolean. */
+  itkSetMacro(UseClamp, bool);
+  /** Give the UseClamp boolean. */
+  itkGetConstReferenceMacro(UseClamp, bool);
+
+protected:
+  /** Constructor */
+  ReflectanceToLuminanceImageFilter() :
+    m_ZenithalSolarAngle(120.0), //invalid value which will lead to negative radiometry
+    m_FluxNormalizationCoefficient(1.),
+    m_Day(0),
+    m_Month(0),
+    m_IsSetFluxNormalizationCoefficient(false)
+    {
+    m_SolarIllumination.SetSize(0);
+    };
+
+  /** Destructor */
+  virtual ~ReflectanceToLuminanceImageFilter() {}
+
+  /** Update the functor list and input parameters */
+  virtual void BeforeThreadedGenerateData(void)
+  {
+    OpticalImageMetadataInterface::Pointer imageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(
+      this->GetInput()->GetMetaDataDictionary());
+    if ((m_Day == 0) && (!m_IsSetFluxNormalizationCoefficient))
+      {
+      m_Day = imageMetadataInterface->GetDay();
+      }
+
+    if ((m_Month == 0) && (!m_IsSetFluxNormalizationCoefficient))
+      {
+      m_Month = imageMetadataInterface->GetMonth();
+      }
+
+    if (m_SolarIllumination.GetSize() == 0)
+      {
+      m_SolarIllumination = imageMetadataInterface->GetSolarIrradiance();
+      }
+
+    if (m_ZenithalSolarAngle == 120.0)
+      {
+      //the zenithal angle is the complementary of the elevation angle
+      m_ZenithalSolarAngle = 90.0 - imageMetadataInterface->GetSunElevation();
+      }
+
+    std::cout << "Using correction parameters: " << std::endl;
+    std::cout<< "Day:               " << m_Day << std::endl;
+    std::cout<< "Month:             " << m_Month << std::endl;
+    std::cout<< "Solar irradiance:  " << m_SolarIllumination << std::endl;
+    std::cout<< "Zenithal angle:    " << m_ZenithalSolarAngle << std::endl;
+
+    if ((m_SolarIllumination.GetSize() != this->GetInput()->GetNumberOfComponentsPerPixel()))
+      {
+      itkExceptionMacro(<< "SolarIllumination parameter should have the same size as the number of bands");
+      }
+
+    this->GetFunctorVector().clear();
+
+    for (unsigned int i = 0; i < this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
+      {
+      FunctorType functor;
+      double      coefTemp = 0.;
+      if (!m_IsSetFluxNormalizationCoefficient)
+        {
+        if (m_Day * m_Month != 0 && m_Day < 32 && m_Month < 13)
+          {
+          otb_6s_doublereal dsol = 0.;
+          otb_6s_integer    day = static_cast<otb_6s_integer>(m_Day);
+          otb_6s_integer    month = static_cast<otb_6s_integer>(m_Month);
+          //int               cr(0);
+          otb_6s_varsol_(&day, &month, &dsol);
+          coefTemp = vcl_cos(m_ZenithalSolarAngle * CONST_PI_180) * static_cast<double>(dsol);
+          }
+        else
+          {
+          itkExceptionMacro(<< "Day has to be included between 1 and 31, Month beetween 1 and 12.");
+          }
+        }
+      else
+        {
+        coefTemp =
+          vcl_cos(m_ZenithalSolarAngle *
+                  CONST_PI_180) * m_FluxNormalizationCoefficient * m_FluxNormalizationCoefficient;
+        }
+      functor.SetIlluminationCorrectionCoefficient(coefTemp);
+      functor.SetSolarIllumination(static_cast<double>(m_SolarIllumination[i]));
+
+      this->GetFunctorVector().push_back(functor);
+      }
+  }
+
+private:
+
+  /** Set the zenithal soalr angle. */
+  double m_ZenithalSolarAngle;
+  /** Flux normalization coefficient. */
+  double m_FluxNormalizationCoefficient;
+  /** Acquisition day. */
+  int m_Day;
+  /** Acquisition mounth. */
+  int m_Month;
+  /** Solar illumination value. */
+  VectorType m_SolarIllumination;
+  /** 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;
+  /** Clamp values to [0,1] */
+  bool m_UseClamp;
+
+};
+
+} // end namespace otb
+#endif
diff --git a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h
index 3c8c4cf..f89c940 100644
--- a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h
+++ b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h
@@ -24,8 +24,11 @@
 
 #include "otbUnaryImageFunctorWithVectorImageFilter.h"
 
+#include "otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h"
+#include "otbAtmosphericCorrectionParameters.h"
+#include "otbImageMetadataCorrectionParameters.h"
 #include "otbAtmosphericRadiativeTerms.h"
-#include "otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h"
+
 #include "itkMetaDataDictionary.h"
 
 #include <iomanip>
@@ -117,6 +120,8 @@ private:
  * \ingroup AtmosphericCorrectionParameters
  * \ingroup LuminanceToReflectanceImageFilter
  * \ingroup ImageToReflectanceImageFilter
+ * \ingroup ImageMetadataCorrectionParameters
+ * \ingroup otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms
  * \ingroup Radiometry
  *
  * \example Radiometry/AtmosphericCorrectionSequencement.cxx
@@ -162,56 +167,58 @@ public:
   typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
   typedef typename OutputImageType::RegionType        OutputImageRegionType;
 
-  typedef AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms Parameters2RadiativeTermsType;
-  typedef Parameters2RadiativeTermsType::Pointer                       Parameters2RadiativeTermsPointerType;
-  typedef AtmosphericCorrectionParameters::Pointer                     CorrectionParametersPointerType;
-  typedef AtmosphericRadiativeTerms::Pointer                           AtmosphericRadiativeTermsPointerType;
 
-  typedef FilterFunctionValues                       FilterFunctionValuesType;
-  typedef FilterFunctionValuesType::ValuesVectorType CoefVectorType;
-  typedef std::vector<CoefVectorType>                FilterFunctionCoefVectorType;
+  typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms     CorrectionParametersToRadiativeTermsType;
+
+  typedef otb::AtmosphericCorrectionParameters                               AtmoCorrectionParametersType;
+  typedef typename AtmoCorrectionParametersType::Pointer                    AtmoCorrectionParametersPointerType;
+
+  typedef otb::ImageMetadataCorrectionParameters                             AcquiCorrectionParametersType;
+  typedef typename AcquiCorrectionParametersType::Pointer                   AcquiCorrectionParametersPointerType;
+
+  typedef otb::AtmosphericRadiativeTerms                                     AtmosphericRadiativeTermsType;
+  typedef typename AtmosphericRadiativeTermsType::Pointer                   AtmosphericRadiativeTermsPointerType;
+
 
-  typedef ObjectList<FilterFunctionValues>                  InternalWavelengthSpectralBandVectorType;
-  typedef InternalWavelengthSpectralBandVectorType::Pointer WavelengthSpectralBandVectorType;
+  typedef otb::FilterFunctionValues                                     FilterFunctionValuesType;
+  typedef FilterFunctionValuesType::WavelengthSpectralBandType          ValueType;                //float
+  typedef FilterFunctionValuesType::ValuesVectorType                    ValuesVectorType;         //std::vector<float>
+
+  typedef typename AcquiCorrectionParametersType::WavelengthSpectralBandVectorType        WavelengthSpectralBandVectorType;
 
 
   typedef itk::MetaDataDictionary MetaDataDictionaryType;
 
   /** Get/Set Atmospheric Radiative Terms. */
-  void SetAtmosphericRadiativeTerms(AtmosphericRadiativeTermsPointerType atmo)
+  void SetAtmosphericRadiativeTerms(AtmosphericRadiativeTermsPointerType atmoRadTerms)
   {
-    m_AtmosphericRadiativeTerms = atmo;
+    m_AtmosphericRadiativeTerms = atmoRadTerms;
     this->SetNthInput(1, m_AtmosphericRadiativeTerms);
     m_IsSetAtmosphericRadiativeTerms = true;
     this->Modified();
   }
-  itkGetObjectMacro(AtmosphericRadiativeTerms, AtmosphericRadiativeTerms);
+  itkGetObjectMacro(AtmosphericRadiativeTerms, AtmosphericRadiativeTermsType);
 
   /** Get/Set Atmospheric Correction Parameters. */
-  itkSetObjectMacro(CorrectionParameters, AtmosphericCorrectionParameters);
-  itkGetObjectMacro(CorrectionParameters, AtmosphericCorrectionParameters);
-
-  /** Get/Set Aeronet file name. */
-  itkSetMacro(AeronetFileName, std::string);
-  itkGetMacro(AeronetFileName, std::string);
-
-  /** Get/Set Aeronet file name. */
-  itkSetMacro(FilterFunctionValuesFileName, std::string);
-  itkGetMacro(FilterFunctionValuesFileName, std::string);
-
-  /** Get/Set Filter function coef. */
-  void SetFilterFunctionCoef(WavelengthSpectralBandVectorType vect)
+  void SetAtmoCorrectionParameters(AtmoCorrectionParametersPointerType atmoCorrTerms)
   {
-    m_FilterFunctionCoef = vect;
+    m_AtmoCorrectionParameters = atmoCorrTerms;
+    this->SetNthInput(2, m_AtmoCorrectionParameters);
+    m_IsSetAtmoCorrectionParameters = true;
     this->Modified();
   }
-  WavelengthSpectralBandVectorType GetFilterFunctionCoef() const
+  itkGetObjectMacro(AtmoCorrectionParameters, AtmoCorrectionParametersType);
+
+  /** Get/Set Acquisition Correction Parameters. */
+  void SetAcquiCorrectionParameters(AcquiCorrectionParametersPointerType acquiCorrTerms)
   {
-    return m_FilterFunctionCoef;
+    m_AcquiCorrectionParameters = acquiCorrTerms;
+    this->SetNthInput(3, m_AcquiCorrectionParameters);
+    m_IsSetAcquiCorrectionParameters = true;
+    this->Modified();
   }
+  itkGetObjectMacro(AcquiCorrectionParameters, AcquiCorrectionParametersType);
 
-  /** Generate radiative terms from the atmospheric parameters */
-  void GenerateAtmosphericRadiativeTerms();
 
   /** Compute radiative terms if necessary and then update functors attributs. */
   void GenerateParameters();
@@ -233,32 +240,35 @@ protected:
   virtual ~ReflectanceToSurfaceReflectanceImageFilter() {}
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
-  /** Read the aeronet data and extract aerosol optical and water vapor amount. */
-  //void UpdateAeronetData( const MetaDataDictionaryType dict );
-
-  /** Initialize the functor vector */
-  void GenerateOutputInformation();
+  /** Initialize the parameters of the functor before the threads run. */
+  virtual void BeforeThreadedGenerateData();
   /** Fill AtmosphericRadiativeTerms using image metadata*/
   void UpdateAtmosphericRadiativeTerms();
   /** Update Functors parameters */
   void UpdateFunctors();
 
+  /** If modified, we need to compute the functor parameters again */
+  virtual void Modified();
+
 private:
 
   bool m_IsSetAtmosphericRadiativeTerms;
-  /** Path to an Aeronet data file, allows to compute aerosol optical and water vapor amounts. */
-  std::string m_AeronetFileName;
-  /** Path to an filter function values file. */
-  std::string m_FilterFunctionValuesFileName;
-  /** Contains the filter function values (each element is a vector and represents the values for each channel) */
-  WavelengthSpectralBandVectorType m_FilterFunctionCoef;
+  bool m_IsSetAtmoCorrectionParameters;
+  bool m_IsSetAcquiCorrectionParameters;
+
   /** Enable/Disable GenerateParameters in GenerateOutputInformation.
    *  Useful for image view that call GenerateOutputInformation each time you move the full area.
    */
   bool m_UseGenerateParameters;
 
-  AtmosphericRadiativeTermsPointerType m_AtmosphericRadiativeTerms;
-  CorrectionParametersPointerType      m_CorrectionParameters;
+  /** True if the functor parameters have been generated */
+  bool m_FunctorParametersHaveBeenComputed;
+
+  AtmosphericRadiativeTermsPointerType     m_AtmosphericRadiativeTerms;
+  AtmoCorrectionParametersPointerType      m_AtmoCorrectionParameters;
+  AcquiCorrectionParametersPointerType     m_AcquiCorrectionParameters;
+
+
 };
 
 } // end namespace otb
diff --git a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.txx b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.txx
index 763c100..24711e2 100644
--- a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.txx
+++ b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.txx
@@ -32,114 +32,128 @@ template <class TInputImage, class TOutputImage>
 ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>
 ::ReflectanceToSurfaceReflectanceImageFilter() :
  m_IsSetAtmosphericRadiativeTerms(false),
- m_AeronetFileName(""),
- m_FilterFunctionValuesFileName(""),
+ m_IsSetAtmoCorrectionParameters(false),
+ m_IsSetAcquiCorrectionParameters(false),
  m_UseGenerateParameters(true)
  {
-  m_AtmosphericRadiativeTerms = AtmosphericRadiativeTerms::New();
-  m_CorrectionParameters      = AtmosphericCorrectionParameters::New();
-  m_FilterFunctionCoef = InternalWavelengthSpectralBandVectorType::New();
-  m_FilterFunctionCoef->Clear();
+    m_AtmosphericRadiativeTerms = AtmosphericRadiativeTermsType::New();
+    m_AtmoCorrectionParameters  = AtmoCorrectionParametersType::New();
+    m_AcquiCorrectionParameters = AcquiCorrectionParametersType::New();
  }
 
 template <class TInputImage, class TOutputImage>
 void
 ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>
-::UpdateAtmosphericRadiativeTerms()
+::BeforeThreadedGenerateData()
  {
-  if (this->GetInput() == NULL)
-    {
-    itkExceptionMacro(<< "Input must be set before updating the atmospheric radiative terms");
-    }
-  MetaDataDictionaryType dict = this->GetInput()->GetMetaDataDictionary();
+  Superclass::BeforeThreadedGenerateData();
+  if (m_UseGenerateParameters) this->GenerateParameters();
+ }
 
-  OpticalImageMetadataInterface::Pointer imageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(dict);
 
-  if ((m_CorrectionParameters->GetDay() == 0))
-    {
-    m_CorrectionParameters->SetDay(imageMetadataInterface->GetDay());
-    }
+template <class TInputImage, class TOutputImage>
+void
+ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>
+::Modified()
+{
+  Superclass::Modified();
+  m_FunctorParametersHaveBeenComputed  = false;
+}
 
-  if ((m_CorrectionParameters->GetMonth() == 0))
-    {
-    m_CorrectionParameters->SetMonth(imageMetadataInterface->GetMonth());
-    }
 
-  if ((m_CorrectionParameters->GetSolarZenithalAngle() == 361.))
+template <class TInputImage, class TOutputImage>
+void
+ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>
+::GenerateParameters()
+ {
+  if (!m_IsSetAtmosphericRadiativeTerms)
     {
-    m_CorrectionParameters->SetSolarZenithalAngle(90. - imageMetadataInterface->GetSunElevation());
+    this->UpdateAtmosphericRadiativeTerms();
+    m_IsSetAtmosphericRadiativeTerms = true;
     }
 
-  if ((m_CorrectionParameters->GetSolarAzimutalAngle() == 361.))
+  if (!m_FunctorParametersHaveBeenComputed)
     {
-    m_CorrectionParameters->SetSolarAzimutalAngle(imageMetadataInterface->GetSunAzimuth());
+    this->UpdateFunctors();
+    m_FunctorParametersHaveBeenComputed = true;
     }
+ }
+
 
-  if ((m_CorrectionParameters->GetViewingZenithalAngle() == 361.))
+template <class TInputImage, class TOutputImage>
+void
+ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>
+::UpdateAtmosphericRadiativeTerms()
+ {
+  if (this->GetInput() == NULL)
     {
-    m_CorrectionParameters->SetViewingZenithalAngle(90. - imageMetadataInterface->GetSatElevation());
+      itkExceptionMacro(<< "Input must be set before updating the atmospheric radiative terms");
     }
 
-  if ((m_CorrectionParameters->GetViewingAzimutalAngle() == 361.))
+  // Atmospheric parameters
+  if (!m_IsSetAtmoCorrectionParameters)
+        {
+          itkExceptionMacro(<< "Atmospheric correction parameters must be provided before updating the atmospheric radiative terms");
+        }
+          
+
+  // load filter function values
+  bool SetFilterFunctionValuesFileName=false;
+  if (m_AcquiCorrectionParameters->GetFilterFunctionValuesFileName() != "")
     {
-    m_CorrectionParameters->SetViewingAzimutalAngle(imageMetadataInterface->GetSatAzimuth());
+      m_AcquiCorrectionParameters->LoadFilterFunctionValue();
+      SetFilterFunctionValuesFileName=true;
     }
 
-  if (m_AeronetFileName != "")
-    m_CorrectionParameters->UpdateAeronetData(m_AeronetFileName,
-                                              imageMetadataInterface->GetYear(),
+
+  MetaDataDictionaryType dict = this->GetInput()->GetMetaDataDictionary();
+  OpticalImageMetadataInterface::Pointer imageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(dict);
+
+
+  if (m_AtmoCorrectionParameters->GetAeronetFileName() != "")
+    m_AtmoCorrectionParameters->UpdateAeronetData(imageMetadataInterface->GetYear(),
                                               imageMetadataInterface->GetHour(),
                                               imageMetadataInterface->GetMinute());
 
-  // load filter function values
-  if (m_FilterFunctionValuesFileName != "")
-    {
-    m_CorrectionParameters->LoadFilterFunctionValue(m_FilterFunctionValuesFileName);
-    }
-  //case where filter function values are not read from an ascii file
-  else
-    {
-    if (imageMetadataInterface->GetSpectralSensitivity()->Capacity() > 0)
-      {
-      m_CorrectionParameters->SetWavelengthSpectralBand(imageMetadataInterface->GetSpectralSensitivity());
-      otbMsgDevMacro(<< "use filter available in MetadataInterface " << imageMetadataInterface->GetSpectralSensitivity());
-      }
-    else
+
+  // Acquisition parameters
+  if (!m_IsSetAcquiCorrectionParameters) // Get info from image metadata interface
       {
-      otbMsgDevMacro(<< "use dummy filter");
-      m_FilterFunctionCoef->Clear();
-      for (unsigned int i = 0; i < this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
-        {
-        m_FilterFunctionCoef->PushBack(FilterFunctionValues::New());
-        }
-      m_CorrectionParameters->SetWavelengthSpectralBand(m_FilterFunctionCoef);
+          m_AcquiCorrectionParameters = AcquiCorrectionParametersType::New();
+
+          m_AcquiCorrectionParameters->SetSolarZenithalAngle(90. - imageMetadataInterface->GetSunElevation());
+          m_AcquiCorrectionParameters->SetSolarAzimutalAngle(imageMetadataInterface->GetSunAzimuth());
+          m_AcquiCorrectionParameters->SetViewingZenithalAngle(90. - imageMetadataInterface->GetSatElevation());
+          m_AcquiCorrectionParameters->SetViewingAzimutalAngle(imageMetadataInterface->GetSatAzimuth());
+
+          m_AcquiCorrectionParameters->SetDay(imageMetadataInterface->GetDay());
+          m_AcquiCorrectionParameters->SetMonth(imageMetadataInterface->GetMonth());
+
+
+          if (!SetFilterFunctionValuesFileName)
+          {
+            if (imageMetadataInterface->GetSpectralSensitivity()->Capacity() > 0)
+                  {
+                      m_AcquiCorrectionParameters->SetWavelengthSpectralBand(imageMetadataInterface->GetSpectralSensitivity());
+                  }
+            else
+                  {
+                      otbMsgDevMacro(<< "use dummy filter");
+                      WavelengthSpectralBandVectorType spectralDummy;
+                      spectralDummy->Clear();
+                      for (unsigned int i = 0; i < this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
+                        {
+                          spectralDummy->PushBack(FilterFunctionValuesType::New());
+                        }
+                      m_AcquiCorrectionParameters->SetWavelengthSpectralBand(spectralDummy);
+                  }
+          }
+
       }
-    }
 
-  Parameters2RadiativeTermsPointerType param2Terms = Parameters2RadiativeTermsType::New();
-  param2Terms->SetInput(m_CorrectionParameters);
-  param2Terms->Update();
-  m_AtmosphericRadiativeTerms = param2Terms->GetOutput();
- }
 
-template <class TInputImage, class TOutputImage>
-void
-ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>
-::GenerateOutputInformation()
- {
-  Superclass::GenerateOutputInformation();
-  if (m_UseGenerateParameters) this->GenerateParameters();
- }
+  m_AtmosphericRadiativeTerms = CorrectionParametersToRadiativeTermsType::Compute(m_AtmoCorrectionParameters,m_AcquiCorrectionParameters);
 
-template <class TInputImage, class TOutputImage>
-void
-ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>
-::GenerateAtmosphericRadiativeTerms()
- {
-  Parameters2RadiativeTermsPointerType param2Terms = Parameters2RadiativeTermsType::New();
-  param2Terms->SetInput(m_CorrectionParameters);
-  param2Terms->Update();
-  m_AtmosphericRadiativeTerms = param2Terms->GetOutput();
  }
 
 template <class TInputImage, class TOutputImage>
@@ -147,12 +161,13 @@ void
 ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>
 ::UpdateFunctors()
  {
+
   if (this->GetInput() == NULL)
     {
     itkExceptionMacro(<< "Input must be set before updating the functors");
     }
+  
   MetaDataDictionaryType dict = this->GetInput()->GetMetaDataDictionary();
-
   OpticalImageMetadataInterface::Pointer imageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(dict);
 
   this->GetFunctorVector().clear();
@@ -184,22 +199,7 @@ ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>
     otbMsgDevMacro(<< "Coef (A):                        " << functor.GetCoefficient());
     otbMsgDevMacro(<< "Residu:                          " << functor.GetResidu());
     otbMsgDevMacro(<< "Spherical albedo:                " << functor.GetSphericalAlbedo());
-
-    }
- }
-
-template <class TInputImage, class TOutputImage>
-void
-ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>
-::GenerateParameters()
- {
-  if (!m_IsSetAtmosphericRadiativeTerms)
-    {
-    this->UpdateAtmosphericRadiativeTerms();
-    m_IsSetAtmosphericRadiativeTerms = true;
     }
-
-  this->UpdateFunctors();
  }
 
 
@@ -209,7 +209,9 @@ void
 ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
-  os << indent << "Correction parameters : " << m_CorrectionParameters << std::endl;
+  os << indent << "Atmospheric radiative terms : " << m_AtmosphericRadiativeTerms << std::endl;
+  os << indent << "Atmospheric correction terms : " << m_AtmoCorrectionParameters << std::endl;
+  os << indent << "Acquisition correction terms : " << m_AcquiCorrectionParameters << std::endl;
 }
 
 } //end namespace otb
diff --git a/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.h b/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.h
index 75895da..d7f1b75 100644
--- a/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.h
+++ b/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.h
@@ -85,32 +85,23 @@ public:
     double       contribution = 0.;
     TOutput      outPixel;
     outPixel.SetSize(it.GetCenterPixel().Size());
-    std::ostringstream oss;
-    oss << std::fixed << std::setprecision(3);
 
     // Loop over each component
     const unsigned int size = outPixel.GetSize();
     for (unsigned int j = 0; j < size; ++j)
-      {
-      oss.str("");
+    {
       contribution = 0;
       // Load the current channel ponderation value matrix
       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;
         RowIdx = i / TempChannelWeighting.Cols();
-        if (RowIdx != 0)
-          {
-          ColIdx = (i + 1) - RowIdx*TempChannelWeighting.Cols() - 1;
-          }
-        else
-          {
-          ColIdx = i;
-          }
+        ColIdx = i - RowIdx*TempChannelWeighting.Cols();
+   
         // Extract the current neighborhood pixel ponderation
         double idVal = TempChannelWeighting(RowIdx, ColIdx);
         // Extract the current neighborhood pixel value
@@ -119,12 +110,9 @@ public:
         contribution += static_cast<double>(tempPix[j]) * idVal;
 
         }
-      double temp = static_cast<double>(it.GetCenterPixel()[j]) * m_UpwardTransmittanceRatio[j] + contribution *
-                    m_DiffuseRatio[j];
-      oss << temp;
-      outPixel[j] = static_cast<RealValueType>(atof(oss.str().c_str()));
-
-      //outPixel[j] = static_cast<RealValueType>(it.GetCenterPixel()[j])*m_UpwardTransmittanceRatio[j] + contribution*m_DiffuseRatio[j];
+        
+        outPixel[j] = static_cast<RealValueType>(it.GetCenterPixel()[j]) *m_UpwardTransmittanceRatio[j]
+                        + contribution * m_DiffuseRatio[j];
       }
     return outPixel;
   }
@@ -145,18 +133,16 @@ private:
  *   the target pixel and a weighting of the siganls coming from the neighbor pixels.
  *
  * \ingroup Radiometry
- *
+ * \deprecated This class has been replaced by otb::SurfaceAdjacencyEffectCorrectionSchemeFilter.
  */
 template <class TInputImage, class TOutputImage>
 class ITK_EXPORT SurfaceAdjacencyEffect6SCorrectionSchemeFilter :
-  public UnaryFunctorNeighborhoodImageFilter<TInputImage,
+  public UnaryFunctorNeighborhoodImageFilter<
+      TInputImage,
       TOutputImage,
       typename Functor::ComputeNeighborhoodContributionFunctor<itk::
-          ConstNeighborhoodIterator
-          <TInputImage>,
-          typename
-          TOutputImage
-          ::PixelType> >
+          ConstNeighborhoodIterator <TInputImage>,
+      typename TOutputImage::PixelType> >
 {
 public:
   /** "typedef" to simplify the variables definition and the declaration. */
@@ -262,7 +248,7 @@ public:
 
   /** Compute the functor parameters */
   void ComputeParameters();
-  /** Compute radiative terms if necessary and then updtae functors attibuts. */
+  /** Compute radiative terms if necessary and then update functors attibuts. */
   void GenerateParameters();
   /** Fill AtmosphericRadiativeTerms using image metadata*/
   void UpdateAtmosphericRadiativeTerms();
@@ -272,11 +258,8 @@ protected:
   virtual ~SurfaceAdjacencyEffect6SCorrectionSchemeFilter() {}
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
-  /** GenerateOutputInformation method */
-  virtual void GenerateOutputInformation();
-
-  /** Initialize some accumulators before the threads run. */
-  //virtual void BeforeThreadedGenerateData();
+  /** Initialize the parameters of the functor before the threads run. */
+  virtual void BeforeThreadedGenerateData();
 
   /** If modified, we need to compute the parameters again */
   virtual void Modified();
@@ -301,12 +284,8 @@ private:
   std::string m_AeronetFileName;
   /** Path to an filter function values file. */
   std::string m_FilterFunctionValuesFileName;
-  /** Contains the filter function values (each element is a vector and represnts the values for each channel) */
+  /** Contains the filter function values (each element is a vector and reprsents the values for each channel) */
   FilterFunctionCoefVectorType m_FilterFunctionCoef;
-  /** Enable/Disable GenerateParameters in GenerateOutputInformation.
-   *  Usefull for image view that call GenerateOutputInformation each time you move the full area.
-   */
-  bool m_UseGenerateParameters;
 };
 
 } // end namespace otb
diff --git a/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.txx b/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.txx
index 643a692..b050c6d 100644
--- a/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.txx
+++ b/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.txx
@@ -46,6 +46,7 @@ SurfaceAdjacencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
 ::SurfaceAdjacencyEffect6SCorrectionSchemeFilter()
 {
   m_WindowRadius = 1;
+  m_ParametersHaveBeenComputed=false;
   m_PixelSpacingInKilometers = 1.;
   m_ZenithalViewingAngle = 361.;
   m_AtmosphericRadiativeTerms = AtmosphericRadiativeTermsType::New();
@@ -54,22 +55,16 @@ SurfaceAdjacencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
   m_AeronetFileName = "";
   m_FilterFunctionValuesFileName = "";
   m_FilterFunctionCoef.clear();
-  m_UseGenerateParameters = true;
 }
 
 template <class TInputImage, class TOutputImage>
 void
 SurfaceAdjacencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
-::GenerateOutputInformation()
+::BeforeThreadedGenerateData()
 {
-  Superclass::GenerateOutputInformation();
-  typename InputImageType::Pointer  inputPtr = const_cast<TInputImage *>(this->GetInput());
-  typename OutputImageType::Pointer outputPtr = const_cast<TOutputImage *>(this->GetOutput());
-
-  if (!inputPtr || !outputPtr) return;
+  Superclass::BeforeThreadedGenerateData();
 
-  outputPtr->SetNumberOfComponentsPerPixel(inputPtr->GetNumberOfComponentsPerPixel());
-  if (m_UseGenerateParameters) this->GenerateParameters();
+  this->GenerateParameters();
 
   if (!m_ParametersHaveBeenComputed)
     {
@@ -211,10 +206,10 @@ SurfaceAdjacencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
 
   for (unsigned int band = 0; band < inputPtr->GetNumberOfComponentsPerPixel(); ++band)
     {
-    WeightingMatrixType currentWeightingMatrix(2*m_WindowRadius + 1, 2*m_WindowRadius + 1);
     double rayleigh = m_AtmosphericRadiativeTerms->GetUpwardDiffuseTransmittanceForRayleigh(band);
     double aerosol =  m_AtmosphericRadiativeTerms->GetUpwardDiffuseTransmittanceForAerosol(band);
-
+    
+    WeightingMatrixType currentWeightingMatrix(2*m_WindowRadius + 1, 2*m_WindowRadius + 1);
     currentWeightingMatrix.Fill(0.);
 
     for (unsigned int i = 0; i < 2 * m_WindowRadius + 1; ++i)
@@ -224,11 +219,13 @@ SurfaceAdjacencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
         double notUsed1, notUsed2;
         double factor = 1;
         double palt = 1000.;
-        SIXSTraits::ComputeEnvironmentalContribution(rayleigh, aerosol,
-                                                     radiusMatrix(i,
-                                                                  j), palt,
-                                                     vcl_cos(
-                                                       m_ZenithalViewingAngle * CONST_PI_180), notUsed1, notUsed2,
+        SIXSTraits::ComputeEnvironmentalContribution(rayleigh,
+                                                     aerosol,
+                                                     radiusMatrix(i,j),
+                                                     palt,
+                                                     vcl_cos(m_ZenithalViewingAngle * CONST_PI_180),
+                                                     notUsed1,
+                                                     notUsed2,
                                                      factor);                                                                                                        //Call to 6S
         currentWeightingMatrix(i, j) = factor;
         }
diff --git a/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.h b/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.h
new file mode 100644
index 0000000..a8352b3
--- /dev/null
+++ b/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.h
@@ -0,0 +1,312 @@
+/*=========================================================================
+
+ Program:   ORFEO Toolbox
+ Language:  C++
+ Date:      $Date$
+ Version:   $Revision$
+
+
+ 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.
+
+
+    This software is distributed 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 __otbSurfaceAdjacencyEffectCorrectionSchemeFilter_h
+#define __otbSurfaceAdjacencyEffectCorrectionSchemeFilter_h
+
+#include "itkNumericTraits.h"
+#include <vector>
+#include "itkConstNeighborhoodIterator.h"
+#include "otbUnaryFunctorNeighborhoodImageFilter.h"
+#include "itkVariableSizeMatrix.h"
+#include "otbAtmosphericRadiativeTerms.h"
+#include "otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h"
+#include <iomanip>
+
+namespace otb
+{
+namespace Functor
+{
+/** \class ComputeNeighborhoodContributionFunctor
+*  \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
+* \ingroup Radiometry
+*/
+template <class TNeighIter, class TOutput>
+class ComputeNeighborhoodContributionFunctor
+{
+public:
+  ComputeNeighborhoodContributionFunctor() {}
+  virtual ~ComputeNeighborhoodContributionFunctor() {}
+
+  typedef itk::VariableSizeMatrix<double>           WeightingMatrixType;
+  typedef typename std::vector<WeightingMatrixType> WeightingValuesContainerType;
+  typedef typename TOutput::RealValueType           RealValueType;
+  typedef std::vector<double>                       DoubleContainerType;
+
+  void SetWeightingValues(const WeightingValuesContainerType& cont)
+  {
+    m_WeightingValues = cont;
+  }
+  void SetUpwardTransmittanceRatio(DoubleContainerType upwardTransmittanceRatio)
+  {
+    m_UpwardTransmittanceRatio = upwardTransmittanceRatio;
+  }
+  void SetDiffuseRatio(DoubleContainerType diffuseRatio)
+  {
+    m_DiffuseRatio = diffuseRatio;
+  }
+  WeightingValuesContainerType GetWeightingValues()
+  {
+    return m_WeightingValues;
+  }
+  DoubleContainerType GetUpwardTransmittanceRatio()
+  {
+    return m_UpwardTransmittanceRatio;
+  }
+  DoubleContainerType GetDiffuseRatio()
+  {
+    return m_DiffuseRatio;
+  }
+
+  inline TOutput operator ()(const TNeighIter& it)
+  {
+    unsigned int neighborhoodSize = it.Size();
+    double       contribution = 0.;
+    TOutput      outPixel;
+    outPixel.SetSize(it.GetCenterPixel().Size());
+
+    // Loop over each component
+    const unsigned int size = outPixel.GetSize();
+    for (unsigned int j = 0; j < size; ++j)
+    {
+      contribution = 0;
+      // Load the current channel ponderation value matrix
+      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;
+        RowIdx = i / TempChannelWeighting.Cols();
+        ColIdx = i - RowIdx*TempChannelWeighting.Cols();
+   
+        // Extract the current neighborhood pixel ponderation
+        double idVal = TempChannelWeighting(RowIdx, ColIdx);
+        // Extract the current neighborhood pixel value
+        TOutput tempPix = it.GetPixel(i);
+
+        contribution += static_cast<double>(tempPix[j]) * idVal;
+
+        }
+        
+        outPixel[j] = static_cast<RealValueType>(it.GetCenterPixel()[j]) *m_UpwardTransmittanceRatio[j]
+                        + contribution * m_DiffuseRatio[j];
+      }
+    return outPixel;
+  }
+
+private:
+  WeightingValuesContainerType m_WeightingValues;
+  DoubleContainerType          m_UpwardTransmittanceRatio;
+  DoubleContainerType          m_DiffuseRatio;
+};
+
+}
+
+/** \class SurfaceAdjacencyEffectCorrectionSchemeFilter
+ *  \brief Correct the scheme taking care of the surrounding pixels.
+ *
+ *   The SurfaceAdjacencyEffectCorrectionSchemeFilter 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.
+ *
+ * \ingroup Radiometry
+ *
+ */
+template <class TInputImage, class TOutputImage>
+class ITK_EXPORT SurfaceAdjacencyEffectCorrectionSchemeFilter :
+  public UnaryFunctorNeighborhoodImageFilter<
+      TInputImage,
+      TOutputImage,
+      typename Functor::ComputeNeighborhoodContributionFunctor<itk::
+          ConstNeighborhoodIterator <TInputImage>,
+      typename TOutputImage::PixelType> >
+{
+public:
+  /** "typedef" to simplify the variables definition and the declaration. */
+  typedef Functor::ComputeNeighborhoodContributionFunctor<itk::ConstNeighborhoodIterator<TInputImage>,
+      typename TOutputImage::PixelType> FunctorType;
+
+  /** "typedef" for standard classes. */
+  typedef SurfaceAdjacencyEffectCorrectionSchemeFilter                              Self;
+  typedef UnaryFunctorNeighborhoodImageFilter<TInputImage, TOutputImage, FunctorType> Superclass;
+  typedef itk::SmartPointer<Self>                                                     Pointer;
+  typedef itk::SmartPointer<const Self>                                               ConstPointer;
+
+  typedef typename Superclass::InputImageType  InputImageType;
+  typedef typename Superclass::OutputImageType OutputImageType;
+
+  typedef std::vector<double> DoubleContainerType;
+  /** object factory method. */
+  itkNewMacro(Self);
+
+  /** return class name. */
+  itkTypeMacro(SurfaceAdjacencyEffectCorrectionSchemeFilter, UnaryFunctorNeighborhoodImageFilter);
+
+  /**   Extract input and output images dimensions.*/
+  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
+  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
+
+  /** Supported images definition. */
+  typedef typename InputImageType::PixelType          InputPixelType;
+  typedef typename InputImageType::InternalPixelType  InputInternalPixelType;
+  typedef typename InputImageType::RegionType         InputImageRegionType;
+  typedef typename InputImageType::SizeType           SizeType;
+  typedef typename OutputImageType::PixelType         OutputPixelType;
+  typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
+  typedef typename OutputImageType::RegionType        OutputImageRegionType;
+
+
+  typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms     CorrectionParametersToRadiativeTermsType;
+
+  typedef otb::AtmosphericCorrectionParameters                               AtmoCorrectionParametersType;
+  typedef typename AtmoCorrectionParametersType::Pointer                    AtmoCorrectionParametersPointerType;
+
+  typedef otb::ImageMetadataCorrectionParameters                             AcquiCorrectionParametersType;
+  typedef typename AcquiCorrectionParametersType::Pointer                   AcquiCorrectionParametersPointerType;
+
+  typedef otb::AtmosphericRadiativeTerms                                     AtmosphericRadiativeTermsType;
+  typedef typename AtmosphericRadiativeTermsType::Pointer                   AtmosphericRadiativeTermsPointerType;
+
+
+  typedef otb::FilterFunctionValues                                     FilterFunctionValuesType;
+  typedef FilterFunctionValuesType::WavelengthSpectralBandType          ValueType;                //float
+  typedef FilterFunctionValuesType::ValuesVectorType                    ValuesVectorType;         //std::vector<float>
+
+  typedef typename AcquiCorrectionParametersType::WavelengthSpectralBandVectorType        WavelengthSpectralBandVectorType;
+
+  typedef itk::MetaDataDictionary MetaDataDictionaryType;
+
+  /** Storage ponderation values types*/
+  typedef itk::VariableSizeMatrix<double>           WeightingMatrixType;
+  typedef typename std::vector<WeightingMatrixType> WeightingValuesContainerType;
+
+  /** typedef for calculation*/
+  typedef typename itk::ConstNeighborhoodIterator<InputImageType> NeighborIterType;
+
+  /** Set/Get the Size of the neighbor window. */
+  void SetWindowRadius(unsigned int rad)
+  {
+    this->SetRadius(rad);
+    m_WindowRadius = rad;
+    this->Modified();
+  }
+  itkGetConstReferenceMacro(WindowRadius, unsigned int);
+
+  /** Set/Get the pixel spacing in kilometers */
+  itkSetMacro(PixelSpacingInKilometers, double);
+  itkGetMacro(PixelSpacingInKilometers, double);
+  /** Set/Get the viewing angle */
+  itkSetMacro(ZenithalViewingAngle, double);
+  itkGetMacro(ZenithalViewingAngle, double);
+
+
+  /** Get/Set Atmospheric Radiative Terms. */
+  void SetAtmosphericRadiativeTerms(AtmosphericRadiativeTermsPointerType atmoRadTerms)
+  {
+    m_AtmosphericRadiativeTerms = atmoRadTerms;
+    this->SetNthInput(1, m_AtmosphericRadiativeTerms);
+    m_IsSetAtmosphericRadiativeTerms = true;
+    this->Modified();
+  }
+  itkGetObjectMacro(AtmosphericRadiativeTerms, AtmosphericRadiativeTermsType);
+
+  /** Get/Set Atmospheric Correction Parameters. */
+  void SetAtmoCorrectionParameters(AtmoCorrectionParametersPointerType atmoCorrTerms)
+  {
+    m_AtmoCorrectionParameters = atmoCorrTerms;
+    this->SetNthInput(2, m_AtmoCorrectionParameters);
+    m_IsSetAtmoCorrectionParameters = true;
+    this->Modified();
+  }
+  itkGetObjectMacro(AtmoCorrectionParameters, AtmoCorrectionParametersType);
+
+  /** Get/Set Acquisition Correction Parameters. */
+  void SetAcquiCorrectionParameters(AcquiCorrectionParametersPointerType acquiCorrTerms)
+  {
+    m_AcquiCorrectionParameters = acquiCorrTerms;
+    this->SetNthInput(3, m_AcquiCorrectionParameters);
+    m_IsSetAcquiCorrectionParameters = true;
+    this->Modified();
+  }
+  itkGetObjectMacro(AcquiCorrectionParameters, AcquiCorrectionParametersType);
+
+
+  /** Compute radiative terms if necessary and then update functors attibuts. */
+  void GenerateParameters();
+
+
+  /** Set/Get IsSetAtmosphericRadiativeTerms */
+  itkSetMacro(IsSetAtmosphericRadiativeTerms, bool);
+  itkGetMacro(IsSetAtmosphericRadiativeTerms, bool);
+  itkBooleanMacro(IsSetAtmosphericRadiativeTerms);
+
+protected:
+  SurfaceAdjacencyEffectCorrectionSchemeFilter();
+  virtual ~SurfaceAdjacencyEffectCorrectionSchemeFilter() {}
+  void PrintSelf(std::ostream& os, itk::Indent indent) const;
+
+  /** Initialize the parameters of the functor before the threads run. */
+  virtual void BeforeThreadedGenerateData();
+
+  /** Fill AtmosphericRadiativeTerms using image metadata*/
+  void UpdateAtmosphericRadiativeTerms();
+
+  /** Compute the functor parameters */
+  void UpdateFunctors();
+
+  /** If modified, we need to compute the functor parameters again */
+  virtual void Modified();
+
+private:
+
+  bool m_IsSetAtmosphericRadiativeTerms;
+  bool m_IsSetAtmoCorrectionParameters;
+  bool m_IsSetAcquiCorrectionParameters;
+
+  /** Radiative terms object */
+  AtmosphericRadiativeTermsPointerType     m_AtmosphericRadiativeTerms;
+  AtmoCorrectionParametersPointerType      m_AtmoCorrectionParameters;
+  AcquiCorrectionParametersPointerType     m_AcquiCorrectionParameters;
+
+  /** Size of the window. */
+  unsigned int m_WindowRadius;
+  /** Weighting values for the neighbor pixels.*/
+  WeightingValuesContainerType m_WeightingValues;
+  /** True if the functor parameters have been generated */
+  bool m_FunctorParametersHaveBeenComputed;
+  /** Pixel spacing in kilometers */
+  double m_PixelSpacingInKilometers;
+  /** Viewing angle in degree */
+  double m_ZenithalViewingAngle;
+};
+
+} // end namespace otb
+
+#ifndef OTB_MANUAL_INSTANTIATION
+#include "otbSurfaceAdjacencyEffectCorrectionSchemeFilter.txx"
+#endif
+
+#endif
diff --git a/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.txx b/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.txx
new file mode 100644
index 0000000..109bde6
--- /dev/null
+++ b/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.txx
@@ -0,0 +1,237 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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.
+
+
+     This software is distributed 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 __otbSurfaceAdjacencyEffectCorrectionSchemeFilter_txx
+#define __otbSurfaceAdjacencyEffectCorrectionSchemeFilter_txx
+
+#include "otbSurfaceAdjacencyEffectCorrectionSchemeFilter.h"
+
+#include "itkConstNeighborhoodIterator.h"
+#include "itkNeighborhoodInnerProduct.h"
+#include "itkImageRegionIterator.h"
+#include "itkNeighborhoodAlgorithm.h"
+#include "itkZeroFluxNeumannBoundaryCondition.h"
+#include "itkOffset.h"
+#include "itkProgressReporter.h"
+#include "otbImage.h"
+#include "otbSIXSTraits.h"
+#include "otbMath.h"
+#include "otbOpticalImageMetadataInterfaceFactory.h"
+#include "otbOpticalImageMetadataInterface.h"
+
+namespace otb
+{
+
+template <class TInputImage, class TOutputImage>
+SurfaceAdjacencyEffectCorrectionSchemeFilter<TInputImage, TOutputImage>
+::SurfaceAdjacencyEffectCorrectionSchemeFilter() :
+ m_IsSetAtmosphericRadiativeTerms(false),
+ m_IsSetAtmoCorrectionParameters(false),
+ m_IsSetAcquiCorrectionParameters(false),
+ m_WindowRadius(1),
+ m_FunctorParametersHaveBeenComputed(false),
+ m_PixelSpacingInKilometers(1.),
+ m_ZenithalViewingAngle(361.)
+{
+  m_AtmosphericRadiativeTerms = AtmosphericRadiativeTermsType::New();
+  m_AtmoCorrectionParameters = AtmoCorrectionParametersType::New();
+  m_AcquiCorrectionParameters = AcquiCorrectionParametersType::New();
+}
+
+template <class TInputImage, class TOutputImage>
+void
+SurfaceAdjacencyEffectCorrectionSchemeFilter<TInputImage, TOutputImage>
+::BeforeThreadedGenerateData()
+{
+  Superclass::BeforeThreadedGenerateData();
+  this->GenerateParameters();
+
+}
+
+template <class TInputImage, class TOutputImage>
+void
+SurfaceAdjacencyEffectCorrectionSchemeFilter<TInputImage, TOutputImage>
+::Modified()
+{
+  Superclass::Modified();
+  m_FunctorParametersHaveBeenComputed  = false;
+}
+
+template <class TInputImage, class TOutputImage>
+void
+SurfaceAdjacencyEffectCorrectionSchemeFilter<TInputImage, TOutputImage>
+::UpdateAtmosphericRadiativeTerms()
+{
+  if (this->GetInput() == NULL)
+    {
+      itkExceptionMacro(<< "Input must be set before updating the atmospheric radiative terms");
+    }
+
+  // Atmospheric parameters
+  if (!m_IsSetAtmoCorrectionParameters)
+        {
+          itkExceptionMacro(<< "Atmospheric correction parameters must be provided before updating the atmospheric radiative terms");
+        }
+
+
+  // Acquisition parameters
+  if (!m_IsSetAcquiCorrectionParameters) // Get info from image metadata interface
+      {
+          MetaDataDictionaryType dict = this->GetInput()->GetMetaDataDictionary();
+          OpticalImageMetadataInterface::Pointer imageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(dict);
+
+          m_AcquiCorrectionParameters = AcquiCorrectionParametersType::New();
+
+          m_AcquiCorrectionParameters->SetSolarZenithalAngle(90. - imageMetadataInterface->GetSunElevation());
+          m_AcquiCorrectionParameters->SetSolarAzimutalAngle(imageMetadataInterface->GetSunAzimuth());
+          m_AcquiCorrectionParameters->SetViewingZenithalAngle(90. - imageMetadataInterface->GetSatElevation());
+          m_AcquiCorrectionParameters->SetViewingAzimutalAngle(imageMetadataInterface->GetSatAzimuth());
+
+          m_AcquiCorrectionParameters->SetDay(imageMetadataInterface->GetDay());
+          m_AcquiCorrectionParameters->SetMonth(imageMetadataInterface->GetMonth());
+
+          if (imageMetadataInterface->GetSpectralSensitivity()->Capacity() > 0)
+                {
+                    m_AcquiCorrectionParameters->SetWavelengthSpectralBand(imageMetadataInterface->GetSpectralSensitivity());
+                    
+                }
+          else
+                {
+                    otbMsgDevMacro(<< "use dummy filter");
+                    WavelengthSpectralBandVectorType spectralDummy;
+                    spectralDummy->Clear();
+                    for (unsigned int i = 0; i < this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
+                      {
+                        spectralDummy->PushBack(FilterFunctionValuesType::New());
+                      }
+                    m_AcquiCorrectionParameters->SetWavelengthSpectralBand(spectralDummy);
+                }
+
+      }
+
+  m_AtmosphericRadiativeTerms = CorrectionParametersToRadiativeTermsType::Compute(m_AtmoCorrectionParameters,m_AcquiCorrectionParameters);
+}
+
+template <class TInputImage, class TOutputImage>
+void
+SurfaceAdjacencyEffectCorrectionSchemeFilter<TInputImage, TOutputImage>
+::GenerateParameters()
+{
+  if (!m_IsSetAtmosphericRadiativeTerms)
+    {
+    this->UpdateAtmosphericRadiativeTerms();
+    m_IsSetAtmosphericRadiativeTerms = true;
+    }
+
+  if (!m_FunctorParametersHaveBeenComputed)
+    {
+    this->UpdateFunctors();
+    m_FunctorParametersHaveBeenComputed = true;
+    }
+}
+
+template <class TInputImage, class TOutputImage>
+void
+SurfaceAdjacencyEffectCorrectionSchemeFilter<TInputImage, TOutputImage>
+::UpdateFunctors()
+{
+  // get pointers to the input and output
+  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.);
+
+  double center = static_cast<double>(m_WindowRadius);
+
+  for (unsigned int i = 0; i < m_WindowRadius + 1; ++i)
+    {
+    for (unsigned int j = 0; j < m_WindowRadius + 1; ++j)
+      {
+      double id = static_cast<double>(i);
+      double jd = static_cast<double>(j);
+      double currentRadius = m_PixelSpacingInKilometers * vcl_sqrt(vcl_pow(id - center, 2) + vcl_pow(jd - center, 2));
+      radiusMatrix(i, j) = currentRadius;
+      radiusMatrix(2 * m_WindowRadius - i, j) = currentRadius;
+      radiusMatrix(2 * m_WindowRadius - i, 2 * m_WindowRadius - j) = currentRadius;
+      radiusMatrix(i, 2 * m_WindowRadius - j) = currentRadius;
+      }
+    }
+
+  for (unsigned int band = 0; band < inputPtr->GetNumberOfComponentsPerPixel(); ++band)
+    {
+    double rayleigh = m_AtmosphericRadiativeTerms->GetUpwardDiffuseTransmittanceForRayleigh(band);
+    double aerosol =  m_AtmosphericRadiativeTerms->GetUpwardDiffuseTransmittanceForAerosol(band);
+    
+    WeightingMatrixType currentWeightingMatrix(2*m_WindowRadius + 1, 2*m_WindowRadius + 1);
+    currentWeightingMatrix.Fill(0.);
+
+    for (unsigned int i = 0; i < 2 * m_WindowRadius + 1; ++i)
+      {
+      for (unsigned int j = 0; j < 2 * m_WindowRadius + 1; ++j)
+        {
+        double notUsed1, notUsed2;
+        double factor = 1;
+        double palt = 1000.;
+        SIXSTraits::ComputeEnvironmentalContribution(rayleigh,
+                                                     aerosol,
+                                                     radiusMatrix(i,j),
+                                                     palt,
+                                                     vcl_cos(m_ZenithalViewingAngle * CONST_PI_180),
+                                                     notUsed1,
+                                                     notUsed2,
+                                                     factor);                                                                                                        //Call to 6S
+        currentWeightingMatrix(i, j) = factor;
+        }
+      }
+    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));
+    diffuseRatio.push_back(m_AtmosphericRadiativeTerms->GetUpwardDiffuseTransmittance(
+                             band) / m_AtmosphericRadiativeTerms->GetUpwardDirectTransmittance(band));
+    }
+  this->GetFunctor().SetUpwardTransmittanceRatio(upwardTransmittanceRatio);
+  this->GetFunctor().SetDiffuseRatio(diffuseRatio);
+  this->GetFunctor().SetWeightingValues(m_WeightingValues);
+}
+/**
+ * Standard "PrintSelf" method
+ */
+template <class TInputImage, class TOutput>
+void
+SurfaceAdjacencyEffectCorrectionSchemeFilter<TInputImage, TOutput>
+::PrintSelf(std::ostream& os, itk::Indent indent) const
+{
+  os << indent << "Radius : " << m_WindowRadius << std::endl;
+  os << indent << "Pixel spacing in kilometers: " << m_PixelSpacingInKilometers << std::endl;
+  os << indent << "Zenithal viewing angle in degree: " << m_AcquiCorrectionParameters->GetViewingZenithalAngle() << std::endl;
+}
+
+} // end namespace otb
+
+#endif
diff --git a/Code/Radiometry/otbVarSol.h b/Code/Radiometry/otbVarSol.h
new file mode 100644
index 0000000..48f0714
--- /dev/null
+++ b/Code/Radiometry/otbVarSol.h
@@ -0,0 +1,67 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef __otbVarSol_h
+#define __otbVarSol_h
+
+#include "otbMath.h"
+
+namespace otb
+{
+
+/** \class VarSol
+   * \brief VarSol operations.
+   *
+   * Call VarSol main function
+   *
+   * [1] Vermote, E., Tanre, D., Deuze, J., Herman, M., Morcette, J., 1997.
+   * Second simulation of the satellite signal in the solar spectrum, 6S: An overview.
+   * IEEE Transactions on Geoscience and Remote Sensing 35
+   * \ingroup Radiometry
+   *
+ */
+  class ITK_EXPORT VarSol
+  {
+  public:
+
+    /** Call the varSol function*/
+    static double GetVarSol(const int day, const int month)
+    {
+      /* System generated locals */
+      double d__1;
+
+      /* Local variables */
+      int j;
+      double om;
+
+      /* calculation of the variability of the solar constant during the year. */
+      /* day is the number of the day in the month */
+      if (month <= 2)
+        j = (month - 1) * 31 + day;
+      else if (month > 8)
+        j = (month - 1) * 31 - (month - 2) / 2 - 2 + day;
+      else
+        j = (month - 1) * 31 - (month - 1) / 2 - 2 + day;
+
+      om = (double) (j - 4) * .9856 * CONST_PI_180;
+      /* Computing 2nd power */
+      d__1 = 1. - vcl_cos(om) * .01673;
+      return 1. / (d__1 * d__1);
+    }
+  };
+} //end namespace otb
+#endif
diff --git a/Code/Segmentation/otbOGRLayerStreamStitchingFilter.txx b/Code/Segmentation/otbOGRLayerStreamStitchingFilter.txx
index 029410c..a8788e0 100644
--- a/Code/Segmentation/otbOGRLayerStreamStitchingFilter.txx
+++ b/Code/Segmentation/otbOGRLayerStreamStitchingFilter.txx
@@ -19,6 +19,7 @@
 #define __otbOGRLayerStreamStitchingFilter_txx
 
 #include "otbOGRLayerStreamStitchingFilter.h"
+#include "itkContinuousIndex.h"
 
 #include <iomanip>
 #include "ogrsf_frmts.h"
@@ -133,29 +134,27 @@ OGRLayerStreamStitchingFilter<TInputImage>
 
         //Compute Stream line
         OGRLineString streamLine;
-        IndexType startIndex;
-        IndexType endIndex;
+        itk::ContinuousIndex<double,2> startIndex;
+        itk::ContinuousIndex<double,2> endIndex;
         if(!line)
         {
-          // Treat Row stream
-          //Compute the spatial filter of the upper stream
-          startIndex[0] = x*m_StreamSize[0];
-          startIndex[1] = m_StreamSize[1]*(y-1);
-          endIndex[0] = m_StreamSize[0]*x;
-          endIndex[1] = m_StreamSize[1]*y;
+          // Treat vertical stream line
+          startIndex[0] = static_cast<double>(m_StreamSize[0] * x) - 0.5;
+          startIndex[1] = static_cast<double>(m_StreamSize[1] * (y-1)) - 0.5;
+          endIndex = startIndex;
+          endIndex[1] += static_cast<double>(m_StreamSize[1]);
         }
         else
-        {  // Treat Column stream
-          //Compute the spatial filter of the left stream
-          startIndex[0] = (x-1)*m_StreamSize[0];
-          startIndex[1] = m_StreamSize[1]*y;
-          endIndex[0] = m_StreamSize[0]*x;
-          endIndex[1] = m_StreamSize[1]*y; //-1 to stop just before stream line
+        {  // Treat horizontal stream line
+          startIndex[0] = static_cast<double>(m_StreamSize[0] * (x-1)) - 0.5;
+          startIndex[1] = static_cast<double>(m_StreamSize[1] * y) - 0.5;
+          endIndex = startIndex;
+          endIndex[0] += static_cast<double>(m_StreamSize[0]);
         }
         OriginType  startPoint;
-        inputImage->TransformIndexToPhysicalPoint(startIndex, startPoint);
+        inputImage->TransformContinuousIndexToPhysicalPoint(startIndex, startPoint);
         OriginType  endPoint;
-        inputImage->TransformIndexToPhysicalPoint(endIndex, endPoint);
+        inputImage->TransformContinuousIndexToPhysicalPoint(endIndex, endPoint);
         streamLine.addPoint(startPoint[0], startPoint[1]);
         streamLine.addPoint(endPoint[0], endPoint[1]);
 
@@ -171,19 +170,19 @@ OGRLayerStreamStitchingFilter<TInputImage>
             // Treat Row stream
             //Compute the spatial filter of the upper stream
             UpperLeftCorner[0] = x*m_StreamSize[0] - 1 - m_Radius;
-            UpperLeftCorner[1] = m_StreamSize[1]*(y-1) + 1;
+            UpperLeftCorner[1] = m_StreamSize[1]*(y-1);
 
-            LowerRightCorner[0] = m_StreamSize[0]*x - 1 - 1;
-            LowerRightCorner[1] = m_StreamSize[1]*y - 1 - 1;
+            LowerRightCorner[0] = m_StreamSize[0]*x - 1;
+            LowerRightCorner[1] = m_StreamSize[1]*y - 1;
          }
          else
          {  // Treat Column stream
             //Compute the spatial filter of the left stream
-            UpperLeftCorner[0] = (x-1)*m_StreamSize[0] + 1;
-            UpperLeftCorner[1] = m_StreamSize[1]*y - 1 - 1 - m_Radius;
+            UpperLeftCorner[0] = (x-1)*m_StreamSize[0];
+            UpperLeftCorner[1] = m_StreamSize[1]*y - 1 - m_Radius;
 
-            LowerRightCorner[0] = m_StreamSize[0]*x - 1 - 1;
-            LowerRightCorner[1] = m_StreamSize[1]*y - 1 - 1; //-1 to stop just before stream line
+            LowerRightCorner[0] = m_StreamSize[0]*x - 1;
+            LowerRightCorner[1] = m_StreamSize[1]*y - 1; //-1 to stop just before stream line
          }
 
          OriginType  ulCorner;
@@ -211,20 +210,20 @@ OGRLayerStreamStitchingFilter<TInputImage>
          if(!line)
          {
             //Compute the spatial filter of the lower stream
-            UpperLeftCorner[0] = x*m_StreamSize[0] + 1;
-            UpperLeftCorner[1] = m_StreamSize[1]*(y-1) + 1;
+            UpperLeftCorner[0] = x*m_StreamSize[0];
+            UpperLeftCorner[1] = m_StreamSize[1]*(y-1);
 
-            LowerRightCorner[0] = m_StreamSize[0]*x + 1 + m_Radius;
-            LowerRightCorner[1] = m_StreamSize[1]*y - 1 - 1;
+            LowerRightCorner[0] = m_StreamSize[0]*x + m_Radius;
+            LowerRightCorner[1] = m_StreamSize[1]*y - 1;
          }
          else
          {
             //Compute the spatial filter of the right stream
-            UpperLeftCorner[0] = (x-1)*m_StreamSize[0] + 1;
-            UpperLeftCorner[1] = m_StreamSize[1]*y + 1;
+            UpperLeftCorner[0] = (x-1)*m_StreamSize[0];
+            UpperLeftCorner[1] = m_StreamSize[1]*y;
 
-            LowerRightCorner[0] = m_StreamSize[0]*x - 1 - 1;
-            LowerRightCorner[1] = m_StreamSize[1]*y + 1 + m_Radius;
+            LowerRightCorner[0] = m_StreamSize[0]*x - 1;
+            LowerRightCorner[1] = m_StreamSize[1]*y + m_Radius;
          }
 
          inputImage->TransformIndexToPhysicalPoint(UpperLeftCorner, ulCorner);
diff --git a/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.h b/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.h
index b17eb64..d329907 100644
--- a/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.h
+++ b/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.h
@@ -331,7 +331,7 @@ public:
      this->GetFilter()->SetUse8Connected(flag);
   }
 
-  const bool GetUse8Connected()
+  bool GetUse8Connected()
   {
      return this->GetFilter()->GetUse8Connected();
   }
@@ -341,7 +341,7 @@ public:
      this->GetFilter()->SetFilterSmallObject(flag);
   }
 
-  const bool GetFilterSmallObject()
+  bool GetFilterSmallObject()
   {
      return this->GetFilter()->GetFilterSmallObject();
   }
@@ -351,7 +351,7 @@ public:
      this->GetFilter()->SetMinimumObjectSize(size);
   }
 
-  const unsigned int GetMinimumObjectSize()
+  unsigned int GetMinimumObjectSize()
   {
      return this->GetFilter()->GetMinimumObjectSize();
   }
@@ -361,7 +361,7 @@ public:
      this->GetFilter()->SetSimplify(flag);
   }
 
-  const bool GetSimplify()
+  bool GetSimplify()
   {
      return this->GetFilter()->GetSimplify();
   }
@@ -373,7 +373,7 @@ public:
      this->GetFilter()->SetSimplificationTolerance(tol);
   }
 
-  const double GetSimplificationTolerance()
+  double GetSimplificationTolerance()
   {
      return this->GetFilter()->GetSimplificationTolerance();
   }
diff --git a/Code/Simulation/otbAtmosphericEffects.h b/Code/Simulation/otbAtmosphericEffects.h
index 107be2b..60ce6cf 100644
--- a/Code/Simulation/otbAtmosphericEffects.h
+++ b/Code/Simulation/otbAtmosphericEffects.h
@@ -18,7 +18,8 @@
 #ifndef __otbAtmosphericEffects_h
 #define __otbAtmosphericEffects_h
 
-#include "otbAtmosphericCorrectionParameters.h"
+#include "otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h"
+#include "otbAtmosphericRadiativeTerms.h"
 
 namespace otb
 {
@@ -56,9 +57,9 @@ class AtmosphericEffects
            typedef typename InputRSRType::ValuePrecisionType ValuePrecisionType;
            typedef typename InputSpectralResponseType::PairType PairType;
 
-           /** 6S typedefs*/
-           typedef otb::AtmosphericCorrectionParameters AtmosphericCorrectionParametersType;
-           typedef itk::SmartPointer<AtmosphericCorrectionParametersType> AtmosphericCorrectionParametersPointerType;
+
+          typedef otb::AtmosphericRadiativeTerms                                    AtmosphericRadiativeTermsType;
+          typedef typename AtmosphericRadiativeTermsType::Pointer                  AtmosphericRadiativeTermsPointerType;
 
             /** Standard macros */
            itkNewMacro(Self);
@@ -70,14 +71,20 @@ class AtmosphericEffects
            itkGetConstObjectMacro(InputSpectralResponse, InputSpectralResponseType);
            itkSetObjectMacro(InputSpectralResponse, InputSpectralResponseType);
 
-           itkGetConstObjectMacro(DataAtmosphericCorrectionParameters, AtmosphericCorrectionParametersType);
-           itkSetObjectMacro(DataAtmosphericCorrectionParameters, AtmosphericCorrectionParametersType);
+            /** Get/Set Atmospheric Radiative Terms. */
+            void SetAtmosphericRadiativeTerms(AtmosphericRadiativeTermsPointerType atmoRadTerms)
+            {
+              m_AtmosphericRadiativeTerms = atmoRadTerms;
+              this->Modified();
+            }
+           itkGetConstObjectMacro(AtmosphericRadiativeTerms, AtmosphericRadiativeTermsType);
+           //itkSetObjectMacro(AtmosphericRadiativeTerms, AtmosphericRadiativeTermsType);
 
            itkGetObjectMacro(CorrectedSpectralResponse, InputSpectralResponseType);
 
 
-//           void  LoadFilterFunctionAtmosphericCorrectionParameters( double step = 0.0025);
-           void  Process6S(/*const unsigned int numBand*/);
+//         void  LoadFilterFunctionAtmosphericCorrectionParameters( double step = 0.0025);
+           void  Process(/*const unsigned int numBand*/);
 
         protected:
            /** Constructor */
@@ -94,11 +101,13 @@ class AtmosphericEffects
            AtmosphericEffects(const Self&); //purposely not implemented
            void operator=(const Self&); //purposely not implemented
 
-           AtmosphericCorrectionParametersPointerType m_DataAtmosphericCorrectionParameters;
+           AtmosphericRadiativeTermsPointerType m_AtmosphericRadiativeTerms;
            InputSpectralResponsePointerType m_InputSpectralResponse;
            InputSpectralResponsePointerType m_CorrectedSpectralResponse;
            InputRSRPointerType m_InputSatRSR;
 
+           bool m_IsSetAtmosphericRadiativeTerms;
+
       };
 }// end namespace otb
 
diff --git a/Code/Simulation/otbAtmosphericEffects.txx b/Code/Simulation/otbAtmosphericEffects.txx
index fd3f9ef..e31a692 100644
--- a/Code/Simulation/otbAtmosphericEffects.txx
+++ b/Code/Simulation/otbAtmosphericEffects.txx
@@ -19,7 +19,6 @@
 #define __otbAtmosphericEffects_txx
 
 #include "otbAtmosphericEffects.h"
-#include "otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h"
 #include "otbSurfaceReflectanceToReflectanceFilter.h"
 
 namespace otb
@@ -27,7 +26,8 @@ namespace otb
 
 template <class TSpectralResponse , class TRSR>
 AtmosphericEffects<TSpectralResponse , TRSR>
-::AtmosphericEffects()
+::AtmosphericEffects() :
+m_IsSetAtmosphericRadiativeTerms(false)
   {
     m_InputSpectralResponse = InputSpectralResponseType::New();
     m_CorrectedSpectralResponse = InputSpectralResponseType::New();
@@ -49,9 +49,9 @@ AtmosphericEffects<TSpectralResponse , TRSR>
 template <class TSpectralResponse , class TRSR>
 void
 AtmosphericEffects<TSpectralResponse , TRSR>
-::Process6S(/*const unsigned int numBand*/)
+::Process(/*const unsigned int numBand*/)
 {
-  typedef otb::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
+  /*typedef otb::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
       AtmosphericCorrectionParametersTo6SRadiativeTermsType;
 
   AtmosphericCorrectionParametersTo6SRadiativeTermsType::Pointer  filterAtmosphericCorrectionParametersTo6SRadiativeTerms = AtmosphericCorrectionParametersTo6SRadiativeTermsType::New();
@@ -108,7 +108,27 @@ AtmosphericEffects<TSpectralResponse , TRSR>
   filterSRToR->Update();
 
 
-  this->m_CorrectedSpectralResponse->SetFromImage( filterSRToR->GetOutput() );
+  this->m_CorrectedSpectralResponse->SetFromImage( filterSRToR->GetOutput() ); */
+
+  /*if (m_IsSetAtmosphericRadiativeTerms)
+  {*/
+    typedef typename InputSpectralResponseType::ImageType       ImageType;
+
+    typedef SurfaceReflectanceToReflectanceFilter<ImageType, ImageType>              SurfaceReflectanceToReflectanceFilterType;
+    typename SurfaceReflectanceToReflectanceFilterType::Pointer filterSRToR = SurfaceReflectanceToReflectanceFilterType::New();
+
+    filterSRToR->SetAtmosphericRadiativeTerms( m_AtmosphericRadiativeTerms );
+
+    typename ImageType::Pointer image = ImageType::New();
+    this->m_InputSpectralResponse->GetImage(image);
+    filterSRToR->SetInput( image );
+    filterSRToR->Update();
+
+    this->m_CorrectedSpectralResponse->SetFromImage( filterSRToR->GetOutput() );
+  /*}
+  else
+    itkExceptionMacro(<< "Atmospheric radiative terms must be provided before updating the CSR (Corrected Spectral Response)"); */
+
 }
 } // end namespace otb
 
diff --git a/Code/Simulation/otbImageSimulationMethod.txx b/Code/Simulation/otbImageSimulationMethod.txx
index 60e4664..880f18e 100644
--- a/Code/Simulation/otbImageSimulationMethod.txx
+++ b/Code/Simulation/otbImageSimulationMethod.txx
@@ -158,6 +158,8 @@ ImageSimulationMethod< TInputVectorData, TSpatialisation, TSimulationStep1, TSim
 
   m_LabelMapToLabelImageFilter->SetInput(m_Spatialisation->GetOutput());
 
+  m_LabelMapToSimulatedImageFilter->UpdateOutputInformation();
+
   for (unsigned int i = 0; i < m_NumberOfComponentsPerPixel; ++i)
     {
 
diff --git a/Code/Simulation/otbReduceSpectralResponse.h b/Code/Simulation/otbReduceSpectralResponse.h
index 1922668..ba74d3a 100644
--- a/Code/Simulation/otbReduceSpectralResponse.h
+++ b/Code/Simulation/otbReduceSpectralResponse.h
@@ -31,13 +31,24 @@ namespace otb
 /** \class ReduceSpectralResponse
    * \brief This class computes the reduced spectral response of each band of a sensor
    *
-   * It takes the spectral response of an object and the relative spectral
-   * response of a satellite (one response per band) to compute the satellite spectral bands.
+   * It takes the spectral response of an object and the relative
+   * spectral response of a satellite (one response per band) to
+   * compute the satellite spectral bands.
+   *
+   * There are 2 operating modes:
+   * - luminance mode (default): integrates the spectral response over each band
+   * - reflectance mode (needs to call SetReflectanceMode(true)): takes into account
+   *   the solar irradiance in the integration
    *
    * The two templates indicate:
-   * - the SpectralResponse input (from the JPL ASTER spectral library for example)
+   * - the SpectralResponse input
    * - the relative spectral response (RSR) of a sensor
    *
+   * The computation assumes that the RSR of the sensor has a
+   * wavelength resolution similar or better than the spectral
+   * response to be reduced. If this is not the case, it is wise to
+   * oversample it (by linear interpolation, for instance).
+   *
    * The method CalculateResponse must be called.
    *
    * \sa itk::DataObject
@@ -90,6 +101,9 @@ public:
   itkGetObjectMacro(ReduceResponse, InputSpectralResponseType)
 ;
 
+  itkSetMacro(ReflectanceMode, bool);
+  itkGetConstMacro(ReflectanceMode, bool);
+  
   /** Clear the vector data  */
   virtual bool Clear();
 
@@ -98,7 +112,7 @@ public:
 
   /**
    * \param PrecisionType
-   * \return The integrate value of the RSR for the input spectral response.
+   * \return The integrated value of the RSR for the input spectral response.
    */
   inline ValuePrecisionType operator()(const unsigned int numBand);
 
@@ -134,6 +148,9 @@ private:
 
   /** the computed response */
   InputSpectralResponsePointerType m_ReduceResponse;
+
+  /** Choose between reflectance or luminance mode */
+  bool m_ReflectanceMode;
 };
 
 }// end namespace otb
diff --git a/Code/Simulation/otbReduceSpectralResponse.txx b/Code/Simulation/otbReduceSpectralResponse.txx
index 7058060..64f4fb1 100644
--- a/Code/Simulation/otbReduceSpectralResponse.txx
+++ b/Code/Simulation/otbReduceSpectralResponse.txx
@@ -27,7 +27,7 @@ namespace otb
 
 template <class TSpectralResponse , class TRSR>
 ReduceSpectralResponse <TSpectralResponse , TRSR>
-::ReduceSpectralResponse()
+::ReduceSpectralResponse() : m_ReflectanceMode(false)
 {
     m_ReduceResponse = InputSpectralResponseType::New();
 }
@@ -40,6 +40,28 @@ ReduceSpectralResponse<TSpectralResponse , TRSR>
    return ( m_InputSatRSR->Clear() & m_InputSpectralResponse->Clear() );
 }
 
+template <typename T>
+inline
+T trapezoid_area(T x1, T x2, T y1, T y2)
+{
+        /* We compute the area of the trapezoid
+            by computing the lower square and the
+            upper triangle.
+                         /- |y2
+                       /-   |
+                     /-     |
+                   /-       |
+            y1   +----------+
+                 |          |
+                 |          |
+                 |          |
+                 +----------+
+                x1          x2
+
+          (x2-x1)*min(y1,y2) + (x2-x1)*abs(y2-y1)/2
+        */
+  return (x2-x1)*std::min(y1,y2) + (x2-x1)*fabs(y2-y1)*0.5;
+}
 
 template <class TSpectralResponse , class TRSR>
 inline typename ReduceSpectralResponse<TSpectralResponse , TRSR>::ValuePrecisionType
@@ -48,166 +70,65 @@ ReduceSpectralResponse<TSpectralResponse , TRSR>
 {
   if (numBand >= m_InputSatRSR->GetNbBands())
     {
-    itkExceptionMacro(<< "There is no band num " << numBand << " in the RSR vector!(Size of the current RSR vector is " << m_InputSatRSR->GetNbBands() << ")" );
+    itkExceptionMacro(<< "There is no band num " << numBand
+                      << " in the RSR vector!(Size of the current RSR vector is "
+                      << m_InputSatRSR->GetNbBands() << ")" );
     }
   else
     {
     ValuePrecisionType res = itk::NumericTraits<ValuePrecisionType>::ZeroValue();
-    ValuePrecisionType response1;
-    ValuePrecisionType response2;
-    ValuePrecisionType inputSatRSR1;
-    ValuePrecisionType inputSatRSR2;
-
-    ValuePrecisionType inputRSR1;
-    ValuePrecisionType inputRSR2;
-    PrecisionType lambda1;
-    PrecisionType lambda2;
-
+    typename InputRSRType::SpectralResponseType* solarIrradiance;
 
+    if(m_ReflectanceMode)
+      {
+      solarIrradiance = this->m_InputSatRSR->GetSolarIrradiance();
+      if (solarIrradiance == 0)
+        {
+        itkExceptionMacro(<<"Error occurs getting solar irradiance. Solar irradiance is mandatory using the reflectance mode.");
+        }
+      }
     typename VectorPairType::const_iterator it;
     VectorPairType pairs = (m_InputSatRSR->GetRSR())[numBand]->GetResponse();
     it = pairs.begin();
-
-    PrecisionType lambdaMin=(this->m_InputSatRSR->GetRSR())[numBand]->GetInterval().first;
-    PrecisionType lambdaMax=(this->m_InputSatRSR->GetRSR())[numBand]->GetInterval().second;
-
-    ValuePrecisionType totalArea = static_cast<ValuePrecisionType> (0);
-    totalArea =lambdaMax - lambdaMin;
-    if (totalArea == 0) return static_cast<ValuePrecisionType> (0.0);
-
-
-    while (it != pairs.end() - 1)
+    ValuePrecisionType totalArea(0);
+    //start with the second value for the numerical integration
+    ++it;
+    while (it != pairs.end())
       {
-
-      lambda1 = (*it).first;
-      lambda2 = (*(it + 1)).first;
-      if((lambda1<lambdaMax) && (lambda2>lambdaMin))
+      PrecisionType lambda1 = (*(it-1)).first;
+      PrecisionType lambda2 = (*it).first;
+//      PrecisionType deltaLambda = lambda2-lambda1;
+      ValuePrecisionType rsr1 = (*(it-1)).second;
+      ValuePrecisionType rsr2 = (*it).second;
+      ValuePrecisionType spectrum1 = (*m_InputSpectralResponse)(lambda1);
+      ValuePrecisionType spectrum2 = (*m_InputSpectralResponse)(lambda2);
+      /*
+        In order to simplify the computation for the reflectance mode,
+        we introduce the solar irradiance in the general formula with
+        a value of 1.0 for the luminance case.
+
+        In this way the formula is the same if we weight the RSR by
+        the solar irradiance before the integration.
+      */
+      ValuePrecisionType solarIrradiance1(1.0);
+      ValuePrecisionType solarIrradiance2(1.0);
+      if(m_ReflectanceMode)
         {
-        inputSatRSR1 = (*it).second;
-        inputSatRSR2 = (*(it + 1)).second;
-
-        inputRSR1 = (*m_InputSpectralResponse)(lambda1);
-        inputRSR2 = (*m_InputSpectralResponse)(lambda2);
-
-
-        // lambda1 need to be resampled
-        /*
-
-                                /------+ inputRSR2
-                            /---       |
-                           /           |
-                          |            |
-                          |            |
-                          |            |
-                          |            |
-         inputRSR1=0+------------------+
-         lambda1            lambda2
-                          ^
-                          |
-         first non zero val in inputRSR
-
-         - after resampling
-
-                          /------+ inputRSR2
-                      /---       |
-                     /           |
-         inputRSR1  +            |
-                    |            |
-                    |            |
-                    |            |
-                    +------------+
-                 lambda1      lambda2
-         */
-        if ((inputRSR1 == 0) && (inputRSR2 != 0))
-          {
-          PrecisionType lambdaRSRmin = m_InputSpectralResponse->GetInterval().first;
-          if ((lambdaRSRmin > lambda2) || (lambdaRSRmin < lambda1))
-            {
-            itkExceptionMacro(<<"Spectral response problem");
-            }
-
-          PrecisionType lambdaDist = lambdaRSRmin - lambda1;
-          PrecisionType ratio = lambdaDist / (lambda2 - lambda1);
-          lambda1 = lambdaRSRmin;
-          inputSatRSR1 = ratio * inputSatRSR1 + (1 - ratio) * inputSatRSR2;
-
-          inputRSR1=(*m_InputSpectralResponse)(lambda1);
-
-          }
-
-        // lambda2 need to be resampled
-        /*
-
-         inputRSR1  +---\
-                    |    \
-                    |     ------\
-                    |            |
-                    |            |
-                    |            |
-                    +----------------------------+ inputRSR2=0
-                 lambda1                       lambda2
-                                 ^
-                                 |
-         first non zero val in inputRSR
-
-         - after resampling
-
-
-         inputRSR1  +---\
-                    |    \
-                    |     ------\
-                    |            +inputRSR2
-                    |            |
-                    |            |
-                    +------------+
-                 lambda1        lambda2
-
-         */
-        if ((inputRSR1 != 0) && (inputRSR2 == 0))
-          {
-          PrecisionType lambdaRSRmax = m_InputSpectralResponse->GetInterval().second;
-          if ((lambdaRSRmax > lambda2) || (lambdaRSRmax < lambda1))
-            {
-            itkExceptionMacro(<<"Spectral response problem");
-            }
-          PrecisionType lambdaDist = lambdaRSRmax - lambda1;
-          PrecisionType ratio = lambdaDist / (lambda2 - lambda1);
-          lambda2 = lambdaRSRmax;
-          inputSatRSR2 = ratio * inputSatRSR1 + (1 - ratio) * inputSatRSR2;
-
-          inputRSR2=(*m_InputSpectralResponse)(lambda2);
-
-          }
-
-        response1 = inputRSR1 * inputSatRSR1;
-        response2 = inputRSR2 * inputSatRSR2;
-
-        ValuePrecisionType rmin = std::min(response1, response2);
-        ValuePrecisionType rmax = std::max(response1, response2);
-
-        /*
-          rmax +\
-            | ---\
-            |     --| rmin
-            |       |
-            |       |
-            |       |
-            |       |
-            |-------+
-           lambda1   lambda2
-         */
-
-        //Compute the surface of the trapezoid
-
-        ValuePrecisionType area = (lambda2 - lambda1) * (rmax + rmin) / 2.0;
-        res += area;
+        solarIrradiance1 = (*solarIrradiance)(lambda1);
+        solarIrradiance2 = (*solarIrradiance)(lambda2);
         }
+      rsr1 *= solarIrradiance1;
+      rsr2 *= solarIrradiance2;
+      res += trapezoid_area(lambda1, lambda2,
+                            rsr1*spectrum1,
+                            rsr2*spectrum2);
+      totalArea += trapezoid_area(lambda1, lambda2,
+                                  rsr1,
+                                  rsr2);
       ++it;
       }
-
     return res / totalArea;
     }
-
 }
 
 template <class TSpectralResponse , class TRSR>
@@ -261,15 +182,26 @@ ReduceSpectralResponse<TSpectralResponse , TRSR>
    os<<std::endl;
    os << "spectre " << m_InputSpectralResponse <<std::endl;
    os << "Sat RSR " << m_InputSatRSR <<std::endl;
-
    os<<std::endl;
-   os <<indent << "[Center Wavelength (micrometers), Reflectance (percent)]" << std::endl;
+
+   if(m_ReflectanceMode)
+     {
+     os << "Solar irradiance " << std::endl;
+     this->m_InputSatRSR->GetSolarIrradiance()->PrintSelf(os, indent);
+     os<<std::endl;
+     os <<indent << "[Center Wavelength (micrometers), Reflectance (percent)]" << std::endl;
+     }
+   else{
+   os <<indent << "[Center Wavelength (micrometers), Luminance (percent)]" << std::endl;
+   }
+
    for(typename VectorPairType::const_iterator it = m_ReduceResponse->GetResponse().begin(); it != m_ReduceResponse->GetResponse().end(); ++it)
    {
      os <<indent << "Band Nb : "<< it - m_ReduceResponse->GetResponse().begin() << ": [" << (*it).first << ","<< (*it).second << "]" << std::endl;
    }
 }
 
+
 } // end namespace otb
 
 #endif
diff --git a/Code/Simulation/otbSatelliteRSR.h b/Code/Simulation/otbSatelliteRSR.h
index a0c0170..55f21f8 100644
--- a/Code/Simulation/otbSatelliteRSR.h
+++ b/Code/Simulation/otbSatelliteRSR.h
@@ -119,7 +119,7 @@ public:
   /**
    * \param PrecisionType
    * \param Band
-   * \return The interpolate value of the SR for the numBand (band num 0 to band num (m_NbBands-1)).
+   * \return The interpolated value of the SR for the numBand (band num 0 to band num (m_NbBands-1)).
    */
   inline ValuePrecisionType operator()(const PrecisionType & lambda, const unsigned int numBand);
 
@@ -132,6 +132,12 @@ public:
     return m_RSR;
   }
 
+  /** get the solar irradiance */
+  SpectralResponseType* GetSolarIrradiance()
+  {
+    return m_SolarIrradiance;
+  }
+
 protected:
   /** Constructor */
   SatelliteRSR();
@@ -151,6 +157,9 @@ private:
 
   /** Vector of SpectralResponse */
   RSRVectorType m_RSR;
+
+  /** Solar irradiance vector */
+  SpectralResponsePointerType m_SolarIrradiance;
   /** Number of bands*/
   unsigned int m_NbBands;
 };
diff --git a/Code/Simulation/otbSatelliteRSR.txx b/Code/Simulation/otbSatelliteRSR.txx
index c185f6c..12d3b8c 100644
--- a/Code/Simulation/otbSatelliteRSR.txx
+++ b/Code/Simulation/otbSatelliteRSR.txx
@@ -28,6 +28,7 @@ SatelliteRSR<TPrecision, TValuePrecision>::SatelliteRSR()
 {
   //m_RSR = VectorType::New();
   m_SortBands = true;
+  m_SolarIrradiance = SpectralResponseType::New();
 }
 
 template<class TPrecision, class TValuePrecision>
@@ -50,13 +51,15 @@ void SatelliteRSR<TPrecision, TValuePrecision>::Load(const std::string & filenam
     m_RSR.push_back(RSRBand);
     }
   PrecisionType currentLambda;
-  PrecisionType zenithalAngle;
+  PrecisionType solarIrradiance;
   while (!fin.eof())
     {
     //Parse the 6S.txt file
     fin >> currentLambda;
-    fin >> zenithalAngle;
+    fin >> solarIrradiance;
 
+    m_SolarIrradiance->GetResponse().push_back(std::make_pair(currentLambda,
+                                                              solarIrradiance));
     //for each band add a pair of values (wavelength and % response)
     for (unsigned int i = 0; i < m_NbBands; ++i)
       {
diff --git a/Code/Simulation/otbSurfaceReflectanceToReflectanceFilter.h b/Code/Simulation/otbSurfaceReflectanceToReflectanceFilter.h
index dfc8887..2b9604b 100644
--- a/Code/Simulation/otbSurfaceReflectanceToReflectanceFilter.h
+++ b/Code/Simulation/otbSurfaceReflectanceToReflectanceFilter.h
@@ -26,7 +26,8 @@
 #include "otbUnaryImageFunctorWithVectorImageFilter.h"
 
 #include "otbAtmosphericRadiativeTerms.h"
-#include "otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h"
+#include "otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h"
+#include "otbImageMetadataCorrectionParameters.h"
 #include "itkMetaDataDictionary.h"
 // #include "itkFactory.h"
 namespace otb
@@ -193,51 +194,57 @@ public:
   typedef typename OutputImageType::InternalPixelType                   OutputInternalPixelType;
   typedef typename OutputImageType::RegionType                          OutputImageRegionType;
 
-  typedef AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms  Parameters2RadiativeTermsType;
-  typedef Parameters2RadiativeTermsType::Pointer                        Parameters2RadiativeTermsPointerType;
-  typedef AtmosphericCorrectionParameters::Pointer                      CorrectionParametersPointerType;
-  typedef AtmosphericRadiativeTerms::Pointer                            AtmosphericRadiativeTermsPointerType;
+  typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms     CorrectionParametersToRadiativeTermsType;
 
+  typedef otb::AtmosphericCorrectionParameters                               AtmoCorrectionParametersType;
+  typedef typename AtmoCorrectionParametersType::Pointer                    AtmoCorrectionParametersPointerType;
 
-  typedef FilterFunctionValues                                          FilterFunctionValuesType;
-  typedef FilterFunctionValuesType::ValuesVectorType                    CoefVectorType;
-  typedef std::vector<CoefVectorType>                                   FilterFunctionCoefVectorType;
+  typedef otb::ImageMetadataCorrectionParameters                             AcquiCorrectionParametersType;
+  typedef typename AcquiCorrectionParametersType::Pointer                   AcquiCorrectionParametersPointerType;
+
+  typedef otb::AtmosphericRadiativeTerms                                     AtmosphericRadiativeTermsType;
+  typedef typename AtmosphericRadiativeTermsType::Pointer                   AtmosphericRadiativeTermsPointerType;
+
+
+  typedef otb::FilterFunctionValues                                     FilterFunctionValuesType;
+  typedef FilterFunctionValuesType::WavelengthSpectralBandType          ValueType;                //float
+  typedef FilterFunctionValuesType::ValuesVectorType                    ValuesVectorType;         //std::vector<float>
+
+  typedef typename AcquiCorrectionParametersType::WavelengthSpectralBandVectorType        WavelengthSpectralBandVectorType;
+
+  typedef itk::MetaDataDictionary MetaDataDictionaryType;
 
-  typedef itk::MetaDataDictionary                                       MetaDataDictionaryType;
 
   /** Get/Set Atmospheric Radiative Terms. */
-  void SetAtmosphericRadiativeTerms(AtmosphericRadiativeTermsPointerType atmo)
+  void SetAtmosphericRadiativeTerms(AtmosphericRadiativeTermsPointerType atmoRadTerms)
   {
-    m_AtmosphericRadiativeTerms = atmo;
+    m_AtmosphericRadiativeTerms = atmoRadTerms;
     this->SetNthInput(1, m_AtmosphericRadiativeTerms);
     m_IsSetAtmosphericRadiativeTerms = true;
     this->Modified();
   }
-  itkGetObjectMacro(AtmosphericRadiativeTerms, AtmosphericRadiativeTerms);
+  itkGetObjectMacro(AtmosphericRadiativeTerms, AtmosphericRadiativeTermsType);
 
   /** Get/Set Atmospheric Correction Parameters. */
-  itkSetObjectMacro(CorrectionParameters, AtmosphericCorrectionParameters);
-  itkGetObjectMacro(CorrectionParameters, AtmosphericCorrectionParameters);
-
-  /** Get/Set Aeronet file name. */
-  itkSetMacro(AeronetFileName, std::string);
-  itkGetMacro(AeronetFileName, std::string);
-
-  /** Get/Set Aeronet file name. */
-  itkSetMacro(FilterFunctionValuesFileName, std::string);
-  itkGetMacro(FilterFunctionValuesFileName, std::string);
-
-  /** Get/Set Filter function coef. */
-  void SetFilterFunctionCoef( FilterFunctionCoefVectorType vect )
+  void SetAtmoCorrectionParameters(AtmoCorrectionParametersPointerType atmoCorrTerms)
   {
-         m_FilterFunctionCoef = vect;
-         this->Modified();
+    m_AtmoCorrectionParameters = atmoCorrTerms;
+    this->SetNthInput(2, m_AtmoCorrectionParameters);
+    m_IsSetAtmoCorrectionParameters = true;
+    this->Modified();
   }
-  FilterFunctionCoefVectorType GetFilterFunctionCoef()
+  itkGetObjectMacro(AtmoCorrectionParameters, AtmoCorrectionParametersType);
+
+  /** Get/Set Acquisition Correction Parameters. */
+  void SetAcquiCorrectionParameters(AcquiCorrectionParametersPointerType acquiCorrTerms)
   {
-         return m_FilterFunctionCoef;
+    m_AcquiCorrectionParameters = acquiCorrTerms;
+    this->SetNthInput(3, m_AcquiCorrectionParameters);
+    m_IsSetAcquiCorrectionParameters = true;
+    this->Modified();
   }
 
+
   /** Compute radiative terms if necessary and then updtae functors attibuts. */
   void GenerateParameters();
 
@@ -256,30 +263,32 @@ protected:
   /** Destructor */
   virtual ~SurfaceReflectanceToReflectanceFilter() {};
 
-  /** Read the aeronet data and extract aerosol optical and water vapor amount. */
-  //void UpdateAeronetData( const MetaDataDictionaryType dict );
 
   /** Initialize the functor vector */
-  void GenerateOutputInformation();
+  void BeforeThreadedGenerateData();
   /** Fill AtmosphericRadiativeTerms using image metadata*/
   void UpdateAtmosphericRadiativeTerms();
   /** Update Functors parameters */
   void UpdateFunctors();
 
+  /** If modified, we need to compute the functor parameters again */
+  virtual void Modified();
+
 private:
-  AtmosphericRadiativeTermsPointerType m_AtmosphericRadiativeTerms;
-  CorrectionParametersPointerType      m_CorrectionParameters;
+
   bool m_IsSetAtmosphericRadiativeTerms;
-  /** Path to an Aeronet data file, allows to compute aerosol optical and water vapor amounts. */
-  std::string m_AeronetFileName;
-  /** Path to a filter function values file. */
-  std::string m_FilterFunctionValuesFileName;
-  /** Contains the filter function values (each element is a vector and represnts the values for each channel) */
-  FilterFunctionCoefVectorType m_FilterFunctionCoef;
-  /** Enable/Disable GenerateParameters in GenerateOutputInformation.
-   *  Usefull for image view that call GenerateOutputInformation each time you move the full area.
-   */
+  bool m_IsSetAtmoCorrectionParameters;
+  bool m_IsSetAcquiCorrectionParameters;
+
+  /** Radiative terms object */
+  AtmosphericRadiativeTermsPointerType     m_AtmosphericRadiativeTerms;
+  AtmoCorrectionParametersPointerType      m_AtmoCorrectionParameters;
+  AcquiCorrectionParametersPointerType     m_AcquiCorrectionParameters;
+
   bool m_UseGenerateParameters;
+
+  /** True if the functor parameters have been generated */
+  bool m_FunctorParametersHaveBeenComputed;
 };
 
 } // end namespace otb
diff --git a/Code/Simulation/otbSurfaceReflectanceToReflectanceFilter.txx b/Code/Simulation/otbSurfaceReflectanceToReflectanceFilter.txx
index a6eb2db..c20cfa1 100644
--- a/Code/Simulation/otbSurfaceReflectanceToReflectanceFilter.txx
+++ b/Code/Simulation/otbSurfaceReflectanceToReflectanceFilter.txx
@@ -30,15 +30,15 @@ namespace otb
  */
 template <class TInputImage, class TOutputImage>
 SurfaceReflectanceToReflectanceFilter<TInputImage, TOutputImage>
-::SurfaceReflectanceToReflectanceFilter()
+::SurfaceReflectanceToReflectanceFilter() :
+ m_IsSetAtmosphericRadiativeTerms(false),
+ m_IsSetAtmoCorrectionParameters(false),
+ m_IsSetAcquiCorrectionParameters(false),
+ m_UseGenerateParameters(true)
 {
-  m_AtmosphericRadiativeTerms = AtmosphericRadiativeTerms::New();
-  m_CorrectionParameters      = AtmosphericCorrectionParameters::New();
-  m_IsSetAtmosphericRadiativeTerms = false;
-  m_AeronetFileName = "";
-  m_FilterFunctionValuesFileName = "";
-  m_FilterFunctionCoef.clear();
-  m_UseGenerateParameters = true;
+  m_AtmosphericRadiativeTerms = AtmosphericRadiativeTermsType::New();
+  m_AtmoCorrectionParameters = AtmoCorrectionParametersType::New();
+  m_AcquiCorrectionParameters = AcquiCorrectionParametersType::New();
 }
 
 
@@ -47,83 +47,63 @@ void
 SurfaceReflectanceToReflectanceFilter<TInputImage, TOutputImage>
 ::UpdateAtmosphericRadiativeTerms()
 {
-  MetaDataDictionaryType dict = this->GetInput()->GetMetaDataDictionary();
-
-  OpticalImageMetadataInterface::Pointer imageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(dict);
-
-  if ((m_CorrectionParameters->GetDay() == 0))
-    {
-      m_CorrectionParameters->SetDay(imageMetadataInterface->GetDay());
-    }
-
-  if ((m_CorrectionParameters->GetMonth() == 0))
-    {
-      m_CorrectionParameters->SetMonth(imageMetadataInterface->GetMonth());
-    }
-
-  if ((m_CorrectionParameters->GetSolarZenithalAngle() == 361.))
-    {
-      m_CorrectionParameters->SetSolarZenithalAngle(90. - imageMetadataInterface->GetSunElevation());
-    }
-
-  if ((m_CorrectionParameters->GetSolarAzimutalAngle() == 361.))
-    {
-      m_CorrectionParameters->SetSolarAzimutalAngle(imageMetadataInterface->GetSunAzimuth());
-    }
-
-  if ((m_CorrectionParameters->GetViewingZenithalAngle() == 361.))
-    {
-      m_CorrectionParameters->SetViewingZenithalAngle(90. - imageMetadataInterface->GetSatElevation());
-    }
-
-  if ((m_CorrectionParameters->GetViewingAzimutalAngle() == 361.))
+  if (this->GetInput() == NULL)
     {
-      m_CorrectionParameters->SetViewingAzimutalAngle(imageMetadataInterface->GetSatAzimuth());
+      itkExceptionMacro(<< "Input must be set before updating the atmospheric radiative terms");
     }
 
-  if(m_AeronetFileName != "")
-    m_CorrectionParameters->UpdateAeronetData( m_AeronetFileName,
-                                          imageMetadataInterface->GetYear(),
-                                          imageMetadataInterface->GetHour(),
-                                          imageMetadataInterface->GetMinute() );
-
-  // load fiter function values
-  if(m_FilterFunctionValuesFileName != "")
-    {
-      m_CorrectionParameters->LoadFilterFunctionValue( m_FilterFunctionValuesFileName );
-   }
-  // the user has set the filter function values
-  else
-    {
-      if( m_FilterFunctionCoef.size() != this->GetInput()->GetNumberOfComponentsPerPixel() )
-       {
-         itkExceptionMacro(<<"Filter Function and image channels mismatch.");
-       }
-      for(unsigned int i=0; i<this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
-       {
-         FilterFunctionValuesType::Pointer functionValues = FilterFunctionValuesType::New();
-         functionValues->SetFilterFunctionValues(m_FilterFunctionCoef[i]);
-         functionValues->SetMinSpectralValue(imageMetadataInterface->GetFirstWavelengths()[i]);
-         functionValues->SetMaxSpectralValue(imageMetadataInterface->GetLastWavelengths()[i]);
-
-         m_CorrectionParameters->SetWavelengthSpectralBandWithIndex(i, functionValues);
-       }
-    }
-
-  Parameters2RadiativeTermsPointerType param2Terms = Parameters2RadiativeTermsType::New();
-
-  param2Terms->SetInput(m_CorrectionParameters);
-  param2Terms->Update();
-  m_AtmosphericRadiativeTerms = param2Terms->GetOutput();
+  // Atmospheric parameters
+  if (!m_IsSetAtmoCorrectionParameters)
+        {
+          itkExceptionMacro(<< "Atmospheric correction parameters must be provided before updating the atmospheric radiative terms");
+        }
+
+
+  // Acquisition parameters
+  if (!m_IsSetAcquiCorrectionParameters) // Get info from image metadata interface
+      {
+          MetaDataDictionaryType dict = this->GetInput()->GetMetaDataDictionary();
+          OpticalImageMetadataInterface::Pointer imageMetadataInterface = OpticalImageMetadataInterfaceFactory::CreateIMI(dict);
+
+          m_AcquiCorrectionParameters = AcquiCorrectionParametersType::New();
+
+          m_AcquiCorrectionParameters->SetSolarZenithalAngle(90. - imageMetadataInterface->GetSunElevation());
+          m_AcquiCorrectionParameters->SetSolarAzimutalAngle(imageMetadataInterface->GetSunAzimuth());
+          m_AcquiCorrectionParameters->SetViewingZenithalAngle(90. - imageMetadataInterface->GetSatElevation());
+          m_AcquiCorrectionParameters->SetViewingAzimutalAngle(imageMetadataInterface->GetSatAzimuth());
+
+          m_AcquiCorrectionParameters->SetDay(imageMetadataInterface->GetDay());
+          m_AcquiCorrectionParameters->SetMonth(imageMetadataInterface->GetMonth());
+
+          if (imageMetadataInterface->GetSpectralSensitivity()->Capacity() > 0)
+                {
+                    m_AcquiCorrectionParameters->SetWavelengthSpectralBand(imageMetadataInterface->GetSpectralSensitivity());
+                    
+                }
+          else
+                {
+                    otbMsgDevMacro(<< "use dummy filter");
+                    WavelengthSpectralBandVectorType spectralDummy;
+                    spectralDummy->Clear();
+                    for (unsigned int i = 0; i < this->GetInput()->GetNumberOfComponentsPerPixel(); ++i)
+                      {
+                        spectralDummy->PushBack(FilterFunctionValuesType::New());
+                      }
+                    m_AcquiCorrectionParameters->SetWavelengthSpectralBand(spectralDummy);
+                }
+
+      }
+
+  m_AtmosphericRadiativeTerms = CorrectionParametersToRadiativeTermsType::Compute(m_AtmoCorrectionParameters,m_AcquiCorrectionParameters);
 }
 
 
 template <class TInputImage, class TOutputImage>
 void
 SurfaceReflectanceToReflectanceFilter<TInputImage, TOutputImage>
-::GenerateOutputInformation()
+::BeforeThreadedGenerateData()
 {
-  Superclass::GenerateOutputInformation();
+  Superclass::BeforeThreadedGenerateData();
   if(m_UseGenerateParameters)
     this->GenerateParameters();
 }
@@ -131,6 +111,15 @@ SurfaceReflectanceToReflectanceFilter<TInputImage, TOutputImage>
 template <class TInputImage, class TOutputImage>
 void
 SurfaceReflectanceToReflectanceFilter<TInputImage, TOutputImage>
+::Modified()
+{
+  Superclass::Modified();
+  m_FunctorParametersHaveBeenComputed  = false;
+}
+
+template <class TInputImage, class TOutputImage>
+void
+SurfaceReflectanceToReflectanceFilter<TInputImage, TOutputImage>
 ::UpdateFunctors()
 {
   //this->GetFunctor().clear();
@@ -162,12 +151,18 @@ void
 SurfaceReflectanceToReflectanceFilter<TInputImage, TOutputImage>
 ::GenerateParameters()
 {
-  if(m_IsSetAtmosphericRadiativeTerms==false)
+
+  if (!m_IsSetAtmosphericRadiativeTerms)
     {
-      this->UpdateAtmosphericRadiativeTerms();
+    this->UpdateAtmosphericRadiativeTerms();
+    m_IsSetAtmosphericRadiativeTerms=true;
     }
 
-  this->UpdateFunctors();
+  if (!m_FunctorParametersHaveBeenComputed)
+    {
+    this->UpdateFunctors();
+    m_FunctorParametersHaveBeenComputed = true;
+    }
 }
 
 }
diff --git a/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.txx b/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.txx
index 27aaaae..fd25930 100644
--- a/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.txx
+++ b/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.txx
@@ -149,7 +149,7 @@ ImageMultiSegmentationToRCC8GraphFilter<TInputImage, TOutputGraph>
   typedef PolygonToPolygonRCC8Calculator<PathType>           RCC8CalculatorType;
   typedef RCC8VertexIterator<OutputGraphType>                VertexIteratorType;
   typedef RCC8InEdgeIterator<OutputGraphType>                InEdgeIteratorType;
-  typedef RCC8OutEdgeIterator<OutputGraphType>               OutEdgeIteratorType;
+
 
   // Vector of label
   std::vector<PixelType> maxLabelVector;
diff --git a/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx b/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx
index d2e1113..3b05447 100644
--- a/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx
+++ b/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx
@@ -337,7 +337,7 @@ ImageToImageRCC8Calculator<TInputImage>
 {
   /// Definition of the filters used
   typedef itk::AndImageFilter<BoolImageType, BoolImageType, BoolImageType> AndFilterType;
-  typedef itk::MinimumMaximumImageCalculator<BoolImageType>                MinMaxCalculatorType;
+
   /// Declaration and instantiation
   typename AndFilterType::Pointer andFilter = AndFilterType::New();
   /// The exterior is the inverted input image
diff --git a/Code/Testing/otbCurlHelperStub.cxx b/Code/Testing/otbCurlHelperStub.cxx
index 802f94a..29ba958 100644
--- a/Code/Testing/otbCurlHelperStub.cxx
+++ b/Code/Testing/otbCurlHelperStub.cxx
@@ -25,7 +25,7 @@
 namespace otb
 {
 
-bool CurlHelperStub::TestUrlAvailability(const std::string& url) const
+bool CurlHelperStub::TestUrlAvailability(const std::string& itkNotUsed(url)) const
 {
   itkExceptionMacro(<< "otbCurlHelperStub: method undefined");
   return -1;
@@ -84,14 +84,14 @@ int CurlHelperStub::RetrieveFile(const std::ostringstream& urlStream, std::strin
   return -1;
 }
 
-int CurlHelperStub::RetrieveFile(const std::string& urlString, std::string filename) const
+int CurlHelperStub::RetrieveFile(const std::string& itkNotUsed(urlString), std::string itkNotUsed(filename)) const
 {
   itkExceptionMacro(<< "otbCurlHelperStub: method undefined");
   return -1;
 }
 
-int CurlHelperStub::RetrieveFileMulti(const std::vector<std::string>& listURLs,
-                                      const std::vector<std::string>& listFiles, int maxConnect) const
+int CurlHelperStub::RetrieveFileMulti(const std::vector<std::string>& itkNotUsed(listURLs),
+                                      const std::vector<std::string>& itkNotUsed(listFiles), int itkNotUsed(maxConnect)) const
 {
   itkExceptionMacro(<< "otbCurlHelperStub: method undefined");
   return -1;
diff --git a/Code/Testing/otbCurlHelperStub.h b/Code/Testing/otbCurlHelperStub.h
index ea0a5fb..659d908 100644
--- a/Code/Testing/otbCurlHelperStub.h
+++ b/Code/Testing/otbCurlHelperStub.h
@@ -29,7 +29,7 @@ namespace otb
  * This class is available only for testing purposes
  *
  */
-class ITK_EXPORT CurlHelperStub : public CurlHelperInterface
+class ITK_ABI_EXPORT CurlHelperStub : public CurlHelperInterface
 {
 public:
   /** Standard class typedefs. */
diff --git a/Code/Testing/otbTestHelper.cxx b/Code/Testing/otbTestHelper.cxx
index a3db84e..963c53d 100644
--- a/Code/Testing/otbTestHelper.cxx
+++ b/Code/Testing/otbTestHelper.cxx
@@ -594,8 +594,6 @@ int TestHelper::RegressionTestImage(int cpt, const char *testImageFilename, cons
   // Use the factory mechanism to read the test and baseline files and convert them to double
 
   typedef otb::VectorImage<double, 2>        ImageType;
-  typedef otb::VectorImage<unsigned char, 2> OutputType;
-  typedef otb::VectorImage<unsigned char, 2> DiffOutputType;
   typedef otb::ImageFileReader<ImageType>    ReaderType;
 
   // Read the baseline file
@@ -662,7 +660,6 @@ int TestHelper::RegressionTestImage(int cpt, const char *testImageFilename, cons
   if (status.GetSquaredNorm() > 0 && m_ReportErrors)
     {
     typedef otb::PrintableImageFilter<ImageType>               RescaleType;
-    typedef RescaleType::OutputImageType                       OutputType;
     typedef otb::ImageFileWriter<RescaleType::OutputImageType> WriterType;
 
     RescaleType::Pointer rescale = RescaleType::New();
@@ -1536,6 +1533,8 @@ void TestHelper::AddWhiteSpace(const std::string& strIn, std::string &strOut) co
   keys.push_back("=");
   keys.push_back(":");
   keys.push_back(";");
+  keys.push_back("</");
+  keys.push_back(">");
 
   std::vector<std::string> keysOut;
   keysOut.push_back("[ ");
@@ -1546,6 +1545,9 @@ void TestHelper::AddWhiteSpace(const std::string& strIn, std::string &strOut) co
   keysOut.push_back(" = ");
   keysOut.push_back(" : ");
   keysOut.push_back(" , ");
+  keysOut.push_back(" </");
+  keysOut.push_back("> ");
+
 
   for (unsigned int it = 0; it < keys.size(); ++it)
     {
@@ -1604,7 +1606,6 @@ bool TestHelper::CompareLines(const std::string& strfileref,
     buffstreamTest >> strTest;
     //otbMsgDevMacro(<< "sub comparison of the line, strRef: " << strRef << " || strTest: " << strTest);
 
-    bool        chgt = false;
     std::string charTmpRef = "";
     std::string charTmpTest = "";
 
@@ -1683,7 +1684,6 @@ bool TestHelper::CompareLines(const std::string& strfileref,
             strCharTest = "";
             strNumRef = charTmpRef;
             strNumTest = charTmpTest;
-            chgt = true;
             }
           // Case where there's a character after numbers.
           else if ((etatCour == ETAT_CHAR) && (etatPrec == ETAT_NUM))
@@ -1706,7 +1706,6 @@ bool TestHelper::CompareLines(const std::string& strfileref,
             strNumTest = "";
             strCharRef = charTmpRef;
             strCharTest = charTmpTest;
-            chgt = true;
             }
           else if (etatCour == etatPrec)
             {
@@ -1726,36 +1725,32 @@ bool TestHelper::CompareLines(const std::string& strfileref,
           ++i;
           }
 
-        // Simpliest case : string characters or numeric value between 2 separators
-        if (!chgt)
+        // test last part
+        if (etatCour == ETAT_CHAR)
           {
-          if (isNumeric(strRef))
+          if (strCharRef != strCharTest)
             {
-
-            if ((strRef != strTest) && (vcl_abs(atof(strRef.c_str())) > m_EpsilonBoundaryChecking)
-                && (vcl_abs(atof(strRef.c_str()) - atof(strTest.c_str()))
-                    > epsilon * vcl_abs(atof(strRef.c_str()))))    //epsilon as relative error
+            if (m_ReportErrors)
               {
-              if (m_ReportErrors)
-                {
-                fluxfilediff << "Diff at line " << numLine << " : vcl_abs( (" << strRef << ") - (" << strTest
-                             << ") ) > " << epsilon << std::endl;
-                differenceFoundInCurrentLine = true;
-                }
-              nbdiff++;
+              fluxfilediff << "Diff at line " << numLine << " : " << strCharRef << " != " << strCharTest << std::endl;
+              differenceFoundInCurrentLine = true;
               }
+            nbdiff++;
             }
-          else
+          }
+        else
+          {
+          if ((strNumRef != strNumTest) && (vcl_abs(atof(strNumRef.c_str())) > m_EpsilonBoundaryChecking)
+              && (vcl_abs(atof(strNumRef.c_str()) - atof(strNumTest.c_str()))
+                  > epsilon * vcl_abs(atof(strNumRef.c_str()))))    //epsilon as relative error
             {
-            if (strRef != strTest)
+            if (m_ReportErrors)
               {
-              if (m_ReportErrors)
-                {
-                fluxfilediff << "Diff at line " << numLine << " : " << strRef << " != " << strTest << std::endl;
-                differenceFoundInCurrentLine = true;
-                }
-              nbdiff++;
+              fluxfilediff << "Diff at line " << numLine << " : vcl_abs( (" << strNumRef << ") - (" << strNumTest
+                            << ") ) > " << epsilon << std::endl;
+              differenceFoundInCurrentLine = true;
               }
+            nbdiff++;
             }
           }
         } // else
diff --git a/Code/Testing/otbTestHelper.h b/Code/Testing/otbTestHelper.h
index 723c915..e3ea928 100644
--- a/Code/Testing/otbTestHelper.h
+++ b/Code/Testing/otbTestHelper.h
@@ -39,7 +39,7 @@ namespace otb
  * \class TestHelper
  * \brief Helper class to perform the baseline comparisons during the tests
  */
-class /*ITK_EXPORT*/ TestHelper : public itk::Object
+class ITK_ABI_EXPORT TestHelper : public itk::Object
 {
 public:
 
diff --git a/Code/Testing/otbTestMain.h b/Code/Testing/otbTestMain.h
index 5757daf..4293417 100644
--- a/Code/Testing/otbTestMain.h
+++ b/Code/Testing/otbTestMain.h
@@ -72,8 +72,6 @@ int main(int ac, char* av[])
   double epsilonBoundary(0.0);
 
   typedef otb::TestHelper::StringList   StringList;
-  typedef otb::TestHelper::StringListIt StringListIt;
-
   StringList baselineFilenamesBinary;
   StringList testFilenamesBinary;
   StringList baselineFilenamesMetaData;
diff --git a/Code/UtilitiesAdapters/CurlAdapters/otbCurlHelper.cxx b/Code/UtilitiesAdapters/CurlAdapters/otbCurlHelper.cxx
index 49b631b..bae7e15 100644
--- a/Code/UtilitiesAdapters/CurlAdapters/otbCurlHelper.cxx
+++ b/Code/UtilitiesAdapters/CurlAdapters/otbCurlHelper.cxx
@@ -350,8 +350,9 @@ int CurlHelper::RetrieveFile(const std::string& urlString, std::string filename)
 
 int CurlHelper::RetrieveFileMulti(const std::vector<std::string>& listURLs,
                                   const std::vector<std::string>& listFilename,
-                                  int maxConnect) const
+                                  int itkNotUsed(maxConnect)) const
 {
+
 #ifdef OTB_USE_CURL
 #if 0
 //#ifdef OTB_CURL_MULTI_AVAILABLE
@@ -531,7 +532,7 @@ size_t CurlHelper::CallbackWriteDataToStringStream(void *ptr, size_t size, size_
   return size * nmemb;
 }
 
-size_t CurlHelper::CallbackWriteDataDummy(void *ptr, size_t size, size_t nmemb, void *data)
+size_t CurlHelper::CallbackWriteDataDummy(void *itkNotUsed(ptr), size_t size, size_t nmemb, void *itkNotUsed(data))
 {
   return size * nmemb;
 }
diff --git a/Code/UtilitiesAdapters/ITKPendingPatches/itkHistogramToTextureFeaturesFilter.h b/Code/UtilitiesAdapters/ITKPendingPatches/itkHistogramToTextureFeaturesFilter.h
deleted file mode 100644
index 20df8e5..0000000
--- a/Code/UtilitiesAdapters/ITKPendingPatches/itkHistogramToTextureFeaturesFilter.h
+++ /dev/null
@@ -1,232 +0,0 @@
-/*=========================================================================
- *
- *  Copyright Insight Software Consortium
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0.txt
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *=========================================================================*/
-#ifndef __itkHistogramToTextureFeaturesFilter_h
-#define __itkHistogramToTextureFeaturesFilter_h
-
-#include "itkHistogram.h"
-#include "itkMacro.h"
-#include "itkProcessObject.h"
-#include "itkSimpleDataObjectDecorator.h"
-
-namespace itk
-{
-namespace Statistics
-{
-/** \class HistogramToTextureFeaturesFilter
-*  \brief This class computes texture feature coefficients from a grey level
-* co-occurrence matrix.
-*
-* This class computes features that summarize image texture, given a grey level
-* co-occurrence matrix (generated by a ScalarImageToGreyLevelCooccurrenceMatrixGenerator
-* or related class).
-*
-* The features calculated are as follows (where \f$ g(i, j) \f$ is the element in
-* cell i, j of a a normalized GLCM):
-*
-* "Energy" \f$ = f_1 = \sum_{i,j}g(i, j)^2 \f$
-*
-* "Entropy" \f$ = f_2 = -\sum_{i,j}g(i, j) \log_2 g(i, j)\f$, or 0 if \f$g(i, j) = 0\f$
-*
-* "Correlation" \f$ = f_3 = \sum_{i,j}\frac{(i - \mu)(j - \mu)g(i, j)}{\sigma^2} \f$
-*
-* "Difference Moment" \f$= f_4 = \sum_{i,j}\frac{1}{1 + (i - j)^2}g(i, j) \f$
-*
-* "Inertia" \f$ = f_5 = \sum_{i,j}(i - j)^2g(i, j) \f$ (sometimes called "contrast.")
-*
-* "Cluster Shade" \f$ = f_6 = \sum_{i,j}((i - \mu) + (j - \mu))^3 g(i, j) \f$
-*
-* "Cluster Prominence" \f$ = f_7 = \sum_{i,j}((i - \mu) + (j - \mu))^4 g(i, j) \f$
-*
-* "Haralick's Correlation" \f$ = f_8 = \frac{\sum_{i,j}(i, j) g(i, j) -\mu_t^2}{\sigma_t^2} \f$
-* where \f$\mu_t\f$ and \f$\sigma_t\f$ are the mean and standard deviation of the row
-* (or column, due to symmetry) sums.
-*
-* Above, \f$ \mu =  \f$ (weighted pixel average) \f$ = \sum_{i,j}i \cdot g(i, j) =
-* \sum_{i,j}j \cdot g(i, j) \f$ (due to matrix summetry), and
-*
-* \f$ \sigma =  \f$ (weighted pixel variance) \f$ = \sum_{i,j}(i - \mu)^2 \cdot g(i, j) =
-* \sum_{i,j}(j - \mu)^2 \cdot g(i, j)  \f$  (due to matrix summetry)
-*
-* A good texture feature set to use is the Conners, Trivedi and Harlow set:
-* features 1, 2, 4, 5, 6, and 7. There is some correlation between the various
-* features, so using all of them at the same time is not necessarialy a good idea.
-*
-* NOTA BENE: The input histogram will be forcably normalized!
-* This algorithm takes three passes through the input
-* histogram if the histogram was already normalized, and four if not.
-*
-* Web references:
-*
-* http://www.cssip.uq.edu.au/meastex/www/algs/algs/algs.html
-* http://www.ucalgary.ca/~mhallbey/texture/texture_tutorial.html
-*
-* Print references:
-*
-* Haralick, R.M., K. Shanmugam and I. Dinstein. 1973.  Textural Features for
-* Image Classification. IEEE Transactions on Systems, Man and Cybernetics.
-* SMC-3(6):610-620.
-*
-* Haralick, R.M. 1979. Statistical and Structural Approaches to Texture.
-* Proceedings of the IEEE, 67:786-804.
-*
-* R.W. Conners and C.A. Harlow. A Theoretical Comaprison of Texture Algorithms.
-* IEEE Transactions on Pattern Analysis and Machine Intelligence,  2:204-222, 1980.
-*
-* R.W. Conners, M.M. Trivedi, and C.A. Harlow. Segmentation of a High-Resolution
-* Urban Scene using Texture  Operators. Computer Vision, Graphics and Image
-* Processing, 25:273-310,  1984.
-*
-* \sa ScalarImageToGreyLevelCooccurrenceMatrixGenerator
-* \sa MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator
-* \sa ScalarImageTextureCalculator
-*
-* Author: Zachary Pincus
-* \ingroup ITKStatistics
-*/
-
-template< class THistogram >
-class ITK_EXPORT HistogramToTextureFeaturesFilter:public ProcessObject
-{
-public:
-  /** Standard typedefs */
-  typedef HistogramToTextureFeaturesFilter Self;
-  typedef ProcessObject                    Superclass;
-  typedef SmartPointer< Self >             Pointer;
-  typedef SmartPointer< const Self >       ConstPointer;
-
-  /** Run-time type information (and related methods). */
-  itkTypeMacro(HistogramToTextureFeaturesFilter, ProcessObject);
-
-  /** standard New() method support */
-  itkNewMacro(Self);
-
-  typedef THistogram                                    HistogramType;
-  typedef typename HistogramType::Pointer               HistogramPointer;
-  typedef typename HistogramType::ConstPointer          HistogramConstPointer;
-  typedef typename HistogramType::MeasurementType       MeasurementType;
-  typedef typename HistogramType::MeasurementVectorType MeasurementVectorType;
-  typedef typename HistogramType::IndexType             IndexType;
-  typedef typename HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType;
-  typedef typename HistogramType::RelativeFrequencyType RelativeFrequencyType;
-
-  typedef typename HistogramType::TotalAbsoluteFrequencyType
-  TotalAbsoluteFrequencyType;
-
-  typedef typename HistogramType::TotalRelativeFrequencyType
-  TotalRelativeFrequencyType;
-
-  /** Container to hold relative frequencies of the histogram */
-  typedef std::vector< RelativeFrequencyType > RelativeFrequencyContainerType;
-
-  /** Method to Set/Get the input Histogram */
-  using Superclass::SetInput;
-  void SetInput(const HistogramType *histogram);
-
-  const HistogramType * GetInput() const;
-
-  /** Smart Pointer type to a DataObject. */
-  typedef DataObject::Pointer DataObjectPointer;
-
-  /** Type of DataObjects used for scalar outputs */
-  typedef SimpleDataObjectDecorator< MeasurementType > MeasurementObjectType;
-
-  /** Return energy texture value. */
-  MeasurementType GetEnergy() const;
-
-  const MeasurementObjectType * GetEnergyOutput() const;
-
-  /** Return entropy texture value. */
-  MeasurementType GetEntropy() const;
-
-  const MeasurementObjectType * GetEntropyOutput() const;
-
-  /** return correlation texture value. */
-  MeasurementType GetCorrelation() const;
-
-  const MeasurementObjectType * GetCorrelationOutput() const;
-
-  /** Return inverse difference moment texture value. */
-  MeasurementType GetInverseDifferenceMoment() const;
-
-  const MeasurementObjectType * GetInverseDifferenceMomentOutput() const;
-
-  /** Return inertia texture value. */
-  MeasurementType GetInertia() const;
-
-  const MeasurementObjectType * GetInertiaOutput() const;
-
-  /** Return cluster shade texture value. */
-  MeasurementType GetClusterShade() const;
-
-  const MeasurementObjectType * GetClusterShadeOutput() const;
-
-  /** Return cluster prominence texture value. */
-  MeasurementType GetClusterProminence() const;
-
-  const MeasurementObjectType * GetClusterProminenceOutput() const;
-
-  /** Return Haralick correlation texture value. */
-  MeasurementType GetHaralickCorrelation() const;
-
-  const MeasurementObjectType * GetHaralickCorrelationOutput() const;
-
-  /** Texture feature types */
-  typedef enum {
-    Energy,
-    Entropy,
-    Correlation,
-    InverseDifferenceMoment,
-    Inertia,
-    ClusterShade,
-    ClusterProminence,
-    HaralickCorrelation,
-    InvalidFeatureName
-    }  TextureFeatureName;
-
-  /** convenience method to access the texture values */
-  MeasurementType GetFeature(TextureFeatureName name);
-
-protected:
-  HistogramToTextureFeaturesFilter();
-  ~HistogramToTextureFeaturesFilter() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
-
-  /** Make a DataObject to be used for output output. */
-  typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
-  using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType);
-
-  void GenerateData();
-
-private:
-  HistogramToTextureFeaturesFilter(const Self &); //purposely not implemented
-  void operator=(const Self &);                   //purposely not implemented
-
-  void ComputeMeansAndVariances(double & pixelMean, double & marginalMean,
-                                double & marginalDevSquared, double & pixelVariance);
-
-  RelativeFrequencyContainerType m_RelativeFrequencyContainer;
-};
-} // end of namespace Statistics
-} // end of namespace itk
-
-#ifndef ITK_MANUAL_INSTANTIATION
-#include "itkHistogramToTextureFeaturesFilter.hxx"
-#endif
-
-#endif
diff --git a/Code/UtilitiesAdapters/ITKPendingPatches/itkHistogramToTextureFeaturesFilter.hxx b/Code/UtilitiesAdapters/ITKPendingPatches/itkHistogramToTextureFeaturesFilter.hxx
deleted file mode 100644
index 422dab2..0000000
--- a/Code/UtilitiesAdapters/ITKPendingPatches/itkHistogramToTextureFeaturesFilter.hxx
+++ /dev/null
@@ -1,448 +0,0 @@
-/*=========================================================================
- *
- *  Copyright Insight Software Consortium
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0.txt
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *=========================================================================*/
-#ifndef __itkHistogramToTextureFeaturesFilter_hxx
-#define __itkHistogramToTextureFeaturesFilter_hxx
-
-#include "itkHistogramToTextureFeaturesFilter.h"
-
-#include "itkNumericTraits.h"
-#include "vnl/vnl_math.h"
-
-namespace itk
-{
-namespace Statistics
-{
-//constructor
-template< class THistogram >
-HistogramToTextureFeaturesFilter< THistogram >::HistogramToTextureFeaturesFilter(void)
-{
-  this->ProcessObject::SetNumberOfRequiredInputs(1);
-
-  // allocate the data objects for the outputs which are
-  // just decorators real types
-  for ( int i = 0; i < 8; ++i )
-    {
-    this->ProcessObject::SetNthOutput( i, this->MakeOutput(i) );
-    }
-}
-
-template< class THistogram >
-void
-HistogramToTextureFeaturesFilter< THistogram >
-::SetInput(const HistogramType *histogram)
-{
-  this->ProcessObject::SetNthInput( 0, const_cast< HistogramType * >( histogram ) );
-}
-
-template< class THistogram >
-const typename
-HistogramToTextureFeaturesFilter< THistogram >::HistogramType *
-HistogramToTextureFeaturesFilter< THistogram >
-::GetInput() const
-{
-  return itkDynamicCastInDebugMode< const HistogramType * >( this->GetPrimaryInput() );
-}
-
-template< class THistogram >
-typename
-HistogramToTextureFeaturesFilter< THistogram >::DataObjectPointer
-HistogramToTextureFeaturesFilter< THistogram >
-::MakeOutput( DataObjectPointerArraySizeType itkNotUsed(idx) )
-{
-  return MeasurementObjectType::New().GetPointer();
-}
-
-template< class THistogram >
-void
-HistogramToTextureFeaturesFilter< THistogram >::GenerateData(void)
-{
-  typedef typename HistogramType::ConstIterator HistogramIterator;
-
-  const HistogramType *inputHistogram = this->GetInput();
-
-  //Normalize the absolute frequencies and populate the relative frequency
-  //container
-  TotalRelativeFrequencyType totalFrequency =
-    static_cast< TotalRelativeFrequencyType >( inputHistogram->GetTotalFrequency() );
-
-  m_RelativeFrequencyContainer.clear();
-
-  for ( HistogramIterator hit = inputHistogram->Begin();
-        hit != inputHistogram->End(); ++hit )
-    {
-    AbsoluteFrequencyType frequency = hit.GetFrequency();
-    RelativeFrequencyType relativeFrequency =  frequency / totalFrequency;
-    m_RelativeFrequencyContainer.push_back(relativeFrequency);
-    }
-
-  // Now get the various means and variances. This is takes two passes
-  // through the histogram.
-  double pixelMean;
-  double marginalMean;
-  double marginalDevSquared;
-  double pixelVariance;
-
-  this->ComputeMeansAndVariances(pixelMean, marginalMean, marginalDevSquared,
-                                 pixelVariance);
-
-  // Finally compute the texture features. Another one pass.
-  MeasurementType energy      = NumericTraits< MeasurementType >::Zero;
-  MeasurementType entropy     = NumericTraits< MeasurementType >::Zero;
-  MeasurementType correlation = NumericTraits< MeasurementType >::Zero;
-
-  MeasurementType inverseDifferenceMoment      =
-    NumericTraits< MeasurementType >::Zero;
-
-  MeasurementType inertia             = NumericTraits< MeasurementType >::Zero;
-  MeasurementType clusterShade        = NumericTraits< MeasurementType >::Zero;
-  MeasurementType clusterProminence   = NumericTraits< MeasurementType >::Zero;
-  MeasurementType haralickCorrelation = NumericTraits< MeasurementType >::Zero;
-
-  double pixelVarianceSquared = pixelVariance * pixelVariance;
-
-  // Variance is only used in correlation. If variance is 0, then (index[0] - pixelMean) * (index[1] - pixelMean)
-  // should be zero as well. In this case, set the variance to 1. in order to avoid NaN correlation.
-  if(pixelVarianceSquared < 0.0001)
-    {
-    pixelVarianceSquared = 1.;
-    }
-
-  double log2 = vcl_log(2.0);
-
-  typename RelativeFrequencyContainerType::const_iterator rFreqIterator =
-    m_RelativeFrequencyContainer.begin();
-
-  for ( HistogramIterator hit = inputHistogram->Begin();
-        hit != inputHistogram->End(); ++hit )
-    {
-    RelativeFrequencyType frequency = *rFreqIterator;
-    ++rFreqIterator;
-    if ( frequency == 0 )
-      {
-      continue; // no use doing these calculations if we're just multiplying by
-                // zero.
-      }
-
-    IndexType index = inputHistogram->GetIndex( hit.GetInstanceIdentifier() );
-    energy += frequency * frequency;
-    entropy -= ( frequency > 0.0001 ) ? frequency *vcl_log(frequency) / log2:0;
-    correlation += ( ( index[0] - pixelMean ) * ( index[1] - pixelMean ) * frequency )
-                   / pixelVarianceSquared;
-    inverseDifferenceMoment += frequency
-                               / ( 1.0 + ( index[0] - index[1] ) * ( index[0] - index[1] ) );
-    inertia += ( index[0] - index[1] ) * ( index[0] - index[1] ) * frequency;
-    clusterShade += vcl_pow( ( index[0] - pixelMean ) + ( index[1] - pixelMean ), 3 )
-                    * frequency;
-    clusterProminence += vcl_pow( ( index[0] - pixelMean ) + ( index[1] - pixelMean ), 4 )
-                         * frequency;
-    haralickCorrelation += index[0] * index[1] * frequency;
-    }
-
-  haralickCorrelation = ( haralickCorrelation - marginalMean * marginalMean )
-                        / marginalDevSquared;
-
-  MeasurementObjectType *energyOutputObject =
-    static_cast< MeasurementObjectType * >( this->ProcessObject::GetOutput(0) );
-  energyOutputObject->Set(energy);
-
-  MeasurementObjectType *entropyOutputObject =
-    static_cast< MeasurementObjectType * >( this->ProcessObject::GetOutput(1) );
-  entropyOutputObject->Set(entropy);
-
-  MeasurementObjectType *correlationOutputObject =
-    static_cast< MeasurementObjectType * >( this->ProcessObject::GetOutput(2) );
-  correlationOutputObject->Set(correlation);
-
-  MeasurementObjectType *inverseDifferenceMomentOutputObject =
-    static_cast< MeasurementObjectType * >( this->ProcessObject::GetOutput(3) );
-  inverseDifferenceMomentOutputObject->Set(inverseDifferenceMoment);
-
-  MeasurementObjectType *inertiaOutputObject =
-    static_cast< MeasurementObjectType * >( this->ProcessObject::GetOutput(4) );
-  inertiaOutputObject->Set(inertia);
-
-  MeasurementObjectType *clusterShadeOutputObject =
-    static_cast< MeasurementObjectType * >( this->ProcessObject::GetOutput(5) );
-  clusterShadeOutputObject->Set(clusterShade);
-
-  MeasurementObjectType *clusterProminenceOutputObject =
-    static_cast< MeasurementObjectType * >( this->ProcessObject::GetOutput(6) );
-  clusterProminenceOutputObject->Set(clusterProminence);
-
-  MeasurementObjectType *haralickCorrelationOutputObject =
-    static_cast< MeasurementObjectType * >( this->ProcessObject::GetOutput(7) );
-  haralickCorrelationOutputObject->Set(haralickCorrelation);
-}
-
-template< class THistogram >
-void
-HistogramToTextureFeaturesFilter< THistogram >::ComputeMeansAndVariances(double & pixelMean,
-                                                                         double & marginalMean,
-                                                                         double & marginalDevSquared,
-                                                                         double & pixelVariance)
-{
-  // This function takes two passes through the histogram and two passes through
-  // an array of the same length as a histogram axis. This could probably be
-  // cleverly compressed to one pass, but it's not clear that that's necessary.
-
-  typedef typename HistogramType::ConstIterator HistogramIterator;
-
-  const HistogramType *inputHistogram =  this->GetInput();
-
-  // Initialize everything
-  typename HistogramType::SizeValueType binsPerAxis = inputHistogram->GetSize(0);
-  double *marginalSums = new double[binsPerAxis];
-  for ( double *ms_It = marginalSums;
-        ms_It < marginalSums + binsPerAxis; ms_It++ )
-    {
-    *ms_It = 0;
-    }
-  pixelMean = 0;
-
-  typename RelativeFrequencyContainerType::const_iterator rFreqIterator =
-    m_RelativeFrequencyContainer.begin();
-
-  // Ok, now do the first pass through the histogram to get the marginal sums
-  // and compute the pixel mean
-  HistogramIterator hit = inputHistogram->Begin();
-  while ( hit != inputHistogram->End() )
-    {
-    RelativeFrequencyType frequency = *rFreqIterator;
-    IndexType             index = inputHistogram->GetIndex( hit.GetInstanceIdentifier() );
-    pixelMean += index[0] * frequency;
-    marginalSums[index[0]] += frequency;
-    ++hit;
-    ++rFreqIterator;
-    }
-
-  /*  Now get the mean and deviaton of the marginal sums.
-      Compute incremental mean and SD, a la Knuth, "The  Art of Computer
-      Programming, Volume 2: Seminumerical Algorithms",  section 4.2.2.
-      Compute mean and standard deviation using the recurrence relation:
-      M(1) = x(1), M(k) = M(k-1) + (x(k) - M(k-1) ) / k
-      S(1) = 0, S(k) = S(k-1) + (x(k) - M(k-1)) * (x(k) - M(k))
-      for 2 <= k <= n, then
-      sigma = vcl_sqrt(S(n) / n) (or divide by n-1 for sample SD instead of
-      population SD).
-  */
-  marginalMean = marginalSums[0];
-  marginalDevSquared = 0;
-  for ( unsigned int arrayIndex = 1; arrayIndex < binsPerAxis; arrayIndex++ )
-    {
-    int    k = arrayIndex + 1;
-    double M_k_minus_1 = marginalMean;
-    double S_k_minus_1 = marginalDevSquared;
-    double x_k = marginalSums[arrayIndex];
-
-    double M_k = M_k_minus_1 + ( x_k - M_k_minus_1 ) / k;
-    double S_k = S_k_minus_1 + ( x_k - M_k_minus_1 ) * ( x_k - M_k );
-
-    marginalMean = M_k;
-    marginalDevSquared = S_k;
-    }
-  marginalDevSquared = marginalDevSquared / binsPerAxis;
-
-  rFreqIterator = m_RelativeFrequencyContainer.begin();
-  // OK, now compute the pixel variances.
-  pixelVariance = 0;
-  for ( hit = inputHistogram->Begin(); hit != inputHistogram->End(); ++hit )
-    {
-    RelativeFrequencyType frequency = *rFreqIterator;
-    IndexType             index = inputHistogram->GetIndex( hit.GetInstanceIdentifier() );
-    pixelVariance += ( index[0] - pixelMean ) * ( index[0] - pixelMean ) * frequency;
-    ++rFreqIterator;
-    }
-
-  delete[] marginalSums;
-}
-
-template< class THistogram >
-const
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementObjectType *
-HistogramToTextureFeaturesFilter< THistogram >
-::GetEnergyOutput() const
-{
-  return static_cast< const MeasurementObjectType * >( this->ProcessObject::GetOutput(0) );
-}
-
-template< class THistogram >
-const
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementObjectType *
-HistogramToTextureFeaturesFilter< THistogram >
-::GetEntropyOutput() const
-{
-  return static_cast< const MeasurementObjectType * >( this->ProcessObject::GetOutput(1) );
-}
-
-template< class THistogram >
-const
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementObjectType *
-HistogramToTextureFeaturesFilter< THistogram >
-::GetCorrelationOutput() const
-{
-  return static_cast< const MeasurementObjectType * >( this->ProcessObject::GetOutput(2) );
-}
-
-template< class THistogram >
-const
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementObjectType *
-HistogramToTextureFeaturesFilter< THistogram >
-::GetInverseDifferenceMomentOutput() const
-{
-  return static_cast< const MeasurementObjectType * >( this->ProcessObject::GetOutput(3) );
-}
-
-template< class THistogram >
-const
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementObjectType *
-HistogramToTextureFeaturesFilter< THistogram >
-::GetInertiaOutput() const
-{
-  return static_cast< const MeasurementObjectType * >( this->ProcessObject::GetOutput(4) );
-}
-
-template< class THistogram >
-const
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementObjectType *
-HistogramToTextureFeaturesFilter< THistogram >
-::GetClusterShadeOutput() const
-{
-  return static_cast< const MeasurementObjectType * >( this->ProcessObject::GetOutput(5) );
-}
-
-template< class THistogram >
-const
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementObjectType *
-HistogramToTextureFeaturesFilter< THistogram >
-::GetClusterProminenceOutput() const
-{
-  return static_cast< const MeasurementObjectType * >( this->ProcessObject::GetOutput(6) );
-}
-
-template< class THistogram >
-const
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementObjectType *
-HistogramToTextureFeaturesFilter< THistogram >
-::GetHaralickCorrelationOutput() const
-{
-  return static_cast< const MeasurementObjectType * >( this->ProcessObject::GetOutput(7) );
-}
-
-template< class THistogram >
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementType
-HistogramToTextureFeaturesFilter< THistogram >
-::GetEnergy() const
-{
-  return this->GetEnergyOutput()->Get();
-}
-
-template< class THistogram >
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementType
-HistogramToTextureFeaturesFilter< THistogram >
-::GetEntropy() const
-{
-  return this->GetEntropyOutput()->Get();
-}
-
-template< class THistogram >
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementType
-HistogramToTextureFeaturesFilter< THistogram >
-::GetCorrelation() const
-{
-  return this->GetCorrelationOutput()->Get();
-}
-
-template< class THistogram >
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementType
-HistogramToTextureFeaturesFilter< THistogram >
-::GetInverseDifferenceMoment() const
-{
-  return this->GetInverseDifferenceMomentOutput()->Get();
-}
-
-template< class THistogram >
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementType
-HistogramToTextureFeaturesFilter< THistogram >
-::GetInertia() const
-{
-  return this->GetInertiaOutput()->Get();
-}
-
-template< class THistogram >
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementType
-HistogramToTextureFeaturesFilter< THistogram >
-::GetClusterShade() const
-{
-  return this->GetClusterShadeOutput()->Get();
-}
-
-template< class THistogram >
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementType
-HistogramToTextureFeaturesFilter< THistogram >
-::GetClusterProminence() const
-{
-  return this->GetClusterProminenceOutput()->Get();
-}
-
-template< class THistogram >
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementType
-HistogramToTextureFeaturesFilter< THistogram >
-::GetHaralickCorrelation() const
-{
-  return this->GetHaralickCorrelationOutput()->Get();
-}
-
-template< class THistogram >
-typename HistogramToTextureFeaturesFilter< THistogram >::MeasurementType
-HistogramToTextureFeaturesFilter< THistogram >
-::GetFeature(TextureFeatureName feature)
-{
-  switch ( feature )
-    {
-    case Energy :
-      return this->GetEnergy();
-    case Entropy:
-      return this->GetEntropy();
-    case Correlation:
-      return this->GetCorrelation();
-    case InverseDifferenceMoment:
-      return this->GetInverseDifferenceMoment();
-    case Inertia:
-      return this->GetInertia();
-    case ClusterShade:
-      return this->GetClusterShade();
-    case ClusterProminence:
-      return this->GetClusterProminence();
-    case HaralickCorrelation:
-      return this->GetHaralickCorrelation();
-    default:
-      return 0;
-    }
-}
-
-template< class THistogram >
-void
-HistogramToTextureFeaturesFilter< THistogram >
-::PrintSelf(std::ostream & os, Indent indent) const
-{
-  Superclass::PrintSelf(os, indent);
-}
-} // end of namespace Statistics
-} // end of namespace itk
-
-#endif
diff --git a/Code/UtilitiesAdapters/ITKPendingPatches/otbWarpImageFilter.txx b/Code/UtilitiesAdapters/ITKPendingPatches/otbWarpImageFilter.txx
index ccf040c..1926ec5 100644
--- a/Code/UtilitiesAdapters/ITKPendingPatches/otbWarpImageFilter.txx
+++ b/Code/UtilitiesAdapters/ITKPendingPatches/otbWarpImageFilter.txx
@@ -35,7 +35,7 @@ template <class PixelType> unsigned int PixelSizeFinder(itk::VariableLengthVecto
 {
   return pix.Size();
 }
-template <class PixelType> unsigned int PixelSizeFinder(PixelType pix)
+template <class PixelType> unsigned int PixelSizeFinder(PixelType itkNotUsed(pix))
 {
   return PixelType::Dimension;
 }
diff --git a/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.cxx b/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.cxx
index 45b0dc1..31bc5ca 100644
--- a/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.cxx
+++ b/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.cxx
@@ -215,7 +215,7 @@ void otb::GeometriesToGeometriesFilter::GenerateData(void )
 
 /*virtual*/
 OGRSpatialReference* otb::GeometriesToGeometriesFilter::DoDefineNewLayerSpatialReference(
-  ogr::Layer const& source) const
+  ogr::Layer const& itkNotUsed(source)) const
 {
   return 0;
 }
@@ -229,7 +229,7 @@ OGRwkbGeometryType otb::GeometriesToGeometriesFilter::DoDefineNewLayerGeometryTy
 
 /*virtual*/
 std::vector<std::string> otb::GeometriesToGeometriesFilter::DoDefineNewLayerOptions(
-  ogr::Layer const& source) const
+  ogr::Layer const& itkNotUsed(source)) const
 {
   return std::vector<std::string>();
 }
diff --git a/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.h b/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.h
index d7dfa29..311c492 100644
--- a/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.h
+++ b/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.h
@@ -181,7 +181,7 @@ struct FieldCopyTransformation
    * \param[in] inoutFeature  \c Feature to change.
    * \throw Nothing
    */
-  void fieldsTransform(ogr::Feature const& inoutFeature) const
+    void fieldsTransform(ogr::Feature const& itkNotUsed(inoutFeature)) const
     {
     // default => do nothing for in-place transformation
     }
diff --git a/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.txx b/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.txx
index dddc59b..cfbacea 100644
--- a/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.txx
+++ b/Code/UtilitiesAdapters/OGRAdapters/otbGeometriesToGeometriesFilter.txx
@@ -98,7 +98,7 @@ inline
 void otb::TransformationFunctorDispatcher<TransformationFunctor,OGRGeometry,FieldTransformationPolicy>::operator()(
   otb::ogr::Layer & inout) const
 {
-  OGRFeatureDefn & defn = inout.GetLayerDefn();
+//  OGRFeatureDefn & defn = inout.GetLayerDefn();
   // NB: We can't iterate with begin()/end() as SetFeature may invalidate the
   // iterators depending of the underlying drivers
   // => we use start_at(), i.e. SetNextByIndex()
diff --git a/Code/UtilitiesAdapters/OGRAdapters/otbOGRDataSourceWrapper.cxx b/Code/UtilitiesAdapters/OGRAdapters/otbOGRDataSourceWrapper.cxx
index 25b1bd5..a424d83 100644
--- a/Code/UtilitiesAdapters/OGRAdapters/otbOGRDataSourceWrapper.cxx
+++ b/Code/UtilitiesAdapters/OGRAdapters/otbOGRDataSourceWrapper.cxx
@@ -686,7 +686,7 @@ void otb::ogr::DataSource::PrintSelf(
     }
 }
 
-/*virtual*/ void otb::ogr::DataSource::Graft(const itk::DataObject * data)
+/*virtual*/ void otb::ogr::DataSource::Graft(const itk::DataObject * itkNotUsed(data))
 {
   assert(! "Disabled to check if it makes sense...");
 }
diff --git a/Code/UtilitiesAdapters/OGRAdapters/otbOGRFeatureWrapper.txx b/Code/UtilitiesAdapters/OGRAdapters/otbOGRFeatureWrapper.txx
index d713e4a..f2200dd 100644
--- a/Code/UtilitiesAdapters/OGRAdapters/otbOGRFeatureWrapper.txx
+++ b/Code/UtilitiesAdapters/OGRAdapters/otbOGRFeatureWrapper.txx
@@ -145,10 +145,8 @@ void otb::ogr::Feature::SetGeometryDirectly(UniqueGeometryPtr geometry)
   CheckInvariants();
   OGRGeometry * g = geometry.get();
   UncheckedSetGeometryDirectly(otb::move(geometry));
-  assert(m_Feature->GetGeometryRef() == g && "The new geometry hasn't been set as expected");
-  assert(! geometry && "UniqueGeometryPtr hasn't released its pointer");
-  // avoid unused variable warning
-  g=NULL;
+  itkAssertOrThrowMacro((m_Feature->GetGeometryRef() == g), "The new geometry hasn't been set as expected");
+  itkAssertOrThrowMacro(!geometry, "UniqueGeometryPtr hasn't released its pointer");
 }
 
 inline
@@ -156,7 +154,7 @@ otb::ogr::UniqueGeometryPtr otb::ogr::Feature::StealGeometry()
 {
   CheckInvariants();
   UniqueGeometryPtr res = UncheckedStealGeometry();
-  assert(! m_Feature->GetGeometryRef() && "Geometry hasn't been properly stolen");
+  itkAssertOrThrowMacro(!m_Feature->GetGeometryRef(), "Geometry hasn't been properly stolen");
   return otb::move(res);
 }
 
diff --git a/Code/UtilitiesAdapters/OpenCVAdapters/otbBoostMachineLearningModel.txx b/Code/UtilitiesAdapters/OpenCVAdapters/otbBoostMachineLearningModel.txx
index d0b1cd9..98c69b5 100644
--- a/Code/UtilitiesAdapters/OpenCVAdapters/otbBoostMachineLearningModel.txx
+++ b/Code/UtilitiesAdapters/OpenCVAdapters/otbBoostMachineLearningModel.txx
@@ -148,7 +148,7 @@ BoostMachineLearningModel<TInputValue,TOutputValue>
 template <class TInputValue, class TOutputValue>
 bool
 BoostMachineLearningModel<TInputValue,TOutputValue>
-::CanWriteFile(const std::string & file)
+::CanWriteFile(const std::string & itkNotUsed(file))
 {
   return false;
 }
diff --git a/Code/UtilitiesAdapters/OpenCVAdapters/otbDecisionTreeMachineLearningModel.txx b/Code/UtilitiesAdapters/OpenCVAdapters/otbDecisionTreeMachineLearningModel.txx
index 0fab7fd..ffbc434 100644
--- a/Code/UtilitiesAdapters/OpenCVAdapters/otbDecisionTreeMachineLearningModel.txx
+++ b/Code/UtilitiesAdapters/OpenCVAdapters/otbDecisionTreeMachineLearningModel.txx
@@ -153,7 +153,7 @@ DecisionTreeMachineLearningModel<TInputValue,TOutputValue>
 template <class TInputValue, class TOutputValue>
 bool
 DecisionTreeMachineLearningModel<TInputValue,TOutputValue>
-::CanWriteFile(const std::string & file)
+::CanWriteFile(const std::string & itkNotUsed(file))
 {
   return false;
 }
diff --git a/Code/UtilitiesAdapters/OpenCVAdapters/otbGradientBoostedTreeMachineLearningModel.txx b/Code/UtilitiesAdapters/OpenCVAdapters/otbGradientBoostedTreeMachineLearningModel.txx
index cf7bfc8..cc0d20e 100644
--- a/Code/UtilitiesAdapters/OpenCVAdapters/otbGradientBoostedTreeMachineLearningModel.txx
+++ b/Code/UtilitiesAdapters/OpenCVAdapters/otbGradientBoostedTreeMachineLearningModel.txx
@@ -150,7 +150,7 @@ GradientBoostedTreeMachineLearningModel<TInputValue,TOutputValue>
 template <class TInputValue, class TOutputValue>
 bool
 GradientBoostedTreeMachineLearningModel<TInputValue,TOutputValue>
-::CanWriteFile(const std::string & file)
+::CanWriteFile(const std::string & itkNotUsed(file))
 {
   return false;
 }
diff --git a/Code/UtilitiesAdapters/OpenCVAdapters/otbKNearestNeighborsMachineLearningModel.txx b/Code/UtilitiesAdapters/OpenCVAdapters/otbKNearestNeighborsMachineLearningModel.txx
index 2a41d4c..d313220 100644
--- a/Code/UtilitiesAdapters/OpenCVAdapters/otbKNearestNeighborsMachineLearningModel.txx
+++ b/Code/UtilitiesAdapters/OpenCVAdapters/otbKNearestNeighborsMachineLearningModel.txx
@@ -84,7 +84,7 @@ KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
 template <class TInputValue, class TTargetValue>
 void
 KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
-::Save(const std::string & filename, const std::string & name)
+::Save(const std::string & filename, const std::string & itkNotUsed(name))
 {
   //there is no m_KNearestModel->save(filename.c_str(), name.c_str()).
   //We need to save the K parameter and IsRegression flag used and the samples.
@@ -117,7 +117,7 @@ KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
 template <class TInputValue, class TTargetValue>
 void
 KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
-::Load(const std::string & filename, const std::string & name)
+::Load(const std::string & filename, const std::string & itkNotUsed(name))
 {
   //there is no m_KNearestModel->load(filename.c_str(), name.c_str());
   std::ifstream ifs(filename.c_str());
@@ -203,7 +203,7 @@ KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
 template <class TInputValue, class TTargetValue>
 bool
 KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue>
-::CanWriteFile(const std::string & file)
+::CanWriteFile(const std::string & itkNotUsed(file))
 {
   return false;
 }
diff --git a/Code/UtilitiesAdapters/OpenCVAdapters/otbNeuralNetworkMachineLearningModel.txx b/Code/UtilitiesAdapters/OpenCVAdapters/otbNeuralNetworkMachineLearningModel.txx
index 01cffff..9cb9b48 100644
--- a/Code/UtilitiesAdapters/OpenCVAdapters/otbNeuralNetworkMachineLearningModel.txx
+++ b/Code/UtilitiesAdapters/OpenCVAdapters/otbNeuralNetworkMachineLearningModel.txx
@@ -278,7 +278,7 @@ bool NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::CanReadFile(c
 }
 
 template<class TInputValue, class TOutputValue>
-bool NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::CanWriteFile(const std::string & file)
+bool NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::CanWriteFile(const std::string & itkNotUsed(file))
 {
   return false;
 }
diff --git a/Code/UtilitiesAdapters/OpenCVAdapters/otbNormalBayesMachineLearningModel.txx b/Code/UtilitiesAdapters/OpenCVAdapters/otbNormalBayesMachineLearningModel.txx
index 576be67..863020c 100644
--- a/Code/UtilitiesAdapters/OpenCVAdapters/otbNormalBayesMachineLearningModel.txx
+++ b/Code/UtilitiesAdapters/OpenCVAdapters/otbNormalBayesMachineLearningModel.txx
@@ -133,7 +133,7 @@ NormalBayesMachineLearningModel<TInputValue,TOutputValue>
 template <class TInputValue, class TOutputValue>
 bool
 NormalBayesMachineLearningModel<TInputValue,TOutputValue>
-::CanWriteFile(const std::string & file)
+::CanWriteFile(const std::string & itkNotUsed(file))
 {
   return false;
 }
diff --git a/Code/UtilitiesAdapters/OpenCVAdapters/otbRandomForestsMachineLearningModel.txx b/Code/UtilitiesAdapters/OpenCVAdapters/otbRandomForestsMachineLearningModel.txx
index 0bb66b7..5654b2b 100644
--- a/Code/UtilitiesAdapters/OpenCVAdapters/otbRandomForestsMachineLearningModel.txx
+++ b/Code/UtilitiesAdapters/OpenCVAdapters/otbRandomForestsMachineLearningModel.txx
@@ -178,7 +178,7 @@ RandomForestsMachineLearningModel<TInputValue,TOutputValue>
 template <class TInputValue, class TOutputValue>
 bool
 RandomForestsMachineLearningModel<TInputValue,TOutputValue>
-::CanWriteFile(const std::string & file)
+::CanWriteFile(const std::string & itkNotUsed(file))
 {
   return false;
 }
diff --git a/Code/UtilitiesAdapters/OpenCVAdapters/otbSVMMachineLearningModel.txx b/Code/UtilitiesAdapters/OpenCVAdapters/otbSVMMachineLearningModel.txx
index 6757d7e..2d219ef 100644
--- a/Code/UtilitiesAdapters/OpenCVAdapters/otbSVMMachineLearningModel.txx
+++ b/Code/UtilitiesAdapters/OpenCVAdapters/otbSVMMachineLearningModel.txx
@@ -179,7 +179,7 @@ SVMMachineLearningModel<TInputValue,TOutputValue>
 template <class TInputValue, class TOutputValue>
 bool
 SVMMachineLearningModel<TInputValue,TOutputValue>
-::CanWriteFile(const std::string & file)
+::CanWriteFile(const std::string & itkNotUsed(file))
 {
   return false;
 }
diff --git a/Code/UtilitiesAdapters/OssimAdapters/otbDateTimeAdapter.cxx b/Code/UtilitiesAdapters/OssimAdapters/otbDateTimeAdapter.cxx
new file mode 100644
index 0000000..486edd3
--- /dev/null
+++ b/Code/UtilitiesAdapters/OssimAdapters/otbDateTimeAdapter.cxx
@@ -0,0 +1,88 @@
+/*=========================================================================
+
+ Program:   ORFEO Toolbox
+ Language:  C++
+ Date:      $Date$
+ Version:   $Revision$
+
+
+ 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
+ PURPOSE.  See the above copyright notices for more information.
+
+ =========================================================================*/
+#include "otbDateTimeAdapter.h"
+
+#include "ossim/base/ossimDate.h"
+
+namespace otb
+{
+
+DateTimeAdapter::DateTimeAdapter()
+{
+  m_LocalTm = new ossimLocalTm(0);
+}
+
+DateTimeAdapter::~DateTimeAdapter()
+{
+  if (m_LocalTm != NULL)
+    {
+    delete m_LocalTm;
+    }
+}
+
+int
+DateTimeAdapter::GetYear()
+{
+  return m_LocalTm->getYear();
+}
+
+int
+DateTimeAdapter::GetMonth()
+{
+  return m_LocalTm->getMonth();
+}
+
+int
+DateTimeAdapter::GetDay()
+{
+  return m_LocalTm->getDay();
+}
+
+int
+DateTimeAdapter::GetHour()
+{
+  return m_LocalTm->getHour();
+}
+
+int
+DateTimeAdapter::GetMinute()
+{
+  return m_LocalTm->getMin();
+}
+
+double
+DateTimeAdapter::GetSeconds()
+{
+  return static_cast<double>(m_LocalTm->getSec())
+    + m_LocalTm->getFractionalSecond();
+}
+
+bool
+DateTimeAdapter::SetFromIso8601(const std::string &date)
+{
+  return m_LocalTm->setIso8601(date);
+}
+
+double
+DateTimeAdapter::GetDeltaInSeconds(const DateTimeAdapter *pastDate)
+{
+  return m_LocalTm->deltaInSeconds(*(pastDate->m_LocalTm));
+}
+
+
+} // namespace otb
diff --git a/Code/UtilitiesAdapters/OssimAdapters/otbDateTimeAdapter.h b/Code/UtilitiesAdapters/OssimAdapters/otbDateTimeAdapter.h
new file mode 100644
index 0000000..cc75219
--- /dev/null
+++ b/Code/UtilitiesAdapters/OssimAdapters/otbDateTimeAdapter.h
@@ -0,0 +1,96 @@
+/*=========================================================================
+
+ Program:   ORFEO Toolbox
+ Language:  C++
+ Date:      $Date$
+ Version:   $Revision$
+
+
+ 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
+ PURPOSE.  See the above copyright notices for more information.
+
+ =========================================================================*/
+#ifndef __otbDateTimeAdapter_h
+#define __otbDateTimeAdapter_h
+
+#include "itkObject.h"
+#include "itkObjectFactory.h"
+
+class ossimLocalTm;
+//class ossimDate;
+//class ossimTime;
+
+namespace otb
+{
+
+/** \class DateTimeAdapter
+ *  \brief This is a dummy class to the ossimLocalTm class
+ *
+ *  This class provide functions to define, compare and measure times and dates.
+ *
+ **/
+class DateTimeAdapter : public itk::Object
+{
+public:
+  /** Standard class typedefs. */
+  typedef DateTimeAdapter               Self;
+  typedef itk::Object                   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(DateTimeAdapter, itk::Object);
+  
+  /** Year Accessor*/
+  int GetYear();
+  
+  /** Month Accessor*/
+  int GetMonth();
+  
+  /** Day Accessor*/
+  int GetDay();
+  
+  /** Hour Accessor*/
+  int GetHour();
+  
+  /** Minute Accessor*/
+  int GetMinute();
+  
+  /** Seconds Accessor*/
+  double GetSeconds();
+  
+  /** Set the date and time from an Iso8601 string
+   *  Return true if the date is valid
+   */
+  bool SetFromIso8601(const std::string &date);
+  
+  /** Return the delta with an other date, expressed in seconds */
+  double GetDeltaInSeconds(const DateTimeAdapter *pastDate);
+  
+  // TODO : add print self function
+  
+protected:
+  DateTimeAdapter();
+  virtual ~DateTimeAdapter();
+
+private:
+  DateTimeAdapter(const Self &); //purposely not implemented
+  void operator =(const Self&); //purposely not implemented
+
+  ossimLocalTm *m_LocalTm;
+
+};
+
+// TODO add extern '<<' function
+
+} // namespace otb
+
+#endif
diff --git a/Code/UtilitiesAdapters/OssimAdapters/otbImageKeywordlist.cxx b/Code/UtilitiesAdapters/OssimAdapters/otbImageKeywordlist.cxx
index db395f4..feac51a 100644
--- a/Code/UtilitiesAdapters/OssimAdapters/otbImageKeywordlist.cxx
+++ b/Code/UtilitiesAdapters/OssimAdapters/otbImageKeywordlist.cxx
@@ -21,12 +21,15 @@
 
 #include "otbMacro.h"
 
+#include "gdal_priv.h"
+
 #include "ossim/base/ossimKeywordlist.h"
 #include "ossim/base/ossimString.h"
 #include "ossim/ossimPluginProjectionFactory.h"
 #include "ossim/imaging/ossimImageHandlerRegistry.h"
 #include "ossim/ossimTileMapModel.h"
 #include "ossim/projection/ossimProjectionFactoryRegistry.h"
+#include "ossim/projection/ossimRpcModel.h"
 
 #include "otbSensorModelAdapter.h"
 
@@ -123,6 +126,44 @@ convertToOSSIMKeywordlist(ossimKeywordlist& kwl) const
   kwl.getMap() = ossimMap;
 }
 
+bool
+ImageKeywordlist::
+convertToGDALRPC(GDALRPCInfo &rpc) const
+{
+  ossimKeywordlist geom_kwl;
+  this->convertToOSSIMKeywordlist(geom_kwl);
+  
+  ossimRefPtr<ossimRpcModel> rpcModel = new ossimRpcModel;
+  if (rpcModel->loadState(geom_kwl))
+    {
+    ossimRpcModel::rpcModelStruct ossimRpcStruct;
+    rpcModel->getRpcParameters(ossimRpcStruct);
+    
+    if (ossimRpcStruct.type == 'B')
+      {
+      rpc.dfSAMP_OFF = ossimRpcStruct.sampOffset;
+      rpc.dfLINE_OFF = ossimRpcStruct.lineOffset;
+      rpc.dfSAMP_SCALE = ossimRpcStruct.sampScale;
+      rpc.dfLINE_SCALE = ossimRpcStruct.lineScale;
+      rpc.dfLAT_OFF = ossimRpcStruct.latOffset;
+      rpc.dfLONG_OFF = ossimRpcStruct.lonOffset;
+      rpc.dfHEIGHT_OFF = ossimRpcStruct.hgtOffset;
+      rpc.dfLAT_SCALE = ossimRpcStruct.latScale;
+      rpc.dfLONG_SCALE = ossimRpcStruct.lonScale;
+      rpc.dfHEIGHT_SCALE = ossimRpcStruct.hgtScale;
+      
+      memcpy(rpc.adfLINE_NUM_COEFF, ossimRpcStruct.lineNumCoef, sizeof(double) * 20);
+      memcpy(rpc.adfLINE_DEN_COEFF, ossimRpcStruct.lineDenCoef, sizeof(double) * 20);
+      memcpy(rpc.adfSAMP_NUM_COEFF, ossimRpcStruct.sampNumCoef, sizeof(double) * 20);
+      memcpy(rpc.adfSAMP_DEN_COEFF, ossimRpcStruct.sampDenCoef, sizeof(double) * 20);
+      
+      return true;
+      }
+    }
+  
+  return false;
+}
+
 void
 ImageKeywordlist::
 Print(std::ostream& os, itk::Indent indent) const
@@ -154,98 +195,149 @@ ReadGeometry(const std::string& filename)
 }
 
 ImageKeywordlist
-ReadGeometryFromImage(const std::string& filename)
+ReadGeometryFromImage(const std::string& filename, bool checkRpcTag)
 {
   // Trying to read ossim MetaData
   bool             hasMetaData = false;
   ossimKeywordlist geom_kwl; // = new ossimKeywordlist();
   ImageKeywordlist otb_kwl;
 
-  // Test the plugins factory
+  /****************************************************/
+  /* First try : test the OSSIM plugins factory       */
+  /****************************************************/
   /** Before, the pluginfactory was tested if the ossim one returned false.
       But in the case TSX, the images tif were considered as ossimQuickbirdTiffTileSource
       thus a TSX tif image wasn't read with TSX Model. We don't use the ossimRegisteryFactory
       because the default include factory contains ossimQuickbirdTiffTileSource. */
   ossimProjection * projection = ossimplugins::ossimPluginProjectionFactory::instance()
                                  ->createProjection(ossimFilename(filename.c_str()), 0);
-
-  if (!projection)
-    {
-    otbMsgDevMacro(<< "OSSIM Instantiate projection FAILED ! ");
-    }
-  else
+  if (projection)
     {
-    otbMsgDevMacro(<< "OSSIM Instantiate projection SUCCESS ! ");
+    otbMsgDevMacro(<< "OSSIM plugin projection instantiated ! ");
 
     hasMetaData = projection->saveState(geom_kwl);
     otb_kwl.SetKeywordlist(geom_kwl);
 
     // Free memory
     delete projection;
+    projection = 0;
     }
 
+  /***********************************************/
+  /* Second try : the OSSIM projection factory   */
+  /***********************************************/
   if (!hasMetaData)
     {
     ossimImageHandler* handler = ossimImageHandlerRegistry::instance()
                                  ->open(ossimFilename(filename.c_str()));
-    if (!handler)
-      {
-      otbMsgDevMacro(<< "OSSIM Open Image FAILED ! ");
-
-      // In some corner cases, ossim is unable to create a ossimImageHandler
-      // instance for the provided file.
-      // This can happen for TIFF+geom files where the ossimTiffTileSource
-      // fails when trying to open the TIFF file (for example
-      // because ossim is compiled with a libtiff without BigTIFF support
-      // and when the actual TIFF file exceeds the Large File limit).
-      // In such cases, we don't actually need ossim to interpret the TIFF file,
-      // and just want a valid ossimKeywordlist corresponding to a sensor model.
-
-      // Here is implemented a shortcut used as a fallback scenario,
-      // where we bypass the ossimImageHandlerRegistry
-      // and directly create a ossimKeywordlist from the ".geom" file.
-
-      // We then verify it is a valid sensor model by using otb::SensorModelAdapter
-      // which uses ossimSensorModelFactory and ossimPluginProjectionFactory internally,
-      // thus by-passing the need for a valid ossimImageHandler.
-
-      // Try to find a ".geom" file next to 'filename'
-      ossimFilename ossimGeomFile = ossimFilename(filename).setExtension(".geom");
-
-      otb_kwl = ReadGeometryFromGEOMFile(ossimGeomFile);
-      }
-    else
+    if (handler)
       {
       otbMsgDevMacro(<< "OSSIM Open Image SUCCESS ! ");
 
       // Add ossimPlugins model
       ossimProjectionFactoryRegistry::instance()->registerFactory(ossimplugins::ossimPluginProjectionFactory::instance());
 
-      //     hasMetaData = handler->getImageGeometry(geom_kwl);
       ossimRefPtr<ossimImageGeometry> geom = handler->getImageGeometry();
-
       if (geom.valid())
         {
-        ossimProjection* projection = geom->getProjection();
+        projection = geom->getProjection();
         if (projection)
           {
           hasMetaData = projection->saveState(geom_kwl);
-          otb_kwl.SetKeywordlist(geom_kwl);
           }
         }
-
-      // If still no metadata, try the ".geom" file
-      if (!hasMetaData && otb_kwl.GetSize() == 0)
+      
+      // if the handler has found a sensor model, copy the tags found
+      if (hasMetaData && dynamic_cast<ossimSensorModel*>(projection))
         {
-        ossimFilename ossimGeomFile = ossimFilename(filename).setExtension(".geom");
-        otb_kwl = ReadGeometryFromGEOMFile(ossimGeomFile);
+        otbMsgDevMacro(<<"OSSIM sensor projection instantiated ! ");
+        otb_kwl.SetKeywordlist(geom_kwl);
         }
-
+      else
+        {
+        hasMetaData = false;
+        }
+      // Free memory
+      delete handler;
+      }
+    }
+  
+  /**********************************************************/
+  /* Third try : look for external geom file and RPC tags   */
+  /**********************************************************/
+  if (!hasMetaData)
+    {
+    // If still no metadata, try the ".geom" file
+    ossimFilename ossimGeomFile = ossimFilename(filename).setExtension(".geom");
+    otb_kwl = ReadGeometryFromGEOMFile(ossimGeomFile);
+    
+    // also check any RPC tags
+    ImageKeywordlist rpc_kwl;
+    if (checkRpcTag)
+      {
+      rpc_kwl = ReadGeometryFromRPCTag(filename);
+      }
+     
+    if (otb_kwl.HasKey("type"))
+      {
+      // external geom has a "type" keyword
+      std::string geomType(otb_kwl.GetMetadataByKey("type"));
+      ossimProjection *testProj = ossimProjectionFactoryRegistry::instance()
+        ->createProjection(ossimString(geomType));
+      if (dynamic_cast<ossimSensorModel*>(testProj))
+        {
+        // "type" keyword corresponds to a sensor model : don't erase it
+        if (rpc_kwl.GetSize() > 0)
+          {
+          rpc_kwl.ClearMetadataByKey("type");
+          }
+        
+        ossimKeywordlist ossim_test_kwl;
+        otb_kwl.convertToOSSIMKeywordlist(ossim_test_kwl);
+        testProj = ossimProjectionFactoryRegistry::instance()
+          ->createProjection(ossim_test_kwl);
+        if (testProj)
+          {
+          // external geom contains a valid sensor geometry
+          hasMetaData = true;
+          }
+        }
+      }
+      
+    // copy keywords found in RPC tags if the external geom is not valid
+    if (!hasMetaData && rpc_kwl.GetSize() > 0)
+      {
+      const ImageKeywordlist::KeywordlistMap &kwlMap = rpc_kwl.GetKeywordlist();
+      for (ImageKeywordlist::KeywordlistMap::const_iterator it = kwlMap.begin();
+          it != kwlMap.end();
+          ++it)
+        {
+        if (it->second != "")
+          {
+          otb_kwl.AddKey(it->first , it->second);
+          }
+        }
+      hasMetaData = true;
       }
-    // Free memory
-    delete handler;
     }
 
+  // In some corner cases, ossim is unable to create a ossimImageHandler
+  // instance for the provided file.
+  // This can happen for TIFF+geom files where the ossimTiffTileSource
+  // fails when trying to open the TIFF file (for example
+  // because ossim is compiled with a libtiff without BigTIFF support
+  // and when the actual TIFF file exceeds the Large File limit).
+  // In such cases, we don't actually need ossim to interpret the TIFF file,
+  // and just want a valid ossimKeywordlist corresponding to a sensor model.
+
+  // Here is implemented a shortcut used as a fallback scenario,
+  // where we bypass the ossimImageHandlerRegistry
+  // and directly create a ossimKeywordlist from the ".geom" file.
+
+  // We then verify it is a valid sensor model by using otb::SensorModelAdapter
+  // which uses ossimSensorModelFactory and ossimPluginProjectionFactory internally,
+  // thus by-passing the need for a valid ossimImageHandler.
+  
   if (!hasMetaData)
     {
     otbMsgDevMacro(<< "OSSIM MetaData not present ! ");
@@ -253,7 +345,7 @@ ReadGeometryFromImage(const std::string& filename)
   else
     {
     otbMsgDevMacro(<< "OSSIM MetaData present ! ");
-    otbMsgDevMacro(<< geom_kwl);
+    //otbMsgDevMacro(<< geom_kwl);
     }
 
   return otb_kwl;
@@ -294,6 +386,111 @@ ReadGeometryFromGEOMFile(const std::string& filename)
   return otb_kwl;
 }
 
+ImageKeywordlist
+ReadGeometryFromRPCTag(const std::string& filename)
+{
+  ossimKeywordlist geom_kwl;
+  ImageKeywordlist otb_kwl;
+  
+  //  try to use GeoTiff RPC tag if present.
+  // Warning : RPC in subdatasets are not supported
+  GDALDriverH identifyDriverH = GDALIdentifyDriver(filename.c_str(), NULL);
+  if(identifyDriverH == NULL)
+    {
+    // If no driver has identified the dataset, don't try to open it and exit
+    return otb_kwl;
+    }
+  
+  GDALDatasetH datasetH = GDALOpen(filename.c_str(), GA_ReadOnly);
+  if (datasetH != NULL)
+    {
+    GDALDataset* dataset = static_cast<GDALDataset*>(datasetH);
+    GDALRPCInfo rpcStruct;
+    if (GDALExtractRPCInfo(dataset->GetMetadata("RPC"),&rpcStruct))
+      {
+      otbMsgDevMacro(<<"RPC Coeff found");
+      std::vector<double> lineNumCoefs;
+      std::vector<double> lineDenCoefs;
+      std::vector<double> sampNumCoefs;
+      std::vector<double> sampDenCoefs;
+      
+      for (unsigned int k=0; k<20; ++k)
+        {
+        lineNumCoefs.push_back(rpcStruct.adfLINE_NUM_COEFF[k]);
+        lineDenCoefs.push_back(rpcStruct.adfLINE_DEN_COEFF[k]);
+        sampNumCoefs.push_back(rpcStruct.adfSAMP_NUM_COEFF[k]);
+        sampDenCoefs.push_back(rpcStruct.adfSAMP_DEN_COEFF[k]);
+        }
+      
+      ossimRefPtr<ossimRpcModel> rpcModel = new ossimRpcModel;
+      rpcModel->setAttributes( rpcStruct.dfSAMP_OFF,
+                              rpcStruct.dfLINE_OFF,
+                              rpcStruct.dfSAMP_SCALE,
+                              rpcStruct.dfLINE_SCALE,
+                              rpcStruct.dfLAT_OFF,
+                              rpcStruct.dfLONG_OFF,
+                              rpcStruct.dfHEIGHT_OFF,
+                              rpcStruct.dfLAT_SCALE,
+                              rpcStruct.dfLONG_SCALE,
+                              rpcStruct.dfHEIGHT_SCALE,
+                              sampNumCoefs,
+                              sampDenCoefs,
+                              lineNumCoefs,
+                              lineDenCoefs);
+      
+      double errorBias = 0.0;
+      double errorRand = 0.0;
+      
+      // setup other metadata
+      rpcModel->setPositionError(errorBias,errorRand,true);
+      ossimDrect rectangle(0.0,
+                          0.0,
+                          static_cast<double>(dataset->GetRasterXSize()-1),
+                          static_cast<double>(dataset->GetRasterYSize()-1));
+      rpcModel->setImageRect(rectangle);
+      
+      ossimDpt size;
+      size.line = rectangle.height();
+      size.samp = rectangle.width();
+      rpcModel->setImageSize(size);
+      
+      // Compute 4 corners and reference point
+      rpcModel->updateModel();
+      double heightOffset = rpcStruct.dfHEIGHT_OFF;
+      ossimGpt ulGpt, urGpt, lrGpt, llGpt;
+      ossimGpt refGndPt;
+      
+      rpcModel->lineSampleHeightToWorld(rectangle.ul(), heightOffset, ulGpt);
+      rpcModel->lineSampleHeightToWorld(rectangle.ur(), heightOffset, urGpt);
+      rpcModel->lineSampleHeightToWorld(rectangle.lr(), heightOffset, lrGpt);
+      rpcModel->lineSampleHeightToWorld(rectangle.ll(), heightOffset, llGpt);
+      rpcModel->setGroundRect(ulGpt,urGpt,lrGpt,llGpt);
+      
+      rpcModel->lineSampleHeightToWorld(rectangle.midPoint(), heightOffset, refGndPt);
+      rpcModel->setRefGndPt(refGndPt);
+      
+      // compute ground sampling distance
+      try
+        {
+        // Method can throw ossimException.
+        rpcModel->computeGsd();
+        }
+      catch (const ossimException& e)
+        {
+        otbMsgDevMacro(<< "OSSIM Compute ground sampling distance FAILED ! ");
+        }
+      
+      if (rpcModel->saveState(geom_kwl))
+        {
+        otb_kwl.SetKeywordlist(geom_kwl);
+        }
+      }
+    GDALClose(datasetH);
+    }
+  
+  return otb_kwl;
+}
+
 void
 WriteGeometry(const ImageKeywordlist& otb_kwl, const std::string& filename)
 {
diff --git a/Code/UtilitiesAdapters/OssimAdapters/otbImageKeywordlist.h b/Code/UtilitiesAdapters/OssimAdapters/otbImageKeywordlist.h
index 059166b..6808aa1 100644
--- a/Code/UtilitiesAdapters/OssimAdapters/otbImageKeywordlist.h
+++ b/Code/UtilitiesAdapters/OssimAdapters/otbImageKeywordlist.h
@@ -21,6 +21,8 @@
 #include <iostream>
 #include <map>
 
+#include "gdal.h"
+
 #include "itkObject.h"
 #include "itkObjectFactory.h"
 
@@ -30,6 +32,34 @@ class ossimKeywordlist;
 namespace otb
 {
 
+namespace internal
+{
+  /**
+   * Converts index coordinates from OTB into OSSIM. It is intended for sensor
+   * images where the centre of the top-left pixel is expected to be :
+   *   [0.5,0.5] in OTB physical space
+   *   [ 0 , 0 ] in OSSIM
+   * \param[in] val  coordinate value to modify (along X or Y)
+   */
+  inline double ConvertToOSSIMFrame(double val)
+    {
+    return (val - 0.5);
+    }
+
+  /**
+   * Converts index coordinates from OSSIM into OTB. It is intended for sensor
+   * images where the centre of the top-left pixel is expected to be :
+   *   [0.5,0.5] in OTB physical space
+   *   [ 0 , 0 ] in OSSIM
+    * \param[in] val  coordinate value to modify (along X or Y)
+   */
+  inline double ConvertFromOSSIMFrame(double val)
+    {
+    return (val + 0.5);
+    }
+
+} // namespace internal
+
 /** \class ImageKeywordlist
  * \brief Storage and conversion for OSSIM metadata
  *
@@ -83,6 +113,10 @@ public:
   virtual void AddKey(const std::string& key, const std::string& value);
 
   virtual void convertToOSSIMKeywordlist(ossimKeywordlist& kwl) const;
+  
+  /** try to convert the image keywordlist into a GDALRpcInfo structure
+   *  return true if successful, false otherwise */
+  virtual bool convertToGDALRPC(GDALRPCInfo &rpc) const;
 
   virtual void Print(std::ostream& os, itk::Indent indent = 0) const;
 
@@ -112,8 +146,9 @@ private:
 std::ostream & operator <<(std::ostream& os, const ImageKeywordlist& kwl);
 
 // Free function to handle the keywordlist <-> files
-ImageKeywordlist ReadGeometryFromImage(const std::string& filename);
+ImageKeywordlist ReadGeometryFromImage(const std::string& filename, bool checkRpcTag=true);
 ImageKeywordlist ReadGeometryFromGEOMFile(const std::string& filename);
+ImageKeywordlist ReadGeometryFromRPCTag(const std::string& filename);
 void WriteGeometry(const ImageKeywordlist& otb_kwl, const std::string& filename);
 
 } //namespace otb
diff --git a/Code/UtilitiesAdapters/OssimAdapters/otbRPCProjectionAdapter.cxx b/Code/UtilitiesAdapters/OssimAdapters/otbRPCProjectionAdapter.cxx
index 287a3c2..61950e8 100644
--- a/Code/UtilitiesAdapters/OssimAdapters/otbRPCProjectionAdapter.cxx
+++ b/Code/UtilitiesAdapters/OssimAdapters/otbRPCProjectionAdapter.cxx
@@ -52,7 +52,8 @@ RPCProjectionAdapter::TransformPoint(double x, double y, double z,
     h = 0.0;
     return;
     }
-  ossimDpt spoint(x, y);
+  ossimDpt spoint( internal::ConvertToOSSIMFrame(x),
+                   internal::ConvertToOSSIMFrame(y));
   ossimGpt gpoint;
   gpoint.hgt = z;
 
@@ -82,7 +83,8 @@ RPCProjectionAdapter::Solve(const GCPsContainerType& gcpContainer,
   for (gcpIt = gcpContainer.begin(); gcpIt != gcpContainer.end(); ++gcpIt)
     {
     // Fill sensor point
-    sensorPoint = ossimDpt(gcpIt->first[0], gcpIt->first[1]);
+    sensorPoint = ossimDpt( internal::ConvertToOSSIMFrame(gcpIt->first[0]),
+                            internal::ConvertToOSSIMFrame(gcpIt->first[1]));
 
     // Fill geo point (lat, lon, elev)
     geoPoint =  ossimGpt(gcpIt->second[1], gcpIt->second[0], gcpIt->second[2]);
@@ -131,17 +133,18 @@ RPCProjectionAdapter
 {
   ossimGpt ul, ll, ur, lr;
    // Upper left
-  ossimDpt imagePoint(orig[0], orig[1]);
+  ossimDpt imagePoint( internal::ConvertToOSSIMFrame(orig[0]),
+                       internal::ConvertToOSSIMFrame(orig[1]));
   m_RpcProjection->lineSampleToWorld(imagePoint, ul);
   // Upper right
-  imagePoint = ossimDpt(orig[0], orig[1]+size[0]-1);
+  imagePoint.x += static_cast<double>(size[0]) - 1.0;
   m_RpcProjection->lineSampleToWorld(imagePoint, ur);
-  // Lower left
-  imagePoint = ossimDpt(orig[0]+size[1]-1, orig[1]);
-  m_RpcProjection->lineSampleToWorld(imagePoint, ll);
   // Lower right
-  imagePoint = ossimDpt(orig[0]+size[1]-1, orig[1]+size[0]-1);
+  imagePoint.y += static_cast<double>(size[0]) - 1.0;
   m_RpcProjection->lineSampleToWorld(imagePoint, lr);
+  // Lower left
+  imagePoint.x += - static_cast<double>(size[0]) + 1.0;
+  m_RpcProjection->lineSampleToWorld(imagePoint, ll);
 
 
   ossimKeywordlist geom_kwl;
diff --git a/Code/UtilitiesAdapters/OssimAdapters/otbRPCSolverAdapter.cxx b/Code/UtilitiesAdapters/OssimAdapters/otbRPCSolverAdapter.cxx
index 4afb395..c54c8d8 100644
--- a/Code/UtilitiesAdapters/OssimAdapters/otbRPCSolverAdapter.cxx
+++ b/Code/UtilitiesAdapters/OssimAdapters/otbRPCSolverAdapter.cxx
@@ -56,7 +56,8 @@ RPCSolverAdapter::Solve(const GCPsContainerType& gcpContainer,
     {
     // Check if point is inside bounds
     // Fill sensor point
-    sensorPoint = ossimDpt(gcpIt->first[0], gcpIt->first[1]);
+    sensorPoint = ossimDpt( internal::ConvertToOSSIMFrame(gcpIt->first[0]),
+                            internal::ConvertToOSSIMFrame(gcpIt->first[1]));
 
     // Fill geo point (lat, lon, elev)
     geoPoint =  ossimGpt(gcpIt->second[1], gcpIt->second[0], gcpIt->second[2]);
diff --git a/Code/UtilitiesAdapters/OssimAdapters/otbSensorModelAdapter.cxx b/Code/UtilitiesAdapters/OssimAdapters/otbSensorModelAdapter.cxx
index a21e99c..dfdf539 100644
--- a/Code/UtilitiesAdapters/OssimAdapters/otbSensorModelAdapter.cxx
+++ b/Code/UtilitiesAdapters/OssimAdapters/otbSensorModelAdapter.cxx
@@ -88,7 +88,8 @@ void SensorModelAdapter::ForwardTransformPoint(double x, double y, double z,
     itkExceptionMacro(<< "ForwardTransformPoint(): Invalid sensor model (m_SensorModel pointer is null)");
     }
 
-  ossimDpt ossimPoint(x, y);
+  ossimDpt ossimPoint( internal::ConvertToOSSIMFrame(x),
+                       internal::ConvertToOSSIMFrame(y));
   ossimGpt ossimGPoint;
 
   this->m_SensorModel->lineSampleHeightToWorld(ossimPoint,z, ossimGPoint);
@@ -106,7 +107,8 @@ void SensorModelAdapter::ForwardTransformPoint(double x, double y,
     itkExceptionMacro(<< "ForwardTransformPoint(): Invalid sensor model (m_SensorModel pointer is null)");
     }
 
-  ossimDpt ossimPoint(x, y);
+  ossimDpt ossimPoint( internal::ConvertToOSSIMFrame(x),
+                       internal::ConvertToOSSIMFrame(y));
   ossimGpt ossimGPoint;
 
   this->m_SensorModel->lineSampleToWorld(ossimPoint, ossimGPoint);
@@ -130,8 +132,8 @@ void SensorModelAdapter::InverseTransformPoint(double lon, double lat, double h,
 
   this->m_SensorModel->worldToLineSample(ossimGPoint, ossimDPoint);
 
-  x = ossimDPoint.x;
-  y = ossimDPoint.y;
+  x = internal::ConvertFromOSSIMFrame(ossimDPoint.x);
+  y = internal::ConvertFromOSSIMFrame(ossimDPoint.y);
   z = ossimGPoint.height();
 }
 
@@ -153,15 +155,16 @@ void SensorModelAdapter::InverseTransformPoint(double lon, double lat,
 
   this->m_SensorModel->worldToLineSample(ossimGPoint, ossimDPoint);
 
-  x = ossimDPoint.x;
-  y = ossimDPoint.y;
+  x = internal::ConvertFromOSSIMFrame(ossimDPoint.x);
+  y = internal::ConvertFromOSSIMFrame(ossimDPoint.y);
   z = ossimGPoint.height();
 }
 
 void SensorModelAdapter::AddTiePoint(double x, double y, double z, double lon, double lat)
 {
   // Create the tie point
-  ossimDpt imagePoint(x,y);
+  ossimDpt imagePoint( internal::ConvertToOSSIMFrame(x),
+                       internal::ConvertToOSSIMFrame(y));
   ossimGpt ossimGPoint(lat, lon, z);
 
   // Add the tie point to the container
@@ -171,7 +174,8 @@ void SensorModelAdapter::AddTiePoint(double x, double y, double z, double lon, d
 void SensorModelAdapter::AddTiePoint(double x, double y, double lon, double lat)
 {
   // Create the tie point
-  ossimDpt imagePoint(x,y);
+  ossimDpt imagePoint( internal::ConvertToOSSIMFrame(x),
+                       internal::ConvertToOSSIMFrame(y));
 
   // Get elevation from DEMHandler
   double z = m_DEMHandler->GetHeightAboveEllipsoid(lon,lat);
diff --git a/Code/Wrappers/CommandLine/otbApplicationLauncherCommandLine.cxx b/Code/Wrappers/CommandLine/otbApplicationLauncherCommandLine.cxx
index 70256e1..047ffa7 100644
--- a/Code/Wrappers/CommandLine/otbApplicationLauncherCommandLine.cxx
+++ b/Code/Wrappers/CommandLine/otbApplicationLauncherCommandLine.cxx
@@ -18,9 +18,12 @@
 
 #include "otbWrapperCommandLineLauncher.h"
 #include "otbTinyXML.h"
+#include <vector>
 
 const std::string GetChildNodeTextOf(TiXmlElement *parentElement, std::string key);
 std::string PrepareExpressionFromXML(std::string filename);
+std::vector<std::string> PrepareVectorExpressionFromXML(std::string filename);
+std::string CleanWord(const std::string & word);
 
 
 std::string PrepareExpressionFromXML(std::string filename)
@@ -39,13 +42,17 @@ std::string PrepareExpressionFromXML(std::string filename)
   // Open the xml file
   TiXmlDocument doc;
 
-  FILE* fp = fopen( filename.c_str (), "rb" ); //must be changed TiXmlFileOpen
-                                               //from tinyxml.cpp
+  //Use itksys::SystemTools::FOpen() and close it below because
+  //TiXmlDocument::TiXmlFileOpen( ) is not exposed from tinyXML library. Even
+  //though its available in the TiXmlDocument::SaveFile().
+  FILE* fp =  itksys::SystemTools::Fopen(filename.c_str(), "rb");
 
   if (!doc.LoadFile(fp , TIXML_ENCODING_UTF8))
     {
     std::cerr << "Can't open file " << filename << std::endl;
+    fclose(fp);
     exit(1);
+
     }
 
   TiXmlHandle handle(&doc);
@@ -57,6 +64,7 @@ std::string PrepareExpressionFromXML(std::string filename)
   {
     std::string info = "Input XML file " + filename + " is invalid.";
     std::cerr << info  << std::endl;
+    fclose(fp);
     exit(1);
   }
 
@@ -134,9 +142,112 @@ std::string PrepareExpressionFromXML(std::string filename)
         }
       }
     }
+
+  fclose(fp);
+
   return expression;
 }
 
+std::vector<std::string> PrepareVectorExpressionFromXML(std::string filename)
+{
+  std::vector<std::string> expression;
+
+  if(filename.empty())
+    {
+    std::cerr <<"Input XML Filename is empty" << std::endl;
+    return expression;
+    }
+  std::string ext = filename.substr(filename.size()-4,filename.size());
+  if(ext != ".xml" )
+    std::cerr << ext  << " is a wrong extension: Expected .xml " << __FILE__ << std::endl;
+
+  // Open the xml file
+  TiXmlDocument doc;
+
+  //Use itksys::SystemTools::FOpen() and close it below because
+  //TiXmlDocument::TiXmlFileOpen( ) is not exposed from tinyXML library. Even
+  //though its available in the TiXmlDocument::SaveFile().
+  FILE* fp =  itksys::SystemTools::Fopen(filename.c_str(), "rb");
+
+  if (!doc.LoadFile(fp , TIXML_ENCODING_UTF8))
+    {
+    std::cerr << "Can't open file " << filename << std::endl;
+    fclose(fp);
+    exit(1);
+
+    }
+
+  TiXmlHandle handle(&doc);
+
+  TiXmlElement *n_OTB;
+  n_OTB = handle.FirstChild("OTB").Element();
+
+  if(!n_OTB)
+  {
+    std::string info = "Input XML file " + filename + " is invalid.";
+    std::cerr << info  << std::endl;
+    fclose(fp);
+    exit(1);
+  }
+
+  TiXmlElement *n_AppNode   = n_OTB->FirstChildElement("application");
+
+  std::string moduleName;
+  moduleName = GetChildNodeTextOf(n_AppNode, "name");
+
+  expression.push_back(CleanWord(moduleName));
+
+  for( TiXmlElement* n_Parameter = n_AppNode->FirstChildElement("parameter"); n_Parameter != NULL;
+       n_Parameter = n_Parameter->NextSiblingElement() )
+    {
+    std::string key="-";
+    key.append(GetChildNodeTextOf(n_Parameter, "key"));
+    expression.push_back(CleanWord(key));
+
+    TiXmlElement* n_Values = NULL;
+    n_Values = n_Parameter->FirstChildElement("values");
+    if(n_Values)
+      {
+      std::string values;
+      for(TiXmlElement* n_Value = n_Values->FirstChildElement("value"); n_Value != NULL;
+          n_Value = n_Value->NextSiblingElement())
+        {
+        expression.push_back(CleanWord(n_Value->GetText()));
+        }
+      }
+    else
+      {
+      std::string value;
+      value = GetChildNodeTextOf(n_Parameter, "value");
+      expression.push_back(CleanWord(value));
+
+      std::string type = GetChildNodeTextOf(n_Parameter, "type");
+      if (type == "OutputImage")
+        {
+        std::string type = GetChildNodeTextOf(n_Parameter, "pixtype");
+        expression.push_back(CleanWord(type));
+        }
+      }
+    }
+
+  fclose(fp);
+
+  return expression;
+}
+
+std::string CleanWord(const std::string & word)
+{
+  std::string res("");
+  // Suppress whitespace characters at the beginning and ending of the string
+  std::string::size_type cleanStart = word.find_first_not_of(" \t");
+  std::string::size_type cleanEnd = word.find_last_not_of(" \t\f\v\n\r");
+  if (cleanEnd != std::string::npos)
+    {
+    res = word.substr(cleanStart,cleanEnd+1);
+    }
+  return res;
+}
+
 int main(int argc, char* argv[])
 {
   if (argc < 2)
@@ -145,17 +256,20 @@ int main(int argc, char* argv[])
     return EXIT_FAILURE;
     }
 
+  std::vector<std::string> vexp;
+    
   std::string exp;
   if (strcmp(argv[1], "-inxml") == 0)
     {
-    exp = PrepareExpressionFromXML(argv[2]);
+    //exp = PrepareExpressionFromXML(argv[2]);
+    vexp = PrepareVectorExpressionFromXML(argv[2]);
     }
   else
     {
     // Construct the string expression
     for (int i = 1; i < argc; i++)
       {
-      if (i != argc - 1)
+      /*if (i != argc - 1)
         {
         exp.append(argv[i]);
         exp.append(" ");
@@ -163,16 +277,24 @@ int main(int argc, char* argv[])
       else
         {
         exp.append(argv[i]);
+        }*/
+      std::string strarg(argv[i]);
+      std::string cleanArg = CleanWord(strarg);
+      if (cleanArg.empty())
+        {
+        // Empty argument !
+        continue;
         }
+      vexp.push_back(cleanArg);
       }
-
     }
   //  std::cerr << exp << ":\n";
 
   typedef otb::Wrapper::CommandLineLauncher LauncherType;
   LauncherType::Pointer launcher = LauncherType::New();
 
-  if (launcher->Load(exp) == true)
+  //if (launcher->Load(exp) == true)
+    if (launcher->Load(vexp) == true)
     {
     if (launcher->ExecuteAndWriteOutput() == false)
       {
diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
index 1893724..4ae5f6a 100644
--- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
+++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
@@ -58,7 +58,7 @@ namespace Wrapper
 {
 
 CommandLineLauncher::CommandLineLauncher() :
-  m_Expression(""), m_WatcherList(), m_ReportProgress(true), m_MaxKeySize(0)
+  /*m_Expression(""),*/m_VExpression(), m_WatcherList(), m_ReportProgress(true), m_MaxKeySize(0)
 {
   m_Application = NULL;
   m_Parser = CommandLineParser::New();
@@ -70,8 +70,8 @@ CommandLineLauncher::CommandLineLauncher() :
   m_AddProcessCommand->SetCallbackFunction(this, &CommandLineLauncher::LinkWatchers);
 }
 
-CommandLineLauncher::CommandLineLauncher(const char * exp) :
-  m_Expression(exp)
+CommandLineLauncher::CommandLineLauncher(const char * exp) /*:
+  m_Expression(exp)*/
 {
   m_Application = NULL;
   m_Parser = CommandLineParser::New();
@@ -94,15 +94,23 @@ void CommandLineLauncher::DeleteWatcherList()
 
 bool CommandLineLauncher::Load(const std::string & exp)
 {
-  m_Expression = exp;
+  /*m_Expression = exp;
+  return this->Load(); */
+  return false;
+}
+
+bool CommandLineLauncher::Load(const std::vector<std::string> &vexp)
+{
+  m_VExpression = vexp;
   return this->Load();
 }
 
+
 bool CommandLineLauncher::Load()
 {
   // Add a space to clarify output logs
   std::cerr << std::endl;
-  if (m_Expression == "")
+  if (m_VExpression.empty())
     {
     itkExceptionMacro("No expression specified...");
     }
@@ -121,9 +129,9 @@ bool CommandLineLauncher::Load()
 
   if (this->LoadPath() == false)
     {
-    if (m_Parser->GetPathsAsString(m_Expression).size() != 0)
+    if (m_Parser->GetPathsAsString(m_VExpression).size() != 0)
       {
-      std::cerr << "ERROR: At least one specified path within \"" << m_Parser->GetPathsAsString(m_Expression)
+      std::cerr << "ERROR: At least one specified path within \"" << m_Parser->GetPathsAsString(m_VExpression)
                 << "\" is invalid or doesn't exist..." << std::endl;
       return false;
       }
@@ -193,7 +201,7 @@ bool CommandLineLauncher::BeforeExecute()
   // Check if there's keys in the expression if the application takes
   // at least 1 mandatory parameter
   const std::vector<std::string> appKeyList = m_Application->GetParametersKeys(true);
-  std::vector<std::string> keyList = m_Parser->GetKeyList( m_Expression );
+  std::vector<std::string> keyList = m_Parser->GetKeyList( m_VExpression );
 
   if( appKeyList.size()!=0 && keyList.size()==0 )
     {
@@ -203,21 +211,21 @@ bool CommandLineLauncher::BeforeExecute()
     }
 
   // if help is asked...
-  if (m_Parser->IsAttributExists("-help", m_Expression) == true)
+  if (m_Parser->IsAttributExists("-help", m_VExpression) == true)
     {
     this->DisplayHelp();
     return false;
     }
 
   //display OTB version
-  if (m_Parser->IsAttributExists("-version", m_Expression) == true)
+  if (m_Parser->IsAttributExists("-version", m_VExpression) == true)
     {
     std::cerr << "This is the "<<m_Application->GetName() << " application, version " << OTB_VERSION_STRING <<std::endl;
     return false;
     }
 
   // if we want to load test environnement
-  if (m_Parser->IsAttributExists("-testenv", m_Expression) == true)
+  if (m_Parser->IsAttributExists("-testenv", m_VExpression) == true)
     {
     this->LoadTestEnv();
     }
@@ -256,10 +264,10 @@ bool CommandLineLauncher::BeforeExecute()
     }
 
   // Check for the progress report
-  if (m_Parser->IsAttributExists("-progress", m_Expression) == true)
+  if (m_Parser->IsAttributExists("-progress", m_VExpression) == true)
     {
     std::vector<std::string> val;
-    val = m_Parser->GetAttribut("-progress", m_Expression);
+    val = m_Parser->GetAttribut("-progress", m_VExpression);
     if (val.size() != 1)
       {
       std::cerr << "ERROR: Invalid progress argument, must be unique value..." << std::endl;
@@ -292,7 +300,8 @@ bool CommandLineLauncher::LoadPath()
 {
   std::vector<std::string> pathList;
   // If users has set path...
-  if (m_Parser->GetPaths(pathList, m_Expression) == CommandLineParser::OK)
+  //if (m_Parser->GetPaths(pathList, m_Expression) == CommandLineParser::OK)
+  if (m_Parser->GetPaths(pathList, m_VExpression) == CommandLineParser::OK)
     {
     for (unsigned i = 0; i < pathList.size(); i++)
       {
@@ -311,7 +320,8 @@ void CommandLineLauncher::LoadApplication()
 {
   // Look for the module name
   std::string moduleName;
-  if (m_Parser->GetModuleName(moduleName, m_Expression) != CommandLineParser::OK)
+  //if (m_Parser->GetModuleName(moduleName, m_Expression) != CommandLineParser::OK)
+  if (m_Parser->GetModuleName(moduleName, m_VExpression) != CommandLineParser::OK)
     {
     std::cerr << "ERROR: LoadApplication, no module found..." << std::endl;
     return;
@@ -365,17 +375,18 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
    */
   const char *inXMLKey =  "inxml";
   const char *attrib   = "-inxml";
-  const bool paramInXMLExists(m_Parser->IsAttributExists(attrib, m_Expression));
+  const bool paramInXMLExists(m_Parser->IsAttributExists(attrib, m_VExpression));
   if(paramInXMLExists)
     {
     std::vector<std::string> inXMLValues;
-    inXMLValues = m_Parser->GetAttribut(attrib, m_Expression);
+    inXMLValues = m_Parser->GetAttribut(attrib, m_VExpression);
     m_Application->SetParameterString(inXMLKey, inXMLValues[0]);
     m_Application->UpdateParameters();
     }
 
   const std::vector<std::string> appKeyList = m_Application->GetParametersKeys(true);
   // Loop over each parameter key declared in the application
+  // FIRST PASS : set parameter values
   for (unsigned int i = 0; i < appKeyList.size(); i++)
     {
     const std::string paramKey(appKeyList[i]);
@@ -384,13 +395,13 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
     Parameter::Pointer param = m_Application->GetParameterByKey(paramKey);
     ParameterType type = m_Application->GetParameterType(paramKey);
 
-    const bool paramExists(m_Parser->IsAttributExists(std::string("-").append(paramKey), m_Expression));
+    const bool paramExists(m_Parser->IsAttributExists(std::string("-").append(paramKey), m_VExpression));
 
     // if param is a Group, dont do anything, ParamGroup dont have values
     if (type != ParameterType_Group)
       {
       // Get the attribute relative to this key as vector
-      values = m_Parser->GetAttribut(std::string("-").append(paramKey), m_Expression);
+      values = m_Parser->GetAttribut(std::string("-").append(paramKey), m_VExpression);
 
       // If the param does not exists in the cli, dont try to set a
       // value on it, an exception will be thrown later in this function
@@ -430,7 +441,7 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
                 if (type == ParameterType_String)
                   {
                   dynamic_cast<StringParameter *> (param.GetPointer())->SetValue(
-                    m_Parser->GetAttributAsString(std::string("-").append(paramKey), m_Expression) );
+                    m_Parser->GetAttributAsString(std::string("-").append(paramKey), m_VExpression) );
                   }
                 else
                   if (type == ParameterType_OutputImage)
@@ -530,6 +541,16 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
         m_Application->UpdateParameters();
         }
       }
+    }
+
+  // SECOND PASS : check mandatory parameters
+  for (unsigned int i = 0; i < appKeyList.size(); i++)
+    {
+    const std::string paramKey(appKeyList[i]);
+    Parameter::Pointer param = m_Application->GetParameterByKey(paramKey);
+    ParameterType type = m_Application->GetParameterType(paramKey);
+    const bool paramExists(m_Parser->IsAttributExists(std::string("-").append(paramKey), m_VExpression));
+    std::vector<std::string> values;
 
     // When a parameter is mandatory :
     // it must be set if :
@@ -586,7 +607,7 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
         }
       else
         {
-        values = m_Parser->GetAttribut(std::string("-").append(paramKey), m_Expression);
+        values = m_Parser->GetAttribut(std::string("-").append(paramKey), m_VExpression);
         if (values.size() == 0 && !m_Application->HasValue(paramKey))
           {
           std::cerr << "ERROR: Missing mandatory parameter: " << paramKey << std::endl;
@@ -599,7 +620,7 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
       {
       if( paramExists )
         {
-        values = m_Parser->GetAttribut(std::string("-").append(paramKey), m_Expression);
+        values = m_Parser->GetAttribut(std::string("-").append(paramKey), m_VExpression);
         if (values.size() == 0)
           {
           std::cerr << "ERROR: Missing non-mandatory parameter: " << paramKey << std::endl;
@@ -607,12 +628,27 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
           }
         }
       }
+
+    // Check output paths validity
+    if (hasValue)
+      {
+      if (type == ParameterType_OutputFilename)
+        {
+        std::string filename = m_Application->GetParameterString(paramKey);
+        itksys::String path = itksys::SystemTools::GetFilenamePath(filename);
+        if (!itksys::SystemTools::FileIsDirectory(path.c_str()))
+          {
+          std::cerr <<"ERROR: Directory doesn't exist : "<< path.c_str() << std::endl;
+          return WRONGPARAMETERVALUE;
+          }
+        }
+      }
     }
 
   return OKPARAM;
 }
 
-void CommandLineLauncher::LinkWatchers(itk::Object * caller, const itk::EventObject & event)
+void CommandLineLauncher::LinkWatchers(itk::Object * itkNotUsed(caller), const itk::EventObject & event)
 {
   // Report the progress only if asked
   if (m_ReportProgress)
@@ -708,7 +744,7 @@ std::string CommandLineLauncher::DisplayParameterHelp(const Parameter::Pointer &
   //  - The param is not root and belonging to a Mandatory Group
   //    wich is activated
   bool isMissing = false;
-  if (!m_Parser->IsAttributExists(std::string("-").append(paramKey), m_Expression))
+  if (!m_Parser->IsAttributExists(std::string("-").append(paramKey), m_VExpression))
     {
     if (!m_Application->HasValue(paramKey))
       {
@@ -847,7 +883,8 @@ bool CommandLineLauncher::CheckUnicity()
 {
   bool res = true;
   // Extract expression keys
-  std::vector<std::string> keyList = m_Parser->GetKeyList(m_Expression);
+  //std::vector<std::string> keyList = m_Parser->GetKeyList(m_Expression);
+  std::vector<std::string> keyList = m_Parser->GetKeyList(m_VExpression);
 
   // Check Unicity
   for (unsigned int i = 0; i < keyList.size(); i++)
@@ -872,21 +909,22 @@ bool CommandLineLauncher::CheckUnicity()
 
 bool CommandLineLauncher::CheckParametersPrefix()
 {
-  bool res = true;
-  // Check if the chain " --" appears in the expression, could be a common mistake
-  if (m_Expression.find(" --") != std::string::npos )
+  // Check if the chain " --" appears in the args, could be a common mistake
+  for (std::vector<std::string>::iterator it = m_VExpression.begin(); it != m_VExpression.end(); ++it)
     {
-    res = false;
+    if (it->find("--") != std::string::npos )
+      {
+      return false;
+      }
     }
-
-  return res;
+  return true;
 }
 
 bool CommandLineLauncher::CheckKeyValidity(std::string& refKey)
 {
   bool res = true;
   // Extract expression keys
-  std::vector<std::string> expKeyList = m_Parser->GetKeyList(m_Expression);
+  std::vector<std::string> expKeyList = m_Parser->GetKeyList(m_VExpression);
 
   // Extract application keys
   std::vector<std::string> appKeyList = m_Application->GetParametersKeys(true);
@@ -935,9 +973,9 @@ void CommandLineLauncher::DisplayOutputParameters()
     }
 
 
-  if ( m_Parser->IsAttributExists("-testenv", m_Expression) )
+  if ( m_Parser->IsAttributExists("-testenv", m_VExpression) )
     {
-    std::vector<std::string> val = m_Parser->GetAttribut("-testenv", m_Expression);
+    std::vector<std::string> val = m_Parser->GetAttribut("-testenv", m_VExpression);
     if( val.size() == 1 )
       {
       std::ofstream ofs(val[0].c_str());
diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.h b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.h
index 40ecbc3..b0ce68a 100644
--- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.h
+++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.h
@@ -33,6 +33,8 @@
 
 #include "itkCommand.h"
 
+#include <vector>
+
 namespace otb
 {
 namespace Wrapper
@@ -49,7 +51,7 @@ namespace Wrapper
  * interpreted as a list.
  */
 
-class ITK_EXPORT CommandLineLauncher : public itk::Object
+class ITK_ABI_EXPORT CommandLineLauncher : public itk::Object
 {
 public:
   /** Standard class typedefs. */
@@ -84,6 +86,9 @@ public:
 
   /** same as Load method but set the expression before. */
   bool Load( const std::string & exp );
+  
+    /** same as Load method but set the expression before. */
+  bool Load(const std::vector<std::string> &vexp);
 
   /** Launch the process, using the Execute application method
    * The method will check if the user asked for help (looking at
@@ -168,7 +173,8 @@ private:
   std::string                       m_Path;
 
   Application::Pointer              m_Application;
-  std::string                       m_Expression;
+  //std::string                       m_Expression;
+  std::vector<std::string>          m_VExpression;
   CommandLineParser::Pointer        m_Parser;
 
   WatcherListType                   m_WatcherList;
diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.cxx
index 7ee818b..85d890e 100644
--- a/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.cxx
+++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.cxx
@@ -40,6 +40,27 @@ CommandLineParser::~CommandLineParser()
 }
 
 std::string
+CommandLineParser::GetPathsAsString(const std::vector<std::string> & vexp )
+{
+  std::string res;
+  std::vector<std::string> pathList;
+
+  if (this->GetPaths(pathList,vexp) == OK)
+    {
+    std::vector<std::string>::iterator it;
+    for (it=pathList.begin(); it!=pathList.end(); ++it)
+      {
+      if (!res.empty())
+        {
+        res.append(" ");
+        }
+      res.append(*it);
+      }
+    }
+  return res;
+}
+
+std::string
 CommandLineParser::GetPathsAsString( const std::string & exp )
 {
   std::string res;
@@ -69,6 +90,49 @@ CommandLineParser::GetPathsAsString( const std::string & exp )
 }
 
 CommandLineParser::ParseResultType
+CommandLineParser::GetPaths( std::vector<std::string> & paths, const std::vector<std::string> & exp )
+{
+  if (exp.empty())
+    {
+    return NOMODULEPATH;
+    }
+
+  // The first element must be the module name, non " -" allowed.
+  // The module path list elements are the strings between the first
+  // element and the first key (ie. string which begins with "-").
+  std::vector<std::string>::const_iterator it = exp.begin();
+  ++it; // first element is module name
+
+  std::string tmpPath;
+
+  while (it != exp.end())
+    {
+    tmpPath = *it;
+    // If this is the first key : exit loop
+    if (tmpPath[0]=='-')
+      {
+      break;
+      }
+    // Add path to result
+    std::string fullPath = itksys::SystemTools::CollapseFullPath(tmpPath.c_str());
+    if( !itksys::SystemTools::FileIsDirectory(fullPath.c_str()) )
+      {
+      std::cerr<<"Invalid module path: "<<fullPath<<std::endl;
+      return INVALIDMODULEPATH;
+      }
+    paths.push_back(fullPath);
+    ++it;
+    }
+
+  if (paths.empty())
+    {
+    return NOMODULEPATH;
+    }
+
+  return OK;
+}
+
+CommandLineParser::ParseResultType
 CommandLineParser::GetPaths( std::vector<std::string> & paths, const std::string & exp )
 {
   std::string pathsList = this->GetPathsAsString( exp );
@@ -118,6 +182,34 @@ CommandLineParser::GetPaths( std::vector<std::string> & paths, const std::string
   return OK;
 }
 
+CommandLineParser::ParseResultType
+CommandLineParser::GetModuleName( std::string & modName, const std::vector<std::string> & exp )
+{
+  if (exp.empty())
+    {
+    return NOMODULENAME;
+    }
+
+  itksys::RegularExpression reg;
+  reg.compile("([^0-9a-zA-Z])");
+  // The first element must be the module path, non " -" allowed.
+  if( exp[0][0] == '-')
+    {
+    return NOMODULENAME;
+    }
+  
+  // It must contain only alphanumerical character
+  if(reg.find(exp[0]))
+    {
+    return INVALIDMODULENAME;
+    }
+  else
+    {
+    modName = exp[0];
+    }
+      
+  return OK;
+}
 
 CommandLineParser::ParseResultType
 CommandLineParser::GetModuleName( std::string & modName, const std::string & exp )
@@ -162,6 +254,45 @@ CommandLineParser::GetModuleName( std::string & modName, const std::string & exp
   return OK;
 }
 
+std::vector<std::string>
+CommandLineParser::GetAttribut( const std::string & key, const std::vector<std::string> & exp )
+{
+  std::vector<std::string> res;
+  if (!this->IsAttributExists(key,exp))
+    return res;
+
+  bool foundKey=false;
+  std::vector<std::string>::const_iterator it = exp.begin();
+  while(it!=exp.end() )
+    {
+    if (foundKey)
+      {
+      if (it->find("-") == 0)
+        {
+        std::string tmpKey = it->substr(1,std::string::npos);
+        if (this->IsAValidKey(tmpKey))
+          {
+          break;
+          }
+        else
+          {
+          res.push_back(*it);
+          }
+        }
+      else
+        res.push_back(*it);
+      }
+    else
+      {
+      if (it->compare(key) == 0)
+        {
+        foundKey=true;
+        }
+      }
+    ++it;
+    }
+  return res;
+}
 
 std::vector<std::string>
 CommandLineParser::GetAttribut( const std::string & key, const std::string & exp )
@@ -254,6 +385,36 @@ CommandLineParser::GetAttribut( const std::string & key, const std::string & exp
 }
 
 std::string
+CommandLineParser::GetAttributAsString( const std::string & key, const std::vector<std::string> & exp )
+{
+  std::string res("");
+  std::vector<std::string> values = this->GetAttribut( key, exp );
+
+  if( values.size() == 0 )
+    {
+    return "";
+    }
+  else if( values.size() == 1 && values[0] == " " )
+    {
+    return "";
+    }
+
+  for( unsigned int i=0; i<values.size(); i++)
+    {
+    if( i<values.size()-1 )
+      {
+      res.append(values[i]);
+      res.append(" ");
+      }
+    else
+      {
+      res.append(values[i]);
+      }
+    }
+  return res;
+}
+
+std::string
 CommandLineParser::GetAttributAsString( const std::string & key, const std::string & exp )
 {
   std::string res("");
@@ -296,6 +457,36 @@ CommandLineParser::IsAttributExists( const std::string key, const std::string &
   return (found != std::string::npos);
 }
 
+bool
+CommandLineParser::IsAttributExists( const std::string key, const std::vector<std::string> & exp  )
+{
+  for (std::vector<std::string>::const_iterator it = exp.begin(); it != exp.end(); ++it)
+    {
+    if (it->compare(key) == 0)
+      return true;
+    }
+  return false;
+}
+
+std::vector<std::string>
+CommandLineParser::GetKeyList( const std::vector<std::string> & exp  )
+{
+  std::vector<std::string> keyList;
+  for (std::vector<std::string>::const_iterator it = exp.begin(); it != exp.end(); ++it)
+    {
+    if (it->find("-") == 0)
+      {
+      // Remove first character ('-')
+      std::string key = it->substr(1,std::string::npos);
+      if (this->IsAValidKey(key))
+        {
+        keyList.push_back(key);
+        }
+      }
+    }
+
+  return keyList;
+}
 
 std::vector<std::string>
 CommandLineParser::GetKeyList( const std::string & exp  )
@@ -335,18 +526,32 @@ CommandLineParser::IsAValidKey( const std::string & foundKey )
 {
   bool res = false;
   std::string tmp = foundKey;
-  if( tmp.find(".") != std::string::npos )
-    tmp.erase(tmp.find("."), tmp.find("."));
-
-  // To be a key, the string can't contain a number
+  // make sure the tested key ends with a dot.
+  // the starting dash should be already removed
+  tmp.append(".");
+
+  // To be a key, the string must be a serie of groups separated by dots so that :
+  // - each group has at least one character
+  // - each group contains only alphanumeric characters (and lowercase)
+  // - there is at least one group
+  // The following regular expression says just that
   itksys::RegularExpression reg;
-  reg.compile("([^0-9])");
-
+  reg.compile("^([a-z0-9]+\\.)+$");
   if( reg.find(tmp) )
     {
     res = true;
     }
 
+  // a second test is performed to detect negative numbers (even in
+  // scientific notation). Any key that matches the search pattern for a
+  // number is considered not valid.
+  itksys::RegularExpression regNum;
+  regNum.compile("^([0-9]+(\\.[0-9]*)?([eE][+-]?[0-9]+)?)$");
+  if( regNum.find(foundKey) )
+    {
+    res = false;
+    }
+  
   return res;
 }
 
diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.h b/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.h
index e84a721..83cca73 100644
--- a/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.h
+++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineParser.h
@@ -36,7 +36,7 @@ namespace Wrapper
  * After the attribut key, if the user give several values (expression without \"--\" separated by space), it will automacally be interpreted as a list.
  */
 
-class ITK_EXPORT CommandLineParser : public itk::Object
+class ITK_ABI_EXPORT CommandLineParser : public itk::Object
 {
 public:
   /** Standard class typedefs. */
@@ -57,22 +57,30 @@ public:
 
   /** Get the attribut associatd to a key (list of element after the key and before the next "--") as a vector of string. */
   std::vector<std::string> GetAttribut( const std::string & key, const std::string & exp );
+  std::vector<std::string> GetAttribut( const std::string & key, const std::vector<std::string> & exp );
   /** Get the attribut associatd to a key (list of element after the key and before the next "--") as a string separated by spaces. */
   std::string GetAttributAsString( const std::string & key, const std::string & exp );
-
+std::string GetAttributAsString( const std::string & key, const std::vector<std::string> & exp );
   /** Look if a given key is in an expression. */
   bool IsAttributExists(const std::string key, const std::string & exp );
-
+bool IsAttributExists(const std::string key, const std::vector<std::string> & exp);
+ 
   /** Get the paths executables in an expression. Store the list in a vector of string. */
   CommandLineParser::ParseResultType GetPaths( std::vector<std::string> & paths, const std::string & exp );
+  CommandLineParser::ParseResultType GetPaths( std::vector<std::string> & paths, const std::vector<std::string> & exp );
+
   /** Get the paths executables in an expression. Store the list in a vector of string. */
   std::string GetPathsAsString( const std::string & exp );
+  std::string GetPathsAsString( const std::vector<std::string> & vexp );
+ 
 
   /** Get the module name in an expression. It can be the first element of the expression (if the expression doesn't start with a "--" or the attribut associated to the key m_ModuleNameKey). */
   CommandLineParser::ParseResultType GetModuleName( std::string & modName, const std::string & exp );
-
+CommandLineParser::ParseResultType GetModuleName( std::string & modName, const std::vector<std::string> & exp );
+ 
   /** Get the list of keys in an expression. That is to say each word starting by "--". */
   std::vector<std::string> GetKeyList( const std::string & exp );
+  std::vector<std::string> GetKeyList( const std::vector<std::string> & exp);
 
 protected:
   /** Constructor */
diff --git a/Code/Wrappers/QtWidget/itkQtProgressBar.h b/Code/Wrappers/QtWidget/itkQtProgressBar.h
index 5a0f879..cb757fc 100644
--- a/Code/Wrappers/QtWidget/itkQtProgressBar.h
+++ b/Code/Wrappers/QtWidget/itkQtProgressBar.h
@@ -22,7 +22,7 @@
 
 namespace itk {
 
-class QtProgressBar : public ::QProgressBar
+class ITK_ABI_EXPORT QtProgressBar : public ::QProgressBar
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbQtApplication.h b/Code/Wrappers/QtWidget/otbQtApplication.h
index e38ff3d..879482b 100644
--- a/Code/Wrappers/QtWidget/otbQtApplication.h
+++ b/Code/Wrappers/QtWidget/otbQtApplication.h
@@ -21,11 +21,12 @@
 
 #include <QtGui>
 #include <QString>
+#include "itkMacro.h"
 namespace otb
 {
 namespace Wrapper
 {
-class QtApplication : public QApplication
+class ITK_ABI_EXPORT QtApplication : public QApplication
 {
   Q_OBJECT
 
diff --git a/Code/Wrappers/QtWidget/otbQtFileSelectionWidget.h b/Code/Wrappers/QtWidget/otbQtFileSelectionWidget.h
index afdfbfa..334b90c 100644
--- a/Code/Wrappers/QtWidget/otbQtFileSelectionWidget.h
+++ b/Code/Wrappers/QtWidget/otbQtFileSelectionWidget.h
@@ -32,7 +32,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtFileSelectionWidget : public QWidget
+class ITK_ABI_EXPORT QtFileSelectionWidget : public QWidget
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbQtLogOutput.h b/Code/Wrappers/QtWidget/otbQtLogOutput.h
index 1239709..8ff0849 100644
--- a/Code/Wrappers/QtWidget/otbQtLogOutput.h
+++ b/Code/Wrappers/QtWidget/otbQtLogOutput.h
@@ -32,7 +32,7 @@ namespace otb
  *
  */
 
-class ITK_EXPORT QtLogOutput : public QObject, public itk::LogOutput
+class ITK_ABI_EXPORT QtLogOutput : public QObject, public itk::LogOutput
 {
 Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbQtStringSelectionWidget.h b/Code/Wrappers/QtWidget/otbQtStringSelectionWidget.h
index 424d5e9..853e39f 100644
--- a/Code/Wrappers/QtWidget/otbQtStringSelectionWidget.h
+++ b/Code/Wrappers/QtWidget/otbQtStringSelectionWidget.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtStringSelectionWidget : public QWidget
+class ITK_ABI_EXPORT QtStringSelectionWidget : public QWidget
 {
   Q_OBJECT
 
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.h
index c00e71d..eff4909 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetChoiceParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetChoiceParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetComplexInputImageParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetComplexInputImageParameter.h
index a2611e1..c0e60e3 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetComplexInputImageParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetComplexInputImageParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetComplexInputImageParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetComplexInputImageParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetComplexOutputImageParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetComplexOutputImageParameter.h
index b1ad425..8e7136e 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetComplexOutputImageParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetComplexOutputImageParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetComplexOutputImageParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetComplexOutputImageParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetDirectoryParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetDirectoryParameter.h
index ec7b0af..7122c57 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetDirectoryParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetDirectoryParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetDirectoryParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetDirectoryParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h
index d8b8180..388e9af 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h
@@ -30,7 +30,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetEmptyParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetEmptyParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h
index 3c1b5a0..0961e8e 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h
@@ -30,7 +30,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetFloatParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetFloatParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameListParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameListParameter.cxx
index 6c4a346..1e3f328 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameListParameter.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameListParameter.cxx
@@ -304,6 +304,8 @@ QtWidgetInputFilenameListParameter::AddFile()
   m_Scroll->setWidget(mainGroup);
 
   this->update();
+
+  emit FileSelectionWidgetAdded( fileSelection );
 }
 
 void
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameListParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameListParameter.h
index b421b6f..8765761 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameListParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameListParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetInputFilenameListParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetInputFilenameListParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
@@ -41,6 +41,7 @@ public:
 
 signals:
   void Change();
+  void FileSelectionWidgetAdded( QWidget * );
 
 protected slots:
   //void SetFileName( const QString& value );
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameParameter.h
index 36f4776..110a82b 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputFilenameParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetInputFilenameParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetInputFilenameParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageListParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageListParameter.cxx
index 68917ac..7e9b335 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageListParameter.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageListParameter.cxx
@@ -313,13 +313,20 @@ QtWidgetInputImageListParameter::AddFile()
   m_FileSelectionList.push_back(fileSelection);
   /* No need of AddNullElement() here. Moved adding NullElement when updating the list  */
   //m_InputImageListParam->AddNullElement();
-  connect(fileSelection->GetInput(), SIGNAL(textChanged(const QString&)), this, SLOT(UpdateImageList()));
+  connect(
+    fileSelection->GetInput(),
+    SIGNAL( textChanged( const QString & ) ),
+    this,
+    SLOT( UpdateImageList() )
+  );
 
   QGroupBox *mainGroup = new QGroupBox();
   mainGroup->setLayout(m_FileLayout);
   m_Scroll->setWidget(mainGroup);
 
   this->update();
+
+  emit FileSelectionWidgetAdded( fileSelection );
 }
 
 void
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageListParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageListParameter.h
index 6bc1093..7cfeaad 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageListParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageListParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetInputImageListParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetInputImageListParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
@@ -41,6 +41,7 @@ public:
 
 signals:
   void Change();
+  void FileSelectionWidgetAdded( QWidget * );
 
 protected slots:
   //void SetFileName( const QString& value );
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageParameter.h
index 0d8469c..b8b2b87 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputImageParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetInputImageParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetInputImageParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputProcessXMLParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputProcessXMLParameter.h
index ef0402f..7b0831e 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputProcessXMLParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputProcessXMLParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetInputProcessXMLParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetInputProcessXMLParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataListParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataListParameter.cxx
index 56647c9..0b3802f 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataListParameter.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataListParameter.cxx
@@ -304,6 +304,8 @@ QtWidgetInputVectorDataListParameter::AddFile()
   m_Scroll->setWidget(mainGroup);
 
   this->update();
+
+  emit FileSelectionWidgetAdded( fileSelection );
 }
 
 void
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataListParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataListParameter.h
index 39b83df..803da92 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataListParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataListParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetInputVectorDataListParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetInputVectorDataListParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
@@ -41,6 +41,7 @@ public:
 
 signals:
   void Change();
+  void FileSelectionWidgetAdded( QWidget * );
 
 protected slots:
   //void SetFileName( const QString& value );
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataParameter.h
index 0974e36..e6c5932 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetInputVectorDataParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetInputVectorDataParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetInputVectorDataParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h
index 24bbe35..07afe6b 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetIntParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetIntParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetListViewParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetListViewParameter.h
index a9a872d..8bb40d6 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetListViewParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetListViewParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetListViewParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetListViewParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetModel.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetModel.h
index 04e2858..54efc50 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetModel.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetModel.h
@@ -28,7 +28,7 @@ namespace otb
 namespace Wrapper
 {
 
-class AppliThread : public QThread
+class ITK_ABI_EXPORT AppliThread : public QThread
 {
  Q_OBJECT
 
@@ -76,7 +76,7 @@ private:
 /** \class
  * \brief
  */
-class QtWidgetModel : public QObject
+class ITK_ABI_EXPORT QtWidgetModel : public QObject
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputFilenameParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputFilenameParameter.h
index f78e1e4..d7d0d82 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputFilenameParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputFilenameParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetOutputFilenameParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetOutputFilenameParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.h
index ed9912f..f0ac256 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetOutputImageParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetOutputImageParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputProcessXMLParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputProcessXMLParameter.h
index 4a270ad..dea76ac 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputProcessXMLParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputProcessXMLParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetOutputProcessXMLParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetOutputProcessXMLParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputVectorDataParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputVectorDataParameter.h
index c4dd687..662b089 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputVectorDataParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputVectorDataParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetOutputVectorDataParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetOutputVectorDataParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.cxx
index e7c843b..b4c3496 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.cxx
@@ -63,7 +63,7 @@ void QtWidgetParameterBase::UpdateGUI()
     }
 }
 
-void QtWidgetParameterBase::ParameterChanged(const QString& key)
+void QtWidgetParameterBase::ParameterChanged(const QString& itkNotUsed(key))
 {
   m_Param->SetUserValue(true);
 }
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.h
index 860e84e..d06652d 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.h
@@ -30,7 +30,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetParameterBase : public QWidget
+class ITK_ABI_EXPORT QtWidgetParameterBase : public QWidget
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.h
index c7d3523..2f593c3 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.h
@@ -34,7 +34,7 @@ class QtWidgetParameterBase;
 /** \class ImageIOFactory
  * \brief Create instances of ImageIO objects using an object factory.
  */
-class ITK_EXPORT QtWidgetParameterFactory : public itk::Object
+class ITK_ABI_EXPORT QtWidgetParameterFactory : public itk::Object
 {
 public:
   /** Standard class typedefs. */
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.h
index da2ddaf..ff8f8ed 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.h
@@ -35,7 +35,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetParameterGroup : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetParameterGroup : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterLabel.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterLabel.h
index 7803cc9..7e4484b 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterLabel.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterLabel.h
@@ -29,7 +29,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetParameterLabel : public QWidget
+class ITK_ABI_EXPORT QtWidgetParameterLabel : public QWidget
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetProgressReport.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetProgressReport.cxx
index 5e67e04..2fff9e1 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetProgressReport.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetProgressReport.cxx
@@ -56,7 +56,7 @@ void QtWidgetProgressReport::SetApplication(Application::Pointer app)
 }
 
 void
-QtWidgetProgressReport::ProcessEvent( itk::Object * caller,
+QtWidgetProgressReport::ProcessEvent( itk::Object * itkNotUsed(caller),
                                       const itk::EventObject & event )
 {
   if( typeid( otb::Wrapper::AddProcessToWatchEvent ) == typeid( event ) )
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetProgressReport.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetProgressReport.h
index 81cc71d..9a43f91 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetProgressReport.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetProgressReport.h
@@ -36,7 +36,7 @@ namespace Wrapper
  * \brief Create a widget reporting the progress of the application
  *        process.
  */
-class QtWidgetProgressReport : public QWidget
+class ITK_ABI_EXPORT QtWidgetProgressReport : public QWidget
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetRAMParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetRAMParameter.h
index 8101af9..36d563b 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetRAMParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetRAMParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetRAMParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetRAMParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetSimpleProgressReport.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetSimpleProgressReport.cxx
index 2cd8d11..3394487 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetSimpleProgressReport.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetSimpleProgressReport.cxx
@@ -63,7 +63,7 @@ void QtWidgetSimpleProgressReport::SetApplication(Application::Pointer app)
 }
 
 void
-QtWidgetSimpleProgressReport::ProcessEvent( itk::Object * caller,
+QtWidgetSimpleProgressReport::ProcessEvent( itk::Object * itkNotUsed(caller),
                                       const itk::EventObject & event )
 {
   if( typeid( otb::Wrapper::AddProcessToWatchEvent ) == typeid( event ) )
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetSimpleProgressReport.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetSimpleProgressReport.h
index 6e371e7..a3c1ba4 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetSimpleProgressReport.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetSimpleProgressReport.h
@@ -35,7 +35,7 @@ namespace Wrapper
  * \brief Create a widget reporting the progress of the application
  *        process.
  */
-class QtWidgetSimpleProgressReport : public QWidget
+class ITK_ABI_EXPORT QtWidgetSimpleProgressReport : public QWidget
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetStringListParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetStringListParameter.h
index 5dd6d5f..8421176 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetStringListParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetStringListParameter.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetStringListParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetStringListParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetStringParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetStringParameter.h
index b01db75..8b1a9e7 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetStringParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetStringParameter.h
@@ -30,7 +30,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetStringParameter : public QtWidgetParameterBase
+class ITK_ABI_EXPORT QtWidgetStringParameter : public QtWidgetParameterBase
 {
   Q_OBJECT
 public:
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.h
index 5723733..5762562 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.h
@@ -31,7 +31,7 @@ namespace Wrapper
 /** \class
  * \brief
  */
-class QtWidgetView : public QWidget
+class ITK_ABI_EXPORT QtWidgetView : public QWidget
 {
   Q_OBJECT
 public:
diff --git a/Examples/BasicFilters/BandMathFilterExample.cxx b/Examples/BasicFilters/BandMathFilterExample.cxx
index d775d13..47a2920 100644
--- a/Examples/BasicFilters/BandMathFilterExample.cxx
+++ b/Examples/BasicFilters/BandMathFilterExample.cxx
@@ -88,7 +88,6 @@ int main( int argc, char* argv[])
   typedef otb::VectorImage<PixelType, 2>                                  InputImageType;
   typedef otb::Image<PixelType, 2>                                        OutputImageType;
   typedef otb::ImageList<OutputImageType>                                 ImageListType;
-  typedef OutputImageType::PixelType                                      VPixelType;
   typedef otb::VectorImageToImageListFilter<InputImageType, ImageListType>
   VectorImageToImageListType;
   typedef otb::ImageFileReader<InputImageType>                            ReaderType;
diff --git a/Examples/Classification/ClassificationMapRegularizationExample.cxx b/Examples/Classification/ClassificationMapRegularizationExample.cxx
index 3a62e45..87af11d 100644
--- a/Examples/Classification/ClassificationMapRegularizationExample.cxx
+++ b/Examples/Classification/ClassificationMapRegularizationExample.cxx
@@ -46,7 +46,7 @@
 #include "itkTimeProbe.h"
 
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
 // Software Guide : BeginLatex
 //
diff --git a/Examples/Classification/KMeansImageClassificationExample.cxx b/Examples/Classification/KMeansImageClassificationExample.cxx
index 96fe8c3..cd01749 100644
--- a/Examples/Classification/KMeansImageClassificationExample.cxx
+++ b/Examples/Classification/KMeansImageClassificationExample.cxx
@@ -34,7 +34,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
   const char *       infname = argv[1];
   const char *       outfname = argv[2];
diff --git a/Examples/Classification/SOMImageClassificationExample.cxx b/Examples/Classification/SOMImageClassificationExample.cxx
index 14e0d79..fb00fb7 100644
--- a/Examples/Classification/SOMImageClassificationExample.cxx
+++ b/Examples/Classification/SOMImageClassificationExample.cxx
@@ -38,7 +38,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * somfname = argv[2];
diff --git a/Examples/Classification/ScalarImageKmeansModelEstimator.cxx b/Examples/Classification/ScalarImageKmeansModelEstimator.cxx
index 0f6bef4..b48f6e6 100644
--- a/Examples/Classification/ScalarImageKmeansModelEstimator.cxx
+++ b/Examples/Classification/ScalarImageKmeansModelEstimator.cxx
@@ -91,7 +91,6 @@ int main(int argc, char * argv[])
   adaptor->SetImage(reader->GetOutput());
 
   // Define the Measurement vector type from the AdaptorType
-  typedef AdaptorType::MeasurementVectorType MeasurementVectorType;
 
   // Create the K-d tree structure
   typedef itk::Statistics::WeightedCentroidKdTreeGenerator<
diff --git a/Examples/Classification/SupervisedImageClassificationExample.cxx b/Examples/Classification/SupervisedImageClassificationExample.cxx
index ff5f57f..f4bee89 100644
--- a/Examples/Classification/SupervisedImageClassificationExample.cxx
+++ b/Examples/Classification/SupervisedImageClassificationExample.cxx
@@ -44,7 +44,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * modelfname = argv[2];
diff --git a/Examples/DataRepresentation/Image/ImageListExample.cxx b/Examples/DataRepresentation/Image/ImageListExample.cxx
index 6181a7a..18a4576 100644
--- a/Examples/DataRepresentation/Image/ImageListExample.cxx
+++ b/Examples/DataRepresentation/Image/ImageListExample.cxx
@@ -43,7 +43,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
 
   const char * inputFilename = argv[1];
diff --git a/Examples/DimensionReduction/ICAExample.cxx b/Examples/DimensionReduction/ICAExample.cxx
index e3f572f..e92b8ec 100644
--- a/Examples/DimensionReduction/ICAExample.cxx
+++ b/Examples/DimensionReduction/ICAExample.cxx
@@ -53,7 +53,7 @@
 // Software Guide : EndCodeSnippet
 
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Examples/DimensionReduction/MNFExample.cxx b/Examples/DimensionReduction/MNFExample.cxx
index 337dfb4..07230bc 100644
--- a/Examples/DimensionReduction/MNFExample.cxx
+++ b/Examples/DimensionReduction/MNFExample.cxx
@@ -65,7 +65,7 @@
 // Software Guide : EndCodeSnippet
 
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx b/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx
index 8b3cf6f..48b89dd 100644
--- a/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx
+++ b/Examples/DimensionReduction/MaximumAutocorrelationFactor.cxx
@@ -47,7 +47,7 @@
 #include "otbMaximumAutocorrelationFactorImageFilter.h"
 //  Software Guide : EndCodeSnippet
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
   char * infname   = argv[1];
   char * outfname  = argv[2];
diff --git a/Examples/DimensionReduction/NAPCAExample.cxx b/Examples/DimensionReduction/NAPCAExample.cxx
index 6e85f4b..10a6559 100644
--- a/Examples/DimensionReduction/NAPCAExample.cxx
+++ b/Examples/DimensionReduction/NAPCAExample.cxx
@@ -66,7 +66,7 @@
 // Software Guide : EndCodeSnippet
 
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Examples/DimensionReduction/PCAExample.cxx b/Examples/DimensionReduction/PCAExample.cxx
index 040982f..effc860 100644
--- a/Examples/DimensionReduction/PCAExample.cxx
+++ b/Examples/DimensionReduction/PCAExample.cxx
@@ -43,7 +43,7 @@
 #include "otbPCAImageFilter.h"
 // Software Guide : EndCodeSnippet
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Examples/DisparityMap/FineRegistrationImageFilterExample.cxx b/Examples/DisparityMap/FineRegistrationImageFilterExample.cxx
index 4b4ba8e..d90b9b2 100644
--- a/Examples/DisparityMap/FineRegistrationImageFilterExample.cxx
+++ b/Examples/DisparityMap/FineRegistrationImageFilterExample.cxx
@@ -73,8 +73,6 @@ int main(int argc, char** argv)
   typedef double                              PixelType;
   typedef itk::Vector<double, ImageDimension> DisplacementPixelType;
 
-  typedef double CoordinateRepresentationType;
-
   typedef unsigned char                               OutputPixelType;
   typedef otb::Image<OutputPixelType, ImageDimension> OutputImageType;
 
diff --git a/Examples/DisparityMap/NCCRegistrationFilterExample.cxx b/Examples/DisparityMap/NCCRegistrationFilterExample.cxx
index 6347f36..64e7888 100644
--- a/Examples/DisparityMap/NCCRegistrationFilterExample.cxx
+++ b/Examples/DisparityMap/NCCRegistrationFilterExample.cxx
@@ -67,8 +67,6 @@ int main(int argc, char** argv)
   typedef double                              PixelType;
   typedef itk::Vector<double, ImageDimension> DisplacementPixelType;
 
-  typedef double CoordinateRepresentationType;
-
   typedef unsigned char                               OutputPixelType;
   typedef otb::Image<OutputPixelType, ImageDimension> OutputImageType;
 
diff --git a/Examples/DisparityMap/SimpleDisparityMapEstimationExample.cxx b/Examples/DisparityMap/SimpleDisparityMapEstimationExample.cxx
index aa2bb92..36e0fba 100644
--- a/Examples/DisparityMap/SimpleDisparityMapEstimationExample.cxx
+++ b/Examples/DisparityMap/SimpleDisparityMapEstimationExample.cxx
@@ -159,10 +159,6 @@ int main(int argc, char* argv[])
   // Software Guide : EndCodeSnippet
 
   typedef PointSetType::PointType                    PointType;
-  typedef PointSetType::PointsContainer::Iterator    PointSetIteratorType;
-  typedef PointSetType::PointsContainer              PointsContainerType;
-  typedef PointSetType::PointDataContainer::Iterator PointDataIteratorType;
-  typedef PointSetType::PointDataContainer           PointDataContainerType;
 
   // Software Guide : BeginLatex
   //
diff --git a/Examples/DisparityMap/StereoReconstructionExample.cxx b/Examples/DisparityMap/StereoReconstructionExample.cxx
index fa493ee..c7e9220 100644
--- a/Examples/DisparityMap/StereoReconstructionExample.cxx
+++ b/Examples/DisparityMap/StereoReconstructionExample.cxx
@@ -76,12 +76,6 @@ int main(int argc, char* argv[])
   typedef otb::Image<float,2>                 FloatImageType;
   typedef otb::VectorImage<float,2>           FloatVectorImageType;
 
-  typedef otb::ImageList<FloatImageType>      ImageListType;
-
-  typedef otb::ImageListToVectorImageFilter
-    <ImageListType,
-     FloatVectorImageType>                    ImageListToVectorImageFilterType;
-
   typedef otb::ImageFileReader
     <FloatImageType>                          ImageReaderType;
 
@@ -274,7 +268,7 @@ int main(int argc, char* argv[])
   #else
   std::string leftExpr = "if(inleft != 0,255,0)";
   #endif
-  
+
   m_LBandMathFilter->SetExpression(leftExpr);
 
   BandMathFilterType::Pointer m_RBandMathFilter = BandMathFilterType::New();
diff --git a/Examples/FeatureExtraction/ComplexMomentPathExample.cxx b/Examples/FeatureExtraction/ComplexMomentPathExample.cxx
index 867ab4f..3da44a3 100644
--- a/Examples/FeatureExtraction/ComplexMomentPathExample.cxx
+++ b/Examples/FeatureExtraction/ComplexMomentPathExample.cxx
@@ -56,8 +56,6 @@ int main(int argc, char * argv[])
   unsigned int P((unsigned char) ::atoi(argv[1]));
   unsigned int Q((unsigned char) ::atoi(argv[2]));
 
-  typedef unsigned char InputPixelType;
-
   //  Software Guide : BeginLatex
   //
   //  The \doxygen{otb}{ComplexMomentPathFunction} is templated over the
diff --git a/Examples/FeatureExtraction/EdgeDensityExample.cxx b/Examples/FeatureExtraction/EdgeDensityExample.cxx
index cf66968..dc3db25 100644
--- a/Examples/FeatureExtraction/EdgeDensityExample.cxx
+++ b/Examples/FeatureExtraction/EdgeDensityExample.cxx
@@ -59,7 +59,7 @@
 #include "otbBinaryImageDensityFunction.h"
 // Software Guide : EndCodeSnippet
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
 
   const char * infname       = argv[1];
diff --git a/Examples/FeatureExtraction/ExtractRoadByStepsExample.cxx b/Examples/FeatureExtraction/ExtractRoadByStepsExample.cxx
index b15f278..dd66a2e 100644
--- a/Examples/FeatureExtraction/ExtractRoadByStepsExample.cxx
+++ b/Examples/FeatureExtraction/ExtractRoadByStepsExample.cxx
@@ -73,7 +73,7 @@
 //    228 316 207 282 0.00005 1.0
 //  Software Guide : EndCommandLineArgs
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
 
   const unsigned int Dimension = 2;
@@ -82,7 +82,6 @@ int main(int argc, char * argv[])
   typedef itk::CovariantVector<PixelType, Dimension> VectorPixelType;
   typedef otb::Image<PixelType, Dimension>           InternalImageType;
   typedef otb::VectorImage<PixelType, Dimension>     MultiSpectralImageType;
-  typedef otb::Image<OutputPixelType, Dimension>     OutputImageType;
   typedef otb::Image<VectorPixelType, Dimension>     VectorImageType;
 
   typedef otb::PolyLineParametricPathWithValue<double, Dimension> PathType;
@@ -384,12 +383,10 @@ int main(int argc, char * argv[])
 
   // Software Guide : BeginCodeSnippet
   InternalImageType::Pointer output = InternalImageType::New();
-  output->SetRegions(multispectralReader->GetOutput()
-                     ->GetLargestPossibleRegion());
+  output->CopyInformation(multispectralReader->GetOutput());
+  output->SetRegions(output->GetLargestPossibleRegion());
   output->Allocate();
   output->FillBuffer(0.0);
-  output->SetOrigin(multispectralReader->GetOutput()->GetOrigin());
-  output->SetSpacing(multispectralReader->GetOutput()->GetSpacing());
   // Software Guide : EndCodeSnippet
 
   // Software Guide : BeginLatex
diff --git a/Examples/FeatureExtraction/ExtractRoadExample.cxx b/Examples/FeatureExtraction/ExtractRoadExample.cxx
index 29c6708..b65efd1 100644
--- a/Examples/FeatureExtraction/ExtractRoadExample.cxx
+++ b/Examples/FeatureExtraction/ExtractRoadExample.cxx
@@ -64,9 +64,9 @@ int main(int argc, char * argv[])
     std::cerr <<
     " inputFileName outputFileName firstPixelComponent secondPixelComponent ";
     std::cerr <<
-    "thirdPixelComponent fourthPixelComponent amplitudeThrehsold tolerance ";
+    "thirdPixelComponent fourthPixelComponent alpha amplitudeThrehsold tolerance ";
     std::cerr <<
-    "angularThreshold firstMeanDistanceThreshold secondMeanDistanceThreshold ";
+    "angularThreshold-maxAngle firstMeanDistanceThreshold secondMeanDistanceThreshold ";
     std::cerr << "distanceThreshold" << std::endl;
     return EXIT_FAILURE;
     }
@@ -286,7 +286,8 @@ int main(int argc, char * argv[])
   // Software Guide : BeginCodeSnippet
   reader->GenerateOutputInformation();
   InputImageType::Pointer blackBackground = InputImageType::New();
-  blackBackground->SetRegions(reader->GetOutput()->GetLargestPossibleRegion());
+  blackBackground->CopyInformation(reader->GetOutput());
+  blackBackground->SetRegions(blackBackground->GetLargestPossibleRegion());
   blackBackground->Allocate();
   blackBackground->FillBuffer(0);
   // Software Guide : EndCodeSnippet
diff --git a/Examples/FeatureExtraction/ExtractSegmentsByStepsExample.cxx b/Examples/FeatureExtraction/ExtractSegmentsByStepsExample.cxx
index ee00912..7e9b681 100644
--- a/Examples/FeatureExtraction/ExtractSegmentsByStepsExample.cxx
+++ b/Examples/FeatureExtraction/ExtractSegmentsByStepsExample.cxx
@@ -88,8 +88,6 @@ int main(int argc, char * argv[])
   typedef otb::Image<OutputPixelType,  2>   OutputImageType;
   // Software Guide : EndCodeSnippet
 
-  typedef otb::LineSpatialObjectList LinesListType;
-
   //  Software Guide : BeginLatex
   //
   //  The filter can be instantiated using the image types defined above.
diff --git a/Examples/FeatureExtraction/LocalHoughExample.cxx b/Examples/FeatureExtraction/LocalHoughExample.cxx
index 3e02352..b350a4b 100644
--- a/Examples/FeatureExtraction/LocalHoughExample.cxx
+++ b/Examples/FeatureExtraction/LocalHoughExample.cxx
@@ -78,8 +78,6 @@ int main(int argc, char * argv[])
   typedef otb::Image<OutputPixelType,  2>   OutputImageType;
   // Software Guide : EndCodeSnippet
 
-  typedef otb::LineSpatialObjectList LinesListType;
-
   //  Software Guide : BeginLatex
   //
   //  The filter can be instantiated using the image types defined above.
diff --git a/Examples/FeatureExtraction/SFSExample.cxx b/Examples/FeatureExtraction/SFSExample.cxx
index 07ddd0b..1895197 100644
--- a/Examples/FeatureExtraction/SFSExample.cxx
+++ b/Examples/FeatureExtraction/SFSExample.cxx
@@ -45,7 +45,7 @@
 #include "otbSFSTexturesImageFilter.h"
 // Software Guide : EndCodeSnippet
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Examples/FeatureExtraction/SeamCarvingExample.cxx b/Examples/FeatureExtraction/SeamCarvingExample.cxx
index ed19ca1..74b53a9 100644
--- a/Examples/FeatureExtraction/SeamCarvingExample.cxx
+++ b/Examples/FeatureExtraction/SeamCarvingExample.cxx
@@ -48,7 +48,7 @@
 
 #include "itkImageDuplicator.h"
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
 
   typedef float         InputPixelType;
diff --git a/Examples/FeatureExtraction/SeamCarvingOtherExample.cxx b/Examples/FeatureExtraction/SeamCarvingOtherExample.cxx
index 5384fd0..1fdedcc 100644
--- a/Examples/FeatureExtraction/SeamCarvingOtherExample.cxx
+++ b/Examples/FeatureExtraction/SeamCarvingOtherExample.cxx
@@ -50,7 +50,7 @@
 #include "itkImageDuplicator.h"
 #include "otbObjectList.h"
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
 
   typedef float         InputPixelType;
diff --git a/Examples/Filtering/GeometriesChangeSpatialReference.cxx b/Examples/Filtering/GeometriesChangeSpatialReference.cxx
index 661a281..a896631 100644
--- a/Examples/Filtering/GeometriesChangeSpatialReference.cxx
+++ b/Examples/Filtering/GeometriesChangeSpatialReference.cxx
@@ -51,25 +51,15 @@ struct ReprojectTransformationFunctor
   typedef OGRGeometry TransformedElementType;
 
   otb::ogr::UniqueGeometryPtr operator()(OGRGeometry const* in) const;
-  void SetSpatialReferenceFromWkt(std::string const& wkt)
-    {
-    m_osr .reset (static_cast<OGRSpatialReference*>(OSRNewSpatialReference(wkt.c_str())));
-    }
-  //TODO: find a way to call it from DoProcessLayer
-  void UpdateTransformation(OGRSpatialReference & in)
-    {
-    SetSpatialReferences(in, *m_osr);
-    }
-private:
-  void SetSpatialReferences(OGRSpatialReference & in, OGRSpatialReference & out)
+  void SetTransformation(OGRSpatialReference & in, OGRSpatialReference & out)
     {
     m_reprojector.reset(OGRCreateCoordinateTransformation(&in, &out));
     }
+
+private:
   boost::interprocess::unique_ptr<OGRCoordinateTransformation, internal::Deleters> m_reprojector;
-  boost::interprocess::unique_ptr<OGRSpatialReference,         internal::Deleters> m_osr;
 };
 
-
 otb::ogr::UniqueGeometryPtr
 ReprojectTransformationFunctor::operator()(OGRGeometry const* in) const
 {
@@ -77,7 +67,7 @@ ReprojectTransformationFunctor::operator()(OGRGeometry const* in) const
   if (out)
     {
     const OGRErr err = out->transform(m_reprojector.get());
-    if (!err != OGRERR_NONE)
+    if (err != OGRERR_NONE)
       {
       itkGenericExceptionMacro(<< "Cannot reproject a geometry: " << CPLGetLastErrorMsg());
       }
@@ -86,9 +76,72 @@ ReprojectTransformationFunctor::operator()(OGRGeometry const* in) const
 }
 
 /*===========================================================================*/
+/*==========================[ reprojection filter ]==========================*/
+/*===========================================================================*/
+class MyReprojectionFilter : public otb::DefaultGeometriesToGeometriesFilter<ReprojectTransformationFunctor>
+{
+public:
+  typedef MyReprojectionFilter            Self;
+  typedef otb::DefaultGeometriesToGeometriesFilter<ReprojectTransformationFunctor> Superclass;
+  typedef itk::SmartPointer<Self>                                Pointer;
+  typedef itk::SmartPointer<const Self>                          ConstPointer;
+
+  itkNewMacro(Self);
+  itkTypeMacro(MyReprojectionFilter, otb::DefaultGeometriesToGeometriesFilter);
+
+  void SetOutputSpatialReference(std::string const& srs);
+
+  void UpdateTransformation(OGRSpatialReference &in)
+    {
+    (*this)->SetTransformation(in, *m_osr);
+    }
+
+protected:
+  /** Default constructor. */
+  MyReprojectionFilter(){ }
+  /** Destructor. */
+  virtual ~MyReprojectionFilter(){ }
+
+private:
+
+  virtual OGRSpatialReference*     DoDefineNewLayerSpatialReference(otb::ogr::Layer const& itkNotUsed(source)) const
+    {
+    return m_osr.get();
+    }
+
+  boost::interprocess::unique_ptr<OGRSpatialReference,         internal::Deleters> m_osr;
+};
+
+
+void
+MyReprojectionFilter::SetOutputSpatialReference(std::string const& srs)
+{
+  OGRSpatialReference outSrs;
+
+  char *name = const_cast<char *>(srs.c_str());
+
+  OGRErr ret = outSrs.importFromWkt(&name);
+  if (ret)
+    {
+    ret = outSrs.importFromProj4(name);
+    }
+  if (ret)
+    {
+    ret = outSrs.importFromEPSG(atoi(name));
+    }
+
+  if (ret)
+    {
+    std::cout << "Error : spatial reference system not recognized ("<<srs<<")" << std::endl;
+    }
+
+  m_osr .reset (outSrs.Clone());
+}
+
+/*===========================================================================*/
 /*=================================[ main ]==================================*/
 /*===========================================================================*/
-typedef otb::DefaultGeometriesToGeometriesFilter<ReprojectTransformationFunctor> FilterType;
+typedef MyReprojectionFilter FilterType;
 
 struct Options
 {
@@ -97,13 +150,16 @@ struct Options
     workingInplace = true;
     outputIsStdout = false;
 
-    std::string inputFile = argv[1];
-    std::string outputFile = workingInplace ? argv[1] : argv[2];
-
     for (int a=1; a!=argc; ++a)
       {
-      if (!strcmp(argv[a], "-wkt"))
-        wkt = argv[a];
+      if (!strcmp(argv[a], "-srs"))
+        {
+        if (a+1 < argc)
+          {
+          ++a;
+          srs = argv[a];
+          }
+        }
       else if (!strcmp(argv[a], "-"))
         outputIsStdout = true;
       else if (inputFile.empty())
@@ -119,16 +175,16 @@ struct Options
 
     if (!outputFile.empty() && outputIsStdout)
       throw std::runtime_error(usage(argv[0])+"An output file ("+outputFile+") has already been set, cannot dump to stdout");
-    if (inputFile.empty())
+    if (inputFile.empty() || srs.empty())
       throw std::runtime_error(usage(argv[0])+"Not enough parameters");
     }
   static std::string usage(std::string const& progname)
     {
-    return progname + " <inputGeometriesFile> [<outputGeometriesFile>] -wkt <id>\n";
+    return progname + " <inputGeometriesFile> [<outputGeometriesFile>] -srs <id>\n";
     }
   std::string inputFile;
   std::string outputFile;
-  std::string wkt;
+  std::string srs;
   bool        workingInplace;
   bool        outputIsStdout;
 };
@@ -150,7 +206,7 @@ int main (int argc, char **argv)
     otb::ogr::DataSource::Pointer output
       = options.workingInplace ? input
       : options.outputIsStdout ? 0
-      :                  otb::ogr::DataSource::New( options.outputFile, otb::ogr::DataSource::Modes::Update_LayerCreateOnly);
+      : otb::ogr::DataSource::New( options.outputFile, otb::ogr::DataSource::Modes::Update_LayerCreateOnly);
     std::cout << "input: " << input -> ogr().GetName() << " should be: " << options.inputFile << "\n";
     if (output)
       {
@@ -160,7 +216,8 @@ int main (int argc, char **argv)
 
     FilterType::Pointer filter = FilterType::New();
     // TODO: this make no sense for in-place transformations
-    (*filter)->SetSpatialReferenceFromWkt(options.wkt);
+    filter->SetOutputSpatialReference(options.srs);
+    filter->UpdateTransformation( *(const_cast<OGRSpatialReference*>(input->GetLayer(0).GetSpatialRef())) );
 
     if (!options.workingInplace)
       {
diff --git a/Examples/Fusion/BayesianFusionImageFilter.cxx b/Examples/Fusion/BayesianFusionImageFilter.cxx
index 0a5d426..e5d458c 100644
--- a/Examples/Fusion/BayesianFusionImageFilter.cxx
+++ b/Examples/Fusion/BayesianFusionImageFilter.cxx
@@ -211,16 +211,11 @@ int main(int argc, char *argv[])
   typedef otb::VectorRescaleIntensityImageFilter<OutputImageType,
       OutputVectorImageType>
   VectorRescalerBayesianType;
-  typedef otb::Image<OutputPixelType2,
-      Dimension>
-  PanchroOutputImageType;
   typedef otb::ImageToVectorImageCastFilter<PanchroImageType,
       MultiSpecImageType> CasterType;
   typedef otb::MultiChannelExtractROI<OutputPixelType2,
       OutputPixelType2>
   ChannelExtractorType;
-  typedef otb::ImageFileWriter<PanchroOutputImageType>
-  WriterType2;
 
   multiSpectReader->GenerateOutputInformation();
   multiSpectInterpReader->GenerateOutputInformation();
diff --git a/Examples/Hyperspectral/HyperspectralUnmixingExample.cxx b/Examples/Hyperspectral/HyperspectralUnmixingExample.cxx
index 423acc7..6c4ca29 100644
--- a/Examples/Hyperspectral/HyperspectralUnmixingExample.cxx
+++ b/Examples/Hyperspectral/HyperspectralUnmixingExample.cxx
@@ -60,8 +60,6 @@ int main(int argc, char * argv[])
   const unsigned int Dimension = 2;
 
   typedef double                                                      PixelType;
-  typedef otb::VectorImage<unsigned char, 2>                          OutputPrettyImageType;
-
   // Software Guide : BeginLatex
   //
   // We start by defining the types for the images and the reader and
@@ -78,12 +76,8 @@ int main(int argc, char * argv[])
   // Software Guide : EndCodeSnippet
 
   typedef otb::VectorRescaleIntensityImageFilter<ImageType, ImageType> RescalerType;
-  typedef otb::StreamingStatisticsVectorImageFilter<ImageType>        StreamingStatisticsVectorImageFilterType;
   typedef otb::VectorImageToMatrixImageFilter<ImageType>              VectorImageToMatrixImageFilterType;
 
-  typedef vnl_vector<double> VectorType;
-  typedef vnl_matrix<double> MatrixType;
-
   // Software Guide : BeginLatex
   //
   // We instantiate now the image reader and we set the image file name.
diff --git a/Examples/IO/HDFReaderExample.cxx b/Examples/IO/HDFReaderExample.cxx
index fa6a351..652d890 100644
--- a/Examples/IO/HDFReaderExample.cxx
+++ b/Examples/IO/HDFReaderExample.cxx
@@ -49,7 +49,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
 // Software Guide : EndCodeSnippet
 
diff --git a/Examples/IO/MetadataExample.cxx b/Examples/IO/MetadataExample.cxx
index 1f5c47b..bd0ef8f 100644
--- a/Examples/IO/MetadataExample.cxx
+++ b/Examples/IO/MetadataExample.cxx
@@ -43,7 +43,7 @@
 #include "otbImage.h"
 #include "otbImageFileReader.h"
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
 
   // Verify the number of parameters in the command line
diff --git a/Examples/IO/OGRWrappersExample.cxx b/Examples/IO/OGRWrappersExample.cxx
index 94ff182..23afc27 100644
--- a/Examples/IO/OGRWrappersExample.cxx
+++ b/Examples/IO/OGRWrappersExample.cxx
@@ -265,7 +265,7 @@ AnyListFieldList_t prepareNewFields(
   OGRFeatureDefn /*const*/& defn, otb::ogr::Layer & destLayer)
 {
   AnyListFieldList_t fields;
-  for (size_t i=0, N=defn.GetFieldCount(); i!=N; ++i)
+  for (int i=0, N=defn.GetFieldCount(); i!=N; ++i)
     {
     const char* name = defn.GetFieldDefn(i)->GetNameRef();
     OGRFieldType type  = static_cast<OGRFieldType>(-1);
diff --git a/Examples/IO/VectorDataIOExample.cxx b/Examples/IO/VectorDataIOExample.cxx
index e373bdc..6d7be2f 100644
--- a/Examples/IO/VectorDataIOExample.cxx
+++ b/Examples/IO/VectorDataIOExample.cxx
@@ -122,11 +122,8 @@ int main(int argc, char * argv[])
 
 // Software Guide : BeginCodeSnippet
   typedef otb::Polygon<double>                     PolygonType;
-  typedef PolygonType::VertexListConstIteratorType PolygonIteratorType;
   typedef otb::ObjectList<PolygonType>             PolygonListType;
 
-  typedef PolygonListType::Iterator PolygonListIteratorType;
-
   PolygonListType::Pointer polygonList = PolygonListType::New();
 // Software Guide : EndCodeSnippet
 //  Software Guide : BeginLatex
diff --git a/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx b/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx
index 8ff2da2..8fc87a9 100644
--- a/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx
+++ b/Examples/Iterators/ImageLinearIteratorWithIndex2.cxx
@@ -89,7 +89,6 @@ int main(int argc, char *argv[])
 
   typedef Image4DType::IndexType   Index4DType;
   typedef Image4DType::SizeType    Size4DType;
-  typedef Image4DType::RegionType  Region4DType;
   typedef Image4DType::SpacingType Spacing4DType;
   typedef Image4DType::PointType   Origin4DType;
 
diff --git a/Examples/Learning/SOMExample.cxx b/Examples/Learning/SOMExample.cxx
index c98708a..ce300f9 100644
--- a/Examples/Learning/SOMExample.cxx
+++ b/Examples/Learning/SOMExample.cxx
@@ -77,7 +77,7 @@
 #include "otbImageFileWriter.h"
 #include "itkListSample.h"
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFileName = argv[1];
   const char * outputFileName = argv[2];
diff --git a/Examples/Learning/SVMGenericKernelImageClassificationExample.cxx b/Examples/Learning/SVMGenericKernelImageClassificationExample.cxx
index 9f6bd08..c2e7a77 100644
--- a/Examples/Learning/SVMGenericKernelImageClassificationExample.cxx
+++ b/Examples/Learning/SVMGenericKernelImageClassificationExample.cxx
@@ -64,7 +64,6 @@ int main(int argc, char* argv[])
   const char * outputFilename = argv[2];
 
   typedef double                 PixelType;
-  typedef std::vector<PixelType> VectorType;
   typedef int                    LabelPixelType;
 
   const unsigned int Dimension = 2;
diff --git a/Examples/Learning/SVMImageClassificationExample.cxx b/Examples/Learning/SVMImageClassificationExample.cxx
index d37b97e..159091c 100644
--- a/Examples/Learning/SVMImageClassificationExample.cxx
+++ b/Examples/Learning/SVMImageClassificationExample.cxx
@@ -82,7 +82,6 @@ int main(int argc, char* argv[])
 
 // Software Guide : BeginCodeSnippet
   typedef double                 PixelType;
-  typedef std::vector<PixelType> VectorType;
   typedef int                    LabelPixelType;
 // Software Guide : EndCodeSnippet
   const unsigned int Dimension = 2;
diff --git a/Examples/Learning/SVMImageEstimatorClassificationMultiExample.cxx b/Examples/Learning/SVMImageEstimatorClassificationMultiExample.cxx
index 9f71bcc..a5f5946 100644
--- a/Examples/Learning/SVMImageEstimatorClassificationMultiExample.cxx
+++ b/Examples/Learning/SVMImageEstimatorClassificationMultiExample.cxx
@@ -63,7 +63,7 @@
 
 #include "otbImageFileReader.h"
 
-int main(int argc, char *argv[])
+int main(int itkNotUsed(argc), char *argv[])
 {
 
   const char* inputImageFileName = argv[1];
diff --git a/Examples/Learning/SVMImageModelEstimatorExample.cxx b/Examples/Learning/SVMImageModelEstimatorExample.cxx
index e660da2..6dabad0 100644
--- a/Examples/Learning/SVMImageModelEstimatorExample.cxx
+++ b/Examples/Learning/SVMImageModelEstimatorExample.cxx
@@ -53,7 +53,7 @@
 
 #include "otbImageFileReader.h"
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
 
   const char* inputImageFileName = argv[1];
diff --git a/Examples/Learning/SVMPointSetClassificationExample.cxx b/Examples/Learning/SVMPointSetClassificationExample.cxx
index 2b92c80..8b3968f 100644
--- a/Examples/Learning/SVMPointSetClassificationExample.cxx
+++ b/Examples/Learning/SVMPointSetClassificationExample.cxx
@@ -46,7 +46,7 @@
 #include "otbSVMClassifier.h"
 //  Software Guide : EndCodeSnippet
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
 // Software Guide : BeginLatex
 //
@@ -76,8 +76,6 @@ int main(int argc, char* argv[])
 
 // Software Guide : BeginCodeSnippet
   typedef itk::PointSet<InputVectorType,  Dimension> MeasurePointSetType;
-
-  typedef itk::PointSet<LabelPixelType,  Dimension> LabelPointSetType;
 // Software Guide : EndCodeSnippet
 
 // Software Guide : BeginLatex
@@ -91,10 +89,7 @@ int main(int argc, char* argv[])
 
 // Software Guide : BeginCodeSnippet
   typedef MeasurePointSetType::PointType MeasurePointType;
-  typedef LabelPointSetType::PointType   LabelPointType;
-
   typedef MeasurePointSetType::PointsContainer MeasurePointsContainer;
-  typedef LabelPointSetType::PointsContainer   LabelPointsContainer;
 
   MeasurePointSetType::Pointer    tPSet = MeasurePointSetType::New();
   MeasurePointsContainer::Pointer tCont = MeasurePointsContainer::New();
diff --git a/Examples/Learning/SVMPointSetExample.cxx b/Examples/Learning/SVMPointSetExample.cxx
index b73d1c2..9508609 100644
--- a/Examples/Learning/SVMPointSetExample.cxx
+++ b/Examples/Learning/SVMPointSetExample.cxx
@@ -27,7 +27,7 @@
 #include "itkListSample.h"
 #include "otbSVMClassifier.h"
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
 
   typedef float InputPixelType;
diff --git a/Examples/Learning/SVMPointSetModelEstimatorExample.cxx b/Examples/Learning/SVMPointSetModelEstimatorExample.cxx
index 86cdaa2..453e04e 100644
--- a/Examples/Learning/SVMPointSetModelEstimatorExample.cxx
+++ b/Examples/Learning/SVMPointSetModelEstimatorExample.cxx
@@ -36,7 +36,7 @@
 #include "otbSVMPointSetModelEstimator.h"
 // Software Guide : EndCodeSnippet
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
 
 // Software Guide : BeginLatex
diff --git a/Examples/Learning/TrainMachineLearningModelFromImagesExample.cxx b/Examples/Learning/TrainMachineLearningModelFromImagesExample.cxx
index 9c76b68..7392cfd 100644
--- a/Examples/Learning/TrainMachineLearningModelFromImagesExample.cxx
+++ b/Examples/Learning/TrainMachineLearningModelFromImagesExample.cxx
@@ -52,7 +52,7 @@
 //#include "otbShiftScaleSampleListFilter.h"
 
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
   const char* inputImageFileName = argv[1];
   const char* trainingShpFileName = argv[2];
@@ -60,13 +60,8 @@ int main(int argc, char* argv[])
 
   typedef unsigned int InputPixelType;
   const unsigned int Dimension = 2;
-
-
   typedef otb::VectorImage<InputPixelType,  Dimension> InputImageType;
-  typedef otb::Image<InputImageType::InternalPixelType, 2> ImageType;
-
   typedef otb::VectorData<double, 2>                   VectorDataType;
-
   typedef otb::ImageFileReader<InputImageType>         InputReaderType;
   typedef otb::VectorDataFileReader<VectorDataType>    VectorDataReaderType;
 
@@ -189,4 +184,3 @@ int main(int argc, char* argv[])
 // Software Guide : EndLatex
 
 }
-
diff --git a/Examples/Learning/TrainMachineLearningModelFromSamplesExample.cxx b/Examples/Learning/TrainMachineLearningModelFromSamplesExample.cxx
index ecfc1bf..8f248ef 100644
--- a/Examples/Learning/TrainMachineLearningModelFromSamplesExample.cxx
+++ b/Examples/Learning/TrainMachineLearningModelFromSamplesExample.cxx
@@ -76,7 +76,7 @@ int main(int argc, char* argv[])
   int nbClasses = 4;
   // Software Guide : EndCodeSnippet
 
-  unsigned int inputSeed = 121212;
+//  unsigned int inputSeed = 121212;
   const char* outputModelFileName = argv[1]; //argv[5];
 
 
@@ -180,4 +180,3 @@ int main(int argc, char* argv[])
   // Software Guide : EndCodeSnippet
 
 }
-
diff --git a/Examples/MultiScale/MorphologicalPyramidSegmentationExample.cxx b/Examples/MultiScale/MorphologicalPyramidSegmentationExample.cxx
index 5bdcf75..1933d77 100644
--- a/Examples/MultiScale/MorphologicalPyramidSegmentationExample.cxx
+++ b/Examples/MultiScale/MorphologicalPyramidSegmentationExample.cxx
@@ -73,7 +73,7 @@
 #include "otbImage.h"
 #include "itkMacro.h"
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
 
   const char*        inputFilename = argv[1];
diff --git a/Examples/MultiScale/MorphologicalPyramidSegmenterExample.cxx b/Examples/MultiScale/MorphologicalPyramidSegmenterExample.cxx
index 2d012c4..612222c 100644
--- a/Examples/MultiScale/MorphologicalPyramidSegmenterExample.cxx
+++ b/Examples/MultiScale/MorphologicalPyramidSegmenterExample.cxx
@@ -49,7 +49,7 @@
 #include "itkUnaryFunctorImageFilter.h"
 #include "itkScalarToRGBPixelFunctor.h"
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
 
   const char*        inputFilename = argv[1];
diff --git a/Examples/OBIA/KeepNObjects.cxx b/Examples/OBIA/KeepNObjects.cxx
index d3e5463..6e0bfc8 100644
--- a/Examples/OBIA/KeepNObjects.cxx
+++ b/Examples/OBIA/KeepNObjects.cxx
@@ -71,8 +71,6 @@ int main(int argc, char * argv[])
 
   typedef itk::StatisticsLabelMapFilter<LabelMapType,
       IType>    LabelObjectValuatorType;
-  typedef  LabelObjectType::AttributeType
-  AttributeType;
   typedef  itk::StatisticsKeepNObjectsLabelMapFilter<LabelMapType>
   KeepNObjectsType;
   typedef  itk::LabelMapToLabelImageFilter<LabelMapType,
diff --git a/Examples/OBIA/LabelMapToVectorData.cxx b/Examples/OBIA/LabelMapToVectorData.cxx
index 4e13b90..1546ed9 100644
--- a/Examples/OBIA/LabelMapToVectorData.cxx
+++ b/Examples/OBIA/LabelMapToVectorData.cxx
@@ -106,15 +106,7 @@ int main(int argc, char * argv[])
   typedef itk::LabelImageToLabelMapFilter<LabeledImageType,
       LabelMapType>
   LabelMapFilterType;
-  typedef otb::Polygon<double>
-  PolygonType;
-  typedef otb::Functor::LabelObjectToPolygonFunctor<LabelObjectType,
-      PolygonType> FunctorType;
-  // Software Guide : EndCodeSnippet
-  typedef VectorDataType::DataNodeType DataNodeType;
-
-  typedef otb::VectorDataProjectionFilter<VectorDataType,
-      VectorDataType> VectorDataFilterType;
+ // Software Guide : EndCodeSnippet
 
   LabeledReaderType::Pointer lreader = LabeledReaderType::New();
   WriterType::Pointer        writer = WriterType::New();
diff --git a/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx b/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx
index d53ba47..2e625f4 100644
--- a/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx
+++ b/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx
@@ -114,9 +114,6 @@ int main(int argc, char * argv[])
   typedef otb::ShapeAttributesLabelMapFilter<LabelMapType>
   ShapeLabelMapFilterType;
   typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType,
-      ImageType>
-  StatisticsLabelMapFilterType;
-  typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType,
       VectorImageType>
   RadiometricLabelMapFilterType;
   typedef otb::AttributesMapOpeningLabelMapFilter<LabelMapType>
diff --git a/Examples/Patented/EstimateAffineTransformationExample.cxx b/Examples/Patented/EstimateAffineTransformationExample.cxx
index c138ab4..f798071 100644
--- a/Examples/Patented/EstimateAffineTransformationExample.cxx
+++ b/Examples/Patented/EstimateAffineTransformationExample.cxx
@@ -137,14 +137,11 @@ int main(int argc, char* argv[])
   // Software Guide : BeginCodeSnippet
   typedef PointSetType::PointType         PointType;
   typedef std::pair<PointType, PointType> MatchType;
-  typedef std::vector<MatchType>          MatchVectorType;
   typedef EuclideanDistanceMetricMatchingFilterType::LandmarkListType
   LandmarkListType;
 
   typedef PointSetType::PointsContainer    PointsContainerType;
-  typedef PointsContainerType::Iterator    PointsIteratorType;
   typedef PointSetType::PointDataContainer PointDataContainerType;
-  typedef PointDataContainerType::Iterator PointDataIteratorType;
   // Software Guide : EndCodeSnippet
 
   // Software Guide : BeginLatex
diff --git a/Examples/Patented/SIFTDensityExample.cxx b/Examples/Patented/SIFTDensityExample.cxx
index 129773b..d5859f8 100644
--- a/Examples/Patented/SIFTDensityExample.cxx
+++ b/Examples/Patented/SIFTDensityExample.cxx
@@ -48,7 +48,7 @@
 // Software Guide : EndCodeSnippet
 #include "otbImageToSIFTKeyPointSetFilter.h"
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
   const char *       infname = argv[1];
   const char *       outfname = argv[2];
diff --git a/Examples/Patented/SIFTDisparityMapEstimation.cxx b/Examples/Patented/SIFTDisparityMapEstimation.cxx
index cc7981e..64c3a04 100644
--- a/Examples/Patented/SIFTDisparityMapEstimation.cxx
+++ b/Examples/Patented/SIFTDisparityMapEstimation.cxx
@@ -127,11 +127,6 @@ int main(int argc, char* argv[])
   typedef std::vector<MatchType>          MatchVectorType;
   typedef EuclideanDistanceMetricMatchingFilterType::LandmarkListType
   LandmarkListType;
-
-  typedef PointSetType::PointsContainer    PointsContainerType;
-  typedef PointsContainerType::Iterator    PointsIteratorType;
-  typedef PointSetType::PointDataContainer PointDataContainerType;
-  typedef PointDataContainerType::Iterator PointDataIteratorType;
   // Software Guide : EndCodeSnippet
 
   // Software Guide : BeginLatex
@@ -318,8 +313,6 @@ int main(int argc, char* argv[])
   //
   // Software Guide : EndLatex
   // Software Guide : BeginCodeSnippet
-  typedef DisplacementSourceType::LandmarkContainerPointer
-  LandmarkContainerPointer;
   typedef DisplacementSourceType::LandmarkContainer
   LandmarkContainerType;
   typedef DisplacementSourceType::LandmarkPointType LandmarkPointType;
diff --git a/Examples/Patented/SIFTExample.cxx b/Examples/Patented/SIFTExample.cxx
index 9cfd050..f495b88 100644
--- a/Examples/Patented/SIFTExample.cxx
+++ b/Examples/Patented/SIFTExample.cxx
@@ -120,8 +120,6 @@ int main(int argc, char * argv[])
 // Software Guide : BeginCodeSnippet
   typedef PointSetType::PointsContainer    PointsContainerType;
   typedef PointsContainerType::Iterator    PointsIteratorType;
-  typedef PointSetType::PointDataContainer PointDataContainerType;
-  typedef PointDataContainerType::Iterator PointDataIteratorType;
 // Software Guide : EndCodeSnippet
 
 // Software Guide : BeginLatex
diff --git a/Examples/Projections/EstimateRPCSensorModelExample.cxx b/Examples/Projections/EstimateRPCSensorModelExample.cxx
index a91d622..b92829d 100644
--- a/Examples/Projections/EstimateRPCSensorModelExample.cxx
+++ b/Examples/Projections/EstimateRPCSensorModelExample.cxx
@@ -134,9 +134,9 @@ int main(int argc, char* argv[])
 
   // Software Guide : BeginLatex
   // Note that the \doxygen{otb}{GCPsToRPCSensorModelImageFilter} needs
-  // at least 16 GCPs to estimate a proper RPC sensor model,
+  // at least 20 GCPs to estimate a proper RPC sensor model,
   // although no warning will be reported to the user if
-  // the number of GCPs is lower than 16.
+  // the number of GCPs is lower than 20.
   // Actual estimation of the sensor model takes place in the
   // \code{GenerateOutputInformation()} method.
   // Software Guide : EndLatex
diff --git a/Examples/README.txt b/Examples/README.txt
index b45e63d..ead4138 100644
--- a/Examples/README.txt
+++ b/Examples/README.txt
@@ -24,42 +24,6 @@ Specifically, the purpose of these examples is as follows:
    * Make sure that the code is well documented, of consistent style, and
      always up-to-date with the current OTB code.
 
-The following is a list of subdirectories with a description of the code
-found in them.
-
-   * Installation - a very simple example to demonstrate compiling against
-     the OTB libraries and configuring CMake.
-
-   * DataRepresentation - creating images and meshes; shows the basics of
-     creating and executing the pipeline
-
-   * Iterators - iterating over images and meshes.
-   
-   * IO - the basics of reading/writing data.
-
-   * Filtering - examples of image processing and mesh filters.
-
-   * FeatureExtraction - examples of low-level information extraction.
-
-   * ChangeDetection - detecting changes between pairs of images.
-
-   * Learning - Support Vector Machine examples.
-   
-   * MultiScale - Multiscale examples.
-
-   * Classification - simple examples of image classification.
-
-   * Segmentation - a suite of basic segmentation examples.
-
-   * Visu - simple examples for image visualization.
-   
-   * Fusion - Image fusion examples.
-
-   
-
-   
-
-
 To learn the software from these examples, you may wish to refer to the
 "ORFEO Toolbox Software Guide".
 
diff --git a/Examples/Radiometry/AtmosphericCorrectionSequencement.cxx b/Examples/Radiometry/AtmosphericCorrectionSequencement.cxx
index 6403506..ed65d71 100644
--- a/Examples/Radiometry/AtmosphericCorrectionSequencement.cxx
+++ b/Examples/Radiometry/AtmosphericCorrectionSequencement.cxx
@@ -43,7 +43,17 @@
 // \end{itemize}
 //
 // The manipulation of each class used for the different steps and the
-// link with the 6S radiometry library will be explained.
+// link with the 6S radiometry library will be explained. In particular,
+// the API modifications that have been made in version 4.2 will be
+// detailed. There was several reasons behind these modifications :
+// \begin{itemize}
+// \item fix design issues in the framework that were causing trouble
+// when setting the atmospheric parameters
+// \item allow the computation of the radiative terms by other libraries
+// than 6S (such as SMAC method).
+// \item allow the users of the OpticalCalibration application to set
+// and override each correction parameter.
+// \end{itemize}
 //
 // Let's look at the minimal code required to use this
 // algorithm. First, the following header defining the
@@ -58,21 +68,40 @@
 #include "otbImageToLuminanceImageFilter.h"
 #include "otbLuminanceToReflectanceImageFilter.h"
 #include "otbReflectanceToSurfaceReflectanceImageFilter.h"
-#include "otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.h"
+#include "otbSurfaceAdjacencyEffectCorrectionSchemeFilter.h"
 // Software Guide : EndCodeSnippet
 
 // Software Guide : BeginLatex
+// In version 4.2, the class \code{SurfaceAdjacencyEffect6SCorrectionSchemeFilter}
+// has been renamed into \doxygen{otb}{SurfaceAdjacencyEffectCorrectionSchemeFilter},
+// but it still does the same thing.
+//
 // This chain uses the 6S radiative
-// transfer code to compute radiometric parameters. To manipulate 6S
-// data, three classes are needed (the first one to store the metadata,
-// the second one that calls 6S class and generates the information
-// which will be stored in the last one).
+// transfer code to compute radiative terms (for instance upward and
+// downward transmittance). The inputs needed are separated into
+// two categories :
+// \begin{itemize}
+// \item The atmospheric correction parameters : physical parameters of the
+// atmosphere when the image was taken (for instance : atmospheric pressure,
+// water vapour amount, aerosol data, ...). They are stored in the class
+// \footnote{Before version 4.2, this class was storing all correction
+// parameters} \doxygen{otb}{AtmosphericCorrectionParameters}.
+// \item The acquisition correction parameters : sensor related information
+// about the way the image was taken, usualy available with the image
+// metadata (for instance : solar angles, spectral
+// sensitivity, ...). They are stored in the class
+// \doxygen{otb}{ImageMetadataCorrectionParameters}.
+// \end{itemize}
+//
+// The class \doxygen{otb}{RadiometryCorrectionParametersToAtmisphericRadiativeTerms}
+// computes the radiative terms using these two types of parameters. It
+// contains a single static method that calls the 6S library. The header
+// also includes the classes to manipulate correction parameters and radiative
+// terms.
 // Software Guide : EndLatex
 
 // Software Guide : BeginCodeSnippet
-#include "otbAtmosphericCorrectionParameters.h"
-#include "otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h"
-#include "otbAtmosphericRadiativeTerms.h"
+#include "otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h"
 // Software Guide : EndCodeSnippet
 
 #include "otbVectorImage.h"
@@ -220,7 +249,7 @@ int main(int argc, char *argv[])
   // $d_{0}$ from the Earth;
   // \item $d/d_{0}$ is the ratio between the Earth-Sun distance at
   // the acquisition date and the mean Earth-Sun distance. The ratio can be directly
-  // given to the class or computed using a 6S routine.
+  // given to the class or computed using a 6S routine. TODO
   // In the last case (that is the one of this example), the user has to precise
   // the month and the day of the acquisition.
   // \end{itemize}
@@ -266,29 +295,35 @@ int main(int argc, char *argv[])
 //-------------------------------
 // Software Guide : BeginLatex
 //
-// At this step of the chain, radiometric informations are nedeed. Those informations
-// will be computed from different parameters stored in a
-// \doxygen{otb}{AtmosphericCorrectionParameters} class intance.
-// This {\em container} will be given to an
-// \doxygen{otb}{AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms}
-// class instance which will call a 6S routine that will compute the needed
+// At this step of the chain, radiative information are nedeed to compute
+// the contribution of the atmosphere (such as atmosphere transmittance
+// and reflectance). Those information will be computed from different
+// correction parameters stored in \doxygen{otb}{AtmosphericCorrectionParameters}
+// and \doxygen{otb}{ImageMetadataCorrectionParameters} instances.
+// These {\em containers} will be given to the static function \texttt{Compute}
+// from \doxygen{otb}{RadiometryCorrectionParametersToAtmosphericRadiativeTerms}
+// class, which will call a 6S routine that will compute the needed
 // radiometric informations and store them in a
 // \doxygen{otb}{AtmosphericRadiativeTerms} class instance.
 // For this,
-// \doxygen{otb}{AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms}
-// \doxygen{otb}{AtmosphericCorrectionParameters} and
+// \doxygen{otb}{RadiometryCorrectionParametersToAtmosphericRadiativeTerms},
+// \doxygen{otb}{AtmosphericCorrectionParameters},
+// \doxygen{otb}{ImageMetadataCorrectionParameters} and
 // \doxygen{otb}{AtmosphericRadiativeTerms}
 // types are defined and instancied.
 //
 // Software Guide : EndLatex
 
   // Software Guide : BeginCodeSnippet
-  typedef otb::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
-  AtmosphericCorrectionParametersTo6SRadiativeTermsType;
+  typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms
+  RadiometryCorrectionParametersToRadiativeTermsType;
 
   typedef otb::AtmosphericCorrectionParameters
   AtmosphericCorrectionParametersType;
 
+  typedef otb::ImageMetadataCorrectionParameters
+  AcquisitionCorrectionParametersType;
+
   typedef otb::AtmosphericRadiativeTerms
   AtmosphericRadiativeTermsType;
   // Software Guide : EndCodeSnippet
@@ -302,6 +337,9 @@ int main(int argc, char *argv[])
   AtmosphericCorrectionParametersType::Pointer
     dataAtmosphericCorrectionParameters =
     AtmosphericCorrectionParametersType::New();
+  AcquisitionCorrectionParametersType::Pointer
+    dataAcquisitionCorrectionParameters =
+    AcquisitionCorrectionParametersType::New();
   AtmosphericRadiativeTermsType::Pointer dataAtmosphericRadiativeTerms =
     AtmosphericRadiativeTermsType::New();
 
@@ -336,7 +374,7 @@ int main(int argc, char *argv[])
     functionValues->SetMinSpectralValue(minSpectralValue);
     functionValues->SetMaxSpectralValue(maxSpectralValue);
     functionValues->SetUserStep(userStep);
-    dataAtmosphericCorrectionParameters->SetWavelengthSpectralBandWithIndex(
+    dataAcquisitionCorrectionParameters->SetWavelengthSpectralBandWithIndex(
       i,
       functionValues);
     }
@@ -345,47 +383,64 @@ int main(int argc, char *argv[])
 
   // Software Guide : BeginLatex
   //
-  // The \doxygen{otb}{AtmosphericCorrectionParameters} class needs several parameters :
-  //  \begin{itemize}
+  // The \doxygen{otb}{ImageMetadataCorrectionParameters} class stores
+  // several parameters that are generaly present in the image metadata :
+  // \begin{itemize}
   // \item The zenithal and azimutal solar angles that describe the solar incidence
   // configuration (in degrees);
   // \item The zenithal and azimuthal viewing angles that describe the viewing
   // direction (in degrees);
   // \item The month and the day of the acquisition;
-  // \item The atmospheric pressure;
-  // \item The water vapor amount, that is, the total water vapor content over vertical
-  // atmospheric column;
-  // \item The ozone amount that is the Stratospheric ozone layer content;
-  // \item The aerosol model that is the kind of particles (no aerosol, continental,
-  // maritime, urban, desertic);
-  // \item The aerosol optical thickness at 550 nm that is the is the Radiative impact
-  //  of aerosol for the reference wavelength 550 nm;
   // \item The filter function that is the values of the filter function for one
   // spectral band, from $\lambda_{inf}$ to $\lambda_{sup}$ by step of 2.5 nm.
   // One filter function by channel is required.
   // This last parameter are read in text files, the other one are directly given to the class.
   // \end{itemize}
   //
+  // When this container is not set in the ReflectanceToSurfaceReflectance
+  // filter, it is automatically filled using the image metadata. The
+  // following lines show that it is also possible to set the values manually.
+  //
   // Software Guide : EndLatex
 
   // Set parameters
   // Software Guide : BeginCodeSnippet
-  dataAtmosphericCorrectionParameters->SetSolarZenithalAngle(
+  dataAcquisitionCorrectionParameters->SetSolarZenithalAngle(
     static_cast<double>(atof(argv[6])));
 
-  dataAtmosphericCorrectionParameters->SetSolarAzimutalAngle(
+  dataAcquisitionCorrectionParameters->SetSolarAzimutalAngle(
     static_cast<double>(atof(argv[9])));
 
-  dataAtmosphericCorrectionParameters->SetViewingZenithalAngle(
+  dataAcquisitionCorrectionParameters->SetViewingZenithalAngle(
     static_cast<double>(atof(argv[10])));
 
-  dataAtmosphericCorrectionParameters->SetViewingAzimutalAngle(
+  dataAcquisitionCorrectionParameters->SetViewingAzimutalAngle(
     static_cast<double>(atof(argv[11])));
 
-  dataAtmosphericCorrectionParameters->SetMonth(atoi(argv[8]));
+  dataAcquisitionCorrectionParameters->SetMonth(atoi(argv[8]));
+
+  dataAcquisitionCorrectionParameters->SetDay(atoi(argv[7]));
+  // Software Guide : EndCodeSnippet
 
-  dataAtmosphericCorrectionParameters->SetDay(atoi(argv[7]));
+  // Software Guide : BeginLatex
+  //
+  // The \doxygen{otb}{AtmosphericCorrectionParameters} class stores
+  // physical parameters of the atmosphere that are not impacted
+  // by the viewing angles of the image :
+  // \begin{itemize}
+  // \item The atmospheric pressure;
+  // \item The water vapor amount, that is, the total water vapor content over vertical
+  // atmospheric column;
+  // \item The ozone amount that is the Stratospheric ozone layer content;
+  // \item The aerosol model that is the kind of particles (no aerosol, continental,
+  // maritime, urban, desertic);
+  // \item The aerosol optical thickness at 550 nm that is the is the Radiative impact
+  //  of aerosol for the reference wavelength 550 nm;
+  // \end{itemize}
+  //
+  // Software Guide : EndLatex
 
+  // Software Guide : BeginCodeSnippet
   dataAtmosphericCorrectionParameters->SetAtmosphericPressure(
     static_cast<double>(atof(argv[12])));
 
@@ -406,27 +461,26 @@ int main(int argc, char *argv[])
 
   // Software Guide : BeginLatex
   //
-  // Once those parameters are loaded and stored in the AtmosphericCorrectionParameters
-  // instance class, it is given in input of an instance of
-  // AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms that will compute
-  // the needed radiometric informations.
+  // Once those parameters are loaded, they are used by the 6S library
+  // to compute the needed radiometric informations. The
+  // RadiometryCorrectionParametersToAtmosphericRadiativeTerms class
+  // provides a static function to perform this step\footnote{Before version
+  // 4.2, it was done with the filter
+  // AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms}.
   //
   // Software Guide : EndLatex
 
 // Software Guide : BeginCodeSnippet
-  AtmosphericCorrectionParametersTo6SRadiativeTermsType::Pointer
-    filterAtmosphericCorrectionParametersTo6SRadiativeTerms =
-    AtmosphericCorrectionParametersTo6SRadiativeTermsType::New();
-
-  filterAtmosphericCorrectionParametersTo6SRadiativeTerms->SetInput(
-    dataAtmosphericCorrectionParameters);
-
-  filterAtmosphericCorrectionParametersTo6SRadiativeTerms->Update();
+  AtmosphericRadiativeTermsType::Pointer atmosphericRadiativeTerms =
+    RadiometryCorrectionParametersToRadiativeTermsType::Compute(
+      dataAtmosphericCorrectionParameters,
+      dataAcquisitionCorrectionParameters);
   // Software Guide : EndCodeSnippet
 
   // Software Guide : BeginLatex
   //
-  // The output of this class will be an instance of the AtmosphericRadiativeTerms class.
+  // The output is stored inside an instance of the
+  // \doxygen{otb}{AtmosphericRadiativeTerms} class.
   // This class contains (for each channel of the image)
   // \begin{itemize}
   // \item The Intrinsic atmospheric reflectance that takes into account for the molecular scattering
@@ -481,25 +535,24 @@ int main(int argc, char *argv[])
   // \item $T(\mu_{S})$ is the downward transmittance;
   // \item $T(\mu_{V})$ is the upward transmittance.
   // \end{itemize}
-  // All those parameters are contained in the AtmosphericCorrectionParametersTo6SRadiativeTerms
-  // output.
+  // All those parameters are contained in the AtmosphericRadiativeTerms
+  // container.
   // Software Guide : EndLatex
 
   // Software Guide : BeginCodeSnippet
   filterReflectanceToSurfaceReflectanceImageFilter->
-  SetAtmosphericRadiativeTerms(
-    filterAtmosphericCorrectionParametersTo6SRadiativeTerms->GetOutput());
+    SetAtmosphericRadiativeTerms(atmosphericRadiativeTerms);
   // Software Guide : EndCodeSnippet
 
 //-------------------------------
 // Software Guide : BeginLatex
 // Next (and last step) is the neighborhood correction.
-// For this, the SurfaceAdjacencyEffect6SCorrectionSchemeFilter class is used.
+// For this, the SurfaceAdjacencyEffectCorrectionSchemeFilter class is used.
 // The previous surface reflectance inversion is performed under the assumption of a
 // homogeneous ground environment. The following step allows to correct the adjacency
 // effect on the radiometry of pixels. The method is based on the decomposition of
-// the observed signal as the summation of the own  contribution of the target pixel and
-// of the contribution of neighbored pixels moderated by their distance to the target pixel.
+// the observed signal as the summation of the own contribution of the target pixel and
+// of the contributions of neighbored pixels moderated by their distance to the target pixel.
 // A simplified relation may be :
 // \begin{equation}
 // \rho{S} = \frac{ \rho_{S}^{unif}.T(\mu_{V}) - <\rho{S}>.t_{d}(\mu_{V}) }{ exp(-\delta/\mu_{V}) }
@@ -525,37 +578,46 @@ int main(int argc, char *argv[])
 // \end{itemize}
 // \end{itemize}
 // The neighborhood consideration window size is given by the window radius.
-// An instance of \doxygen{otb}{SurfaceAdjacencyEffect6SCorrectionSchemeFilter} is created.
+//
+// An instance of \doxygen{otb}{SurfaceAdjacencyEffectCorrectionSchemeFilter}
+// is created. This class has an interface quite similar to
+// \doxygen{otb}{ReflectanceToSurfaceReflectance}. They both need radiative terms
+// (\doxygen{otb}{AtmosphericRadiativeTerms}), so it is possible to compute
+// them outside the filter and set them directly in the filter. The other
+// solution is to give as input the two parameters containers ("atmospheric"
+// and "acquisition" parameters), then the filter will compute the radiative
+// terms internally. If the "acquisition" correction parameters are not
+// present, the filter will try to get them from the image metadata.
+//
 // Software Guide : EndLatex
 
   //  Software Guide : BeginCodeSnippet
-  typedef otb::SurfaceAdjacencyEffect6SCorrectionSchemeFilter<ImageType,
+  typedef otb::SurfaceAdjacencyEffectCorrectionSchemeFilter<ImageType,
       ImageType>
-  SurfaceAdjacencyEffect6SCorrectionSchemeFilterType;
-  SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::Pointer
-    filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter
-    = SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::New();
+  SurfaceAdjacencyEffectCorrectionSchemeFilterType;
+  SurfaceAdjacencyEffectCorrectionSchemeFilterType::Pointer
+    filterSurfaceAdjacencyEffectCorrectionSchemeFilter
+    = SurfaceAdjacencyEffectCorrectionSchemeFilterType::New();
   //  Software Guide : EndCodeSnippet
 
   // Software Guide : BeginLatex
   //
-  // The needs four input informations:
+  // Four inputs are needed to compute the neighborhood contribution:
   // \begin{itemize}
-  // \item Radiometric informations (the output of the AtmosphericCorrectionParametersTo6SRadiativeTerms filter);
+  // \item The radiative terms (stored in the AtmosphericRadiativeTerms container);
   // \item The zenithal viewing angle;
   // \item The neighborhood window radius;
   // \item The pixel spacing in kilometers.
   // \end{itemize}
   //
   // Software Guide : EndLatex
-  filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->
-  SetAtmosphericRadiativeTerms(
-    filterAtmosphericCorrectionParametersTo6SRadiativeTerms->GetOutput());
-  filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetZenithalViewingAngle(
-    dataAtmosphericCorrectionParameters->GetViewingZenithalAngle());
-  filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetWindowRadius(atoi(argv
+  filterSurfaceAdjacencyEffectCorrectionSchemeFilter->
+    SetAtmosphericRadiativeTerms(atmosphericRadiativeTerms);
+  filterSurfaceAdjacencyEffectCorrectionSchemeFilter->SetZenithalViewingAngle(
+    dataAcquisitionCorrectionParameters->GetViewingZenithalAngle());
+  filterSurfaceAdjacencyEffectCorrectionSchemeFilter->SetWindowRadius(atoi(argv
                                                                              [17]));
-  filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->
+  filterSurfaceAdjacencyEffectCorrectionSchemeFilter->
   SetPixelSpacingInKilometers(static_cast<double>(atof(argv[18])));
 
 //-------------------------------
@@ -563,8 +625,8 @@ int main(int argc, char *argv[])
 //  Software Guide : BeginLatex
 //
 // At this step, each filter of the chain is instancied and every one has its
-// input paramters set. A name can be given to the output image and each filter
-//  can linked to other to create the final processing chain.
+// input paramters set. A name can be given to the output image, each filter
+//  can be linked to the next one and create the final processing chain.
 //
 //  Software Guide : EndLatex
 
@@ -575,11 +637,11 @@ int main(int argc, char *argv[])
   filterLuminanceToReflectance->SetInput(filterImageToLuminance->GetOutput());
   filterReflectanceToSurfaceReflectanceImageFilter->SetInput(
     filterLuminanceToReflectance->GetOutput());
-  filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetInput(
+  filterSurfaceAdjacencyEffectCorrectionSchemeFilter->SetInput(
     filterReflectanceToSurfaceReflectanceImageFilter->GetOutput());
 
   writer->SetInput(
-    filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->GetOutput());
+    filterSurfaceAdjacencyEffectCorrectionSchemeFilter->GetOutput());
 // Software Guide : EndCodeSnippet
 
 //  Software Guide : BeginLatex
diff --git a/Examples/Segmentation/OtsuMultipleThresholdImageFilter.cxx b/Examples/Segmentation/OtsuMultipleThresholdImageFilter.cxx
index dad0c40..0c1ef82 100644
--- a/Examples/Segmentation/OtsuMultipleThresholdImageFilter.cxx
+++ b/Examples/Segmentation/OtsuMultipleThresholdImageFilter.cxx
@@ -47,7 +47,7 @@ int main(int argc, char * argv[])
     {
     std::cerr << "Usage: " << argv[0];
     std::cerr <<
-    " inputImageFile outputImageFileName1 [OutputImageFilename2 ...] ";
+    " inputImageFile outputImageFileName1 [OutputImageFilename2 ...] " << std::endl;
     return EXIT_FAILURE;
     }
 
diff --git a/Examples/Simulation/LAIAndPROSAILToSensorResponse.cxx b/Examples/Simulation/LAIAndPROSAILToSensorResponse.cxx
index 3533d63..145384e 100644
--- a/Examples/Simulation/LAIAndPROSAILToSensorResponse.cxx
+++ b/Examples/Simulation/LAIAndPROSAILToSensorResponse.cxx
@@ -109,8 +109,6 @@ public:
 
   ArrayType GetUniqueValues() const
   {
-    typedef typename ImageType::IndexType IndexType;
-
     if( !m_Image )
       {
        itkExceptionMacro(<<"GetUniqueValues(): Null input image pointer.");
@@ -335,7 +333,9 @@ public:
 
     // Software Guide : BeginLatex
     //
-    // Satellite RSR is initialized and set with \code{aResponse}.
+    // Satellite RSR is initialized and set with \code{aResponse}. Reflectance
+    // mode is used in this case to take into account solar irradiance into
+    // spectral response reduction.
     //
     // Software Guide : EndLatex
 
@@ -343,6 +343,9 @@ public:
     ReduceResponseTypePointerType reduceResponse = ReduceResponseType::New();
     reduceResponse->SetInputSatRSR(m_SatRSR);
     reduceResponse->SetInputSpectralResponse(aResponse);
+
+    reduceResponse->SetReflectanceMode(true);
+
     reduceResponse->CalculateResponse();
     VectorPairType reducedResponse =
         reduceResponse->GetReduceResponse()->GetResponse();
@@ -918,5 +921,3 @@ int main(int argc, char *argv[])
   return EXIT_SUCCESS;
 
 }
-
-
diff --git a/Examples/Tutorials/HelloWorldOTB.cxx b/Examples/Tutorials/HelloWorldOTB.cxx
index 09e1750..8a3f06c 100644
--- a/Examples/Tutorials/HelloWorldOTB.cxx
+++ b/Examples/Tutorials/HelloWorldOTB.cxx
@@ -28,7 +28,7 @@
 #include "otbImage.h"
 #include <iostream>
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Image<unsigned short, 2> ImageType;
 
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 79af5cc..6295574 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,25 +1,124 @@
-OTB-v.4.0 - Changes since version 3.20 (2013/02/21)
+OTB-v.4.2.1 - Changes since version 4.2.0 (2014/09/19)
+--------------------------------------------------------
+
+* Bug fixed:
+  * OTB-lib:
+    * 0000973: Include directories in the wrong order
+    * 0000764: otbcli_ComputeImagesStatistics doesn't error check output file location
+    * other minor fix
+
+
+OTB-v.4.2.0 - Changes since version 4.0 (2014/09/04)
 --------------------------------------------------------
 
 * Library:
 
   * Core:
-    * Change OTB API to support ITK with version 4.5 (More information is available in the migration guide at http://wiki.orfeo-toolbox.org/index.php/Migration_guide_OTBv4)
-    * Refactoring otbAttributesMapOpeningLabelMapFilter to be compatible with ITKv4.5.0
-    * Remove Visualization part from OTB: all these projects are now in Monteverdi
+    * Major compliance upgrade with index coordinates convention between OTB,
+      GDAL and OSSIM. OTB uses pixel centered convention, whereas GDAL and
+      OSSIM use corner pixel convention. More details on JIRA #647 and Mantis
+      #942
+    * Major performance improvment of Haralick Texture computation (6 to 10 times
+      faster)
+    * Add new texture feature (dissimilarity) in ScalarImageToAdvancedTexturesFilter
+    * Improvments of Simulation code in order to be able to use the solar
+      irradiance information when working with spectral responses for simulations.
+    * Support Jpeg2000 images through GDAL drivers (can use OpenJpeg, Kakadu, ECW)
+    * Reading/Writing RPC coefficients in GeoTIFF tags
+    * Cleaning of ITK pending patches
+    * Update internal ITK to 4.6.0
+    * Support SPOT6 metadata
+    * Integrate improvements from Monteverdi2
+    * Support clang 3.5.1
+    * Support MinGW compiler
+    * API change on the TOC calibration filters, previous classes were not
+      fully functional. Now supports any correction parameters set by user.
+      See Examples/Radiometry/AtmosphericCorrectionSequencement.cxx for
+      details on the migration.
+    * Better support of atmospheric corrections for Pleiades images. Proper
+      computation of satellite zenital angle using incidence angles and
+      satellite orientation angle convention
+
+* Applications:
+  * Updated applications :
+    * Superimpose and BundleToPerfectSensor : Add a specific reprojection mode for PHR bundle
+    * OpticalCalibration : parameters more flexible, allow users to overwrite metadata values
+
+* Bugs fixed:
+
+* Monteverdi2
+    * 0000915: In mvd2 applications wrappers InputImageList parameters, only the first item of the list is dropable
+    * 0000960: Drop from file explorer doest not work.
+    * 0000928: Output results of applications are not selected in the dataset manager
+    * 0000908: Vector-image model settings serialization persistence (gamma)
+    * 0000919: Inconsistent no-data checks in StreamingVectorImageFilter<> and StreamingHistogramVectorImageFilter<>.
+    * 0000918: Image-view shift on click
+    * 0000907: Serialization/persistence of viewport settings
+    * 0000906: Quantiles editing on mono-bands images.
+    * 0000909: Color-setup on PANCHRO images.
+    * 0000905: Calculation of zoom-extent in Quicklook-view.
+    * 0000964: Wrong update of Gamme cursor position
+    * 0000929: Drag and Drop in otb application a dataset leads to the disappearance of the dataset into the widget
+    * 0000921: Application freezes at the end of image import.
+    * 0000947: Droping dataset to the last subgroup of the data tree crash the application
+    * 0000933: Drag a dataset from temporary in the dataset manager outside the tree leads to a crash
+    * 0000903: Removing mvd2 directory content leads to a core dumped as startup
+    * 0000920: Wide unzoom aborts application
+    * 0000917: Applying same quantiles to all channels crash the application
+    * 0000962: Monteverdi2 cannot be run on OSX (image file not found).
+    * 0000924: Monteverdi2 does not start after the check of OpenGL was added
+    * 0000923: Monteverdi2 does not start after the check of OpenGL was added
+
+  * Documentation
+    * 0000948: Softwareguide OTB 4-0 : section 14.2.2 SIFT Detector (from chapter 14 Feature Extraction) is empty.
+
+  * OTB-lib
+    * 0000955: Wrong computation of SFS Textures
+    * 0000940: Some output states are not correctly manage into Qt Application
+    * 0000939: crash with a GIF/BMP image with ColorInterp=Palette when we request overviews via GDAL
+    * 0000966: VectorDataExtractROIApplication does a strange reprojection
+    * 0000932: Error in LSMS
+    * 0000936: Sub-pixel disparity filter is not compatible with disparity maps over subsampled grids
+    * 0000914: MeanShiftSmoothing application foutpos parameters is always mandatory
+    * 0000943: TrainImagesClassifier and ListSampleGenerator problem
+    * 0000954: GeometriesChangeSpatialReference does not work
+    * 0000949: BundleToPerfectSensor application: in PHR mode, the ourpur geom file is the XS one, not the PAN one
+    * 0000926: OTB does not compile with clang 5.1
+    * 0000968: CommandLineLauncher needs 2 passes to load parameters
+    * 0000951: BundleToPerfectSensor application does not work in default mode with external ITK (internal ITK is fine)
+    * 0000944: OTB does not compile with ITK4.6 git version
+
+  * Monteverdi
+    * 0000957: Unable to display input and output of ExtractRoadExample in transparency mode in Monteverdi
+
+
+OTB-v.4.0.0 - Changes since version 3.20 (2014/03/13)
+--------------------------------------------------------
+
+* Library:
+
+  * Core:
+    * [Breaking change !] Change OTB implementation and API to support ITK version 4.5
+      * More information at http://wiki.orfeo-toolbox.org/index.php/Migration_guide_OTBv4
+    * Refactor otbAttributesMapOpeningLabelMapFilter to be compatible with ITK 4.5
+    * Remove FLTK based Visualization part from OTB: all these projects are now in Monteverdi
     * Rename EuclideanDistance as EuclideanDistanceMetric
     * Remove otbMaskedScalarImageToGreyLevelCoocurenceMatrixGenerator
     * Use local masks in otbHaralickTexturesImageFunction
     * Remove methods of otbSystem.h which can be replaced by similar ones in itksys/SystemTools.hxx
-    * Move classes about Amplitude and Phase functors from visualzation to basic filter
+    * Move classes about Amplitude and Phase functors from visualization to basic filter
     * otbImageToLabelMapWithAttributesFilter inherits from itkImageToImageFilter instead of itkLabelMapFilter
     * Overload GenerateInputRequestedRegion in otbImageToLabelMapWithAttributesFilter
     * Override VerifyInputInformation in otbImportGeoInformationImageFilter
     * Adding a gamma parameter in VectorRescaleIntensityImageFilter to allow for gamma correction
+    * Clean up JoinHistogramMI code
+    * Fix race condition in BinaryFunctorNeighborhoodJoinHistogramImageFilter
     * Remove unused OTB_USE_SYSTEM_VXL and OTB_VXL_DIR from OTBConfig and UseOTB
-    * Improve support of VS2013
-    * Improve support of large files
-    * Support of MacOSX 10.9
+    * Improve detection of Large Files Support by not unconditionnally defining LFS related macros
+    * Support for Visual Studio 2012
+    * Support for Visual Studio 2013
+    * Support compilation in MacOSX 10.9 with latest XCode
+    * Support for clang 3.5
 
   * Testing:
     * Correct multibaseline support
@@ -41,8 +140,11 @@ OTB-v.4.0 - Changes since version 3.20 (2013/02/21)
 * Applications:
 
   * Updated applications:
-    * Remove dependency of Colormapping to Visualization class
-    * Adding gamma correction method the convert application 
+    * ColorMapping : Remove dependency of ColorMapping to Visualization class
+    * Convert : Adding gamma correction method the convert application
+    * HomologousPointsExtraction : add mode.geobins.binsizey and mode.geobins.binstepy to allow for anisotropic geobins mode
+    * HomologousPointsExtraction : new mode.geobins.margin parameter to only search inside image center.
+    
   * Core framework:
     * Improve the support of XML parameters input/output file
     * Improve the input VectorData/Image/Filename parameter to give access to m_Input attribute
diff --git a/Testing/Applications/Classification/CMakeLists.txt b/Testing/Applications/Classification/CMakeLists.txt
index 325e007..558923a 100644
--- a/Testing/Applications/Classification/CMakeLists.txt
+++ b/Testing/Applications/Classification/CMakeLists.txt
@@ -45,12 +45,12 @@ if(OTB_USE_OPENCV)
   set(knn_output_format ".knn")
 
   # Training algorithms parameters
-  set(libsvm_parameters "-classifier.libsvm.opt true")
-  set(svm_parameters "-classifier.svm.opt true")
+  set(libsvm_parameters "-classifier.libsvm.opt" "true")
+  set(svm_parameters "-classifier.svm.opt" "true")
   set(boost_parameters "")
   set(dt_parameters "")
   set(gbt_parameters "")
-  set(ann_parameters "-classifier.ann.sizes 100")
+  set(ann_parameters "-classifier.ann.sizes" "100")
   set(bayes_parameters "")
   set(rf_parameters "")
   set(knn_parameters "")
diff --git a/Testing/Applications/DisparityMap/CMakeLists.txt b/Testing/Applications/DisparityMap/CMakeLists.txt
index 08825c2..4dbe8d7 100644
--- a/Testing/Applications/DisparityMap/CMakeLists.txt
+++ b/Testing/Applications/DisparityMap/CMakeLists.txt
@@ -82,8 +82,8 @@ OTB_TEST_APPLICATION(NAME apTvDmBlockMatchingTest
                              -bm.medianfilter.radius 2
                              -bm.medianfilter.incoherence 2.0
                      VALID   --compare-image ${EPSILON_10}
-                     		 ${INPUTDATA}/sensor_stereo_blockmatching_output.tif
-                     		 ${TEMP}/apTvDmBlockMatchingTest.tif
+                         ${BASELINE}/apTvDmBlockMatchingTest.tif
+                         ${TEMP}/apTvDmBlockMatchingTest.tif
                      )
 
 
diff --git a/Testing/Applications/FeatureExtraction/CMakeLists.txt b/Testing/Applications/FeatureExtraction/CMakeLists.txt
index 2524ae1..15f74b5 100644
--- a/Testing/Applications/FeatureExtraction/CMakeLists.txt
+++ b/Testing/Applications/FeatureExtraction/CMakeLists.txt
@@ -131,6 +131,7 @@ OTB_TEST_APPLICATION(NAME apTvHomologousPointsExtractionGeoBins
                              -mode geobins
                              -mode.geobins.binsize 100
                              -mode.geobins.binstep 25
+                             -mode.geobins.margin 12
                              -mfilter 1
                              -precision 10
                              -2wgs84 1
@@ -141,6 +142,28 @@ OTB_TEST_APPLICATION(NAME apTvHomologousPointsExtractionGeoBins
                              ${BASELINE_FILES}/apTvHomologousPointsExtractionGeoBins.txt
                              ${TEMP}/apTvHomologousPointsExtractionGeoBins.txt)
 
+OTB_TEST_APPLICATION(NAME apTvHomologousPointsExtractionGeoBinsAnisotropic
+                     APP  HomologousPointsExtraction
+                     OPTIONS -in1 ${INPUTDATA}/QB_TOULOUSE_MUL_Extract_500_500.tif
+                             -in2 ${INPUTDATA}/QB_TOULOUSE_MUL_Extract_500_500.tif
+                             -algorithm surf
+                             -mode geobins
+                             -mode.geobins.binsize 100
+                             -mode.geobins.binsizey 150
+                             -mode.geobins.binstep 25
+                             -mode.geobins.binstepy 10
+                             -mode.geobins.margin 12
+                             -mfilter 1
+                             -precision 10
+                             -2wgs84 1
+                             -elev.dem ${INPUTDATA}/DEM/srtm_directory
+                             -elev.geoid ${INPUTDATA}/DEM/egm96.grd
+                             -out ${TEMP}/apTvHomologousPointsExtractionGeoBinsAnisotropic.txt
+                     VALID   --compare-ascii ${EPSILON_9}
+                             ${BASELINE_FILES}/apTvHomologousPointsExtractionGeoBinsAnisotropic.txt
+                             ${TEMP}/apTvHomologousPointsExtractionGeoBinsAnisotropic.txt)
+
+
 OTB_TEST_APPLICATION(NAME   apTvFEDimensionalityReductionPCA
                      APP  DimensionalityReduction
                      OPTIONS -in ${INPUTDATA}/cupriteSubHsi.tif
diff --git a/Testing/Applications/Projections/CMakeLists.txt b/Testing/Applications/Projections/CMakeLists.txt
index 109f40f..d051adf 100644
--- a/Testing/Applications/Projections/CMakeLists.txt
+++ b/Testing/Applications/Projections/CMakeLists.txt
@@ -239,7 +239,7 @@ OTB_TEST_APPLICATION(NAME  apTvPrVectorDataReprojectionFromMapToMap
                  			       -out.vd ${TEMP}/apTvPrVectorDataReprojectionFromMapToMap.kml
                              -out.proj user
                              -out.proj.user.map  lambert93
-                     VALID   --compare-ascii ${NOTOL}
+                     VALID   --compare-ogr ${NOTOL}
                               ${BASELINE_FILES}/prTvVectorDataProjectionFilterFromMapToMap.kml
                  			  ${TEMP}/apTvPrVectorDataReprojectionFromMapToMap.kml)
 
@@ -284,7 +284,7 @@ OTB_TEST_APPLICATION(NAME  apTuPrVectorDataReprojectionFromGeoToMap
 OTB_TEST_APPLICATION(NAME  apTvPrRefineSensorModel
                      APP  RefineSensorModel
                      OPTIONS -ingeom    ${INPUTDATA}/QB_TOULOUSE_MUL_Extract_500_500.geom
-                             -inpoints  ${BASELINE_FILES}/apTvHomologousPointsExtractionGeoBins.txt
+                             -inpoints  ${INPUTDATA}/QB_TOULOUSE_MUL_Extract_500_500_in_tie_points.txt
                  	     -outgeom   ${TEMP}/apTvPrRefineSensorModelGeomOutput.geom
                              -outstat   ${TEMP}/apTvPrRefineSensorModelStatsOutput.txt
                              -outvector ${TEMP}/apTvPrRefineSensorModelVectorOutput.shp
@@ -297,7 +297,7 @@ OTB_TEST_APPLICATION(NAME  apTvPrRefineSensorModel
 
 OTB_TEST_APPLICATION(NAME  apTvPrGenerateRPCSensorModel
                      APP  GenerateRPCSensorModel
-                     OPTIONS -inpoints  ${BASELINE_FILES}/apTvHomologousPointsExtractionGeoBins.txt
+                     OPTIONS -inpoints  ${INPUTDATA}/QB_TOULOUSE_MUL_Extract_500_500_in_tie_points.txt
                  	     -outgeom   ${TEMP}/apTvPrGenerateRPCSensorModelGeomOutput.geom
                              -outstat   ${TEMP}/apTvPrGenerateRPCSensorModelStatsOutput.txt
                              -outvector ${TEMP}/apTvPrGenerateRPCSensorModelVectorOutput.shp
diff --git a/Testing/Applications/Radiometry/CMakeLists.txt b/Testing/Applications/Radiometry/CMakeLists.txt
index 5ecc956..4e91628 100644
--- a/Testing/Applications/Radiometry/CMakeLists.txt
+++ b/Testing/Applications/Radiometry/CMakeLists.txt
@@ -1,3 +1,48 @@
+OTB_TEST_APPLICATION(NAME apTvRaOpticalCalibration_UnknownSensor
+                     APP  OpticalCalibration
+                     OPTIONS 
+           -in ${EXAMPLEDATA}/Romania_Extract.tif
+           -out ${TEMP}/apTvRaOpticalCalibration_Spot4_UnknownSensor_test.tif
+           -level toc
+           -acqui.gainbias ${INPUTDATA}/apTvRaOpticalCalibrationUnknownSensorGainsBiases2.txt
+           -acqui.day 4
+           -acqui.month 12
+           -acqui.sun.elev 62.7
+           -acqui.sun.azim 152.7
+           -acqui.view.elev 87.5
+           -acqui.view.azim -77.0
+           -acqui.solarilluminations ${INPUTDATA}/apTvRaOpticalCalibrationUnknownSensorSolarIllumations2.txt
+           -atmo.rsr ${INPUTDATA}/apTvRaOpticalCalibrationUnknownSensorRSR.txt
+           -atmo.pressure 1013.0
+           -atmo.wa 2.48134
+           -atmo.oz 0.34400
+           -atmo.aerosol continental
+           -atmo.opt 0.199854
+           -atmo.radius 2
+           -atmo.pixsize 0.02
+           -milli false
+           -clamp false
+                     VALID   --compare-image ${EPSILON_6}
+                             ${OTB_DATA_ROOT}/Baseline/Examples/Radiometry/Example_RomaniaAtmosphericCorrectionSequencement.tif
+                             ${TEMP}/apTvRaOpticalCalibration_Spot4_UnknownSensor_test.tif )
+
+OTB_TEST_APPLICATION(NAME apTvRaOpticalCalibration_Reverse_UnknownSensor
+                     APP  OpticalCalibration
+                     OPTIONS 
+			     -in ${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoQuickbirdXS.tif
+			     -out ${TEMP}/apTvRaOpticalCalibration_Rev_QB-XS_UnknownSensor_test.tif
+			     -level toatoim 
+			     -acqui.gainbias ${INPUTDATA}/apTvRaOpticalCalibrationUnknownSensorGainsBiases.txt
+			     -acqui.day 1
+			     -acqui.month 4
+			     -acqui.sun.elev 48.6
+			     -acqui.solarilluminations ${INPUTDATA}/apTvRaOpticalCalibrationUnknownSensorSolarIllumations.txt
+		       -milli false
+			     -clamp false
+                     VALID   --compare-image ${EPSILON_6}
+                             ${INPUTDATA}/QB_MUL_ROI_1000_100.tif
+                             ${TEMP}/apTvRaOpticalCalibration_Rev_QB-XS_UnknownSensor_test.tif )
+
 
 OTB_TEST_APPLICATION(NAME apTvRaOpticalCalibration_QuickbirdPAN
                      APP  OpticalCalibration
diff --git a/Testing/Applications/Segmentation/CMakeLists.txt b/Testing/Applications/Segmentation/CMakeLists.txt
index 3a1d1d0..e4d8eaf 100644
--- a/Testing/Applications/Segmentation/CMakeLists.txt
+++ b/Testing/Applications/Segmentation/CMakeLists.txt
@@ -11,7 +11,7 @@ OTB_TEST_APPLICATION(NAME apTuSeMeanShiftSmoothing
                              -foutpos ${TEMP}/apTvSeMeanShiftSmoothingFilter_SpatialOutput.tif
                  			 -spatialr 4
                  			 -ranger 25
-                 			 -maxiter 100
+                 			 -maxiter 10
                  			 -thres 0.1
                  			 -modesearch 0)
 #                     VALID   --compare-image ${EPSILON_7}
@@ -60,17 +60,17 @@ OTB_TEST_APPLICATION(NAME     apTvSeHooverCompareSegmentationTest
 #--- Segmentation ---#
 
 # Segmentation algorithms parameters
-set(cc_parameters "-filter.cc.expr distance<25")
-set(edison_parameters "-filter.edison.spatialr 5 -filter.edison.ranger 50 -filter.edison.minsize 10")
-set(meanshift_parameters "-filter.meanshift.spatialr 5 -filter.meanshift.ranger 50 -filter.meanshift.minsize 10")
-set(vector_parameters "-mode.vector.tilesize 500 -mode.vector.minsize 50 -mode.vector.simplify 0.1 -mode.vector.outmode ovw")
+set(cc_parameters "-filter.cc.expr" "distance<25")
+set(edison_parameters "-filter.edison.spatialr" "5" "-filter.edison.ranger" "50" "-filter.edison.minsize" "10")
+set(meanshift_parameters "-filter.meanshift.spatialr" "5" "-filter.meanshift.ranger" "50" "-filter.meanshift.minsize" "10")
+set(vector_parameters "-mode.vector.tilesize" "500" "-mode.vector.minsize" "50" "-mode.vector.simplify" "0.1" "-mode.vector.outmode" "ovw")
 
 # validation option
 set(meanshift_option "--without-threads")
 
 # Output type dependning on mode
 set(raster_output_format ".tif")
-set(raster_output_option " uint16")
+set(raster_output_option "uint16")
 set(vector_output_format ".sqlite")
 
 # Validation depending on mode
@@ -98,7 +98,7 @@ OTB_TEST_APPLICATION(NAME     apTvSeSegmentation${filter}${mode}
                               -filter ${lfilter}
                               ${${lfilter}_parameters}
                               -mode ${lmode}
-                              -mode.${lmode}.out ${TEMP}/${OUTFILE}${${lmode}_output_option}
+                              -mode.${lmode}.out ${TEMP}/${OUTFILE} ${${lmode}_output_option}
                               ${${lmode}_parameters}
                      VALID    ${${lfilter}_option}
                               ${${lmode}_comparison}
@@ -115,7 +115,7 @@ set(mode "Vector")
 string(TOLOWER ${filter} lfilter)
 
 # Add a test for ULOVW
-set(vector_parameters "-mode.vector.tilesize 500 -mode.vector.minsize 50 -mode.vector.simplify 0.1 -mode.vector.outmode ulovw")
+set(vector_parameters "-mode.vector.tilesize" "500" "-mode.vector.minsize" "50" "-mode.vector.simplify" "0.1" "-mode.vector.outmode" "ulovw")
 
 set(OUTFILE apTvSeSegmentation${filter}${mode}${${lmode}_output_format})
 
@@ -125,7 +125,7 @@ OTB_TEST_APPLICATION(NAME     apTvSeSegmentation${filter}${mode}_ULOVW
                               -filter ${lfilter}
                               ${${lfilter}_parameters}
                               -mode ${lmode}
-                              -mode.${lmode}.out ${TEMP}/${OUTFILE}${${lmode}_output_option}
+                              -mode.${lmode}.out ${TEMP}/${OUTFILE} ${${lmode}_output_option}
                               ${${lmode}_parameters}
                      VALID    ${${lfilter}_option}
                               ${${lmode}_comparison}
@@ -138,7 +138,7 @@ set_tests_properties(apTvSeSegmentation${filter}${mode}_ULOVW
                                 RESOURCE_LOCK ${OUTFILE})
 
 # Add a test for ULU
-set(vector_parameters "-mode.vector.tilesize 500 -mode.vector.minsize 50 -mode.vector.simplify 0.1 -mode.vector.outmode ulu")
+set(vector_parameters "-mode.vector.tilesize" "500" "-mode.vector.minsize" "50" "-mode.vector.simplify" "0.1" "-mode.vector.outmode" "ulu")
 
 OTB_TEST_APPLICATION(NAME     apTvSeSegmentation${filter}${mode}_ULU
                      APP      Segmentation
@@ -146,7 +146,7 @@ OTB_TEST_APPLICATION(NAME     apTvSeSegmentation${filter}${mode}_ULU
                               -filter ${lfilter}
                               ${${lfilter}_parameters}
                               -mode ${lmode}
-                              -mode.${lmode}.out ${TEMP}/${OUTFILE}${${lmode}_output_option}
+                              -mode.${lmode}.out ${TEMP}/${OUTFILE} ${${lmode}_output_option}
                               ${${lmode}_parameters}
                      VALID    ${${lfilter}_option}
                               ${${lmode}_comparison}
@@ -159,7 +159,7 @@ set_tests_properties(apTvSeSegmentation${filter}${mode}_ULU
                                 RESOURCE_LOCK ${OUTFILE})
 
 # Add a test for ULCO
-set(vector_parameters "-mode.vector.tilesize 500 -mode.vector.minsize 50 -mode.vector.simplify 0.1 -mode.vector.outmode ulco")
+set(vector_parameters "-mode.vector.tilesize" "500" "-mode.vector.minsize" "50" "-mode.vector.simplify" "0.1" "-mode.vector.outmode" "ulco")
 
 OTB_TEST_APPLICATION(NAME     apTvSeSegmentation${filter}${mode}_ULCO
                      APP      Segmentation
@@ -167,7 +167,7 @@ OTB_TEST_APPLICATION(NAME     apTvSeSegmentation${filter}${mode}_ULCO
                               -filter ${lfilter}
                               ${${lfilter}_parameters}
                               -mode ${lmode}
-                              -mode.${lmode}.out ${TEMP}/${OUTFILE}${${lmode}_output_option}
+                              -mode.${lmode}.out ${TEMP}/${OUTFILE} ${${lmode}_output_option}
                               ${${lmode}_parameters}
                      VALID    ${${lfilter}_option}
                               ${${lmode}_comparison}
diff --git a/Testing/Applications/Utils/CMakeLists.txt b/Testing/Applications/Utils/CMakeLists.txt
index 6160aa0..c2afb59 100644
--- a/Testing/Applications/Utils/CMakeLists.txt
+++ b/Testing/Applications/Utils/CMakeLists.txt
@@ -48,6 +48,14 @@ OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoTest
                              ${BASELINE_FILES}/apTvUtReadImageInfoTest.txt
                 	     ${TEMP}/apTvUtReadImageInfoTest.txt)
 
+OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoRpcTag
+                     APP  ReadImageInfo
+                     OPTIONS -in ${INPUTDATA}/QB_TOULOUSE_RpcTag_100_100.tif
+                             -outkwl ${TEMP}/apTvUtReadImageInfoRpcTag.geom
+                     VALID   --compare-ascii ${EPSILON_7}
+                             ${BASELINE_FILES}/apTvUtReadImageInfoRpcTag.geom
+                       ${TEMP}/apTvUtReadImageInfoRpcTag.geom)
+
 if(OTB_DATA_USE_LARGEINPUT)
 
 OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoSpot5
@@ -229,9 +237,9 @@ OTB_TEST_APPLICATION(NAME apTvUtVectorDataTransform_Translation_Rotation
                              ${OTBAPP_BASELINE_FILES}/utTvVectorDataTransformFilter_Translation_rotation.shp
                              ${TEMP}/apTvUtVectorDataTransform_Translation_rotation.shp)
 
-#--- VectorDataExtractROIApplication ---
-OTB_TEST_APPLICATION(NAME apTvUtVectorDataExtractROIApplication
-                     APP VectorDataExtractROIApplication
+#--- VectorDataExtractROI ---
+OTB_TEST_APPLICATION(NAME apTvUtVectorDataExtractROI
+                     APP VectorDataExtractROI
                      OPTIONS -io.in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
                              -io.vd ${OTB_DATA_LARGEINPUT_ROOT}/VECTOR/MidiPyrenees/roads.shp
                              -io.out ${TEMP}/apTvUtVectorDataExtractROIApplicationTest.shp
diff --git a/Testing/Code/ApplicationEngine/otbWrapperApplicationHtmlDocGeneratorTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperApplicationHtmlDocGeneratorTest.cxx
index 6e92a34..53a164c 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperApplicationHtmlDocGeneratorTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperApplicationHtmlDocGeneratorTest.cxx
@@ -23,7 +23,7 @@
 #include "otbWrapperApplicationRegistry.h"
 #include "otbWrapperApplication.h"
 
-int otbWrapperApplicationHtmlDocGeneratorNew(int argc, char* argv[])
+int otbWrapperApplicationHtmlDocGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::ApplicationHtmlDocGenerator DocGeneratorType;
   DocGeneratorType generator;
@@ -31,7 +31,7 @@ int otbWrapperApplicationHtmlDocGeneratorNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbWrapperApplicationHtmlDocGeneratorTest1(int argc, char* argv[])
+int otbWrapperApplicationHtmlDocGeneratorTest1(int argc, char * argv[])
 {
   if (argc != 5)
     {
diff --git a/Testing/Code/ApplicationEngine/otbWrapperApplicationRegistryTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperApplicationRegistryTest.cxx
index 355a7c1..bc080d8 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperApplicationRegistryTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperApplicationRegistryTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperApplicationRegistry.h"
 
-int otbWrapperApplicationRegistry(int argc, char* argv[])
+int otbWrapperApplicationRegistry(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   using otb::Wrapper::ApplicationRegistry;
   std::vector<std::string> list = ApplicationRegistry::GetAvailableApplications();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperApplicationTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperApplicationTest.cxx
index aebd3a6..c53512a 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperApplicationTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperApplicationTest.cxx
@@ -21,10 +21,9 @@
 
 #include "otbWrapperApplication.h"
 
-int otbWrapperApplicationNew(int argc, char* argv[])
+int otbWrapperApplicationNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
-  typedef otb::Wrapper::Application ApplicationType;
-  //ApplicationType::Pointer application = ApplicationType::New();
-
+//  typedef otb::Wrapper::Application ApplicationType;
+//  ApplicationType application = ApplicationType::New();
   return EXIT_SUCCESS;
 }
diff --git a/Testing/Code/ApplicationEngine/otbWrapperChoiceParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperChoiceParameterTest.cxx
index c423567..bd4b80c 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperChoiceParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperChoiceParameterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperChoiceParameter.h"
 
-int otbWrapperChoiceParameterNew(int argc, char* argv[])
+int otbWrapperChoiceParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::ChoiceParameter ChoiceParameterType;
   ChoiceParameterType::Pointer parameter = ChoiceParameterType::New();
@@ -29,7 +29,7 @@ int otbWrapperChoiceParameterNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbWrapperChoiceParameterTest1(int argc, char* argv[])
+int otbWrapperChoiceParameterTest1(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   // TODO
   return EXIT_FAILURE;
diff --git a/Testing/Code/ApplicationEngine/otbWrapperDocExampleStructureTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperDocExampleStructureTest.cxx
index db6196a..35d8762 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperDocExampleStructureTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperDocExampleStructureTest.cxx
@@ -23,7 +23,7 @@
 #include "itksys/SystemTools.hxx"
 #include <fstream>
 
-int otbWrapperDocExampleStructureNew(int argc, char* argv[])
+int otbWrapperDocExampleStructureNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::DocExampleStructure DocExampleStructureType;
   DocExampleStructureType::Pointer docStruct = DocExampleStructureType::New();
@@ -32,7 +32,7 @@ int otbWrapperDocExampleStructureNew(int argc, char* argv[])
 }
 
 
-int otbWrapperDocExampleStructureTest(int argc, char* argv[])
+int otbWrapperDocExampleStructureTest(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::Wrapper::DocExampleStructure DocExampleStructureType;
   DocExampleStructureType::Pointer docStruct = DocExampleStructureType::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperEmptyParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperEmptyParameterTest.cxx
index 240c1a5..90ee052 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperEmptyParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperEmptyParameterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperEmptyParameter.h"
 
-int otbWrapperEmptyParameterNew(int argc, char* argv[])
+int otbWrapperEmptyParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::EmptyParameter EmptyParameterType;
   EmptyParameterType::Pointer parameter = EmptyParameterType::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperInputImageListParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperInputImageListParameterTest.cxx
index 20f9d35..9bff663 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperInputImageListParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperInputImageListParameterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperInputImageListParameter.h"
 
-int otbWrapperInputImageListParameterNew(int argc, char* argv[])
+int otbWrapperInputImageListParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::InputImageListParameter ParameterType;
   ParameterType::Pointer parameter = ParameterType::New();
@@ -30,7 +30,7 @@ int otbWrapperInputImageListParameterNew(int argc, char* argv[])
 }
 
 
-int otbWrapperInputImageListParameterTest1(int argc, char* argv[])
+int otbWrapperInputImageListParameterTest1(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::Wrapper::InputImageListParameter ParameterType;
   ParameterType::Pointer param = ParameterType::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperInputImageParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperInputImageParameterTest.cxx
index b738dff..139c667 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperInputImageParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperInputImageParameterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperInputImageParameter.h"
 
-int otbWrapperInputImageParameterNew(int argc, char* argv[])
+int otbWrapperInputImageParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::InputImageParameter InputImageParameterType;
   InputImageParameterType::Pointer parameter = InputImageParameterType::New();
@@ -29,7 +29,7 @@ int otbWrapperInputImageParameterNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbWrapperInputImageParameterTest1(int argc, char* argv[])
+int otbWrapperInputImageParameterTest1(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::Wrapper::InputImageParameter InputImageParameterType;
   InputImageParameterType::Pointer param = InputImageParameterType::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperInputVectorDataListParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperInputVectorDataListParameterTest.cxx
index e5eb4d1..853b79d 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperInputVectorDataListParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperInputVectorDataListParameterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperInputVectorDataListParameter.h"
 
-int otbWrapperInputVectorDataListParameterNew(int argc, char* argv[])
+int otbWrapperInputVectorDataListParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::InputVectorDataListParameter ParameterType;
   ParameterType::Pointer parameter = ParameterType::New();
@@ -30,7 +30,7 @@ int otbWrapperInputVectorDataListParameterNew(int argc, char* argv[])
 }
 
 
-int otbWrapperInputVectorDataListParameterTest1(int argc, char* argv[])
+int otbWrapperInputVectorDataListParameterTest1(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::Wrapper::InputVectorDataListParameter ParameterType;
   ParameterType::Pointer param = ParameterType::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperInputVectorDataParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperInputVectorDataParameterTest.cxx
index f7cb0e7..ee2d519 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperInputVectorDataParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperInputVectorDataParameterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperInputVectorDataParameter.h"
 
-int otbWrapperInputVectorDataParameterNew(int argc, char* argv[])
+int otbWrapperInputVectorDataParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::InputVectorDataParameter InputVectorDataParameterType;
   InputVectorDataParameterType::Pointer parameter = InputVectorDataParameterType::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperNumericalParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperNumericalParameterTest.cxx
index 589f83b..14c7698 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperNumericalParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperNumericalParameterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperNumericalParameter.h"
 
-int otbWrapperNumericalParameterNew(int argc, char* argv[])
+int otbWrapperNumericalParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::NumericalParameter <int> NumericalParameterType;
   NumericalParameterType::Pointer parameter = NumericalParameterType::New();
@@ -30,7 +30,7 @@ int otbWrapperNumericalParameterNew(int argc, char* argv[])
 }
 
 
-int otbWrapperNumericalParameterTest1(int argc, char* argv[])
+int otbWrapperNumericalParameterTest1(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::Wrapper::NumericalParameter <double> NumericalParameterType;
   NumericalParameterType::Pointer numParam = NumericalParameterType::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperOutputImageParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperOutputImageParameterTest.cxx
index f821288..46365f4 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperOutputImageParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperOutputImageParameterTest.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileReader.h"
 #include "otbWrapperTypes.h"
 
-int otbWrapperOutputImageParameterNew(int argc, char* argv[])
+int otbWrapperOutputImageParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::OutputImageParameter OutputImageParameterType;
   OutputImageParameterType::Pointer parameter = OutputImageParameterType::New();
@@ -32,7 +32,7 @@ int otbWrapperOutputImageParameterNew(int argc, char* argv[])
 }
 
 
-int otbWrapperOutputImageParameterTest1(int argc, char* argv[])
+int otbWrapperOutputImageParameterTest1(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::Wrapper::OutputImageParameter OutputImageParameterType;
   OutputImageParameterType::Pointer param = OutputImageParameterType::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperParameterKeyTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperParameterKeyTest.cxx
index fa18640..e24df21 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperParameterKeyTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperParameterKeyTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperParameterKey.h"
 
-int otbWrapperParameterKey(int argc, char* argv[])
+int otbWrapperParameterKey(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
 
   std::string theKey = "parent.current.child";
diff --git a/Testing/Code/ApplicationEngine/otbWrapperParameterListTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperParameterListTest.cxx
index 412c0fc..5d14917 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperParameterListTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperParameterListTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperParameterGroup.h"
 
-int otbWrapperParameterListNew(int argc, char* argv[])
+int otbWrapperParameterListNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   using otb::Wrapper::ParameterGroup;
   ParameterGroup::Pointer parameters = ParameterGroup::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperParameterTest.cxx
index 146f5dd..2fa2e40 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperParameterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperParameter.h"
 
-int otbWrapperParameterNew(int argc, char* argv[])
+int otbWrapperParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::Parameter ParameterBaseType;
   ParameterBaseType::Pointer parameter = ParameterBaseType::New();
@@ -31,7 +31,7 @@ int otbWrapperParameterNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbWrapperParameterTest1(int argc, char* argv[])
+int otbWrapperParameterTest1(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::Wrapper::Parameter ParameterBaseType;
   ParameterBaseType::Pointer parameter = ParameterBaseType::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperRAMParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperRAMParameterTest.cxx
index cbb8331..b10f0c5 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperRAMParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperRAMParameterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperRAMParameter.h"
 
-int otbWrapperRAMParameterNew(int argc, char* argv[])
+int otbWrapperRAMParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::RAMParameter RAMParameterType;
   RAMParameterType::Pointer parameter = RAMParameterType::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperStringListParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperStringListParameterTest.cxx
index 93300b3..b7d234e 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperStringListParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperStringListParameterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperStringListParameter.h"
 
-int otbWrapperStringListParameterNew(int argc, char* argv[])
+int otbWrapperStringListParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::StringListParameter StringListParameterType;
   StringListParameterType::Pointer parameter = StringListParameterType::New();
@@ -30,7 +30,7 @@ int otbWrapperStringListParameterNew(int argc, char* argv[])
 }
 
 
-int otbWrapperStringListParameterTest1(int argc, char* argv[])
+int otbWrapperStringListParameterTest1(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::Wrapper::StringListParameter StringListParameterType;
   StringListParameterType::Pointer numParam = StringListParameterType::New();
diff --git a/Testing/Code/ApplicationEngine/otbWrapperStringParameterTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperStringParameterTest.cxx
index 71dd9a5..7ea5c5a 100644
--- a/Testing/Code/ApplicationEngine/otbWrapperStringParameterTest.cxx
+++ b/Testing/Code/ApplicationEngine/otbWrapperStringParameterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbWrapperStringParameter.h"
 
-int otbWrapperStringParameterNew(int argc, char* argv[])
+int otbWrapperStringParameterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::StringParameter StringParameterType;
   StringParameterType::Pointer parameter = StringParameterType::New();
@@ -30,7 +30,7 @@ int otbWrapperStringParameterNew(int argc, char* argv[])
 }
 
 
-int otbWrapperStringParameterTest1(int argc, char* argv[])
+int otbWrapperStringParameterTest1(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::Wrapper::StringParameter StringParameterType;
   StringParameterType::Pointer numParam = StringParameterType::New();
diff --git a/Testing/Code/BasicFilters/CMakeLists.txt b/Testing/Code/BasicFilters/CMakeLists.txt
index aa928d0..c76f97c 100644
--- a/Testing/Code/BasicFilters/CMakeLists.txt
+++ b/Testing/Code/BasicFilters/CMakeLists.txt
@@ -2494,7 +2494,6 @@ add_test(bfTvNAPCAImageFilter4
 
 
 ### MNF ###
-
 # Test input->MNF->inverse MNF
 add_test(bfTvMNFImageFilter1
          ${BASICFILTERS_TESTS13}
@@ -2531,7 +2530,6 @@ add_test(bfTvMNFImageFilter3
          -inv ${TEMP}/bfTvMNFImageFilter3Inv.tif
          -norm)
 
-
 # Test the direct transform, reducing dimensionnality
 add_test(bfTvMNFImageFilter4
          ${BASICFILTERS_TESTS13}
@@ -2897,6 +2895,11 @@ add_test(bfTvTileImageFilter ${BASICFILTERS_TESTS15}
 )
 
 
+#-------- StreamingHistogramVectorImageFilter.cxx ----
+add_test(bfTuStreamingHistogramVIFilterNew ${BASICFILTERS_TESTS15}
+  otbStreamingHistogramVectorImageFilterNew
+)
+
 # A enrichir
 set(BasicFilters_SRCS1
 otbBasicFiltersTests1.cxx
@@ -3192,6 +3195,7 @@ otbThresholdVectorImageFilter.cxx
 otbClampVectorImageFilter.cxx
 otbClampImageFilter.cxx
 otbTileImageFilter.cxx
+otbStreamingHistogramVectorImageFilter.cxx
 )
 
 OTB_ADD_EXECUTABLE(otbBasicFiltersTests1 "${BasicFilters_SRCS1}" "OTBBasicFilters;OTBIO;OTBTesting")
diff --git a/Testing/Code/BasicFilters/otbAmplitudeFunctorTest.cxx b/Testing/Code/BasicFilters/otbAmplitudeFunctorTest.cxx
index dded91d..e70bb07 100644
--- a/Testing/Code/BasicFilters/otbAmplitudeFunctorTest.cxx
+++ b/Testing/Code/BasicFilters/otbAmplitudeFunctorTest.cxx
@@ -22,7 +22,7 @@
 #include "itkRGBPixel.h"
 #include "itkRGBAPixel.h"
 
-int otbAmplitudeFunctorTest(int argc, char * argv[])
+int otbAmplitudeFunctorTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double                   ScalarType;
 
diff --git a/Testing/Code/BasicFilters/otbAmplitudePhaseToRGBFunctor.cxx b/Testing/Code/BasicFilters/otbAmplitudePhaseToRGBFunctor.cxx
index 0d176df..16f4145 100644
--- a/Testing/Code/BasicFilters/otbAmplitudePhaseToRGBFunctor.cxx
+++ b/Testing/Code/BasicFilters/otbAmplitudePhaseToRGBFunctor.cxx
@@ -28,7 +28,7 @@
 #include "itkComplexToPhaseImageFilter.h"
 #include "itkShiftScaleImageFilter.h"
 
-int otbAmplitudePhaseToRGBFunctor(int argc, char * argv[])
+int otbAmplitudePhaseToRGBFunctor(int itkNotUsed(argc), char * argv[])
 {
   typedef float                    PixelType;
   typedef otb::Image<PixelType, 2> ImageType;
diff --git a/Testing/Code/BasicFilters/otbAmplitudePhaseToRGBFunctorNew.cxx b/Testing/Code/BasicFilters/otbAmplitudePhaseToRGBFunctorNew.cxx
index 54dbcb9..0f03da2 100644
--- a/Testing/Code/BasicFilters/otbAmplitudePhaseToRGBFunctorNew.cxx
+++ b/Testing/Code/BasicFilters/otbAmplitudePhaseToRGBFunctorNew.cxx
@@ -23,7 +23,7 @@
 #include "itkTernaryFunctorImageFilter.h"
 #include "otbAmplitudePhaseToRGBFunctor.h"
 
-int otbAmplitudePhaseToRGBFunctorNew(int argc, char * argv[])
+int otbAmplitudePhaseToRGBFunctorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef double                   PixelType;
diff --git a/Testing/Code/BasicFilters/otbAngularProjectionBinaryImageFilter.cxx b/Testing/Code/BasicFilters/otbAngularProjectionBinaryImageFilter.cxx
index 4d9d13d..0712a81 100644
--- a/Testing/Code/BasicFilters/otbAngularProjectionBinaryImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbAngularProjectionBinaryImageFilter.cxx
@@ -27,7 +27,7 @@
 
 #include "otbAngularProjectionBinaryImageFilter.h"
 
-int otbAngularProjectionBinaryImageFilterNewTest ( int argc, char * argv[] )
+int otbAngularProjectionBinaryImageFilterNewTest ( int itkNotUsed(argc), char * argv[] )
 {
   const unsigned int Dimension = 2;
   typedef float PixelType;
@@ -40,7 +40,7 @@ int otbAngularProjectionBinaryImageFilterNewTest ( int argc, char * argv[] )
   return EXIT_SUCCESS;
 }
 
-int otbAngularProjectionBinaryImageFilterTest ( int argc, char * argv[] )
+int otbAngularProjectionBinaryImageFilterTest ( int itkNotUsed(argc), char * argv[] )
 {
   typedef otb::CommandLineArgumentParser ParserType;
   ParserType::Pointer parser = ParserType::New();
@@ -120,6 +120,3 @@ int otbAngularProjectionBinaryImageFilterTest ( int argc, char * argv[] )
   }
   return EXIT_SUCCESS;
 }
-
-
-
diff --git a/Testing/Code/BasicFilters/otbAngularProjectionImageFilterNew.cxx b/Testing/Code/BasicFilters/otbAngularProjectionImageFilterNew.cxx
index c1effc4..a5b5317 100644
--- a/Testing/Code/BasicFilters/otbAngularProjectionImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbAngularProjectionImageFilterNew.cxx
@@ -26,7 +26,7 @@
 
 #include "otbAngularProjectionImageFilter.h"
 
-int otbAngularProjectionImageFilterNew ( int argc, char * argv[] )
+int otbAngularProjectionImageFilterNew ( int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
 
@@ -41,5 +41,3 @@ int otbAngularProjectionImageFilterNew ( int argc, char * argv[] )
   FilterType::Pointer filter = FilterType::New();
   return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/BasicFilters/otbAngularProjectionSetImageFilterNew.cxx b/Testing/Code/BasicFilters/otbAngularProjectionSetImageFilterNew.cxx
index 5c012ae..c408cb9 100644
--- a/Testing/Code/BasicFilters/otbAngularProjectionSetImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbAngularProjectionSetImageFilterNew.cxx
@@ -27,7 +27,7 @@
 
 #include "otbAngularProjectionSetImageFilter.h"
 
-int otbAngularProjectionSetImageFilterNew ( int argc, char * argv[] )
+int otbAngularProjectionSetImageFilterNew ( int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   const unsigned int SpaceDimension = 3;
@@ -44,4 +44,3 @@ int otbAngularProjectionSetImageFilterNew ( int argc, char * argv[] )
   FilterType::Pointer filter = FilterType::New();
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/BasicFilters/otbBCOInterpolateImageFunction.cxx b/Testing/Code/BasicFilters/otbBCOInterpolateImageFunction.cxx
index eb8ec23..a86f91e 100644
--- a/Testing/Code/BasicFilters/otbBCOInterpolateImageFunction.cxx
+++ b/Testing/Code/BasicFilters/otbBCOInterpolateImageFunction.cxx
@@ -26,7 +26,7 @@
 #include "otbStreamingResampleImageFilter.h"
 
 
-int otbBCOInterpolateImageFunctionNew(int argc, char * argv[])
+int otbBCOInterpolateImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                                           ImageType;
   typedef otb::BCOInterpolateImageFunction<ImageType, double>             InterpolatorType;
@@ -99,7 +99,7 @@ int otbBCOInterpolateImageFunction(int argc, char * argv[])
 }
 
 
-int otbBCOInterpolateImageFunctionOverVectorImageNew(int argc, char * argv[])
+int otbBCOInterpolateImageFunctionOverVectorImageNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::VectorImage<double, 2>                                     ImageType;
   typedef otb::BCOInterpolateImageFunction<ImageType, double>             InterpolatorType;
@@ -171,7 +171,7 @@ int otbBCOInterpolateImageFunctionOverVectorImage(int argc, char * argv[])
 }
 
 
-int otbBCOInterpolateImageFunctionTest(int argc, char * argv[])
+int otbBCOInterpolateImageFunctionTest(int itkNotUsed(argc), char * argv[])
 {
 
   const char * infname      = argv[1];
@@ -214,7 +214,7 @@ int otbBCOInterpolateImageFunctionTest(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbBCOInterpolateImageFunctionVectorImageTest(int argc, char * argv[])
+int otbBCOInterpolateImageFunctionVectorImageTest(int itkNotUsed(argc), char * argv[])
 {
 
   const char * infname      = argv[1];
diff --git a/Testing/Code/BasicFilters/otbBSplineDecompositionImageFilter.cxx b/Testing/Code/BasicFilters/otbBSplineDecompositionImageFilter.cxx
index 2556f01..08e09d6 100644
--- a/Testing/Code/BasicFilters/otbBSplineDecompositionImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbBSplineDecompositionImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbBSplineDecompositionImageFilter(int argc, char * argv[])
+int otbBSplineDecompositionImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbBSplineDecompositionImageFilterNew.cxx b/Testing/Code/BasicFilters/otbBSplineDecompositionImageFilterNew.cxx
index 0fdd4de..5706ad0 100644
--- a/Testing/Code/BasicFilters/otbBSplineDecompositionImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbBSplineDecompositionImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbBSplineDecompositionImageFilter.h"
 #include "otbImage.h"
 
-int otbBSplineDecompositionImageFilterNew(int argc, char * argv[])
+int otbBSplineDecompositionImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                                      ImageType;
   typedef otb::BSplineDecompositionImageFilter<ImageType, ImageType> BSplineDecompositionImageFilterType;
diff --git a/Testing/Code/BasicFilters/otbBSplineInterpolateImageFunctionNew.cxx b/Testing/Code/BasicFilters/otbBSplineInterpolateImageFunctionNew.cxx
index d527cc6..db61c6a 100644
--- a/Testing/Code/BasicFilters/otbBSplineInterpolateImageFunctionNew.cxx
+++ b/Testing/Code/BasicFilters/otbBSplineInterpolateImageFunctionNew.cxx
@@ -20,7 +20,7 @@
 #include "otbBSplineInterpolateImageFunction.h"
 #include "otbImage.h"
 
-int otbBSplineInterpolateImageFunctionNew(int argc, char * argv[])
+int otbBSplineInterpolateImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                                           ImageType;
   typedef otb::BSplineInterpolateImageFunction<ImageType, double, double> InterpolatorType;
diff --git a/Testing/Code/BasicFilters/otbBandMathImageFilter.cxx b/Testing/Code/BasicFilters/otbBandMathImageFilter.cxx
index 65d83c2..499e5b8 100644
--- a/Testing/Code/BasicFilters/otbBandMathImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbBandMathImageFilter.cxx
@@ -26,7 +26,7 @@
 #include "otbBandMathImageFilter.h"
 #include "otbImageFileWriter.h"
 
-int otbBandMathImageFilterNew( int argc, char* argv[])
+int otbBandMathImageFilterNew( int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef double                                            PixelType;
   //typedef float                                             PixelType;
@@ -38,7 +38,7 @@ int otbBandMathImageFilterNew( int argc, char* argv[])
    return EXIT_SUCCESS;
 }
 
-int otbBandMathImageFilter( int argc, char* argv[])
+int otbBandMathImageFilter( int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef double                                            PixelType;
   //typedef float                                             PixelType;
@@ -178,7 +178,7 @@ int otbBandMathImageFilter( int argc, char* argv[])
 }
 
 
-int otbBandMathImageFilterWithIdx( int argc, char* argv[])
+int otbBandMathImageFilterWithIdx( int itkNotUsed(argc), char* argv[])
 {
   const char * outfname1       = argv[1];
   const char * outfname2       = argv[2];
diff --git a/Testing/Code/BasicFilters/otbBasicFiltersTests15.cxx b/Testing/Code/BasicFilters/otbBasicFiltersTests15.cxx
index 5166937..45c4cb0 100644
--- a/Testing/Code/BasicFilters/otbBasicFiltersTests15.cxx
+++ b/Testing/Code/BasicFilters/otbBasicFiltersTests15.cxx
@@ -45,4 +45,5 @@ void RegisterTests()
   REGISTER_TEST(otbClampImageFilterTest);
   REGISTER_TEST(otbTileImageFilterNew);
   REGISTER_TEST(otbTileImageFilter);
+  REGISTER_TEST(otbStreamingHistogramVectorImageFilterNew);
 }
diff --git a/Testing/Code/BasicFilters/otbBinaryImageDensityFunction.cxx b/Testing/Code/BasicFilters/otbBinaryImageDensityFunction.cxx
index a8dc85b..09fcda2 100644
--- a/Testing/Code/BasicFilters/otbBinaryImageDensityFunction.cxx
+++ b/Testing/Code/BasicFilters/otbBinaryImageDensityFunction.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include <iostream>
 
-int otbBinaryImageDensityFunction(int argc, char* argv[])
+int otbBinaryImageDensityFunction(int itkNotUsed(argc), char* argv[])
 {
 
   const char * infname  = argv[1];
diff --git a/Testing/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.cxx b/Testing/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.cxx
index d0ccf58..df8df08 100644
--- a/Testing/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.cxx
+++ b/Testing/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageList.h"
 
-int otbBinaryImageMinimalBoundingRegionCalculator(int argc, char* argv[])
+int otbBinaryImageMinimalBoundingRegionCalculator(int itkNotUsed(argc), char* argv[])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculatorNew.cxx b/Testing/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculatorNew.cxx
index 092e436..14a687a 100644
--- a/Testing/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculatorNew.cxx
+++ b/Testing/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculatorNew.cxx
@@ -19,7 +19,7 @@
 #include "otbImage.h"
 #include "otbBinaryImageMinimalBoundingRegionCalculator.h"
 
-int otbBinaryImageMinimalBoundingRegionCalculatorNew(int argc, char* argv[])
+int otbBinaryImageMinimalBoundingRegionCalculatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/BasicFilters/otbBinaryImageToDensityImageFilter.cxx b/Testing/Code/BasicFilters/otbBinaryImageToDensityImageFilter.cxx
index c5f4a49..903db7a 100644
--- a/Testing/Code/BasicFilters/otbBinaryImageToDensityImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbBinaryImageToDensityImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbBinaryImageDensityFunction.h"
 #include "otbBinaryImageToDensityImageFilter.h"
 
-int otbBinaryImageToDensityImageFilter(int argc, char* argv[])
+int otbBinaryImageToDensityImageFilter(int itkNotUsed(argc), char* argv[])
 {
 
   const char *       infname        = argv[1];
diff --git a/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilter.cxx b/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilter.cxx
index cbefce7..54f47e9 100644
--- a/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilter.cxx
@@ -26,7 +26,7 @@
 #include "itkImageRegionConstIterator.h"
 #include "itkImageRegionIterator.h"
 
-int otbBoxAndWhiskerImageFilter(int argc, char * argv[])
+int otbBoxAndWhiskerImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilterNew.cxx b/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilterNew.cxx
index f8e8a7a..bace7cb 100644
--- a/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbBoxAndWhiskerImageFilterNew.cxx
@@ -24,7 +24,7 @@
 #include "otbVectorImage.h"
 #include "otbBoxAndWhiskerImageFilter.h"
 
-int otbBoxAndWhiskerImageFilterNew(int argc, char * argv[])
+int otbBoxAndWhiskerImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                   PixelType;
diff --git a/Testing/Code/BasicFilters/otbChangeLabelImageFilter.cxx b/Testing/Code/BasicFilters/otbChangeLabelImageFilter.cxx
index 1d041b0..9146583 100644
--- a/Testing/Code/BasicFilters/otbChangeLabelImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbChangeLabelImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImageFileReader.h"
 
-int otbChangeLabelImageFilter(int argc, char * argv[])
+int otbChangeLabelImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int ImageDimension = 2;
   const char *       inputFilename(argv[1]);
@@ -34,8 +34,6 @@ int otbChangeLabelImageFilter(int argc, char * argv[])
   typedef otb::VectorImage<PixelType, ImageDimension>                  OutputImageType;
   typedef InputImageType::PixelType                                    InputPixelType;
   typedef OutputImageType::PixelType                                   OutputPixelType;
-  typedef itk::ImageRegionIteratorWithIndex<InputImageType>            InputIteratorType;
-  typedef itk::ImageRegionIteratorWithIndex<OutputImageType>           OutputIteratorType;
   typedef otb::ChangeLabelImageFilter<InputImageType, OutputImageType> FilterType;
   typedef otb::ImageFileWriter<OutputImageType>                        WriterType;
   typedef otb::ImageFileReader<InputImageType>                         ReaderType;
diff --git a/Testing/Code/BasicFilters/otbChangeLabelImageFilterNew.cxx b/Testing/Code/BasicFilters/otbChangeLabelImageFilterNew.cxx
index 3ec49a1..fe36412 100644
--- a/Testing/Code/BasicFilters/otbChangeLabelImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbChangeLabelImageFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "itkChangeLabelImageFilter.h"
 #include "otbImage.h"
 
-int otbChangeLabelImageFilterNew(int argc, char * argv[])
+int otbChangeLabelImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int ImageDimension = 2;
 
diff --git a/Testing/Code/BasicFilters/otbClampImageFilter.cxx b/Testing/Code/BasicFilters/otbClampImageFilter.cxx
index 440577d..b195383 100644
--- a/Testing/Code/BasicFilters/otbClampImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbClampImageFilter.cxx
@@ -35,7 +35,7 @@ typedef otb::Image<OutputPixelType, Dimension> OutputImageType;
 
 typedef otb::ClampImageFilter<InputImageType, OutputImageType>    FilterType;
 
-int otbClampImageFilterNew(int argc, char* argv[])
+int otbClampImageFilterNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   /** instantiating the filter */
   FilterType::Pointer filter = FilterType::New();
@@ -43,7 +43,7 @@ int otbClampImageFilterNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbClampImageFilterTest(int argc, char* argv[])
+int otbClampImageFilterTest(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::ImageFileReader<InputImageType> ReaderType;
   typedef otb::ImageFileWriter<OutputImageType> WriterType;
diff --git a/Testing/Code/BasicFilters/otbClampVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbClampVectorImageFilter.cxx
index 7f372f7..bdc27e7 100644
--- a/Testing/Code/BasicFilters/otbClampVectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbClampVectorImageFilter.cxx
@@ -35,7 +35,7 @@ typedef otb::VectorImage<OutputPixelType, Dimension> OutputImageType;
 
 typedef otb::ClampVectorImageFilter<InputImageType, OutputImageType>  FilterType;
 
-int otbClampVectorImageFilterNew(int argc, char* argv[])
+int otbClampVectorImageFilterNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   /** instantiating the filter */
   FilterType::Pointer filter = FilterType::New();
@@ -43,7 +43,7 @@ int otbClampVectorImageFilterNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbClampVectorImageFilterTest(int argc, char* argv[])
+int otbClampVectorImageFilterTest(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::ImageFileReader<InputImageType> ReaderType;
   typedef otb::ImageFileWriter<OutputImageType> WriterType;
diff --git a/Testing/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.cxx b/Testing/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.cxx
index 20f2d2c..ad4a0eb 100644
--- a/Testing/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.cxx
+++ b/Testing/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int otbClosingOpeningMorphologicalFilter(int argc, char * argv[])
+int otbClosingOpeningMorphologicalFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   const unsigned int Radius = atoi(argv[3]);
diff --git a/Testing/Code/BasicFilters/otbClosingOpeningMorphologicalFilterNew.cxx b/Testing/Code/BasicFilters/otbClosingOpeningMorphologicalFilterNew.cxx
index 7987e91..9166fc4 100644
--- a/Testing/Code/BasicFilters/otbClosingOpeningMorphologicalFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbClosingOpeningMorphologicalFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkBinaryBallStructuringElement.h"
 #include "otbImage.h"
 
-int otbClosingOpeningMorphologicalFilterNew(int argc, char * argv[])
+int otbClosingOpeningMorphologicalFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                                InputPixelType;
diff --git a/Testing/Code/BasicFilters/otbComplexToVectorImageCastFilter.cxx b/Testing/Code/BasicFilters/otbComplexToVectorImageCastFilter.cxx
index 760259c..c673ef9 100644
--- a/Testing/Code/BasicFilters/otbComplexToVectorImageCastFilter.cxx
+++ b/Testing/Code/BasicFilters/otbComplexToVectorImageCastFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 
 
-int otbComplexToVectorImageCastFilterNew(int argc, char * argv[])
+int otbComplexToVectorImageCastFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef std::complex<float>        ComplexType;
   typedef otb::VectorImage<ComplexType, 2> CplxImageType;
@@ -39,7 +39,7 @@ int otbComplexToVectorImageCastFilterNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbComplexToVectorImageCastFilterTest(int argc, char * argv[])
+int otbComplexToVectorImageCastFilterTest(int itkNotUsed(argc), char * argv[])
 {
   typedef std::complex<float>        ComplexType;
   typedef otb::Image<ComplexType, 2> CplxImageType;
diff --git a/Testing/Code/BasicFilters/otbConcatenateScalarValueImageFilterTest.cxx b/Testing/Code/BasicFilters/otbConcatenateScalarValueImageFilterTest.cxx
index d10e965..d994dd9 100644
--- a/Testing/Code/BasicFilters/otbConcatenateScalarValueImageFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbConcatenateScalarValueImageFilterTest.cxx
@@ -29,14 +29,14 @@ typedef double PixelType;
 typedef otb::VectorImage<PixelType> ImageType;
 typedef otb::ConcatenateScalarValueImageFilter<ImageType, ImageType> FilterType;
 
-int otbConcatenateScalarValueImageFilterNew(int argc, char * argv[])
+int otbConcatenateScalarValueImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   FilterType::Pointer filter = FilterType::New();
   std::cout << filter << std::endl;
   return EXIT_SUCCESS;
 }
 
-int otbConcatenateScalarValueImageFilterTest(int argc, char * argv[])
+int otbConcatenateScalarValueImageFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   ImageType::Pointer image = ImageType::New();
 
diff --git a/Testing/Code/BasicFilters/otbConcatenateVectorDataFilter.cxx b/Testing/Code/BasicFilters/otbConcatenateVectorDataFilter.cxx
index b59f13a..88154d2 100644
--- a/Testing/Code/BasicFilters/otbConcatenateVectorDataFilter.cxx
+++ b/Testing/Code/BasicFilters/otbConcatenateVectorDataFilter.cxx
@@ -32,7 +32,7 @@ typedef otb::VectorDataFileReader<VectorDataType>         ReaderType;
 typedef otb::VectorDataFileWriter<VectorDataType>         WriterType;
 typedef otb::ConcatenateVectorDataFilter<VectorDataType>  ConcatenateFilterType;
 
-int otbConcatenateVectorDataFilterNew (int argc, char * argv[])
+int otbConcatenateVectorDataFilterNew (int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   ConcatenateFilterType::Pointer concatenate = ConcatenateFilterType::New();
   return EXIT_SUCCESS;
diff --git a/Testing/Code/BasicFilters/otbConnectedComponentMuParserFunctorTest.cxx b/Testing/Code/BasicFilters/otbConnectedComponentMuParserFunctorTest.cxx
index fe7dbad..b9b4b8b 100644
--- a/Testing/Code/BasicFilters/otbConnectedComponentMuParserFunctorTest.cxx
+++ b/Testing/Code/BasicFilters/otbConnectedComponentMuParserFunctorTest.cxx
@@ -31,11 +31,9 @@
 
 
 
-int otbConnectedComponentMuParserFunctorTest(int argc, char * argv[])
+int otbConnectedComponentMuParserFunctorTest(int argc, char *argv[])
 {
 
-
-
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
   const char * expression =     argv[3];
diff --git a/Testing/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculatorNew.cxx b/Testing/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculatorNew.cxx
index 8c5d745..16c2704 100644
--- a/Testing/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculatorNew.cxx
+++ b/Testing/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculatorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImage.h"
 #include "otbContinuousMinimumMaximumImageCalculator.h"
 
-int otbContinuousMinimumMaximumImageCalculatorNew(int argc, char * argv[])
+int otbContinuousMinimumMaximumImageCalculatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int ImageDimension = 2;
 
diff --git a/Testing/Code/BasicFilters/otbConvolutionImageFilter.cxx b/Testing/Code/BasicFilters/otbConvolutionImageFilter.cxx
index 0da58d1..14a65d1 100644
--- a/Testing/Code/BasicFilters/otbConvolutionImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbConvolutionImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbConvolutionImageFilter.h"
 #include "itkConstantBoundaryCondition.h"
 
-int otbConvolutionImageFilter(int argc, char * argv[])
+int otbConvolutionImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName = argv[1];
   const char * outputFileName = argv[2];
diff --git a/Testing/Code/BasicFilters/otbConvolutionImageFilterNew.cxx b/Testing/Code/BasicFilters/otbConvolutionImageFilterNew.cxx
index bc60e98..a3d6d18 100644
--- a/Testing/Code/BasicFilters/otbConvolutionImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbConvolutionImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImage.h"
 #include "otbConvolutionImageFilter.h"
 
-int otbConvolutionImageFilterNew(int argc, char * argv[])
+int otbConvolutionImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   typedef double OutputPixelType;
diff --git a/Testing/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.cxx b/Testing/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.cxx
index facf3f9..5fcaa35 100644
--- a/Testing/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.cxx
+++ b/Testing/Code/BasicFilters/otbDBOverlapDataNodeFeatureFunction.cxx
@@ -24,7 +24,7 @@
 #include "otbVectorDataFileWriter.h"
 #include "itkPreOrderTreeIterator.h"
 
-int otbDBOverlapDataNodeFeatureFunctionNew(int argc, char* argv[])
+int otbDBOverlapDataNodeFeatureFunctionNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef double CoordRepType;
   typedef double PrecisionType;
@@ -38,7 +38,7 @@ int otbDBOverlapDataNodeFeatureFunctionNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbDBOverlapDataNodeFeatureFunction(int argc, char* argv[])
+int otbDBOverlapDataNodeFeatureFunction(int itkNotUsed(argc), char* argv[])
 {
   const char * inputVD  = argv[1];
   const char * inputDB  = argv[2];
diff --git a/Testing/Code/BasicFilters/otbEdgeDensityImageFilter.cxx b/Testing/Code/BasicFilters/otbEdgeDensityImageFilter.cxx
index 5864457..4c93bba 100644
--- a/Testing/Code/BasicFilters/otbEdgeDensityImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbEdgeDensityImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbEdgeDensityImageFilter(int argc, char* argv[])
+int otbEdgeDensityImageFilter(int itkNotUsed(argc), char* argv[])
 {
 
   const char *       infname       = argv[1];
@@ -41,7 +41,6 @@ int otbEdgeDensityImageFilter(int argc, char* argv[])
   typedef float PixelType;
 
   typedef otb::Image<PixelType, Dimension> ImageType;
-  typedef ImageType::IndexType             IndexType;
   typedef otb::ImageFileReader<ImageType>  ReaderType;
   typedef otb::ImageFileWriter<ImageType>  WriterType;
 
diff --git a/Testing/Code/BasicFilters/otbEdgeDensityImageFilterNew.cxx b/Testing/Code/BasicFilters/otbEdgeDensityImageFilterNew.cxx
index e1001c5..33f20c3 100644
--- a/Testing/Code/BasicFilters/otbEdgeDensityImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbEdgeDensityImageFilterNew.cxx
@@ -27,8 +27,6 @@ int otbEdgeDensityImageFilterNew(int, char*[])
   typedef float PixelType;
 
   typedef otb::Image<PixelType, Dimension> ImageType;
-  typedef ImageType::IndexType             IndexType;
-
   typedef otb::BinaryImageDensityFunction<ImageType>               CountFunctionType;
   typedef itk::CannyEdgeDetectionImageFilter<ImageType, ImageType> CannyDetectorType;
 
diff --git a/Testing/Code/BasicFilters/otbEdgeDetectorImageFilter.cxx b/Testing/Code/BasicFilters/otbEdgeDetectorImageFilter.cxx
index dec5576..d1569f7 100644
--- a/Testing/Code/BasicFilters/otbEdgeDetectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbEdgeDetectorImageFilter.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileWriter.h"
 #include "itkSobelEdgeDetectionImageFilter.h"
 
-int otbEdgeDetectorImageFilter(int argc, char* argv[])
+int otbEdgeDetectorImageFilter(int itkNotUsed(argc), char* argv[])
 {
   typedef double                          PixelType;
   typedef otb::Image<PixelType, 2>        ImageType;
diff --git a/Testing/Code/BasicFilters/otbEstimateInnerProductPCAImageFilter.cxx b/Testing/Code/BasicFilters/otbEstimateInnerProductPCAImageFilter.cxx
index eb5b7e5..25d7ab3 100644
--- a/Testing/Code/BasicFilters/otbEstimateInnerProductPCAImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbEstimateInnerProductPCAImageFilter.cxx
@@ -21,7 +21,7 @@
 
 #include "otbVectorImage.h"
 
-int otbEstimateInnerProductPCAImageFilter(int argc, char* argv[])
+int otbEstimateInnerProductPCAImageFilter(int itkNotUsed(argc), char* argv[])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/BasicFilters/otbEstimateInnerProductPCAImageFilterNew.cxx b/Testing/Code/BasicFilters/otbEstimateInnerProductPCAImageFilterNew.cxx
index 65d12c7..34401bb 100644
--- a/Testing/Code/BasicFilters/otbEstimateInnerProductPCAImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbEstimateInnerProductPCAImageFilterNew.cxx
@@ -18,7 +18,7 @@
 #include "otbEstimateInnerProductPCAImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbEstimateInnerProductPCAImageFilterNew(int argc, char* argv[])
+int otbEstimateInnerProductPCAImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValue.cxx b/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValue.cxx
index f556a8e..6fbf120 100644
--- a/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValue.cxx
+++ b/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValue.cxx
@@ -23,7 +23,7 @@
 #include "itkVariableLengthVector.h"
 #include "otbEuclideanDistanceMetricWithMissingValue.h"
 
-int otbEuclideanDistanceMetricWithMissingValue(int argc, char * argv[])
+int otbEuclideanDistanceMetricWithMissingValue(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef itk::VariableLengthVector<double>                              VectorType;
diff --git a/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValueNew.cxx b/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValueNew.cxx
index 4e4a2c3..ce76201 100644
--- a/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValueNew.cxx
+++ b/Testing/Code/BasicFilters/otbEuclideanDistanceMetricWithMissingValueNew.cxx
@@ -23,7 +23,7 @@
 #include "itkVariableLengthVector.h"
 #include "otbEuclideanDistanceMetricWithMissingValue.h"
 
-int otbEuclideanDistanceMetricWithMissingValueNew(int argc, char * argv[])
+int otbEuclideanDistanceMetricWithMissingValueNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef itk::VariableLengthVector<double>                              VectorType;
diff --git a/Testing/Code/BasicFilters/otbFastICAImageFilter.cxx b/Testing/Code/BasicFilters/otbFastICAImageFilter.cxx
index f4a16e0..c863411 100644
--- a/Testing/Code/BasicFilters/otbFastICAImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbFastICAImageFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbFastICAImageFilter.h"
 #include "otbFastICAInternalOptimizerVectorImageFilter.h"
 
-int otbFastICAInternalOptimizerVectorImageFilterNewTest ( int argc, char* argv[] )
+int otbFastICAInternalOptimizerVectorImageFilterNewTest ( int itkNotUsed(argc), char* itkNotUsed(argv) [] )
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -35,7 +35,7 @@ int otbFastICAInternalOptimizerVectorImageFilterNewTest ( int argc, char* argv[]
   return EXIT_SUCCESS;
 }
 
-int otbFastICAImageFilterNewTest ( int argc, char* argv[] )
+int otbFastICAImageFilterNewTest ( int itkNotUsed(argc), char* itkNotUsed(argv) [] )
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -143,5 +143,3 @@ int otbFastICAImageFilterTest ( int argc, char* argv[] )
 
   return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.cxx b/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.cxx
index d10ecad..ed2a12c 100644
--- a/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.cxx
+++ b/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.cxx
@@ -24,7 +24,7 @@
 #include "itkVariableLengthVector.h"
 #include "otbFlexibleDistanceWithMissingValue.h"
 
-int otbFlexibleDistanceWithMissingValue(int argc, char * argv[])
+int otbFlexibleDistanceWithMissingValue(int itkNotUsed(argc), char * argv[])
 {
 
   typedef itk::VariableLengthVector<double>                             VectorType;
diff --git a/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValueNew.cxx b/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValueNew.cxx
index 2d50973..d4a76c8 100644
--- a/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValueNew.cxx
+++ b/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValueNew.cxx
@@ -23,7 +23,7 @@
 #include "itkVariableLengthVector.h"
 #include "otbFlexibleDistanceWithMissingValue.h"
 
-int otbFlexibleDistanceWithMissingValueNew(int argc, char * argv[])
+int otbFlexibleDistanceWithMissingValueNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef itk::VariableLengthVector<double>                             VectorType;
diff --git a/Testing/Code/BasicFilters/otbFrostFilter.cxx b/Testing/Code/BasicFilters/otbFrostFilter.cxx
index cae2373..e2ec9c5 100644
--- a/Testing/Code/BasicFilters/otbFrostFilter.cxx
+++ b/Testing/Code/BasicFilters/otbFrostFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int otbFrostFilter(int argc, char * argv[])
+int otbFrostFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/BasicFilters/otbFrostFilterNew.cxx b/Testing/Code/BasicFilters/otbFrostFilterNew.cxx
index 65cc447..94273b9 100644
--- a/Testing/Code/BasicFilters/otbFrostFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbFrostFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbFrostImageFilter.h"
 #include "otbImage.h"
 
-int otbFrostFilterNew(int argc, char * argv[])
+int otbFrostFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef unsigned char OutputPixelType;
diff --git a/Testing/Code/BasicFilters/otbFunctionToImageFilter.cxx b/Testing/Code/BasicFilters/otbFunctionToImageFilter.cxx
index 7517d90..8f946e9 100644
--- a/Testing/Code/BasicFilters/otbFunctionToImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbFunctionToImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbFunctionToImageFilter(int argc, char * argv[])
+int otbFunctionToImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                    PixelType;
diff --git a/Testing/Code/BasicFilters/otbFunctionToImageFilterNew.cxx b/Testing/Code/BasicFilters/otbFunctionToImageFilterNew.cxx
index 0dbda7c..2c2a8da 100644
--- a/Testing/Code/BasicFilters/otbFunctionToImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbFunctionToImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbFunctionToImageFilter.h"
 #include "itkVarianceImageFunction.h"
 
-int otbFunctionToImageFilterNew(int argc, char * argv[])
+int otbFunctionToImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                PixelType;
diff --git a/Testing/Code/BasicFilters/otbFunctionWithNeighborhoodToImageFilter.cxx b/Testing/Code/BasicFilters/otbFunctionWithNeighborhoodToImageFilter.cxx
index b8adc0c..4d874f3 100644
--- a/Testing/Code/BasicFilters/otbFunctionWithNeighborhoodToImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbFunctionWithNeighborhoodToImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbFunctionWithNeighborhoodToImageFilter(int argc, char * argv[])
+int otbFunctionWithNeighborhoodToImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                    PixelType;
diff --git a/Testing/Code/BasicFilters/otbFunctionWithNeighborhoodToImageFilterNew.cxx b/Testing/Code/BasicFilters/otbFunctionWithNeighborhoodToImageFilterNew.cxx
index 235a790..71e0020 100644
--- a/Testing/Code/BasicFilters/otbFunctionWithNeighborhoodToImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbFunctionWithNeighborhoodToImageFilterNew.cxx
@@ -55,14 +55,11 @@ private:
   OffsetType m_Offset;
 };
 
-int otbFunctionWithNeighborhoodToImageFilterNew(int argc, char * argv[])
+int otbFunctionWithNeighborhoodToImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                    PixelType;
   typedef otb::Image<PixelType, Dimension>          ImageType;
-  typedef itk::VariableLengthVector<double>         VectorType;
-  typedef itk::ConstNeighborhoodIterator<ImageType> IteratorType;
-
   typedef TextureFunctorTest<PixelType, PixelType>                                       FunctorType;
   typedef otb::TextureImageFunction<ImageType, FunctorType>                              FunctionType;
   typedef otb::FunctionWithNeighborhoodToImageFilter<ImageType, ImageType, FunctionType> FilterType;
diff --git a/Testing/Code/BasicFilters/otbGaborFilterGeneratorNew.cxx b/Testing/Code/BasicFilters/otbGaborFilterGeneratorNew.cxx
index b1db3aa..ab6a500 100644
--- a/Testing/Code/BasicFilters/otbGaborFilterGeneratorNew.cxx
+++ b/Testing/Code/BasicFilters/otbGaborFilterGeneratorNew.cxx
@@ -18,7 +18,7 @@
 
 #include "otbGaborFilterGenerator.h"
 
-int otbGaborFilterGeneratorNew(int argc, char * argv[])
+int otbGaborFilterGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double                                   PrecisionType;
   typedef otb::GaborFilterGenerator<PrecisionType> GaborGeneratorType;
diff --git a/Testing/Code/BasicFilters/otbHorizontalSobelVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbHorizontalSobelVectorImageFilter.cxx
index 666222b..8f77718 100644
--- a/Testing/Code/BasicFilters/otbHorizontalSobelVectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbHorizontalSobelVectorImageFilter.cxx
@@ -26,7 +26,7 @@
 
 #include "otbHorizontalSobelVectorImageFilter.h"
 
-int otbHorizontalSobelVectorImageFilterNewTest ( int argc, char * argv[] )
+int otbHorizontalSobelVectorImageFilterNewTest ( int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -97,4 +97,3 @@ int otbHorizontalSobelVectorImageFilterTest ( int argc, char* argv[] )
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/BasicFilters/otbImageAndVectorImageOperationFilterNew.cxx b/Testing/Code/BasicFilters/otbImageAndVectorImageOperationFilterNew.cxx
index c77a2f2..1360a0b 100644
--- a/Testing/Code/BasicFilters/otbImageAndVectorImageOperationFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbImageAndVectorImageOperationFilterNew.cxx
@@ -24,7 +24,7 @@
 #include "otbVectorImage.h"
 #include "otbImageAndVectorImageOperationFilter.h"
 
-int otbImageAndVectorImageOperationFilterNew(int argc, char * argv[])
+int otbImageAndVectorImageOperationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double                                                                                     PixelType;
   typedef otb::Image<PixelType, 2>                                                                   ScalarImageType;
diff --git a/Testing/Code/BasicFilters/otbImageAndVectorImageOperationFilterTest.cxx b/Testing/Code/BasicFilters/otbImageAndVectorImageOperationFilterTest.cxx
index 7bac0dc..700c26b 100644
--- a/Testing/Code/BasicFilters/otbImageAndVectorImageOperationFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbImageAndVectorImageOperationFilterTest.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImageAndVectorImageOperationFilter.h"
 
-int otbImageAndVectorImageOperationFilterTest(int argc, char * argv[])
+int otbImageAndVectorImageOperationFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * infname       = argv[1];
   const char * invectfname   = argv[2];
diff --git a/Testing/Code/BasicFilters/otbImageListToImageListApplyFilter.cxx b/Testing/Code/BasicFilters/otbImageListToImageListApplyFilter.cxx
index fdee351..6fa2385 100644
--- a/Testing/Code/BasicFilters/otbImageListToImageListApplyFilter.cxx
+++ b/Testing/Code/BasicFilters/otbImageListToImageListApplyFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageListToImageListApplyFilter(int argc, char * argv[])
+int otbImageListToImageListApplyFilter(int itkNotUsed(argc), char * argv[])
 {
   char * infname1  = argv[1];
   char * infname2  = argv[2];
diff --git a/Testing/Code/BasicFilters/otbImageListToImageListApplyFilterNew.cxx b/Testing/Code/BasicFilters/otbImageListToImageListApplyFilterNew.cxx
index 03da7fe..b384b03 100644
--- a/Testing/Code/BasicFilters/otbImageListToImageListApplyFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbImageListToImageListApplyFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbImage.h"
 #include "itkMeanImageFilter.h"
 
-int otbImageListToImageListApplyFilterNew(int argc, char * argv[])
+int otbImageListToImageListApplyFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                              PixelType;
diff --git a/Testing/Code/BasicFilters/otbImageListToSingleImageFilterTest.cxx b/Testing/Code/BasicFilters/otbImageListToSingleImageFilterTest.cxx
index 6f46fab..de8b0bc 100644
--- a/Testing/Code/BasicFilters/otbImageListToSingleImageFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbImageListToSingleImageFilterTest.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbBandMathImageFilter.h"
 
-int otbImageListToSingleImageFilterNew(int argc, char * argv[])
+int otbImageListToSingleImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
 
@@ -46,7 +46,7 @@ int otbImageListToSingleImageFilterNew(int argc, char * argv[])
 
 
 
-int otbImageListToSingleImageFilter(int argc, char * argv[])
+int otbImageListToSingleImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   char *             infname   = argv[1];
diff --git a/Testing/Code/BasicFilters/otbImagePCAShapeModelEstimatorTest.cxx b/Testing/Code/BasicFilters/otbImagePCAShapeModelEstimatorTest.cxx
index ceab42e..1fbffe8 100644
--- a/Testing/Code/BasicFilters/otbImagePCAShapeModelEstimatorTest.cxx
+++ b/Testing/Code/BasicFilters/otbImagePCAShapeModelEstimatorTest.cxx
@@ -52,7 +52,7 @@ public:
   itk::LightProcessObject::Pointer m_Process;
 };
 
-int otbImagePCAShapeModelEstimatorTest(int argc, char* argv[])
+int otbImagePCAShapeModelEstimatorTest(int itkNotUsed(argc), char* argv[])
 {
   /*    const unsigned int numberOfPrincipalComponentsRequired(atoi(argv[1]));
       const unsigned int numberOfTrainingImages(atoi(argv[2]));
@@ -77,11 +77,6 @@ int otbImagePCAShapeModelEstimatorTest(int argc, char* argv[])
   //------------------------------------------------------
   typedef otb::Image<double, NDIMENSION> InputImageType;
   typedef otb::Image<double, NDIMENSION> OutputImageType;
-  typedef
-  itk::ImageRegionIterator<InputImageType> InputImageIterator;
-
-  typedef
-  itk::ImageRegionIterator<OutputImageType> OutputImageIterator;
 
   typedef otb::ImageFileReader<InputImageType>  ReaderType;
   typedef otb::ImageFileWriter<OutputImageType> WriterType;
diff --git a/Testing/Code/BasicFilters/otbImageToPointSetFilterTest.cxx b/Testing/Code/BasicFilters/otbImageToPointSetFilterTest.cxx
index e3abbc3..299198e 100644
--- a/Testing/Code/BasicFilters/otbImageToPointSetFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbImageToPointSetFilterTest.cxx
@@ -22,17 +22,17 @@
 #include "otbImage.h"
 #include "itkPointSet.h"
 
-int otbImageToPointSetFilterTest(int argc, char *argv[])
+int otbImageToPointSetFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
+/*
   const unsigned int Dimension = 2;
 
   typedef unsigned char PixelType;
 
   typedef otb::Image<PixelType, Dimension>                    ImageType;
   typedef itk::PointSet<PixelType, Dimension>                 PointSetType;
-  typedef otb::ImageToPointSetFilter<ImageType, PointSetType> FunctionType;
 
   //FunctionType::Pointer function = FunctionType::New();
-
+*/
   return EXIT_SUCCESS;
 }
diff --git a/Testing/Code/BasicFilters/otbImaginaryImageToComplexImageFilterTest.cxx b/Testing/Code/BasicFilters/otbImaginaryImageToComplexImageFilterTest.cxx
index c6049d0..fcdbbfa 100644
--- a/Testing/Code/BasicFilters/otbImaginaryImageToComplexImageFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbImaginaryImageToComplexImageFilterTest.cxx
@@ -25,7 +25,7 @@
 #include "itkComplexToImaginaryImageFilter.h"
 #include "otbStreamingCompareImageFilter.h"
 
-int otbImaginaryImageToComplexImageFilterTest(int argc, char * argv[])
+int otbImaginaryImageToComplexImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
 
diff --git a/Testing/Code/BasicFilters/otbImportGeoInformationImageFilter.cxx b/Testing/Code/BasicFilters/otbImportGeoInformationImageFilter.cxx
index 0ec991f..e7e4aeb 100644
--- a/Testing/Code/BasicFilters/otbImportGeoInformationImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbImportGeoInformationImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImportGeoInformationImageFilter(int argc, char * argv[])
+int otbImportGeoInformationImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbImportGeoInformationImageFilterNew.cxx b/Testing/Code/BasicFilters/otbImportGeoInformationImageFilterNew.cxx
index d5aa47f..79e76eb 100644
--- a/Testing/Code/BasicFilters/otbImportGeoInformationImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbImportGeoInformationImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImportGeoInformationImageFilter.h"
 #include "otbImage.h"
 
-int otbImportGeoInformationImageFilterNew(int argc, char * argv[])
+int otbImportGeoInformationImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                              PixelType;
diff --git a/Testing/Code/BasicFilters/otbImportGeoInformationImageFilterWithKeywordList.cxx b/Testing/Code/BasicFilters/otbImportGeoInformationImageFilterWithKeywordList.cxx
index 587893a..b5318fd 100644
--- a/Testing/Code/BasicFilters/otbImportGeoInformationImageFilterWithKeywordList.cxx
+++ b/Testing/Code/BasicFilters/otbImportGeoInformationImageFilterWithKeywordList.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageKeywordlist.h"
 
-int otbImportGeoInformationImageFilterWithKeywordList(int argc, char * argv[])
+int otbImportGeoInformationImageFilterWithKeywordList(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outputAsciiFilenameOtbImage = argv[2];
diff --git a/Testing/Code/BasicFilters/otbInnerProductPCAImageFilter.cxx b/Testing/Code/BasicFilters/otbInnerProductPCAImageFilter.cxx
index e234a07..08462de 100644
--- a/Testing/Code/BasicFilters/otbInnerProductPCAImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbInnerProductPCAImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbInnerProductPCAImageFilter.h"
 #include "otbMultiToMonoChannelExtractROI.h"
 
-int otbInnerProductPCAImageFilter(int argc, char* argv[])
+int otbInnerProductPCAImageFilter(int itkNotUsed(argc), char* argv[])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/BasicFilters/otbInnerProductPCAImageFilterNew.cxx b/Testing/Code/BasicFilters/otbInnerProductPCAImageFilterNew.cxx
index d605ca9..0da9642 100644
--- a/Testing/Code/BasicFilters/otbInnerProductPCAImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbInnerProductPCAImageFilterNew.cxx
@@ -18,7 +18,7 @@
 #include "otbInnerProductPCAImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbInnerProductPCAImageFilterNew(int argc, char* argv[])
+int otbInnerProductPCAImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx b/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx
index 0eae54d..6b02512 100644
--- a/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx
+++ b/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx
@@ -21,7 +21,7 @@
 #include <cstdlib>
 #include "otbMath.h"
 
-int otbInverseLogPolarTransform(int argc, char* argv[])
+int otbInverseLogPolarTransform(int itkNotUsed(argc), char* argv[])
 {
   double       radialStep = atof(argv[1]);
   double       angularStep = atof(argv[2]);
diff --git a/Testing/Code/BasicFilters/otbInverseLogPolarTransformNew.cxx b/Testing/Code/BasicFilters/otbInverseLogPolarTransformNew.cxx
index d75fb7c..bb837df 100644
--- a/Testing/Code/BasicFilters/otbInverseLogPolarTransformNew.cxx
+++ b/Testing/Code/BasicFilters/otbInverseLogPolarTransformNew.cxx
@@ -18,7 +18,7 @@
 #include "otbInverseLogPolarTransform.h"
 #include <cstdlib>
 
-int otbInverseLogPolarTransformNew(int argc, char* argv[])
+int otbInverseLogPolarTransformNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double                                       PrecisionType;
   typedef otb::InverseLogPolarTransform<PrecisionType> InverseLogPolarTransformType;
diff --git a/Testing/Code/BasicFilters/otbInverseLogPolarTransformResample.cxx b/Testing/Code/BasicFilters/otbInverseLogPolarTransformResample.cxx
index 5c3d144..f4212ba 100644
--- a/Testing/Code/BasicFilters/otbInverseLogPolarTransformResample.cxx
+++ b/Testing/Code/BasicFilters/otbInverseLogPolarTransformResample.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbInverseLogPolarTransformResample(int argc, char* argv[])
+int otbInverseLogPolarTransformResample(int itkNotUsed(argc), char* argv[])
 {
   char * inputFileName = argv[1];
   char * outputFileName = argv[2];
@@ -41,7 +41,7 @@ int otbInverseLogPolarTransformResample(int argc, char* argv[])
 
   ReaderType::Pointer reader = ReaderType::New();
   reader->SetFileName(inputFileName);
-  reader->Update();
+  reader->UpdateOutputInformation();
 
   InterpolatorType::Pointer interpolator = InterpolatorType::New();
   interpolator->SetInputImage(reader->GetOutput());
@@ -73,6 +73,16 @@ int otbInverseLogPolarTransformResample(int argc, char* argv[])
   resampler->SetDefaultPixelValue(0);
   resampler->SetSize(size);
 
+  ImageType::PointType origin;
+  origin[0] = 0.5;
+  origin[1] = 0.5;
+  resampler->SetOutputOrigin(origin);
+
+  ImageType::SpacingType spacing;
+  spacing[0] = 1.0;
+  spacing[1] = 1.0;
+  resampler->SetOutputSpacing(spacing);
+
   WriterType::Pointer writer = WriterType::New();
   writer->SetFileName(outputFileName);
   writer->SetInput(resampler->GetOutput());
diff --git a/Testing/Code/BasicFilters/otbKeyPointDensityImageFilterNew.cxx b/Testing/Code/BasicFilters/otbKeyPointDensityImageFilterNew.cxx
index 9a5902f..b0954d8 100644
--- a/Testing/Code/BasicFilters/otbKeyPointDensityImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbKeyPointDensityImageFilterNew.cxx
@@ -31,7 +31,6 @@ int otbKeyPointDensityImageFilterNew(int, char*[])
   typedef float PixelType;
 
   typedef otb::Image<PixelType, Dimension>                           ImageType;
-  typedef ImageType::IndexType                                       IndexType;
   typedef itk::VariableLengthVector<PixelType>                       RealVectorType;
   typedef itk::PointSet<RealVectorType, Dimension>                   PointSetType;
   typedef otb::ImageToSIFTKeyPointSetFilter<ImageType, PointSetType> DetectorType;
diff --git a/Testing/Code/BasicFilters/otbKeyPointDensityImageFilterTest.cxx b/Testing/Code/BasicFilters/otbKeyPointDensityImageFilterTest.cxx
index d815294..0ce4867 100644
--- a/Testing/Code/BasicFilters/otbKeyPointDensityImageFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbKeyPointDensityImageFilterTest.cxx
@@ -27,7 +27,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbKeyPointDensityImageFilterTest(int argc, char* argv[])
+int otbKeyPointDensityImageFilterTest(int itkNotUsed(argc), char* argv[])
 {
   const char *       infname = argv[1];
   const char *       outfname = argv[2];
@@ -39,7 +39,6 @@ int otbKeyPointDensityImageFilterTest(int argc, char* argv[])
   typedef float PixelType;
 
   typedef otb::Image<PixelType, Dimension>                           ImageType;
-  typedef ImageType::IndexType                                       IndexType;
   typedef otb::ImageFileReader<ImageType>                            ReaderType;
   typedef otb::ImageFileWriter<ImageType>                            WriterType;
   typedef itk::VariableLengthVector<PixelType>                       RealVectorType;
diff --git a/Testing/Code/BasicFilters/otbLabelImageRegionMergingFilter.cxx b/Testing/Code/BasicFilters/otbLabelImageRegionMergingFilter.cxx
index 884a7f4..b9fb530 100644
--- a/Testing/Code/BasicFilters/otbLabelImageRegionMergingFilter.cxx
+++ b/Testing/Code/BasicFilters/otbLabelImageRegionMergingFilter.cxx
@@ -46,7 +46,6 @@ int otbLabelImageRegionMergingFilter(int argc, char * argv[])
 
   const unsigned int Dimension = 2;
   typedef float                                            PixelType;
-  typedef double                                           KernelType;
   typedef otb::VectorImage<PixelType, Dimension>           ImageType;
   typedef otb::ImageFileReader<ImageType>                  ReaderType;
   typedef otb::ImageFileWriter<ImageType>                  WriterType;
diff --git a/Testing/Code/BasicFilters/otbLabelImageRegionPruningFilter.cxx b/Testing/Code/BasicFilters/otbLabelImageRegionPruningFilter.cxx
index d050061..d4f9af0 100644
--- a/Testing/Code/BasicFilters/otbLabelImageRegionPruningFilter.cxx
+++ b/Testing/Code/BasicFilters/otbLabelImageRegionPruningFilter.cxx
@@ -48,7 +48,6 @@ int otbLabelImageRegionPruningFilter(int argc, char * argv[])
 
   const unsigned int Dimension = 2;
   typedef float                                            PixelType;
-  typedef double                                           KernelType;
   typedef otb::VectorImage<PixelType, Dimension>           ImageType;
   typedef otb::ImageFileReader<ImageType>                  ReaderType;
   typedef otb::ImageFileWriter<ImageType>                  WriterType;
diff --git a/Testing/Code/BasicFilters/otbLabelObjectOpeningMuParserFilterNew.cxx b/Testing/Code/BasicFilters/otbLabelObjectOpeningMuParserFilterNew.cxx
index ea2f3b8..5bd2865 100644
--- a/Testing/Code/BasicFilters/otbLabelObjectOpeningMuParserFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbLabelObjectOpeningMuParserFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbAttributesMapLabelObject.h"
 #include "otbLabelObjectOpeningMuParserFilter.h"
 
-int otbLabelObjectOpeningMuParserFilterNew( int argc, char* argv[])
+int otbLabelObjectOpeningMuParserFilterNew( int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   const unsigned int     Dimension = 2;
diff --git a/Testing/Code/BasicFilters/otbLabelObjectOpeningMuParserFilterTest.cxx b/Testing/Code/BasicFilters/otbLabelObjectOpeningMuParserFilterTest.cxx
index f146b22..395ec23 100644
--- a/Testing/Code/BasicFilters/otbLabelObjectOpeningMuParserFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbLabelObjectOpeningMuParserFilterTest.cxx
@@ -31,7 +31,7 @@
 #include "itkLabelMapToLabelImageFilter.h"
 #include "otbBandsStatisticsAttributesLabelMapFilter.h"
 
-int otbLabelObjectOpeningMuParserFilterTest(int argc, char * argv[])
+int otbLabelObjectOpeningMuParserFilterTest(int itkNotUsed(argc), char * argv[])
 {
 
   const char * imageInputFilename  = argv[1];
@@ -45,7 +45,6 @@ int otbLabelObjectOpeningMuParserFilterTest(int argc, char * argv[])
   typedef unsigned int LabelType;
   typedef otb::Image<LabelType, Dimension>              LabelImageType;
   typedef otb::VectorImage<InputPixelType,  Dimension>  InputVectorImageType;
-  typedef otb::ImageFileReader<InputVectorImageType>    ReaderType;
 
   typedef otb::ImageFileReader<InputVectorImageType>  ImageReaderType;
   typedef otb::ImageFileReader<LabelImageType>        LabelImageReaderType;
diff --git a/Testing/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.cxx b/Testing/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.cxx
index 1758ccd..3644854 100644
--- a/Testing/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.cxx
@@ -29,7 +29,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbLabelizeConfidenceConnectedImageFilter(int argc, char * argv[])
+int otbLabelizeConfidenceConnectedImageFilter(int itkNotUsed(argc), char * argv[])
 {
   // Arguments
   char* inputImageName = argv[1];
diff --git a/Testing/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilterNew.cxx b/Testing/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilterNew.cxx
index 28bb9d3..91b41da 100644
--- a/Testing/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbLabelizeConfidenceConnectedImageFilter.h"
 #include "otbImage.h"
 
-int otbLabelizeConfidenceConnectedImageFilterNew(int argc, char * argv[])
+int otbLabelizeConfidenceConnectedImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef unsigned char OutputPixelType;
diff --git a/Testing/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.cxx b/Testing/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.cxx
index 4094a6f..d2201ab 100644
--- a/Testing/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.cxx
@@ -28,7 +28,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbLabelizeConnectedThresholdImageFilter(int argc, char * argv[])
+int otbLabelizeConnectedThresholdImageFilter(int itkNotUsed(argc), char * argv[])
 {
   // Arguments
   char* inputImageName = argv[1];
diff --git a/Testing/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilterNew.cxx b/Testing/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilterNew.cxx
index 1c8814b..fc7c217 100644
--- a/Testing/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbLabelizeConnectedThresholdImageFilter.h"
 #include "otbImage.h"
 
-int otbLabelizeConnectedThresholdImageFilterNew(int argc, char * argv[])
+int otbLabelizeConnectedThresholdImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef unsigned char OutputPixelType;
diff --git a/Testing/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.cxx b/Testing/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.cxx
index b0357f2..b41346e 100644
--- a/Testing/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.cxx
@@ -28,7 +28,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbLabelizeNeighborhoodConnectedImageFilter(int argc, char * argv[])
+int otbLabelizeNeighborhoodConnectedImageFilter(int itkNotUsed(argc), char * argv[])
 {
   // Arguments
   char* inputImageName = argv[1];
diff --git a/Testing/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilterNew.cxx b/Testing/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilterNew.cxx
index 9ebfd21..6a65505 100644
--- a/Testing/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbLabelizeNeighborhoodConnectedImageFilter.h"
 #include "otbImage.h"
 
-int otbLabelizeNeighborhoodConnectedImageFilterNew(int argc, char * argv[])
+int otbLabelizeNeighborhoodConnectedImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef unsigned char OutputPixelType;
diff --git a/Testing/Code/BasicFilters/otbLeeFilter.cxx b/Testing/Code/BasicFilters/otbLeeFilter.cxx
index e0fdcdf..b37396e 100644
--- a/Testing/Code/BasicFilters/otbLeeFilter.cxx
+++ b/Testing/Code/BasicFilters/otbLeeFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbLeeImageFilter.h"
 
-int otbLeeFilter(int argc, char * argv[])
+int otbLeeFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/BasicFilters/otbListSampleToHistogramListGenerator.cxx b/Testing/Code/BasicFilters/otbListSampleToHistogramListGenerator.cxx
index 457f4d3..69e80f1 100644
--- a/Testing/Code/BasicFilters/otbListSampleToHistogramListGenerator.cxx
+++ b/Testing/Code/BasicFilters/otbListSampleToHistogramListGenerator.cxx
@@ -21,12 +21,11 @@
 #include "otbImageFileReader.h"
 #include "itkImageRegionIterator.h"
 
-int otbListSampleToHistogramListGenerator(int argc, char * argv[])
+int otbListSampleToHistogramListGenerator(int itkNotUsed(argc), char * argv[])
 {
   typedef double                                       PixelType;
   typedef otb::VectorImage<PixelType>                  VectorImageType;
   typedef VectorImageType::PixelType                   VectorPixelType;
-  typedef VectorImageType::SizeType                    SizeType;
   typedef itk::Statistics::ListSample<VectorPixelType> ListSampleType;
   typedef otb::ListSampleToHistogramListGenerator
   <ListSampleType, PixelType>                         HistogramGeneratorType;
diff --git a/Testing/Code/BasicFilters/otbListSampleToHistogramListGeneratorNew.cxx b/Testing/Code/BasicFilters/otbListSampleToHistogramListGeneratorNew.cxx
index a72e917..f8d5bdb 100644
--- a/Testing/Code/BasicFilters/otbListSampleToHistogramListGeneratorNew.cxx
+++ b/Testing/Code/BasicFilters/otbListSampleToHistogramListGeneratorNew.cxx
@@ -19,7 +19,7 @@
 #include "itkListSample.h"
 #include "otbListSampleToHistogramListGenerator.h"
 
-int otbListSampleToHistogramListGeneratorNew(int argc, char * argv[])
+int otbListSampleToHistogramListGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef double                                       PixelType;
diff --git a/Testing/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGenerator.cxx b/Testing/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGenerator.cxx
index 6bf8d0d..2035107 100644
--- a/Testing/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGenerator.cxx
+++ b/Testing/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGenerator.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include "itkImageRegionIterator.h"
 
-int otbListSampleToVariableDimensionHistogramGenerator(int argc, char * argv[])
+int otbListSampleToVariableDimensionHistogramGenerator(int itkNotUsed(argc), char * argv[])
 {
   typedef double                                       PixelType;
   typedef otb::VectorImage<PixelType>                  VectorImageType;
diff --git a/Testing/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGeneratorNew.cxx b/Testing/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGeneratorNew.cxx
index c11beef..e992722 100644
--- a/Testing/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGeneratorNew.cxx
+++ b/Testing/Code/BasicFilters/otbListSampleToVariableDimensionHistogramGeneratorNew.cxx
@@ -19,7 +19,7 @@
 #include "itkListSample.h"
 #include "otbListSampleToVariableDimensionHistogramGenerator.h"
 
-int otbListSampleToVariableDimensionHistogramGeneratorNew(int argc, char * argv[])
+int otbListSampleToVariableDimensionHistogramGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef double                                       PixelType;
diff --git a/Testing/Code/BasicFilters/otbLocalActivityVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbLocalActivityVectorImageFilter.cxx
index fd45c43..52c3005 100644
--- a/Testing/Code/BasicFilters/otbLocalActivityVectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbLocalActivityVectorImageFilter.cxx
@@ -26,7 +26,7 @@
 
 #include "otbLocalActivityVectorImageFilter.h"
 
-int otbLocalActivityVectorImageFilterNewTest ( int argc, char* argv[] )
+int otbLocalActivityVectorImageFilterNewTest ( int itkNotUsed(argc), char* itkNotUsed(argv) [] )
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -106,4 +106,3 @@ int otbLocalActivityVectorImageFilterTest ( int argc, char* argv[] )
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/BasicFilters/otbLocalGradientVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbLocalGradientVectorImageFilter.cxx
index 8fb33c3..82de2de 100644
--- a/Testing/Code/BasicFilters/otbLocalGradientVectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbLocalGradientVectorImageFilter.cxx
@@ -26,7 +26,7 @@
 
 #include "otbLocalGradientVectorImageFilter.h"
 
-int otbLocalGradientVectorImageFilterNewTest ( int argc, char * argv[] )
+int otbLocalGradientVectorImageFilterNewTest ( int itkNotUsed(argc), char * itkNotUsed(argv) [] )
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -97,4 +97,3 @@ int otbLocalGradientVectorImageFilterTest ( int argc, char* argv[] )
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/BasicFilters/otbLogPolarTransform.cxx b/Testing/Code/BasicFilters/otbLogPolarTransform.cxx
index 28d08f8..5e86fd5 100644
--- a/Testing/Code/BasicFilters/otbLogPolarTransform.cxx
+++ b/Testing/Code/BasicFilters/otbLogPolarTransform.cxx
@@ -22,7 +22,7 @@
 #include <fstream>
 #include <cstdlib>
 
-int otbLogPolarTransform(int argc, char* argv[])
+int otbLogPolarTransform(int itkNotUsed(argc), char* argv[])
 {
   double       radialStep = atof(argv[1]);
   double       angularStep = atof(argv[2]);
diff --git a/Testing/Code/BasicFilters/otbLogPolarTransformNew.cxx b/Testing/Code/BasicFilters/otbLogPolarTransformNew.cxx
index bdf9741..c24ad46 100644
--- a/Testing/Code/BasicFilters/otbLogPolarTransformNew.cxx
+++ b/Testing/Code/BasicFilters/otbLogPolarTransformNew.cxx
@@ -18,7 +18,7 @@
 #include "otbLogPolarTransform.h"
 #include <cstdlib>
 
-int otbLogPolarTransformNew(int argc, char* argv[])
+int otbLogPolarTransformNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double                                PrecisionType;
   typedef otb::LogPolarTransform<PrecisionType> LogPolarTransformType;
diff --git a/Testing/Code/BasicFilters/otbLogPolarTransformResample.cxx b/Testing/Code/BasicFilters/otbLogPolarTransformResample.cxx
index a2621dc..c6917a3 100644
--- a/Testing/Code/BasicFilters/otbLogPolarTransformResample.cxx
+++ b/Testing/Code/BasicFilters/otbLogPolarTransformResample.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbLogPolarTransformResample(int argc, char* argv[])
+int otbLogPolarTransformResample(int itkNotUsed(argc), char* argv[])
 {
   char * inputFileName = argv[1];
   char * outputFileName = argv[2];
@@ -41,7 +41,7 @@ int otbLogPolarTransformResample(int argc, char* argv[])
 
   ReaderType::Pointer reader = ReaderType::New();
   reader->SetFileName(inputFileName);
-  reader->Update();
+  reader->UpdateOutputInformation();
 
   InterpolatorType::Pointer interpolator = InterpolatorType::New();
   interpolator->SetInputImage(reader->GetOutput());
@@ -71,6 +71,16 @@ int otbLogPolarTransformResample(int argc, char* argv[])
   resampler->SetDefaultPixelValue(0);
   resampler->SetSize(size);
 
+  ImageType::PointType origin;
+  origin[0] = 0.5;
+  origin[1] = 0.5;
+  resampler->SetOutputOrigin(origin);
+
+  ImageType::SpacingType spacing;
+  spacing[0] = 1.0;
+  spacing[1] = 1.0;
+  resampler->SetOutputSpacing(spacing);
+
   WriterType::Pointer writer = WriterType::New();
   writer->SetFileName(outputFileName);
   writer->SetInput(resampler->GetOutput());
diff --git a/Testing/Code/BasicFilters/otbMNFImageFilter.cxx b/Testing/Code/BasicFilters/otbMNFImageFilter.cxx
index 5e80436..31fe93a 100644
--- a/Testing/Code/BasicFilters/otbMNFImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbMNFImageFilter.cxx
@@ -26,7 +26,7 @@
 
 #include "otbLocalActivityVectorImageFilter.h"
 
-int otbMNFImageFilterNewTest ( int argc, char* argv[] )
+int otbMNFImageFilterNewTest ( int itkNotUsed(argc), char* itkNotUsed(argv) [] )
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -148,4 +148,3 @@ int otbMNFImageFilterTest ( int argc, char* argv[] )
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/BasicFilters/otbMaskMuParserFilterNew.cxx b/Testing/Code/BasicFilters/otbMaskMuParserFilterNew.cxx
index 284f23f..3c722c4 100644
--- a/Testing/Code/BasicFilters/otbMaskMuParserFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbMaskMuParserFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImage.h"
 #include "otbMaskMuParserFilter.h"
 
-int otbMaskMuParserFilterNew( int argc, char* argv[])
+int otbMaskMuParserFilterNew( int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef float InputPixelType;
diff --git a/Testing/Code/BasicFilters/otbMatrixImageFilterNew.cxx b/Testing/Code/BasicFilters/otbMatrixImageFilterNew.cxx
index f4450e4..a2eb87e 100644
--- a/Testing/Code/BasicFilters/otbMatrixImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbMatrixImageFilterNew.cxx
@@ -21,7 +21,7 @@
 
 #include "otbVectorImage.h"
 
-int otbApplyTransitionMatrixImageFilterNew(int argc, char * argv[])
+int otbApplyTransitionMatrixImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   typedef float OutputPixelType;
diff --git a/Testing/Code/BasicFilters/otbMatrixImageFilterTest.cxx b/Testing/Code/BasicFilters/otbMatrixImageFilterTest.cxx
index 71276dd..b4a84e1 100644
--- a/Testing/Code/BasicFilters/otbMatrixImageFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbMatrixImageFilterTest.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include <complex>
 
-int otbMatrixImageFilterNew(int argc, char * argv[])
+int otbMatrixImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef std::complex<double> PixelType;
 
@@ -37,7 +37,7 @@ int otbMatrixImageFilterNew(int argc, char * argv[])
 }
 
 
-int otbMatrixImageFilterTest(int argc, char * argv[])
+int otbMatrixImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/BasicFilters/otbMatrixTransposeMatrixImageFilter.cxx b/Testing/Code/BasicFilters/otbMatrixTransposeMatrixImageFilter.cxx
index 542a10c..0b069ba 100644
--- a/Testing/Code/BasicFilters/otbMatrixTransposeMatrixImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbMatrixTransposeMatrixImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbStreamingMatrixTransposeMatrixImageFilter.h"
 
-int otbMatrixTransposeMatrixImageFilter(int argc, char * argv[])
+int otbMatrixTransposeMatrixImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname1 = argv[1];
   const char * infname2 = argv[2];
@@ -32,7 +32,6 @@ int otbMatrixTransposeMatrixImageFilter(int argc, char * argv[])
   //typedef double InputPixelType;
   //typedef double OutputPixelType;
   typedef unsigned char InputPixelType;
-  typedef unsigned char OutputPixelType;
 
   typedef otb::VectorImage<InputPixelType, Dimension> InputImage1Type;
   typedef otb::VectorImage<InputPixelType, Dimension> InputImage2Type;
diff --git a/Testing/Code/BasicFilters/otbMatrixTransposeMatrixImageFilterNew.cxx b/Testing/Code/BasicFilters/otbMatrixTransposeMatrixImageFilterNew.cxx
index ca7b619..751e274 100644
--- a/Testing/Code/BasicFilters/otbMatrixTransposeMatrixImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbMatrixTransposeMatrixImageFilterNew.cxx
@@ -21,11 +21,10 @@
 #include "otbVectorImage.h"
 #include "otbStreamingMatrixTransposeMatrixImageFilter.h"
 
-int otbMatrixTransposeMatrixImageFilterNew(int argc, char * argv[])
+int otbMatrixTransposeMatrixImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char InputPixelType;
-  typedef unsigned char OutputPixelType;
 
   typedef otb::VectorImage<InputPixelType, Dimension> InputImage1Type;
   typedef otb::VectorImage<InputPixelType, Dimension> InputImage2Type;
diff --git a/Testing/Code/BasicFilters/otbMaximumAutocorrelationFactorImageFilter.cxx b/Testing/Code/BasicFilters/otbMaximumAutocorrelationFactorImageFilter.cxx
index d92c3a3..196db9e 100644
--- a/Testing/Code/BasicFilters/otbMaximumAutocorrelationFactorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbMaximumAutocorrelationFactorImageFilter.cxx
@@ -26,7 +26,7 @@ typedef otb::ImageFileReader<ImageType>    ReaderType;
 typedef otb::ImageFileWriter<OutputImageType> WriterType;
 typedef otb::MaximumAutocorrelationFactorImageFilter<ImageType, OutputImageType> MADFilterType;
 
-int otbMaximumAutocorrelationFactorImageFilterNew(int argc, char* argv[])
+int otbMaximumAutocorrelationFactorImageFilterNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   MADFilterType::Pointer  madFilter = MADFilterType::New();
 
@@ -34,7 +34,7 @@ int otbMaximumAutocorrelationFactorImageFilterNew(int argc, char* argv[])
 }
 
 
-int otbMaximumAutocorrelationFactorImageFilter(int argc, char* argv[])
+int otbMaximumAutocorrelationFactorImageFilter(int itkNotUsed(argc), char* argv[])
 {
   char * infname = argv[1];
   char * outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbMeanFunctorImageTest.cxx b/Testing/Code/BasicFilters/otbMeanFunctorImageTest.cxx
index 4939ebf..13bf560 100644
--- a/Testing/Code/BasicFilters/otbMeanFunctorImageTest.cxx
+++ b/Testing/Code/BasicFilters/otbMeanFunctorImageTest.cxx
@@ -24,7 +24,7 @@
 #include "itkUnaryFunctorImageFilter.h"
 #include "otbMeanFunctor.h"
 
-int otbMeanFunctorImageTest(int argc, char * argv[])
+int otbMeanFunctorImageTest(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbMeanShiftImageFilterNew.cxx b/Testing/Code/BasicFilters/otbMeanShiftImageFilterNew.cxx
index 6a1db94..97f029e 100644
--- a/Testing/Code/BasicFilters/otbMeanShiftImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbMeanShiftImageFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbImage.h"
 #include "otbMeanShiftImageFilter.h"
 
-int otbMeanShiftImageFilterNew(int argc, char * argv[])
+int otbMeanShiftImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef short                                           PixelType;
diff --git a/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.cxx b/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.cxx
index 6870c1c..b6b0701 100644
--- a/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilter.cxx
@@ -51,7 +51,6 @@ int otbMeanShiftSmoothingImageFilter(int argc, char * argv[])
 
   const unsigned int Dimension = 2;
   typedef float                                            PixelType;
-  typedef double                                           KernelType;
   typedef otb::VectorImage<PixelType, Dimension>           ImageType;
   typedef otb::ImageFileReader<ImageType>                  ReaderType;
   typedef otb::ImageFileWriter<ImageType>                  WriterType;
diff --git a/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterNew.cxx b/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterNew.cxx
index b0097c1..c802255 100644
--- a/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorImage.h"
 #include "otbMeanShiftSmoothingImageFilter.h"
 
-int otbMeanShiftSmoothingImageFilterNew(int argc, char * argv[])
+int otbMeanShiftSmoothingImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef short                                           PixelType;
diff --git a/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterSpatialStability.cxx b/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterSpatialStability.cxx
index b6bb288..e9514f3 100644
--- a/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterSpatialStability.cxx
+++ b/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterSpatialStability.cxx
@@ -53,14 +53,11 @@ int otbMeanShiftSmoothingImageFilterSpatialStability(int argc, char * argv[])
 
   const unsigned int Dimension = 2;
   typedef float                                            PixelType;
-  typedef double                                           KernelType;
   typedef otb::VectorImage<PixelType, Dimension>           ImageType;
   typedef otb::ImageFileReader<ImageType>                  ReaderType;
   typedef otb::MeanShiftSmoothingImageFilter<ImageType, ImageType> FilterType;
-  typedef FilterType::OutputIterationImageType             IterationImageType;
   typedef FilterType::OutputSpatialImageType               SpatialImageType;
   typedef SpatialImageType::InternalPixelType                      SpatialPixelType;
-  typedef FilterType::OutputLabelImageType                 LabelImageType;
   typedef otb::MultiChannelExtractROI<PixelType,PixelType>  ExtractROIFilterType;
   typedef otb::MultiChannelExtractROI<SpatialPixelType,SpatialPixelType>  SpatialExtractROIFilterType;
 
diff --git a/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterThreading.cxx b/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterThreading.cxx
index 5e98701..0fa0c32 100644
--- a/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterThreading.cxx
+++ b/Testing/Code/BasicFilters/otbMeanShiftSmoothingImageFilterThreading.cxx
@@ -41,7 +41,6 @@ int otbMeanShiftSmoothingImageFilterThreading(int argc, char * argv[])
 
   const unsigned int Dimension = 2;
   typedef float                                            PixelType;
-  typedef double                                           KernelType;
   typedef otb::VectorImage<PixelType, Dimension>           ImageType;
   typedef otb::ImageFileReader<ImageType>                  ReaderType;
   typedef otb::ImageFileWriter<ImageType>                  WriterType;
diff --git a/Testing/Code/BasicFilters/otbMeanShiftVectorImageFilterNew.cxx b/Testing/Code/BasicFilters/otbMeanShiftVectorImageFilterNew.cxx
index b43de34..02661f2 100644
--- a/Testing/Code/BasicFilters/otbMeanShiftVectorImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbMeanShiftVectorImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImage.h"
 #include "otbMeanShiftVectorImageFilter.h"
 
-int otbMeanShiftVectorImageFilterNew(int argc, char * argv[])
+int otbMeanShiftVectorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef short                                                 PixelType;
diff --git a/Testing/Code/BasicFilters/otbNAPCAImageFilter.cxx b/Testing/Code/BasicFilters/otbNAPCAImageFilter.cxx
index 47b4bed..7d77438 100644
--- a/Testing/Code/BasicFilters/otbNAPCAImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbNAPCAImageFilter.cxx
@@ -26,7 +26,7 @@
 
 #include "otbLocalActivityVectorImageFilter.h"
 
-int otbNAPCAImageFilterNewTest ( int argc, char* argv[] )
+int otbNAPCAImageFilterNewTest ( int itkNotUsed(argc), char* itkNotUsed(argv) [] )
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -148,8 +148,3 @@ int otbNAPCAImageFilterTest ( int argc, char* argv[] )
 
   return EXIT_SUCCESS;
 }
-
-
-
-
-
diff --git a/Testing/Code/BasicFilters/otbNDVIDataNodeFeatureFunction.cxx b/Testing/Code/BasicFilters/otbNDVIDataNodeFeatureFunction.cxx
index 2ce0657..fcaca57 100644
--- a/Testing/Code/BasicFilters/otbNDVIDataNodeFeatureFunction.cxx
+++ b/Testing/Code/BasicFilters/otbNDVIDataNodeFeatureFunction.cxx
@@ -27,7 +27,7 @@
 #include "otbVectorDataFileWriter.h"
 #include "itkPreOrderTreeIterator.h"
 
-int otbNDVIDataNodeFeatureFunctionNew(int argc, char* argv[])
+int otbNDVIDataNodeFeatureFunctionNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef double CoordRepType;
   typedef double PrecisionType;
@@ -42,7 +42,7 @@ int otbNDVIDataNodeFeatureFunctionNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbNDVIDataNodeFeatureFunction(int argc, char* argv[])
+int otbNDVIDataNodeFeatureFunction(int itkNotUsed(argc), char* argv[])
 {
   const char * inputVD  = argv[1];
   const char * inputImg = argv[2];
@@ -138,4 +138,3 @@ int otbNDVIDataNodeFeatureFunction(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/BasicFilters/otbNormalizeInnerProductPCAImageFilter.cxx b/Testing/Code/BasicFilters/otbNormalizeInnerProductPCAImageFilter.cxx
index ebca4cc..f77479b 100644
--- a/Testing/Code/BasicFilters/otbNormalizeInnerProductPCAImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbNormalizeInnerProductPCAImageFilter.cxx
@@ -20,7 +20,7 @@
 #include "otbImageFileWriter.h"
 #include "otbVectorImage.h"
 
-int otbNormalizeInnerProductPCAImageFilter(int argc, char* argv[])
+int otbNormalizeInnerProductPCAImageFilter(int itkNotUsed(argc), char* argv[])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/BasicFilters/otbNormalizeInnerProductPCAImageFilterNew.cxx b/Testing/Code/BasicFilters/otbNormalizeInnerProductPCAImageFilterNew.cxx
index 9db1bf6..7b90e27 100644
--- a/Testing/Code/BasicFilters/otbNormalizeInnerProductPCAImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbNormalizeInnerProductPCAImageFilterNew.cxx
@@ -18,7 +18,7 @@
 #include "otbNormalizeInnerProductPCAImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbNormalizeInnerProductPCAImageFilterNew(int argc, char* argv[])
+int otbNormalizeInnerProductPCAImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/BasicFilters/otbNormalizeVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbNormalizeVectorImageFilter.cxx
index a2c7382..d8e917e 100644
--- a/Testing/Code/BasicFilters/otbNormalizeVectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbNormalizeVectorImageFilter.cxx
@@ -24,7 +24,7 @@
 
 #include "otbNormalizeVectorImageFilter.h"
 
-int otbNormalizeVectorImageFilterNewTest ( int argc, char* argv[] )
+int otbNormalizeVectorImageFilterNewTest ( int itkNotUsed(argc), char* itkNotUsed(argv) [] )
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -95,6 +95,3 @@ int otbNormalizeVectorImageFilterTest ( int argc, char* argv[] )
 
   return EXIT_SUCCESS;
 }
-
-
-
diff --git a/Testing/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.cxx b/Testing/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.cxx
index 496b7f4..fcff663 100644
--- a/Testing/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.cxx
+++ b/Testing/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int otbOpeningClosingMorphologicalFilter(int argc, char * argv[])
+int otbOpeningClosingMorphologicalFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   const unsigned int Radius = atoi(argv[3]);
diff --git a/Testing/Code/BasicFilters/otbOpeningClosingMorphologicalFilterNew.cxx b/Testing/Code/BasicFilters/otbOpeningClosingMorphologicalFilterNew.cxx
index 7f66419..00f2558 100644
--- a/Testing/Code/BasicFilters/otbOpeningClosingMorphologicalFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbOpeningClosingMorphologicalFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkBinaryBallStructuringElement.h"
 #include "otbImage.h"
 
-int otbOpeningClosingMorphologicalFilterNew(int argc, char * argv[])
+int otbOpeningClosingMorphologicalFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                                InputPixelType;
diff --git a/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.cxx b/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.cxx
index c5e8661..b1e0881 100644
--- a/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileWriter.h"
 #include "otbOverlapSaveConvolutionImageFilter.h"
 
-int otbOverlapSaveConvolutionImageFilter(int argc, char * argv[])
+int otbOverlapSaveConvolutionImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName = argv[1];
   const char * outputFileName = argv[2];
diff --git a/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilterNew.cxx b/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilterNew.cxx
index 2e563c6..5b70565 100644
--- a/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImage.h"
 #include "otbOverlapSaveConvolutionImageFilter.h"
 
-int otbOverlapSaveConvolutionImageFilterNew(int argc, char * argv[])
+int otbOverlapSaveConvolutionImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   typedef double OutputPixelType;
diff --git a/Testing/Code/BasicFilters/otbPCAImageFilter.cxx b/Testing/Code/BasicFilters/otbPCAImageFilter.cxx
index 194bfaa..bc827bc 100644
--- a/Testing/Code/BasicFilters/otbPCAImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbPCAImageFilter.cxx
@@ -24,7 +24,7 @@
 
 #include "otbPCAImageFilter.h"
 
-int otbPCAImageFilterNewTest ( int argc, char* argv[] )
+int otbPCAImageFilterNewTest ( int itkNotUsed(argc), char* itkNotUsed(argv) [] )
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -129,8 +129,3 @@ int otbPCAImageFilterTest ( int argc, char* argv[] )
 
   return EXIT_SUCCESS;
 }
-
-
-
-
-
diff --git a/Testing/Code/BasicFilters/otbParserConditionDataNodeFeatureFunction.cxx b/Testing/Code/BasicFilters/otbParserConditionDataNodeFeatureFunction.cxx
index d0fdc88..d4fb21d 100644
--- a/Testing/Code/BasicFilters/otbParserConditionDataNodeFeatureFunction.cxx
+++ b/Testing/Code/BasicFilters/otbParserConditionDataNodeFeatureFunction.cxx
@@ -26,7 +26,7 @@
 #include "otbVectorDataFileWriter.h"
 #include "itkPreOrderTreeIterator.h"
 
-int otbParserConditionDataNodeFeatureFunctionNew(int argc, char* argv[])
+int otbParserConditionDataNodeFeatureFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double CoordRepType;
   typedef double PrecisionType;
@@ -42,7 +42,7 @@ int otbParserConditionDataNodeFeatureFunctionNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbParserConditionDataNodeFeatureFunction(int argc, char* argv[])
+int otbParserConditionDataNodeFeatureFunction(int itkNotUsed(argc), char* argv[])
 {
   const char * inputVD = argv[1];
   const char * inputImg = argv[2];
@@ -131,4 +131,3 @@ int otbParserConditionDataNodeFeatureFunction(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/BasicFilters/otbPerBandVectorImageFilterNew.cxx b/Testing/Code/BasicFilters/otbPerBandVectorImageFilterNew.cxx
index e902f76..cdb6c04 100644
--- a/Testing/Code/BasicFilters/otbPerBandVectorImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbPerBandVectorImageFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbImage.h"
 #include "itkMeanImageFilter.h"
 
-int otbPerBandVectorImageFilterNew(int argc, char * argv[])
+int otbPerBandVectorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                              PixelType;
diff --git a/Testing/Code/BasicFilters/otbPerBandVectorImageFilterWithMeanFilter.cxx b/Testing/Code/BasicFilters/otbPerBandVectorImageFilterWithMeanFilter.cxx
index c470547..d8594c3 100644
--- a/Testing/Code/BasicFilters/otbPerBandVectorImageFilterWithMeanFilter.cxx
+++ b/Testing/Code/BasicFilters/otbPerBandVectorImageFilterWithMeanFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbPerBandVectorImageFilterWithMeanFilter(int argc, char * argv[])
+int otbPerBandVectorImageFilterWithMeanFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbPerBandVectorImageFilterWithSobelFilter.cxx b/Testing/Code/BasicFilters/otbPerBandVectorImageFilterWithSobelFilter.cxx
index 904e2ad..5a32549 100644
--- a/Testing/Code/BasicFilters/otbPerBandVectorImageFilterWithSobelFilter.cxx
+++ b/Testing/Code/BasicFilters/otbPerBandVectorImageFilterWithSobelFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbPerBandVectorImageFilterWithSobelFilter(int argc, char * argv[])
+int otbPerBandVectorImageFilterWithSobelFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbPersistentVectorizationFilter.cxx b/Testing/Code/BasicFilters/otbPersistentVectorizationFilter.cxx
index 899c6cd..b679b98 100644
--- a/Testing/Code/BasicFilters/otbPersistentVectorizationFilter.cxx
+++ b/Testing/Code/BasicFilters/otbPersistentVectorizationFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileReader.h"
 #include <fstream>
 
-int otbPersistentVectorizationFilter(int argc, char * argv[])
+int otbPersistentVectorizationFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname  = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbPersistentVectorizationFilterNew.cxx b/Testing/Code/BasicFilters/otbPersistentVectorizationFilterNew.cxx
index 1410b14..74ec7e1 100644
--- a/Testing/Code/BasicFilters/otbPersistentVectorizationFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbPersistentVectorizationFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbPolygon.h"
 #include "otbPersistentVectorizationImageFilter.h"
 
-int otbPersistentVectorizationFilterNew(int argc, char * argv[])
+int otbPersistentVectorizationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int ImageDimension = 2;
   typedef unsigned short LabelType;
diff --git a/Testing/Code/BasicFilters/otbPhaseFunctorTest.cxx b/Testing/Code/BasicFilters/otbPhaseFunctorTest.cxx
index a293529..ff747d9 100644
--- a/Testing/Code/BasicFilters/otbPhaseFunctorTest.cxx
+++ b/Testing/Code/BasicFilters/otbPhaseFunctorTest.cxx
@@ -22,7 +22,7 @@
 #include "itkRGBPixel.h"
 #include "itkRGBAPixel.h"
 
-int otbPhaseFunctorTest(int argc, char * argv[])
+int otbPhaseFunctorTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double                   ScalarType;
 
diff --git a/Testing/Code/BasicFilters/otbPointSetDensityEpanechnikovFunctionTest.cxx b/Testing/Code/BasicFilters/otbPointSetDensityEpanechnikovFunctionTest.cxx
index 332f73a..8420f7a 100644
--- a/Testing/Code/BasicFilters/otbPointSetDensityEpanechnikovFunctionTest.cxx
+++ b/Testing/Code/BasicFilters/otbPointSetDensityEpanechnikovFunctionTest.cxx
@@ -23,7 +23,7 @@
 
 #include <iostream>
 
-int otbPointSetDensityEpanechnikovFunctionTest(int argc, char* argv[])
+int otbPointSetDensityEpanechnikovFunctionTest(int itkNotUsed(argc), char* argv[])
 {
 
   const char * outfname = argv[1];
diff --git a/Testing/Code/BasicFilters/otbPointSetDensityFunctionTest.cxx b/Testing/Code/BasicFilters/otbPointSetDensityFunctionTest.cxx
index 369159c..39914a6 100644
--- a/Testing/Code/BasicFilters/otbPointSetDensityFunctionTest.cxx
+++ b/Testing/Code/BasicFilters/otbPointSetDensityFunctionTest.cxx
@@ -23,7 +23,7 @@
 
 #include <iostream>
 
-int otbPointSetDensityFunctionTest(int argc, char* argv[])
+int otbPointSetDensityFunctionTest(int itkNotUsed(argc), char* argv[])
 {
 
   const char * outfname = argv[1];
diff --git a/Testing/Code/BasicFilters/otbPointSetDensityGaussianFunctionTest.cxx b/Testing/Code/BasicFilters/otbPointSetDensityGaussianFunctionTest.cxx
index 57eb47c..ee6c335 100644
--- a/Testing/Code/BasicFilters/otbPointSetDensityGaussianFunctionTest.cxx
+++ b/Testing/Code/BasicFilters/otbPointSetDensityGaussianFunctionTest.cxx
@@ -23,7 +23,7 @@
 
 #include <iostream>
 
-int otbPointSetDensityGaussianFunctionTest(int argc, char* argv[])
+int otbPointSetDensityGaussianFunctionTest(int itkNotUsed(argc), char* argv[])
 {
 
   const char * outfname = argv[1];
diff --git a/Testing/Code/BasicFilters/otbPointSetExtractROITest.cxx b/Testing/Code/BasicFilters/otbPointSetExtractROITest.cxx
index 9e0fb03..8f93b4c 100644
--- a/Testing/Code/BasicFilters/otbPointSetExtractROITest.cxx
+++ b/Testing/Code/BasicFilters/otbPointSetExtractROITest.cxx
@@ -26,7 +26,6 @@ int otbPointSetExtractROITest(int, char*[])
   typedef float                                PixelType;
   typedef itk::PointSet<PixelType, 2>          PointSetType;
   typedef PointSetType::PointsContainer        PointsContainerType;
-  typedef PointSetType::PointsContainerPointer PointsContainerPointer;
   typedef PointSetType::PointType              PointType;
 
   typedef otb::RandomPointSetSource<PointSetType> PointSetSource;
diff --git a/Testing/Code/BasicFilters/otbPointSetToDensityImageFilterTest.cxx b/Testing/Code/BasicFilters/otbPointSetToDensityImageFilterTest.cxx
index 21642dc..84d334e 100644
--- a/Testing/Code/BasicFilters/otbPointSetToDensityImageFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbPointSetToDensityImageFilterTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImageToSIFTKeyPointSetFilter.h"
 
-int otbPointSetToDensityImageFilterTest(int argc, char* argv[])
+int otbPointSetToDensityImageFilterTest(int itkNotUsed(argc), char* argv[])
 {
 
   const char *       infname = argv[1];
diff --git a/Testing/Code/BasicFilters/otbPrintableImageFilter.cxx b/Testing/Code/BasicFilters/otbPrintableImageFilter.cxx
index 88221dc..b35dff0 100644
--- a/Testing/Code/BasicFilters/otbPrintableImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbPrintableImageFilter.cxx
@@ -25,7 +25,7 @@
 
 #include "otbPrintableImageFilter.h"
 
-int otbPrintableImageFilter(int argc, char * argv[])
+int otbPrintableImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/BasicFilters/otbPrintableImageFilterNew.cxx b/Testing/Code/BasicFilters/otbPrintableImageFilterNew.cxx
index 52788b8..69e2791 100644
--- a/Testing/Code/BasicFilters/otbPrintableImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbPrintableImageFilterNew.cxx
@@ -22,7 +22,7 @@
 
 #include "otbPrintableImageFilter.h"
 
-int otbPrintableImageFilterNew(int argc, char * argv[])
+int otbPrintableImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/BasicFilters/otbPrintableImageFilterWithMask.cxx b/Testing/Code/BasicFilters/otbPrintableImageFilterWithMask.cxx
index 25ba40a..084aae0 100644
--- a/Testing/Code/BasicFilters/otbPrintableImageFilterWithMask.cxx
+++ b/Testing/Code/BasicFilters/otbPrintableImageFilterWithMask.cxx
@@ -23,7 +23,7 @@
 
 #include "otbPrintableImageFilter.h"
 
-int otbPrintableImageFilterWithMask(int argc, char * argv[])
+int otbPrintableImageFilterWithMask(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * masktFilename  = argv[2];
diff --git a/Testing/Code/BasicFilters/otbProjectiveProjection.cxx b/Testing/Code/BasicFilters/otbProjectiveProjection.cxx
index 58910ce..702a5c0 100644
--- a/Testing/Code/BasicFilters/otbProjectiveProjection.cxx
+++ b/Testing/Code/BasicFilters/otbProjectiveProjection.cxx
@@ -44,14 +44,14 @@ typedef otb::StreamingStatisticsImageFilter<ImageType> StreamingStatisticsImageF
 
 typedef StreamingStatisticsVectorImageFilterType::MatrixType MatrixType;
 
-int otbProjectiveProjectionNew(int argc, char * argv[])
+int otbProjectiveProjectionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   ProjectiveProjectionImageFilterType::Pointer filter = ProjectiveProjectionImageFilterType::New();
   std::cout << filter << std::endl;
   return EXIT_SUCCESS;
 }
 
-int otbProjectiveProjectionTestHighSNR(int argc, char * argv[])
+int otbProjectiveProjectionTestHighSNR(int itkNotUsed(argc), char * argv[])
 {
   const char * inputImage = argv[1];
   const unsigned int nbEndmembers = atoi(argv[2]);
diff --git a/Testing/Code/BasicFilters/otbProlateInterpolateImageFunctionNew.cxx b/Testing/Code/BasicFilters/otbProlateInterpolateImageFunctionNew.cxx
index 75cb0f1..f608c25 100644
--- a/Testing/Code/BasicFilters/otbProlateInterpolateImageFunctionNew.cxx
+++ b/Testing/Code/BasicFilters/otbProlateInterpolateImageFunctionNew.cxx
@@ -20,7 +20,7 @@
 #include "otbProlateInterpolateImageFunction.h"
 #include "otbImage.h"
 
-int otbProlateInterpolateImageFunctionNew(int argc, char * argv[])
+int otbProlateInterpolateImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                           ImageType;
   typedef otb::ProlateInterpolateImageFunction<ImageType> ProlateInterpolatorType;
diff --git a/Testing/Code/BasicFilters/otbProlateValidationTest.cxx b/Testing/Code/BasicFilters/otbProlateValidationTest.cxx
index c62f78b..9b33a3a 100644
--- a/Testing/Code/BasicFilters/otbProlateValidationTest.cxx
+++ b/Testing/Code/BasicFilters/otbProlateValidationTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbStreamingResampleImageFilter.h"
 
-int otbProlateValidationTest(int argc, char * argv[])
+int otbProlateValidationTest(int itkNotUsed(argc), char * argv[])
 {
   const char *       infname = argv[1];
   const char *       outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbRadiometryHomogenousWithNeighborhoodDataNodeFeatureFunction.cxx b/Testing/Code/BasicFilters/otbRadiometryHomogenousWithNeighborhoodDataNodeFeatureFunction.cxx
index 05b93cb..e74232f 100644
--- a/Testing/Code/BasicFilters/otbRadiometryHomogenousWithNeighborhoodDataNodeFeatureFunction.cxx
+++ b/Testing/Code/BasicFilters/otbRadiometryHomogenousWithNeighborhoodDataNodeFeatureFunction.cxx
@@ -25,7 +25,7 @@
 #include "otbVectorDataFileWriter.h"
 #include "itkPreOrderTreeIterator.h"
 
-int otbRadiometryHomogenousWithNeighborhoodDataNodeFeatureFunctionNew(int argc, char* argv[])
+int otbRadiometryHomogenousWithNeighborhoodDataNodeFeatureFunctionNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef double CoordRepType;
   typedef double PrecisionType;
@@ -40,7 +40,7 @@ int otbRadiometryHomogenousWithNeighborhoodDataNodeFeatureFunctionNew(int argc,
   return EXIT_SUCCESS;
 }
 
-int otbRadiometryHomogenousWithNeighborhoodDataNodeFeatureFunction(int argc, char* argv[])
+int otbRadiometryHomogenousWithNeighborhoodDataNodeFeatureFunction(int itkNotUsed(argc), char* argv[])
 {
   const char * inputVD  = argv[1];
   const char * inputImg = argv[2];
diff --git a/Testing/Code/BasicFilters/otbRealAndImaginaryImageToComplexImageFilterTest.cxx b/Testing/Code/BasicFilters/otbRealAndImaginaryImageToComplexImageFilterTest.cxx
index a7c4f4c..1ea04fc 100644
--- a/Testing/Code/BasicFilters/otbRealAndImaginaryImageToComplexImageFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbRealAndImaginaryImageToComplexImageFilterTest.cxx
@@ -26,7 +26,7 @@
 #include "itkComplexToImaginaryImageFilter.h"
 #include "otbStreamingCompareImageFilter.h"
 
-int otbRealAndImaginaryImageToComplexImageFilterTest(int argc, char * argv[])
+int otbRealAndImaginaryImageToComplexImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilenameRealPart  = argv[1];
   const char * inputFilenameImagPart = argv[2];
diff --git a/Testing/Code/BasicFilters/otbRealImageToComplexImageFilterTest.cxx b/Testing/Code/BasicFilters/otbRealImageToComplexImageFilterTest.cxx
index b1f9a3d..a1ccd73 100644
--- a/Testing/Code/BasicFilters/otbRealImageToComplexImageFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbRealImageToComplexImageFilterTest.cxx
@@ -25,7 +25,7 @@
 #include "itkComplexToRealImageFilter.h"
 #include "otbStreamingCompareImageFilter.h"
 
-int otbRealImageToComplexImageFilterTest(int argc, char * argv[])
+int otbRealImageToComplexImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
 
diff --git a/Testing/Code/BasicFilters/otbResampleSLCImage.cxx b/Testing/Code/BasicFilters/otbResampleSLCImage.cxx
index b762e10..ff9dcbb 100644
--- a/Testing/Code/BasicFilters/otbResampleSLCImage.cxx
+++ b/Testing/Code/BasicFilters/otbResampleSLCImage.cxx
@@ -25,7 +25,7 @@
 #include "otbComplexToIntensityImageFilter.h"
 #include "otbStreamingCompareImageFilter.h"
 
-int otbResampleSLCImage(int argc, char * argv[])
+int otbResampleSLCImage(int itkNotUsed(argc), char * argv[])
 {
   const char* inputFilename = argv[1];
 
diff --git a/Testing/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.cxx b/Testing/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.cxx
index b80664c..d516a39 100644
--- a/Testing/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.cxx
+++ b/Testing/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.cxx
@@ -25,7 +25,7 @@
 #include "itkUnaryFunctorImageFilter.h"
 #include "otbScalarToRainbowRGBPixelFunctor.h"
 
-int otbScalarToRainbowRGBPixelFunctor(int argc, char * argv[])
+int otbScalarToRainbowRGBPixelFunctor(int itkNotUsed(argc), char * argv[])
 {
   typedef unsigned char                               PixelType;
   typedef itk::RGBPixel<PixelType>                    RGBPixelType;
diff --git a/Testing/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctorNew.cxx b/Testing/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctorNew.cxx
index ec60a0e..2e60b96 100644
--- a/Testing/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctorNew.cxx
+++ b/Testing/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctorNew.cxx
@@ -23,7 +23,7 @@
 #include "itkUnaryFunctorImageFilter.h"
 #include "otbScalarToRainbowRGBPixelFunctor.h"
 
-int otbScalarToRainbowRGBPixelFunctorNew(int argc, char * argv[])
+int otbScalarToRainbowRGBPixelFunctorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef unsigned char               PixelType;
diff --git a/Testing/Code/BasicFilters/otbShiftScaleVectorImageFilterNew.cxx b/Testing/Code/BasicFilters/otbShiftScaleVectorImageFilterNew.cxx
index e69c74b..f3043af 100644
--- a/Testing/Code/BasicFilters/otbShiftScaleVectorImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbShiftScaleVectorImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbShiftScaleVectorImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbShiftScaleVectorImageFilterNew(int argc, char * argv[])
+int otbShiftScaleVectorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                  InputPixelType;
diff --git a/Testing/Code/BasicFilters/otbShiftScaleVectorImageFilterTest.cxx b/Testing/Code/BasicFilters/otbShiftScaleVectorImageFilterTest.cxx
index 86275cc..5ffa166 100644
--- a/Testing/Code/BasicFilters/otbShiftScaleVectorImageFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbShiftScaleVectorImageFilterTest.cxx
@@ -26,7 +26,7 @@
 #include "otbVectorImageToImageListFilter.h"
 #include "otbStreamingStatisticsImageFilter.h"
 
-int otbShiftScaleVectorImageFilterTest(int argc, char * argv[])
+int otbShiftScaleVectorImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char *        infname = argv[1];
   const char *        outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbSobelVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbSobelVectorImageFilter.cxx
index c6c9f90..e7f0ff4 100644
--- a/Testing/Code/BasicFilters/otbSobelVectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbSobelVectorImageFilter.cxx
@@ -26,7 +26,7 @@
 
 #include "otbSobelVectorImageFilter.h"
 
-int otbSobelVectorImageFilterNewTest ( int argc, char *argv[] )
+int otbSobelVectorImageFilterNewTest ( int itkNotUsed(argc), char * itkNotUsed(argv) [] )
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -94,4 +94,3 @@ int otbSobelVectorImageFilterTest ( int argc, char* argv[] )
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/BasicFilters/otbSparseWvltToAngleMapperListFilterNew.cxx b/Testing/Code/BasicFilters/otbSparseWvltToAngleMapperListFilterNew.cxx
index cdd4ec1..c2698d5 100644
--- a/Testing/Code/BasicFilters/otbSparseWvltToAngleMapperListFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbSparseWvltToAngleMapperListFilterNew.cxx
@@ -31,7 +31,7 @@
 
 #include "otbSparseWvltToAngleMapperListFilter.h"
 
-int otbSparseWvltToAngleMapperListFilterNew ( int argc, char * argv[] )
+int otbSparseWvltToAngleMapperListFilterNew ( int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   const unsigned int SpaceDimension = 3;
@@ -51,4 +51,3 @@ int otbSparseWvltToAngleMapperListFilterNew ( int argc, char * argv[] )
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.cxx b/Testing/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.cxx
index 89eaea3..90edf7a 100644
--- a/Testing/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.cxx
+++ b/Testing/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int otbSpatialObjectToImageDrawingFilter(int argc, char * argv[])
+int otbSpatialObjectToImageDrawingFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       outputFilename = argv[1];
   const double       radiusx = atof(argv[2]);
diff --git a/Testing/Code/BasicFilters/otbSpatialObjectToImageDrawingFilterNew.cxx b/Testing/Code/BasicFilters/otbSpatialObjectToImageDrawingFilterNew.cxx
index 07872d8..453ffae 100644
--- a/Testing/Code/BasicFilters/otbSpatialObjectToImageDrawingFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbSpatialObjectToImageDrawingFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkGroupSpatialObject.h"
 #include "otbImage.h"
 
-int otbSpatialObjectToImageDrawingFilterNew(int argc, char * argv[])
+int otbSpatialObjectToImageDrawingFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                                        PixelType;
diff --git a/Testing/Code/BasicFilters/otbSpectralAngleDataNodeFeatureFunction.cxx b/Testing/Code/BasicFilters/otbSpectralAngleDataNodeFeatureFunction.cxx
index d1cf3d8..3c5f513 100644
--- a/Testing/Code/BasicFilters/otbSpectralAngleDataNodeFeatureFunction.cxx
+++ b/Testing/Code/BasicFilters/otbSpectralAngleDataNodeFeatureFunction.cxx
@@ -27,7 +27,7 @@
 #include "otbVectorDataFileWriter.h"
 #include "itkPreOrderTreeIterator.h"
 
-int otbSpectralAngleDataNodeFeatureFunctionNew(int argc, char* argv[])
+int otbSpectralAngleDataNodeFeatureFunctionNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef double CoordRepType;
   typedef double PrecisionType;
@@ -42,7 +42,7 @@ int otbSpectralAngleDataNodeFeatureFunctionNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbSpectralAngleDataNodeFeatureFunction(int argc, char* argv[])
+int otbSpectralAngleDataNodeFeatureFunction(int itkNotUsed(argc), char* argv[])
 {
   const char * inputVD  = argv[1];
   const char * inputImg = argv[2];
diff --git a/Testing/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.cxx b/Testing/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.cxx
index 3aa685a..e3b8534 100644
--- a/Testing/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileWriter.h"
 #include "otbSpectralAngleDistanceImageFilter.h"
 
-int otbSpectralAngleDistanceImageFilter(int argc, char * argv[])
+int otbSpectralAngleDistanceImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                 PixelType;
diff --git a/Testing/Code/BasicFilters/otbSpectralAngleDistanceImageFilterNew.cxx b/Testing/Code/BasicFilters/otbSpectralAngleDistanceImageFilterNew.cxx
index f2c076b..8c28cf3 100644
--- a/Testing/Code/BasicFilters/otbSpectralAngleDistanceImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbSpectralAngleDistanceImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbSpectralAngleDistanceImageFilter.h"
 
-int otbSpectralAngleDistanceImageFilterNew(int argc, char * argv[])
+int otbSpectralAngleDistanceImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                 PixelType;
diff --git a/Testing/Code/BasicFilters/otbStreamingCompareImageFilter.cxx b/Testing/Code/BasicFilters/otbStreamingCompareImageFilter.cxx
index cef4d0f..2a21313 100644
--- a/Testing/Code/BasicFilters/otbStreamingCompareImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingCompareImageFilter.cxx
@@ -24,7 +24,7 @@
 #include <fstream>
 #include "otbStreamingTraits.h"
 
-int otbStreamingCompareImageFilterNew(int argc, char * argv[])
+int otbStreamingCompareImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char PixelType;
@@ -40,7 +40,7 @@ int otbStreamingCompareImageFilterNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbStreamingCompareImageFilter(int argc, char * argv[])
+int otbStreamingCompareImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbStreamingHistogramVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbStreamingHistogramVectorImageFilter.cxx
new file mode 100644
index 0000000..45620f8
--- /dev/null
+++ b/Testing/Code/BasicFilters/otbStreamingHistogramVectorImageFilter.cxx
@@ -0,0 +1,35 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+#include "otbStreamingHistogramVectorImageFilter.h"
+#include "otbVectorImage.h"
+
+typedef otb::VectorImage<unsigned char>               VectorImageType;
+typedef otb::StreamingHistogramVectorImageFilter<VectorImageType>                SHVIFType;
+
+
+
+int otbStreamingHistogramVectorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
+{
+
+  SHVIFType::Pointer SHVIFFilter = SHVIFType::New();
+
+  std::cout << SHVIFFilter << std::endl;
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/BasicFilters/otbStreamingInnerProductVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbStreamingInnerProductVectorImageFilter.cxx
index e9a3abd..cc3e905 100644
--- a/Testing/Code/BasicFilters/otbStreamingInnerProductVectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingInnerProductVectorImageFilter.cxx
@@ -20,7 +20,7 @@
 #include "otbImageFileReader.h"
 #include <fstream>
 
-int otbStreamingInnerProductVectorImageFilter(int argc, char* argv[])
+int otbStreamingInnerProductVectorImageFilter(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFileName = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbStreamingInnerProductVectorImageFilterNew.cxx b/Testing/Code/BasicFilters/otbStreamingInnerProductVectorImageFilterNew.cxx
index 12719f2..7432ded 100644
--- a/Testing/Code/BasicFilters/otbStreamingInnerProductVectorImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingInnerProductVectorImageFilterNew.cxx
@@ -18,7 +18,7 @@
 #include "otbStreamingInnerProductVectorImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbStreamingInnerProductVectorImageFilterNew(int argc, char* argv[])
+int otbStreamingInnerProductVectorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/BasicFilters/otbStreamingMinMaxImageFilter.cxx b/Testing/Code/BasicFilters/otbStreamingMinMaxImageFilter.cxx
index 7acb27c..bf6b2e6 100644
--- a/Testing/Code/BasicFilters/otbStreamingMinMaxImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingMinMaxImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbStreamingTraits.h"
 #include "otbStandardFilterWatcher.h"
 
-int otbStreamingMinMaxImageFilter(int argc, char * argv[])
+int otbStreamingMinMaxImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbStreamingMinMaxImageFilterNew.cxx b/Testing/Code/BasicFilters/otbStreamingMinMaxImageFilterNew.cxx
index 579cb0b..8cd1b5e 100644
--- a/Testing/Code/BasicFilters/otbStreamingMinMaxImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingMinMaxImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbStreamingMinMaxImageFilter.h"
 #include "otbImage.h"
 
-int otbStreamingMinMaxImageFilterNew(int argc, char * argv[])
+int otbStreamingMinMaxImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char PixelType;
diff --git a/Testing/Code/BasicFilters/otbStreamingMinMaxVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbStreamingMinMaxVectorImageFilter.cxx
index dd71b22..b6ca3f6 100644
--- a/Testing/Code/BasicFilters/otbStreamingMinMaxVectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingMinMaxVectorImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbStreamingTraits.h"
 #include "otbStandardFilterWatcher.h"
 
-int otbStreamingMinMaxVectorImageFilter(int argc, char * argv[])
+int otbStreamingMinMaxVectorImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbStreamingMinMaxVectorImageFilterNew.cxx b/Testing/Code/BasicFilters/otbStreamingMinMaxVectorImageFilterNew.cxx
index 009d2d5..5f3e1a2 100644
--- a/Testing/Code/BasicFilters/otbStreamingMinMaxVectorImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingMinMaxVectorImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbStreamingMinMaxVectorImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbStreamingMinMaxVectorImageFilterNew(int argc, char * argv[])
+int otbStreamingMinMaxVectorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char PixelType;
diff --git a/Testing/Code/BasicFilters/otbStreamingResampleImageFilter.cxx b/Testing/Code/BasicFilters/otbStreamingResampleImageFilter.cxx
index fa3b9dd..4a42b96 100644
--- a/Testing/Code/BasicFilters/otbStreamingResampleImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingResampleImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "itkTranslationTransform.h"
 
-int otbStreamingResampleImageFilter(int argc, char * argv[])
+int otbStreamingResampleImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char* inputFilename = argv[1];
   const char* outputFilename = argv[2];
diff --git a/Testing/Code/BasicFilters/otbStreamingResampleImageFilterCompareWithITK.cxx b/Testing/Code/BasicFilters/otbStreamingResampleImageFilterCompareWithITK.cxx
index 40ac9b9..9a7f1d3 100644
--- a/Testing/Code/BasicFilters/otbStreamingResampleImageFilterCompareWithITK.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingResampleImageFilterCompareWithITK.cxx
@@ -28,7 +28,7 @@
 #include "itkResampleImageFilter.h"
 
 
-int otbStreamingResampleImageFilterCompareWithITK(int argc, char * argv[])
+int otbStreamingResampleImageFilterCompareWithITK(int itkNotUsed(argc), char * argv[])
 {
   const char*  inputFilename = argv[1];
   unsigned int sizeXOutputImage = atoi(argv[2]);
diff --git a/Testing/Code/BasicFilters/otbStreamingResampleImageFilterNew.cxx b/Testing/Code/BasicFilters/otbStreamingResampleImageFilterNew.cxx
index ec1b505..320a55d 100644
--- a/Testing/Code/BasicFilters/otbStreamingResampleImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingResampleImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbStreamingResampleImageFilter.h"
 #include "otbImage.h"
 
-int otbStreamingResampleImageFilterNew(int argc, char * argv[])
+int otbStreamingResampleImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                 InputPixelType;
diff --git a/Testing/Code/BasicFilters/otbStreamingResampleImageFilterWithAffineTransform.cxx b/Testing/Code/BasicFilters/otbStreamingResampleImageFilterWithAffineTransform.cxx
index 017a24e..f8165cd 100644
--- a/Testing/Code/BasicFilters/otbStreamingResampleImageFilterWithAffineTransform.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingResampleImageFilterWithAffineTransform.cxx
@@ -46,9 +46,6 @@ int otbStreamingResampleImageFilterWithAffineTransform(int argc, char* argv[])
     const char * outfname = argv[3];
     unsigned int isize    = atoi(argv[2]);
 
-    typedef itk::Transform<
-        InternalPixelType, Dimension, Dimension>     TransformType;
-
     typedef itk::AffineTransform<
         InternalPixelType, Dimension>              AffineTransformType;
     typedef otb::ImageFileReader<ImageType>         ReaderType;
diff --git a/Testing/Code/BasicFilters/otbStreamingShrinkImageFilter.cxx b/Testing/Code/BasicFilters/otbStreamingShrinkImageFilter.cxx
index 4783eb9..7c30fb3 100644
--- a/Testing/Code/BasicFilters/otbStreamingShrinkImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingShrinkImageFilter.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbStreamingShrinkImageFilter.h"
 
-int otbStreamingShrinkImageFilter(int argc, char * argv[])
+int otbStreamingShrinkImageFilter(int itkNotUsed(argc), char * argv[])
 {
   char *             inputFilename = argv[1];
   char *             outputFilename = argv[2];
diff --git a/Testing/Code/BasicFilters/otbStreamingShrinkImageFilterNew.cxx b/Testing/Code/BasicFilters/otbStreamingShrinkImageFilterNew.cxx
index 490fba0..b619780 100644
--- a/Testing/Code/BasicFilters/otbStreamingShrinkImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingShrinkImageFilterNew.cxx
@@ -18,7 +18,7 @@
 #include "otbVectorImage.h"
 #include "otbStreamingShrinkImageFilter.h"
 
-int otbStreamingShrinkImageFilterNew(int argc, char * argv[])
+int otbStreamingShrinkImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/BasicFilters/otbStreamingStatisticsImageFilterNew.cxx b/Testing/Code/BasicFilters/otbStreamingStatisticsImageFilterNew.cxx
index 358657c..d3f9d59 100644
--- a/Testing/Code/BasicFilters/otbStreamingStatisticsImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingStatisticsImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbStreamingStatisticsImageFilter.h"
 #include "otbImage.h"
 
-int otbStreamingStatisticsImageFilterNew(int argc, char * argv[])
+int otbStreamingStatisticsImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char PixelType;
diff --git a/Testing/Code/BasicFilters/otbStreamingStatisticsMapFromLabelImageFilterTest.cxx b/Testing/Code/BasicFilters/otbStreamingStatisticsMapFromLabelImageFilterTest.cxx
index f73f73a..0327069 100644
--- a/Testing/Code/BasicFilters/otbStreamingStatisticsMapFromLabelImageFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingStatisticsMapFromLabelImageFilterTest.cxx
@@ -27,7 +27,7 @@
 
 
 template<class InternalVectorPixelType>
-int generic_StreamingStatisticsMapFromLabelImageFilterTest(int argc, char * argv[])
+int generic_StreamingStatisticsMapFromLabelImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   typedef unsigned int LabelPixelType;
 
diff --git a/Testing/Code/BasicFilters/otbStreamingStatisticsVectorImageFilterNew.cxx b/Testing/Code/BasicFilters/otbStreamingStatisticsVectorImageFilterNew.cxx
index 2f3ea69..2c94922 100644
--- a/Testing/Code/BasicFilters/otbStreamingStatisticsVectorImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingStatisticsVectorImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbStreamingStatisticsVectorImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbStreamingStatisticsVectorImageFilterNew(int argc, char * argv[])
+int otbStreamingStatisticsVectorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char PixelType;
diff --git a/Testing/Code/BasicFilters/otbStreamingTraits.cxx b/Testing/Code/BasicFilters/otbStreamingTraits.cxx
index ccedb02..b705dc7 100644
--- a/Testing/Code/BasicFilters/otbStreamingTraits.cxx
+++ b/Testing/Code/BasicFilters/otbStreamingTraits.cxx
@@ -33,7 +33,7 @@ void TestInstanciate()
   std::cout << instance << std::endl;
 }
 
-int otbStreamingTraitsImage(int argc, char* argv[])
+int otbStreamingTraitsImage(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   // Images definition
   typedef otb::Image<PixelType, Dimension>      ImageType;
@@ -55,7 +55,7 @@ int otbStreamingTraitsImage(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbStreamingTraitsVectorImage(int argc, char* argv[])
+int otbStreamingTraitsVectorImage(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Images definition
   typedef otb::VectorImage<PixelType, Dimension>      ImageType;
diff --git a/Testing/Code/BasicFilters/otbThresholdVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbThresholdVectorImageFilter.cxx
index 297d7ce..5288d6a 100644
--- a/Testing/Code/BasicFilters/otbThresholdVectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbThresholdVectorImageFilter.cxx
@@ -35,7 +35,7 @@ typedef otb::VectorImage<OutputPixelType, Dimension> OutputImageType;
 
 typedef otb::ThresholdVectorImageFilter<InputImageType, OutputImageType>  FilterType;
 
-int otbThresholdVectorImageFilterNew(int argc, char* argv[])
+int otbThresholdVectorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   /** instantiating the filter */
   FilterType::Pointer filter = FilterType::New();
@@ -43,7 +43,7 @@ int otbThresholdVectorImageFilterNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbThresholdVectorImageFilterTest(int argc, char* argv[])
+int otbThresholdVectorImageFilterTest(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::ImageFileReader<InputImageType> ReaderType;
   typedef otb::ImageFileWriter<OutputImageType> WriterType;
diff --git a/Testing/Code/BasicFilters/otbTileImageFilter.cxx b/Testing/Code/BasicFilters/otbTileImageFilter.cxx
index 895b2d7..8e32b29 100644
--- a/Testing/Code/BasicFilters/otbTileImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbTileImageFilter.cxx
@@ -29,7 +29,7 @@ typedef otb::ImageFileReader<VectorImageType>          VectorImageReaderType;
 typedef otb::ImageFileWriter<VectorImageType> VectorImageWriterType;
 
 
-int otbTileImageFilterNew(int argc, char * argv[])
+int otbTileImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   TileImageFilterType::Pointer tileFilter = TileImageFilterType::New();
   TileVectorImageFilterType::Pointer tileVectorFilter = TileVectorImageFilterType::New();
diff --git a/Testing/Code/BasicFilters/otbUnaryFunctorImageFilterNew.cxx b/Testing/Code/BasicFilters/otbUnaryFunctorImageFilterNew.cxx
index 3c6cc60..547147a 100644
--- a/Testing/Code/BasicFilters/otbUnaryFunctorImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbUnaryFunctorImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbPhaseFunctor.h"
 #include "otbUnaryFunctorImageFilter.h"
 
-int otbUnaryFunctorImageFilterNew(int argc, char * argv[])
+int otbUnaryFunctorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                         PixelType;
diff --git a/Testing/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.cxx
index d27507d..1ede567 100644
--- a/Testing/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "itkCastImageFilter.h"
 
-int otbUnaryImageFunctorWithVectorImageFilter(int argc, char * argv[])
+int otbUnaryImageFunctorWithVectorImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
diff --git a/Testing/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilterNew.cxx b/Testing/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilterNew.cxx
index a24d1c2..1d8c862 100644
--- a/Testing/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbImage.h"
 #include "itkCosImageFilter.h"
 
-int otbUnaryImageFunctorWithVectorImageFilterNew(int argc, char * argv[])
+int otbUnaryImageFunctorWithVectorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                  PixelType;
diff --git a/Testing/Code/BasicFilters/otbVarianceImageFilter.cxx b/Testing/Code/BasicFilters/otbVarianceImageFilter.cxx
index 72c2e37..8468f30 100644
--- a/Testing/Code/BasicFilters/otbVarianceImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbVarianceImageFilter.cxx
@@ -20,7 +20,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbVarianceImageFilter(int argc, char * argv[])
+int otbVarianceImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
diff --git a/Testing/Code/BasicFilters/otbVarianceImageFilterNew.cxx b/Testing/Code/BasicFilters/otbVarianceImageFilterNew.cxx
index 7e5aefb..6f62b80 100644
--- a/Testing/Code/BasicFilters/otbVarianceImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbVarianceImageFilterNew.cxx
@@ -18,7 +18,7 @@
 #include "otbVarianceImageFilter.h"
 #include "otbImage.h"
 
-int otbVarianceImageFilterNew(int argc, char * argv[])
+int otbVarianceImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
diff --git a/Testing/Code/BasicFilters/otbVectorDataToRandomLineGenerator.cxx b/Testing/Code/BasicFilters/otbVectorDataToRandomLineGenerator.cxx
index 094b5a9..ad60b05 100644
--- a/Testing/Code/BasicFilters/otbVectorDataToRandomLineGenerator.cxx
+++ b/Testing/Code/BasicFilters/otbVectorDataToRandomLineGenerator.cxx
@@ -22,7 +22,7 @@
 #include "otbVectorDataFileWriter.h"
 #include "otbVectorDataToRandomLineGenerator.h"
 
-int otbVectorDataToRandomLineGeneratorNew(int argc, char* argv[])
+int otbVectorDataToRandomLineGeneratorNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef otb::VectorData<>                                        VectorDataType;
   typedef otb::VectorDataToRandomLineGenerator<VectorDataType>     GeneratorType;
@@ -35,7 +35,7 @@ int otbVectorDataToRandomLineGeneratorNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbVectorDataToRandomLineGenerator(int argc, char* argv[])
+int otbVectorDataToRandomLineGenerator(int itkNotUsed(argc), char* argv[])
 {
   const char * inputVD  = argv[1];
   const char * outputVD  = argv[2];
diff --git a/Testing/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.cxx b/Testing/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.cxx
index b215f9e..6ca2a1f 100644
--- a/Testing/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "itkImageRegionIterator.h"
 #include "itkImageSliceConstIteratorWithIndex.h"
 
-int otbVectorImageTo3DScalarImageFilter(int argc, char * argv[])
+int otbVectorImageTo3DScalarImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int BiDimension  = 2;
   const unsigned int TriDimension  = 3;
diff --git a/Testing/Code/BasicFilters/otbVectorImageTo3DScalarImageFilterNew.cxx b/Testing/Code/BasicFilters/otbVectorImageTo3DScalarImageFilterNew.cxx
index 4876971..a32a311 100644
--- a/Testing/Code/BasicFilters/otbVectorImageTo3DScalarImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbVectorImageTo3DScalarImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImage.h"
 #include "otbVectorImageTo3DScalarImageFilter.h"
 
-int otbVectorImageTo3DScalarImageFilterNew(int argc, char * argv[])
+int otbVectorImageTo3DScalarImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int BiDimension  = 2;
   const unsigned int TriDimension  = 3;
diff --git a/Testing/Code/BasicFilters/otbVectorImageToAmplitudeImageFilter.cxx b/Testing/Code/BasicFilters/otbVectorImageToAmplitudeImageFilter.cxx
index 2910bc9..fffee7c 100644
--- a/Testing/Code/BasicFilters/otbVectorImageToAmplitudeImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbVectorImageToAmplitudeImageFilter.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbVectorImageToAmplitudeImageFilter(int argc, char * argv[])
+int otbVectorImageToAmplitudeImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
diff --git a/Testing/Code/BasicFilters/otbVectorImageToAmplitudeImageFilterNew.cxx b/Testing/Code/BasicFilters/otbVectorImageToAmplitudeImageFilterNew.cxx
index 31d328e..a7cc60a 100644
--- a/Testing/Code/BasicFilters/otbVectorImageToAmplitudeImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbVectorImageToAmplitudeImageFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorImage.h"
 #include "otbImage.h"
 
-int otbVectorImageToAmplitudeImageFilterNew(int argc, char * argv[])
+int otbVectorImageToAmplitudeImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
diff --git a/Testing/Code/BasicFilters/otbVectorImageToImageListFilter.cxx b/Testing/Code/BasicFilters/otbVectorImageToImageListFilter.cxx
index a7b32ca..c961a81 100644
--- a/Testing/Code/BasicFilters/otbVectorImageToImageListFilter.cxx
+++ b/Testing/Code/BasicFilters/otbVectorImageToImageListFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbVectorImageToImageListFilter(int argc, char * argv[])
+int otbVectorImageToImageListFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   char *             infname   = argv[1];
@@ -71,7 +71,7 @@ int otbVectorImageToImageListFilter(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbVectorImageToImageListFilterIterator(int argc, char * argv[])
+int otbVectorImageToImageListFilterIterator(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   const char *       infname   = argv[1];
diff --git a/Testing/Code/BasicFilters/otbVectorImageToImageListFilterNew.cxx b/Testing/Code/BasicFilters/otbVectorImageToImageListFilterNew.cxx
index facfb49..8400106 100644
--- a/Testing/Code/BasicFilters/otbVectorImageToImageListFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbVectorImageToImageListFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbImageList.h"
 #include "otbImage.h"
 
-int otbVectorImageToImageListFilterNew(int argc, char * argv[])
+int otbVectorImageToImageListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/BasicFilters/otbVectorImageToIntensityImageFilter.cxx b/Testing/Code/BasicFilters/otbVectorImageToIntensityImageFilter.cxx
index 59712a6..203addc 100644
--- a/Testing/Code/BasicFilters/otbVectorImageToIntensityImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbVectorImageToIntensityImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileWriter.h"
 #include "otbVectorImageToIntensityImageFilter.h"
 
-int otbVectorImageToIntensityImageFilter(int argc, char * argv[])
+int otbVectorImageToIntensityImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                  PixelType;
diff --git a/Testing/Code/BasicFilters/otbVectorImageToIntensityImageFilterNew.cxx b/Testing/Code/BasicFilters/otbVectorImageToIntensityImageFilterNew.cxx
index 4c22e14..ba7ece2 100644
--- a/Testing/Code/BasicFilters/otbVectorImageToIntensityImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbVectorImageToIntensityImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbVectorImageToIntensityImageFilter.h"
 
-int otbVectorImageToIntensityImageFilterNew(int argc, char * argv[])
+int otbVectorImageToIntensityImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                  PixelType;
diff --git a/Testing/Code/BasicFilters/otbVectorImageToMatrixImageFilter.cxx b/Testing/Code/BasicFilters/otbVectorImageToMatrixImageFilter.cxx
index 6010eee..9db9292 100644
--- a/Testing/Code/BasicFilters/otbVectorImageToMatrixImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbVectorImageToMatrixImageFilter.cxx
@@ -27,14 +27,14 @@ typedef otb::VectorImage<PixelType, Dimension> ImageType;
 typedef otb::VectorImageToMatrixImageFilter<ImageType> VectorImageToMatrixImageFilterType;
 typedef VectorImageToMatrixImageFilterType::MatrixType MatrixType;
 
-int otbVectorImageToMatrixNewTest(int argc, char * argv[])
+int otbVectorImageToMatrixNewTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   VectorImageToMatrixImageFilterType::Pointer vim2matrix = VectorImageToMatrixImageFilterType::New();
   std::cout << vim2matrix << std::endl;
   return EXIT_SUCCESS;
 }
 
-int otbVectorImageToMatrixTest(int argc, char * argv[])
+int otbVectorImageToMatrixTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   ImageType::Pointer image = ImageType::New();
 
diff --git a/Testing/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.cxx b/Testing/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.cxx
index ba519a8..49dc10b 100644
--- a/Testing/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "otbMultiChannelExtractROI.h"
 
-int otbVectorRescaleIntensityImageFilter(int argc, char * argv[])
+int otbVectorRescaleIntensityImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *        infname = argv[1];
   const char *        outfname = argv[2];
diff --git a/Testing/Code/BasicFilters/otbVectorRescaleIntensityImageFilterNew.cxx b/Testing/Code/BasicFilters/otbVectorRescaleIntensityImageFilterNew.cxx
index fcd5ced..8ee7f2e 100644
--- a/Testing/Code/BasicFilters/otbVectorRescaleIntensityImageFilterNew.cxx
+++ b/Testing/Code/BasicFilters/otbVectorRescaleIntensityImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorRescaleIntensityImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbVectorRescaleIntensityImageFilterNew(int argc, char * argv[])
+int otbVectorRescaleIntensityImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                  InputPixelType;
diff --git a/Testing/Code/BasicFilters/otbVerticalSobelVectorImageFilter.cxx b/Testing/Code/BasicFilters/otbVerticalSobelVectorImageFilter.cxx
index 54d47d7..5a8fffa 100644
--- a/Testing/Code/BasicFilters/otbVerticalSobelVectorImageFilter.cxx
+++ b/Testing/Code/BasicFilters/otbVerticalSobelVectorImageFilter.cxx
@@ -26,7 +26,7 @@
 
 #include "otbVerticalSobelVectorImageFilter.h"
 
-int otbVerticalSobelVectorImageFilterNewTest ( int argc, char * argv[] )
+int otbVerticalSobelVectorImageFilterNewTest ( int itkNotUsed(argc), char * itkNotUsed(argv) [] )
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -96,4 +96,3 @@ int otbVerticalSobelVectorImageFilterTest ( int argc, char* argv[] )
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageBlackmanFunctionNew.cxx b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageBlackmanFunctionNew.cxx
index f166a0d..b67f50a 100644
--- a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageBlackmanFunctionNew.cxx
+++ b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageBlackmanFunctionNew.cxx
@@ -20,7 +20,7 @@
 #include "otbWindowedSincInterpolateImageBlackmanFunction.h"
 #include "otbImage.h"
 
-int otbWindowedSincInterpolateImageBlackmanFunctionNew(int argc, char * argv[])
+int otbWindowedSincInterpolateImageBlackmanFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                                        ImageType;
   typedef otb::WindowedSincInterpolateImageBlackmanFunction<ImageType> InterpolatorType;
diff --git a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageCosineFunctionNew.cxx b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageCosineFunctionNew.cxx
index f9b4f9e..ff31ddb 100644
--- a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageCosineFunctionNew.cxx
+++ b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageCosineFunctionNew.cxx
@@ -20,7 +20,7 @@
 #include "otbWindowedSincInterpolateImageCosineFunction.h"
 #include "otbImage.h"
 
-int otbWindowedSincInterpolateImageCosineFunctionNew(int argc, char * argv[])
+int otbWindowedSincInterpolateImageCosineFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                                      ImageType;
   typedef otb::WindowedSincInterpolateImageCosineFunction<ImageType> InterpolatorType;
diff --git a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBaseNew.cxx b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBaseNew.cxx
index 296df08..7aa9437 100644
--- a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBaseNew.cxx
+++ b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBaseNew.cxx
@@ -44,7 +44,7 @@ public:
 
 }
 
-int otbWindowedSincInterpolateImageFunctionBaseNew(int argc, char * argv[])
+int otbWindowedSincInterpolateImageFunctionBaseNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                                                  ImageType;
   typedef Function::SameFunction<double, double>                                 FunctionType;
diff --git a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageGaussianFunctionNew.cxx b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageGaussianFunctionNew.cxx
index 119170a..6105deb 100644
--- a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageGaussianFunctionNew.cxx
+++ b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageGaussianFunctionNew.cxx
@@ -20,7 +20,7 @@
 #include "otbWindowedSincInterpolateImageGaussianFunction.h"
 #include "otbImage.h"
 
-int otbWindowedSincInterpolateImageGaussianFunctionNew(int argc, char * argv[])
+int otbWindowedSincInterpolateImageGaussianFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                                        ImageType;
   typedef otb::WindowedSincInterpolateImageGaussianFunction<ImageType> InterpolatorType;
diff --git a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageHammingFunctionNew.cxx b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageHammingFunctionNew.cxx
index 8b89683..241533d 100644
--- a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageHammingFunctionNew.cxx
+++ b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageHammingFunctionNew.cxx
@@ -20,7 +20,7 @@
 #include "otbWindowedSincInterpolateImageHammingFunction.h"
 #include "otbImage.h"
 
-int otbWindowedSincInterpolateImageHammingFunctionNew(int argc, char * argv[])
+int otbWindowedSincInterpolateImageHammingFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                                       ImageType;
   typedef otb::WindowedSincInterpolateImageHammingFunction<ImageType> InterpolatorType;
diff --git a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageLanczosFunctionNew.cxx b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageLanczosFunctionNew.cxx
index 454ff97..a3c62fa 100644
--- a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageLanczosFunctionNew.cxx
+++ b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageLanczosFunctionNew.cxx
@@ -20,7 +20,7 @@
 #include "otbWindowedSincInterpolateImageLanczosFunction.h"
 #include "otbImage.h"
 
-int otbWindowedSincInterpolateImageLanczosFunctionNew(int argc, char * argv[])
+int otbWindowedSincInterpolateImageLanczosFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                                       ImageType;
   typedef otb::WindowedSincInterpolateImageLanczosFunction<ImageType> InterpolatorType;
diff --git a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageWelchFunctionNew.cxx b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageWelchFunctionNew.cxx
index 81ecea1..602156c 100644
--- a/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageWelchFunctionNew.cxx
+++ b/Testing/Code/BasicFilters/otbWindowedSincInterpolateImageWelchFunctionNew.cxx
@@ -20,7 +20,7 @@
 #include "otbWindowedSincInterpolateImageWelchFunction.h"
 #include "otbImage.h"
 
-int otbWindowedSincInterpolateImageWelchFunctionNew(int argc, char * argv[])
+int otbWindowedSincInterpolateImageWelchFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                                     ImageType;
   typedef otb::WindowedSincInterpolateImageWelchFunction<ImageType> InterpolatorType;
diff --git a/Testing/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilterNew.cxx b/Testing/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilterNew.cxx
index 5b59713..bdb49da 100644
--- a/Testing/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilterNew.cxx
+++ b/Testing/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbImage.h"
 #include "otbKullbackLeiblerDistanceImageFilter.h"
 
-int otbKullbackLeiblerDistanceImageFilterNew(int argc, char * argv[])
+int otbKullbackLeiblerDistanceImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
diff --git a/Testing/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilterNew.cxx b/Testing/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilterNew.cxx
index 71406ca..94ab041 100644
--- a/Testing/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilterNew.cxx
+++ b/Testing/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbKullbackLeiblerProfileImageFilter.h"
 
-int otbKullbackLeiblerProfileImageFilterNew(int argc, char * argv[])
+int otbKullbackLeiblerProfileImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
diff --git a/Testing/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilterNew.cxx b/Testing/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilterNew.cxx
index 375336c..262c0b9 100644
--- a/Testing/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilterNew.cxx
+++ b/Testing/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbImage.h"
 #include "otbKullbackLeiblerSupervizedDistanceImageFilter.h"
 
-int otbKullbackLeiblerSupervizedDistanceImageFilterNew(int argc, char * argv[])
+int otbKullbackLeiblerSupervizedDistanceImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef double        PixelType;
diff --git a/Testing/Code/ChangeDetection/otbMultivariateAlterationDetectorImageFilter.cxx b/Testing/Code/ChangeDetection/otbMultivariateAlterationDetectorImageFilter.cxx
index 7e63c50..71b6be2 100644
--- a/Testing/Code/ChangeDetection/otbMultivariateAlterationDetectorImageFilter.cxx
+++ b/Testing/Code/ChangeDetection/otbMultivariateAlterationDetectorImageFilter.cxx
@@ -27,7 +27,7 @@ typedef otb::ImageFileWriter<OutputImageType> WriterType;
 typedef otb::MultivariateAlterationDetectorImageFilter<ImageType, OutputImageType> MADFilterType;
 
 
-int otbMultivariateAlterationDetectorImageFilterNew(int argc, char* argv[])
+int otbMultivariateAlterationDetectorImageFilterNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   MADFilterType::Pointer  madFilter = MADFilterType::New();
 
@@ -35,7 +35,7 @@ int otbMultivariateAlterationDetectorImageFilterNew(int argc, char* argv[])
 }
 
 
-int otbMultivariateAlterationDetectorImageFilter(int argc, char* argv[])
+int otbMultivariateAlterationDetectorImageFilter(int itkNotUsed(argc), char* argv[])
 {
   char * infname1 = argv[1];
   char * infname2 = argv[2];
diff --git a/Testing/Code/Common/otbConcatenateVectorImageFilter.cxx b/Testing/Code/Common/otbConcatenateVectorImageFilter.cxx
index 7c4b912..4cf33ca 100644
--- a/Testing/Code/Common/otbConcatenateVectorImageFilter.cxx
+++ b/Testing/Code/Common/otbConcatenateVectorImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileWriter.h"
 #include "otbConcatenateVectorImageFilter.h"
 
-int otbConcatenateVectorImageFilter(int argc, char * argv[])
+int otbConcatenateVectorImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       filename1 = argv[1];
   const char *       filename2 = argv[2];
diff --git a/Testing/Code/Common/otbConcatenateVectorImageFilterNew.cxx b/Testing/Code/Common/otbConcatenateVectorImageFilterNew.cxx
index 7bb9ce5..972b010 100644
--- a/Testing/Code/Common/otbConcatenateVectorImageFilterNew.cxx
+++ b/Testing/Code/Common/otbConcatenateVectorImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbConcatenateVectorImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbConcatenateVectorImageFilterNew(int argc, char * argv[])
+int otbConcatenateVectorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                                      PixelType;
diff --git a/Testing/Code/Common/otbConfigurationTest.cxx b/Testing/Code/Common/otbConfigurationTest.cxx
index 6c08fdb..f48578c 100644
--- a/Testing/Code/Common/otbConfigurationTest.cxx
+++ b/Testing/Code/Common/otbConfigurationTest.cxx
@@ -19,7 +19,7 @@
 #include <fstream>
 #include "otbConfigurationFile.h"
 
-int otbConfigurationTest(int argc, char * argv[])
+int otbConfigurationTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
 //   std::cout << "begin config test" << std::endl;
@@ -51,9 +51,8 @@ int otbConfigurationTest(int argc, char * argv[])
 }
 
 
-int otbConfigurationTestDEM(int argc, char * argv[])
+int otbConfigurationTestDEM(int argc, char *argv[])
 {
-  typedef otb::ConfigurationFile ConfigurationType;
   std::string demDir = otb::ConfigurationFile::GetInstance()->GetDEMDirectory();
 
   if (argc > 1)
@@ -93,4 +92,3 @@ int otbConfigurationTestDEM(int argc, char * argv[])
     }
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/Common/otbDataNodeTest.cxx b/Testing/Code/Common/otbDataNodeTest.cxx
index 213d610..a32ba8d 100644
--- a/Testing/Code/Common/otbDataNodeTest.cxx
+++ b/Testing/Code/Common/otbDataNodeTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbDataNode.h"
 
-int otbDataNodeTest(int argc, char * argv[])
+int otbDataNodeTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::DataNode<double, 2>  DataNodeType;
   typedef DataNodeType::PointType   PointType;
diff --git a/Testing/Code/Common/otbDrawLineSpatialObject.cxx b/Testing/Code/Common/otbDrawLineSpatialObject.cxx
index 779d520..059b664 100644
--- a/Testing/Code/Common/otbDrawLineSpatialObject.cxx
+++ b/Testing/Code/Common/otbDrawLineSpatialObject.cxx
@@ -29,7 +29,7 @@
 
 #include "otbDrawLineSpatialObjectFilter.h"
 
-int otbDrawLineSpatialObject(int argc, char* argv[])
+int otbDrawLineSpatialObject(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx b/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx
index ffef61d..761ce2d 100644
--- a/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx
+++ b/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx
@@ -30,7 +30,7 @@
 
 #include "otbDrawLineSpatialObjectListFilter.h"
 
-int otbDrawLineSpatialObjectList(int argc, char* argv[])
+int otbDrawLineSpatialObjectList(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/Common/otbDrawLineSpatialObjectListNew.cxx b/Testing/Code/Common/otbDrawLineSpatialObjectListNew.cxx
index 4ffc20e..fc35b7d 100644
--- a/Testing/Code/Common/otbDrawLineSpatialObjectListNew.cxx
+++ b/Testing/Code/Common/otbDrawLineSpatialObjectListNew.cxx
@@ -24,7 +24,7 @@
 #include "otbImage.h"
 #include "otbDrawLineSpatialObjectListFilter.h"
 
-int otbDrawLineSpatialObjectListNew(int argc, char* argv[])
+int otbDrawLineSpatialObjectListNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double        InputPixelType;
   typedef unsigned char OutputPixelType;
diff --git a/Testing/Code/Common/otbDrawLineSpatialObjectNew.cxx b/Testing/Code/Common/otbDrawLineSpatialObjectNew.cxx
index 33f9501..43b6bf7 100644
--- a/Testing/Code/Common/otbDrawLineSpatialObjectNew.cxx
+++ b/Testing/Code/Common/otbDrawLineSpatialObjectNew.cxx
@@ -24,7 +24,7 @@
 #include "otbImage.h"
 #include "otbDrawLineSpatialObjectFilter.h"
 
-int otbDrawLineSpatialObjectNew(int argc, char* argv[])
+int otbDrawLineSpatialObjectNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   typedef double OutputPixelType;
diff --git a/Testing/Code/Common/otbDrawPathFilterNew.cxx b/Testing/Code/Common/otbDrawPathFilterNew.cxx
index 24a0189..9da0856 100644
--- a/Testing/Code/Common/otbDrawPathFilterNew.cxx
+++ b/Testing/Code/Common/otbDrawPathFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbImage.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbDrawPathFilterNew(int argc, char * argv[])
+int otbDrawPathFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                       PixelType;
diff --git a/Testing/Code/Common/otbDrawPathListFilterNew.cxx b/Testing/Code/Common/otbDrawPathListFilterNew.cxx
index 8ee4b53..a426f92 100644
--- a/Testing/Code/Common/otbDrawPathListFilterNew.cxx
+++ b/Testing/Code/Common/otbDrawPathListFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbImage.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbDrawPathListFilterNew(int argc, char * argv[])
+int otbDrawPathListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                           PixelType;
diff --git a/Testing/Code/Common/otbExtractROI.cxx b/Testing/Code/Common/otbExtractROI.cxx
index 176a53c..eb3337a 100644
--- a/Testing/Code/Common/otbExtractROI.cxx
+++ b/Testing/Code/Common/otbExtractROI.cxx
@@ -22,7 +22,7 @@
 
 #include "otbExtractROI.h"
 
-int otbExtractROI(int argc, char * argv[])
+int otbExtractROI(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/Common/otbExtractROI2.cxx b/Testing/Code/Common/otbExtractROI2.cxx
index 99bbcec..9346399 100644
--- a/Testing/Code/Common/otbExtractROI2.cxx
+++ b/Testing/Code/Common/otbExtractROI2.cxx
@@ -23,7 +23,7 @@
 
 #include "otbExtractROI.h"
 
-int otbExtractROI2(int argc, char * argv[])
+int otbExtractROI2(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/Common/otbExtractROINew.cxx b/Testing/Code/Common/otbExtractROINew.cxx
index 2e70b0a..a7ce011 100644
--- a/Testing/Code/Common/otbExtractROINew.cxx
+++ b/Testing/Code/Common/otbExtractROINew.cxx
@@ -20,7 +20,7 @@
 
 #include "otbExtractROI.h"
 
-int otbExtractROINew(int argc, char * argv[])
+int otbExtractROINew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef std::complex<float>  InputPixelType;
   typedef std::complex<double> OutputPixelType;
diff --git a/Testing/Code/Common/otbExtractROITestMetaData.cxx b/Testing/Code/Common/otbExtractROITestMetaData.cxx
index 2094462..e561c2b 100644
--- a/Testing/Code/Common/otbExtractROITestMetaData.cxx
+++ b/Testing/Code/Common/otbExtractROITestMetaData.cxx
@@ -32,7 +32,7 @@
 
 #include "boost/algorithm/string.hpp"
 
-int otbExtractROITestMetaData(int argc, char * argv[])
+int otbExtractROITestMetaData(int itkNotUsed(argc), char * argv[])
 {
   typedef float PixelType;
 
diff --git a/Testing/Code/Common/otbExtractROI_RGB.cxx b/Testing/Code/Common/otbExtractROI_RGB.cxx
index a738adc..3bb1acf 100644
--- a/Testing/Code/Common/otbExtractROI_RGB.cxx
+++ b/Testing/Code/Common/otbExtractROI_RGB.cxx
@@ -23,7 +23,7 @@
 #include "otbExtractROI.h"
 #include "itkRGBPixel.h"
 
-int otbExtractROI_RGB(int argc, char * argv[])
+int otbExtractROI_RGB(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/Common/otbGISTableNew.cxx b/Testing/Code/Common/otbGISTableNew.cxx
index b64bc1f..298fcf2 100644
--- a/Testing/Code/Common/otbGISTableNew.cxx
+++ b/Testing/Code/Common/otbGISTableNew.cxx
@@ -21,7 +21,7 @@
 #include "otbGISTable.h"
 #include "otbPostGISConnectionImplementation.h"
 
-int otbGISTableNew(int argc, char * argv[])
+int otbGISTableNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::PostGISConnectionImplementation GISConnectionType;
 
diff --git a/Testing/Code/Common/otbGISTableSourceNew.cxx b/Testing/Code/Common/otbGISTableSourceNew.cxx
index a3efb40..75cf919 100644
--- a/Testing/Code/Common/otbGISTableSourceNew.cxx
+++ b/Testing/Code/Common/otbGISTableSourceNew.cxx
@@ -22,7 +22,7 @@
 #include "otbGISTable.h"
 #include "otbPostGISConnectionImplementation.h"
 
-int otbGISTableSourceNew(int argc, char * argv[])
+int otbGISTableSourceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef otb::PostGISConnectionImplementation        GISConnectionType;
diff --git a/Testing/Code/Common/otbGISTableToGISTableFilterNew.cxx b/Testing/Code/Common/otbGISTableToGISTableFilterNew.cxx
index 3e0414d..69518fd 100644
--- a/Testing/Code/Common/otbGISTableToGISTableFilterNew.cxx
+++ b/Testing/Code/Common/otbGISTableToGISTableFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbPostGISConnectionImplementation.h"
 #include "otbGISTableToGISTableFilter.h"
 
-int otbGISTableToGISTableFilterNew(int argc, char * argv[])
+int otbGISTableToGISTableFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::PostGISConnectionImplementation                      GISConnectionType;
   typedef otb::GISTable<GISConnectionType, double, 2>               GISTableType;
diff --git a/Testing/Code/Common/otbGISTableToVectorDataFilter.cxx b/Testing/Code/Common/otbGISTableToVectorDataFilter.cxx
index b87d726..fb1045d 100644
--- a/Testing/Code/Common/otbGISTableToVectorDataFilter.cxx
+++ b/Testing/Code/Common/otbGISTableToVectorDataFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbGISTableToVectorDataFilter.h"
 #include "otbPostGISConnectionImplementation.h"
 
-int otbGISTableToVectorDataFilter(int argc, char * argv[])
+int otbGISTableToVectorDataFilter(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   /** Read a PostGIS table and write it in a VectorData. The Filter is based on the OGR reader/writer factory*/
   if (argc != 6)
diff --git a/Testing/Code/Common/otbGISTableToVectorDataFilterNew.cxx b/Testing/Code/Common/otbGISTableToVectorDataFilterNew.cxx
index 107deb0..2b480b6 100644
--- a/Testing/Code/Common/otbGISTableToVectorDataFilterNew.cxx
+++ b/Testing/Code/Common/otbGISTableToVectorDataFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "otbGISTableToVectorDataFilter.h"
 #include "otbPostGISConnectionImplementation.h"
 
-int otbGISTableToVectorDataFilterNew(int argc, char * argv[])
+int otbGISTableToVectorDataFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef unsigned char                               PType;
diff --git a/Testing/Code/Common/otbGenericInterpolateImageFunctionNew.cxx b/Testing/Code/Common/otbGenericInterpolateImageFunctionNew.cxx
index 8bdcc0b..d13ec40 100644
--- a/Testing/Code/Common/otbGenericInterpolateImageFunctionNew.cxx
+++ b/Testing/Code/Common/otbGenericInterpolateImageFunctionNew.cxx
@@ -44,7 +44,7 @@ public:
 
 }
 
-int otbGenericInterpolateImageFunctionNew(int argc, char * argv[])
+int otbGenericInterpolateImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef double InputPixelType;
diff --git a/Testing/Code/Common/otbHistogramStatisticsFunction.cxx b/Testing/Code/Common/otbHistogramStatisticsFunction.cxx
index b159ffb..2b722ec 100644
--- a/Testing/Code/Common/otbHistogramStatisticsFunction.cxx
+++ b/Testing/Code/Common/otbHistogramStatisticsFunction.cxx
@@ -21,7 +21,7 @@
 #include "itkHistogram.h"
 #include "otbHistogramStatisticsFunction.h"
 
-int otbHistogramStatisticsFunction(int argc, char* argv[])
+int otbHistogramStatisticsFunction(int itkNotUsed(argc), char * argv[])
 {
   unsigned int NbOfBins((unsigned int) ::atoi(argv[1]));
 
diff --git a/Testing/Code/Common/otbImageList.cxx b/Testing/Code/Common/otbImageList.cxx
index b5c3427..27af6bb 100644
--- a/Testing/Code/Common/otbImageList.cxx
+++ b/Testing/Code/Common/otbImageList.cxx
@@ -22,7 +22,7 @@
 #include "otbImageList.h"
 #include "otbImage.h"
 
-int otbImageList(int argc, char * argv[])
+int otbImageList(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename = argv[1];
   const char *       outputFilename = argv[2];
diff --git a/Testing/Code/Common/otbImageListNew.cxx b/Testing/Code/Common/otbImageListNew.cxx
index a29075b..5637caa 100644
--- a/Testing/Code/Common/otbImageListNew.cxx
+++ b/Testing/Code/Common/otbImageListNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImageList.h"
 #include "otbImage.h"
 
-int otbImageListNew(int argc, char * argv[])
+int otbImageListNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/Common/otbImageListSourceNew.cxx b/Testing/Code/Common/otbImageListSourceNew.cxx
index 6afffc7..4dac6f4 100644
--- a/Testing/Code/Common/otbImageListSourceNew.cxx
+++ b/Testing/Code/Common/otbImageListSourceNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImageListSource.h"
 #include "otbImage.h"
 
-int otbImageListSourceNew(int argc, char * argv[])
+int otbImageListSourceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                         InputPixelType;
diff --git a/Testing/Code/Common/otbImageListToImageFilterNew.cxx b/Testing/Code/Common/otbImageListToImageFilterNew.cxx
index bb8b684..dfff757 100644
--- a/Testing/Code/Common/otbImageListToImageFilterNew.cxx
+++ b/Testing/Code/Common/otbImageListToImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImageListToImageFilter.h"
 #include "otbImage.h"
 
-int otbImageListToImageFilterNew(int argc, char * argv[])
+int otbImageListToImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                                InputPixelType;
diff --git a/Testing/Code/Common/otbImageListToImageListFilterNew.cxx b/Testing/Code/Common/otbImageListToImageListFilterNew.cxx
index 04f1e64..f3693b8 100644
--- a/Testing/Code/Common/otbImageListToImageListFilterNew.cxx
+++ b/Testing/Code/Common/otbImageListToImageListFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImageListToImageListFilter.h"
 #include "otbImage.h"
 
-int otbImageListToImageListFilterNew(int argc, char * argv[])
+int otbImageListToImageListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                                    InputPixelType;
diff --git a/Testing/Code/Common/otbImageListToVectorImageFilter.cxx b/Testing/Code/Common/otbImageListToVectorImageFilter.cxx
index a040832..8350b0a 100644
--- a/Testing/Code/Common/otbImageListToVectorImageFilter.cxx
+++ b/Testing/Code/Common/otbImageListToVectorImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageListToVectorImageFilter(int argc, char * argv[])
+int otbImageListToVectorImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char PixelType;
diff --git a/Testing/Code/Common/otbImageListToVectorImageFilter2.cxx b/Testing/Code/Common/otbImageListToVectorImageFilter2.cxx
index f2894ac..08e8ebd 100644
--- a/Testing/Code/Common/otbImageListToVectorImageFilter2.cxx
+++ b/Testing/Code/Common/otbImageListToVectorImageFilter2.cxx
@@ -23,7 +23,7 @@
 #include "otbImageList.h"
 #include "otbImageFileReader.h"
 
-int otbImageListToVectorImageFilter2(int argc, char * argv[])
+int otbImageListToVectorImageFilter2(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char PixelType;
diff --git a/Testing/Code/Common/otbImageListToVectorImageFilterNew.cxx b/Testing/Code/Common/otbImageListToVectorImageFilterNew.cxx
index 800a97e..87bf81f 100644
--- a/Testing/Code/Common/otbImageListToVectorImageFilterNew.cxx
+++ b/Testing/Code/Common/otbImageListToVectorImageFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbImage.h"
 #include "otbImageList.h"
 
-int otbImageListToVectorImageFilterNew(int argc, char * argv[])
+int otbImageListToVectorImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char PixelType;
diff --git a/Testing/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.cxx b/Testing/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.cxx
index 7264c57..83f5f47 100644
--- a/Testing/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.cxx
+++ b/Testing/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.cxx
@@ -20,7 +20,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int otbImageOfVectorsToMonoChannelExtractROI(int argc, char * argv[])
+int otbImageOfVectorsToMonoChannelExtractROI(int itkNotUsed(argc), char * argv[])
 {
   const int Dimension = 2;
   typedef unsigned char                         ScalarPixelType;
diff --git a/Testing/Code/Common/otbImageOfVectorsToMonoChannelExtractROINew.cxx b/Testing/Code/Common/otbImageOfVectorsToMonoChannelExtractROINew.cxx
index 95c0dc6..abd5ed4 100644
--- a/Testing/Code/Common/otbImageOfVectorsToMonoChannelExtractROINew.cxx
+++ b/Testing/Code/Common/otbImageOfVectorsToMonoChannelExtractROINew.cxx
@@ -18,7 +18,7 @@
 #include "otbImageOfVectorsToMonoChannelExtractROI.h"
 #include "otbImage.h"
 
-int otbImageOfVectorsToMonoChannelExtractROINew(int argc, char * argv[])
+int otbImageOfVectorsToMonoChannelExtractROINew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const int Dimension = 2;
   typedef unsigned char                  ScalarPixelType;
diff --git a/Testing/Code/Common/otbImageRegionAdaptativeSplitter.cxx b/Testing/Code/Common/otbImageRegionAdaptativeSplitter.cxx
index 8d86af4..6389935 100644
--- a/Testing/Code/Common/otbImageRegionAdaptativeSplitter.cxx
+++ b/Testing/Code/Common/otbImageRegionAdaptativeSplitter.cxx
@@ -24,7 +24,7 @@ typedef SplitterType::RegionType                      RegionType;
 typedef RegionType::SizeType                          SizeType;
 typedef RegionType::IndexType                         IndexType;
 
-int otbImageRegionAdaptativeSplitterNew(int argc, char * argv[])
+int otbImageRegionAdaptativeSplitterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   SplitterType::Pointer splitter = SplitterType::New();
 
@@ -33,7 +33,7 @@ int otbImageRegionAdaptativeSplitterNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbImageRegionAdaptativeSplitter(int argc, char * argv[])
+int otbImageRegionAdaptativeSplitter(int itkNotUsed(argc), char * argv[])
 {
   SizeType regionSize, tileHint;
   IndexType regionIndex;
diff --git a/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.cxx b/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.cxx
index 43646d0..c4fdbbd 100644
--- a/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.cxx
+++ b/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.cxx
@@ -18,7 +18,7 @@
 #include "otbImageRegionNonUniformMultidimensionalSplitter.h"
 #include <fstream>
 
-int otbImageRegionNonUniformMultidimensionalSplitter(int argc, char * argv[])
+int otbImageRegionNonUniformMultidimensionalSplitter(int itkNotUsed(argc), char * argv[])
 {
   const int Dimension = 2;
   typedef otb::ImageRegionNonUniformMultidimensionalSplitter<Dimension> FilterType;
diff --git a/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitterNew.cxx b/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitterNew.cxx
index 413ca26..7f96921 100644
--- a/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitterNew.cxx
+++ b/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitterNew.cxx
@@ -17,7 +17,7 @@
 =========================================================================*/
 #include "otbImageRegionNonUniformMultidimensionalSplitter.h"
 
-int otbImageRegionNonUniformMultidimensionalSplitterNew(int argc, char * argv[])
+int otbImageRegionNonUniformMultidimensionalSplitterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const int Dimension = 2;
   typedef otb::ImageRegionNonUniformMultidimensionalSplitter<Dimension> FilterType;
diff --git a/Testing/Code/Common/otbImageRegionSquareTileSplitter.cxx b/Testing/Code/Common/otbImageRegionSquareTileSplitter.cxx
index 89c790e..f97ab1f 100644
--- a/Testing/Code/Common/otbImageRegionSquareTileSplitter.cxx
+++ b/Testing/Code/Common/otbImageRegionSquareTileSplitter.cxx
@@ -25,7 +25,7 @@ typedef SquareTileSplitterType::SizeType                        SizeType;
 typedef SquareTileSplitterType::RegionType                      RegionType;
 
 
-int otbImageRegionSquareTileSplitterNew(int argc, char * argv[])
+int otbImageRegionSquareTileSplitterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   SquareTileSplitterType::Pointer splitter = SquareTileSplitterType::New();
 
@@ -80,7 +80,7 @@ int TestSplitter(const RegionType& region, unsigned int PixelSize, unsigned int
 }
 
 
-int otbImageRegionSquareTileSplitter(int argc, char * argv[])
+int otbImageRegionSquareTileSplitter(int itkNotUsed(argc), char * argv[])
 {
   std::ofstream outfile(argv[1]);
   RegionType region;
diff --git a/Testing/Code/Common/otbImageRegionTileMapSplitter.cxx b/Testing/Code/Common/otbImageRegionTileMapSplitter.cxx
index f9c2234..b45799e 100644
--- a/Testing/Code/Common/otbImageRegionTileMapSplitter.cxx
+++ b/Testing/Code/Common/otbImageRegionTileMapSplitter.cxx
@@ -18,7 +18,7 @@
 #include "otbImageRegionTileMapSplitter.h"
 #include <fstream>
 
-int otbImageRegionTileMapSplitter(int argc, char * argv[])
+int otbImageRegionTileMapSplitter(int itkNotUsed(argc), char * argv[])
 {
 
   const int Dimension = 2;
diff --git a/Testing/Code/Common/otbImageRegionTileMapSplitterNew.cxx b/Testing/Code/Common/otbImageRegionTileMapSplitterNew.cxx
index 7d5a33c..c9a702b 100644
--- a/Testing/Code/Common/otbImageRegionTileMapSplitterNew.cxx
+++ b/Testing/Code/Common/otbImageRegionTileMapSplitterNew.cxx
@@ -17,7 +17,7 @@
 =========================================================================*/
 #include "otbImageRegionTileMapSplitter.h"
 
-int otbImageRegionTileMapSplitterNew(int argc, char * argv[])
+int otbImageRegionTileMapSplitterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const int Dimension = 2;
   typedef otb::ImageRegionTileMapSplitter<Dimension> FilterType;
diff --git a/Testing/Code/Common/otbImageToImageListFilterNew.cxx b/Testing/Code/Common/otbImageToImageListFilterNew.cxx
index 53440a1..0d103af 100644
--- a/Testing/Code/Common/otbImageToImageListFilterNew.cxx
+++ b/Testing/Code/Common/otbImageToImageListFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImageToImageListFilter.h"
 #include "otbImage.h"
 
-int otbImageToImageListFilterNew(int argc, char * argv[])
+int otbImageToImageListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                                InputPixelType;
diff --git a/Testing/Code/Common/otbImageToLineSpatialObjectListNew.cxx b/Testing/Code/Common/otbImageToLineSpatialObjectListNew.cxx
index c07d3cd..e684cb9 100644
--- a/Testing/Code/Common/otbImageToLineSpatialObjectListNew.cxx
+++ b/Testing/Code/Common/otbImageToLineSpatialObjectListNew.cxx
@@ -24,7 +24,7 @@
 #include "otbImage.h"
 #include "otbImageToLineSpatialObjectListFilter.h"
 
-int otbImageToLineSpatialObjectListNew(int argc, char* argv[])
+int otbImageToLineSpatialObjectListNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/Common/otbImageToPathFilterNew.cxx b/Testing/Code/Common/otbImageToPathFilterNew.cxx
index f669c09..c78b7ca 100644
--- a/Testing/Code/Common/otbImageToPathFilterNew.cxx
+++ b/Testing/Code/Common/otbImageToPathFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImageToPathFilter.h"
 #include "otbImage.h"
 
-int otbImageToPathFilterNew(int argc, char * argv[])
+int otbImageToPathFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                          PixelType;
diff --git a/Testing/Code/Common/otbImageToVectorImageCastFilter.cxx b/Testing/Code/Common/otbImageToVectorImageCastFilter.cxx
index 3f79494..b629134 100644
--- a/Testing/Code/Common/otbImageToVectorImageCastFilter.cxx
+++ b/Testing/Code/Common/otbImageToVectorImageCastFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbVectorImage.h"
 #include "otbImage.h"
 
-int otbImageToVectorImageCastFilter(int argc, char * argv[])
+int otbImageToVectorImageCastFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       infilename = argv[1];
   const char *       outfilename = argv[2];
diff --git a/Testing/Code/Common/otbImageToVectorImageCastFilterNew.cxx b/Testing/Code/Common/otbImageToVectorImageCastFilterNew.cxx
index 101d529..be9a62f 100644
--- a/Testing/Code/Common/otbImageToVectorImageCastFilterNew.cxx
+++ b/Testing/Code/Common/otbImageToVectorImageCastFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbImage.h"
 
-int otbImageToVectorImageCastFilterNew(int argc, char * argv[])
+int otbImageToVectorImageCastFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/Common/otbLabelImageToOGRDataSourceFilter.cxx b/Testing/Code/Common/otbLabelImageToOGRDataSourceFilter.cxx
index 8f8c4d9..58688b0 100644
--- a/Testing/Code/Common/otbLabelImageToOGRDataSourceFilter.cxx
+++ b/Testing/Code/Common/otbLabelImageToOGRDataSourceFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbVectorDataFileWriter.h"
 
-int otbLabelImageToOGRDataSourceFilterNew(int argc, char * argv[])
+int otbLabelImageToOGRDataSourceFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned short LabelType;
@@ -46,8 +46,6 @@ int otbLabelImageToOGRDataSourceFilter(int argc, char * argv[])
     return EXIT_FAILURE;
     }
   const char * infname = argv[1];
-  const char * outfname = argv[2];
-
 
   const unsigned int Dimension = 2;
   typedef unsigned short LabelType;
diff --git a/Testing/Code/Common/otbLabelImageToVectorDataFilterNew.cxx b/Testing/Code/Common/otbLabelImageToVectorDataFilterNew.cxx
index f66c983..22d9aec 100644
--- a/Testing/Code/Common/otbLabelImageToVectorDataFilterNew.cxx
+++ b/Testing/Code/Common/otbLabelImageToVectorDataFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbLabelImageToVectorDataFilter.h"
 #include "otbImage.h"
 
-int otbLabelImageToVectorDataFilterNew(int argc, char * argv[])
+int otbLabelImageToVectorDataFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned short LabelType;
diff --git a/Testing/Code/Common/otbLineSpatialObjectList.cxx b/Testing/Code/Common/otbLineSpatialObjectList.cxx
index 0bf6c17..0a41d0e 100644
--- a/Testing/Code/Common/otbLineSpatialObjectList.cxx
+++ b/Testing/Code/Common/otbLineSpatialObjectList.cxx
@@ -21,7 +21,7 @@
 #include "otbLineSpatialObjectList.h"
 #include <list>
 
-int otbLineSpatialObjectList(int argc, char * argv[])
+int otbLineSpatialObjectList(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::LineSpatialObjectList                         LineSpatialObjectListType;
   typedef LineSpatialObjectListType::LineType                LineSpatialObjecType;
diff --git a/Testing/Code/Common/otbLineSpatialObjectListToPointSetFilterNew.cxx b/Testing/Code/Common/otbLineSpatialObjectListToPointSetFilterNew.cxx
index 9c1a379..5f430d1 100644
--- a/Testing/Code/Common/otbLineSpatialObjectListToPointSetFilterNew.cxx
+++ b/Testing/Code/Common/otbLineSpatialObjectListToPointSetFilterNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbLineSpatialObjectListToPointSetFilter.h"
 
-int otbLineSpatialObjectListToPointSetFilterNew(int argc, char* argv[])
+int otbLineSpatialObjectListToPointSetFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef float                         InputPixelType;
   typedef otb::LineSpatialObjectList    LinesListType;
diff --git a/Testing/Code/Common/otbLineSpatialObjectNew.cxx b/Testing/Code/Common/otbLineSpatialObjectNew.cxx
index edbd27d..8c3e00b 100644
--- a/Testing/Code/Common/otbLineSpatialObjectNew.cxx
+++ b/Testing/Code/Common/otbLineSpatialObjectNew.cxx
@@ -19,7 +19,7 @@
 
 #include "otbLineSpatialObject.h"
 
-int otbLineSpatialObjectNew(int argc, char * argv[])
+int otbLineSpatialObjectNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef otb::LineSpatialObject<Dimension> LineSpatialObjectType;
diff --git a/Testing/Code/Common/otbMultiChannelExtractROI.cxx b/Testing/Code/Common/otbMultiChannelExtractROI.cxx
index 2f1f9ea..2b73c62 100644
--- a/Testing/Code/Common/otbMultiChannelExtractROI.cxx
+++ b/Testing/Code/Common/otbMultiChannelExtractROI.cxx
@@ -28,7 +28,7 @@
 
 
 template <typename  InputPixelType /*= unsigned char */, typename OutputPixelType /*= unsigned char*/>
-int generic_otbMultiChannelExtractROI(int argc, char * argv[], const char * inputFilename, const char * outputFilename)
+int generic_otbMultiChannelExtractROI(int itkNotUsed(argc), char * argv[], const char * inputFilename, const char * outputFilename)
 {
   typedef otb::MultiChannelExtractROI<InputPixelType,
       OutputPixelType>  ExtractROIFilterType;
diff --git a/Testing/Code/Common/otbMultiChannelExtractROINew.cxx b/Testing/Code/Common/otbMultiChannelExtractROINew.cxx
index 4729a56..c315ce0 100644
--- a/Testing/Code/Common/otbMultiChannelExtractROINew.cxx
+++ b/Testing/Code/Common/otbMultiChannelExtractROINew.cxx
@@ -19,7 +19,7 @@
 #include "itkMacro.h"
 #include "otbMultiChannelExtractROI.h"
 
-int otbMultiChannelExtractROINew(int argc, char * argv[])
+int otbMultiChannelExtractROINew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   //        typedef unsigned char                                    InputPixelType;
   //        typedef unsigned char                                    OutputPixelType;
diff --git a/Testing/Code/Common/otbMultiToMonoChannelExtractROI.cxx b/Testing/Code/Common/otbMultiToMonoChannelExtractROI.cxx
index f9d8288..ed3957d 100644
--- a/Testing/Code/Common/otbMultiToMonoChannelExtractROI.cxx
+++ b/Testing/Code/Common/otbMultiToMonoChannelExtractROI.cxx
@@ -23,7 +23,7 @@
 #include "otbMultiToMonoChannelExtractROI.h"
 
 template <typename  InputPixelType, typename OutputPixelType>
-int generic_otbMultiToMonoChannelExtractROI(int argc,
+int generic_otbMultiToMonoChannelExtractROI(int itkNotUsed(argc),
                                             char * argv[],
                                             const char * inputFilename,
                                             const char * outputFilename)
diff --git a/Testing/Code/Common/otbMultiToMonoChannelExtractROINew.cxx b/Testing/Code/Common/otbMultiToMonoChannelExtractROINew.cxx
index bc4bdbc..d2b63a8 100644
--- a/Testing/Code/Common/otbMultiToMonoChannelExtractROINew.cxx
+++ b/Testing/Code/Common/otbMultiToMonoChannelExtractROINew.cxx
@@ -19,7 +19,7 @@
 #include "itkMacro.h"
 #include "otbMultiToMonoChannelExtractROI.h"
 
-int otbMultiToMonoChannelExtractROINew(int argc, char * argv[])
+int otbMultiToMonoChannelExtractROINew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   //        typedef unsigned char                                    InputPixelType;
diff --git a/Testing/Code/Common/otbOGRDataSourceToLabelImageFilter.cxx b/Testing/Code/Common/otbOGRDataSourceToLabelImageFilter.cxx
index 19b8c1b..2cafc7a 100644
--- a/Testing/Code/Common/otbOGRDataSourceToLabelImageFilter.cxx
+++ b/Testing/Code/Common/otbOGRDataSourceToLabelImageFilter.cxx
@@ -32,13 +32,13 @@ typedef otb::ImageFileReader<ImageType>                       ReaderType;
 typedef otb::ImageFileWriter<ImageType>              WriterType;
 typedef otb::OGRDataSourceToLabelImageFilter<ImageType>       RasterizationFilterType;
 
-int otbOGRDataSourceToLabelImageFilterNew(int argc, char* argv[])
+int otbOGRDataSourceToLabelImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   RasterizationFilterType::Pointer  rasterization = RasterizationFilterType::New();
   return EXIT_SUCCESS;
 }
 
-int otbOGRDataSourceToLabelImageFilter(int argc, char* argv[])
+int otbOGRDataSourceToLabelImageFilter(int itkNotUsed(argc), char * argv[])
 {
 
   ReaderType::Pointer reader = ReaderType::New();
diff --git a/Testing/Code/Common/otbObjectList.cxx b/Testing/Code/Common/otbObjectList.cxx
index 8b23529..612159f 100644
--- a/Testing/Code/Common/otbObjectList.cxx
+++ b/Testing/Code/Common/otbObjectList.cxx
@@ -22,7 +22,7 @@
 #include "otbImage.h"
 #include "otbMacro.h"
 
-int otbObjectList(int argc, char * argv[])
+int otbObjectList(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename1 = argv[1];
   const char *       inputFilename2 = argv[2];
diff --git a/Testing/Code/Common/otbObjectList2.cxx b/Testing/Code/Common/otbObjectList2.cxx
index 0a3cb00..8327c17 100644
--- a/Testing/Code/Common/otbObjectList2.cxx
+++ b/Testing/Code/Common/otbObjectList2.cxx
@@ -22,7 +22,7 @@
 #include "otbMacro.h"
 #include <vector>
 
-int otbObjectList2(int argc, char * argv[])
+int otbObjectList2(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef otb::Polygon<double>         PolygonType;
diff --git a/Testing/Code/Common/otbObjectListNew.cxx b/Testing/Code/Common/otbObjectListNew.cxx
index f3c8797..c4547d9 100644
--- a/Testing/Code/Common/otbObjectListNew.cxx
+++ b/Testing/Code/Common/otbObjectListNew.cxx
@@ -19,7 +19,7 @@
 #include "otbObjectList.h"
 #include "otbImage.h"
 
-int otbObjectListNew(int argc, char * argv[])
+int otbObjectListNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                    PixelType;
diff --git a/Testing/Code/Common/otbObjectListToObjectListFilterNew.cxx b/Testing/Code/Common/otbObjectListToObjectListFilterNew.cxx
index aea4ed2..6bb427e 100644
--- a/Testing/Code/Common/otbObjectListToObjectListFilterNew.cxx
+++ b/Testing/Code/Common/otbObjectListToObjectListFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbPolyLineParametricPathWithValue.h"
 #include "otbPolygon.h"
 
-int otbObjectListToObjectListFilterNew(int argc, char * argv[])
+int otbObjectListToObjectListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::PolyLineParametricPathWithValue<std::complex<int>, 2> InputObjectType;
   typedef otb::Polygon<unsigned char>                                OutputObjectType;
diff --git a/Testing/Code/Common/otbParserTest.cxx b/Testing/Code/Common/otbParserTest.cxx
index 334bcc4..2161424 100644
--- a/Testing/Code/Common/otbParserTest.cxx
+++ b/Testing/Code/Common/otbParserTest.cxx
@@ -20,7 +20,7 @@
 
 typedef otb::Parser ParserType;
 
-int otbParserTestNew(int argc, char * argv[])
+int otbParserTestNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Instantiating object
   ParserType::Pointer parser = ParserType::New();
@@ -112,7 +112,7 @@ void otbParserTest_LogicalOperator(void)
   otbParserTest_ThrowIfNotEqual(static_cast<int>(parser->Eval()), 1, "LogicalOperator or");
 }
 
-int otbParserTest(int argc, char * argv[])
+int otbParserTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   otbParserTest_Numerical();
   otbParserTest_BuildInFun();
diff --git a/Testing/Code/Common/otbPathListToHistogramGenerator.cxx b/Testing/Code/Common/otbPathListToHistogramGenerator.cxx
index 4ca6bbd..eab97a3 100644
--- a/Testing/Code/Common/otbPathListToHistogramGenerator.cxx
+++ b/Testing/Code/Common/otbPathListToHistogramGenerator.cxx
@@ -25,14 +25,13 @@
 #include "otbMath.h"
 #include "otbObjectList.h"
 
-int otbPathListToHistogramGenerator(int argc, char* argv[])
+int otbPathListToHistogramGenerator(int itkNotUsed(argc), char * argv[])
 {
   unsigned int       NbOfBins((unsigned int) ::atoi(argv[1]));
   unsigned int       NbOfPointsPerHistogram((unsigned int) ::atoi(argv[2]));
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension> PathType;
   typedef PathType::Pointer                      PathPointer;
-  typedef PathType::ConstPointer                 PathConstPointerType;
   typedef otb::ObjectList<PathType>              PathListType;
 
   typedef otb::OrientationPathFunction<PathType> FunctionType;
diff --git a/Testing/Code/Common/otbPathListToHistogramGeneratorNew.cxx b/Testing/Code/Common/otbPathListToHistogramGeneratorNew.cxx
index 3d502ee..483ebda 100644
--- a/Testing/Code/Common/otbPathListToHistogramGeneratorNew.cxx
+++ b/Testing/Code/Common/otbPathListToHistogramGeneratorNew.cxx
@@ -23,7 +23,7 @@
 #include "otbOrientationPathFunction.h"
 #include "otbPathListToHistogramGenerator.h"
 
-int otbPathListToHistogramGeneratorNew(int argc, char* argv[])
+int otbPathListToHistogramGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension> PathType;
diff --git a/Testing/Code/Common/otbPathListToPathListFilterNew.cxx b/Testing/Code/Common/otbPathListToPathListFilterNew.cxx
index a0e5a3a..d62ffb1 100644
--- a/Testing/Code/Common/otbPathListToPathListFilterNew.cxx
+++ b/Testing/Code/Common/otbPathListToPathListFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbPathListToPathListFilter.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbPathListToPathListFilterNew(int argc, char * argv[])
+int otbPathListToPathListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension>  PathType;
diff --git a/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx b/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx
index c032111..6a8d179 100644
--- a/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx
+++ b/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbVectorImageToIntensityImageFilter.h"
 
-int otbPipelineMemoryPrintCalculatorNew(int argc, char * argv[])
+int otbPipelineMemoryPrintCalculatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   otb::PipelineMemoryPrintCalculator::Pointer calculator = otb::PipelineMemoryPrintCalculator::New();
 
@@ -30,7 +30,7 @@ int otbPipelineMemoryPrintCalculatorNew(int argc, char * argv[])
 }
 
 
-int otbPipelineMemoryPrintCalculatorTest(int argc, char * argv[])
+int otbPipelineMemoryPrintCalculatorTest(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::VectorImage<double, 2>            VectorImageType;
   typedef otb::Image<double, 2>                  ImageType;
diff --git a/Testing/Code/Common/otbPointSetSourceTest.cxx b/Testing/Code/Common/otbPointSetSourceTest.cxx
index 92990eb..9e51825 100644
--- a/Testing/Code/Common/otbPointSetSourceTest.cxx
+++ b/Testing/Code/Common/otbPointSetSourceTest.cxx
@@ -22,7 +22,7 @@
 #include "otbPointSetSource.h"
 #include "itkMacro.h"
 
-int otbPointSetSourceTest(int argc, char* argv[])
+int otbPointSetSourceTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Declare the PointSet pixel type.
   // Those are the values associated
diff --git a/Testing/Code/Common/otbPolyLineImageConstIterator.cxx b/Testing/Code/Common/otbPolyLineImageConstIterator.cxx
index 1f16f44..815f59a 100644
--- a/Testing/Code/Common/otbPolyLineImageConstIterator.cxx
+++ b/Testing/Code/Common/otbPolyLineImageConstIterator.cxx
@@ -39,8 +39,6 @@ int otbPolyLineImageConstIterator(int argc, char * argv[])
   typedef otb::Image<PixelType, Dimension>                ImageType;
   typedef itk::PolyLineParametricPath<Dimension>          PathType;
   typedef PathType::VertexType                            VertexType;
-  typedef otb::PolyLineImageIterator<ImageType, PathType> IteratorType;
-
   typedef otb::PolyLineImageConstIterator<ImageType, PathType> ConstIteratorType;
 
   ImageType::SizeType size;
diff --git a/Testing/Code/Common/otbPolyLineParametricPathWithValueNew.cxx b/Testing/Code/Common/otbPolyLineParametricPathWithValueNew.cxx
index 8323afd..46861bf 100644
--- a/Testing/Code/Common/otbPolyLineParametricPathWithValueNew.cxx
+++ b/Testing/Code/Common/otbPolyLineParametricPathWithValueNew.cxx
@@ -20,7 +20,7 @@
 
 #include "otbPolyLineParametricPathWithValue.h"
 
-int otbPolyLineParametricPathWithValueNew(int argc, char * argv[])
+int otbPolyLineParametricPathWithValueNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                     ValueType;
diff --git a/Testing/Code/Common/otbPolygon.cxx b/Testing/Code/Common/otbPolygon.cxx
index 3a2648b..73b5639 100644
--- a/Testing/Code/Common/otbPolygon.cxx
+++ b/Testing/Code/Common/otbPolygon.cxx
@@ -21,7 +21,7 @@
 
 #include "otbPolygon.h"
 
-int otbPolygon(int argc, char * argv[])
+int otbPolygon(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::Polygon<>                   PolygonType;
   typedef PolygonType::ContinuousIndexType ContinuousIndexType;
diff --git a/Testing/Code/Common/otbPolygonNew.cxx b/Testing/Code/Common/otbPolygonNew.cxx
index febff8c..0d919df 100644
--- a/Testing/Code/Common/otbPolygonNew.cxx
+++ b/Testing/Code/Common/otbPolygonNew.cxx
@@ -20,7 +20,7 @@
 
 #include "otbPolygon.h"
 
-int otbPolygonNew(int argc, char * argv[])
+int otbPolygonNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Polygon<> PolygonType;
 
diff --git a/Testing/Code/Common/otbPolygonizationRasterizationTest.cxx b/Testing/Code/Common/otbPolygonizationRasterizationTest.cxx
index e36a405..df5f69d 100644
--- a/Testing/Code/Common/otbPolygonizationRasterizationTest.cxx
+++ b/Testing/Code/Common/otbPolygonizationRasterizationTest.cxx
@@ -30,14 +30,13 @@
 #include "itkNumericTraits.h"
 #include "itkImageRegionConstIteratorWithIndex.h"
 
-int otbPolygonizationRasterizationTest(int argc, char* argv[])
+int otbPolygonizationRasterizationTest(int itkNotUsed(argc), char * argv[])
 {
   typedef unsigned int                                          PixelType;
   typedef otb::Image<PixelType, 2>                              ImageType;
   typedef otb::ImageFileReader<ImageType>                       ReaderType;
 
   typedef otb::VectorData<>                                     VectorDataType;
-  typedef otb::VectorDataFileReader<VectorDataType>             VDReaderType;
 
   typedef otb::LabelImageToVectorDataFilter<ImageType>          LabelImageToVDFilterType;
   typedef otb::VectorDataToLabelImageFilter<VectorDataType,
diff --git a/Testing/Code/Common/otbPostGISTableNew.cxx b/Testing/Code/Common/otbPostGISTableNew.cxx
index 85664a1..8e10971 100644
--- a/Testing/Code/Common/otbPostGISTableNew.cxx
+++ b/Testing/Code/Common/otbPostGISTableNew.cxx
@@ -21,7 +21,7 @@
 #include "otbPostGISTable.h"
 #include "otbPostGISConnectionImplementation.h"
 
-int otbPostGISTableNew(int argc, char * argv[])
+int otbPostGISTableNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::PostGISConnectionImplementation GISConnectionType;
 
diff --git a/Testing/Code/Common/otbRGBAPixelConverter.cxx b/Testing/Code/Common/otbRGBAPixelConverter.cxx
index 97a648f..78d04fe 100644
--- a/Testing/Code/Common/otbRGBAPixelConverter.cxx
+++ b/Testing/Code/Common/otbRGBAPixelConverter.cxx
@@ -21,7 +21,7 @@
 
 #include "otbRGBAPixelConverter.h"
 
-int otbRGBAPixelConverterNew(int argc, char * argv[])
+int otbRGBAPixelConverterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char                                          PixelType0;
   typedef double                                                 PixelType1;
@@ -47,7 +47,7 @@ int otbRGBAPixelConverterNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbRGBAPixelConverter(int argc, char * argv[])
+int otbRGBAPixelConverter(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned int                                           PixelType0;
   typedef double                                                 PixelType1;
diff --git a/Testing/Code/Common/otbRectangle.cxx b/Testing/Code/Common/otbRectangle.cxx
index 3519632..0c6b821 100644
--- a/Testing/Code/Common/otbRectangle.cxx
+++ b/Testing/Code/Common/otbRectangle.cxx
@@ -20,14 +20,12 @@
 #include <iostream>
 #include <fstream>
 
-int otbRectangle(int argc, char * argv[])
+int otbRectangle(int itkNotUsed(argc), char * argv[])
 {
   const char * outfname = argv[1];
 
   typedef otb::Rectangle<>                   RectangleType;
   typedef RectangleType::ContinuousIndexType ContinuousIndexType;
-  typedef RectangleType::VertexListType      VertexListType;
-  typedef VertexListType::ConstIterator      IteratorType;
 
   // Instantiating object
   RectangleType::Pointer rectangle1 = RectangleType::New();
diff --git a/Testing/Code/Common/otbRectangleNew.cxx b/Testing/Code/Common/otbRectangleNew.cxx
index ca81686..f8a5e42 100644
--- a/Testing/Code/Common/otbRectangleNew.cxx
+++ b/Testing/Code/Common/otbRectangleNew.cxx
@@ -18,7 +18,7 @@
 
 #include "otbRectangle.h"
 
-int otbRectangleNew(int argc, char * argv[])
+int otbRectangleNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Rectangle<> RectangleType;
 
diff --git a/Testing/Code/Common/otbRemoteSensingRegion.cxx b/Testing/Code/Common/otbRemoteSensingRegion.cxx
index f8f3f81..9b7d22f 100644
--- a/Testing/Code/Common/otbRemoteSensingRegion.cxx
+++ b/Testing/Code/Common/otbRemoteSensingRegion.cxx
@@ -18,7 +18,7 @@
 
 #include "otbRemoteSensingRegion.h"
 
-int otbRemoteSensingRegion(int argc, char * argv[])
+int otbRemoteSensingRegion(int itkNotUsed(argc), char * argv[])
 {
 
   typedef   double Type;
diff --git a/Testing/Code/Common/otbRemoteSensingRegionNew.cxx b/Testing/Code/Common/otbRemoteSensingRegionNew.cxx
index 1374b74..3164f2e 100644
--- a/Testing/Code/Common/otbRemoteSensingRegionNew.cxx
+++ b/Testing/Code/Common/otbRemoteSensingRegionNew.cxx
@@ -18,7 +18,7 @@
 
 #include "otbRemoteSensingRegion.h"
 
-int otbRemoteSensingRegionNew(int argc, char * argv[])
+int otbRemoteSensingRegionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef   double                         Type;
diff --git a/Testing/Code/Common/otbShiftScaleImageAdaptor.cxx b/Testing/Code/Common/otbShiftScaleImageAdaptor.cxx
index be8da19..ac59841 100644
--- a/Testing/Code/Common/otbShiftScaleImageAdaptor.cxx
+++ b/Testing/Code/Common/otbShiftScaleImageAdaptor.cxx
@@ -23,7 +23,7 @@
 #include "itkRescaleIntensityImageFilter.h"
 #include "otbShiftScaleImageAdaptor.h"
 
-int otbShiftScaleImageAdaptor(int argc, char * argv[])
+int otbShiftScaleImageAdaptor(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/Common/otbShiftScaleImageAdaptorNew.cxx b/Testing/Code/Common/otbShiftScaleImageAdaptorNew.cxx
index 7d45291..99ab99a 100644
--- a/Testing/Code/Common/otbShiftScaleImageAdaptorNew.cxx
+++ b/Testing/Code/Common/otbShiftScaleImageAdaptorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbShiftScaleImageAdaptor.h"
 
-int otbShiftScaleImageAdaptorNew(int argc, char * argv[])
+int otbShiftScaleImageAdaptorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double                                                 InputPixelType;
   typedef otb::VectorImage<InputPixelType, 2>                    ImageType;
diff --git a/Testing/Code/Common/otbSpatialObjectSourceNew.cxx b/Testing/Code/Common/otbSpatialObjectSourceNew.cxx
index daf7ed3..6658d03 100644
--- a/Testing/Code/Common/otbSpatialObjectSourceNew.cxx
+++ b/Testing/Code/Common/otbSpatialObjectSourceNew.cxx
@@ -20,7 +20,7 @@
 #include "otbSpatialObjectSource.h"
 #include "itkGroupSpatialObject.h"
 
-int otbSpatialObjectSourceNew(int argc, char* argv[])
+int otbSpatialObjectSourceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::GroupSpatialObject<Dimension>          SpatialObjectType;
diff --git a/Testing/Code/Common/otbStandardFilterWatcherNew.cxx b/Testing/Code/Common/otbStandardFilterWatcherNew.cxx
index ae09ea5..735a098 100644
--- a/Testing/Code/Common/otbStandardFilterWatcherNew.cxx
+++ b/Testing/Code/Common/otbStandardFilterWatcherNew.cxx
@@ -22,7 +22,7 @@
 #include "otbStandardFilterWatcher.h"
 #include "itkGradientMagnitudeImageFilter.h"
 
-int otbStandardFilterWatcherNew(int argc, char * argv[])
+int otbStandardFilterWatcherNew(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                    PixelType;
diff --git a/Testing/Code/Common/otbStandardOneLineFilterWatcherTest.cxx b/Testing/Code/Common/otbStandardOneLineFilterWatcherTest.cxx
index d843d07..6ae4cbf 100644
--- a/Testing/Code/Common/otbStandardOneLineFilterWatcherTest.cxx
+++ b/Testing/Code/Common/otbStandardOneLineFilterWatcherTest.cxx
@@ -22,7 +22,7 @@
 #include "otbStandardOneLineFilterWatcher.h"
 #include "itkGradientMagnitudeImageFilter.h"
 
-int otbStandardOneLineFilterWatcherTest(int argc, char * argv[])
+int otbStandardOneLineFilterWatcherTest(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                    PixelType;
diff --git a/Testing/Code/Common/otbStandardWriterWatcher.cxx b/Testing/Code/Common/otbStandardWriterWatcher.cxx
index ec3eb04..014d401 100644
--- a/Testing/Code/Common/otbStandardWriterWatcher.cxx
+++ b/Testing/Code/Common/otbStandardWriterWatcher.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImageFileWriter.h"
 
-int otbStandardWriterWatcher(int argc, char * argv[])
+int otbStandardWriterWatcher(int itkNotUsed(argc), char * argv[])
 {
   const char *       infname = argv[1];
   const char *       outfname = argv[2];
diff --git a/Testing/Code/Common/otbStreamingManager.cxx b/Testing/Code/Common/otbStreamingManager.cxx
index 81e72be..9cae248 100644
--- a/Testing/Code/Common/otbStreamingManager.cxx
+++ b/Testing/Code/Common/otbStreamingManager.cxx
@@ -50,7 +50,7 @@ ImageType::Pointer makeImage(ImageType::RegionType region)
   return image;
 }
 
-int otbStreamingManagerNew(int argc, char * argv[])
+int otbStreamingManagerNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   NbLinesStrippedStreamingManagerType::Pointer streamingManager1 = NbLinesStrippedStreamingManagerType::New();
   std::cout << streamingManager1 << std::endl;
@@ -71,7 +71,7 @@ int otbStreamingManagerNew(int argc, char * argv[])
 }
 
 
-int otbNumberOfLinesStrippedStreamingManager(int argc, char * argv[])
+int otbNumberOfLinesStrippedStreamingManager(int itkNotUsed(argc), char * argv[])
 {
   std::ofstream outfile(argv[1]);
 
@@ -103,7 +103,7 @@ int otbNumberOfLinesStrippedStreamingManager(int argc, char * argv[])
 }
 
 
-int otbRAMDrivenStrippedStreamingManager(int argc, char * argv[])
+int otbRAMDrivenStrippedStreamingManager(int itkNotUsed(argc), char * argv[])
 {
   std::ofstream outfile(argv[1]);
 
@@ -135,7 +135,7 @@ int otbRAMDrivenStrippedStreamingManager(int argc, char * argv[])
 
 }
 
-int otbTileDimensionTiledStreamingManager(int argc, char * argv[])
+int otbTileDimensionTiledStreamingManager(int itkNotUsed(argc), char * argv[])
 {
   std::ofstream outfile(argv[1]);
 
@@ -166,7 +166,7 @@ int otbTileDimensionTiledStreamingManager(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbRAMDrivenTiledStreamingManager(int argc, char * argv[])
+int otbRAMDrivenTiledStreamingManager(int itkNotUsed(argc), char * argv[])
 {
   std::ofstream outfile(argv[1]);
 
@@ -198,7 +198,7 @@ int otbRAMDrivenTiledStreamingManager(int argc, char * argv[])
 }
 
 
-int otbRAMDrivenAdaptativeStreamingManager(int argc, char * argv[])
+int otbRAMDrivenAdaptativeStreamingManager(int itkNotUsed(argc), char * argv[])
 {
   std::ofstream outfile(argv[1]);
 
diff --git a/Testing/Code/Common/otbSystemTest.cxx b/Testing/Code/Common/otbSystemTest.cxx
index 9a0e4d4..0a7a3f3 100644
--- a/Testing/Code/Common/otbSystemTest.cxx
+++ b/Testing/Code/Common/otbSystemTest.cxx
@@ -23,7 +23,7 @@
 #include "itksys/SystemTools.hxx"
 #include "otbSystem.h"
 
-int otbSystemTest(int argc, char* argv[])
+int otbSystemTest(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFileName  = argv[1];
   const char *       inputDirName   = argv[2];
@@ -56,7 +56,7 @@ int otbSystemTest(int argc, char* argv[])
 }
 
 
-int otbParseHdfSubsetName(int argc, char* argv [])
+int otbParseHdfSubsetName(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   std::string input("");
   std::string key("");
@@ -74,7 +74,7 @@ int otbParseHdfSubsetName(int argc, char* argv [])
   return EXIT_SUCCESS;
 }
 
-int otbParseHdfFileName(int argc, char* argv [])
+int otbParseHdfFileName(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   std::string id("");
   std::string file("");
diff --git a/Testing/Code/Common/otbTestMultiExtractMultiUpdate.cxx b/Testing/Code/Common/otbTestMultiExtractMultiUpdate.cxx
index 7b28eb6..b3b3fec 100644
--- a/Testing/Code/Common/otbTestMultiExtractMultiUpdate.cxx
+++ b/Testing/Code/Common/otbTestMultiExtractMultiUpdate.cxx
@@ -24,7 +24,7 @@
 
 #include "otbSystem.h"
 
-int otbTestMultiExtractMultiUpdate(int argc, char * argv[])
+int otbTestMultiExtractMultiUpdate(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                                                        InternPixelType;
diff --git a/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.cxx b/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.cxx
index 566c105..d03d10f 100644
--- a/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.cxx
+++ b/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.cxx
@@ -40,7 +40,7 @@ public:
 };
 }
 
-int otbUnaryFunctorNeighborhoodImageFilter(int argc, char * argv[])
+int otbUnaryFunctorNeighborhoodImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
diff --git a/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilterNew.cxx b/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilterNew.cxx
index 4018844..1afbae8 100644
--- a/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilterNew.cxx
+++ b/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilterNew.cxx
@@ -37,7 +37,7 @@ public:
 };
 }
 
-int otbUnaryFunctorNeighborhoodImageFilterNew(int argc, char * argv[])
+int otbUnaryFunctorNeighborhoodImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   const int Dimension = 2;
diff --git a/Testing/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.cxx b/Testing/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.cxx
index a86325f..816e01e 100644
--- a/Testing/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.cxx
+++ b/Testing/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.cxx
@@ -63,7 +63,7 @@ private:
 };
 }
 
-int otbUnaryFunctorNeighborhoodWithOffsetImageFilter(int argc, char * argv[])
+int otbUnaryFunctorNeighborhoodWithOffsetImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
@@ -72,10 +72,8 @@ int otbUnaryFunctorNeighborhoodWithOffsetImageFilter(int argc, char * argv[])
   const int Dimension = 2;
   typedef otb::VectorImage<InputPixelType, Dimension>                                               ImageType;
   typedef ImageType::OffsetType                                                                     OffsetType;
-  typedef ImageType::PixelType                                                                      PixelType;
   typedef otb::ImageFileReader<ImageType>                                                           ReaderType;
   typedef otb::ImageFileWriter<ImageType>                                                           WriterType;
-  typedef itk::ConstNeighborhoodIterator<ImageType>                                                 IterType;
   typedef Functor::UnaryFunctorNeighborhoodWithOffseImageFilterTest<InputPixelType, InputPixelType> FunctorType;
   typedef otb::UnaryFunctorNeighborhoodWithOffsetImageFilter<ImageType, ImageType,
       FunctorType>     UnaryFunctorNeighborhoodImageFilterType;
diff --git a/Testing/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilterNew.cxx b/Testing/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilterNew.cxx
index 0bdae26..ed59cde 100644
--- a/Testing/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilterNew.cxx
+++ b/Testing/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilterNew.cxx
@@ -63,15 +63,12 @@ private:
 };
 }
 
-int otbUnaryFunctorNeighborhoodWithOffsetImageFilterNew(int argc, char * argv[])
+int otbUnaryFunctorNeighborhoodWithOffsetImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   const int Dimension = 2;
   typedef otb::VectorImage<InputPixelType,
       Dimension>               ImageType;
-  typedef ImageType::PixelType
-  PixelType;
-  typedef itk::ConstNeighborhoodIterator<ImageType> IterType;
   typedef Functor::UnaryFunctorNeighborhoodWithOffsetImageFilterFunctorNewTest<InputPixelType,
       InputPixelType> FunctorType;
   typedef otb::UnaryFunctorNeighborhoodWithOffsetImageFilter<ImageType, ImageType,
diff --git a/Testing/Code/Common/otbUnaryFunctorWithIndexImageFilter.cxx b/Testing/Code/Common/otbUnaryFunctorWithIndexImageFilter.cxx
index 3347377..71d3759 100644
--- a/Testing/Code/Common/otbUnaryFunctorWithIndexImageFilter.cxx
+++ b/Testing/Code/Common/otbUnaryFunctorWithIndexImageFilter.cxx
@@ -32,14 +32,14 @@ public:
 
   typedef itk::Index<2> IndexType;
 
-  inline TOutput operator ()(const TInput& inPix, IndexType index)
+  inline TOutput operator ()(const TInput& inPix, IndexType itkNotUsed(index))
   {
     return (static_cast<TOutput>(inPix));
   }
 };
 }
 
-int otbUnaryFunctorWithIndexImageFilter(int argc, char * argv[])
+int otbUnaryFunctorWithIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
diff --git a/Testing/Code/Common/otbUnaryFunctorWithIndexImageFilterNew.cxx b/Testing/Code/Common/otbUnaryFunctorWithIndexImageFilterNew.cxx
index 4d5b5a8..6394f9c 100644
--- a/Testing/Code/Common/otbUnaryFunctorWithIndexImageFilterNew.cxx
+++ b/Testing/Code/Common/otbUnaryFunctorWithIndexImageFilterNew.cxx
@@ -30,14 +30,14 @@ public:
 
   typedef itk::Index<2> IndexType;
 
-  inline TOutput operator ()(const TInput& inPix, IndexType index)
+  inline TOutput operator ()(const TInput& inPix, IndexType itkNotUsed(index))
   {
     return (static_cast<TOutput>(inPix));
   }
 };
 }
 
-int otbUnaryFunctorWithIndexImageFilterNew(int argc, char * argv[])
+int otbUnaryFunctorWithIndexImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double                                                                        InputPixelType;
   typedef otb::Image<InputPixelType, 2>                                                 ImageType;
diff --git a/Testing/Code/Common/otbVariableLengthVectorConverter.cxx b/Testing/Code/Common/otbVariableLengthVectorConverter.cxx
index 3bdba69..6e8f6f7 100644
--- a/Testing/Code/Common/otbVariableLengthVectorConverter.cxx
+++ b/Testing/Code/Common/otbVariableLengthVectorConverter.cxx
@@ -21,7 +21,7 @@
 
 #include "otbVariableLengthVectorConverter.h"
 
-int otbVariableLengthVectorConverterNew(int argc, char * argv[])
+int otbVariableLengthVectorConverterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef itk::VariableLengthVector<double>                      InputType0;
   typedef std::vector< std::vector< double > >                   InputType1;
diff --git a/Testing/Code/Common/otbVectorDataExtractROI.cxx b/Testing/Code/Common/otbVectorDataExtractROI.cxx
index cc056ad..f0f7444 100644
--- a/Testing/Code/Common/otbVectorDataExtractROI.cxx
+++ b/Testing/Code/Common/otbVectorDataExtractROI.cxx
@@ -22,7 +22,7 @@
 #include "otbVectorDataFileReader.h"
 #include "otbVectorDataFileWriter.h"
 
-int otbVectorDataExtractROI(int argc, char * argv[])
+int otbVectorDataExtractROI(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/Common/otbVectorDataExtractROINew.cxx b/Testing/Code/Common/otbVectorDataExtractROINew.cxx
index 2410388..0505ed7 100644
--- a/Testing/Code/Common/otbVectorDataExtractROINew.cxx
+++ b/Testing/Code/Common/otbVectorDataExtractROINew.cxx
@@ -18,7 +18,7 @@
 #include "otbVectorData.h"
 #include "otbVectorDataExtractROI.h"
 
-int otbVectorDataExtractROINew(int argc, char * argv[])
+int otbVectorDataExtractROINew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::VectorData<>                         VectorDataType;
   typedef otb::VectorDataExtractROI<VectorDataType> FilterType;
diff --git a/Testing/Code/Common/otbVectorDataNew.cxx b/Testing/Code/Common/otbVectorDataNew.cxx
index 5136bf6..9397478 100644
--- a/Testing/Code/Common/otbVectorDataNew.cxx
+++ b/Testing/Code/Common/otbVectorDataNew.cxx
@@ -20,7 +20,7 @@
 
 #include "otbVectorData.h"
 
-int otbVectorDataNew(int argc, char * argv[])
+int otbVectorDataNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef otb::VectorData<double, 2> VectorDataType;
diff --git a/Testing/Code/Common/otbVectorDataRasterizeFilter.cxx b/Testing/Code/Common/otbVectorDataRasterizeFilter.cxx
index e3de4cb..232aec5 100644
--- a/Testing/Code/Common/otbVectorDataRasterizeFilter.cxx
+++ b/Testing/Code/Common/otbVectorDataRasterizeFilter.cxx
@@ -39,13 +39,13 @@ typedef otb::RasterizeVectorDataFilter<VectorDataType,
                                        ImageType,
                                        ImageType>             RasterizationFilterType;
 
-int otbVectorDataRasterizeFilterNew(int argc, char* argv[])
+int otbVectorDataRasterizeFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   RasterizationFilterType::Pointer  rasterization = RasterizationFilterType::New();
   return EXIT_SUCCESS;
 }
 
-int otbVectorDataRasterizeFilter(int argc, char* argv[])
+int otbVectorDataRasterizeFilter(int itkNotUsed(argc), char * argv[])
 {
 
   ReaderType::Pointer reader = ReaderType::New();
@@ -76,9 +76,6 @@ int otbVectorDataRasterizeFilter(int argc, char* argv[])
   outputcolor[3] = 0.;
   rasterization->AddColor(outputcolor);
 
-  otb::StandardOneLineFilterWatcher * watch = new otb::StandardOneLineFilterWatcher(rasterization.GetPointer(),
-                                                                          "rasterization");
-
   WriterType::Pointer writer  = WriterType::New();
   writer->SetFileName(argv[3]);
   writer->SetInput(rasterization->GetOutput());
diff --git a/Testing/Code/Common/otbVectorDataSourceNew.cxx b/Testing/Code/Common/otbVectorDataSourceNew.cxx
index ad9b4f5..9396641 100644
--- a/Testing/Code/Common/otbVectorDataSourceNew.cxx
+++ b/Testing/Code/Common/otbVectorDataSourceNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorDataSource.h"
 #include "otbVectorData.h"
 
-int otbVectorDataSourceNew(int argc, char * argv[])
+int otbVectorDataSourceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                     InputPixelType;
diff --git a/Testing/Code/Common/otbVectorDataToGISTableFilter.cxx b/Testing/Code/Common/otbVectorDataToGISTableFilter.cxx
index 8a4e361..2e780cb 100644
--- a/Testing/Code/Common/otbVectorDataToGISTableFilter.cxx
+++ b/Testing/Code/Common/otbVectorDataToGISTableFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbPostGISConnectionImplementation.h"
 #include "otbPostGISTable.h"
 
-int otbVectorDataToGISTableFilter(int argc, char * argv[])
+int otbVectorDataToGISTableFilter(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   if (argc != 5)
     {
diff --git a/Testing/Code/Common/otbVectorDataToGISTableFilterNew.cxx b/Testing/Code/Common/otbVectorDataToGISTableFilterNew.cxx
index 52eccd7..435c093 100644
--- a/Testing/Code/Common/otbVectorDataToGISTableFilterNew.cxx
+++ b/Testing/Code/Common/otbVectorDataToGISTableFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbGISTable.h"
 #include "otbVectorData.h"
 
-int otbVectorDataToGISTableFilterNew(int argc, char * argv[])
+int otbVectorDataToGISTableFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
diff --git a/Testing/Code/Common/otbVectorDataToImageFilter.cxx b/Testing/Code/Common/otbVectorDataToImageFilter.cxx
index 100a03e..589d9bc 100644
--- a/Testing/Code/Common/otbVectorDataToImageFilter.cxx
+++ b/Testing/Code/Common/otbVectorDataToImageFilter.cxx
@@ -28,7 +28,7 @@
 #include "otbImage.h"
 #include "otbVectorDataToImageFilter.h"
 
-int otbVectorDataToImageFilter(int argc, char * argv[])
+int otbVectorDataToImageFilter(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   if (argc < 4)
@@ -106,7 +106,7 @@ int otbVectorDataToImageFilter(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbVectorDataToImageFilterBinary(int argc, char * argv[])
+int otbVectorDataToImageFilterBinary(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   if (argc < 3)
diff --git a/Testing/Code/Common/otbVectorDataToLabelImageFilter.cxx b/Testing/Code/Common/otbVectorDataToLabelImageFilter.cxx
index 20d8090..6ad177c 100644
--- a/Testing/Code/Common/otbVectorDataToLabelImageFilter.cxx
+++ b/Testing/Code/Common/otbVectorDataToLabelImageFilter.cxx
@@ -38,13 +38,13 @@ typedef otb::ImageFileWriter<ImageType>              WriterType;
 typedef otb::VectorDataToLabelImageFilter<VectorDataType,
                                           ImageType>          RasterizationFilterType;
 
-int otbVectorDataToLabelImageFilterNew(int argc, char* argv[])
+int otbVectorDataToLabelImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   RasterizationFilterType::Pointer  rasterization = RasterizationFilterType::New();
   return EXIT_SUCCESS;
 }
 
-int otbVectorDataToLabelImageFilter(int argc, char* argv[])
+int otbVectorDataToLabelImageFilter(int itkNotUsed(argc), char * argv[])
 {
 
   ReaderType::Pointer reader = ReaderType::New();
@@ -67,9 +67,6 @@ int otbVectorDataToLabelImageFilter(int argc, char* argv[])
   rasterization->SetOutputParametersFromImage(reader->GetOutput());
   rasterization->SetBurnAttribute("DN");
 
-  otb::StandardOneLineFilterWatcher * watch = new otb::StandardOneLineFilterWatcher(rasterization.GetPointer(),
-                                                                          "rasterization");
-
   WriterType::Pointer writer  = WriterType::New();
   writer->SetFileName(argv[3]);
   writer->SetInput(rasterization->GetOutput());
diff --git a/Testing/Code/Common/otbVectorDataToMapFilter.cxx b/Testing/Code/Common/otbVectorDataToMapFilter.cxx
index d912229..fc441b8 100644
--- a/Testing/Code/Common/otbVectorDataToMapFilter.cxx
+++ b/Testing/Code/Common/otbVectorDataToMapFilter.cxx
@@ -28,7 +28,7 @@
 #include "otbImage.h"
 #include "otbVectorDataToMapFilter.h"
 
-int otbVectorDataToMapFilter(int argc, char * argv[])
+int otbVectorDataToMapFilter(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   if (argc < 4)
@@ -106,7 +106,7 @@ int otbVectorDataToMapFilter(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbVectorDataToMapFilterBinary(int argc, char * argv[])
+int otbVectorDataToMapFilterBinary(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   if (argc < 3)
diff --git a/Testing/Code/Common/otbVectorDataToMapFilterNew.cxx b/Testing/Code/Common/otbVectorDataToMapFilterNew.cxx
index 7cbb4c7..bd34389 100644
--- a/Testing/Code/Common/otbVectorDataToMapFilterNew.cxx
+++ b/Testing/Code/Common/otbVectorDataToMapFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbVectorData.h"
 #include "otbVectorDataToMapFilter.h"
 
-int otbVectorDataToMapFilterNew(int argc, char * argv[])
+int otbVectorDataToMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef otb::VectorData<>             VectorDataType;
diff --git a/Testing/Code/Common/otbVectorDataToMapFilterNoFonts.cxx b/Testing/Code/Common/otbVectorDataToMapFilterNoFonts.cxx
index 93a3445..9985362 100644
--- a/Testing/Code/Common/otbVectorDataToMapFilterNoFonts.cxx
+++ b/Testing/Code/Common/otbVectorDataToMapFilterNoFonts.cxx
@@ -28,7 +28,7 @@
 #include "otbImage.h"
 #include "otbVectorDataToMapFilter.h"
 
-int otbVectorDataToMapFilterNoFonts(int argc, char * argv[])
+int otbVectorDataToMapFilterNoFonts(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   if (argc < 3)
diff --git a/Testing/Code/Common/otbVectorDataToMapFilterSensorModel.cxx b/Testing/Code/Common/otbVectorDataToMapFilterSensorModel.cxx
index 327e95a..714d2c7 100644
--- a/Testing/Code/Common/otbVectorDataToMapFilterSensorModel.cxx
+++ b/Testing/Code/Common/otbVectorDataToMapFilterSensorModel.cxx
@@ -29,7 +29,7 @@
 #include "otbImageFileReader.h"
 #include "otbVectorDataToMapFilter.h"
 
-int otbVectorDataToMapFilterSensorModel(int argc, char * argv[])
+int otbVectorDataToMapFilterSensorModel(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   if (argc < 5)
diff --git a/Testing/Code/Common/otbVectorDataToMapFilterWorld.cxx b/Testing/Code/Common/otbVectorDataToMapFilterWorld.cxx
index 0fb87b2..f39a86e 100644
--- a/Testing/Code/Common/otbVectorDataToMapFilterWorld.cxx
+++ b/Testing/Code/Common/otbVectorDataToMapFilterWorld.cxx
@@ -28,7 +28,7 @@
 #include "otbImage.h"
 #include "otbVectorDataToMapFilter.h"
 
-int otbVectorDataToMapFilterWorld(int argc, char * argv[])
+int otbVectorDataToMapFilterWorld(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   if (argc < 11)
diff --git a/Testing/Code/Common/otbVectorDataToVectorDataFilterNew.cxx b/Testing/Code/Common/otbVectorDataToVectorDataFilterNew.cxx
index a8d417e..54ba491 100644
--- a/Testing/Code/Common/otbVectorDataToVectorDataFilterNew.cxx
+++ b/Testing/Code/Common/otbVectorDataToVectorDataFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorDataToVectorDataFilter.h"
 #include "otbVectorData.h"
 
-int otbVectorDataToVectorDataFilterNew(int argc, char * argv[])
+int otbVectorDataToVectorDataFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef otb::VectorData<double>           InputVectorDataType;
diff --git a/Testing/Code/Common/otbVectorImageToASImageAdaptorNew.cxx b/Testing/Code/Common/otbVectorImageToASImageAdaptorNew.cxx
index 3f631d3..ed1c968 100644
--- a/Testing/Code/Common/otbVectorImageToASImageAdaptorNew.cxx
+++ b/Testing/Code/Common/otbVectorImageToASImageAdaptorNew.cxx
@@ -21,7 +21,7 @@
 #include "otbVectorImageToASImageAdaptor.h"
 #include "otbVectorImage.h"
 
-int otbVectorImageToASImageAdaptorNew(int argc, char * argv[])
+int otbVectorImageToASImageAdaptorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::VectorImage<double, 2>                 ImageType;
   typedef otb::VectorImageToASImageAdaptor<ImageType> FilterType;
diff --git a/Testing/Code/DisparityMap/CMakeLists.txt b/Testing/Code/DisparityMap/CMakeLists.txt
index 306c72a..93109be 100644
--- a/Testing/Code/DisparityMap/CMakeLists.txt
+++ b/Testing/Code/DisparityMap/CMakeLists.txt
@@ -695,8 +695,8 @@ add_test(dmTvMulti3DMapToDEMFilterStadiumMeanEPSGWGS84 ${DISPARITYMAP_TESTS4}
 		 1
 		 0
 		 0
-		 1.432817727834504
-		 43.584395676937191
+		 1.43283322941157
+		 43.5843844479961
 		 103
 		 107
 		 0.000031003154124
diff --git a/Testing/Code/DisparityMap/otbAdhesionCorrectionFilter.cxx b/Testing/Code/DisparityMap/otbAdhesionCorrectionFilter.cxx
index f87452f..8260ab5 100644
--- a/Testing/Code/DisparityMap/otbAdhesionCorrectionFilter.cxx
+++ b/Testing/Code/DisparityMap/otbAdhesionCorrectionFilter.cxx
@@ -36,7 +36,7 @@ typedef otb::ImageFileWriter<MaskType>                       MaskWriterType;
 
 typedef otb::AdhesionCorrectionFilter<ImageType, MaskType> AdhesionCorrectionFilterType;
 
-int otbAdhesionCorrectionFilterNew(int argc, char* argv[])
+int otbAdhesionCorrectionFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   // Instantiation
@@ -131,5 +131,3 @@ int otbAdhesionCorrectionFilter(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGenerator.cxx b/Testing/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGenerator.cxx
index 2e658ed..75dd8a8 100644
--- a/Testing/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGenerator.cxx
+++ b/Testing/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGenerator.cxx
@@ -21,7 +21,7 @@
 #include "otbBSplinesInterpolateDisplacementFieldGenerator.h"
 #include "otbImageFileWriter.h"
 
-int otbBSplinesInterpolateDisplacementFieldGenerator(int argc, char * argv[])
+int otbBSplinesInterpolateDisplacementFieldGenerator(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   const char *       outfname = argv[1];
diff --git a/Testing/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGeneratorNew.cxx b/Testing/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGeneratorNew.cxx
index 021356b..880ff3d 100644
--- a/Testing/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGeneratorNew.cxx
+++ b/Testing/Code/DisparityMap/otbBSplinesInterpolateDisplacementFieldGeneratorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbBSplinesInterpolateDisplacementFieldGenerator.h"
 
-int otbBSplinesInterpolateDisplacementFieldGeneratorNew(int argc, char * argv[])
+int otbBSplinesInterpolateDisplacementFieldGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                     PixelType;
diff --git a/Testing/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGenerator.cxx b/Testing/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGenerator.cxx
index cf8d3a0..783d176 100644
--- a/Testing/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGenerator.cxx
+++ b/Testing/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGenerator.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileWriter.h"
 #include "itkEuler2DTransform.h"
 
-int otbBSplinesInterpolateTransformDisplacementFieldGenerator(int argc, char * argv[])
+int otbBSplinesInterpolateTransformDisplacementFieldGenerator(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   const char *       outfname = argv[1];
diff --git a/Testing/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGeneratorNew.cxx b/Testing/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGeneratorNew.cxx
index 5d639c6..40a19ac 100644
--- a/Testing/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGeneratorNew.cxx
+++ b/Testing/Code/DisparityMap/otbBSplinesInterpolateTransformDisplacementFieldGeneratorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbBSplinesInterpolateTransformDisplacementFieldGenerator.h"
 
-int otbBSplinesInterpolateTransformDisplacementFieldGeneratorNew(int argc, char * argv[])
+int otbBSplinesInterpolateTransformDisplacementFieldGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                              PixelType;
diff --git a/Testing/Code/DisparityMap/otbBijectionCoherencyFilter.cxx b/Testing/Code/DisparityMap/otbBijectionCoherencyFilter.cxx
index 3810946..dec4bad 100644
--- a/Testing/Code/DisparityMap/otbBijectionCoherencyFilter.cxx
+++ b/Testing/Code/DisparityMap/otbBijectionCoherencyFilter.cxx
@@ -32,7 +32,7 @@ typedef otb::BijectionCoherencyFilter
     FloatImageType>                             BijectionFilterType;
 
 
-int otbBijectionCoherencyFilterNew(int argc, char* argv[])
+int otbBijectionCoherencyFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Instantiation
   BijectionFilterType::Pointer bijectFilter = BijectionFilterType::New();
@@ -42,7 +42,6 @@ int otbBijectionCoherencyFilterNew(int argc, char* argv[])
 
 int otbBijectionCoherencyFilter(int argc, char* argv[])
 {
-  typedef otb::ImageFileReader<FloatImageType>    ReaderType;
 
   typedef otb::ImageFileReader
     <FloatVectorImageType>                        ReaderVectorType;
diff --git a/Testing/Code/DisparityMap/otbDisparityMapEstimationMethod.cxx b/Testing/Code/DisparityMap/otbDisparityMapEstimationMethod.cxx
index 856869a..88a8d06 100644
--- a/Testing/Code/DisparityMap/otbDisparityMapEstimationMethod.cxx
+++ b/Testing/Code/DisparityMap/otbDisparityMapEstimationMethod.cxx
@@ -25,7 +25,7 @@
 #include "otbThresholdImageToPointSetFilter.h"
 #include "itkMinimumMaximumImageCalculator.h"
 
-int otbDisparityMapEstimationMethod(int argc, char* argv[])
+int otbDisparityMapEstimationMethod(int itkNotUsed(argc), char* argv[])
 {
   const char*        fixedFileName = argv[1];
   const char*        movingFileName = argv[2];
@@ -48,9 +48,7 @@ int otbDisparityMapEstimationMethod(int argc, char* argv[])
   typedef otb::ImageFileReader<ImageType>                                       ReaderType;
   typedef otb::ThresholdImageToPointSetFilter<ImageType, PointSetType>          PointSetSourceType;
   typedef PointSetType::PointsContainer::Iterator                               PointSetIteratorType;
-  typedef PointSetType::PointsContainer                                         PointsContainerType;
   typedef PointSetType::PointDataContainer::Iterator                            PointDataIteratorType;
-  typedef PointSetType::PointDataContainer                                      PointDataContainerType;
 
   //Input images reading
   ReaderType::Pointer fixedReader = ReaderType::New();
diff --git a/Testing/Code/DisparityMap/otbDisparityMapEstimationMethodNew.cxx b/Testing/Code/DisparityMap/otbDisparityMapEstimationMethodNew.cxx
index 217e93b..a05063a 100644
--- a/Testing/Code/DisparityMap/otbDisparityMapEstimationMethodNew.cxx
+++ b/Testing/Code/DisparityMap/otbDisparityMapEstimationMethodNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImage.h"
 #include "itkTranslationTransform.h"
 
-int otbDisparityMapEstimationMethodNew(int argc, char* argv[])
+int otbDisparityMapEstimationMethodNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                                         PixelType;
diff --git a/Testing/Code/DisparityMap/otbDisparityMapMedianFilter.cxx b/Testing/Code/DisparityMap/otbDisparityMapMedianFilter.cxx
index 7815127..30038b0 100644
--- a/Testing/Code/DisparityMap/otbDisparityMapMedianFilter.cxx
+++ b/Testing/Code/DisparityMap/otbDisparityMapMedianFilter.cxx
@@ -30,7 +30,7 @@
  typedef otb::DisparityMapMedianFilter<FloatImageType,FloatImageType,FloatImageType>   DisparityMapMedianFilterType;
 
 
-int otbDisparityMapMedianFilterNew(int argc, char* argv[])
+int otbDisparityMapMedianFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
    // Instantiation
   DisparityMapMedianFilterType::Pointer filter = DisparityMapMedianFilterType::New();
diff --git a/Testing/Code/DisparityMap/otbDisparityMapTo3DFilter.cxx b/Testing/Code/DisparityMap/otbDisparityMapTo3DFilter.cxx
index 3d5aff9..e77cb57 100644
--- a/Testing/Code/DisparityMap/otbDisparityMapTo3DFilter.cxx
+++ b/Testing/Code/DisparityMap/otbDisparityMapTo3DFilter.cxx
@@ -33,8 +33,7 @@ typedef otb::DisparityMapTo3DFilter
     FloatVectorImageType,
     FloatImageType>                              StereoFilterType;
 
-
-int otbDisparityMapTo3DFilterNew(int argc, char* argv[])
+int otbDisparityMapTo3DFilterNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   // Instantiation
   StereoFilterType::Pointer filter = StereoFilterType::New();
@@ -111,6 +110,3 @@ int otbDisparityMapTo3DFilter(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
-
-
diff --git a/Testing/Code/DisparityMap/otbDisparityMapToDEMFilter.cxx b/Testing/Code/DisparityMap/otbDisparityMapToDEMFilter.cxx
index d4ec8eb..efcec0b 100644
--- a/Testing/Code/DisparityMap/otbDisparityMapToDEMFilter.cxx
+++ b/Testing/Code/DisparityMap/otbDisparityMapToDEMFilter.cxx
@@ -46,7 +46,7 @@
 
   typedef otb::DisparityMapToDEMFilter <FloatImageType, FloatVectorImageType>      DisparityToElevationFilterType;
 
-int otbDisparityMapToDEMFilterNew(int argc, char* argv[])
+int otbDisparityMapToDEMFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   // Instantiation
@@ -115,5 +115,3 @@ int otbDisparityMapToDEMFilter(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/DisparityMap/otbDisparityTranslateFilter.cxx b/Testing/Code/DisparityMap/otbDisparityTranslateFilter.cxx
index b9f8ce5..222e30f 100644
--- a/Testing/Code/DisparityMap/otbDisparityTranslateFilter.cxx
+++ b/Testing/Code/DisparityMap/otbDisparityTranslateFilter.cxx
@@ -55,7 +55,7 @@ typedef otb::DisparityTranslateFilter
     FloatImageType>                              TranslateFilter;
 
 
-int otbDisparityTranslateFilterNew(int argc, char* argv[])
+int otbDisparityTranslateFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Instantiation
   TranslateFilter::Pointer filter = TranslateFilter::New();
diff --git a/Testing/Code/DisparityMap/otbFineRegistrationImageFilterNew.cxx b/Testing/Code/DisparityMap/otbFineRegistrationImageFilterNew.cxx
index 022649e..f188dc6 100644
--- a/Testing/Code/DisparityMap/otbFineRegistrationImageFilterNew.cxx
+++ b/Testing/Code/DisparityMap/otbFineRegistrationImageFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbFineRegistrationImageFilter.h"
 
 
-int otbFineRegistrationImageFilterNew( int argc, char * argv[] )
+int otbFineRegistrationImageFilterNew( int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double      PixelType;
   const unsigned int  Dimension = 2;
diff --git a/Testing/Code/DisparityMap/otbMulti3DMapToDEMFilter.cxx b/Testing/Code/DisparityMap/otbMulti3DMapToDEMFilter.cxx
index f1933dd..30c169f 100644
--- a/Testing/Code/DisparityMap/otbMulti3DMapToDEMFilter.cxx
+++ b/Testing/Code/DisparityMap/otbMulti3DMapToDEMFilter.cxx
@@ -36,7 +36,7 @@ typedef otb::Multi3DMapToDEMFilter
     ImageType>                              Multi3DFilterType;
 
 
-int otbMulti3DMapToDEMFilterNew(int argc, char* argv[])
+int otbMulti3DMapToDEMFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Instantiation
   Multi3DFilterType::Pointer multiFilter = Multi3DFilterType::New();
@@ -52,17 +52,8 @@ int otbMulti3DMapToDEMFilterEPSG(int argc, char* argv[])
 
   typedef otb::ImageFileReader
     <VectorImageType>                        ReaderVectorType;
-
-
   typedef otb::ImageFileWriter
     <ImageType>                              WriterType;
-
-  typedef otb::ImageList<ImageType>          ImageListType;
-
-  typedef otb::VectorImageToImageListFilter
-    <VectorImageType,
-     ImageListType>                               VectorToListFilterType;
-
   typedef otb::ObjectList<ReaderType>            MaskReaderListType;
   typedef otb::ObjectList<ReaderVectorType>      MapReaderListType;
 
@@ -319,12 +310,6 @@ typedef otb::ImageFileReader
 typedef otb::ImageFileWriter
   <ImageType>                              WriterType;
 
-typedef otb::ImageList<ImageType>          ImageListType;
-
-typedef otb::VectorImageToImageListFilter
-  <VectorImageType,
-   ImageListType>                               VectorToListFilterType;
-
 typedef otb::ObjectList<ReaderType>            MaskReaderListType;
 typedef otb::ObjectList<ReaderVectorType>      MapReaderListType;
 
@@ -499,21 +484,11 @@ int otbMulti3DMapToDEMFilter(int argc, char* argv[])
 
   typedef otb::ImageFileReader
     <VectorImageType>                        ReaderVectorType;
-
-
   typedef otb::ImageFileWriter
     <ImageType>                              WriterType;
-
-  typedef otb::ImageList<ImageType>          ImageListType;
-
-  typedef otb::VectorImageToImageListFilter
-    <VectorImageType,
-     ImageListType>                               VectorToListFilterType;
-
   typedef otb::ObjectList<ReaderType>            MaskReaderListType;
   typedef otb::ObjectList<ReaderVectorType>      MapReaderListType;
 
-
   if ((argc-6)%2 !=0)
     {
     std::cout << "Usage: "<<argv[0]<<" 3DMapImage1 .mask1... 3DMapImageN maskN  DEMoutput DEMGridStep FusionMode ThreadNb StreamNb" << std::endl;
diff --git a/Testing/Code/DisparityMap/otbMultiDisparityMapTo3DFilter.cxx b/Testing/Code/DisparityMap/otbMultiDisparityMapTo3DFilter.cxx
index 2f677e6..49a7bc3 100644
--- a/Testing/Code/DisparityMap/otbMultiDisparityMapTo3DFilter.cxx
+++ b/Testing/Code/DisparityMap/otbMultiDisparityMapTo3DFilter.cxx
@@ -33,7 +33,7 @@ typedef otb::MultiDisparityMapTo3DFilter
     FloatImageType>                              Multi3DFilterType;
 
 
-int otbMultiDisparityMapTo3DFilterNew(int argc, char* argv[])
+int otbMultiDisparityMapTo3DFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Instantiation
   Multi3DFilterType::Pointer multiFilter = Multi3DFilterType::New();
diff --git a/Testing/Code/DisparityMap/otbNCCRegistrationFilter.cxx b/Testing/Code/DisparityMap/otbNCCRegistrationFilter.cxx
index e34af9d..4b3f44a 100644
--- a/Testing/Code/DisparityMap/otbNCCRegistrationFilter.cxx
+++ b/Testing/Code/DisparityMap/otbNCCRegistrationFilter.cxx
@@ -38,9 +38,6 @@ int otbNCCRegistrationFilter(int argc, char* argv[])
 
   typedef double                                      PixelType;
   typedef itk::Vector<double, ImageDimension>         DisplacementPixelType;
-  typedef double                                      CoordinateRepresentationType;
-  typedef double                                      OutputPixelType;
-  typedef otb::Image<OutputPixelType, ImageDimension> OutputImageType;
   typedef otb::Image<PixelType, ImageDimension>       MovingImageType;
   typedef otb::Image<PixelType, ImageDimension>       FixedImageType;
   typedef otb::Image<DisplacementPixelType,
diff --git a/Testing/Code/DisparityMap/otbNCCRegistrationFilterNew.cxx b/Testing/Code/DisparityMap/otbNCCRegistrationFilterNew.cxx
index aa72231..d4cbdd0 100644
--- a/Testing/Code/DisparityMap/otbNCCRegistrationFilterNew.cxx
+++ b/Testing/Code/DisparityMap/otbNCCRegistrationFilterNew.cxx
@@ -18,15 +18,13 @@
 #include "otbNCCRegistrationFilter.h"
 #include "otbImage.h"
 
-int otbNCCRegistrationFilterNew(int argc, char* argv[])
+int otbNCCRegistrationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int ImageDimension = 2;
 
   typedef double                              PixelType;
   typedef itk::Vector<double, ImageDimension> DisplacementPixelType;
 
-  typedef double CoordinateRepresentationType;
-
   //Allocate Images
   typedef otb::Image<PixelType, ImageDimension> MovingImageType;
   typedef otb::Image<PixelType, ImageDimension> FixedImageType;
diff --git a/Testing/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGenerator.cxx b/Testing/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGenerator.cxx
index 50765f8..fad75e2 100644
--- a/Testing/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGenerator.cxx
+++ b/Testing/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGenerator.cxx
@@ -21,7 +21,7 @@
 #include "otbNNearestPointsLinearInterpolateDisplacementFieldGenerator.h"
 #include "otbImageFileWriter.h"
 
-int otbNNearestPointsLinearInterpolateDisplacementFieldGenerator(int argc, char * argv[])
+int otbNNearestPointsLinearInterpolateDisplacementFieldGenerator(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   const char *       outfname = argv[1];
diff --git a/Testing/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGeneratorNew.cxx b/Testing/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGeneratorNew.cxx
index 51238c2..b3550f5 100644
--- a/Testing/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGeneratorNew.cxx
+++ b/Testing/Code/DisparityMap/otbNNearestPointsLinearInterpolateDisplacementFieldGeneratorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbNNearestPointsLinearInterpolateDisplacementFieldGenerator.h"
 
-int otbNNearestPointsLinearInterpolateDisplacementFieldGeneratorNew(int argc, char * argv[])
+int otbNNearestPointsLinearInterpolateDisplacementFieldGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                                 PixelType;
diff --git a/Testing/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGenerator.cxx b/Testing/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGenerator.cxx
index f121fdd..783944e 100644
--- a/Testing/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGenerator.cxx
+++ b/Testing/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGenerator.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileWriter.h"
 #include "itkEuler2DTransform.h"
 
-int otbNNearestTransformsLinearInterpolateDisplacementFieldGenerator(int argc, char * argv[])
+int otbNNearestTransformsLinearInterpolateDisplacementFieldGenerator(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   const char *       outfname = argv[1];
diff --git a/Testing/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGeneratorNew.cxx b/Testing/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGeneratorNew.cxx
index c5dcc2d..6cf906d 100644
--- a/Testing/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGeneratorNew.cxx
+++ b/Testing/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDisplacementFieldGeneratorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbNNearestTransformsLinearInterpolateDisplacementFieldGenerator.h"
 
-int otbNNearestTransformsLinearInterpolateDisplacementFieldGeneratorNew(int argc, char * argv[])
+int otbNNearestTransformsLinearInterpolateDisplacementFieldGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                                     PixelType;
diff --git a/Testing/Code/DisparityMap/otbNearestPointDisplacementFieldGenerator.cxx b/Testing/Code/DisparityMap/otbNearestPointDisplacementFieldGenerator.cxx
index 05c7333..aa56d4f 100644
--- a/Testing/Code/DisparityMap/otbNearestPointDisplacementFieldGenerator.cxx
+++ b/Testing/Code/DisparityMap/otbNearestPointDisplacementFieldGenerator.cxx
@@ -21,7 +21,7 @@
 #include "otbNearestPointDisplacementFieldGenerator.h"
 #include "otbImageFileWriter.h"
 
-int otbNearestPointDisplacementFieldGenerator(int argc, char * argv[])
+int otbNearestPointDisplacementFieldGenerator(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   const char *       outfname = argv[1];
diff --git a/Testing/Code/DisparityMap/otbNearestPointDisplacementFieldGeneratorNew.cxx b/Testing/Code/DisparityMap/otbNearestPointDisplacementFieldGeneratorNew.cxx
index 136c6d8..a638815 100644
--- a/Testing/Code/DisparityMap/otbNearestPointDisplacementFieldGeneratorNew.cxx
+++ b/Testing/Code/DisparityMap/otbNearestPointDisplacementFieldGeneratorNew.cxx
@@ -20,14 +20,15 @@
 #include "otbVectorImage.h"
 #include "otbNearestPointDisplacementFieldGenerator.h"
 
-int otbNearestPointDisplacementFieldGeneratorNew(int argc, char * argv[])
+int otbNearestPointDisplacementFieldGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
-  typedef double                                                              PixelType;
-  typedef otb::VectorImage<PixelType, Dimension>                              ImageType;
-  typedef ImageType::PointType                                                PointType;
-  typedef itk::PointSet<PointType, Dimension>                                 PointSetType;
-  typedef otb::NearestPointDisplacementFieldGenerator<PointSetType, ImageType> FilterType;
+  typedef double                                           PixelType;
+  typedef otb::VectorImage<PixelType, Dimension>           ImageType;
+  typedef itk::FixedArray<double,3>                        PointDataType;
+  typedef itk::PointSet<PointDataType, Dimension>          PointSetType;
+  typedef otb::NearestPointDisplacementFieldGenerator
+    <PointSetType, ImageType>                              FilterType;
 
   // Instantiating object
   FilterType::Pointer filter = FilterType::New();
diff --git a/Testing/Code/DisparityMap/otbNearestTransformDisplacementFieldGenerator.cxx b/Testing/Code/DisparityMap/otbNearestTransformDisplacementFieldGenerator.cxx
index 6967745..4737232 100644
--- a/Testing/Code/DisparityMap/otbNearestTransformDisplacementFieldGenerator.cxx
+++ b/Testing/Code/DisparityMap/otbNearestTransformDisplacementFieldGenerator.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileWriter.h"
 #include "itkEuler2DTransform.h"
 
-int otbNearestTransformDisplacementFieldGenerator(int argc, char * argv[])
+int otbNearestTransformDisplacementFieldGenerator(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   const char *       outfname = argv[1];
diff --git a/Testing/Code/DisparityMap/otbNearestTransformDisplacementFieldGeneratorNew.cxx b/Testing/Code/DisparityMap/otbNearestTransformDisplacementFieldGeneratorNew.cxx
index fbcbea3..eb44c3c 100644
--- a/Testing/Code/DisparityMap/otbNearestTransformDisplacementFieldGeneratorNew.cxx
+++ b/Testing/Code/DisparityMap/otbNearestTransformDisplacementFieldGeneratorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbNearestTransformDisplacementFieldGenerator.h"
 
-int otbNearestTransformDisplacementFieldGeneratorNew(int argc, char * argv[])
+int otbNearestTransformDisplacementFieldGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                  PixelType;
diff --git a/Testing/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.cxx b/Testing/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.cxx
index 5ac3b06..2da113a 100644
--- a/Testing/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.cxx
+++ b/Testing/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.cxx
@@ -33,7 +33,7 @@ typedef otb::Functor::NCCBlockMatching<ImageType,FloatImageType> NCCBlockMatchin
 
 typedef otb::PixelWiseBlockMatchingImageFilter<ImageType,FloatImageType,FloatImageType,ImageType, NCCBlockMatchingFunctorType> PixelWiseNCCBlockMatchingImageFilterType;
 
-int otbPixelWiseBlockMatchingImageFilterNew(int argc, char * argv[])
+int otbPixelWiseBlockMatchingImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Instanciation
   PixelWiseBlockMatchingImageFilterType::Pointer bmFilter = PixelWiseBlockMatchingImageFilterType::New();
@@ -79,11 +79,9 @@ int otbPixelWiseBlockMatchingImageFilter(int argc, char * argv[])
 
   metricWriter->Update();
 
-
   return EXIT_SUCCESS;
 }
 
-
 int otbPixelWiseBlockMatchingImageFilterNCC(int argc, char * argv[])
 {
   ReaderType::Pointer leftReader = ReaderType::New();
diff --git a/Testing/Code/DisparityMap/otbPointSetToDisplacementFieldGeneratorNew.cxx b/Testing/Code/DisparityMap/otbPointSetToDisplacementFieldGeneratorNew.cxx
index c790927..4873e2d 100644
--- a/Testing/Code/DisparityMap/otbPointSetToDisplacementFieldGeneratorNew.cxx
+++ b/Testing/Code/DisparityMap/otbPointSetToDisplacementFieldGeneratorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbPointSetToDisplacementFieldGenerator.h"
 
-int otbPointSetToDisplacementFieldGeneratorNew(int argc, char * argv[])
+int otbPointSetToDisplacementFieldGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                            PixelType;
diff --git a/Testing/Code/DisparityMap/otbPointSetWithTransformToDisplacementFieldGeneratorNew.cxx b/Testing/Code/DisparityMap/otbPointSetWithTransformToDisplacementFieldGeneratorNew.cxx
index 3537a00..f89cbec 100644
--- a/Testing/Code/DisparityMap/otbPointSetWithTransformToDisplacementFieldGeneratorNew.cxx
+++ b/Testing/Code/DisparityMap/otbPointSetWithTransformToDisplacementFieldGeneratorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbPointSetWithTransformToDisplacementFieldGenerator.h"
 
-int otbPointSetWithTransformToDisplacementFieldGeneratorNew(int argc, char * argv[])
+int otbPointSetWithTransformToDisplacementFieldGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                         PixelType;
diff --git a/Testing/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.cxx b/Testing/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.cxx
index c9f554c..0be1215 100644
--- a/Testing/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.cxx
+++ b/Testing/Code/DisparityMap/otbStereoSensorModelToElevationMapFilter.cxx
@@ -43,7 +43,7 @@ typedef itk::MedianImageFilter<HeightImageType, HeightImageType> MedianFilterTyp
 typedef otb::ImageFileWriter<HeightImageType> WriterType;
 
 
-int otbStereoSensorModelToElevationMapFilterNew( int argc, char * argv[] )
+int otbStereoSensorModelToElevationMapFilterNew( int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Instantiation
   StereoFilterType::Pointer stereoFilter = StereoFilterType::New();
@@ -53,7 +53,7 @@ int otbStereoSensorModelToElevationMapFilterNew( int argc, char * argv[] )
 }
 
 
-int otbStereoSensorModelToElevationMapFilter( int argc, char * argv[] )
+int otbStereoSensorModelToElevationMapFilter( int itkNotUsed(argc), char * argv[] )
 {
   ReaderType::Pointer masterReader = ReaderType::New();
   masterReader->SetFileName(argv[1]);
diff --git a/Testing/Code/DisparityMap/otbStereorectificationDisplacementFieldSource.cxx b/Testing/Code/DisparityMap/otbStereorectificationDisplacementFieldSource.cxx
index e4a6606..2b59928 100644
--- a/Testing/Code/DisparityMap/otbStereorectificationDisplacementFieldSource.cxx
+++ b/Testing/Code/DisparityMap/otbStereorectificationDisplacementFieldSource.cxx
@@ -29,7 +29,7 @@ typedef otb::StereorectificationDisplacementFieldSource
 typedef otb::ImageFileReader<ImageType>                     ReaderType;
 typedef otb::ImageFileWriter<DisplacementFieldType> WriterType;
 
-int otbStereorectificationDisplacementFieldSourceNew(int argc, char * argv[])
+int otbStereorectificationDisplacementFieldSourceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Instantiation
   DisplacementFieldSourceType::Pointer dfSource = DisplacementFieldSourceType::New();
@@ -37,7 +37,7 @@ int otbStereorectificationDisplacementFieldSourceNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbStereorectificationDisplacementFieldSource(int argc, char * argv[])
+int otbStereorectificationDisplacementFieldSource(int itkNotUsed(argc), char * argv[])
 {
   char * infname1  = argv[1];
   char * infname2  = argv[2];
diff --git a/Testing/Code/DisparityMap/otbStreamingWarpImageFilterNew.cxx b/Testing/Code/DisparityMap/otbStreamingWarpImageFilterNew.cxx
index 7e50933..a3a51ef 100644
--- a/Testing/Code/DisparityMap/otbStreamingWarpImageFilterNew.cxx
+++ b/Testing/Code/DisparityMap/otbStreamingWarpImageFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "itkVector.h"
 #include "otbStreamingWarpImageFilter.h"
 
-int otbStreamingWarpImageFilterNew(int argc, char* argv[])
+int otbStreamingWarpImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Images definition
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/DisparityMap/otbSubPixelDisparityImageFilter.cxx b/Testing/Code/DisparityMap/otbSubPixelDisparityImageFilter.cxx
index 17e2646..ce5a5e2 100644
--- a/Testing/Code/DisparityMap/otbSubPixelDisparityImageFilter.cxx
+++ b/Testing/Code/DisparityMap/otbSubPixelDisparityImageFilter.cxx
@@ -56,7 +56,7 @@
   typedef otb::ImageFileReader<FloatImageType>               ReaderType;
   typedef otb::ImageFileWriter<FloatImageType>      WriterType;
 
-int otbSubPixelDisparityImageFilterNew(int argc, char* argv[])
+int otbSubPixelDisparityImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   // Instantiation
@@ -201,12 +201,3 @@ int otbSubPixelDisparityImageFilter(int argc, char* argv[])
 
   return EXIT_FAILURE;
 }
-
-
-
-
-
-
-
-
-
diff --git a/Testing/Code/FeatureExtraction/CMakeLists.txt b/Testing/Code/FeatureExtraction/CMakeLists.txt
index 27e0176..c73684c 100644
--- a/Testing/Code/FeatureExtraction/CMakeLists.txt
+++ b/Testing/Code/FeatureExtraction/CMakeLists.txt
@@ -675,7 +675,7 @@ add_test(feTvVectorizationPathListFilterAsciiOutput ${FEATUREEXTRACTION_TESTS7}
        ${INPUTDATA}/InputForRoadDetection_NonMaxRem.hdr
        ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
        ${TEMP}/feTvVectorizationPathListOutput.txt
-       ${TEMP}/feTvVectorizationPathListOutput.png
+       ${TEMP}/feTvVectorizationPathListOutputIgnored.png
        0.0005
         )
 
@@ -686,7 +686,7 @@ add_test(feTvVectorizationPathListFilterImageOutput ${FEATUREEXTRACTION_TESTS7}
         otbVectorizationPathListFilter
        ${INPUTDATA}/InputForRoadDetection_NonMaxRem.hdr
        ${INPUTDATA}/InputForRoadDetectionScalarProductDir.hdr
-       ${TEMP}/feTvVectorizationPathListOutput.txt
+       ${TEMP}/feTvVectorizationPathListOutputIgnored.txt
        ${TEMP}/feTvVectorizationPathListOutput.png
        0.0001
         )
@@ -1324,7 +1324,7 @@ add_test(feTuScalarImageToTexturesFilterNew ${FEATUREEXTRACTION_TESTS15}
 )
 
 add_test(feTvScalarImageToTexturesFilter ${FEATUREEXTRACTION_TESTS15}
-        --compare-n-images ${NOTOL} 8
+        --compare-n-images ${EPSILON_10} 8
             ${BASELINE}/feTvScalarImageToTexturesFilterOutputEnergy.tif
             ${TEMP}/feTvScalarImageToTexturesFilterOutputEnergy.tif
             ${BASELINE}/feTvScalarImageToTexturesFilterOutputEntropy.tif
@@ -1346,6 +1346,14 @@ add_test(feTvScalarImageToTexturesFilter ${FEATUREEXTRACTION_TESTS15}
             ${TEMP}/feTvScalarImageToTexturesFilterOutput
             8 3 2 2)
 
+add_test(feTuGreyLevelCooccurrenceIndexedListNew ${FEATUREEXTRACTION_TESTS15}
+         otbGreyLevelCooccurrenceIndexedListNew
+)
+
+add_test(feTvGreyLevelCooccurrenceIndexedList ${FEATUREEXTRACTION_TESTS15}
+         otbGreyLevelCooccurrenceIndexedList
+)
+
 add_test(feTuotbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculatorNew ${FEATUREEXTRACTION_TESTS15}
          otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculatorNew
 )
@@ -1359,11 +1367,13 @@ add_test(feTuScalarImageToAdvancedTexturesFilterNew ${FEATUREEXTRACTION_TESTS15}
 )
 
 add_test(feTvScalarImageToAdvancedTexturesFilter ${FEATUREEXTRACTION_TESTS15}
-        --compare-n-images ${NOTOL} 9
+        --compare-n-images ${NOTOL} 10
             ${BASELINE}/feTvScalarImageToAdvancedTexturesFilterOutputVariance.tif
             ${TEMP}/feTvScalarImageToAdvancedTexturesFilterOutputVariance.tif
             ${BASELINE}/feTvScalarImageToAdvancedTexturesFilterOutputMean.tif
             ${TEMP}/feTvScalarImageToAdvancedTexturesFilterOutputMean.tif
+            ${BASELINE}/feTvScalarImageToAdvancedTexturesFilterOutputDissimilarity.tif
+            ${TEMP}/feTvScalarImageToAdvancedTexturesFilterOutputDissimilarity.tif
             ${BASELINE}/feTvScalarImageToAdvancedTexturesFilterOutputSumAverage.tif
             ${TEMP}/feTvScalarImageToAdvancedTexturesFilterOutputSumAverage.tif
             ${BASELINE}/feTvScalarImageToAdvancedTexturesFilterOutputSumVariance.tif
@@ -1707,6 +1717,8 @@ otbStreamingLineSegmentDetector.cxx
 otbSqrtSpectralAngleImageFilter.cxx
 otbScalarImageToTexturesFilterNew.cxx
 otbScalarImageToTexturesFilter.cxx
+otbGreyLevelCooccurrenceIndexedListNew.cxx
+otbGreyLevelCooccurrenceIndexedList.cxx
 otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculatorNew.cxx
 otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.cxx
 otbScalarImageToAdvancedTexturesFilterNew.cxx
diff --git a/Testing/Code/FeatureExtraction/otbAddCarvingPathFilterNew.cxx b/Testing/Code/FeatureExtraction/otbAddCarvingPathFilterNew.cxx
index 6e61750..67fd028 100644
--- a/Testing/Code/FeatureExtraction/otbAddCarvingPathFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbAddCarvingPathFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbAddCarvingPathFilter.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbAddCarvingPathFilterNew(int argc, char* argv[])
+int otbAddCarvingPathFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx b/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx
index c573cef..e77221f 100644
--- a/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx
+++ b/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx
@@ -38,27 +38,23 @@
 
 #include <stdio.h>
 
-int otbAlignImageToPath(int argc, char * argv[])
+int otbAlignImageToPath(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
 
   typedef double InputPixelType;
   typedef double OutputPixelType;
-  typedef double RealPixelType;
   const unsigned int Dimension = 2;
 
   typedef otb::Image<InputPixelType,  Dimension> InputImageType;
-  typedef otb::Image<RealPixelType,  Dimension>  RealImageType;
 
   typedef itk::PolyLineParametricPath<Dimension> PathType;
 
-  typedef PathType::Pointer PathTypePointer;
   PathType::Pointer ltoto = PathType::New();
 
   typedef otb::Image<OutputPixelType, Dimension> OutputImageType;
 
-
   typedef otb::ImageFileReader<InputImageType> ReaderType;
 
   typedef otb::ImageToPathListAlignFilter<InputImageType, PathType> ListAlignFilterType;
diff --git a/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSum.cxx b/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSum.cxx
index dee9154..3703640 100644
--- a/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSum.cxx
+++ b/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSum.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbAssociativeSymmetricalSumImageFilter.h"
 
-int otbAssociativeSymmetricalSum(int argc, char* argv[])
+int otbAssociativeSymmetricalSum(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename1  = argv[1];
   const char * inputFilename2  = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSumNew.cxx b/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSumNew.cxx
index 1afa781..2892355 100644
--- a/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSumNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSumNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbAssociativeSymmetricalSumImageFilter.h"
 
-int otbAssociativeSymmetricalSumNew(int argc, char* argv[])
+int otbAssociativeSymmetricalSumNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   typedef double OutputPixelType;
diff --git a/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetector.cxx b/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetector.cxx
index c3be818..4e25390 100644
--- a/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetector.cxx
+++ b/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetector.cxx
@@ -27,7 +27,7 @@
 #include "otbImageFileWriter.h"
 #include "otbAssymmetricFusionOfLineDetectorImageFilter.h"
 
-int otbAssymmetricFusionOfLineDetector(int argc, char * argv[])
+int otbAssymmetricFusionOfLineDetector(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorNew.cxx b/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorNew.cxx
index 5d2433a..cc48ba0 100644
--- a/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorNew.cxx
@@ -29,7 +29,7 @@
 
 #include "otbAssymmetricFusionOfLineDetectorImageFilter.h"
 
-int otbAssymmetricFusionOfLineDetectorNew(int argc, char * argv[])
+int otbAssymmetricFusionOfLineDetectorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef double        OutputPixelType;
diff --git a/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilter.cxx
index 5922070..f523961 100644
--- a/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbMath.h"
 #include <cstdlib>
 
-int otbBreakAngularPathListFilter(int argc, char * argv[])
+int otbBreakAngularPathListFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * outfname = argv[1];
 
diff --git a/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilterNew.cxx b/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilterNew.cxx
index 7313b69..ed80d97 100644
--- a/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "itkPolyLineParametricPath.h"
 #include <cstdlib>
 
-int otbBreakAngularPathListFilterNew(int argc, char * argv[])
+int otbBreakAngularPathListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension>    PathType;
diff --git a/Testing/Code/FeatureExtraction/otbCloudDetectionFilter.cxx b/Testing/Code/FeatureExtraction/otbCloudDetectionFilter.cxx
index 007e140..82d9bf4 100644
--- a/Testing/Code/FeatureExtraction/otbCloudDetectionFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbCloudDetectionFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbCloudDetectionFilter(int argc, char * argv[])
+int otbCloudDetectionFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension                                                   = 2;
   typedef double                                                             PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbCloudDetectionFilterNew.cxx b/Testing/Code/FeatureExtraction/otbCloudDetectionFilterNew.cxx
index af8b449..edef9cf 100644
--- a/Testing/Code/FeatureExtraction/otbCloudDetectionFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbCloudDetectionFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorImage.h"
 #include "otbCloudDetectionFilter.h"
 
-int otbCloudDetectionFilterNew(int argc, char * argv[])
+int otbCloudDetectionFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension                                  = 2;
   typedef double                                                PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbCloudEstimatorDefaultFilter.cxx b/Testing/Code/FeatureExtraction/otbCloudEstimatorDefaultFilter.cxx
index 878780f..573017e 100644
--- a/Testing/Code/FeatureExtraction/otbCloudEstimatorDefaultFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbCloudEstimatorDefaultFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbCloudEstimatorDefaultFilter(int argc, char * argv[])
+int otbCloudEstimatorDefaultFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension                                                   = 2;
   typedef double                                                PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbCloudEstimatorFilter.cxx b/Testing/Code/FeatureExtraction/otbCloudEstimatorFilter.cxx
index 89c29f7..d121be9 100644
--- a/Testing/Code/FeatureExtraction/otbCloudEstimatorFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbCloudEstimatorFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbCloudEstimatorFilter(int argc, char * argv[])
+int otbCloudEstimatorFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension                                                   = 2;
   typedef double                                                             PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbCloudEstimatorFilterNew.cxx b/Testing/Code/FeatureExtraction/otbCloudEstimatorFilterNew.cxx
index cf82cea..764e4cd 100644
--- a/Testing/Code/FeatureExtraction/otbCloudEstimatorFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbCloudEstimatorFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorImage.h"
 #include "otbCloudEstimatorFilter.h"
 
-int otbCloudEstimatorFilterNew(int argc, char * argv[])
+int otbCloudEstimatorFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension                                  = 2;
   typedef double                                                PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbCompacityPathCircle.cxx b/Testing/Code/FeatureExtraction/otbCompacityPathCircle.cxx
index 542149e..5aaddfe 100644
--- a/Testing/Code/FeatureExtraction/otbCompacityPathCircle.cxx
+++ b/Testing/Code/FeatureExtraction/otbCompacityPathCircle.cxx
@@ -23,7 +23,7 @@
 #include "itkMacro.h"
 #include "otbMath.h"
 
-int otbCompacityPathCircle(int argc, char * argv[])
+int otbCompacityPathCircle(int itkNotUsed(argc), char * argv[])
 {
   unsigned int NbOfPoints((unsigned int) ::atoi(argv[1]));
 
diff --git a/Testing/Code/FeatureExtraction/otbCompacityPathNew.cxx b/Testing/Code/FeatureExtraction/otbCompacityPathNew.cxx
index 6d2597d..693b193 100644
--- a/Testing/Code/FeatureExtraction/otbCompacityPathNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbCompacityPathNew.cxx
@@ -24,7 +24,7 @@
 #include "itkPolyLineParametricPath.h"
 #include "itkMacro.h"
 
-int otbCompacityPathNew(int argc, char * argv[])
+int otbCompacityPathNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension> PathType;
diff --git a/Testing/Code/FeatureExtraction/otbCompacityPathRectangle.cxx b/Testing/Code/FeatureExtraction/otbCompacityPathRectangle.cxx
index 829eb33..5c84250 100644
--- a/Testing/Code/FeatureExtraction/otbCompacityPathRectangle.cxx
+++ b/Testing/Code/FeatureExtraction/otbCompacityPathRectangle.cxx
@@ -23,7 +23,7 @@
 #include "itkMacro.h"
 #include "otbMath.h"
 
-int otbCompacityPathRectangle(int argc, char * argv[])
+int otbCompacityPathRectangle(int itkNotUsed(argc), char * argv[])
 {
   double A ((double) ::atof(argv[1]));
   double B ((double) ::atof(argv[2]));
diff --git a/Testing/Code/FeatureExtraction/otbCompacityPathSquare.cxx b/Testing/Code/FeatureExtraction/otbCompacityPathSquare.cxx
index ea4ce63..abc66a2 100644
--- a/Testing/Code/FeatureExtraction/otbCompacityPathSquare.cxx
+++ b/Testing/Code/FeatureExtraction/otbCompacityPathSquare.cxx
@@ -23,7 +23,7 @@
 #include "itkMacro.h"
 #include "otbMath.h"
 
-int otbCompacityPathSquare(int argc, char * argv[])
+int otbCompacityPathSquare(int itkNotUsed(argc), char * argv[])
 {
   double A ((double) ::atof(argv[1]));
 
diff --git a/Testing/Code/FeatureExtraction/otbComplexMomentPath.cxx b/Testing/Code/FeatureExtraction/otbComplexMomentPath.cxx
index c101959..2a5c302 100644
--- a/Testing/Code/FeatureExtraction/otbComplexMomentPath.cxx
+++ b/Testing/Code/FeatureExtraction/otbComplexMomentPath.cxx
@@ -26,7 +26,7 @@
 #include "itkMacro.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbComplexMomentPath(int argc, char * argv[])
+int otbComplexMomentPath(int itkNotUsed(argc), char * argv[])
 {
   unsigned int p((unsigned int) ::atoi(argv[1]));
   unsigned int q((unsigned int) ::atoi(argv[2]));
diff --git a/Testing/Code/FeatureExtraction/otbComplexMomentPathFloat.cxx b/Testing/Code/FeatureExtraction/otbComplexMomentPathFloat.cxx
index a306b64..55d89fa 100644
--- a/Testing/Code/FeatureExtraction/otbComplexMomentPathFloat.cxx
+++ b/Testing/Code/FeatureExtraction/otbComplexMomentPathFloat.cxx
@@ -26,7 +26,7 @@
 #include "itkMacro.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbComplexMomentPathFloat(int argc, char * argv[])
+int otbComplexMomentPathFloat(int itkNotUsed(argc), char * argv[])
 {
   unsigned int p((unsigned int) ::atoi(argv[1]));
   unsigned int q((unsigned int) ::atoi(argv[2]));
diff --git a/Testing/Code/FeatureExtraction/otbComplexMomentPathNew.cxx b/Testing/Code/FeatureExtraction/otbComplexMomentPathNew.cxx
index d2739a3..968a584 100644
--- a/Testing/Code/FeatureExtraction/otbComplexMomentPathNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbComplexMomentPathNew.cxx
@@ -22,7 +22,7 @@
 #include "otbComplexMomentPathFunction.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbComplexMomentPathNew(int argc, char * argv[])
+int otbComplexMomentPathNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/FeatureExtraction/otbComplexMomentsImageFunction.cxx b/Testing/Code/FeatureExtraction/otbComplexMomentsImageFunction.cxx
index 7e4c9fa..cb69a1b 100644
--- a/Testing/Code/FeatureExtraction/otbComplexMomentsImageFunction.cxx
+++ b/Testing/Code/FeatureExtraction/otbComplexMomentsImageFunction.cxx
@@ -30,7 +30,7 @@
 #include "otbStreamingResampleImageFilter.h"
 
 
-int otbComplexMomentsImageFunctionNew(int argc, char * argv[])
+int otbComplexMomentsImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double     InputPixelType;
@@ -46,7 +46,7 @@ int otbComplexMomentsImageFunctionNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbComplexMomentsImageFunction(int argc, char * argv[])
+int otbComplexMomentsImageFunction(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   unsigned int p((unsigned int) ::atoi(argv[2]));
@@ -97,7 +97,7 @@ int otbComplexMomentsImageFunction(int argc, char * argv[])
 }
 
 
-int otbComplexMomentsImageFunctionScaleInvariant(int argc, char * argv[])
+int otbComplexMomentsImageFunctionScaleInvariant(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   unsigned int p((unsigned int) ::atoi(argv[2]));
diff --git a/Testing/Code/FeatureExtraction/otbDrawPath.cxx b/Testing/Code/FeatureExtraction/otbDrawPath.cxx
index c55ea53..57ad6c7 100644
--- a/Testing/Code/FeatureExtraction/otbDrawPath.cxx
+++ b/Testing/Code/FeatureExtraction/otbDrawPath.cxx
@@ -26,7 +26,7 @@
 #include "otbDrawPathFilter.h"
 #include "otbImageFileWriter.h"
 
-int otbDrawPathDessinCarre(int argc, char * argv[])
+int otbDrawPathDessinCarre(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx b/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx
index 50abcb6..70ed79f 100644
--- a/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx
+++ b/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx
@@ -28,7 +28,7 @@
 #include "otbDrawPathListFilter.h"
 #include "otbImageFileWriter.h"
 
-int otbDrawPathAlign(int argc, char * argv[])
+int otbDrawPathAlign(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
@@ -41,7 +41,6 @@ int otbDrawPathAlign(int argc, char * argv[])
   typedef otb::Image<OutputPixelType, Dimension> OutputImageType;
 
   typedef itk::PolyLineParametricPath<Dimension> PathType;
-  typedef PathType::Pointer                      PathPointerType;
 
   typedef otb::ImageFileReader<InputImageType>  ReaderType;
   typedef otb::ImageFileWriter<OutputImageType> WriterType;
diff --git a/Testing/Code/FeatureExtraction/otbExtractSegments.cxx b/Testing/Code/FeatureExtraction/otbExtractSegments.cxx
index ed473f4..a9af7ce 100644
--- a/Testing/Code/FeatureExtraction/otbExtractSegments.cxx
+++ b/Testing/Code/FeatureExtraction/otbExtractSegments.cxx
@@ -28,7 +28,7 @@
 #include "otbExtractSegmentsImageFilter.h"
 #include "itkRescaleIntensityImageFilter.h"
 
-int otbExtractSegments(int argc, char * argv[])
+int otbExtractSegments(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename1  = argv[1];
   const char * inputFilename2  = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbExtractSegmentsNew.cxx b/Testing/Code/FeatureExtraction/otbExtractSegmentsNew.cxx
index 8d5cea9..a3a0e0e 100644
--- a/Testing/Code/FeatureExtraction/otbExtractSegmentsNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbExtractSegmentsNew.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbExtractSegmentsImageFilter.h"
 
-int otbExtractSegmentsNew(int argc, char * argv[])
+int otbExtractSegmentsNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double        InputPixelType;
   typedef unsigned char OutputPixelType;
diff --git a/Testing/Code/FeatureExtraction/otbFeatureExtractionTests15.cxx b/Testing/Code/FeatureExtraction/otbFeatureExtractionTests15.cxx
index f87cc8a..d4ed1f5 100644
--- a/Testing/Code/FeatureExtraction/otbFeatureExtractionTests15.cxx
+++ b/Testing/Code/FeatureExtraction/otbFeatureExtractionTests15.cxx
@@ -31,6 +31,8 @@ void RegisterTests()
   REGISTER_TEST(otbScalarImageToTexturesFilter);
   REGISTER_TEST(otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculatorNew);
   REGISTER_TEST(otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator);
+  REGISTER_TEST(otbGreyLevelCooccurrenceIndexedListNew);
+  REGISTER_TEST(otbGreyLevelCooccurrenceIndexedList);
   REGISTER_TEST(otbScalarImageToAdvancedTexturesFilterNew);
   REGISTER_TEST(otbScalarImageToAdvancedTexturesFilter);
   REGISTER_TEST(otbScalarImageToPanTexTextureFilterNew);
diff --git a/Testing/Code/FeatureExtraction/otbFillGapsFilter.cxx b/Testing/Code/FeatureExtraction/otbFillGapsFilter.cxx
index a5abd1d..c4f4126 100644
--- a/Testing/Code/FeatureExtraction/otbFillGapsFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbFillGapsFilter.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbDrawLineSpatialObjectListFilter.h"
 
-int otbFillGapsFilter(int argc, char * argv[])
+int otbFillGapsFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbFillGapsFilterNew.cxx b/Testing/Code/FeatureExtraction/otbFillGapsFilterNew.cxx
index 2cfba1e..15dc5a5 100644
--- a/Testing/Code/FeatureExtraction/otbFillGapsFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbFillGapsFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkMacro.h"
 #include "otbFillGapsFilter.h"
 
-int otbFillGapsFilterNew(int argc, char * argv[])
+int otbFillGapsFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::FillGapsFilter FillGapsFilterType;
   FillGapsFilterType::Pointer filter = FillGapsFilterType::New();
diff --git a/Testing/Code/FeatureExtraction/otbFlusserMomentsImageFunction.cxx b/Testing/Code/FeatureExtraction/otbFlusserMomentsImageFunction.cxx
index ff2ec6f..9b2efa2 100644
--- a/Testing/Code/FeatureExtraction/otbFlusserMomentsImageFunction.cxx
+++ b/Testing/Code/FeatureExtraction/otbFlusserMomentsImageFunction.cxx
@@ -33,7 +33,7 @@
 #include "itkAffineTransform.h"
 
 
-int otbFlusserMomentsImageFunctionNew(int argc, char * argv[])
+int otbFlusserMomentsImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   const unsigned int Dimension = 2;
@@ -49,7 +49,7 @@ int otbFlusserMomentsImageFunctionNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbFlusserMomentsImageFunction(int argc, char * argv[])
+int otbFlusserMomentsImageFunction(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename  = argv[2];
@@ -91,7 +91,7 @@ int otbFlusserMomentsImageFunction(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbFlusserMomentsImageFunctionScaleInvariant(int argc, char * argv[])
+int otbFlusserMomentsImageFunctionScaleInvariant(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
 
@@ -168,7 +168,7 @@ int otbFlusserMomentsImageFunctionScaleInvariant(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbFlusserMomentsImageFunctionRotationInvariant(int argc, char * argv[])
+int otbFlusserMomentsImageFunctionRotationInvariant(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const double angleInDegrees = atoi(argv[2]);
diff --git a/Testing/Code/FeatureExtraction/otbFlusserPath.cxx b/Testing/Code/FeatureExtraction/otbFlusserPath.cxx
index bd2769e..666ab5c 100644
--- a/Testing/Code/FeatureExtraction/otbFlusserPath.cxx
+++ b/Testing/Code/FeatureExtraction/otbFlusserPath.cxx
@@ -25,7 +25,7 @@
 #include "itkPolyLineParametricPath.h"
 #include "itkMacro.h"
 
-int otbFlusserPath(int argc, char * argv[])
+int otbFlusserPath(int itkNotUsed(argc), char * argv[])
 {
   unsigned int       Number;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbFlusserPathNew.cxx b/Testing/Code/FeatureExtraction/otbFlusserPathNew.cxx
index 9e79bbb..6e2d4e2 100644
--- a/Testing/Code/FeatureExtraction/otbFlusserPathNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbFlusserPathNew.cxx
@@ -22,7 +22,7 @@
 #include "itkPolyLineParametricPath.h"
 #include "itkMacro.h"
 
-int otbFlusserPathNew(int argc, char * argv[])
+int otbFlusserPathNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension> PathType;
diff --git a/Testing/Code/FeatureExtraction/otbFourierMellinDescriptors.cxx b/Testing/Code/FeatureExtraction/otbFourierMellinDescriptors.cxx
index 6f426b2..d1f75a1 100644
--- a/Testing/Code/FeatureExtraction/otbFourierMellinDescriptors.cxx
+++ b/Testing/Code/FeatureExtraction/otbFourierMellinDescriptors.cxx
@@ -29,7 +29,7 @@
 #include "itkAffineTransform.h"
 
 
-int otbFourierMellinDescriptorsNew(int argc, char * argv[])
+int otbFourierMellinDescriptorsNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double     InputPixelType;
@@ -45,7 +45,7 @@ int otbFourierMellinDescriptorsNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbFourierMellinDescriptors(int argc, char * argv[])
+int otbFourierMellinDescriptors(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   unsigned int p((unsigned int) ::atoi(argv[2]));
@@ -93,7 +93,7 @@ int otbFourierMellinDescriptors(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbFourierMellinDescriptorsScaleInvariant(int argc, char * argv[])
+int otbFourierMellinDescriptorsScaleInvariant(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   unsigned int p((unsigned int) ::atoi(argv[2]));
@@ -180,7 +180,7 @@ int otbFourierMellinDescriptorsScaleInvariant(int argc, char * argv[])
 }
 
 
-int otbFourierMellinDescriptorsRotationInvariant(int argc, char * argv[])
+int otbFourierMellinDescriptorsRotationInvariant(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   unsigned int p((unsigned int) ::atoi(argv[2]));
diff --git a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilter.cxx b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilter.cxx
index e15f78f..9e270d7 100644
--- a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilter.cxx
@@ -29,13 +29,12 @@
 #include "itkImageRegionIterator.h"
 #include "itkRescaleIntensityImageFilter.h"
 
-int otbFourierMellinImageFilter(int argc, char* argv[])
+int otbFourierMellinImageFilter(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputRealFilename = argv[2];
   const char * outputImaginaryFilename = argv[3];
   typedef double               InputPixelType;
-  typedef std::complex<double> OutputPixelType;
   const unsigned int Dimension = 2;
 
   typedef otb::Image<InputPixelType, Dimension> InputImageType;
diff --git a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterNew.cxx b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterNew.cxx
index 4ed34c1..b8c7f6c 100644
--- a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterNew.cxx
@@ -22,14 +22,13 @@
 #include "otbForwardFourierMellinTransformImageFilter.h"
 #include "itkLinearInterpolateImageFunction.h"
 
-int otbFourierMellinImageFilterNew(int argc, char* argv[])
+int otbFourierMellinImageFilterNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
 
   typedef double PixelType;
   const unsigned int Dimension = 2;
 
   typedef otb::Image<PixelType, Dimension> InputImageType;
-  typedef otb::Image<PixelType, Dimension> OutputImageType;
 
   typedef itk::LinearInterpolateImageFunction<InputImageType, double> InterpolatorType;
   typedef otb::ForwardFourierMellinTransformImageFilter<PixelType,
diff --git a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterTestFFT.cxx b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterTestFFT.cxx
index 1c34e6a..961828d 100644
--- a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterTestFFT.cxx
+++ b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterTestFFT.cxx
@@ -24,7 +24,7 @@
 #include "itkVnlFFTRealToComplexConjugateImageFilter.h"
 #include <complex>
 
-int otbFourierMellinImageFilterTestFFT(int argc, char* argv[])
+int otbFourierMellinImageFilterTestFFT(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedList.cxx b/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedList.cxx
new file mode 100644
index 0000000..50caa51
--- /dev/null
+++ b/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedList.cxx
@@ -0,0 +1,250 @@
+/*=========================================================================
+
+Program:   ORFEO Toolbox
+Language:  C++
+Date:      $Date$
+Version:   $Revision$
+
+
+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
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+#include "otbGreyLevelCooccurrenceIndexedList.h"
+#include "itkImageRegionIteratorWithIndex.h"
+#include "itkConstNeighborhoodIterator.h"
+#include "itkImageRegionIterator.h"
+
+int otbGreyLevelCooccurrenceIndexedList(int, char* [] )
+{
+
+  //Data definitions
+  const unsigned int  IMGWIDTH         =  4;
+  const unsigned int  IMGHEIGHT        =  4;
+  const unsigned int  NDIMENSION       =  2;
+
+  //------------------------------------------------------
+  //Create a simple test images
+  //------------------------------------------------------
+  typedef unsigned char InputPixelType;
+  typedef itk::Image<InputPixelType, NDIMENSION> InputImageType;
+
+
+  typedef itk::ImageRegionIterator< InputImageType > InputImageIterator;
+  typedef InputImageType::RegionType InputRegionType;
+
+  InputImageType::Pointer image = InputImageType::New();
+
+  InputImageType::SizeType inputImageSize = {{ IMGWIDTH, IMGHEIGHT }};
+
+  InputImageType::IndexType index;
+  index.Fill(0);
+  InputRegionType region;
+
+  region.SetSize( inputImageSize );
+  region.SetIndex( index );
+
+  image->SetRegions( region );
+  image->Allocate();
+
+  //--------------------------------------------------------------------------
+  // Set up the image first. It looks like:
+  //  1 2 1 2 1
+  //  1 2 1 2 1
+  //  1 2 1 2 1
+  //  1 2 1 2 1
+  //  1 2 1 2 1
+  //--------------------------------------------------------------------------
+
+  // setup the iterator
+  InputImageIterator imageIt( image, image->GetBufferedRegion() );
+
+  imageIt.GoToBegin();
+
+  for(unsigned int i = 0; i < IMGWIDTH; i++)
+    {
+    for(unsigned int j = 0; j < IMGHEIGHT; j++, ++imageIt)
+      {
+      imageIt.Set(j % 2 + 1);
+      }
+    }
+
+    typedef otb::GreyLevelCooccurrenceIndexedList< InputPixelType >   CooccurrenceIndexedListType;
+    typedef CooccurrenceIndexedListType::FrequencyType  FrequencyType;
+    typedef CooccurrenceIndexedListType::TotalFrequencyType  TotalFrequencyType;
+    CooccurrenceIndexedListType::Pointer cooccurrenceObj1 = CooccurrenceIndexedListType::New();
+    std::cout << "Class name = ";
+    std::cout << cooccurrenceObj1->GetNameOfClass() << std::endl;
+
+    bool passed = true;
+    try
+      {
+      // Check Intialize method.
+      cooccurrenceObj1->Initialize(4, 0, 8);
+      bool symmetry = cooccurrenceObj1->GetSymmetry();
+      float totalFrequency = cooccurrenceObj1->GetTotalFrequency();
+
+      if( !symmetry || totalFrequency != 0)
+        {
+        std::cerr << "Error" << std::endl;
+        std::cerr << "Expected symmetry = 1, totalFrequency = 0, got symmetry = "
+                  << symmetry << " totalFrequency = " << totalFrequency <<  std::endl;
+        passed = false;
+        }
+      }
+    catch( itk::ExceptionObject & err )
+      {
+      std::cerr << "ExceptionObject caught !" << std::endl;
+      std::cerr << err << std::endl;
+      std::cerr << "Test failed" << std::endl;
+      return EXIT_FAILURE;
+      }
+
+    static const FrequencyType out1[] = {12,6,12,12,12,12,12,6,12,6,12,12,12,12,12,6,12,6,12,12,12,12,12,6,8,4,8,8,8,8,8,4};
+    std::vector<FrequencyType> avector (out1, out1 + sizeof(out1) / sizeof(out1[0]) );
+
+    static const FrequencyType out2[] = {18,24,24,18,18,24,24,18,18,24,24,18,12,16,16,12};
+    std::vector< TotalFrequencyType> tavector(out2, out2 + sizeof(out2) / sizeof(out2[0]) ); ;
+
+    InputImageType::OffsetType offset = {{0, 1}};
+
+    //vector to save results
+    std::vector< FrequencyType> fvector;
+    std::vector< TotalFrequencyType> tfvector;
+
+    InputImageType::SizeType neighborhoodRadius;
+
+    unsigned int minRadius = 0;
+    for ( unsigned int i = 0; i < offset.GetOffsetDimension(); i++ )
+      {
+      unsigned int distance = vcl_abs(offset[i]);
+      if ( distance > minRadius )
+        {
+        minRadius = distance;
+        }
+      }
+    neighborhoodRadius.Fill(minRadius);
+
+    InputImageType::SizeType radius = {{ 2, 2 }};
+
+    // Iterate over input image and create co-occurrence list
+    itk::ImageRegionIteratorWithIndex<InputImageType> imageItWithIndex(image, region);
+    imageItWithIndex.GoToBegin();
+    while (!imageItWithIndex.IsAtEnd())
+      {
+      InputRegionType::IndexType inputIndex;
+      InputRegionType::SizeType inputSize;
+      for (unsigned int dim = 0; dim < InputImageType::ImageDimension; ++dim)
+        {
+        inputIndex[dim] = imageItWithIndex.GetIndex()[dim] - radius[dim];
+        inputSize[dim] = 2 * radius[dim] + 1;
+        }
+
+      // Build the input  region
+      InputRegionType inputRegion;
+      inputRegion.SetIndex(inputIndex);
+      inputRegion.SetSize(inputSize);
+      inputRegion.Crop(image->GetRequestedRegion());
+
+      CooccurrenceIndexedListType::Pointer cooccurrenceObj2 = CooccurrenceIndexedListType::New();
+      cooccurrenceObj2->Initialize(8, 0, 3);
+
+      typedef itk::ConstNeighborhoodIterator< InputImageType > NeighborhoodIteratorType;
+      NeighborhoodIteratorType neighborIt;
+      neighborIt = NeighborhoodIteratorType(neighborhoodRadius, image, inputRegion);
+      for ( neighborIt.GoToBegin(); !neighborIt.IsAtEnd(); ++neighborIt )
+        {
+        const InputPixelType centerPixelIntensity = neighborIt.GetCenterPixel();
+        bool pixelInBounds;
+        const InputPixelType pixelIntensity =  neighborIt.GetPixel(offset, pixelInBounds);
+        if ( !pixelInBounds )
+          {
+          continue; // don't put a pixel in the co-occurrence list if it's out-of-bounds.
+          }
+        cooccurrenceObj2->AddPixelPair(centerPixelIntensity, pixelIntensity);
+        }
+
+      typedef CooccurrenceIndexedListType::VectorType     VectorType;
+      VectorType vector;
+      //get indexed list and total frequency
+      vector = cooccurrenceObj2->GetVector();
+      //save total frequency
+      tfvector.push_back(cooccurrenceObj2->GetTotalFrequency());
+      //save each vector to fvector so as to compare results later
+      VectorType::const_iterator    it;
+      for (it = vector.begin(); it != vector.end(); ++it)
+        {
+        fvector.push_back( (*it).second );
+        }
+      ++imageItWithIndex;
+      }
+
+    //Check size of fvector against the actual results
+    if( fvector.size() != avector.size())
+      {
+      std::cerr << "Size of computed co-occurrence indexed list for entire image is: " << fvector.size()
+                << " expected size is: " << avector.size() << std::endl;
+      passed = false;
+      }
+    else
+      {
+      //check contents individually
+      std::vector<FrequencyType>::const_iterator fit, ait;
+      ait = avector.begin();
+      fit = fvector.begin();
+      while(ait != avector.end())
+        {
+        if ((*fit) != (*ait))
+          {
+          std::cerr << "Expected value: " << (*ait) << " got :" << (*fit) << std::endl;
+          passed = false;
+          break;
+          }
+        ++ait;        ++fit;
+        }
+      std::cerr << "Co-occurrence list frequencies are correct" << std::endl;
+      }
+
+    //Check size of tfvector against the tavector
+    if( tfvector.size() != tavector.size())
+      {
+      std::cerr << "Size of computed co-occurrence indexed list for entire image is: " << tfvector.size()
+                << " expected size is: " << tavector.size() << std::endl;
+      passed = false;
+      }
+    else
+      {
+      //check contents individually
+      std::vector<FrequencyType>::const_iterator fit, ait;
+      ait = tavector.begin();
+      fit = tfvector.begin();
+      while(ait != tavector.end())
+        {
+        if ((*fit) != (*ait))
+          {
+          std::cerr << "Expected value: " << (*ait) << " got :" << (*fit) << std::endl;
+          passed = false;
+          break;
+          }
+        ++ait;        ++fit;
+        }
+      std::cerr << "Co-occurrence list total frequencies are correct" << std::endl;
+      }
+
+    if (!passed)
+      {
+      std::cerr << "Test failed" << std::endl;
+      return EXIT_FAILURE;
+      }
+    else
+      {
+      std::cerr << "Test succeeded" << std::endl;
+      return EXIT_SUCCESS;
+      }
+}
diff --git a/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedListNew.cxx b/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedListNew.cxx
new file mode 100644
index 0000000..bccf08c
--- /dev/null
+++ b/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceIndexedListNew.cxx
@@ -0,0 +1,33 @@
+/*=========================================================================
+
+Program:   ORFEO Toolbox
+Language:  C++
+Date:      $Date$
+Version:   $Revision$
+
+
+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
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+#include "itkMacro.h"
+#include "otbGreyLevelCooccurrenceIndexedList.h"
+
+int otbGreyLevelCooccurrenceIndexedListNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
+{
+  typedef float                                         PixelType;
+  typedef otb::GreyLevelCooccurrenceIndexedList< PixelType > CooccurrenceIndexedListType;
+  CooccurrenceIndexedListType::Pointer lightObj = CooccurrenceIndexedListType::New();
+
+  std::cout << "Printing otb::GreyLevelCooccurrenceIndexedList: " << std::endl;
+  lightObj->Print( std::cout );
+
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.cxx b/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.cxx
index 57eb094..87f4811 100644
--- a/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.cxx
+++ b/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.cxx
@@ -22,7 +22,7 @@
 
 #include "otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.h"
 
-int otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator(int argc, char * argv[])
+int otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   try   // the rest of the function is in the try block...
diff --git a/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculatorNew.cxx b/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculatorNew.cxx
index d66ab4d..24899c4 100644
--- a/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculatorNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculatorNew.cxx
@@ -19,7 +19,7 @@
 
 #include "otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.h"
 
-int otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculatorNew(int argc, char * argv[])
+int otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef float                                                  MeasurementType;
   typedef itk::Statistics::Histogram<MeasurementType> HistogramType;
diff --git a/Testing/Code/FeatureExtraction/otbHaralickTexturesImageFunction.cxx b/Testing/Code/FeatureExtraction/otbHaralickTexturesImageFunction.cxx
index 6826a15..618c4bd 100644
--- a/Testing/Code/FeatureExtraction/otbHaralickTexturesImageFunction.cxx
+++ b/Testing/Code/FeatureExtraction/otbHaralickTexturesImageFunction.cxx
@@ -32,14 +32,14 @@ typedef otb::HaralickTexturesImageFunction<
 typedef HaralickTexturesImageFunctionType::PointType                  PointType;
 typedef HaralickTexturesImageFunctionType::OutputType                 OutputType;
 
-int otbHaralickTexturesImageFunctionNew(int argc, char * argv[])
+int otbHaralickTexturesImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   HaralickTexturesImageFunctionType::Pointer function = HaralickTexturesImageFunctionType::New();
 
   return EXIT_SUCCESS;
 }
 
-int otbHaralickTexturesImageFunction(int argc, char * argv[])
+int otbHaralickTexturesImageFunction(int itkNotUsed(argc), char * argv[])
 {
   // Read the input image
   ReaderType::Pointer   reader = ReaderType::New();
diff --git a/Testing/Code/FeatureExtraction/otbHarrisImage.cxx b/Testing/Code/FeatureExtraction/otbHarrisImage.cxx
index 6b1e07f..9a50c50 100644
--- a/Testing/Code/FeatureExtraction/otbHarrisImage.cxx
+++ b/Testing/Code/FeatureExtraction/otbHarrisImage.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbHarrisImageFilter.h"
 
-int otbHarrisImage(int argc, char * argv[])
+int otbHarrisImage(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx b/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx
index 631ef86..bce0296 100644
--- a/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx
+++ b/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx
@@ -26,7 +26,7 @@
 #include "otbHarrisImageToPointSetFilter.h"
 #include <fstream>
 
-int otbHarrisToPointSet(int argc, char * argv[])
+int otbHarrisToPointSet(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.cxx b/Testing/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.cxx
index d9dde57..3acd911 100644
--- a/Testing/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.cxx
+++ b/Testing/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.cxx
@@ -38,7 +38,7 @@ typedef GradientFilterType::OutputImageType
 typedef otb::HistogramOfOrientedGradientCovariantImageFunction<CovariantImageType> FunctionType;
 
 
-int otbHistogramOfOrientedGradientCovariantImageFunctionNew(int argc, char * argv[])
+int otbHistogramOfOrientedGradientCovariantImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Instantiating object
   FunctionType::Pointer function       = FunctionType::New();
@@ -49,7 +49,7 @@ int otbHistogramOfOrientedGradientCovariantImageFunctionNew(int argc, char * arg
 }
 
 
-int otbHistogramOfOrientedGradientCovariantImageFunction(int argc, char * argv[])
+int otbHistogramOfOrientedGradientCovariantImageFunction(int itkNotUsed(argc), char * argv[])
 {
   ReaderType::Pointer reader = ReaderType::New();
   reader->SetFileName(argv[1]);
@@ -88,4 +88,3 @@ int otbHistogramOfOrientedGradientCovariantImageFunction(int argc, char * argv[]
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/FeatureExtraction/otbHoughTransform2DLinesImageTest.cxx b/Testing/Code/FeatureExtraction/otbHoughTransform2DLinesImageTest.cxx
index abd18bf..b95318d 100644
--- a/Testing/Code/FeatureExtraction/otbHoughTransform2DLinesImageTest.cxx
+++ b/Testing/Code/FeatureExtraction/otbHoughTransform2DLinesImageTest.cxx
@@ -47,7 +47,7 @@ struct houghPoint
 };
 
 /** Main program */
-int otbHoughTransform2DLinesImageTest(int argc, char* argv[])
+int otbHoughTransform2DLinesImageTest(int itkNotUsed(argc), char* argv[])
 {
 
   const char * outputFilename =  argv[1];
diff --git a/Testing/Code/FeatureExtraction/otbHuMomentsImageFunction.cxx b/Testing/Code/FeatureExtraction/otbHuMomentsImageFunction.cxx
index eeb13ec..ab1c9aa 100644
--- a/Testing/Code/FeatureExtraction/otbHuMomentsImageFunction.cxx
+++ b/Testing/Code/FeatureExtraction/otbHuMomentsImageFunction.cxx
@@ -32,7 +32,7 @@
 
 #include "itkAffineTransform.h"
 
-int otbHuMomentsImageFunctionNew(int argc, char * argv[])
+int otbHuMomentsImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   const unsigned int Dimension = 2;
@@ -48,7 +48,7 @@ int otbHuMomentsImageFunctionNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbHuMomentsImageFunction(int argc, char * argv[])
+int otbHuMomentsImageFunction(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename  = argv[2];
@@ -89,7 +89,7 @@ int otbHuMomentsImageFunction(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbHuMomentsImageFunctionScaleInvariant(int argc, char * argv[])
+int otbHuMomentsImageFunctionScaleInvariant(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename   = argv[1];
 
@@ -166,7 +166,7 @@ int otbHuMomentsImageFunctionScaleInvariant(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbHuMomentsImageFunctionRotationInvariant(int argc, char * argv[])
+int otbHuMomentsImageFunctionRotationInvariant(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const double angleInDegrees = atoi(argv[2]);
diff --git a/Testing/Code/FeatureExtraction/otbHuPath.cxx b/Testing/Code/FeatureExtraction/otbHuPath.cxx
index f2d25a2..a89fe26 100644
--- a/Testing/Code/FeatureExtraction/otbHuPath.cxx
+++ b/Testing/Code/FeatureExtraction/otbHuPath.cxx
@@ -26,7 +26,7 @@
 #include "itkPolyLineParametricPath.h"
 #include "itkMacro.h"
 
-int otbHuPath(int argc, char * argv[])
+int otbHuPath(int itkNotUsed(argc), char * argv[])
 {
   unsigned int       Number;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbHuPathNew.cxx b/Testing/Code/FeatureExtraction/otbHuPathNew.cxx
index bed423f..3ccb89b 100644
--- a/Testing/Code/FeatureExtraction/otbHuPathNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbHuPathNew.cxx
@@ -22,12 +22,11 @@
 #include "otbHuPathFunction.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbHuPathNew(int argc, char * argv[])
+int otbHuPathNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension> PathType;
   typedef otb::HuPathFunction<PathType>          FunctionType;
-  typedef FunctionType::RealType                 RealType;
 
   FunctionType::Pointer function = FunctionType::New();
 
diff --git a/Testing/Code/FeatureExtraction/otbImageFittingPolygonListFilter.cxx b/Testing/Code/FeatureExtraction/otbImageFittingPolygonListFilter.cxx
index 2db98e5..10604fd 100644
--- a/Testing/Code/FeatureExtraction/otbImageFittingPolygonListFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageFittingPolygonListFilter.cxx
@@ -29,7 +29,7 @@
 #include <fstream>
 #include <cstdlib>
 
-int otbImageFittingPolygonListFilter(int argc, char * argv[])
+int otbImageFittingPolygonListFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * imageFileName = argv[1];
   const char * polyFileName = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbImageFittingPolygonListFilterNew.cxx b/Testing/Code/FeatureExtraction/otbImageFittingPolygonListFilterNew.cxx
index 7a1469a..9d273be 100644
--- a/Testing/Code/FeatureExtraction/otbImageFittingPolygonListFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageFittingPolygonListFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbImage.h"
 #include <cstdlib>
 
-int otbImageFittingPolygonListFilterNew(int argc, char * argv[])
+int otbImageFittingPolygonListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef otb::Polygon<double>          PolygonType;
diff --git a/Testing/Code/FeatureExtraction/otbImageFunctionAdaptor.cxx b/Testing/Code/FeatureExtraction/otbImageFunctionAdaptor.cxx
index 19f4d53..4e2fcf4 100644
--- a/Testing/Code/FeatureExtraction/otbImageFunctionAdaptor.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageFunctionAdaptor.cxx
@@ -33,7 +33,7 @@
 #include "otbLocalHistogramImageFunction.h"
 
 
-int otbImageFunctionAdaptorNew(int argc, char * argv[])
+int otbImageFunctionAdaptorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   typedef double PrecisionType;
@@ -76,7 +76,7 @@ int otbImageFunctionAdaptorNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbImageFunctionAdaptor(int argc, char * argv[])
+int otbImageFunctionAdaptor(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
 
@@ -407,4 +407,3 @@ int otbImageFunctionAdaptor(int argc, char * argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/FeatureExtraction/otbImageToCarvingPathFilterNew.cxx b/Testing/Code/FeatureExtraction/otbImageToCarvingPathFilterNew.cxx
index 1875962..60462a3 100644
--- a/Testing/Code/FeatureExtraction/otbImageToCarvingPathFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToCarvingPathFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbImageToCarvingPathFilter.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbImageToCarvingPathFilterNew(int argc, char* argv[])
+int otbImageToCarvingPathFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef double PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx b/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx
index 7e9980a..c938f33 100644
--- a/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageToEdgePathFilter(int argc, char * argv[])
+int otbImageToEdgePathFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename  = argv[1];
   const char *       outputFilename = argv[2];
@@ -57,7 +57,6 @@ int otbImageToEdgePathFilter(int argc, char * argv[])
 
   typedef PathType::VertexType                    VertexType;
   typedef PathType::VertexListType                VertexListType;
-  typedef PathType::VertexListType::ConstIterator VertexListConstIterator;
   typedef VertexListType::ConstPointer            VertexListTypePointer;
 
   VertexListTypePointer vertexList;
diff --git a/Testing/Code/FeatureExtraction/otbImageToEdgePathFilterNew.cxx b/Testing/Code/FeatureExtraction/otbImageToEdgePathFilterNew.cxx
index 9e5cb94..fd3b857 100644
--- a/Testing/Code/FeatureExtraction/otbImageToEdgePathFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToEdgePathFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImageToEdgePathFilter.h"
 #include "otbImage.h"
 
-int otbImageToEdgePathFilterNew(int argc, char * argv[])
+int otbImageToEdgePathFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                          PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterNew.cxx b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterNew.cxx
index 335bdda..1ee9a1b 100644
--- a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "itkPointSet.h"
 #include "itkVariableLengthVector.h"
 
-int otbImageToFastSIFTKeyPointSetFilterNew(int argc, char * argv[])
+int otbImageToFastSIFTKeyPointSetFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef float RealType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii.cxx
index 4a7d326..d56a4b6 100644
--- a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii.cxx
@@ -34,7 +34,7 @@ bool CMPData(std::vector<float>  a, std::vector<float>  b)
   return lexicographical_compare(a.begin(), a.begin() + 2, b.begin(), b.begin() + 2);
 }
 
-int otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii(int argc, char * argv[])
+int otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputInterestPointAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputInterestPointAscii.cxx
index e05022d..0576cb5 100644
--- a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputInterestPointAscii.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputInterestPointAscii.cxx
@@ -34,7 +34,7 @@ bool CMP(std::vector<float>  a, std::vector<float>  b)
   return lexicographical_compare(a.begin(), a.begin() + 2, b.begin(), b.begin() + 2);
 }
 
-int otbImageToFastSIFTKeyPointSetFilterOutputInterestPointAscii(int argc, char * argv[])
+int otbImageToFastSIFTKeyPointSetFilterOutputInterestPointAscii(int itkNotUsed(argc), char * argv[])
 {
 
   const char * infname = argv[1];
diff --git a/Testing/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.cxx b/Testing/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.cxx
index e5638b9..ec7ee6d 100644
--- a/Testing/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageToHessianDeterminantImageFilter(int argc, char * argv[])
+int otbImageToHessianDeterminantImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * ifname   = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilterNew.cxx b/Testing/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilterNew.cxx
index 535ffe8..3964a8f 100644
--- a/Testing/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImageToHessianDeterminantImageFilter.h"
 #include "otbImage.h"
 
-int otbImageToHessianDeterminantImageFilterNew(int argc, char * argv[])
+int otbImageToHessianDeterminantImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                          PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx
index 949ccb3..2d996fa 100644
--- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx
@@ -225,8 +225,8 @@ ImageType::Pointer contrast(ImageType::Pointer input,
 }
 
 OutputImageType::Pointer invContrast(OutputImageType::Pointer input,
-                                     const unsigned int contrastMin,
-                                     const unsigned int contrastMax)
+                                     const unsigned int itkNotUsed(contrastMin),
+                                     const unsigned int itkNotUsed(contrastMax))
 {
   return input;
 }
diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterNew.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterNew.cxx
index 55c9eb7..ab32362 100644
--- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "itkPointSet.h"
 #include "itkVariableLengthVector.h"
 
-int otbImageToSIFTKeyPointSetFilterNew(int argc, char * argv[])
+int otbImageToSIFTKeyPointSetFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef float RealType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx
index fbe6ea3..5747f57 100644
--- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx
@@ -28,7 +28,7 @@
 #include "itkRGBPixel.h"
 #include "itkImageRegionIterator.h"
 
-int otbImageToSIFTKeyPointSetFilterOutputAscii(int argc, char * argv[])
+int otbImageToSIFTKeyPointSetFilterOutputAscii(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputDescriptorAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputDescriptorAscii.cxx
index b3cdef8..5f01242 100644
--- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputDescriptorAscii.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputDescriptorAscii.cxx
@@ -28,7 +28,7 @@
 #include "itkRGBPixel.h"
 #include "itkImageRegionIterator.h"
 
-int otbImageToSIFTKeyPointSetFilterOutputDescriptorAscii(int argc, char * argv[])
+int otbImageToSIFTKeyPointSetFilterOutputDescriptorAscii(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputImage.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputImage.cxx
index b8fb991..71ba2d5 100644
--- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputImage.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputImage.cxx
@@ -27,7 +27,7 @@
 #include <iostream>
 #include <fstream>
 
-int otbImageToSIFTKeyPointSetFilterOutputImage(int argc, char * argv[])
+int otbImageToSIFTKeyPointSetFilterOutputImage(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outputImageFilename = argv[2];
@@ -68,8 +68,6 @@ int otbImageToSIFTKeyPointSetFilterOutputImage(int argc, char * argv[])
   ImageType::OffsetType r = {{-1, 0}};
 
   typedef unsigned char            PixelType;
-  typedef otb::Image<PixelType, 2> UCharImageType;
-
   typedef itk::RGBPixel<PixelType>    RGBPixelType;
   typedef otb::Image<RGBPixelType, 2> OutputImageType;
 
diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputInterestPointAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputInterestPointAscii.cxx
index d10594c..43ebcbc 100644
--- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputInterestPointAscii.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputInterestPointAscii.cxx
@@ -28,7 +28,7 @@
 #include "itkRGBPixel.h"
 #include "itkImageRegionIterator.h"
 
-int otbImageToSIFTKeyPointSetFilterOutputInterestPointAscii(int argc, char * argv[])
+int otbImageToSIFTKeyPointSetFilterOutputInterestPointAscii(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
@@ -49,8 +49,6 @@ int otbImageToSIFTKeyPointSetFilterOutputInterestPointAscii(int argc, char * arg
 
   typedef PointSetType::PointsContainer    PointsContainerType;
   typedef PointsContainerType::Iterator    PointsIteratorType;
-  typedef PointSetType::PointDataContainer PointDataContainerType;
-  typedef PointDataContainerType::Iterator PointDataIteratorType;
 
   // Instantiating object
   ReaderType::Pointer                       reader = ReaderType::New();
diff --git a/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterNew.cxx b/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterNew.cxx
index 39181a0..a92dd56 100644
--- a/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "itkPointSet.h"
 #include "itkVariableLengthVector.h"
 
-int otbImageToSURFKeyPointSetFilterNew(int argc, char * argv[])
+int otbImageToSURFKeyPointSetFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputInterestPointAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputInterestPointAscii.cxx
index fde2862..1c1ac29 100644
--- a/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputInterestPointAscii.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputInterestPointAscii.cxx
@@ -56,8 +56,6 @@ int otbImageToSURFKeyPointSetFilterOutputInterestPointAscii(int argc, char * arg
   typedef otb::ImageToSURFKeyPointSetFilter<ImageType, PointSetType> ImageToSURFKeyPointSetFilterType;
   typedef PointSetType::PointsContainer    PointsContainerType;
   typedef PointsContainerType::Iterator    PointsIteratorType;
-  typedef PointSetType::PointDataContainer PointDataContainerType;
-  typedef PointDataContainerType::Iterator PointDataIteratorType;
 
   // Instantiating object
   ReaderType::Pointer                       reader = ReaderType::New();
diff --git a/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilter.cxx b/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilter.cxx
index 7b45f4a..59468ed 100644
--- a/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilter.cxx
@@ -25,7 +25,7 @@
 #include <iostream>
 #include <fstream>
 
-int otbKeyPointSetsMatchingFilter(int argc, char* argv[])
+int otbKeyPointSetsMatchingFilter(int itkNotUsed(argc), char* argv[])
 {
 
   const char * outfname = argv[1];
diff --git a/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilterNew.cxx b/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilterNew.cxx
index 2ead8fd..d43b720 100644
--- a/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbKeyPointSetsMatchingFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "itkVariableLengthVector.h"
 #include "otbKeyPointSetsMatchingFilter.h"
 
-int otbKeyPointSetsMatchingFilterNew(int argc, char * argv[])
+int otbKeyPointSetsMatchingFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef float RealType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbLandmarkNew.cxx b/Testing/Code/FeatureExtraction/otbLandmarkNew.cxx
index 96246af..feba354 100644
--- a/Testing/Code/FeatureExtraction/otbLandmarkNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbLandmarkNew.cxx
@@ -22,7 +22,7 @@
 #include "itkVariableLengthVector.h"
 #include "itkPoint.h"
 
-int otbLandmarkNew(int argc, char* argv[])
+int otbLandmarkNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef itk::Point<double, 2>                           PointType;
   typedef itk::VariableLengthVector<double>               PointDataType;
diff --git a/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilter.cxx
index 6396f30..6a7334b 100644
--- a/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileReader.h"
 #include <fstream>
 
-int otbLikelihoodPathListFilter(int argc, char * argv[])
+int otbLikelihoodPathListFilter(int itkNotUsed(argc), char * argv[])
 {
 
   std::cout << std::endl;
diff --git a/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilterNew.cxx b/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilterNew.cxx
index 66c41a4..7c74ed4 100644
--- a/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbPolyLineParametricPathWithValue.h"
 #include "otbImage.h"
 
-int otbLikelihoodPathListFilterNew(int argc, char * argv[])
+int otbLikelihoodPathListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                  PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbLineCorrelationDetector.cxx b/Testing/Code/FeatureExtraction/otbLineCorrelationDetector.cxx
index b92e484..84aba3e 100644
--- a/Testing/Code/FeatureExtraction/otbLineCorrelationDetector.cxx
+++ b/Testing/Code/FeatureExtraction/otbLineCorrelationDetector.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbLineCorrelationDetectorImageFilter.h"
 
-int otbLineCorrelationDetector(int argc, char* argv[])
+int otbLineCorrelationDetector(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorLinear.cxx b/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorLinear.cxx
index 404c234..23861ab 100644
--- a/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorLinear.cxx
+++ b/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorLinear.cxx
@@ -28,7 +28,7 @@
 
 #include "itkLinearInterpolateImageFunction.h"
 
-int otbLineCorrelationDetectorLinear(int argc, char* argv[])
+int otbLineCorrelationDetectorLinear(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename1 = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorNew.cxx b/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorNew.cxx
index bbdaa2e..69a05fa 100644
--- a/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorNew.cxx
@@ -23,7 +23,7 @@
 
 #include "otbLineCorrelationDetectorImageFilter.h"
 
-int otbLineCorrelationDetectorNew(int argc, char* argv[])
+int otbLineCorrelationDetectorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef double        OutputPixelType;
diff --git a/Testing/Code/FeatureExtraction/otbLineDetectorBaseNew.cxx b/Testing/Code/FeatureExtraction/otbLineDetectorBaseNew.cxx
index 4a5768d..7453d91 100644
--- a/Testing/Code/FeatureExtraction/otbLineDetectorBaseNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbLineDetectorBaseNew.cxx
@@ -23,7 +23,7 @@
 
 #include "otbLineDetectorImageFilterBase.h"
 
-int otbLineDetectorBaseNew(int argc, char* argv[])
+int otbLineDetectorBaseNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef double        OutputPixelType;
diff --git a/Testing/Code/FeatureExtraction/otbLineRatioDetector.cxx b/Testing/Code/FeatureExtraction/otbLineRatioDetector.cxx
index 8b4082a..51a9e51 100644
--- a/Testing/Code/FeatureExtraction/otbLineRatioDetector.cxx
+++ b/Testing/Code/FeatureExtraction/otbLineRatioDetector.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbLineRatioDetectorImageFilter.h"
 
-int otbLineRatioDetector(int argc, char* argv[])
+int otbLineRatioDetector(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbLineRatioDetectorLinear.cxx b/Testing/Code/FeatureExtraction/otbLineRatioDetectorLinear.cxx
index fbf5ebd..a1f0ebf 100644
--- a/Testing/Code/FeatureExtraction/otbLineRatioDetectorLinear.cxx
+++ b/Testing/Code/FeatureExtraction/otbLineRatioDetectorLinear.cxx
@@ -28,7 +28,7 @@
 
 #include "itkLinearInterpolateImageFunction.h"
 
-int otbLineRatioDetectorLinear(int argc, char* argv[])
+int otbLineRatioDetectorLinear(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename1 = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbLineRatioDetectorNew.cxx b/Testing/Code/FeatureExtraction/otbLineRatioDetectorNew.cxx
index 4b08092..9c08380 100644
--- a/Testing/Code/FeatureExtraction/otbLineRatioDetectorNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbLineRatioDetectorNew.cxx
@@ -24,7 +24,7 @@
 #include "otbImage.h"
 #include "otbLineRatioDetectorImageFilter.h"
 
-int otbLineRatioDetectorNew(int argc, char* argv[])
+int otbLineRatioDetectorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef double        OutputPixelType;
diff --git a/Testing/Code/FeatureExtraction/otbLineSegmentDetector.cxx b/Testing/Code/FeatureExtraction/otbLineSegmentDetector.cxx
index bffcd46..756b4be 100644
--- a/Testing/Code/FeatureExtraction/otbLineSegmentDetector.cxx
+++ b/Testing/Code/FeatureExtraction/otbLineSegmentDetector.cxx
@@ -23,7 +23,7 @@
 #include "otbVectorDataFileWriter.h"
 #include "otbImageFileWriter.h"
 
-int otbLineSegmentDetectorNew(int argc, char * argv[])
+int otbLineSegmentDetectorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef float InputPixelType;
@@ -98,7 +98,7 @@ int otbLineSegmentDetector(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbLineSegmentDetector_8b_16b_compare(int argc, char * argv[])
+int otbLineSegmentDetector_8b_16b_compare(int itkNotUsed(argc), char * argv[])
 {
   const char * infname8    = argv[1];
   const char * infname16   = argv[2];
@@ -110,13 +110,11 @@ int otbLineSegmentDetector_8b_16b_compare(int argc, char * argv[])
   typedef otb::Image<PixelType8>                                      ImageType8;
   typedef otb::ImageFileReader<ImageType8>                            ReaderType8;
   typedef otb::LineSegmentDetector<ImageType8, double>                LSDFilterType8;
-  typedef otb::ImageFileWriter<ImageType8>                            WriterType8;
 
   typedef unsigned short                                              PixelType16;
   typedef otb::Image<PixelType16>                                     ImageType16;
   typedef otb::ImageFileReader<ImageType16>                           ReaderType16;
   typedef otb::LineSegmentDetector<ImageType16, double>               LSDFilterType16;
-  typedef otb::ImageFileWriter<ImageType16>                           WriterType16;
 
   typedef LSDFilterType8::VectorDataType                              VectorDataType;
   typedef otb::VectorDataFileWriter<VectorDataType>                   VectorDataWriterType;
diff --git a/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilter.cxx b/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilter.cxx
index 8900379..0104f9b 100644
--- a/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilter.cxx
@@ -26,7 +26,7 @@
 #include <iostream>
 #include <fstream>
 
-int otbLineSpatialObjectListToRightAnglePointSetFilter(int argc, char * argv[])
+int otbLineSpatialObjectListToRightAnglePointSetFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname   = argv[1];
   const char * outfname  = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilterByStepsOutputAscii.cxx b/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilterByStepsOutputAscii.cxx
index 54903f2..0ed4bc1 100644
--- a/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilterByStepsOutputAscii.cxx
+++ b/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilterByStepsOutputAscii.cxx
@@ -27,7 +27,7 @@
 #include <iostream>
 #include <fstream>
 
-int otbLineSpatialObjectListToRightAnglePointSetFilterByStepsOutputAscii(int argc, char * argv[])
+int otbLineSpatialObjectListToRightAnglePointSetFilterByStepsOutputAscii(int itkNotUsed(argc), char * argv[])
 {
   const char * infname   = argv[1];
   const char * outfname  = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilterNew.cxx b/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilterNew.cxx
index 37f0ab7..cd0e685 100644
--- a/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbLineSpatialObjectList.h"
 #include "itkPointSet.h"
 
-int otbLineSpatialObjectListToRightAnglePointSetFilterNew(int argc, char * argv[])
+int otbLineSpatialObjectListToRightAnglePointSetFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef float PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbLinkPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbLinkPathListFilter.cxx
index c43ca29..d9d5719 100644
--- a/Testing/Code/FeatureExtraction/otbLinkPathListFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbLinkPathListFilter.cxx
@@ -23,7 +23,7 @@
 #include <fstream>
 #include <cstdlib>
 
-int otbLinkPathListFilter(int argc, char * argv[])
+int otbLinkPathListFilter(int itkNotUsed(argc), char * argv[])
 {
 
   std::cout << std::endl;
diff --git a/Testing/Code/FeatureExtraction/otbLinkPathListFilterNew.cxx b/Testing/Code/FeatureExtraction/otbLinkPathListFilterNew.cxx
index 6b0c088..0344607 100644
--- a/Testing/Code/FeatureExtraction/otbLinkPathListFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbLinkPathListFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "itkPolyLineParametricPath.h"
 #include <cstdlib>
 
-int otbLinkPathListFilterNew(int argc, char * argv[])
+int otbLinkPathListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension> PathType;
diff --git a/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionNew.cxx b/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionNew.cxx
index 962db95..f3a27c7 100644
--- a/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionNew.cxx
@@ -21,7 +21,7 @@
 #include "otbImage.h"
 #include "otbLocalHistogramImageFunction.h"
 
-int otbLocalHistogramImageFunctionNew(int argc, char * argv[])
+int otbLocalHistogramImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionTest.cxx b/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionTest.cxx
index 747e96b..6aa5727 100644
--- a/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionTest.cxx
+++ b/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionTest.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbLocalHistogramImageFunction.h"
 
-int otbLocalHistogramImageFunctionTest(int argc, char * argv[])
+int otbLocalHistogramImageFunctionTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename  = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbLocalHough.cxx b/Testing/Code/FeatureExtraction/otbLocalHough.cxx
index 6492cc8..0853af0 100644
--- a/Testing/Code/FeatureExtraction/otbLocalHough.cxx
+++ b/Testing/Code/FeatureExtraction/otbLocalHough.cxx
@@ -31,7 +31,7 @@
 #include <iostream>
 #include <fstream>
 
-int otbLocalHough(int argc, char* argv[])
+int otbLocalHough(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outfname  = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbLocalHoughDraw.cxx b/Testing/Code/FeatureExtraction/otbLocalHoughDraw.cxx
index a981b30..d3b1387 100644
--- a/Testing/Code/FeatureExtraction/otbLocalHoughDraw.cxx
+++ b/Testing/Code/FeatureExtraction/otbLocalHoughDraw.cxx
@@ -36,7 +36,7 @@
 
 #include "itkRescaleIntensityImageFilter.h"
 
-int otbLocalHoughDraw(int argc, char* argv[])
+int otbLocalHoughDraw(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbLocalHoughNew.cxx b/Testing/Code/FeatureExtraction/otbLocalHoughNew.cxx
index ef22328..a75e37d 100644
--- a/Testing/Code/FeatureExtraction/otbLocalHoughNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbLocalHoughNew.cxx
@@ -25,7 +25,7 @@
 
 #include "otbLocalHoughFilter.h"
 
-int otbLocalHoughNew(int argc, char* argv[])
+int otbLocalHoughNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbMetaImageFunction.cxx b/Testing/Code/FeatureExtraction/otbMetaImageFunction.cxx
index 6c30ead..9fc7c09 100644
--- a/Testing/Code/FeatureExtraction/otbMetaImageFunction.cxx
+++ b/Testing/Code/FeatureExtraction/otbMetaImageFunction.cxx
@@ -36,14 +36,14 @@ typedef otb::MetaImageFunction<PrecisionType, double>                 MetaImageF
 typedef MetaImageFunctionType::PointType                              PointType;
 typedef MetaImageFunctionType::OutputType                             OutputType;
 
-int otbMetaImageFunctionNew(int argc, char * argv[])
+int otbMetaImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   MetaImageFunctionType::Pointer function = MetaImageFunctionType::New();
 
   return EXIT_SUCCESS;
 }
 
-int otbMetaImageFunction(int argc, char * argv[])
+int otbMetaImageFunction(int itkNotUsed(argc), char * argv[])
 {
   // Read the input image
   ReaderType::Pointer   reader = ReaderType::New();
diff --git a/Testing/Code/FeatureExtraction/otbModulusAndDirectionImageFiltersNew.cxx b/Testing/Code/FeatureExtraction/otbModulusAndDirectionImageFiltersNew.cxx
index 7e697ac..63b4e39 100644
--- a/Testing/Code/FeatureExtraction/otbModulusAndDirectionImageFiltersNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbModulusAndDirectionImageFiltersNew.cxx
@@ -24,7 +24,7 @@
 #include "otbImageToModulusAndDirectionImageFilter.h"
 #include "otbModulusAndDirectionImageToImageFilter.h"
 
-int otbModulusAndDirectionImageFiltersNew(int argc, char* argv[])
+int otbModulusAndDirectionImageFiltersNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef double        OutputPixelType;
diff --git a/Testing/Code/FeatureExtraction/otbMultiplyByScalarImageTest.cxx b/Testing/Code/FeatureExtraction/otbMultiplyByScalarImageTest.cxx
index ff86bd4..a5444cd 100644
--- a/Testing/Code/FeatureExtraction/otbMultiplyByScalarImageTest.cxx
+++ b/Testing/Code/FeatureExtraction/otbMultiplyByScalarImageTest.cxx
@@ -23,7 +23,7 @@
 #include "itkImageRegionIteratorWithIndex.h"
 #include "otbMultiplyByScalarImageFilter.h"
 
-int otbMultiplyByScalarImageFilterTest(int argc, char * argv[])
+int otbMultiplyByScalarImageFilterTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // Define the dimension of the images
   const unsigned int ImageDimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.cxx b/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.cxx
index 06febfc..ac20f12 100644
--- a/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "itkGradientRecursiveGaussianImageFilter.h"
 
-int otbNeighborhoodScalarProductFilter(int argc, char * argv[])
+int otbNeighborhoodScalarProductFilter(int itkNotUsed(argc), char * argv[])
 {
 
   const char * infname = argv[1];
@@ -39,7 +39,6 @@ int otbNeighborhoodScalarProductFilter(int argc, char * argv[])
   typedef otb::NeighborhoodScalarProductFilter<VectorImageType, ImageType, ImageType> FilterType;
   typedef otb::ImageFileReader<ImageType>                                             ReaderType;
   typedef otb::ImageFileWriter<ImageType>                                             WriterType;
-  typedef otb::ImageFileWriter<VectorImageType>                                       TempWriter;
   typedef itk::GradientRecursiveGaussianImageFilter<ImageType, VectorImageType>       GradientFilterType;
 
   // Instantiating object
diff --git a/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilterNew.cxx b/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilterNew.cxx
index aed222f..a9e7f78 100644
--- a/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbNeighborhoodScalarProductFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbNeighborhoodScalarProductFilter.h"
 #include "otbImage.h"
 
-int otbNeighborhoodScalarProductFilterNew(int argc, char * argv[])
+int otbNeighborhoodScalarProductFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                                 PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.cxx b/Testing/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.cxx
index e840305..30e70dc 100644
--- a/Testing/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbNonMaxRemovalByDirectionFilter(int argc, char * argv[])
+int otbNonMaxRemovalByDirectionFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                                                               PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilterNew.cxx b/Testing/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilterNew.cxx
index 21c3ae3..ed01fae 100644
--- a/Testing/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbNonMaxRemovalByDirectionFilter.h"
 #include "otbImage.h"
 
-int otbNonMaxRemovalByDirectionFilterNew(int argc, char * argv[])
+int otbNonMaxRemovalByDirectionFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                               PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbOrientationPath.cxx b/Testing/Code/FeatureExtraction/otbOrientationPath.cxx
index 5cf0e30..80cb8d8 100644
--- a/Testing/Code/FeatureExtraction/otbOrientationPath.cxx
+++ b/Testing/Code/FeatureExtraction/otbOrientationPath.cxx
@@ -24,7 +24,7 @@
 #include "itkPolyLineParametricPath.h"
 #include "itkMacro.h"
 
-int otbOrientationPath(int argc, char * argv[])
+int otbOrientationPath(int itkNotUsed(argc), char * argv[])
 {
   double Theta((double) ::atof(argv[1]));
 
diff --git a/Testing/Code/FeatureExtraction/otbOrientationPathNew.cxx b/Testing/Code/FeatureExtraction/otbOrientationPathNew.cxx
index 32826ec..0f75157 100644
--- a/Testing/Code/FeatureExtraction/otbOrientationPathNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbOrientationPathNew.cxx
@@ -23,7 +23,7 @@
 #include "itkPolyLineParametricPath.h"
 #include "itkMacro.h"
 
-int otbOrientationPathNew(int argc, char * argv[])
+int otbOrientationPathNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension> PathType;
diff --git a/Testing/Code/FeatureExtraction/otbParallelLinePathListFilter.cxx b/Testing/Code/FeatureExtraction/otbParallelLinePathListFilter.cxx
index 8e87eed..ad6d8de 100644
--- a/Testing/Code/FeatureExtraction/otbParallelLinePathListFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbParallelLinePathListFilter.cxx
@@ -21,7 +21,7 @@
 #include "itkPolyLineParametricPath.h"
 #include <cstdlib>
 
-int otbParallelLinePathListFilter(int argc, char * argv[])
+int otbParallelLinePathListFilter(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   // We create some lines
diff --git a/Testing/Code/FeatureExtraction/otbParallelLinePathListFilterNew.cxx b/Testing/Code/FeatureExtraction/otbParallelLinePathListFilterNew.cxx
index 49a796e..ece4675 100644
--- a/Testing/Code/FeatureExtraction/otbParallelLinePathListFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbParallelLinePathListFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkPolyLineParametricPath.h"
 #include <cstdlib>
 
-int otbParallelLinePathListFilterNew(int argc, char * argv[])
+int otbParallelLinePathListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension> PathType;
diff --git a/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirection.cxx b/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirection.cxx
index 9a86c7a..db8bf2f 100644
--- a/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirection.cxx
+++ b/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirection.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbPixelSuppressionByDirectionImageFilter.h"
 
-int otbPixelSuppressionByDirection(int argc, char* argv[])
+int otbPixelSuppressionByDirection(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename1  = argv[1];
   const char * inputFilename2  = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirectionNew.cxx b/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirectionNew.cxx
index 92e9e04..ad30c6d 100644
--- a/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirectionNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirectionNew.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbPixelSuppressionByDirectionImageFilter.h"
 
-int otbPixelSuppressionByDirectionNew(int argc, char* argv[])
+int otbPixelSuppressionByDirectionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   typedef double OutputPixelType;
@@ -35,10 +35,6 @@ int otbPixelSuppressionByDirectionNew(int argc, char* argv[])
   typedef otb::Image<InputPixelType,  Dimension> InputImageType;
   typedef otb::Image<OutputPixelType, Dimension> OutputImageType;
 
-  typedef otb::ImageFileReader<InputImageType>  ReaderType1;
-  typedef otb::ImageFileReader<InputImageType>  ReaderType2;
-  typedef otb::ImageFileWriter<OutputImageType> WriterType;
-
   typedef otb::PixelSuppressionByDirectionImageFilter<InputImageType, OutputImageType> FilterType;
 
   FilterType::Pointer filter = FilterType::New();
diff --git a/Testing/Code/FeatureExtraction/otbRadiometricMomentsImageFilter.cxx b/Testing/Code/FeatureExtraction/otbRadiometricMomentsImageFilter.cxx
index 0e381c1..f840079 100644
--- a/Testing/Code/FeatureExtraction/otbRadiometricMomentsImageFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbRadiometricMomentsImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileWriter.h"
 #include "otbRadiometricMomentsImageFilter.h"
 
-int otbRadiometricMomentsImageFilterNew(int argc, char * argv[])
+int otbRadiometricMomentsImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef float InputPixelType;
   const unsigned int Dimension = 2;
@@ -40,7 +40,7 @@ int otbRadiometricMomentsImageFilterNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbRadiometricMomentsImageFilter(int argc, char * argv[])
+int otbRadiometricMomentsImageFilter(int itkNotUsed(argc), char * argv[])
 {
   typedef float InputPixelType;
   const unsigned int Dimension = 2;
@@ -69,4 +69,3 @@ int otbRadiometricMomentsImageFilter(int argc, char * argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/FeatureExtraction/otbRadiometricMomentsImageFunction.cxx b/Testing/Code/FeatureExtraction/otbRadiometricMomentsImageFunction.cxx
index 32afb1d..3005813 100644
--- a/Testing/Code/FeatureExtraction/otbRadiometricMomentsImageFunction.cxx
+++ b/Testing/Code/FeatureExtraction/otbRadiometricMomentsImageFunction.cxx
@@ -27,7 +27,7 @@
 #include "otbImageFileReader.h"
 #include "otbRadiometricMomentsImageFunction.h"
 
-int otbRadiometricMomentsImageFunctionNew(int argc, char * argv[])
+int otbRadiometricMomentsImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   const unsigned int Dimension = 2;
@@ -44,7 +44,7 @@ int otbRadiometricMomentsImageFunctionNew(int argc, char * argv[])
 }
 
 
-int otbRadiometricMomentsImageFunction(int argc, char * argv[])
+int otbRadiometricMomentsImageFunction(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename  = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbRealMomentsImageFunction.cxx b/Testing/Code/FeatureExtraction/otbRealMomentsImageFunction.cxx
index 1abfaa4..54ea3a1 100644
--- a/Testing/Code/FeatureExtraction/otbRealMomentsImageFunction.cxx
+++ b/Testing/Code/FeatureExtraction/otbRealMomentsImageFunction.cxx
@@ -27,7 +27,7 @@
 #include "otbImageFileReader.h"
 #include "otbRealMomentsImageFunction.h"
 
-int otbRealMomentsImageFunctionNew(int argc, char * argv[])
+int otbRealMomentsImageFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   const unsigned int Dimension = 2;
@@ -43,7 +43,7 @@ int otbRealMomentsImageFunctionNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbRealMomentsImageFunction(int argc, char * argv[])
+int otbRealMomentsImageFunction(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   unsigned int p((unsigned int) ::atoi(argv[2]));
diff --git a/Testing/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.cxx
index d944e66..b622f18 100644
--- a/Testing/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.cxx
@@ -25,7 +25,7 @@
 #include <stdio.h>
 #include <iostream>
 
-int otbRegionImageToRectangularPathListFilter(int argc, char * argv[])
+int otbRegionImageToRectangularPathListFilter(int itkNotUsed(argc), char * argv[])
 {
 
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilterNew.cxx b/Testing/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilterNew.cxx
index 0ceb82c..b3f62ed 100644
--- a/Testing/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImage.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbRegionImageToRectangularPathListFilterNew(int argc, char * argv[])
+int otbRegionImageToRectangularPathListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned short InputPixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbRemoveCarvingPathFilterNew.cxx b/Testing/Code/FeatureExtraction/otbRemoveCarvingPathFilterNew.cxx
index fe15869..de09ec7 100644
--- a/Testing/Code/FeatureExtraction/otbRemoveCarvingPathFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbRemoveCarvingPathFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbRemoveCarvingPathFilter.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbRemoveCarvingPathFilterNew(int argc, char* argv[])
+int otbRemoveCarvingPathFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilter.cxx b/Testing/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilter.cxx
index 37afb88..049f3f2 100644
--- a/Testing/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilter.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbRemoveIsolatedByDirectionFilter(int argc, char * argv[])
+int otbRemoveIsolatedByDirectionFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilterNew.cxx b/Testing/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilterNew.cxx
index 5fa34d4..0f8d4b5 100644
--- a/Testing/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbRemoveIsolatedByDirectionFilter.h"
 #include "otbImage.h"
 
-int otbRemoveIsolatedByDirectionFilterNew(int argc, char * argv[])
+int otbRemoveIsolatedByDirectionFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                                PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.cxx
index 5388738..0e9f47d 100644
--- a/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.cxx
@@ -22,7 +22,7 @@
 #include <fstream>
 #include <cstdlib>
 
-int otbRemoveTortuousPathListFilter(int argc, char * argv[])
+int otbRemoveTortuousPathListFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * outfname = argv[1];
   const double threshold = atof(argv[2]);
diff --git a/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilterNew.cxx b/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilterNew.cxx
index 4b46f80..2ed892b 100644
--- a/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkPolyLineParametricPath.h"
 #include <cstdlib>
 
-int otbRemoveTortuousPathListFilterNew(int argc, char * argv[])
+int otbRemoveTortuousPathListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension>      PathType;
diff --git a/Testing/Code/FeatureExtraction/otbRemoveWrongDirectionFilter.cxx b/Testing/Code/FeatureExtraction/otbRemoveWrongDirectionFilter.cxx
index 2f6156a..969187c 100644
--- a/Testing/Code/FeatureExtraction/otbRemoveWrongDirectionFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbRemoveWrongDirectionFilter.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbRemoveWrongDirectionFilter(int argc, char * argv[])
+int otbRemoveWrongDirectionFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                                                           PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbRemoveWrongDirectionFilterNew.cxx b/Testing/Code/FeatureExtraction/otbRemoveWrongDirectionFilterNew.cxx
index 04ceb9f..d435d8e 100644
--- a/Testing/Code/FeatureExtraction/otbRemoveWrongDirectionFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbRemoveWrongDirectionFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbRemoveWrongDirectionFilter.h"
 #include "otbImage.h"
 
-int otbRemoveWrongDirectionFilterNew(int argc, char * argv[])
+int otbRemoveWrongDirectionFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                           PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbRoadExtractionFilter.cxx b/Testing/Code/FeatureExtraction/otbRoadExtractionFilter.cxx
index dcbb988..44781be 100644
--- a/Testing/Code/FeatureExtraction/otbRoadExtractionFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbRoadExtractionFilter.cxx
@@ -27,7 +27,7 @@
 #include "otbPolyLineParametricPathWithValue.h"
 #include "otbMath.h"
 
-int otbRoadExtractionFilter(int argc, char * argv[])
+int otbRoadExtractionFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<double, Dimension>                     InputImageType;
@@ -37,7 +37,6 @@ int otbRoadExtractionFilter(int argc, char * argv[])
   typedef otb::ImageFileReader<InputImageType>                                ReaderType;
   typedef otb::ImageFileWriter<OutputImageType>                               WriterType;
   typedef otb::RoadExtractionFilter<InputImageType, PathType>                 RoadExtractionFilterType;
-  typedef RoadExtractionFilterType::OutputPathListType                        OutputPathListType;
   typedef RoadExtractionFilterType::InputPixelType                            InputPixelType;
   typedef otb::DrawPathListFilter<OutputImageType, PathType, OutputImageType> DrawPathFilterType;
 
@@ -81,7 +80,8 @@ int otbRoadExtractionFilter(int argc, char * argv[])
 
   reader->GenerateOutputInformation();
   OutputImageType::Pointer image = OutputImageType::New();
-  image->SetRegions(reader->GetOutput()->GetLargestPossibleRegion());
+  image->CopyInformation(reader->GetOutput());
+  image->SetRegions(image->GetLargestPossibleRegion());
   image->Allocate();
   image->FillBuffer(0);
 
diff --git a/Testing/Code/FeatureExtraction/otbRoadExtractionFilterNew.cxx b/Testing/Code/FeatureExtraction/otbRoadExtractionFilterNew.cxx
index 02f4f13..b25129f 100644
--- a/Testing/Code/FeatureExtraction/otbRoadExtractionFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbRoadExtractionFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbVectorImage.h"
 #include "otbRoadExtractionFilter.h"
 
-int otbRoadExtractionFilterNew(int argc, char * argv[])
+int otbRoadExtractionFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<double, Dimension>    InputImageType;
diff --git a/Testing/Code/FeatureExtraction/otbSFSTexturesImageFilterNew.cxx b/Testing/Code/FeatureExtraction/otbSFSTexturesImageFilterNew.cxx
index 8981698..02bc843 100644
--- a/Testing/Code/FeatureExtraction/otbSFSTexturesImageFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbSFSTexturesImageFilterNew.cxx
@@ -21,13 +21,11 @@
 #include "otbVectorImage.h"
 #include "otbImage.h"
 
-int otbSFSTexturesImageFilterNew(int argc, char * argv[])
+int otbSFSTexturesImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                 PixelType;
   typedef otb::Image<PixelType, Dimension>       ImageType;
-  typedef otb::VectorImage<PixelType, Dimension> VectorImageType;
-  //typedef otb::ImageFileWriter<VectorImageType> WriterType;
   typedef otb::SFSTexturesImageFilter<ImageType, ImageType> FilterType;
   FilterType::Pointer filter = FilterType::New();
 
diff --git a/Testing/Code/FeatureExtraction/otbSFSTexturesImageFilterTest.cxx b/Testing/Code/FeatureExtraction/otbSFSTexturesImageFilterTest.cxx
index 0d91093..8db377f 100644
--- a/Testing/Code/FeatureExtraction/otbSFSTexturesImageFilterTest.cxx
+++ b/Testing/Code/FeatureExtraction/otbSFSTexturesImageFilterTest.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbSFSTexturesImageFilterTest(int argc, char * argv[])
+int otbSFSTexturesImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
@@ -40,7 +40,6 @@ int otbSFSTexturesImageFilterTest(int argc, char * argv[])
   double       alpha                  = atof(argv[11]);
 
   typedef otb::Image<PixelType, Dimension>                  ImageType;
-  typedef ImageType::PixelType                              InputPixelType;
   typedef otb::ImageFileReader<ImageType>                   ReaderType;
   typedef otb::ImageFileWriter<ImageType>                   WriterType;
   typedef otb::SFSTexturesImageFilter<ImageType, ImageType> FilterType;
diff --git a/Testing/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.cxx b/Testing/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.cxx
index 41231a7..e746c4c 100644
--- a/Testing/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilter.cxx
@@ -62,14 +62,14 @@ int otbScalarImageToAdvancedTexturesFilter(int argc, char * argv[])
   offset[1] = offsety;
 
   filter->SetInput(reader->GetOutput());
-  filter->SetNumberOfBinsPerAxis(nbBins);
   filter->SetRadius(sradius);
   filter->SetOffset(offset);
 
   otb::StandardFilterWatcher watcher(filter, "Textures filter");
 
+  filter->SetNumberOfBinsPerAxis(nbBins);
   filter->SetInputImageMinimum(0);
-  filter->SetInputImageMaximum(256);
+  filter->SetInputImageMaximum(255);
 
   // Write outputs
   std::ostringstream oss;
@@ -89,6 +89,12 @@ int otbScalarImageToAdvancedTexturesFilter(int argc, char * argv[])
   writer->Update();
 
   oss.str("");
+  oss << outprefix << "Dissimilarity.tif";
+  writer->SetInput(filter->GetDissimilarityOutput());
+  writer->SetFileName(oss.str());
+  writer->Update();
+
+  oss.str("");
   oss << outprefix << "SumAverage.tif";
   writer->SetInput(filter->GetSumAverageOutput());
   writer->SetFileName(oss.str());
diff --git a/Testing/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilterNew.cxx b/Testing/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilterNew.cxx
index b3d05e2..abaf89d 100644
--- a/Testing/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbScalarImageToAdvancedTexturesFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbScalarImageToAdvancedTexturesFilter.h"
 #include "otbImage.h"
 
-int otbScalarImageToAdvancedTexturesFilterNew(int argc, char * argv[])
+int otbScalarImageToAdvancedTexturesFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                         PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbScalarImageToHigherOrderTexturesFilter.cxx b/Testing/Code/FeatureExtraction/otbScalarImageToHigherOrderTexturesFilter.cxx
index 247985f..a72f059 100644
--- a/Testing/Code/FeatureExtraction/otbScalarImageToHigherOrderTexturesFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbScalarImageToHigherOrderTexturesFilter.cxx
@@ -35,7 +35,7 @@ typedef RunLengthFeaturesFilterType::OffsetType          OffsetType;
 typedef RunLengthFeaturesFilterType::OffsetVector        OffsetVector;
 typedef RunLengthFeaturesFilterType::OffsetVectorPointer OffsetVectorPointer;
 
-int otbScalarImageToHigherOrderTexturesFilterNew(int argc, char * argv[])
+int otbScalarImageToHigherOrderTexturesFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   TexturesFilterType::Pointer filter = TexturesFilterType::New();
 
diff --git a/Testing/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.cxx b/Testing/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.cxx
index 1535a2a..1814bba 100644
--- a/Testing/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.cxx
@@ -55,11 +55,11 @@ int otbScalarImageToPanTexTextureFilter(int argc, char * argv[])
   sradius.Fill(radius);
 
   filter->SetInput(reader->GetOutput());
-  filter->SetNumberOfBinsPerAxis(nbBins);
   filter->SetRadius(sradius);
 
   otb::StandardFilterWatcher watcher(filter, "Textures filter");
 
+  filter->SetNumberOfBinsPerAxis(nbBins);
   filter->SetInputImageMinimum(0);
   filter->SetInputImageMaximum(255);
 
diff --git a/Testing/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilterNew.cxx b/Testing/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilterNew.cxx
index 8d88ffc..f23d2ae 100644
--- a/Testing/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbScalarImageToPanTexTextureFilter.h"
 #include "otbImage.h"
 
-int otbScalarImageToPanTexTextureFilterNew(int argc, char * argv[])
+int otbScalarImageToPanTexTextureFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                      PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbScalarImageToTexturesFilter.cxx b/Testing/Code/FeatureExtraction/otbScalarImageToTexturesFilter.cxx
index 66b9adc..f2ba220 100644
--- a/Testing/Code/FeatureExtraction/otbScalarImageToTexturesFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbScalarImageToTexturesFilter.cxx
@@ -62,14 +62,14 @@ int otbScalarImageToTexturesFilter(int argc, char * argv[])
   offset[1] = offsety;
 
   filter->SetInput(reader->GetOutput());
-  filter->SetNumberOfBinsPerAxis(nbBins);
   filter->SetRadius(sradius);
   filter->SetOffset(offset);
 
   otb::StandardFilterWatcher watcher(filter, "Textures filter");
 
+  filter->SetNumberOfBinsPerAxis(nbBins);
   filter->SetInputImageMinimum(0);
-  filter->SetInputImageMaximum(256);
+  filter->SetInputImageMaximum(255);
 
   // Write outputs
   std::ostringstream oss;
diff --git a/Testing/Code/FeatureExtraction/otbScalarImageToTexturesFilterNew.cxx b/Testing/Code/FeatureExtraction/otbScalarImageToTexturesFilterNew.cxx
index 7770821..a84ebd8 100644
--- a/Testing/Code/FeatureExtraction/otbScalarImageToTexturesFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbScalarImageToTexturesFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbScalarImageToTexturesFilter.h"
 #include "otbImage.h"
 
-int otbScalarImageToTexturesFilterNew(int argc, char * argv[])
+int otbScalarImageToTexturesFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                 PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbSimplePointCountStrategyTest.cxx b/Testing/Code/FeatureExtraction/otbSimplePointCountStrategyTest.cxx
index e9eceb6..19e18d1 100644
--- a/Testing/Code/FeatureExtraction/otbSimplePointCountStrategyTest.cxx
+++ b/Testing/Code/FeatureExtraction/otbSimplePointCountStrategyTest.cxx
@@ -21,14 +21,13 @@
 #include "otbImage.h"
 #include "itkVariableLengthVector.h"
 
-int otbSimplePointCountStrategyTest(int argc, char * argv[])
+int otbSimplePointCountStrategyTest(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   const unsigned int Dimension = 2;
   typedef float RealType;
 
   typedef otb::Image<RealType, Dimension>     ImageType;
-  typedef ImageType::PointType                PointType;
   typedef itk::VariableLengthVector<RealType> RealVectorType;
 
   typedef itk::PointSet<RealVectorType, Dimension> PointSetType;
diff --git a/Testing/Code/FeatureExtraction/otbSimplifyManyPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbSimplifyManyPathListFilter.cxx
index aa8d289..d4e6d15 100644
--- a/Testing/Code/FeatureExtraction/otbSimplifyManyPathListFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbSimplifyManyPathListFilter.cxx
@@ -27,7 +27,7 @@
  * of the otb::UnaryFunctorObjectListFilter
  */
 
-int otbSimplifyManyPathListFilter(int argc, char * argv[])
+int otbSimplifyManyPathListFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * outfname = argv[1];
   const double tolerance = atof(argv[2]);
diff --git a/Testing/Code/FeatureExtraction/otbSimplifyPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbSimplifyPathListFilter.cxx
index f16f72a..52db85e 100644
--- a/Testing/Code/FeatureExtraction/otbSimplifyPathListFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbSimplifyPathListFilter.cxx
@@ -22,7 +22,7 @@
 #include <fstream>
 #include <cstdlib>
 
-int otbSimplifyPathListFilter(int argc, char * argv[])
+int otbSimplifyPathListFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * outfname = argv[1];
   const double tolerance = atof(argv[2]);
diff --git a/Testing/Code/FeatureExtraction/otbSimplifyPathListFilterNew.cxx b/Testing/Code/FeatureExtraction/otbSimplifyPathListFilterNew.cxx
index 3cbb626..3adb3e8 100644
--- a/Testing/Code/FeatureExtraction/otbSimplifyPathListFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbSimplifyPathListFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkPolyLineParametricPath.h"
 #include <cstdlib>
 
-int otbSimplifyPathListFilterNew(int argc, char * argv[])
+int otbSimplifyPathListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef itk::PolyLineParametricPath<Dimension> PathType;
diff --git a/Testing/Code/FeatureExtraction/otbSqrtSpectralAngleImageFilter.cxx b/Testing/Code/FeatureExtraction/otbSqrtSpectralAngleImageFilter.cxx
index be59cc0..f225efb 100644
--- a/Testing/Code/FeatureExtraction/otbSqrtSpectralAngleImageFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbSqrtSpectralAngleImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbSqrtSpectralAngleImageFilter(int argc, char * argv[])
+int otbSqrtSpectralAngleImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<double, Dimension> InputImageType;
diff --git a/Testing/Code/FeatureExtraction/otbStreamingLineSegmentDetector.cxx b/Testing/Code/FeatureExtraction/otbStreamingLineSegmentDetector.cxx
index a0931cd..49113b7 100644
--- a/Testing/Code/FeatureExtraction/otbStreamingLineSegmentDetector.cxx
+++ b/Testing/Code/FeatureExtraction/otbStreamingLineSegmentDetector.cxx
@@ -24,7 +24,7 @@
 #include "otbPersistentImageToVectorDataFilter.h"
 #include "otbPersistentFilterStreamingDecorator.h"
 
-int otbStreamingLineSegmentDetectorNew(int argc, char * argv[])
+int otbStreamingLineSegmentDetectorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef float InputPixelType;
   const unsigned int Dimension = 2;
@@ -40,7 +40,7 @@ int otbStreamingLineSegmentDetectorNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbStreamingLineSegmentDetector(int argc, char * argv[])
+int otbStreamingLineSegmentDetector(int itkNotUsed(argc), char * argv[])
 {
 
   typedef float InputPixelType;
diff --git a/Testing/Code/FeatureExtraction/otbTextureFunctor.cxx b/Testing/Code/FeatureExtraction/otbTextureFunctor.cxx
index 4ee4785..e81e62c 100644
--- a/Testing/Code/FeatureExtraction/otbTextureFunctor.cxx
+++ b/Testing/Code/FeatureExtraction/otbTextureFunctor.cxx
@@ -25,7 +25,7 @@
 #include "otbTextureFunctors.h"
 
 template<class TInputImage, class TOutputImage, class TFunctor>
-int generic_TextureFunctor(int argc, char * argv[])
+int generic_TextureFunctor(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbTextureImageFunction.cxx b/Testing/Code/FeatureExtraction/otbTextureImageFunction.cxx
index 7264a9f..01ebb53 100644
--- a/Testing/Code/FeatureExtraction/otbTextureImageFunction.cxx
+++ b/Testing/Code/FeatureExtraction/otbTextureImageFunction.cxx
@@ -28,7 +28,7 @@
 #include "otbTextureFunctors.h"
 
 template<class TInputImage, class TOutputImage, class TFunctor>
-int generic_TextureImageFunction(int argc, char * argv[])
+int generic_TextureImageFunction(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetFilterNew.cxx b/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetFilterNew.cxx
index 78d2b27..aec35c1 100644
--- a/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetFilterNew.cxx
@@ -26,7 +26,7 @@
 
 #include <iostream>
 
-int otbThresholdImageToPointSetFilterNew(int argc, char* argv[])
+int otbThresholdImageToPointSetFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                       PixelType;
diff --git a/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetTest.cxx b/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetTest.cxx
index ca287f1..9b00571 100644
--- a/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetTest.cxx
+++ b/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetTest.cxx
@@ -25,7 +25,7 @@
 #include "otbThresholdImageToPointSetFilter.h"
 #include "itkPointSet.h"
 
-int otbThresholdImageToPointSetTest(int argc, char * argv[])
+int otbThresholdImageToPointSetTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbTouziEdgeDetector.cxx b/Testing/Code/FeatureExtraction/otbTouziEdgeDetector.cxx
index 4fafdcb..7d357e5 100644
--- a/Testing/Code/FeatureExtraction/otbTouziEdgeDetector.cxx
+++ b/Testing/Code/FeatureExtraction/otbTouziEdgeDetector.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbTouziEdgeDetectorImageFilter.h"
 
-int otbTouziEdgeDetector(int argc, char* argv[])
+int otbTouziEdgeDetector(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorDirection.cxx b/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorDirection.cxx
index 4d56435..581e9bc 100644
--- a/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorDirection.cxx
+++ b/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorDirection.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbTouziEdgeDetectorImageFilter.h"
 
-int otbTouziEdgeDetectorDirection(int argc, char* argv[])
+int otbTouziEdgeDetectorDirection(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorNew.cxx b/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorNew.cxx
index ae4c747..f1141b3 100644
--- a/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbTouziEdgeDetectorImageFilter.h"
 
-int otbTouziEdgeDetectorNew(int argc, char* argv[])
+int otbTouziEdgeDetectorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef double        OutputPixelType;
diff --git a/Testing/Code/FeatureExtraction/otbUrbanAreaDetectionImageFilter.cxx b/Testing/Code/FeatureExtraction/otbUrbanAreaDetectionImageFilter.cxx
index e38972c..02bef75 100644
--- a/Testing/Code/FeatureExtraction/otbUrbanAreaDetectionImageFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbUrbanAreaDetectionImageFilter.cxx
@@ -22,15 +22,13 @@
 #include "otbImageFileWriter.h"
 #include "otbUrbanAreaDetectionImageFilter.h"
 
-int otbUrbanAreaDetectionImageFilter(int argc, char * argv[])
+int otbUrbanAreaDetectionImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                                 PixelType;
   typedef otb::VectorImage<PixelType, Dimension> InputVectorImageType;
   typedef otb::Image<unsigned char, Dimension>   OutputImageType;
 
-  typedef otb::Image<double, Dimension> SingleImageType;
-
   typedef otb::ImageFileReader<InputVectorImageType> ReaderType;
 
   typedef otb::ImageFileWriter<OutputImageType> WriterType;
diff --git a/Testing/Code/FeatureExtraction/otbUrbanAreaDetectionImageFilterNew.cxx b/Testing/Code/FeatureExtraction/otbUrbanAreaDetectionImageFilterNew.cxx
index caee318..118d3f1 100644
--- a/Testing/Code/FeatureExtraction/otbUrbanAreaDetectionImageFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbUrbanAreaDetectionImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbVectorImage.h"
 #include "otbUrbanAreaDetectionImageFilter.h"
 
-int otbUrbanAreaDetectionImageFilterNew(int argc, char * argv[])
+int otbUrbanAreaDetectionImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/FeatureExtraction/otbVectorDataToRightAngleVectorDataFilter.cxx b/Testing/Code/FeatureExtraction/otbVectorDataToRightAngleVectorDataFilter.cxx
index 74b7702..15593b4 100644
--- a/Testing/Code/FeatureExtraction/otbVectorDataToRightAngleVectorDataFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbVectorDataToRightAngleVectorDataFilter.cxx
@@ -27,7 +27,7 @@
 
 #include "otbMath.h"
 
-int otbVectorDataToRightAngleVectorDataFilterNew(int argc, char * argv[])
+int otbVectorDataToRightAngleVectorDataFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   /** Typedefs */
   typedef otb::VectorData< >                    VectorDataType;
@@ -42,7 +42,7 @@ int otbVectorDataToRightAngleVectorDataFilterNew(int argc, char * argv[])
 }
 
 
-int otbVectorDataToRightAngleVectorDataFilter(int argc, char * argv[])
+int otbVectorDataToRightAngleVectorDataFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname  = argv[1];
   const char * outfname = argv[2];
@@ -71,4 +71,3 @@ int otbVectorDataToRightAngleVectorDataFilter(int argc, char * argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/FeatureExtraction/otbVectorizationPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbVectorizationPathListFilter.cxx
index b9b9213..5fbfe6a 100644
--- a/Testing/Code/FeatureExtraction/otbVectorizationPathListFilter.cxx
+++ b/Testing/Code/FeatureExtraction/otbVectorizationPathListFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbDrawPathListFilter.h"
 #include "otbImageFileWriter.h"
 
-int otbVectorizationPathListFilter(int argc, char * argv[])
+int otbVectorizationPathListFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * modfname = argv[1];
   const char * dirfname = argv[2];
diff --git a/Testing/Code/FeatureExtraction/otbVectorizationPathListFilterNew.cxx b/Testing/Code/FeatureExtraction/otbVectorizationPathListFilterNew.cxx
index 1e022d6..79a5630 100644
--- a/Testing/Code/FeatureExtraction/otbVectorizationPathListFilterNew.cxx
+++ b/Testing/Code/FeatureExtraction/otbVectorizationPathListFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImage.h"
 #include "itkPolyLineParametricPath.h"
 
-int otbVectorizationPathListFilterNew(int argc, char * argv[])
+int otbVectorizationPathListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                                           PixelType;
diff --git a/Testing/Code/Fusion/otbBayesianFusionFilter.cxx b/Testing/Code/Fusion/otbBayesianFusionFilter.cxx
index ac0beba..c8ecd71 100644
--- a/Testing/Code/Fusion/otbBayesianFusionFilter.cxx
+++ b/Testing/Code/Fusion/otbBayesianFusionFilter.cxx
@@ -24,7 +24,7 @@
 
 #include "otbBayesianFusionFilter.h"
 
-int otbBayesianFusionFilter(int argc, char * argv[])
+int otbBayesianFusionFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * multispect = argv[1];
   const char * multispectinterp = argv[2];
diff --git a/Testing/Code/Fusion/otbBayesianFusionFilterNew.cxx b/Testing/Code/Fusion/otbBayesianFusionFilterNew.cxx
index c7bfdd5..529f6a4 100644
--- a/Testing/Code/Fusion/otbBayesianFusionFilterNew.cxx
+++ b/Testing/Code/Fusion/otbBayesianFusionFilterNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbBayesianFusionFilter.h"
 
-int otbBayesianFusionFilterNew(int argc, char * argv[])
+int otbBayesianFusionFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
@@ -35,10 +35,6 @@ int otbBayesianFusionFilterNew(int argc, char * argv[])
   typedef otb::Image<PixelType,
       Dimension>
   PanchroImageType;
-  typedef otb::ImageFileReader<VectorImageType>
-  VectorReaderType;
-  typedef otb::ImageFileReader<PanchroImageType>
-  ImageReaderType;
   typedef otb::BayesianFusionFilter<VectorImageType, VectorImageType, PanchroImageType, VectorImageType> FilterType;
 
   FilterType::Pointer filter = FilterType::New();
diff --git a/Testing/Code/Fusion/otbFusionImageBaseNew.cxx b/Testing/Code/Fusion/otbFusionImageBaseNew.cxx
index 88c7d0e..d51ec9b 100644
--- a/Testing/Code/Fusion/otbFusionImageBaseNew.cxx
+++ b/Testing/Code/Fusion/otbFusionImageBaseNew.cxx
@@ -38,7 +38,7 @@ public:
 };
 }
 
-int otbFusionImageBaseNew(int argc, char * argv[])
+int otbFusionImageBaseNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char InputPixelType;
diff --git a/Testing/Code/Fusion/otbLmvmPanSharpeningFusionImageFilter.cxx b/Testing/Code/Fusion/otbLmvmPanSharpeningFusionImageFilter.cxx
index 3e48ca2..8ae09e7 100644
--- a/Testing/Code/Fusion/otbLmvmPanSharpeningFusionImageFilter.cxx
+++ b/Testing/Code/Fusion/otbLmvmPanSharpeningFusionImageFilter.cxx
@@ -24,7 +24,7 @@
 
 #include "otbLmvmPanSharpeningFusionImageFilter.h"
 
-int otbLmvmPanSharpeningFusionImageFilter(int argc, char * argv[])
+int otbLmvmPanSharpeningFusionImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * panchro = argv[1];
   const char * multispect = argv[2];
diff --git a/Testing/Code/Fusion/otbLmvmPanSharpeningFusionImageFilterNew.cxx b/Testing/Code/Fusion/otbLmvmPanSharpeningFusionImageFilterNew.cxx
index aa80449..702ed17 100644
--- a/Testing/Code/Fusion/otbLmvmPanSharpeningFusionImageFilterNew.cxx
+++ b/Testing/Code/Fusion/otbLmvmPanSharpeningFusionImageFilterNew.cxx
@@ -24,15 +24,13 @@
 
 #include "otbLmvmPanSharpeningFusionImageFilter.h"
 
-int otbLmvmPanSharpeningFusionImageFilterNew(int argc, char * argv[])
+int otbLmvmPanSharpeningFusionImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
 
   typedef otb::VectorImage<PixelType, Dimension> VectorImageType;
   typedef otb::Image<PixelType, Dimension>       PanchroImageType;
-  typedef otb::ImageFileReader<VectorImageType>  VectorReaderType;
-  typedef otb::ImageFileReader<PanchroImageType> ImageReaderType;
   typedef otb::LmvmPanSharpeningFusionImageFilter
   <PanchroImageType, VectorImageType, VectorImageType> FilterType;
 
diff --git a/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.cxx b/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.cxx
index 66594ae..4f36618 100644
--- a/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.cxx
+++ b/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.cxx
@@ -24,7 +24,7 @@
 
 #include "otbSimpleRcsPanSharpeningFusionImageFilter.h"
 
-int otbSimpleRcsPanSharpeningFusionImageFilter(int argc, char * argv[])
+int otbSimpleRcsPanSharpeningFusionImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * panchro = argv[1];
   const char * multispect = argv[2];
diff --git a/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilterNew.cxx b/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilterNew.cxx
index 7fc47db..d4857aa 100644
--- a/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilterNew.cxx
+++ b/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilterNew.cxx
@@ -24,15 +24,13 @@
 
 #include "otbSimpleRcsPanSharpeningFusionImageFilter.h"
 
-int otbSimpleRcsPanSharpeningFusionImageFilterNew(int argc, char * argv[])
+int otbSimpleRcsPanSharpeningFusionImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef double PixelType;
 
   typedef otb::VectorImage<PixelType, Dimension> VectorImageType;
   typedef otb::Image<PixelType, Dimension>       PanchroImageType;
-  typedef otb::ImageFileReader<VectorImageType>  VectorReaderType;
-  typedef otb::ImageFileReader<PanchroImageType> ImageReaderType;
   typedef otb::SimpleRcsPanSharpeningFusionImageFilter
   <PanchroImageType, VectorImageType, VectorImageType> FilterType;
 
diff --git a/Testing/Code/Fuzzy/otbConfusionMatrixToMassOfBeliefTest.cxx b/Testing/Code/Fuzzy/otbConfusionMatrixToMassOfBeliefTest.cxx
index 592eb79..64ec90f 100644
--- a/Testing/Code/Fuzzy/otbConfusionMatrixToMassOfBeliefTest.cxx
+++ b/Testing/Code/Fuzzy/otbConfusionMatrixToMassOfBeliefTest.cxx
@@ -20,7 +20,7 @@
 
 #include "otbConfusionMatrixToMassOfBelief.h"
 
-int otbConfusionMatrixToMassOfBeliefNew(int argc, char* argv[])
+int otbConfusionMatrixToMassOfBeliefNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef unsigned long                                   ConfusionMatrixEltType;
   typedef itk::VariableSizeMatrix<ConfusionMatrixEltType> ConfusionMatrixType;
@@ -51,7 +51,7 @@ int otbConfusionMatrixToMassOfBeliefNew(int argc, char* argv[])
 }
 
 
-int otbConfusionMatrixToMassOfBeliefTest(int argc, char* argv[])
+int otbConfusionMatrixToMassOfBeliefTest(int itkNotUsed(argc), char* argv[])
 {
   typedef unsigned long                                   ConfusionMatrixEltType;
   typedef itk::VariableSizeMatrix<ConfusionMatrixEltType> ConfusionMatrixType;
diff --git a/Testing/Code/Fuzzy/otbDSFusionOfClassifiersImageFilterTest.cxx b/Testing/Code/Fuzzy/otbDSFusionOfClassifiersImageFilterTest.cxx
index dc9d05c..6ee1de9 100644
--- a/Testing/Code/Fuzzy/otbDSFusionOfClassifiersImageFilterTest.cxx
+++ b/Testing/Code/Fuzzy/otbDSFusionOfClassifiersImageFilterTest.cxx
@@ -157,7 +157,7 @@ int CSVConfusionMatrixFileReader(const std::string fileName, MapOfClassesType &m
 
 
 
-int otbDSFusionOfClassifiersImageFilterNew(int argc, char* argv[])
+int otbDSFusionOfClassifiersImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const  unsigned int Dimension = 2;
 
diff --git a/Testing/Code/Fuzzy/otbDempsterShaferFusionTests.cxx b/Testing/Code/Fuzzy/otbDempsterShaferFusionTests.cxx
index a3963ca..034ae24 100644
--- a/Testing/Code/Fuzzy/otbDempsterShaferFusionTests.cxx
+++ b/Testing/Code/Fuzzy/otbDempsterShaferFusionTests.cxx
@@ -183,7 +183,7 @@ int CSVConfusionMatrixFileReader(const std::string fileName, MapOfClassesType &m
 
 
 // OPTIMIZED RECURSIVE DS FUSION WITH CONFUSION MATRICES
-int otbDempsterShaferFusionOptRecConfMatTest(int argc, char * argv[])
+int otbDempsterShaferFusionOptRecConfMatTest(int itkNotUsed(argc), char * argv[])
 {
   unsigned int nbClassifiers = 6;
 
@@ -1360,7 +1360,7 @@ int otbDempsterShaferFusionTest(int argc, char * argv[])
     vectorAllLabels.push_back(argv[it]);
     }
 
-  unsigned int nbClasses = vectorAllLabels.size();
+//  unsigned int nbClasses = vectorAllLabels.size();
 
   MassOfBeliefFunctionType::LabelSetType universe, labelSet;
   typedef std::map<LabelPixelType, MassOfBeliefFunctionType::LabelSetType> LabelSetMapType;
@@ -1947,7 +1947,7 @@ int otbDempsterShaferFusionConfMatFileTest(int argc, char * argv[])
   unsigned int nbParameters = 1;
   unsigned int nbClassifiers = (argc - 1 - nbParameters);
 
-  IntLabelPixelType undefinedValue = 0;
+//  IntLabelPixelType undefinedValue = 0;
 
   std::string massOfBeliefDefMethodStr = argv[argc - 4];
   MassOfBeliefDefinitionMethod massOfBeliefDefMethod;
@@ -2067,7 +2067,7 @@ int otbDempsterShaferFusionConfMatFileTest(int argc, char * argv[])
     }
 
   // Number of classes in the universe
-  unsigned int nbClasses = universe.size();
+//  unsigned int nbClasses = universe.size();
 
 
   IntMassOfBeliefFunctionType::LabelSetType universeSet, labelSet;
diff --git a/Testing/Code/Fuzzy/otbFuzzyDescriptorsModelManager.cxx b/Testing/Code/Fuzzy/otbFuzzyDescriptorsModelManager.cxx
index dc14630..afb6bec 100644
--- a/Testing/Code/Fuzzy/otbFuzzyDescriptorsModelManager.cxx
+++ b/Testing/Code/Fuzzy/otbFuzzyDescriptorsModelManager.cxx
@@ -20,16 +20,16 @@
 #include "otbFuzzyDescriptorsModelManager.h"
 #include <iostream>
 #include <stdlib.h>
+#include "itkMacro.h"
 
-
-int otbFuzzyDescriptorsModelManagerNew(int argc, char* argv[])
+int otbFuzzyDescriptorsModelManagerNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   otb::FuzzyDescriptorsModelManager mng;
   return EXIT_SUCCESS;
 }
 
 
-int otbFuzzyDescriptorsModelManagerTest(int argc, char* argv[])
+int otbFuzzyDescriptorsModelManagerTest(int itkNotUsed(argc), char* argv[])
 {
   otb::FuzzyDescriptorsModelManager::DescriptorsModelType model;
   otb::FuzzyDescriptorsModelManager::ParameterType        param;
diff --git a/Testing/Code/Fuzzy/otbFuzzyVariable2Values.cxx b/Testing/Code/Fuzzy/otbFuzzyVariable2Values.cxx
index 61cb2c1..d11dfae 100644
--- a/Testing/Code/Fuzzy/otbFuzzyVariable2Values.cxx
+++ b/Testing/Code/Fuzzy/otbFuzzyVariable2Values.cxx
@@ -19,7 +19,7 @@
 
 #include "otbFuzzyVariable.h"
 
-int otbFuzzyVariable2Values(int argc, char* argv[])
+int otbFuzzyVariable2Values(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef float PrecisionType;
 
diff --git a/Testing/Code/Fuzzy/otbFuzzyVariableDSApplied.cxx b/Testing/Code/Fuzzy/otbFuzzyVariableDSApplied.cxx
index 958a820..fe1c8a0 100644
--- a/Testing/Code/Fuzzy/otbFuzzyVariableDSApplied.cxx
+++ b/Testing/Code/Fuzzy/otbFuzzyVariableDSApplied.cxx
@@ -19,7 +19,7 @@
 
 #include "otbFuzzyVariable.h"
 
-int otbFuzzyVariableDSApplied(int argc, char* argv[])
+int otbFuzzyVariableDSApplied(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   typedef float PrecisionType;
 
diff --git a/Testing/Code/Fuzzy/otbFuzzyVariableGetMaxVar.cxx b/Testing/Code/Fuzzy/otbFuzzyVariableGetMaxVar.cxx
index 1ec2c08..2464306 100644
--- a/Testing/Code/Fuzzy/otbFuzzyVariableGetMaxVar.cxx
+++ b/Testing/Code/Fuzzy/otbFuzzyVariableGetMaxVar.cxx
@@ -19,7 +19,7 @@
 
 #include "otbFuzzyVariable.h"
 
-int otbFuzzyVariableGetMaxVar(int argc, char* argv[])
+int otbFuzzyVariableGetMaxVar(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef float PrecisionType;
   typedef otb::FuzzyVariable<std::string, PrecisionType> FuzzyVarType;
diff --git a/Testing/Code/Fuzzy/otbFuzzyVariableNew.cxx b/Testing/Code/Fuzzy/otbFuzzyVariableNew.cxx
index 43ac7d2..e349fd0 100644
--- a/Testing/Code/Fuzzy/otbFuzzyVariableNew.cxx
+++ b/Testing/Code/Fuzzy/otbFuzzyVariableNew.cxx
@@ -19,7 +19,7 @@
 
 #include "otbFuzzyVariable.h"
 
-int otbFuzzyVariableNew(int argc, char* argv[])
+int otbFuzzyVariableNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef float PrecisionType;
   typedef unsigned short LabelType;
diff --git a/Testing/Code/Fuzzy/otbFuzzyVariableSetValue.cxx b/Testing/Code/Fuzzy/otbFuzzyVariableSetValue.cxx
index fdaa6ec..d823958 100644
--- a/Testing/Code/Fuzzy/otbFuzzyVariableSetValue.cxx
+++ b/Testing/Code/Fuzzy/otbFuzzyVariableSetValue.cxx
@@ -19,7 +19,7 @@
 
 #include "otbFuzzyVariable.h"
 
-int otbFuzzyVariableSetValue(int argc, char* argv[])
+int otbFuzzyVariableSetValue(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef float PrecisionType;
   typedef otb::FuzzyVariable<std::string, PrecisionType> FuzzyVarType;
diff --git a/Testing/Code/Fuzzy/otbJointMassOfBeliefFilter.cxx b/Testing/Code/Fuzzy/otbJointMassOfBeliefFilter.cxx
index 62a47d3..a26802c 100644
--- a/Testing/Code/Fuzzy/otbJointMassOfBeliefFilter.cxx
+++ b/Testing/Code/Fuzzy/otbJointMassOfBeliefFilter.cxx
@@ -21,7 +21,7 @@
 #include "otbJointMassOfBeliefFilter.h"
 #include "otbMath.h"
 
-int otbJointMassOfBeliefFilter(int argc, char* argv[])
+int otbJointMassOfBeliefFilter(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   typedef otb::MassOfBelief<std::string> MassOfBeliefFunctionType;
   typedef otb::JointMassOfBeliefFilter<MassOfBeliefFunctionType> JointMassOfBeliefFilterType;
@@ -111,7 +111,7 @@ int otbJointMassOfBeliefFilter(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbJointMassOfBeliefFilterLimit(int argc, char* argv[])
+int otbJointMassOfBeliefFilterLimit(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   typedef otb::MassOfBelief<std::string> MassOfBeliefFunctionType;
   typedef otb::JointMassOfBeliefFilter<MassOfBeliefFunctionType> JointMassOfBeliefFilterType;
diff --git a/Testing/Code/Fuzzy/otbMassOfBelief.cxx b/Testing/Code/Fuzzy/otbMassOfBelief.cxx
index 6215fdd..e8eb7f9 100644
--- a/Testing/Code/Fuzzy/otbMassOfBelief.cxx
+++ b/Testing/Code/Fuzzy/otbMassOfBelief.cxx
@@ -27,7 +27,7 @@ std::ostream& operator <<(std::ostream& os, const MassOfBeliefFunctionType::Labe
   return os;
 }
 
-int otbMassOfBelief(int argc, char* argv[])
+int otbMassOfBelief(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   // Instantiate function
   MassOfBeliefFunctionType::Pointer massFunction = MassOfBeliefFunctionType::New();
diff --git a/Testing/Code/Fuzzy/otbMassOfBeliefDSApplied.cxx b/Testing/Code/Fuzzy/otbMassOfBeliefDSApplied.cxx
index a97688a..c3e76fa 100644
--- a/Testing/Code/Fuzzy/otbMassOfBeliefDSApplied.cxx
+++ b/Testing/Code/Fuzzy/otbMassOfBeliefDSApplied.cxx
@@ -36,7 +36,7 @@ std::ostream& operator <<(std::ostream& os, const MassOfBeliefFunctionType::Labe
   return os;
 }
 
-int otbMassOfBeliefDSApplied(int argc, char* argv[])
+int otbMassOfBeliefDSApplied(int itkNotUsed(argc), char* argv[])
 {
   const char * hyp_1  = argv[1];
   const char * hyp_2  = argv[2];
diff --git a/Testing/Code/Fuzzy/otbStandardDSCostFunction.cxx b/Testing/Code/Fuzzy/otbStandardDSCostFunction.cxx
index b86046b..172a165 100644
--- a/Testing/Code/Fuzzy/otbStandardDSCostFunction.cxx
+++ b/Testing/Code/Fuzzy/otbStandardDSCostFunction.cxx
@@ -22,7 +22,7 @@
 #include "otbVectorData.h"
 #include "otbVectorDataToDSValidatedVectorDataFilter.h"
 
-int otbStandardDSCostFunctionNew(int argc, char* argv[])
+int otbStandardDSCostFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                          PrecisionType;
   typedef otb::VectorData<PrecisionType>  VectorDataType;
diff --git a/Testing/Code/Fuzzy/otbVectorDataToDSValidatedVectorDataFilter.cxx b/Testing/Code/Fuzzy/otbVectorDataToDSValidatedVectorDataFilter.cxx
index 95cfc55..6dff2be 100644
--- a/Testing/Code/Fuzzy/otbVectorDataToDSValidatedVectorDataFilter.cxx
+++ b/Testing/Code/Fuzzy/otbVectorDataToDSValidatedVectorDataFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbVectorDataFileWriter.h"
 #include "otbFuzzyDescriptorsModelManager.h"
 
-int otbVectorDataToDSValidatedVectorDataFilterNew(int argc, char* argv[])
+int otbVectorDataToDSValidatedVectorDataFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef float                           PrecisionType;
   typedef otb::VectorData<PrecisionType>  VectorDataType;
@@ -41,7 +41,7 @@ int otbVectorDataToDSValidatedVectorDataFilterNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbVectorDataToDSValidatedVectorDataFilter(int argc, char* argv[])
+int otbVectorDataToDSValidatedVectorDataFilter(int itkNotUsed(argc), char* argv[])
 {
   const char * inputVD  = argv[1];
   const char * outputVD = argv[2];
diff --git a/Testing/Code/Fuzzy/otbVectorDataToRoadDescriptionFilter.cxx b/Testing/Code/Fuzzy/otbVectorDataToRoadDescriptionFilter.cxx
index 0c045c5..fba3067 100644
--- a/Testing/Code/Fuzzy/otbVectorDataToRoadDescriptionFilter.cxx
+++ b/Testing/Code/Fuzzy/otbVectorDataToRoadDescriptionFilter.cxx
@@ -34,7 +34,7 @@
 
 
 
-int otbVectorDataToRoadDescriptionFilterNew(int argc, char* argv[])
+int otbVectorDataToRoadDescriptionFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                          PrecisionType;
   typedef otb::VectorData<PrecisionType>  VectorDataType;
@@ -51,7 +51,7 @@ int otbVectorDataToRoadDescriptionFilterNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbVectorDataToRoadDescriptionFilter(int argc, char* argv[])
+int otbVectorDataToRoadDescriptionFilter(int itkNotUsed(argc), char* argv[])
 {
   const char * inputVD  = argv[1];
   const char * inputImg = argv[2];
diff --git a/Testing/Code/Fuzzy/otbVectorDataToSpecificDescriptionFilterBase.cxx b/Testing/Code/Fuzzy/otbVectorDataToSpecificDescriptionFilterBase.cxx
index c49fa45..e5e1d7c 100644
--- a/Testing/Code/Fuzzy/otbVectorDataToSpecificDescriptionFilterBase.cxx
+++ b/Testing/Code/Fuzzy/otbVectorDataToSpecificDescriptionFilterBase.cxx
@@ -21,7 +21,7 @@
 
 #include "otbVectorData.h"
 
-int otbVectorDataToSpecificDescriptionFilterBaseNew(int argc, char* argv[])
+int otbVectorDataToSpecificDescriptionFilterBaseNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef float                           PrecisionType;
   typedef otb::VectorData<PrecisionType>  VectorDataType;
diff --git a/Testing/Code/Hyperspectral/otbEigenvalueLikelihoodMaximization.cxx b/Testing/Code/Hyperspectral/otbEigenvalueLikelihoodMaximization.cxx
index c3a06a2..62f2a53 100644
--- a/Testing/Code/Hyperspectral/otbEigenvalueLikelihoodMaximization.cxx
+++ b/Testing/Code/Hyperspectral/otbEigenvalueLikelihoodMaximization.cxx
@@ -30,7 +30,7 @@ typedef otb::StreamingStatisticsVectorImageFilter<ImageType> StreamingStatistics
 
 typedef otb::EigenvalueLikelihoodMaximisation<double> ELMType;
 
-int otbEigenvalueLikelihoodMaximizationNewTest(int argc, char * argv[])
+int otbEigenvalueLikelihoodMaximizationNewTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   ELMType::Pointer elm = ELMType::New();
   std::cout << elm << std::endl;
@@ -38,7 +38,7 @@ int otbEigenvalueLikelihoodMaximizationNewTest(int argc, char * argv[])
 }
 
 
-int otbEigenvalueLikelihoodMaximizationTest(int argc, char * argv[])
+int otbEigenvalueLikelihoodMaximizationTest(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/Hyperspectral/otbFullyConstrainedLeastSquareImageFilter.cxx b/Testing/Code/Hyperspectral/otbFullyConstrainedLeastSquareImageFilter.cxx
index e30ec5f..16e4322 100644
--- a/Testing/Code/Hyperspectral/otbFullyConstrainedLeastSquareImageFilter.cxx
+++ b/Testing/Code/Hyperspectral/otbFullyConstrainedLeastSquareImageFilter.cxx
@@ -32,14 +32,14 @@ typedef otb::FullyConstrainedLeastSquareImageFilter<ImageType, ImageType, double
 typedef otb::VectorImageToMatrixImageFilter<ImageType> VectorImageToMatrixImageFilterType;
 typedef otb::ImageFileWriter<ImageType> WriterType;
 
-int otbFullyConstrainedLeastSquareImageFilterNewTest(int argc, char * argv[])
+int otbFullyConstrainedLeastSquareImageFilterNewTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   FullyConstrainedLeastSquareSolverType::Pointer filter = FullyConstrainedLeastSquareSolverType::New();
   std::cout << filter << std::endl;
   return EXIT_SUCCESS;
 }
 
-int otbFullyConstrainedLeastSquareImageFilterTest(int argc, char * argv[])
+int otbFullyConstrainedLeastSquareImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputImage = argv[1];
   const char * inputEndmembers = argv[2];
diff --git a/Testing/Code/Hyperspectral/otbISRAUnmixingImageFilter.cxx b/Testing/Code/Hyperspectral/otbISRAUnmixingImageFilter.cxx
index 0928115..6ddfb27 100644
--- a/Testing/Code/Hyperspectral/otbISRAUnmixingImageFilter.cxx
+++ b/Testing/Code/Hyperspectral/otbISRAUnmixingImageFilter.cxx
@@ -32,14 +32,14 @@ typedef otb::ISRAUnmixingImageFilter<ImageType, ImageType, PixelType> UnmixingIm
 typedef otb::VectorImageToMatrixImageFilter<ImageType> VectorImageToMatrixImageFilterType;
 typedef otb::ImageFileWriter<ImageType> WriterType;
 
-int otbISRAUnmixingImageFilterNewTest(int argc, char * argv[])
+int otbISRAUnmixingImageFilterNewTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   UnmixingImageFilterType::Pointer filter = UnmixingImageFilterType::New();
   std::cout << filter << std::endl;
   return EXIT_SUCCESS;
 }
 
-int otbISRAUnmixingImageFilterTest(int argc, char * argv[])
+int otbISRAUnmixingImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputImage = argv[1];
   const char * inputEndmembers = argv[2];
diff --git a/Testing/Code/Hyperspectral/otbLocalRxDetectorRoiTest.cxx b/Testing/Code/Hyperspectral/otbLocalRxDetectorRoiTest.cxx
index 6931a3b..8ef6581 100644
--- a/Testing/Code/Hyperspectral/otbLocalRxDetectorRoiTest.cxx
+++ b/Testing/Code/Hyperspectral/otbLocalRxDetectorRoiTest.cxx
@@ -7,7 +7,7 @@
 #include "otbExtractROI.h"
 
 
-int LocalRXDetectorROITest(int argc, char * argv[])
+int LocalRXDetectorROITest(int itkNotUsed(argc), char * argv[])
 {
        typedef double PixelType;
        typedef otb::VectorImage<PixelType, 2> VectorImageType;
@@ -74,5 +74,3 @@ int LocalRXDetectorROITest(int argc, char * argv[])
 
        return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/Hyperspectral/otbLocalRxDetectorTest.cxx b/Testing/Code/Hyperspectral/otbLocalRxDetectorTest.cxx
index bbeb033..8093676 100644
--- a/Testing/Code/Hyperspectral/otbLocalRxDetectorTest.cxx
+++ b/Testing/Code/Hyperspectral/otbLocalRxDetectorTest.cxx
@@ -5,7 +5,7 @@
 #include "otbLocalRxDetectorFilter.h"
 #include "itkRescaleIntensityImageFilter.h"
 
-int LocalRXDetectorNewTest(int argc, char * argv[])
+int LocalRXDetectorNewTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
        typedef double PixelType;
        typedef otb::VectorImage<PixelType, 2> VectorImageType;
@@ -16,7 +16,7 @@ int LocalRXDetectorNewTest(int argc, char * argv[])
         return EXIT_SUCCESS;
 }
 
-int LocalRXDetectorTest(int argc, char * argv[])
+int LocalRXDetectorTest(int itkNotUsed(argc), char * argv[])
 {
        typedef double PixelType;
        typedef otb::VectorImage<PixelType, 2> VectorImageType;
@@ -62,5 +62,3 @@ int LocalRXDetectorTest(int argc, char * argv[])
 
        return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/Hyperspectral/otbMDMDNMFImageFilter.cxx b/Testing/Code/Hyperspectral/otbMDMDNMFImageFilter.cxx
index 9b3775e..b80e069 100644
--- a/Testing/Code/Hyperspectral/otbMDMDNMFImageFilter.cxx
+++ b/Testing/Code/Hyperspectral/otbMDMDNMFImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbVectorImageToMatrixImageFilter.h"
 #include "otbStandardWriterWatcher.h"
 
-int otbMDMDNMFImageFilterNewTest(int argc, char * argv[])
+int otbMDMDNMFImageFilterNewTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                                                    PixelType;
   typedef otb::VectorImage<PixelType, 2>                            VectorImageType;
@@ -32,14 +32,13 @@ int otbMDMDNMFImageFilterNewTest(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbMDMDNMFImageFilterTest(int argc, char * argv[])
+int otbMDMDNMFImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   typedef double                                         PixelType;
   typedef otb::VectorImage<PixelType, 2>                 ImageType;
   typedef otb::MDMDNMFImageFilter<ImageType, ImageType>  MDMDNMFImageFilterType;
   typedef otb::ImageFileReader<ImageType>                ReaderType;
   typedef otb::ImageFileWriter<ImageType>       WriterType;
-  typedef otb::VectorImageToMatrixImageFilter<ImageType> VectorImageToMatrixImageFilterType;
 
   const char * inputImage = argv[1];
   const char * outputImage = argv[2];
@@ -73,7 +72,7 @@ int otbMDMDNMFImageFilterTest(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbMDMDNMFImageFilterTest2(int argc, char * argv[])
+int otbMDMDNMFImageFilterTest2(int itkNotUsed(argc), char * argv[])
 {
   typedef double                                         PixelType;
   typedef otb::VectorImage<PixelType, 2>                 ImageType;
diff --git a/Testing/Code/Hyperspectral/otbNCLSUnmixingImageFilter.cxx b/Testing/Code/Hyperspectral/otbNCLSUnmixingImageFilter.cxx
index d97e73e..4ade2a1 100644
--- a/Testing/Code/Hyperspectral/otbNCLSUnmixingImageFilter.cxx
+++ b/Testing/Code/Hyperspectral/otbNCLSUnmixingImageFilter.cxx
@@ -32,14 +32,14 @@ typedef otb::NCLSUnmixingImageFilter<ImageType, ImageType, PixelType> UnmixingIm
 typedef otb::VectorImageToMatrixImageFilter<ImageType> VectorImageToMatrixImageFilterType;
 typedef otb::ImageFileWriter<ImageType> WriterType;
 
-int otbNCLSUnmixingImageFilterNewTest(int argc, char * argv[])
+int otbNCLSUnmixingImageFilterNewTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   UnmixingImageFilterType::Pointer filter = UnmixingImageFilterType::New();
   std::cout << filter << std::endl;
   return EXIT_SUCCESS;
 }
 
-int otbNCLSUnmixingImageFilterTest(int argc, char * argv[])
+int otbNCLSUnmixingImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputImage = argv[1];
   const char * inputEndmembers = argv[2];
diff --git a/Testing/Code/Hyperspectral/otbSparseUnmixingImageFilter.cxx b/Testing/Code/Hyperspectral/otbSparseUnmixingImageFilter.cxx
index fecc1e7..d467cb6 100644
--- a/Testing/Code/Hyperspectral/otbSparseUnmixingImageFilter.cxx
+++ b/Testing/Code/Hyperspectral/otbSparseUnmixingImageFilter.cxx
@@ -112,5 +112,3 @@ int otbSparseUnmixingImageFilterTest ( int argc, char * argv[] )
 
   return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/Hyperspectral/otbSparseUnmixingImageFilterNew.cxx b/Testing/Code/Hyperspectral/otbSparseUnmixingImageFilterNew.cxx
index fd5a0a1..da9c3c7 100644
--- a/Testing/Code/Hyperspectral/otbSparseUnmixingImageFilterNew.cxx
+++ b/Testing/Code/Hyperspectral/otbSparseUnmixingImageFilterNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbSparseUnmixingImageFilter.h"
 
-int otbSparseUnmixingImageFilterNew ( int argc, char * argv[] )
+int otbSparseUnmixingImageFilterNew ( int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   // number of images to consider
   const unsigned int nbInputImages = 2;
@@ -37,5 +37,3 @@ int otbSparseUnmixingImageFilterNew ( int argc, char * argv[] )
 
   return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/Hyperspectral/otbUnConstrainedLeastSquareImageFilter.cxx b/Testing/Code/Hyperspectral/otbUnConstrainedLeastSquareImageFilter.cxx
index 8714652..b8a0f39 100644
--- a/Testing/Code/Hyperspectral/otbUnConstrainedLeastSquareImageFilter.cxx
+++ b/Testing/Code/Hyperspectral/otbUnConstrainedLeastSquareImageFilter.cxx
@@ -31,14 +31,14 @@ typedef otb::UnConstrainedLeastSquareImageFilter<ImageType, ImageType, PixelType
 typedef otb::VectorImageToMatrixImageFilter<ImageType> VectorImageToMatrixImageFilterType;
 typedef otb::ImageFileWriter<ImageType> WriterType;
 
-int otbUnConstrainedLeastSquareImageFilterNewTest(int argc, char * argv[])
+int otbUnConstrainedLeastSquareImageFilterNewTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   UnConstrainedLeastSquareSolverType::Pointer filter = UnConstrainedLeastSquareSolverType::New();
   std::cout << filter << std::endl;
   return EXIT_SUCCESS;
 }
 
-int otbUnConstrainedLeastSquareImageFilterTest(int argc, char * argv[])
+int otbUnConstrainedLeastSquareImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputImage = argv[1];
   const char * inputEndmembers = argv[2];
diff --git a/Testing/Code/Hyperspectral/otbVCAImageFilter.cxx b/Testing/Code/Hyperspectral/otbVCAImageFilter.cxx
index e5fbd46..adf7035 100644
--- a/Testing/Code/Hyperspectral/otbVCAImageFilter.cxx
+++ b/Testing/Code/Hyperspectral/otbVCAImageFilter.cxx
@@ -32,14 +32,14 @@ typedef otb::VCAImageFilter<VectorImageType> VCAFilterType;
 typedef otb::ImageFileReader<VectorImageType> ReaderType;
 typedef otb::ImageFileWriter<VectorImageType> WriterType;
 
-int otbVCAImageFilterNew(int argc, char * argv[])
+int otbVCAImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   VCAFilterType::Pointer vca = VCAFilterType::New();
   std::cout << vca << std::endl;
   return EXIT_SUCCESS;
 }
 
-int otbVCAImageFilterTestHighSNR(int argc, char * argv[])
+int otbVCAImageFilterTestHighSNR(int itkNotUsed(argc), char * argv[])
 {
   const char * inputImage = argv[1];
   const char * outputImage = argv[2];
diff --git a/Testing/Code/Hyperspectral/otbVirtualDimensionality.cxx b/Testing/Code/Hyperspectral/otbVirtualDimensionality.cxx
index 1215e30..c718356 100644
--- a/Testing/Code/Hyperspectral/otbVirtualDimensionality.cxx
+++ b/Testing/Code/Hyperspectral/otbVirtualDimensionality.cxx
@@ -30,7 +30,7 @@ typedef otb::StreamingStatisticsVectorImageFilter<ImageType> StreamingStatistics
 
 typedef otb::VirtualDimensionality<double> VDType;
 
-int otbVirtualDimensionalityNewTest(int argc, char * argv[])
+int otbVirtualDimensionalityNewTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   VDType::Pointer vd = VDType::New();
   std::cout << vd << std::endl;
@@ -38,7 +38,7 @@ int otbVirtualDimensionalityNewTest(int argc, char * argv[])
 }
 
 
-int otbVirtualDimensionalityTest(int argc, char * argv[])
+int otbVirtualDimensionalityTest(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/IO/CMakeLists.txt b/Testing/Code/IO/CMakeLists.txt
index 0c7b347..4e5b4aa 100644
--- a/Testing/Code/IO/CMakeLists.txt
+++ b/Testing/Code/IO/CMakeLists.txt
@@ -25,7 +25,7 @@ set(IO_TESTS10    ${CXX_TEST_PATH}/otbIOTests10)
 set(IO_TESTS11    ${CXX_TEST_PATH}/otbIOTests11)
 set(IO_TESTS12    ${CXX_TEST_PATH}/otbIOTests12)
 
-if(OTB_USE_JPEG2000)
+if(OTB_USE_JPEG2000_TESTING)
    set(IO_TESTS13    ${CXX_TEST_PATH}/otbIOTests13)
 endif()
 
@@ -71,6 +71,21 @@ if(OTB_DATA_USE_LARGEINPUT)
       PHR_JP2_DIMAPv1_PRIMARY_PMS_lossless_12bits
       PHR_JP2_DIMAPv1_ORTHO_PMS_lossless_12bits
    )
+
+   set(GenericTestSPOT6_DATA_INPUTS
+      ${GenericTestSPOT6_DATA_INPUTS}
+      ${LARGEINPUT}/SPOT6/SPOT6_Ortho_Bundle_12_bits/PROD_SPOT6_001/VOL_SPOT6_001_A/IMG_SPOT6_MS_001_A/IMG_SPOT6_MS_201306031242000_ORT_816005101_R1C1.JP2
+      ${LARGEINPUT}/SPOT6/SPOT6_Ortho_Pan-sharpened_12_bits/PROD_SPOT6_001/VOL_SPOT6_001_A/IMG_SPOT6_PMS_001_A/IMG_SPOT6_PMS_201305251604372_ORT_816009101_R1C1.JP2
+      ${LARGEINPUT}/SPOT6/SPOT6_Primary_Bundle_12_bits/PROD_SPOT6_001/VOL_SPOT6_001_A/IMG_SPOT6_MS_001_A/IMG_SPOT6_MS_201211100138085_SEN_816007101_R1C1.JP2
+   )
+
+   set(GenericTestSPOT6_DATA_TYPES
+      ${GenericTestSPOT6_DATA_TYPES}
+      SPOT6_Ortho_Bundle_12_bits
+      SPOT6_Ortho_Pan-sharpened_12_bits
+      SPOT6_Primary_Bundle_12_bits
+   )
+
 endif()
 
 if(OTB_DATA_USE_SPOTPHRINPUT)
@@ -87,7 +102,7 @@ if(OTB_DATA_USE_SPOTPHRINPUT)
 	  SPOT_PHR_ORTHO_UTM_P
 	  SPOT_PHR_ORTHO_UTM_MS
 	  SPOT_PHR_ORTHO_GEO_P
-      SPOT_PHR_ORTHO_GEO_MS
+      	  SPOT_PHR_ORTHO_GEO_MS
 	  SPOT_PHR_PRIMARY_MS
 	  SPOT_PHR_PRIMARY_P
 	 )
@@ -947,8 +962,8 @@ add_test(ioTvImageKeywordlistErs ${IO_TESTS4}
          ${TEMP}/ioTvImageKeywordlistErs.txt
          ${TEMP}/ioTvImageKeywordlistErs_saveState_loadState.txt
 )
-endif()
 
+endif()
 
 if(OTB_DATA_USE_LARGEINPUT OR OTB_DATA_USE_SPOTPHRINPUT OR OTB_DATA_USE_CNESPHRINPUT)
 
@@ -974,6 +989,29 @@ if(OTB_DATA_USE_LARGEINPUT OR OTB_DATA_USE_SPOTPHRINPUT OR OTB_DATA_USE_CNESPHRI
 
   endforeach()
 
+
+  set( GenericTestSPOT6_TESTNB 0)
+
+  foreach( current_file ${GenericTestSPOT6_DATA_INPUTS} )
+    list(GET GenericTestSPOT6_DATA_TYPES   ${GenericTestSPOT6_TESTNB} current_type )
+    math(EXPR GenericTestSPOT6_TESTNB "${GenericTestSPOT6_TESTNB} + 1")
+
+      # Get and manipulate ImageKeywordlist
+      add_test(ioTvImageKeywordlist_${current_type} ${IO_TESTS4}
+               --ignore-order --compare-n-ascii ${NOTOL} 2
+                 ${BASELINE_FILES}/ioTvImageKeywordlist_${current_type}.txt
+                 ${TEMP}/ioTvImageKeywordlist_${current_type}_OUT.txt
+                 ${BASELINE_FILES}/ioTvImageKeywordlist_${current_type}.txt
+                 ${TEMP}/ioTvImageKeywordlist_${current_type}_saveState_loadState_OUT.txt
+               --ignore-lines-with 2 meters_per_pixel_x meters_per_pixel_y
+               otbImageKeywordlist
+                  ${current_file}
+                  ${TEMP}/ioTvImageKeywordlist_${current_type}_OUT.txt
+                  ${TEMP}/ioTvImageKeywordlist_${current_type}_saveState_loadState_OUT.txt
+              )
+
+  endforeach()
+
 endif()
 
 
@@ -1305,6 +1343,16 @@ add_test(ioTvImageReaderWriterRgbPNG2PNG ${IO_TESTS7}
         ${INPUTDATA}/poupees.png
         ${TEMP}/ioImageReaderWriterRgbPNG2PNG_poupees.png )
 
+#reader writer with box parameter (extract roi)
+add_test(ioTvImageReaderWriterRgbPNG2PNGBox ${IO_TESTS7}
+  --compare-image ${NOTOL}
+  ${BASELINE}/coTvExtractROI_QB.png
+  ${TEMP}/coTvExtractROI_QB_Box.png
+    otbImageFileReaderRGBTest
+  ${INPUTDATA}/QB_Suburb.png
+  ${TEMP}/coTvExtractROI_QB_Box.png?&box=0:0:70:70
+  )
+
 add_test(ioTvImageReaderWriterRgbPNG2TIF ${IO_TESTS7}
    --compare-image ${EPSILON_9}   ${INPUTDATA}/poupees.png
                      ${TEMP}/ioImageReaderWriterRgbPNG2TIF_poupees.tif
@@ -2025,11 +2073,11 @@ add_test(ioTvMapProjectionAdapterTest ${IO_TESTS12}
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbIOTESTS13 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-if(OTB_USE_JPEG2000)
+if(OTB_USE_JPEG2000_TESTING)
 
 # --------------------------------------------------------------------------------
 # old test suite:
-
+if(OTB_USE_JPEG2000)
 # ---  JPEG2000 can read ---
 add_test(ioTuJ2KImageIOCanRead ${IO_TESTS13}
          otbJPEG2000ImageIOTestCanRead
@@ -2043,6 +2091,8 @@ add_test(ioTuJP2ImageIOCanRead ${IO_TESTS13}
          )
 endif()
 
+endif()
+
 #NOTE: baseline generated by openjpeg
 if(OTB_DATA_USE_LARGEINPUT)
 add_test(ioTvVectorImageFileReaderWriterJP22TIF ${IO_TESTS9}
@@ -2217,6 +2267,7 @@ add_test(ioTvMultiChannelROI_JPEG2000_2_TIF_res5 ${COMMON_TESTS2}
            ${INPUTDATA}/bretagne.j2k?&resol=5
            ${TEMP}/ioExtractROI_JPEG2K_2_TIF_bretagne_res5_OUT.tif )
 
+if(OTB_USE_JPEG2000)
 # --------------------------------------------------------------------------------
 # Test the possibility to modify the size of cache used to reduce the decoding operations
 # O tile in the cache (500K)
@@ -2257,6 +2308,7 @@ add_test(ioTvJPEG2000ImageIO_CacheSize_25000 ${IO_TESTS13}
          otbGenerateClassicalQLWithJPEG2000
          ${INPUTDATA}/bretagne.j2k
          ${TEMP}/ioClassicalQLJPEG2K_bretagne_OUT.tif)
+endif()
 
 # --------------------------------------------------------------------------------
 # Special Case (deactivated by MSD, OpenJPEG now support the larges files so this tests is not relevant
@@ -2287,7 +2339,7 @@ foreach( current_file ${GenericTestPHR_DATA_INPUTS} )
   math(EXPR GenericTestPHR_TESTNB "${GenericTestPHR_TESTNB} + 1")
   string(REGEX MATCH "TIFF" PHR_TIFF_FILE ${current_type})
 
-  if(NOT PHR_TIFF_FILE)
+  if((NOT PHR_TIFF_FILE) AND OTB_USE_JPEG2000)
     # CanRead
     add_test(ioTuJ2KImageIOCanRead_${current_type} ${IO_TESTS13}
              otbJPEG2000ImageIOTestCanRead
@@ -2297,8 +2349,9 @@ foreach( current_file ${GenericTestPHR_DATA_INPUTS} )
 
     # Read info from the input file
     add_test(ioTvVectorImageReadingInfo_${current_type} ${IO_TESTS13}
-             --compare-ascii ${NOTOL}  ${BASELINE_FILES}/ioTvMultiResolutionReading_${current_type}.txt
+             --ignore-order --compare-ascii ${EPSILON_9}  ${BASELINE_FILES}/ioTvMultiResolutionReading_${current_type}.txt
                                        ${TEMP}/ioTvMultiResolutionReading_${current_type}_OUT.txt
+             --ignore-lines-with 3 CacheSizeInBytes Driver Corner[ 
              otbVectorImageTest
                 ${current_file}?&resol=0
                 ${TEMP}/ioTvMultiResolutionReading_${current_type}_OUT.txt
@@ -2307,8 +2360,9 @@ foreach( current_file ${GenericTestPHR_DATA_INPUTS} )
   if(NOT PHR_TIFF_FILE)
     # Read info from the input file (res=5)
     add_test(ioTvVectorImageReadingInfo_${current_type}_res5 ${IO_TESTS13}
-             --compare-ascii ${NOTOL}  ${BASELINE_FILES}/ioTvMultiResolutionReading_${current_type}_res5.txt
+             --ignore-order --compare-ascii ${EPSILON_9}  ${BASELINE_FILES}/ioTvMultiResolutionReading_${current_type}_res5.txt
                                        ${TEMP}/ioTvMultiResolutionReading_${current_type}_res5_OUT.txt
+             --ignore-lines-with 3 CacheSizeInBytes Driver Corner[
              otbVectorImageTest
                 ${current_file}?&resol=5
                 ${TEMP}/ioTvMultiResolutionReading_${current_type}_res5_OUT.txt
@@ -2318,7 +2372,7 @@ foreach( current_file ${GenericTestPHR_DATA_INPUTS} )
   if(NOT PHR_TIFF_FILE)
     # Extract resolution of input file
     add_test(ioTvMultiResolutionReadingInfo_${current_type} ${IO_TESTS13}
-             --compare-ascii ${NOTOL}  ${BASELINE_FILES}/ioTvMultiResolutionReadingInfo_${current_type}.txt
+             --compare-ascii ${EPSILON_9}  ${BASELINE_FILES}/ioTvMultiResolutionReadingInfo_${current_type}.txt
                                        ${TEMP}/ioTvMultiResolutionReadingInfo_${current_type}_OUT.txt
              otbMultiResolutionReadingInfo
                 ${current_file}
@@ -2535,7 +2589,7 @@ add_test(ioTvVectorDataFileGeoReaderWriter2 ${IO_TESTS15}
         )
 
 add_test(ioTvKMLVectorDataFileGeoReaderWriter ${IO_TESTS15}
-        --compare-ascii  ${EPSILON_9}
+        --compare-ogr  ${EPSILON_9}
             ${BASELINE_FILES}/ioTvKMLVectorDataFileGeoReaderWriterOutput.kml
             ${TEMP}/ioTvKMLVectorDataFileGeoReaderWriterOutput.kml
         otbVectorDataFileGeoReaderWriter
@@ -2544,7 +2598,7 @@ add_test(ioTvKMLVectorDataFileGeoReaderWriter ${IO_TESTS15}
         )
 
 add_test(ioTvKMLVectorDataFileGeoReaderWriter2 ${IO_TESTS15}
-        --compare-ascii  ${EPSILON_9}
+        --compare-ogr  ${EPSILON_9}
             ${BASELINE_FILES}/ioTvKMLVectorDataFileGeoReaderWriterOutput2.kml
             ${TEMP}/ioTvKMLVectorDataFileGeoReaderWriterOutput2.kml
         otbVectorDataFileGeoReaderWriter
@@ -2732,6 +2786,10 @@ add_test(ioTuPleiadesImageMetadataInterfaceNew ${IO_TESTS18}
         otbPleiadesImageMetadataInterfaceNew
 )
 
+add_test(ioTuSpot6ImageMetadataInterfaceNew ${IO_TESTS18}
+        otbSpot6ImageMetadataInterfaceNew
+)
+
 if(OTB_DATA_USE_LARGEINPUT)
 
 #------------ ImageMetadataInterfaceBaseTest ---------------
@@ -2811,6 +2869,31 @@ foreach( current_file ${GenericTestPHR_DATA_INPUTS} )
 
 endforeach()
 
+# SPOT 6
+set( GenericTestSPOT6_TESTNB 0)
+
+foreach( current_file ${GenericTestSPOT6_DATA_INPUTS} )
+  list(GET GenericTestSPOT6_DATA_TYPES   ${GenericTestSPOT6_TESTNB} current_type )
+  math(EXPR GenericTestSPOT6_TESTNB "${GenericTestSPOT6_TESTNB} + 1")
+
+  add_test(ioTvImageMetadataInterfaceBaseTest_${current_type} ${IO_TESTS18}
+           --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTvImageMetadataInterfaceBase_${current_type}.txt
+                                    ${TEMP}/ioTvImageMetadataInterfaceBase_${current_type}_OUT.txt
+           otbImageMetadataInterfaceBaseTest
+              ${current_file}
+              ${TEMP}/ioTvImageMetadataInterfaceBase_${current_type}_OUT.txt
+          )
+
+  add_test(ioTvOpticalImageMetadataInterfaceTest_${current_type} ${IO_TESTS18}
+           --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTvOpticalImageMetadataInterface_${current_type}.txt
+                                    ${TEMP}/ioTvOpticalImageMetadataInterface_${current_type}_OUT.txt
+           otbOpticalImageMetadataInterfaceTest
+              ${current_file}
+              ${TEMP}/ioTvOpticalImageMetadataInterface_${current_type}_OUT.txt
+          )
+
+  endforeach()
+
 add_test(ioTvImageMetadataInterfaceBaseTest_FORMOSAT2 ${IO_TESTS18}
          --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTvImageMetadataInterfaceBase_FORMOSAT2.txt
                          ${TEMP}/ioTvImageMetadataInterfaceBase_FORMOSAT2.txt
@@ -2856,7 +2939,6 @@ add_test(ioTvImageMetadataInterfaceBaseTest_TSX1PANGKALANBUUNUsingXmlFile ${IO_T
 
 
 #------------ OpticalImageMetadataInterfaceTest ---------------
-
 add_test(ioTvOpticalImageMetadataInterfaceTest_QB ${IO_TESTS18}
          --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTvOpticalImageMetadataInterface_QB.txt
                          ${TEMP}/ioTvOpticalImageMetadataInterface_QB.txt
@@ -3890,18 +3972,25 @@ otbMapProjectionAdapterTest.cxx
 )
 
 
-if(OTB_USE_JPEG2000)
+if(OTB_USE_JPEG2000_TESTING)
 #Reserved for jpeg 2000
+
 set(BasicIO_SRCS13
 otbIOTests13.cxx
-otbJPEG2000ImageIOTestCanRead.cxx
-otbJPEG2000ImageIOTestCanWrite.cxx
 otbVectorImageTest.cxx
 otbMultiResolutionReadingInfo.cxx
+)
+# add tests specific for JPEG2000ImageIO
+if(OTB_USE_JPEG2000)
+set(BasicIO_SRCS13 ${BasicIO_SRCS13} 
+otbJPEG2000ImageIOTestCanRead.cxx
+otbJPEG2000ImageIOTestCanWrite.cxx
 otbGenerateClassicalQLWithJPEG2000.cxx
 )
 endif()
 
+endif()
+
 
 set(BasicIO_SRCS14
 otbIOTests14.cxx
@@ -3951,6 +4040,7 @@ set(BasicIO_SRCS18
 otbIOTests18.cxx
 otbSpotImageMetadataInterfaceNew.cxx
 otbPleiadesImageMetadataInterfaceNew.cxx
+otbSpot6ImageMetadataInterfaceNew.cxx
 otbFormosatImageMetadataInterfaceNew.cxx
 otbQuickBirdImageMetadataInterfaceNew.cxx
 otbWorldView2ImageMetadataInterfaceNew.cxx
@@ -4051,7 +4141,7 @@ OTB_ADD_EXECUTABLE(otbIOTests10 "${BasicIO_SRCS10}" "OTBIO;OTBTesting")
 OTB_ADD_EXECUTABLE(otbIOTests11 "${BasicIO_SRCS11}" "OTBIO;OTBTesting")
 OTB_ADD_EXECUTABLE(otbIOTests12 "${BasicIO_SRCS12}" "OTBIO;OTBTesting")
 
-if(OTB_USE_JPEG2000)
+if(OTB_USE_JPEG2000_TESTING)
    if(NOT BUILD_SHARED_LIBS)
       add_definitions(-DOPJ_STATIC)
    endif()
diff --git a/Testing/Code/IO/otbBSQImageIOTestCanRead.cxx b/Testing/Code/IO/otbBSQImageIOTestCanRead.cxx
index 1e43dc2..367781a 100644
--- a/Testing/Code/IO/otbBSQImageIOTestCanRead.cxx
+++ b/Testing/Code/IO/otbBSQImageIOTestCanRead.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbBSQImageIOTestCanRead(int argc, char* argv[])
+int otbBSQImageIOTestCanRead(int itkNotUsed(argc), char* argv[])
 {
   otb::BSQImageIO::Pointer lBSQImageIO = otb::BSQImageIO::New();
   bool                     lCanRead = lBSQImageIO->CanReadFile(argv[1]);
diff --git a/Testing/Code/IO/otbBSQImageIOTestCanWrite.cxx b/Testing/Code/IO/otbBSQImageIOTestCanWrite.cxx
index 67f4469..3e6f620 100644
--- a/Testing/Code/IO/otbBSQImageIOTestCanWrite.cxx
+++ b/Testing/Code/IO/otbBSQImageIOTestCanWrite.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbBSQImageIOTestCanWrite(int argc, char* argv[])
+int otbBSQImageIOTestCanWrite(int itkNotUsed(argc), char* argv[])
 {
   otb::BSQImageIO::Pointer lBSQImageIO = otb::BSQImageIO::New();
   bool                     lCanRead = lBSQImageIO->CanWriteFile(argv[1]);
diff --git a/Testing/Code/IO/otbComplexImageManipulationTest.cxx b/Testing/Code/IO/otbComplexImageManipulationTest.cxx
index ce7556e..e0aa3ae 100644
--- a/Testing/Code/IO/otbComplexImageManipulationTest.cxx
+++ b/Testing/Code/IO/otbComplexImageManipulationTest.cxx
@@ -117,7 +117,7 @@ ReadRegion(const char* filename, TImagePointerType& image, unsigned int w, unsig
  * out : real = in, imag = 0
  ***********/
 template<class InternalType>
-int otbMonobandScalarToImageComplexGeneric(int argc, char * argv[])
+int otbMonobandScalarToImageComplexGeneric(int itkNotUsed(argc), char * argv[])
 {
   typedef InternalType                        RealType;
   typedef std::complex<RealType>              ComplexType;
@@ -172,7 +172,7 @@ int otbMonobandScalarToImageComplexShort(int argc, char * argv[])
  * out : norm(in)
  ***********/
 template<class InternalType>
-int otbMonobandComplexToImageScalarGeneric(int argc, char * argv[])
+int otbMonobandComplexToImageScalarGeneric(int itkNotUsed(argc), char * argv[])
 {
   typedef InternalType                                              InputType;
   typedef std::complex<InputType>                                   ComplexType;
@@ -232,7 +232,7 @@ int otbMonobandComplexToImageScalarShort(int argc, char * argv[])
  * out : in
  ***********/
 template<class InternalType>
-int otbMonobandComplexToImageComplexGeneric(int argc, char * argv[])
+int otbMonobandComplexToImageComplexGeneric(int itkNotUsed(argc), char * argv[])
 {
   typedef InternalType                        RealType;
   typedef std::complex<RealType>              ComplexType;
@@ -286,10 +286,9 @@ int otbMonobandComplexToImageComplexShort(int argc, char * argv[])
  * out : [0]=in.real(), [1]=in.imag()
  ***********/
 template<class InternalType>
-int otbMonobandComplexToVectorImageScalarGeneric(int argc, char * argv[])
+int otbMonobandComplexToVectorImageScalarGeneric(int itkNotUsed(argc), char * argv[])
 {
   typedef InternalType                        RealType;
-  typedef std::complex<RealType>              ComplexType;
 
   typedef otb::VectorImage<RealType, 2>       ImageType;
   typedef typename ImageType::PixelType       PixelType;
@@ -345,7 +344,7 @@ int otbMonobandComplexToVectorImageScalarShort(int argc, char * argv[])
  * out : [0]=in
  ***********/
 template<class InternalType>
-int otbMonobandComplexToVectorImageComplexGeneric(int argc, char * argv[])
+int otbMonobandComplexToVectorImageComplexGeneric(int itkNotUsed(argc), char * argv[])
 {
   typedef InternalType                        RealType;
   typedef std::complex<RealType>              ComplexType;
@@ -403,7 +402,7 @@ int otbMonobandComplexToVectorImageComplexShort(int argc, char * argv[])
  * out : out.real=in[0], out.imag=in[1]
  ***********/
 template<class InternalType>
-int otbMultibandScalarToImageComplexGeneric(int argc, char * argv[])
+int otbMultibandScalarToImageComplexGeneric(int itkNotUsed(argc), char * argv[])
 {
   typedef InternalType                        RealType;
   typedef std::complex<RealType>              ComplexType;
@@ -461,7 +460,7 @@ int otbMultibandScalarToImageComplexShort(int argc, char * argv[])
  * out : (out[0].real=in[0], out[0].imag=0), (out[1].real=in[1], out[1].imag=0), ...
  ***********/
 template<class InternalType>
-int otbMultibandScalarToVectorImageComplexGeneric(int argc, char * argv[])
+int otbMultibandScalarToVectorImageComplexGeneric(int itkNotUsed(argc), char * argv[])
 {
   typedef InternalType                        RealType;
   typedef std::complex<RealType>              ComplexType;
@@ -521,11 +520,9 @@ int otbMultibandScalarToVectorImageComplexShort(int argc, char * argv[])
  * out : out[0]=in[0].real, out[1]=in[0].imag, out[2]=in[0].real, out[3]=in[0].imag, ...
  ***********/
 template<class InternalType>
-int otbMultibandComplexToVectorImageScalarGeneric(int argc, char * argv[])
+int otbMultibandComplexToVectorImageScalarGeneric(int itkNotUsed(argc), char * argv[])
 {
   typedef InternalType                        RealType;
-  typedef std::complex<RealType>              ComplexType;
-
   typedef otb::VectorImage<RealType, 2>       ImageType;
   typedef typename ImageType::PixelType       PixelType;
 
@@ -585,7 +582,7 @@ int otbMultibandComplexToVectorImageScalarShort(int argc, char * argv[])
  * out : out[0]=in[0], out[1]=in[1], ...
  ***********/
 template<class InternalType>
-int otbMultibandComplexToVectorImageComplexGeneric(int argc, char * argv[])
+int otbMultibandComplexToVectorImageComplexGeneric(int itkNotUsed(argc), char * argv[])
 {
   typedef InternalType                        RealType;
   typedef std::complex<RealType>              ComplexType;
@@ -649,7 +646,7 @@ int otbMultibandComplexToVectorImageComplexInt(int argc, char * argv[])
  * out : out[0].real=in, out[0].imag=0
  ***********/
 template<class InternalType>
-int otbMonobandScalarToVectorImageComplexGeneric(int argc, char * argv[])
+int otbMonobandScalarToVectorImageComplexGeneric(int itkNotUsed(argc), char * argv[])
 {
   typedef InternalType                        RealType;
   typedef std::complex<RealType>              ComplexType;
@@ -707,7 +704,7 @@ int otbMonobandScalarToVectorImageComplexInt(int argc, char * argv[])
  * out : ???
  ***********/
 template<class InternalType>
-int otbMultibandComplexToImageScalarGeneric(int argc, char * argv[])
+int otbMultibandComplexToImageScalarGeneric(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // This case is not handled yet.
   // We need more time to decide what we want to do with this case. ( perhaps return exception ???)
@@ -736,4 +733,3 @@ int otbMultibandComplexToImageScalarInt(int argc, char * argv[])
 {
   return otbMultibandComplexToImageScalarGeneric<int>(argc, argv);
 }
-
diff --git a/Testing/Code/IO/otbComplexImageTests.cxx b/Testing/Code/IO/otbComplexImageTests.cxx
index 7c7e70b..d7c77fd 100644
--- a/Testing/Code/IO/otbComplexImageTests.cxx
+++ b/Testing/Code/IO/otbComplexImageTests.cxx
@@ -27,7 +27,7 @@
 #include "otbVectorImage.h"
 #include "otbImageFileReader.h"
 
-int otbVectorImageComplexNew(int argc, char* argv[])
+int otbVectorImageComplexNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef std::complex<float>            PixelType;
   typedef otb::VectorImage<PixelType, 2> ImageType;
@@ -39,7 +39,7 @@ int otbVectorImageComplexNew(int argc, char* argv[])
 
 
 template<class InternalType>
-int otbVectorImageComplexGenericTest(int argc, char* argv[])
+int otbVectorImageComplexGenericTest(int itkNotUsed(argc), char* argv[])
 {
   typedef std::complex<InternalType>      PixelType;
   typedef otb::VectorImage<PixelType, 2>  ImageType;
@@ -80,7 +80,7 @@ int otbVectorImageComplexDoubleTest(int argc, char* argv[])
 }
 
 template<class InternalType>
-int otbImageComplexGenericTest(int argc, char* argv[])
+int otbImageComplexGenericTest(int itkNotUsed(argc), char* argv[])
 {
   typedef std::complex<InternalType>      PixelType;
   typedef otb::Image<PixelType, 2>        ImageType;
@@ -135,7 +135,7 @@ int otbImageComplexDoubleTest(int argc, char* argv[])
 
 
 template<class InternalType>
-int otbVectorImageComplexIntoRealGenericTest(int argc, char* argv[])
+int otbVectorImageComplexIntoRealGenericTest(int itkNotUsed(argc), char* argv[])
 {
   typedef InternalType                    PixelType;
   typedef otb::VectorImage<PixelType, 2>  ImageType;
diff --git a/Testing/Code/IO/otbDEMToImageGeneratorNew.cxx b/Testing/Code/IO/otbDEMToImageGeneratorNew.cxx
index 093f76d..9943d62 100644
--- a/Testing/Code/IO/otbDEMToImageGeneratorNew.cxx
+++ b/Testing/Code/IO/otbDEMToImageGeneratorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbDEMToImageGenerator.h"
 #include "otbImage.h"
 
-int otbDEMToImageGeneratorNew(int argc, char * argv[])
+int otbDEMToImageGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef otb::Image<unsigned char, Dimension> ImageType;
diff --git a/Testing/Code/IO/otbDefaultImageMetadataInterface.cxx b/Testing/Code/IO/otbDefaultImageMetadataInterface.cxx
index a289bfa..cfb0d88 100644
--- a/Testing/Code/IO/otbDefaultImageMetadataInterface.cxx
+++ b/Testing/Code/IO/otbDefaultImageMetadataInterface.cxx
@@ -21,7 +21,7 @@
 #include "itkMacro.h"
 #include "otbDefaultImageMetadataInterface.h"
 
-int otbDefaultImageMetadataInterface(int argc, char* argv[])
+int otbDefaultImageMetadataInterface(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef otb::DefaultImageMetadataInterface ObjectType;
 
diff --git a/Testing/Code/IO/otbDefaultImageMetadataInterfaceFactoryNew.cxx b/Testing/Code/IO/otbDefaultImageMetadataInterfaceFactoryNew.cxx
index 36e5b3a..af4ac3e 100644
--- a/Testing/Code/IO/otbDefaultImageMetadataInterfaceFactoryNew.cxx
+++ b/Testing/Code/IO/otbDefaultImageMetadataInterfaceFactoryNew.cxx
@@ -22,7 +22,7 @@
 
 #include "otbDefaultImageMetadataInterfaceFactory.h"
 
-int otbDefaultImageMetadataInterfaceFactoryNew(int argc, char* argv[])
+int otbDefaultImageMetadataInterfaceFactoryNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::DefaultImageMetadataInterfaceFactory ObjectType;
 
diff --git a/Testing/Code/IO/otbDoubleImageIOTest.cxx b/Testing/Code/IO/otbDoubleImageIOTest.cxx
index bd1ceba..59a4143 100644
--- a/Testing/Code/IO/otbDoubleImageIOTest.cxx
+++ b/Testing/Code/IO/otbDoubleImageIOTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbDoubleImageIOTest(int argc, char* argv[])
+int otbDoubleImageIOTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbExtendedFilenameTest.cxx b/Testing/Code/IO/otbExtendedFilenameTest.cxx
index 39f97ae..35346d1 100644
--- a/Testing/Code/IO/otbExtendedFilenameTest.cxx
+++ b/Testing/Code/IO/otbExtendedFilenameTest.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageFileReaderWithExtendedFilename(int argc, char* argv[])
+int otbImageFileReaderWithExtendedFilename(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
@@ -57,7 +57,7 @@ int otbImageFileReaderWithExtendedFilename(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbImageFileWriterWithExtendedFilename(int argc, char* argv[])
+int otbImageFileWriterWithExtendedFilename(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
@@ -81,4 +81,3 @@ int otbImageFileWriterWithExtendedFilename(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/IO/otbExtendedFilenameToReaderOptionsTest.cxx b/Testing/Code/IO/otbExtendedFilenameToReaderOptionsTest.cxx
index 1774f7b..18cd56a 100644
--- a/Testing/Code/IO/otbExtendedFilenameToReaderOptionsTest.cxx
+++ b/Testing/Code/IO/otbExtendedFilenameToReaderOptionsTest.cxx
@@ -21,7 +21,7 @@
 
 typedef otb::ExtendedFilenameToReaderOptions FilenameHelperType;
 
-int otbExtendedFilenameToReaderOptions(int argc, char* argv[])
+int otbExtendedFilenameToReaderOptions(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputExtendedFilename  = argv[1];
diff --git a/Testing/Code/IO/otbExtendedFilenameToWriterOptionsTest.cxx b/Testing/Code/IO/otbExtendedFilenameToWriterOptionsTest.cxx
index 1b05dcf..b949cfa 100644
--- a/Testing/Code/IO/otbExtendedFilenameToWriterOptionsTest.cxx
+++ b/Testing/Code/IO/otbExtendedFilenameToWriterOptionsTest.cxx
@@ -21,7 +21,7 @@
 
 typedef otb::ExtendedFilenameToWriterOptions FilenameHelperType;
 
-int otbExtendedFilenameToWriterOptions(int argc, char* argv[])
+int otbExtendedFilenameToWriterOptions(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputExtendedFilename  = argv[1];
diff --git a/Testing/Code/IO/otbFloatImageIOTest.cxx b/Testing/Code/IO/otbFloatImageIOTest.cxx
index 6762636..f83c185 100644
--- a/Testing/Code/IO/otbFloatImageIOTest.cxx
+++ b/Testing/Code/IO/otbFloatImageIOTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbFloatImageIOTest(int argc, char* argv[])
+int otbFloatImageIOTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbFormosatImageMetadataInterfaceNew.cxx b/Testing/Code/IO/otbFormosatImageMetadataInterfaceNew.cxx
index e99041d..e4e596e 100644
--- a/Testing/Code/IO/otbFormosatImageMetadataInterfaceNew.cxx
+++ b/Testing/Code/IO/otbFormosatImageMetadataInterfaceNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbFormosatImageMetadataInterface.h"
 
-int otbFormosatImageMetadataInterfaceNew(int argc, char* argv[])
+int otbFormosatImageMetadataInterfaceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   otb::FormosatImageMetadataInterface::Pointer object = otb::FormosatImageMetadataInterface::New();
diff --git a/Testing/Code/IO/otbGDALDriverDoubleWritingTest.cxx b/Testing/Code/IO/otbGDALDriverDoubleWritingTest.cxx
index 89cd944..4dcb7fa 100644
--- a/Testing/Code/IO/otbGDALDriverDoubleWritingTest.cxx
+++ b/Testing/Code/IO/otbGDALDriverDoubleWritingTest.cxx
@@ -20,7 +20,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImageFileWriter.h"
 
-int otbGDALDriverDoubleWritingTest(int argc, char * argv[])
+int otbGDALDriverDoubleWritingTest(int itkNotUsed(argc), char * argv[])
 {
   const char * infname1 = argv[1];
   const char * infname2 = argv[2];
diff --git a/Testing/Code/IO/otbGDALImageIOTestCanRead.cxx b/Testing/Code/IO/otbGDALImageIOTestCanRead.cxx
index a95ab10..405d49b 100644
--- a/Testing/Code/IO/otbGDALImageIOTestCanRead.cxx
+++ b/Testing/Code/IO/otbGDALImageIOTestCanRead.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbGDALImageIOTestCanRead(int argc, char* argv[])
+int otbGDALImageIOTestCanRead(int itkNotUsed(argc), char* argv[])
 {
   otb::GDALImageIO::Pointer lGDALImageIO = otb::GDALImageIO::New();
   bool                      lCanRead = lGDALImageIO->CanReadFile(argv[1]);
diff --git a/Testing/Code/IO/otbGDALImageIOTestCanWrite.cxx b/Testing/Code/IO/otbGDALImageIOTestCanWrite.cxx
index 9dce7bd..c095ec2 100644
--- a/Testing/Code/IO/otbGDALImageIOTestCanWrite.cxx
+++ b/Testing/Code/IO/otbGDALImageIOTestCanWrite.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbGDALImageIOTestCanWrite(int argc, char* argv[])
+int otbGDALImageIOTestCanWrite(int itkNotUsed(argc), char* argv[])
 {
   otb::GDALImageIO::Pointer lGDALImageIO = otb::GDALImageIO::New();
   bool                      lCanWrite = lGDALImageIO->CanWriteFile(argv[1]);
diff --git a/Testing/Code/IO/otbGDALImageIOTestWriteMetadata.cxx b/Testing/Code/IO/otbGDALImageIOTestWriteMetadata.cxx
index 31cf96a..53b8bb6 100644
--- a/Testing/Code/IO/otbGDALImageIOTestWriteMetadata.cxx
+++ b/Testing/Code/IO/otbGDALImageIOTestWriteMetadata.cxx
@@ -23,6 +23,7 @@
 #include "gdal_priv.h"
 #include "cpl_string.h"
 #include "ogr_spatialref.h"
+#include "itkMacro.h"
 
 // Class to store ProjRef, GEOTransform and GCP info
 class DatasetInfoGDAL
@@ -128,7 +129,7 @@ void testWriteMetadata(std::string filenameTIFF,
                        std::ostream& os);
 ///////
 // MAIN
-int otbGDALImageIOTestWriteMetadata(int argc, char * argv[])
+int otbGDALImageIOTestWriteMetadata(int itkNotUsed(argc), char * argv[])
 {
   // Parameters
   std::string filenameTIFF = argv[1];
diff --git a/Testing/Code/IO/otbGDALOverviewsBuilder.cxx b/Testing/Code/IO/otbGDALOverviewsBuilder.cxx
index e42f535..377bc0a 100644
--- a/Testing/Code/IO/otbGDALOverviewsBuilder.cxx
+++ b/Testing/Code/IO/otbGDALOverviewsBuilder.cxx
@@ -22,7 +22,7 @@
 
 using namespace otb;
 
-int otbGDALOverviewsBuilderNew(int argc, char* argv[])
+int otbGDALOverviewsBuilderNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef otb::GDALOverviewsBuilder GDALOverviewsBuilderType;
   GDALOverviewsBuilderType::Pointer object = GDALOverviewsBuilderType::New();
@@ -32,7 +32,7 @@ int otbGDALOverviewsBuilderNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbGDALOverviewsBuilder(int argc, char* argv[])
+int otbGDALOverviewsBuilder(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
   int nbResolution = atoi(argv[2]);
diff --git a/Testing/Code/IO/otbIOTests13.cxx b/Testing/Code/IO/otbIOTests13.cxx
index 85e6958..c513ca4 100644
--- a/Testing/Code/IO/otbIOTests13.cxx
+++ b/Testing/Code/IO/otbIOTests13.cxx
@@ -24,10 +24,14 @@
 
 void RegisterTests()
 {
+#ifdef OTB_USE_JPEG2000
   REGISTER_TEST(otbJPEG2000ImageIOTestCanRead);
   REGISTER_TEST(otbJPEG2000ImageIOTestCanWrite);
+#endif
   REGISTER_TEST(otbMultiResolutionReadingInfo);
   REGISTER_TEST(otbVectorImageTest);
   REGISTER_TEST(otbVectorImageLegacyTest);
+#ifdef OTB_USE_JPEG2000
   REGISTER_TEST(otbGenerateClassicalQLWithJPEG2000);
+#endif
 }
diff --git a/Testing/Code/IO/otbIOTests18.cxx b/Testing/Code/IO/otbIOTests18.cxx
index 45b8e9d..a3bb761 100644
--- a/Testing/Code/IO/otbIOTests18.cxx
+++ b/Testing/Code/IO/otbIOTests18.cxx
@@ -26,11 +26,13 @@ void RegisterTests()
 {
   REGISTER_TEST(otbSpotImageMetadataInterfaceNew);
   REGISTER_TEST(otbPleiadesImageMetadataInterfaceNew);
+  REGISTER_TEST(otbSpot6ImageMetadataInterfaceNew);
   REGISTER_TEST(otbFormosatImageMetadataInterfaceNew);
   REGISTER_TEST(otbIkonosImageMetadataInterfaceNew);
   REGISTER_TEST(otbQuickBirdImageMetadataInterfaceNew);
   REGISTER_TEST(otbWorldView2ImageMetadataInterfaceNew);
   REGISTER_TEST(otbTerraSarImageMetadataInterfaceNew);
+
   REGISTER_TEST(otbImageMetadataInterfaceBaseTest);
   REGISTER_TEST(otbOpticalImageMetadataInterfaceTest);
   REGISTER_TEST(otbSarImageMetadataInterfaceTest);
diff --git a/Testing/Code/IO/otbIkonosImageMetadataInterfaceNew.cxx b/Testing/Code/IO/otbIkonosImageMetadataInterfaceNew.cxx
index d20a716..ab19ff0 100644
--- a/Testing/Code/IO/otbIkonosImageMetadataInterfaceNew.cxx
+++ b/Testing/Code/IO/otbIkonosImageMetadataInterfaceNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbIkonosImageMetadataInterface.h"
 
-int otbIkonosImageMetadataInterfaceNew(int argc, char* argv[])
+int otbIkonosImageMetadataInterfaceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   otb::IkonosImageMetadataInterface::Pointer object = otb::IkonosImageMetadataInterface::New();
 
diff --git a/Testing/Code/IO/otbImageFileReaderMSTAR.cxx b/Testing/Code/IO/otbImageFileReaderMSTAR.cxx
index 8782ede..b0d7236 100644
--- a/Testing/Code/IO/otbImageFileReaderMSTAR.cxx
+++ b/Testing/Code/IO/otbImageFileReaderMSTAR.cxx
@@ -26,7 +26,7 @@
 
 #include "itkRescaleIntensityImageFilter.h"
 
-int otbImageFileReaderMSTAR(int argc, char* argv[])
+int otbImageFileReaderMSTAR(int itkNotUsed(argc), char* argv[])
 {
   typedef float         InputPixelType;
   typedef unsigned char OutputPixelType;
diff --git a/Testing/Code/IO/otbImageFileReaderONERAComplex.cxx b/Testing/Code/IO/otbImageFileReaderONERAComplex.cxx
index de0a4c9..60254a6 100644
--- a/Testing/Code/IO/otbImageFileReaderONERAComplex.cxx
+++ b/Testing/Code/IO/otbImageFileReaderONERAComplex.cxx
@@ -27,7 +27,7 @@
 #include "otbImageFileWriter.h"
 #include "otbExtractROI.h"
 
-int otbImageFileReaderONERAComplex(int argc, char* argv[])
+int otbImageFileReaderONERAComplex(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileReaderRADChar.cxx b/Testing/Code/IO/otbImageFileReaderRADChar.cxx
index 3fc27dd..3d33f11 100644
--- a/Testing/Code/IO/otbImageFileReaderRADChar.cxx
+++ b/Testing/Code/IO/otbImageFileReaderRADChar.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbExtractROI.h"
 
-int otbImageFileReaderRADChar(int argc, char* argv[])
+int otbImageFileReaderRADChar(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileReaderRADComplexDouble.cxx b/Testing/Code/IO/otbImageFileReaderRADComplexDouble.cxx
index af00c91..50649c2 100644
--- a/Testing/Code/IO/otbImageFileReaderRADComplexDouble.cxx
+++ b/Testing/Code/IO/otbImageFileReaderRADComplexDouble.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbExtractROI.h"
 
-int otbImageFileReaderRADComplexDouble(int argc, char* argv[])
+int otbImageFileReaderRADComplexDouble(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileReaderRADComplexFloat.cxx b/Testing/Code/IO/otbImageFileReaderRADComplexFloat.cxx
index 8f0a1ad..9131f1a 100644
--- a/Testing/Code/IO/otbImageFileReaderRADComplexFloat.cxx
+++ b/Testing/Code/IO/otbImageFileReaderRADComplexFloat.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbExtractROI.h"
 
-int otbImageFileReaderRADComplexFloat(int argc, char* argv[])
+int otbImageFileReaderRADComplexFloat(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileReaderRADComplexFloatExtract.cxx b/Testing/Code/IO/otbImageFileReaderRADComplexFloatExtract.cxx
index a884e40..a91ef1c 100644
--- a/Testing/Code/IO/otbImageFileReaderRADComplexFloatExtract.cxx
+++ b/Testing/Code/IO/otbImageFileReaderRADComplexFloatExtract.cxx
@@ -28,7 +28,7 @@
 #include "otbComplexToVectorImageCastFilter.h"
 
 
-int otbImageFileReaderRADComplexFloatExtract(int argc, char* argv[])
+int otbImageFileReaderRADComplexFloatExtract(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
@@ -41,7 +41,6 @@ int otbImageFileReaderRADComplexFloatExtract(int argc, char* argv[])
 
   typedef otb::Image<InputPixelType,  Dimension> InputImageType;
   typedef otb::Image<OutputPixelType, Dimension> OutputCplxImageType;
-  typedef otb::Image<float, Dimension>             OutputScalarImageType;
   typedef otb::VectorImage<float, Dimension>       OutputImageType;
 
   typedef otb::ImageFileReader<InputImageType>  ReaderType;
diff --git a/Testing/Code/IO/otbImageFileReaderRADComplexInt.cxx b/Testing/Code/IO/otbImageFileReaderRADComplexInt.cxx
index b43d684..dc09731 100644
--- a/Testing/Code/IO/otbImageFileReaderRADComplexInt.cxx
+++ b/Testing/Code/IO/otbImageFileReaderRADComplexInt.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbExtractROI.h"
 
-int otbImageFileReaderRADComplexInt(int argc, char* argv[])
+int otbImageFileReaderRADComplexInt(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileReaderRADFloat.cxx b/Testing/Code/IO/otbImageFileReaderRADFloat.cxx
index 2d70cf8..416f6e7 100644
--- a/Testing/Code/IO/otbImageFileReaderRADFloat.cxx
+++ b/Testing/Code/IO/otbImageFileReaderRADFloat.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageFileReaderRADFloat(int argc, char* argv[])
+int otbImageFileReaderRADFloat(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileReaderRADInt.cxx b/Testing/Code/IO/otbImageFileReaderRADInt.cxx
index 9c65dcb..244f999 100644
--- a/Testing/Code/IO/otbImageFileReaderRADInt.cxx
+++ b/Testing/Code/IO/otbImageFileReaderRADInt.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbExtractROI.h"
 
-int otbImageFileReaderRADInt(int argc, char* argv[])
+int otbImageFileReaderRADInt(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileReaderRGBTest.cxx b/Testing/Code/IO/otbImageFileReaderRGBTest.cxx
index dcc0244..1a7bfe5 100644
--- a/Testing/Code/IO/otbImageFileReaderRGBTest.cxx
+++ b/Testing/Code/IO/otbImageFileReaderRGBTest.cxx
@@ -25,7 +25,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbImageFileReaderRGBTest(int argc, char* argv[])
+int otbImageFileReaderRGBTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileReaderServerName.cxx b/Testing/Code/IO/otbImageFileReaderServerName.cxx
index 4ee3f00..b775e34 100644
--- a/Testing/Code/IO/otbImageFileReaderServerName.cxx
+++ b/Testing/Code/IO/otbImageFileReaderServerName.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbTileMapImageIO.h"
 
-int otbImageFileReaderServerName(int argc, char* argv[])
+int otbImageFileReaderServerName(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileReaderTest.cxx b/Testing/Code/IO/otbImageFileReaderTest.cxx
index 69385a9..336a6d4 100644
--- a/Testing/Code/IO/otbImageFileReaderTest.cxx
+++ b/Testing/Code/IO/otbImageFileReaderTest.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageFileReaderTest(int argc, char* argv[])
+int otbImageFileReaderTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileReaderTestFloat.cxx b/Testing/Code/IO/otbImageFileReaderTestFloat.cxx
index 4c83978..4d34183 100644
--- a/Testing/Code/IO/otbImageFileReaderTestFloat.cxx
+++ b/Testing/Code/IO/otbImageFileReaderTestFloat.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageFileReaderTestFloat(int argc, char* argv[])
+int otbImageFileReaderTestFloat(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileReaderWithComplexPixel.cxx b/Testing/Code/IO/otbImageFileReaderWithComplexPixel.cxx
index 8a2db6b..1408628 100644
--- a/Testing/Code/IO/otbImageFileReaderWithComplexPixel.cxx
+++ b/Testing/Code/IO/otbImageFileReaderWithComplexPixel.cxx
@@ -90,7 +90,6 @@ int otbVectorImageFileReaderWithComplexPixelTest(int argc, char* argv[])
   typedef std::complex<float>                            PixelType;
   const unsigned int Dimension = 2;
 
-  typedef otb::Image<PixelType,  Dimension>              ImageType;
   typedef otb::VectorImage<PixelType, Dimension>         CplVectorImageType;
 
   typedef otb::ImageFileReader<CplVectorImageType>  ReaderType;
diff --git a/Testing/Code/IO/otbImageFileWriterONERAComplex.cxx b/Testing/Code/IO/otbImageFileWriterONERAComplex.cxx
index 2c3b30d..ebfc654 100644
--- a/Testing/Code/IO/otbImageFileWriterONERAComplex.cxx
+++ b/Testing/Code/IO/otbImageFileWriterONERAComplex.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbExtractROI.h"
 
-int otbImageFileWriterONERAComplex(int argc, char* argv[])
+int otbImageFileWriterONERAComplex(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileWriterRGBTest.cxx b/Testing/Code/IO/otbImageFileWriterRGBTest.cxx
index ba24af1..f3c2055 100644
--- a/Testing/Code/IO/otbImageFileWriterRGBTest.cxx
+++ b/Testing/Code/IO/otbImageFileWriterRGBTest.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageFileWriterRGBTest(int argc, char* argv[])
+int otbImageFileWriterRGBTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx b/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx
index 219cf21..3dd2116 100644
--- a/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx
+++ b/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageFileWriterStreamingONERAComplex(int argc, char* argv[])
+int otbImageFileWriterStreamingONERAComplex(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileWriterTest.cxx b/Testing/Code/IO/otbImageFileWriterTest.cxx
index 0ba5348..3fa5aa1 100644
--- a/Testing/Code/IO/otbImageFileWriterTest.cxx
+++ b/Testing/Code/IO/otbImageFileWriterTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageFileWriterTest(int argc, char* argv[])
+int otbImageFileWriterTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageFileWriterTestWithoutInput.cxx b/Testing/Code/IO/otbImageFileWriterTestWithoutInput.cxx
index bb8c6bc..947ec6f 100644
--- a/Testing/Code/IO/otbImageFileWriterTestWithoutInput.cxx
+++ b/Testing/Code/IO/otbImageFileWriterTestWithoutInput.cxx
@@ -34,14 +34,13 @@
  * Write Image<scalar> with an ImageFileWriter<scalar>
  ***********/
 template<class InternalType>
-int otbImageScalarFileWriterTestWithoutInputGeneric(int argc, char* argv[])
+int otbImageScalarFileWriterTestWithoutInputGeneric(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * outputFilename = argv[1];
 
   typedef InternalType                         PixelType;
   typedef otb::Image<PixelType, 2>             ImageType;
-  typedef typename ImageType::PixelType        ImagePixelType;
   typedef typename ImageType::RegionType       RegionType;
   typedef typename ImageType::SizeType         SizeType;
   typedef typename ImageType::IndexType        IndexType;
@@ -59,6 +58,15 @@ int otbImageScalarFileWriterTestWithoutInputGeneric(int argc, char* argv[])
   region.SetSize(size);
   region.SetIndex(orig);
 
+  typedef typename ImageType::PointType        PointType;
+  typedef typename ImageType::SpacingType      SpacingType;
+  PointType origin;
+  origin.Fill(0.5);
+  SpacingType spacing;
+  spacing.Fill(1.0);
+  image->SetOrigin(origin);
+  image->SetSpacing(spacing);
+
   image->SetRegions(region);
   image->Allocate();
 
@@ -104,14 +112,13 @@ int otbImageScalarFileWriterTestWithoutInputDouble(int argc, char * argv[])
  * Write Image<scalar> with an ImageFileWriter<scalar>
  ***********/
 template<class InternalType>
-int otbImageComplexFileWriterTestWithoutInputGeneric(int argc, char* argv[])
+int otbImageComplexFileWriterTestWithoutInputGeneric(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * outputFilename = argv[1];
 
   typedef std::complex<InternalType>           PixelType;
   typedef otb::Image<PixelType, 2>             ImageType;
-  typedef typename ImageType::PixelType        ImagePixelType;
   typedef typename ImageType::RegionType       RegionType;
   typedef typename ImageType::SizeType         SizeType;
   typedef typename ImageType::IndexType        IndexType;
@@ -129,6 +136,15 @@ int otbImageComplexFileWriterTestWithoutInputGeneric(int argc, char* argv[])
   region.SetSize(size);
   region.SetIndex(orig);
 
+  typedef typename ImageType::PointType        PointType;
+  typedef typename ImageType::SpacingType      SpacingType;
+  PointType origin;
+  origin.Fill(0.5);
+  SpacingType spacing;
+  spacing.Fill(1.0);
+  image->SetOrigin(origin);
+  image->SetSpacing(spacing);
+
   image->SetRegions(region);
   image->Allocate();
 
diff --git a/Testing/Code/IO/otbImageFileWriterWithExtendedOptionBox.cxx b/Testing/Code/IO/otbImageFileWriterWithExtendedOptionBox.cxx
index 1ce827c..68e3bf7 100644
--- a/Testing/Code/IO/otbImageFileWriterWithExtendedOptionBox.cxx
+++ b/Testing/Code/IO/otbImageFileWriterWithExtendedOptionBox.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbMultiChannelExtractROI.h"
 
-int otbImageFileWriterWithExtendedOptionBox(int argc, char* argv[])
+int otbImageFileWriterWithExtendedOptionBox(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const std::string inputFilename = argv[1];
@@ -39,19 +39,13 @@ int otbImageFileWriterWithExtendedOptionBox(int argc, char* argv[])
   const std::string separator = ":";
 
   typedef float InputPixelType;
-  typedef float OutputPixelType;
-
   typedef otb::VectorImage<InputPixelType, 2> InputImageType;
-
-  typedef InputImageType::PixelType   PixelType;
-
   typedef otb::MultiChannelExtractROI<InputImageType::InternalPixelType,
                                       InputImageType::InternalPixelType> ExtractROIFilterType;
 
   typedef otb::ImageFileReader<InputImageType> ReaderType;
   typedef otb::ImageFileWriter<InputImageType> WriterType;
 
-  typedef itk::ImageRegionIterator< InputImageType >       IteratorType;
   typedef itk::ImageRegionConstIterator< InputImageType >  ConstIteratorType;
 
   ReaderType::Pointer reader = ReaderType::New();
diff --git a/Testing/Code/IO/otbImageIOFactoryNew.cxx b/Testing/Code/IO/otbImageIOFactoryNew.cxx
index 0c6ef14..28eb252 100644
--- a/Testing/Code/IO/otbImageIOFactoryNew.cxx
+++ b/Testing/Code/IO/otbImageIOFactoryNew.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbImageIOFactoryNew(int argc, char* argv[])
+int otbImageIOFactoryNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   otb::ImageIOFactory *lImageIOFactory;
   lImageIOFactory = NULL;
diff --git a/Testing/Code/IO/otbImageMetadataFileWriterTest.cxx b/Testing/Code/IO/otbImageMetadataFileWriterTest.cxx
index 421f3fb..880ed2a 100644
--- a/Testing/Code/IO/otbImageMetadataFileWriterTest.cxx
+++ b/Testing/Code/IO/otbImageMetadataFileWriterTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageMetadataFileWriterTest(int argc, char* argv[])
+int otbImageMetadataFileWriterTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageMetadataInterfaceBaseTest.cxx b/Testing/Code/IO/otbImageMetadataInterfaceBaseTest.cxx
index 743132f..7584a34 100644
--- a/Testing/Code/IO/otbImageMetadataInterfaceBaseTest.cxx
+++ b/Testing/Code/IO/otbImageMetadataInterfaceBaseTest.cxx
@@ -27,7 +27,7 @@
 #include "otbImageMetadataInterfaceBase.h"
 #include "otbImageMetadataInterfaceFactory.h"
 
-int otbImageMetadataInterfaceBaseTest(int argc, char* argv[])
+int otbImageMetadataInterfaceBaseTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageMetadataInterfaceTest2.cxx b/Testing/Code/IO/otbImageMetadataInterfaceTest2.cxx
index 5d2a6d6..c6ef5bd 100644
--- a/Testing/Code/IO/otbImageMetadataInterfaceTest2.cxx
+++ b/Testing/Code/IO/otbImageMetadataInterfaceTest2.cxx
@@ -27,7 +27,7 @@
 #include "otbImageMetadataInterfaceBase.h"
 #include "otbImageMetadataInterfaceFactory.h"
 
-int otbImageMetadataInterfaceTest2(int argc, char* argv[])
+int otbImageMetadataInterfaceTest2(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageMetadataStreamingFileWriterTest.cxx b/Testing/Code/IO/otbImageMetadataStreamingFileWriterTest.cxx
index 9c6594e..3491818 100644
--- a/Testing/Code/IO/otbImageMetadataStreamingFileWriterTest.cxx
+++ b/Testing/Code/IO/otbImageMetadataStreamingFileWriterTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageMetadataStreamingFileWriterTest(int argc, char* argv[])
+int otbImageMetadataStreamingFileWriterTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageSeriesFileReader.cxx b/Testing/Code/IO/otbImageSeriesFileReader.cxx
index 9d2c2c7..3760627 100644
--- a/Testing/Code/IO/otbImageSeriesFileReader.cxx
+++ b/Testing/Code/IO/otbImageSeriesFileReader.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "itksys/SystemTools.hxx"
 
-int otbImageSeriesFileReader(int argc, char* argv[])
+int otbImageSeriesFileReader(int itkNotUsed(argc), char* argv[])
 {
   const char * enviMetaFile = argv[1];
   const char * outputFile   = argv[2];
diff --git a/Testing/Code/IO/otbImageStreamingFileWriterTestWithoutInput.cxx b/Testing/Code/IO/otbImageStreamingFileWriterTestWithoutInput.cxx
index e41b5a1..156af38 100644
--- a/Testing/Code/IO/otbImageStreamingFileWriterTestWithoutInput.cxx
+++ b/Testing/Code/IO/otbImageStreamingFileWriterTestWithoutInput.cxx
@@ -35,14 +35,13 @@
  * Write Image<scalar> with an ImageFileWriter<scalar>
  ***********/
 template<class InternalType>
-int otbImageScalarStreamingFileWriterTestWithoutInputGeneric(int argc, char* argv[])
+int otbImageScalarStreamingFileWriterTestWithoutInputGeneric(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * outputFilename = argv[1];
 
   typedef InternalType                                  PixelType;
   typedef otb::Image<PixelType, 2>                      ImageType;
-  typedef typename ImageType::PixelType                 ImagePixelType;
   typedef typename ImageType::RegionType                RegionType;
   typedef typename ImageType::SizeType                  SizeType;
   typedef typename ImageType::IndexType                 IndexType;
@@ -60,6 +59,15 @@ int otbImageScalarStreamingFileWriterTestWithoutInputGeneric(int argc, char* arg
   region.SetSize(size);
   region.SetIndex(orig);
 
+  typedef typename ImageType::PointType        PointType;
+  typedef typename ImageType::SpacingType      SpacingType;
+  PointType origin;
+  origin.Fill(0.5);
+  SpacingType spacing;
+  spacing.Fill(1.0);
+  image->SetOrigin(origin);
+  image->SetSpacing(spacing);
+
   image->SetRegions(region);
   image->Allocate();
 
@@ -106,14 +114,13 @@ int otbImageScalarStreamingFileWriterTestWithoutInputDouble(int argc, char * arg
  * Write Image<scalar> with an ImageFileWriter<scalar>
  ***********/
 template<class InternalType>
-int otbImageComplexStreamingFileWriterTestWithoutInputGeneric(int argc, char* argv[])
+int otbImageComplexStreamingFileWriterTestWithoutInputGeneric(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * outputFilename = argv[1];
 
   typedef std::complex<InternalType>                    PixelType;
   typedef otb::Image<PixelType, 2>                      ImageType;
-  typedef typename ImageType::PixelType                 ImagePixelType;
   typedef typename ImageType::RegionType                RegionType;
   typedef typename ImageType::SizeType                  SizeType;
   typedef typename ImageType::IndexType                 IndexType;
@@ -131,6 +138,15 @@ int otbImageComplexStreamingFileWriterTestWithoutInputGeneric(int argc, char* ar
   region.SetSize(size);
   region.SetIndex(orig);
 
+  typedef typename ImageType::PointType        PointType;
+  typedef typename ImageType::SpacingType      SpacingType;
+  PointType origin;
+  origin.Fill(0.5);
+  SpacingType spacing;
+  spacing.Fill(1.0);
+  image->SetOrigin(origin);
+  image->SetSpacing(spacing);
+
   image->SetRegions(region);
   image->Allocate();
 
diff --git a/Testing/Code/IO/otbImageTest.cxx b/Testing/Code/IO/otbImageTest.cxx
index eb7cfb5..05b2d46 100644
--- a/Testing/Code/IO/otbImageTest.cxx
+++ b/Testing/Code/IO/otbImageTest.cxx
@@ -26,7 +26,7 @@
 #include "otbImage.h"
 #include "otbImageFileReader.h"
 
-int otbImageTest(int argc, char* argv[])
+int otbImageTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbImageToOSMVectorDataGenerator.cxx b/Testing/Code/IO/otbImageToOSMVectorDataGenerator.cxx
index 23ead14..7d28f4f 100644
--- a/Testing/Code/IO/otbImageToOSMVectorDataGenerator.cxx
+++ b/Testing/Code/IO/otbImageToOSMVectorDataGenerator.cxx
@@ -35,7 +35,7 @@ typedef otb::ImageFileReader<ImageType>             ReaderType;
 typedef otb::VectorDataFileWriter<VectorDataType>   VectorDataFileWriterType;
 
 
-int otbImageToOSMVectorDataGeneratorNew(int argc, char * argv[])
+int otbImageToOSMVectorDataGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   FilterType::Pointer vdgenerator = FilterType::New();
 
diff --git a/Testing/Code/IO/otbIntImageIOTest.cxx b/Testing/Code/IO/otbIntImageIOTest.cxx
index 0a3e58d..933f009 100644
--- a/Testing/Code/IO/otbIntImageIOTest.cxx
+++ b/Testing/Code/IO/otbIntImageIOTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbIntImageIOTest(int argc, char* argv[])
+int otbIntImageIOTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbJPEG2000ImageIOTestCanRead.cxx b/Testing/Code/IO/otbJPEG2000ImageIOTestCanRead.cxx
index a6cb703..099407b 100644
--- a/Testing/Code/IO/otbJPEG2000ImageIOTestCanRead.cxx
+++ b/Testing/Code/IO/otbJPEG2000ImageIOTestCanRead.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbJPEG2000ImageIOTestCanRead(int argc, char* argv[])
+int otbJPEG2000ImageIOTestCanRead(int itkNotUsed(argc), char* argv[])
 {
   otb::JPEG2000ImageIO::Pointer lJPEG2000ImageIO = otb::JPEG2000ImageIO::New();
   bool                          lCanRead = lJPEG2000ImageIO->CanReadFile(argv[1]);
diff --git a/Testing/Code/IO/otbJPEG2000ImageIOTestCanWrite.cxx b/Testing/Code/IO/otbJPEG2000ImageIOTestCanWrite.cxx
index 7034e2e..35f51e8 100644
--- a/Testing/Code/IO/otbJPEG2000ImageIOTestCanWrite.cxx
+++ b/Testing/Code/IO/otbJPEG2000ImageIOTestCanWrite.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbJPEG2000ImageIOTestCanWrite(int argc, char* argv[])
+int otbJPEG2000ImageIOTestCanWrite(int itkNotUsed(argc), char* argv[])
 {
   otb::JPEG2000ImageIO::Pointer lJPEG2000ImageIO = otb::JPEG2000ImageIO::New();
   bool                          lCanWrite = lJPEG2000ImageIO->CanWriteFile(argv[1]);
diff --git a/Testing/Code/IO/otbKMLVectorDataIONew.cxx b/Testing/Code/IO/otbKMLVectorDataIONew.cxx
index 3c8ce7a..f3dbc41 100644
--- a/Testing/Code/IO/otbKMLVectorDataIONew.cxx
+++ b/Testing/Code/IO/otbKMLVectorDataIONew.cxx
@@ -18,7 +18,7 @@
 
 #include "otbKMLVectorDataIO.h"
 
-int otbKMLVectorDataIONew(int argc, char * argv[])
+int otbKMLVectorDataIONew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::KMLVectorDataIO KMLVectorDataIOType;
   KMLVectorDataIOType::Pointer object = KMLVectorDataIOType::New();
diff --git a/Testing/Code/IO/otbKMLVectorDataIOTestCanRead.cxx b/Testing/Code/IO/otbKMLVectorDataIOTestCanRead.cxx
index 3d15aa1..a87df4c 100644
--- a/Testing/Code/IO/otbKMLVectorDataIOTestCanRead.cxx
+++ b/Testing/Code/IO/otbKMLVectorDataIOTestCanRead.cxx
@@ -19,7 +19,7 @@
 #include "otbKMLVectorDataIO.h"
 #include <iostream>
 
-int otbKMLVectorDataIOTestCanRead(int argc, char* argv[])
+int otbKMLVectorDataIOTestCanRead(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::KMLVectorDataIO KMLVectorDataIOType;
   KMLVectorDataIOType::Pointer object = KMLVectorDataIOType::New();
diff --git a/Testing/Code/IO/otbKMLVectorDataIOTestCanWrite.cxx b/Testing/Code/IO/otbKMLVectorDataIOTestCanWrite.cxx
index d474a5b..861ae69 100644
--- a/Testing/Code/IO/otbKMLVectorDataIOTestCanWrite.cxx
+++ b/Testing/Code/IO/otbKMLVectorDataIOTestCanWrite.cxx
@@ -19,7 +19,7 @@
 #include "otbKMLVectorDataIO.h"
 #include <iostream>
 
-int otbKMLVectorDataIOTestCanWrite(int argc, char* argv[])
+int otbKMLVectorDataIOTestCanWrite(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::KMLVectorDataIO KMLVectorDataIOType;
   KMLVectorDataIOType::Pointer object = KMLVectorDataIOType::New();
diff --git a/Testing/Code/IO/otbKmzProductWriter.cxx b/Testing/Code/IO/otbKmzProductWriter.cxx
index 826c552..e7077b3 100644
--- a/Testing/Code/IO/otbKmzProductWriter.cxx
+++ b/Testing/Code/IO/otbKmzProductWriter.cxx
@@ -31,7 +31,7 @@ typedef GCPsToSensorModelFilterType::Point2DType        Point2DType;
 typedef GCPsToSensorModelFilterType::Point3DType        Point3DType;
 
 
-int otbKmzProductWriterNew(int argc, char* argv[])
+int otbKmzProductWriterNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   KmzProductWriterType::Pointer  kmzWriter  = KmzProductWriterType::New();
   return EXIT_SUCCESS;
diff --git a/Testing/Code/IO/otbLUMImageIOTestCanRead.cxx b/Testing/Code/IO/otbLUMImageIOTestCanRead.cxx
index 7c0848f..6d6eb41 100644
--- a/Testing/Code/IO/otbLUMImageIOTestCanRead.cxx
+++ b/Testing/Code/IO/otbLUMImageIOTestCanRead.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbLUMImageIOTestCanRead(int argc, char* argv[])
+int otbLUMImageIOTestCanRead(int itkNotUsed(argc), char* argv[])
 {
   otb::LUMImageIO::Pointer lLUMImageIO = otb::LUMImageIO::New();
   bool                     lCanRead = lLUMImageIO->CanReadFile(argv[1]);
diff --git a/Testing/Code/IO/otbLUMImageIOTestCanWrite.cxx b/Testing/Code/IO/otbLUMImageIOTestCanWrite.cxx
index 4bf10d0..9f9c62e 100644
--- a/Testing/Code/IO/otbLUMImageIOTestCanWrite.cxx
+++ b/Testing/Code/IO/otbLUMImageIOTestCanWrite.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbLUMImageIOTestCanWrite(int argc, char* argv[])
+int otbLUMImageIOTestCanWrite(int itkNotUsed(argc), char* argv[])
 {
   otb::LUMImageIO::Pointer lLUMImageIO = otb::LUMImageIO::New();
   bool                     lCanRead = lLUMImageIO->CanWriteFile(argv[1]);
diff --git a/Testing/Code/IO/otbMSTARImageIOTestCanRead.cxx b/Testing/Code/IO/otbMSTARImageIOTestCanRead.cxx
index 5189cb9..81a4d91 100644
--- a/Testing/Code/IO/otbMSTARImageIOTestCanRead.cxx
+++ b/Testing/Code/IO/otbMSTARImageIOTestCanRead.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbMSTARImageIOTestCanRead(int argc, char* argv[])
+int otbMSTARImageIOTestCanRead(int itkNotUsed(argc), char* argv[])
 {
   otb::MSTARImageIO::Pointer lMSTARImageIO = otb::MSTARImageIO::New();
   bool                       lCanRead = lMSTARImageIO->CanReadFile(argv[1]);
diff --git a/Testing/Code/IO/otbMWImageIOTestCanRead.cxx b/Testing/Code/IO/otbMWImageIOTestCanRead.cxx
index 7f7933f..40327bd 100644
--- a/Testing/Code/IO/otbMWImageIOTestCanRead.cxx
+++ b/Testing/Code/IO/otbMWImageIOTestCanRead.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbMWImageIOTestCanRead(int argc, char* argv[])
+int otbMWImageIOTestCanRead(int itkNotUsed(argc), char* argv[])
 {
   otb::MWImageIO::Pointer lMWImageIO = otb::MWImageIO::New();
   bool                    lCanRead = lMWImageIO->CanReadFile(argv[1]);
diff --git a/Testing/Code/IO/otbMWImageIOTestCanWrite.cxx b/Testing/Code/IO/otbMWImageIOTestCanWrite.cxx
index e76f384..1a3b87b 100644
--- a/Testing/Code/IO/otbMWImageIOTestCanWrite.cxx
+++ b/Testing/Code/IO/otbMWImageIOTestCanWrite.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbMWImageIOTestCanWrite(int argc, char* argv[])
+int otbMWImageIOTestCanWrite(int itkNotUsed(argc), char* argv[])
 {
   otb::MWImageIO::Pointer lMWImageIO = otb::MWImageIO::New();
   bool                    lCanRead = lMWImageIO->CanWriteFile(argv[1]);
diff --git a/Testing/Code/IO/otbMapFileProductWriter.cxx b/Testing/Code/IO/otbMapFileProductWriter.cxx
index 78467ac..b9924db 100644
--- a/Testing/Code/IO/otbMapFileProductWriter.cxx
+++ b/Testing/Code/IO/otbMapFileProductWriter.cxx
@@ -21,7 +21,7 @@
 #include "otbVectorImage.h"
 #include "otbImageFileReader.h"
 
-int otbMapFileProductWriter(int argc, char* argv[])
+int otbMapFileProductWriter(int itkNotUsed(argc), char* argv[])
 {
   const char * infname = argv[1];
   const char * path = argv[2];
@@ -52,4 +52,3 @@ int otbMapFileProductWriter(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/IO/otbMapFileProductWriterNew.cxx b/Testing/Code/IO/otbMapFileProductWriterNew.cxx
index ddad16c..ef71ed6 100644
--- a/Testing/Code/IO/otbMapFileProductWriterNew.cxx
+++ b/Testing/Code/IO/otbMapFileProductWriterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbMapFileProductWriter.h"
 #include "otbVectorImage.h"
 
-int otbMapFileProductWriterNew(int argc, char* argv[])
+int otbMapFileProductWriterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef otb::VectorImage<double>               ImageType;
diff --git a/Testing/Code/IO/otbMapProjectionAdapterTest.cxx b/Testing/Code/IO/otbMapProjectionAdapterTest.cxx
index 4c0b715..88b9129 100644
--- a/Testing/Code/IO/otbMapProjectionAdapterTest.cxx
+++ b/Testing/Code/IO/otbMapProjectionAdapterTest.cxx
@@ -21,7 +21,7 @@
 
 #include "otbMapProjectionAdapter.h"
 
-int otbMapProjectionAdapterTest(int argc, char* argv[])
+int otbMapProjectionAdapterTest(int itkNotUsed(argc), char* argv[])
 {
   const char *  outFileName = argv[1];
   std::ofstream file;
diff --git a/Testing/Code/IO/otbOGRVectorDataIOCanWrite.cxx b/Testing/Code/IO/otbOGRVectorDataIOCanWrite.cxx
index 228fc4e..823d927 100644
--- a/Testing/Code/IO/otbOGRVectorDataIOCanWrite.cxx
+++ b/Testing/Code/IO/otbOGRVectorDataIOCanWrite.cxx
@@ -19,7 +19,7 @@
 #include "otbOGRVectorDataIO.h"
 #include <iostream>
 
-int otbOGRVectorDataIOCanWrite(int argc, char* argv[])
+int otbOGRVectorDataIOCanWrite(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::OGRVectorDataIO OGRVectorDataIOType;
   OGRVectorDataIOType::Pointer object = OGRVectorDataIOType::New();
diff --git a/Testing/Code/IO/otbOGRVectorDataIONew.cxx b/Testing/Code/IO/otbOGRVectorDataIONew.cxx
index feee962..1a9fb25 100644
--- a/Testing/Code/IO/otbOGRVectorDataIONew.cxx
+++ b/Testing/Code/IO/otbOGRVectorDataIONew.cxx
@@ -19,7 +19,7 @@
 #include "otbOGRVectorDataIO.h"
 #include "otbVectorData.h"
 
-int otbOGRVectorDataIONew(int argc, char * argv[])
+int otbOGRVectorDataIONew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::OGRVectorDataIO OGRVectorDataIOType;
   OGRVectorDataIOType::Pointer object = OGRVectorDataIOType::New();
diff --git a/Testing/Code/IO/otbONERAImageIOTestCanRead.cxx b/Testing/Code/IO/otbONERAImageIOTestCanRead.cxx
index 36e0bdb..f6bf567 100644
--- a/Testing/Code/IO/otbONERAImageIOTestCanRead.cxx
+++ b/Testing/Code/IO/otbONERAImageIOTestCanRead.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbONERAImageIOTestCanRead(int argc, char* argv[])
+int otbONERAImageIOTestCanRead(int itkNotUsed(argc), char* argv[])
 {
   otb::ONERAImageIO::Pointer lONERAImageIO = otb::ONERAImageIO::New();
   bool                       lCanRead = lONERAImageIO->CanReadFile(argv[1]);
diff --git a/Testing/Code/IO/otbOSMDataToVectorDataTests.cxx b/Testing/Code/IO/otbOSMDataToVectorDataTests.cxx
index 2f876db..c7c48a5 100644
--- a/Testing/Code/IO/otbOSMDataToVectorDataTests.cxx
+++ b/Testing/Code/IO/otbOSMDataToVectorDataTests.cxx
@@ -24,14 +24,14 @@ typedef otb::OSMDataToVectorDataGenerator                     FilterType;
 typedef otb::VectorDataFileWriter<FilterType::VectorDataType> VectorDataFileWriterType;
 
 
-int otbOSMToVectorDataGeneratorNew (int argc, char * argv[])
+int otbOSMToVectorDataGeneratorNew (int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   FilterType::Pointer filter = FilterType::New();
 
   return EXIT_SUCCESS;
 }
 
-int otbOSMToVectorDataGeneratorTest (int argc, char * argv[])
+int otbOSMToVectorDataGeneratorTest (int itkNotUsed(argc), char * argv[])
 {
   FilterType::Pointer filter = FilterType::New();
   filter->SetFileName(argv[1]);
diff --git a/Testing/Code/IO/otbOpticalDefaultImageMetadataInterface.cxx b/Testing/Code/IO/otbOpticalDefaultImageMetadataInterface.cxx
index c1c6e51..13b13de 100644
--- a/Testing/Code/IO/otbOpticalDefaultImageMetadataInterface.cxx
+++ b/Testing/Code/IO/otbOpticalDefaultImageMetadataInterface.cxx
@@ -21,7 +21,7 @@
 #include "itkMacro.h"
 #include "otbOpticalDefaultImageMetadataInterface.h"
 
-int otbOpticalDefaultImageMetadataInterface(int argc, char* argv[])
+int otbOpticalDefaultImageMetadataInterface(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef otb::OpticalDefaultImageMetadataInterface ObjectType;
 
diff --git a/Testing/Code/IO/otbOpticalDefaultImageMetadataInterfaceFactoryNew.cxx b/Testing/Code/IO/otbOpticalDefaultImageMetadataInterfaceFactoryNew.cxx
index 819e838..ff3b06b 100644
--- a/Testing/Code/IO/otbOpticalDefaultImageMetadataInterfaceFactoryNew.cxx
+++ b/Testing/Code/IO/otbOpticalDefaultImageMetadataInterfaceFactoryNew.cxx
@@ -22,7 +22,7 @@
 
 #include "otbOpticalDefaultImageMetadataInterfaceFactory.h"
 
-int otbOpticalDefaultImageMetadataInterfaceFactoryNew(int argc, char* argv[])
+int otbOpticalDefaultImageMetadataInterfaceFactoryNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::OpticalDefaultImageMetadataInterfaceFactory ObjectType;
 
diff --git a/Testing/Code/IO/otbOpticalDefaultImageMetadataInterfaceNew.cxx b/Testing/Code/IO/otbOpticalDefaultImageMetadataInterfaceNew.cxx
index ed2375a..1b7cf1a 100644
--- a/Testing/Code/IO/otbOpticalDefaultImageMetadataInterfaceNew.cxx
+++ b/Testing/Code/IO/otbOpticalDefaultImageMetadataInterfaceNew.cxx
@@ -22,7 +22,7 @@
 
 #include "otbOpticalDefaultImageMetadataInterface.h"
 
-int otbOpticalDefaultImageMetadataInterfaceNew(int argc, char* argv[])
+int otbOpticalDefaultImageMetadataInterfaceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::OpticalDefaultImageMetadataInterface ObjectType;
 
diff --git a/Testing/Code/IO/otbOpticalImageMetadataInterfaceTest.cxx b/Testing/Code/IO/otbOpticalImageMetadataInterfaceTest.cxx
index 45f5146..82db1ce 100644
--- a/Testing/Code/IO/otbOpticalImageMetadataInterfaceTest.cxx
+++ b/Testing/Code/IO/otbOpticalImageMetadataInterfaceTest.cxx
@@ -27,7 +27,7 @@
 #include "otbOpticalImageMetadataInterface.h"
 #include "otbOpticalImageMetadataInterfaceFactory.h"
 
-int otbOpticalImageMetadataInterfaceTest(int argc, char* argv[])
+int otbOpticalImageMetadataInterfaceTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbPNGIndexedNbBandsTest.cxx b/Testing/Code/IO/otbPNGIndexedNbBandsTest.cxx
index 707b3d9..3be825b 100644
--- a/Testing/Code/IO/otbPNGIndexedNbBandsTest.cxx
+++ b/Testing/Code/IO/otbPNGIndexedNbBandsTest.cxx
@@ -24,7 +24,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbPNGIndexedNbBandsTest(int argc, char* argv[])
+int otbPNGIndexedNbBandsTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char *       inputFilename    = argv[1];
diff --git a/Testing/Code/IO/otbPipeline.cxx b/Testing/Code/IO/otbPipeline.cxx
index ed68670..f141358 100644
--- a/Testing/Code/IO/otbPipeline.cxx
+++ b/Testing/Code/IO/otbPipeline.cxx
@@ -20,7 +20,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbPipeline(int argc, char * argv[])
+int otbPipeline(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::Image<unsigned char, 2>    ImageType;
   typedef otb::ImageFileReader<ImageType> ReaderType;
diff --git a/Testing/Code/IO/otbPipelineMetadataHandlingTest.cxx b/Testing/Code/IO/otbPipelineMetadataHandlingTest.cxx
index 2f10ee9..e48aae5 100644
--- a/Testing/Code/IO/otbPipelineMetadataHandlingTest.cxx
+++ b/Testing/Code/IO/otbPipelineMetadataHandlingTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbPipelineMetadataHandlingTest(int argc, char* argv[])
+int otbPipelineMetadataHandlingTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbPipelineMetadataHandlingWithUFFilterTest.cxx b/Testing/Code/IO/otbPipelineMetadataHandlingWithUFFilterTest.cxx
index f2c1959..d194750 100644
--- a/Testing/Code/IO/otbPipelineMetadataHandlingWithUFFilterTest.cxx
+++ b/Testing/Code/IO/otbPipelineMetadataHandlingWithUFFilterTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbPipelineMetadataHandlingWithUFFilterTest(int argc, char* argv[])
+int otbPipelineMetadataHandlingWithUFFilterTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbPleiadesImageMetadataInterfaceNew.cxx b/Testing/Code/IO/otbPleiadesImageMetadataInterfaceNew.cxx
index dd96668..88e62a7 100644
--- a/Testing/Code/IO/otbPleiadesImageMetadataInterfaceNew.cxx
+++ b/Testing/Code/IO/otbPleiadesImageMetadataInterfaceNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbPleiadesImageMetadataInterface.h"
 
-int otbPleiadesImageMetadataInterfaceNew(int argc, char* argv[])
+int otbPleiadesImageMetadataInterfaceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   otb::PleiadesImageMetadataInterface::Pointer object = otb::PleiadesImageMetadataInterface::New();
 
diff --git a/Testing/Code/IO/otbQuickBirdImageMetadataInterfaceNew.cxx b/Testing/Code/IO/otbQuickBirdImageMetadataInterfaceNew.cxx
index 4d58d86..6a20f97 100644
--- a/Testing/Code/IO/otbQuickBirdImageMetadataInterfaceNew.cxx
+++ b/Testing/Code/IO/otbQuickBirdImageMetadataInterfaceNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbQuickBirdImageMetadataInterface.h"
 
-int otbQuickBirdImageMetadataInterfaceNew(int argc, char* argv[])
+int otbQuickBirdImageMetadataInterfaceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   otb::QuickBirdImageMetadataInterface::Pointer object = otb::QuickBirdImageMetadataInterface::New();
 
diff --git a/Testing/Code/IO/otbRADImageIOTestCanRead.cxx b/Testing/Code/IO/otbRADImageIOTestCanRead.cxx
index e25d901..5f1324d 100644
--- a/Testing/Code/IO/otbRADImageIOTestCanRead.cxx
+++ b/Testing/Code/IO/otbRADImageIOTestCanRead.cxx
@@ -22,7 +22,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbRADImageIOTestCanRead(int argc, char* argv[])
+int otbRADImageIOTestCanRead(int itkNotUsed(argc), char* argv[])
 {
   otb::RADImageIO::Pointer lRADImageIO = otb::RADImageIO::New();
   bool                     lCanRead = lRADImageIO->CanReadFile(argv[1]);
diff --git a/Testing/Code/IO/otbReadingComplexDataIntoComplexImageTest.cxx b/Testing/Code/IO/otbReadingComplexDataIntoComplexImageTest.cxx
index 851982b..f2f2e96 100644
--- a/Testing/Code/IO/otbReadingComplexDataIntoComplexImageTest.cxx
+++ b/Testing/Code/IO/otbReadingComplexDataIntoComplexImageTest.cxx
@@ -22,7 +22,7 @@
 #include "otbVectorImage.h"
 #include "otbMacro.h"
 
-int otbReadingComplexDataIntoComplexImageTest(int argc, char * argv[])
+int otbReadingComplexDataIntoComplexImageTest(int itkNotUsed(argc), char * argv[])
 {
   typedef double                                RealType;
   typedef std::complex<RealType>                PixelType;
diff --git a/Testing/Code/IO/otbSarDefaultImageMetadataInterface.cxx b/Testing/Code/IO/otbSarDefaultImageMetadataInterface.cxx
index d162486..e0a7e9c 100644
--- a/Testing/Code/IO/otbSarDefaultImageMetadataInterface.cxx
+++ b/Testing/Code/IO/otbSarDefaultImageMetadataInterface.cxx
@@ -21,7 +21,7 @@
 #include "itkMacro.h"
 #include "otbSarDefaultImageMetadataInterface.h"
 
-int otbSarDefaultImageMetadataInterface(int argc, char* argv[])
+int otbSarDefaultImageMetadataInterface(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef otb::SarDefaultImageMetadataInterface ObjectType;
 
diff --git a/Testing/Code/IO/otbSarDefaultImageMetadataInterfaceFactoryNew.cxx b/Testing/Code/IO/otbSarDefaultImageMetadataInterfaceFactoryNew.cxx
index b746cd6..4550e36 100644
--- a/Testing/Code/IO/otbSarDefaultImageMetadataInterfaceFactoryNew.cxx
+++ b/Testing/Code/IO/otbSarDefaultImageMetadataInterfaceFactoryNew.cxx
@@ -22,7 +22,7 @@
 
 #include "otbSarDefaultImageMetadataInterfaceFactory.h"
 
-int otbSarDefaultImageMetadataInterfaceFactoryNew(int argc, char* argv[])
+int otbSarDefaultImageMetadataInterfaceFactoryNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::SarDefaultImageMetadataInterfaceFactory ObjectType;
 
diff --git a/Testing/Code/IO/otbSarDefaultImageMetadataInterfaceNew.cxx b/Testing/Code/IO/otbSarDefaultImageMetadataInterfaceNew.cxx
index 7f46e87..bd916bc 100644
--- a/Testing/Code/IO/otbSarDefaultImageMetadataInterfaceNew.cxx
+++ b/Testing/Code/IO/otbSarDefaultImageMetadataInterfaceNew.cxx
@@ -22,7 +22,7 @@
 
 #include "otbSarDefaultImageMetadataInterface.h"
 
-int otbSarDefaultImageMetadataInterfaceNew(int argc, char* argv[])
+int otbSarDefaultImageMetadataInterfaceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::SarDefaultImageMetadataInterface ObjectType;
 
diff --git a/Testing/Code/IO/otbSarImageMetadataInterfaceTest.cxx b/Testing/Code/IO/otbSarImageMetadataInterfaceTest.cxx
index 71c34aa..f60a650 100644
--- a/Testing/Code/IO/otbSarImageMetadataInterfaceTest.cxx
+++ b/Testing/Code/IO/otbSarImageMetadataInterfaceTest.cxx
@@ -44,7 +44,7 @@ void printPointSet(otb::SarImageMetadataInterface::PointSetPointer pointSet, std
     }
 }
 
-int otbSarImageMetadataInterfaceTest(int argc, char* argv[])
+int otbSarImageMetadataInterfaceTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbScalarBufferToImageFileWriterNew.cxx b/Testing/Code/IO/otbScalarBufferToImageFileWriterNew.cxx
index a94bd14..e45abd5 100644
--- a/Testing/Code/IO/otbScalarBufferToImageFileWriterNew.cxx
+++ b/Testing/Code/IO/otbScalarBufferToImageFileWriterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbScalarBufferToImageFileWriter.h"
 
 
-int otbScalarBufferToImageFileWriterNew(int argc, char* argv[])
+int otbScalarBufferToImageFileWriterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::ScalarBufferToImageFileWriter<int, double> FilterType;
   FilterType::Pointer filter = FilterType::New();
diff --git a/Testing/Code/IO/otbScalarBufferToImageFileWriterTest.cxx b/Testing/Code/IO/otbScalarBufferToImageFileWriterTest.cxx
index 41c9919..1961cd4 100644
--- a/Testing/Code/IO/otbScalarBufferToImageFileWriterTest.cxx
+++ b/Testing/Code/IO/otbScalarBufferToImageFileWriterTest.cxx
@@ -21,7 +21,7 @@
 #include "otbScalarBufferToImageFileWriter.h"
 
 
-int otbScalarBufferToImageFileWriterTest(int argc, char* argv[])
+int otbScalarBufferToImageFileWriterTest(int itkNotUsed(argc), char* argv[])
 {
        unsigned int nbCh = atoi(argv[1]);
        unsigned int sizeX = atoi(argv[2]);
diff --git a/Testing/Code/IO/otbShortImageIOTest.cxx b/Testing/Code/IO/otbShortImageIOTest.cxx
index 2dd8515..ec5cf95 100644
--- a/Testing/Code/IO/otbShortImageIOTest.cxx
+++ b/Testing/Code/IO/otbShortImageIOTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbShortImageIOTest(int argc, char* argv[])
+int otbShortImageIOTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbShortRGBImageIOTest.cxx b/Testing/Code/IO/otbShortRGBImageIOTest.cxx
index e93620a..1ea47b1 100644
--- a/Testing/Code/IO/otbShortRGBImageIOTest.cxx
+++ b/Testing/Code/IO/otbShortRGBImageIOTest.cxx
@@ -25,7 +25,7 @@
 #include "itkMacro.h"
 #include <iostream>
 
-int otbShortRGBImageIOTest(int argc, char* argv[])
+int otbShortRGBImageIOTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbSpectralSensitivityReaderNew.cxx b/Testing/Code/IO/otbSpectralSensitivityReaderNew.cxx
index 656bde1..b4475ad 100644
--- a/Testing/Code/IO/otbSpectralSensitivityReaderNew.cxx
+++ b/Testing/Code/IO/otbSpectralSensitivityReaderNew.cxx
@@ -20,7 +20,7 @@
 
 using namespace otb;
 
-int otbSpectralSensitivityReaderNew(int argc, char* argv[])
+int otbSpectralSensitivityReaderNew(int itkNotUsed(argc) char * itkNotUsed(argv) [])
 {
 
   SpectralSensitivityReader::Pointer spectSen = SpectralSensitivityReader::New();
diff --git a/Testing/Code/IO/otbSpectralSensitivityReaderTest.cxx b/Testing/Code/IO/otbSpectralSensitivityReaderTest.cxx
index 7931d6e..993c29c 100644
--- a/Testing/Code/IO/otbSpectralSensitivityReaderTest.cxx
+++ b/Testing/Code/IO/otbSpectralSensitivityReaderTest.cxx
@@ -23,7 +23,7 @@
 
 using namespace otb;
 
-int otbSpectralSensitivityReaderNew(int argc, char* argv[])
+int otbSpectralSensitivityReaderNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
 
   SpectralSensitivityReader::Pointer spectSen = SpectralSensitivityReader::New();
@@ -33,7 +33,7 @@ int otbSpectralSensitivityReaderNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbSpectralSensitivityReaderTest(int argc, char* argv[])
+int otbSpectralSensitivityReaderTest(int itkNotUsed(argc), char* argv[])
 {
   const char * dataPath  = argv[1];
   const char * imageName = argv[2];
@@ -60,7 +60,7 @@ int otbSpectralSensitivityReaderTest(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbSpectralSensitivityReaderGenericTest(int argc, char* argv[])
+int otbSpectralSensitivityReaderGenericTest(int itkNotUsed(argc), char* argv[])
 {
   const char * sensitivityFileName = argv[1];
   const char * imageName = argv[2];
@@ -87,4 +87,3 @@ int otbSpectralSensitivityReaderGenericTest(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/IO/otbSpot6ImageMetadataInterfaceNew.cxx b/Testing/Code/IO/otbSpot6ImageMetadataInterfaceNew.cxx
new file mode 100644
index 0000000..371ac3a
--- /dev/null
+++ b/Testing/Code/IO/otbSpot6ImageMetadataInterfaceNew.cxx
@@ -0,0 +1,34 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+  PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+
+
+#include "itkMacro.h"
+
+#include <iostream>
+
+#include "otbSpot6ImageMetadataInterface.h"
+
+int otbSpot6ImageMetadataInterfaceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
+{
+  otb::Spot6ImageMetadataInterface::Pointer object = otb::Spot6ImageMetadataInterface::New();
+
+  std::cout << object << std::endl;
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/IO/otbSpotImageMetadataInterfaceNew.cxx b/Testing/Code/IO/otbSpotImageMetadataInterfaceNew.cxx
index 7fdd796..d5e62c9 100644
--- a/Testing/Code/IO/otbSpotImageMetadataInterfaceNew.cxx
+++ b/Testing/Code/IO/otbSpotImageMetadataInterfaceNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbSpotImageMetadataInterface.h"
 
-int otbSpotImageMetadataInterfaceNew(int argc, char* argv[])
+int otbSpotImageMetadataInterfaceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   otb::SpotImageMetadataInterface::Pointer object = otb::SpotImageMetadataInterface::New();
 
diff --git a/Testing/Code/IO/otbStreamingImageFileWriterTest.cxx b/Testing/Code/IO/otbStreamingImageFileWriterTest.cxx
index d330368..035a7c9 100644
--- a/Testing/Code/IO/otbStreamingImageFileWriterTest.cxx
+++ b/Testing/Code/IO/otbStreamingImageFileWriterTest.cxx
@@ -27,7 +27,7 @@
 #include "otbStreamingImageFileWriter.h"
 #include "otbImageFileWriter.h"
 
-int otbStreamingImageFileWriterTest(int argc, char* argv[])
+int otbStreamingImageFileWriterTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbStreamingImageFileWriterTestCalculateNumberOfDivisions.cxx b/Testing/Code/IO/otbStreamingImageFileWriterTestCalculateNumberOfDivisions.cxx
index e60ee04..fe3bae2 100644
--- a/Testing/Code/IO/otbStreamingImageFileWriterTestCalculateNumberOfDivisions.cxx
+++ b/Testing/Code/IO/otbStreamingImageFileWriterTestCalculateNumberOfDivisions.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbImageFileWriterTestCalculateNumberOfDivisions(int argc, char* argv[])
+int otbImageFileWriterTestCalculateNumberOfDivisions(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbStreamingImageFileWriterWithFilterTest.cxx b/Testing/Code/IO/otbStreamingImageFileWriterWithFilterTest.cxx
index 01a61a4..99c23c6 100644
--- a/Testing/Code/IO/otbStreamingImageFileWriterWithFilterTest.cxx
+++ b/Testing/Code/IO/otbStreamingImageFileWriterWithFilterTest.cxx
@@ -28,7 +28,7 @@
 #include "otbImageFileWriter.h"
 #include "itkMeanImageFilter.h"
 
-int otbImageFileWriterWithFilterTest(int argc, char* argv[])
+int otbImageFileWriterWithFilterTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbStreamingImageFilterTest.cxx b/Testing/Code/IO/otbStreamingImageFilterTest.cxx
index da5c323..7ac0ac0 100644
--- a/Testing/Code/IO/otbStreamingImageFilterTest.cxx
+++ b/Testing/Code/IO/otbStreamingImageFilterTest.cxx
@@ -27,7 +27,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbStreamingImageFilterTest(int argc, char* argv[])
+int otbStreamingImageFilterTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbStreamingShortImageFileWriterTest.cxx b/Testing/Code/IO/otbStreamingShortImageFileWriterTest.cxx
index 01d0852..d9af7ad 100644
--- a/Testing/Code/IO/otbStreamingShortImageFileWriterTest.cxx
+++ b/Testing/Code/IO/otbStreamingShortImageFileWriterTest.cxx
@@ -27,7 +27,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImageFileWriter.h"
 
-int otbStreamingShortImageFileWriterTest(int argc, char* argv[])
+int otbStreamingShortImageFileWriterTest(int itkNotUsed(argc), char* argv[])
 {
   // Verify the number of parameters in the command line
   const char * inputFilename  = argv[1];
diff --git a/Testing/Code/IO/otbTerraSarImageMetadataInterfaceNew.cxx b/Testing/Code/IO/otbTerraSarImageMetadataInterfaceNew.cxx
index 80aef48..309d195 100644
--- a/Testing/Code/IO/otbTerraSarImageMetadataInterfaceNew.cxx
+++ b/Testing/Code/IO/otbTerraSarImageMetadataInterfaceNew.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileReader.h"
 #include "otbTerraSarImageMetadataInterface.h"
 
-int otbTerraSarImageMetadataInterfaceNew(int argc, char* argv[])
+int otbTerraSarImageMetadataInterfaceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   otb::TerraSarImageMetadataInterface::Pointer object = otb::TerraSarImageMetadataInterface::New();
 
diff --git a/Testing/Code/IO/otbThreadsTest.cxx b/Testing/Code/IO/otbThreadsTest.cxx
index c176a1d..5d51a2b 100644
--- a/Testing/Code/IO/otbThreadsTest.cxx
+++ b/Testing/Code/IO/otbThreadsTest.cxx
@@ -18,8 +18,9 @@
 
 #include <cstdlib>
 #include "otbThreads.h"
+#include "itkMacro.h"
 
-int otbThreadsTest(int argc, char* argv[])
+int otbThreadsTest(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   otb::Threads::Sleep(10);
   return EXIT_SUCCESS;
diff --git a/Testing/Code/IO/otbTileMapImageIOHelperTest.cxx b/Testing/Code/IO/otbTileMapImageIOHelperTest.cxx
index 11798a9..865962c 100644
--- a/Testing/Code/IO/otbTileMapImageIOHelperTest.cxx
+++ b/Testing/Code/IO/otbTileMapImageIOHelperTest.cxx
@@ -19,7 +19,7 @@
 #include <fstream>
 #include "otbTileMapImageIOHelper.h"
 
-int otbTileMapImageIOHelperNew(int argc, char * argv[])
+int otbTileMapImageIOHelperNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   otb::TileMapImageIOHelper::Pointer myTileMapImageIOHelper;
@@ -27,7 +27,7 @@ int otbTileMapImageIOHelperNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbTileMapImageIOHelperTest(int argc, char * argv[])
+int otbTileMapImageIOHelperTest(int itkNotUsed(argc), char * argv[])
 {
   otb::TileMapImageIOHelper::Pointer myTileMapImageIOHelper;
   myTileMapImageIOHelper = otb::TileMapImageIOHelper::New();
diff --git a/Testing/Code/IO/otbTileMapWriter.cxx b/Testing/Code/IO/otbTileMapWriter.cxx
index 99b48d3..e06b64e 100644
--- a/Testing/Code/IO/otbTileMapWriter.cxx
+++ b/Testing/Code/IO/otbTileMapWriter.cxx
@@ -45,16 +45,12 @@ int otbTileMapWriter(int argc, char *argv[])
   int depth = 14;
 
   typedef otb::Image<unsigned int, 2>  ImageType;
-  typedef otb::Image<unsigned char, 2> CharImageType;
   typedef otb::Image<double, 2>        DoubleImageType;
 
   typedef otb::VectorImage<unsigned int, 2>  VectorImageType;
   typedef otb::VectorImage<unsigned char, 2> CharVectorImageType;
   typedef otb::VectorImage<double, 2>        DoubleVectorImageType;
 
-  typedef itk::RGBPixel<unsigned char> RGBPixelType;
-  typedef otb::Image<RGBPixelType, 2>  RGBImageType;
-
   typedef otb::ImageFileReader<VectorImageType> VectorReaderType;
   VectorReaderType::Pointer readerXS = VectorReaderType::New();
   readerXS->SetFileName(argv[1]);
diff --git a/Testing/Code/IO/otbVectorDataFileGeoReaderWriter.cxx b/Testing/Code/IO/otbVectorDataFileGeoReaderWriter.cxx
index 0f673e2..3b7ac8e 100644
--- a/Testing/Code/IO/otbVectorDataFileGeoReaderWriter.cxx
+++ b/Testing/Code/IO/otbVectorDataFileGeoReaderWriter.cxx
@@ -24,7 +24,7 @@
 #include "itkMetaDataObject.h"
 #include "otbMetaDataKey.h"
 
-int otbVectorDataFileGeoReaderWriter(int argc, char * argv[])
+int otbVectorDataFileGeoReaderWriter(int itkNotUsed(argc), char * argv[])
 {
 
   typedef otb::VectorData<double, 2>                VectorDataType;
diff --git a/Testing/Code/IO/otbVectorDataFileReader.cxx b/Testing/Code/IO/otbVectorDataFileReader.cxx
index cbabe1d..75aaeef 100644
--- a/Testing/Code/IO/otbVectorDataFileReader.cxx
+++ b/Testing/Code/IO/otbVectorDataFileReader.cxx
@@ -24,7 +24,7 @@
 #include "itkDataObject.h"
 #include "otbDataNode.h"
 
-int otbVectorDataFileReader(int argc, char * argv[])
+int otbVectorDataFileReader(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::VectorData<>                         VectorDataType;
   typedef otb::VectorDataFileReader<VectorDataType> VectorDataFileReaderType;
@@ -34,7 +34,6 @@ int otbVectorDataFileReader(int argc, char * argv[])
   typedef DataNodeType::Pointer                   DataNodePointerType;
   typedef itk::TreeContainer<DataNodePointerType> DataTreeType;
 
-  typedef itk::DataObject dataobjectType;
   itk::Indent indent;
 
   reader->SetFileName(argv[1]);
diff --git a/Testing/Code/IO/otbVectorDataFileReaderNew.cxx b/Testing/Code/IO/otbVectorDataFileReaderNew.cxx
index e0641cb..880486b 100644
--- a/Testing/Code/IO/otbVectorDataFileReaderNew.cxx
+++ b/Testing/Code/IO/otbVectorDataFileReaderNew.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorDataFileReader.h"
 #include "otbVectorData.h"
 
-int otbVectorDataFileReaderNew(int argc, char * argv[])
+int otbVectorDataFileReaderNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::VectorData<>                         VectorDataType;
   typedef otb::VectorDataFileReader<VectorDataType> VectorDataFileReaderType;
diff --git a/Testing/Code/IO/otbVectorDataFileReaderWriter.cxx b/Testing/Code/IO/otbVectorDataFileReaderWriter.cxx
index 6a54798..3c59cea 100644
--- a/Testing/Code/IO/otbVectorDataFileReaderWriter.cxx
+++ b/Testing/Code/IO/otbVectorDataFileReaderWriter.cxx
@@ -22,7 +22,7 @@
 #include "otbVectorDataFileWriter.h"
 #include "otbVectorDataFileReader.h"
 
-int otbVectorDataFileReaderWriter(int argc, char * argv[])
+int otbVectorDataFileReaderWriter(int itkNotUsed(argc), char * argv[])
 {
 
   typedef otb::VectorData<double, 2>                VectorDataType;
diff --git a/Testing/Code/IO/otbVectorDataFileWriter.cxx b/Testing/Code/IO/otbVectorDataFileWriter.cxx
index 2bf4de3..100a738 100644
--- a/Testing/Code/IO/otbVectorDataFileWriter.cxx
+++ b/Testing/Code/IO/otbVectorDataFileWriter.cxx
@@ -21,15 +21,13 @@
 #include "otbVectorData.h"
 #include "otbVectorDataFileWriter.h"
 
-int otbVectorDataFileWriter(int argc, char * argv[])
+int otbVectorDataFileWriter(int itkNotUsed(argc), char * argv[])
 {
 
   typedef otb::VectorData<double, 2>                VectorDataType;
   typedef VectorDataType::DataNodeType              DataNodeType;
   typedef otb::VectorDataFileWriter<VectorDataType> WriterType;
-  typedef DataNodeType::PointType                   PointType;
   typedef DataNodeType::LineType                    LineType;
-  typedef DataNodeType::PolygonType                 PolygonType;
   typedef LineType::VertexType                      VertexType;
 
   //Instantiation
diff --git a/Testing/Code/IO/otbVectorDataFileWriterMultiPolygons.cxx b/Testing/Code/IO/otbVectorDataFileWriterMultiPolygons.cxx
index 20b2589..02b3d32 100644
--- a/Testing/Code/IO/otbVectorDataFileWriterMultiPolygons.cxx
+++ b/Testing/Code/IO/otbVectorDataFileWriterMultiPolygons.cxx
@@ -21,16 +21,14 @@
 #include "otbVectorData.h"
 #include "otbVectorDataFileWriter.h"
 
-int otbVectorDataFileWriterMultiPolygons(int argc, char * argv[])
+int otbVectorDataFileWriterMultiPolygons(int itkNotUsed(argc), char * argv[])
 {
 
   typedef otb::VectorData<double, 2>                VectorDataType;
   typedef VectorDataType::DataNodeType              DataNodeType;
   typedef otb::VectorDataFileWriter<VectorDataType> WriterType;
-  typedef DataNodeType::PointType                   PointType;
   typedef DataNodeType::LineType                    LineType;
   typedef DataNodeType::PolygonType                 PolygonType;
-  typedef DataNodeType::PolygonListType             PolygonListType;
   typedef LineType::VertexType                      VertexType;
 
   //Instantiation
diff --git a/Testing/Code/IO/otbVectorDataFileWriterNew.cxx b/Testing/Code/IO/otbVectorDataFileWriterNew.cxx
index 93001b5..1c9a0a1 100644
--- a/Testing/Code/IO/otbVectorDataFileWriterNew.cxx
+++ b/Testing/Code/IO/otbVectorDataFileWriterNew.cxx
@@ -19,10 +19,9 @@
 #include "otbVectorDataFileWriter.h"
 #include "otbVectorData.h"
 
-int otbVectorDataFileWriterNew(int argc, char * argv[])
+int otbVectorDataFileWriterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::VectorData<double, 2>                VectorDataType;
-  typedef VectorDataType::DataNodeType              DataNodeType;
   typedef otb::VectorDataFileWriter<VectorDataType> WriterType;
 
   //Instantiation
diff --git a/Testing/Code/IO/otbVectorDataFileWriterPolygons.cxx b/Testing/Code/IO/otbVectorDataFileWriterPolygons.cxx
index 44396fd..4a53bac 100644
--- a/Testing/Code/IO/otbVectorDataFileWriterPolygons.cxx
+++ b/Testing/Code/IO/otbVectorDataFileWriterPolygons.cxx
@@ -21,13 +21,12 @@
 #include "otbVectorData.h"
 #include "otbVectorDataFileWriter.h"
 
-int otbVectorDataFileWriterPolygons(int argc, char * argv[])
+int otbVectorDataFileWriterPolygons(int itkNotUsed(argc), char * argv[])
 {
 
   typedef otb::VectorData<double, 2>                VectorDataType;
   typedef VectorDataType::DataNodeType              DataNodeType;
   typedef otb::VectorDataFileWriter<VectorDataType> WriterType;
-  typedef DataNodeType::PointType                   PointType;
   typedef DataNodeType::LineType                    LineType;
   typedef DataNodeType::PolygonType                 PolygonType;
   typedef LineType::VertexType                      VertexType;
diff --git a/Testing/Code/IO/otbVectorDataIOFactory.cxx b/Testing/Code/IO/otbVectorDataIOFactory.cxx
index 23c6626..cb802c2 100644
--- a/Testing/Code/IO/otbVectorDataIOFactory.cxx
+++ b/Testing/Code/IO/otbVectorDataIOFactory.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorDataIOFactory.h"
 #include "otbVectorData.h"
 
-int otbVectorDataIOFactory(int argc, char * argv[])
+int otbVectorDataIOFactory(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::VectorDataIOFactory VectorData1IOFactoryType;
   typedef VectorData1IOFactoryType::VectorDataIOBasePointerType VectorData1IOBasePointerType;
@@ -29,4 +29,3 @@ int otbVectorDataIOFactory(int argc, char * argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/IO/otbVectorDataKeywordlistTest.cxx b/Testing/Code/IO/otbVectorDataKeywordlistTest.cxx
index 99b4b60..fbbce7a 100644
--- a/Testing/Code/IO/otbVectorDataKeywordlistTest.cxx
+++ b/Testing/Code/IO/otbVectorDataKeywordlistTest.cxx
@@ -23,14 +23,14 @@
 #include "otbVectorDataFileReader.h"
 #include "otbMetaDataKey.h"
 
-int otbVectorDataKeywordlistNew(int argc, char * argv[])
+int otbVectorDataKeywordlistNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   otb::VectorDataKeywordlist kwl;
   std::cout << kwl << std::endl;
   return EXIT_SUCCESS;
 }
 
-int otbVectorDataKeywordlist(int argc, char * argv[])
+int otbVectorDataKeywordlist(int itkNotUsed(argc), char * argv[])
 {
 
   typedef otb::VectorData<>                         VectorDataType;
@@ -41,7 +41,6 @@ int otbVectorDataKeywordlist(int argc, char * argv[])
   typedef DataNodeType::Pointer                   DataNodePointerType;
   typedef itk::TreeContainer<DataNodePointerType> DataTreeType;
 
-  typedef itk::DataObject dataobjectType;
   itk::Indent indent;
 
   reader->SetFileName(argv[1]);
diff --git a/Testing/Code/IO/otbVectorDataSourceNew.cxx b/Testing/Code/IO/otbVectorDataSourceNew.cxx
index bdf2b79..622cd9b 100644
--- a/Testing/Code/IO/otbVectorDataSourceNew.cxx
+++ b/Testing/Code/IO/otbVectorDataSourceNew.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorDataSource.h"
 #include "otbVectorData.h"
 
-int otbVectorDataSourceNew(int argc, char * argv[])
+int otbVectorDataSourceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::VectorData<>                     VectorDataType;
   typedef otb::VectorDataSource<VectorDataType> VectorDataSourceType;
diff --git a/Testing/Code/IO/otbVectorImageFileReaderWriterTest.cxx b/Testing/Code/IO/otbVectorImageFileReaderWriterTest.cxx
index a9a08c2..5dc352c 100644
--- a/Testing/Code/IO/otbVectorImageFileReaderWriterTest.cxx
+++ b/Testing/Code/IO/otbVectorImageFileReaderWriterTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbVectorImageFileReaderWriterTest(int argc, char* argv[])
+int otbVectorImageFileReaderWriterTest(int itkNotUsed(argc), char* argv[])
 {
 
   // Verify the number of parameters in the command line
diff --git a/Testing/Code/IO/otbVectorImageFileWriterTestWithoutInput.cxx b/Testing/Code/IO/otbVectorImageFileWriterTestWithoutInput.cxx
index ca53af2..d0da342 100644
--- a/Testing/Code/IO/otbVectorImageFileWriterTestWithoutInput.cxx
+++ b/Testing/Code/IO/otbVectorImageFileWriterTestWithoutInput.cxx
@@ -67,6 +67,15 @@ int otbVectorImageFileWriterScalarTestWithoutInputGeneric(int argc, char* argv[]
   region.SetSize(size);
   region.SetIndex(orig);
 
+  typedef typename ImageType::PointType        PointType;
+  typedef typename ImageType::SpacingType      SpacingType;
+  PointType origin;
+  origin.Fill(0.5);
+  SpacingType spacing;
+  spacing.Fill(1.0);
+  image->SetOrigin(origin);
+  image->SetSpacing(spacing);
+
   image->SetRegions(region);
   image->SetNumberOfComponentsPerPixel(atoi(argv[3]));
   image->Allocate();
@@ -161,6 +170,15 @@ int otbVectorImageFileWriterComplexTestWithoutInputGeneric(int argc, char* argv[
   region.SetSize(size);
   region.SetIndex(orig);
 
+  typedef typename ImageType::PointType        PointType;
+  typedef typename ImageType::SpacingType      SpacingType;
+  PointType origin;
+  origin.Fill(0.5);
+  SpacingType spacing;
+  spacing.Fill(1.0);
+  image->SetOrigin(origin);
+  image->SetSpacing(spacing);
+
   image->SetRegions(region);
   image->SetNumberOfComponentsPerPixel(atoi(argv[3]));
   image->Allocate();
diff --git a/Testing/Code/IO/otbVectorImageStreamingFileWriterTestWithoutInput.cxx b/Testing/Code/IO/otbVectorImageStreamingFileWriterTestWithoutInput.cxx
index 08e85df..0811559 100644
--- a/Testing/Code/IO/otbVectorImageStreamingFileWriterTestWithoutInput.cxx
+++ b/Testing/Code/IO/otbVectorImageStreamingFileWriterTestWithoutInput.cxx
@@ -67,6 +67,15 @@ int otbVectorImageStreamingFileWriterScalarTestWithoutInputGeneric(int argc, cha
   region.SetSize(size);
   region.SetIndex(orig);
 
+  typedef typename ImageType::PointType        PointType;
+  typedef typename ImageType::SpacingType      SpacingType;
+  PointType origin;
+  origin.Fill(0.5);
+  SpacingType spacing;
+  spacing.Fill(1.0);
+  image->SetOrigin(origin);
+  image->SetSpacing(spacing);
+
   image->SetRegions(region);
   image->SetNumberOfComponentsPerPixel(atoi(argv[3]));
   image->Allocate();
@@ -161,6 +170,15 @@ int otbVectorImageStreamingFileWriterComplexTestWithoutInputGeneric(int argc, ch
   region.SetSize(size);
   region.SetIndex(orig);
 
+  typedef typename ImageType::PointType        PointType;
+  typedef typename ImageType::SpacingType      SpacingType;
+  PointType origin;
+  origin.Fill(0.5);
+  SpacingType spacing;
+  spacing.Fill(1.0);
+  image->SetOrigin(origin);
+  image->SetSpacing(spacing);
+
   image->SetRegions(region);
   image->SetNumberOfComponentsPerPixel(atoi(argv[3]));
   image->Allocate();
diff --git a/Testing/Code/IO/otbWavelengthSpectralBandsTest.cxx b/Testing/Code/IO/otbWavelengthSpectralBandsTest.cxx
index 13bd49a..87cb7e2 100644
--- a/Testing/Code/IO/otbWavelengthSpectralBandsTest.cxx
+++ b/Testing/Code/IO/otbWavelengthSpectralBandsTest.cxx
@@ -21,7 +21,7 @@
 
 using namespace otb;
 
-int otbFilterFunctionValuesNew(int argc, char* argv[])
+int otbFilterFunctionValuesNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
 
   FilterFunctionValues::Pointer spectSen = FilterFunctionValues::New();
@@ -29,11 +29,10 @@ int otbFilterFunctionValuesNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbWavelengthSpectralBandsNew(int argc, char* argv[])
+int otbWavelengthSpectralBandsNew(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
 
   WavelengthSpectralBands::Pointer spectSen = WavelengthSpectralBands::New();
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/IO/otbWorldView2ImageMetadataInterfaceNew.cxx b/Testing/Code/IO/otbWorldView2ImageMetadataInterfaceNew.cxx
index a1cd5d9..5c15593 100644
--- a/Testing/Code/IO/otbWorldView2ImageMetadataInterfaceNew.cxx
+++ b/Testing/Code/IO/otbWorldView2ImageMetadataInterfaceNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbWorldView2ImageMetadataInterface.h"
 
-int otbWorldView2ImageMetadataInterfaceNew(int argc, char* argv[])
+int otbWorldView2ImageMetadataInterfaceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   otb::WorldView2ImageMetadataInterface::Pointer object = otb::WorldView2ImageMetadataInterface::New();
 
diff --git a/Testing/Code/IO/otbWritingComplexDataWithComplexImageTest.cxx b/Testing/Code/IO/otbWritingComplexDataWithComplexImageTest.cxx
index 9995230..bc905e8 100644
--- a/Testing/Code/IO/otbWritingComplexDataWithComplexImageTest.cxx
+++ b/Testing/Code/IO/otbWritingComplexDataWithComplexImageTest.cxx
@@ -23,7 +23,7 @@
 #include "otbImage.h"
 #include "otbMacro.h"
 
-int otbWritingComplexDataWithComplexImageTest(int argc, char * argv[])
+int otbWritingComplexDataWithComplexImageTest(int itkNotUsed(argc), char * argv[])
 {
   typedef double                                RealType;
   typedef std::complex<RealType>                PixelType;
diff --git a/Testing/Code/Learning/otbConcatenateSampleListFilter.cxx b/Testing/Code/Learning/otbConcatenateSampleListFilter.cxx
index 6cea5a6..d72cfdd 100644
--- a/Testing/Code/Learning/otbConcatenateSampleListFilter.cxx
+++ b/Testing/Code/Learning/otbConcatenateSampleListFilter.cxx
@@ -16,8 +16,6 @@
 
 =========================================================================*/
 
-
-
 #include "itkListSample.h"
 #include "itkVariableLengthVector.h"
 #include "otbConcatenateSampleListFilter.h"
@@ -29,14 +27,14 @@ typedef itk::Statistics::ListSample<DoubleSampleType> DoubleSampleListType;
 
 typedef otb::Statistics::ConcatenateSampleListFilter<DoubleSampleListType> ConcatenateFilterType;
 
-int otbConcatenateSampleListFilterNew(int argc, char * argv[])
+int otbConcatenateSampleListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
  ConcatenateFilterType::Pointer instance = ConcatenateFilterType::New();
 
  return EXIT_SUCCESS;
 }
 
-int otbConcatenateSampleListFilter(int argc, char * argv[])
+int otbConcatenateSampleListFilter(int itkNotUsed(argc), char * argv[])
 {
  // Compute the number of samples
  const char * outfname = argv[1];
@@ -106,5 +104,3 @@ int otbConcatenateSampleListFilter(int argc, char * argv[])
 
  return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/Learning/otbConfusionMatrixCalculatorTest.cxx b/Testing/Code/Learning/otbConfusionMatrixCalculatorTest.cxx
index df12f89..b2d6697 100644
--- a/Testing/Code/Learning/otbConfusionMatrixCalculatorTest.cxx
+++ b/Testing/Code/Learning/otbConfusionMatrixCalculatorTest.cxx
@@ -19,7 +19,7 @@
 #include "itkListSample.h"
 #include "otbConfusionMatrixCalculator.h"
 
-int otbConfusionMatrixCalculatorNew(int argc, char* argv[])
+int otbConfusionMatrixCalculatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef itk::VariableLengthVector<int>          PLabelType;
@@ -278,7 +278,7 @@ int otbConfusionMatrixCalculatorCompute(int argc, char* argv[])
 }
 
 
-int otbConfusionMatrixCalculatorComputeWithBaseline(int argc, char* argv[])
+int otbConfusionMatrixCalculatorComputeWithBaseline(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   typedef char                                                           ClassLabelType;
   typedef itk::VariableLengthVector<ClassLabelType>                      PLabelType;
diff --git a/Testing/Code/Learning/otbConfusionMatrixMeasurementsTest.cxx b/Testing/Code/Learning/otbConfusionMatrixMeasurementsTest.cxx
index 0530ad6..59b355d 100644
--- a/Testing/Code/Learning/otbConfusionMatrixMeasurementsTest.cxx
+++ b/Testing/Code/Learning/otbConfusionMatrixMeasurementsTest.cxx
@@ -142,7 +142,7 @@ int CSVConfusionMatrixFileReader(const std::string fileName, MapOfClassesType &m
 
 
 
-int otbConfusionMatrixMeasurementsNew(int argc, char* argv[])
+int otbConfusionMatrixMeasurementsNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   /*typedef unsigned long                                   ConfusionMatrixEltType;
   typedef itk::VariableSizeMatrix<ConfusionMatrixEltType> ConfusionMatrixType;
@@ -172,7 +172,7 @@ int otbConfusionMatrixMeasurementsNew(int argc, char* argv[])
 }
 
 
-int otbConfusionMatrixMeasurementsTest(int argc, char* argv[])
+int otbConfusionMatrixMeasurementsTest(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   /*typedef unsigned long                                   ConfusionMatrixEltType;
   typedef itk::VariableSizeMatrix<ConfusionMatrixEltType> ConfusionMatrixType;
diff --git a/Testing/Code/Learning/otbDecisionTreeBuild.cxx b/Testing/Code/Learning/otbDecisionTreeBuild.cxx
index 48aca4c..6c044d3 100644
--- a/Testing/Code/Learning/otbDecisionTreeBuild.cxx
+++ b/Testing/Code/Learning/otbDecisionTreeBuild.cxx
@@ -20,7 +20,7 @@
 
 enum WheatTypes { WinterWheat, SummerWheat };
 
-int otbDecisionTreeBuild(int argc, char* argv[])
+int otbDecisionTreeBuild(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
 /** We build the following decision tree
 
@@ -111,4 +111,3 @@ int otbDecisionTreeBuild(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/Learning/otbDecisionTreeNew.cxx b/Testing/Code/Learning/otbDecisionTreeNew.cxx
index 468f548..353f5e1 100644
--- a/Testing/Code/Learning/otbDecisionTreeNew.cxx
+++ b/Testing/Code/Learning/otbDecisionTreeNew.cxx
@@ -20,7 +20,7 @@
 
 enum WheatTypes { WinterWheat, SummerWheat };
 
-int otbDecisionTreeNew(int argc, char* argv[])
+int otbDecisionTreeNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef bool AttributeValueType;
diff --git a/Testing/Code/Learning/otbDecisionTreeWithRealValues.cxx b/Testing/Code/Learning/otbDecisionTreeWithRealValues.cxx
index 33b461b..9c3512c 100644
--- a/Testing/Code/Learning/otbDecisionTreeWithRealValues.cxx
+++ b/Testing/Code/Learning/otbDecisionTreeWithRealValues.cxx
@@ -20,7 +20,7 @@
 
 enum WheatTypes { WinterWheat, SummerWheat };
 
-int otbDecisionTreeWithRealValues(int argc, char* argv[])
+int otbDecisionTreeWithRealValues(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
 /** We build the following decision tree
 
@@ -111,4 +111,3 @@ int otbDecisionTreeWithRealValues(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/Learning/otbExhaustiveExponentialOptimizerNew.cxx b/Testing/Code/Learning/otbExhaustiveExponentialOptimizerNew.cxx
index 6d65d87..dcee764 100644
--- a/Testing/Code/Learning/otbExhaustiveExponentialOptimizerNew.cxx
+++ b/Testing/Code/Learning/otbExhaustiveExponentialOptimizerNew.cxx
@@ -22,7 +22,7 @@
 
 #include "otbExhaustiveExponentialOptimizer.h"
 
-int otbExhaustiveExponentialOptimizerNew(int argc, char* argv[])
+int otbExhaustiveExponentialOptimizerNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   otb::ExhaustiveExponentialOptimizer::Pointer opt = otb::ExhaustiveExponentialOptimizer::New();
 
diff --git a/Testing/Code/Learning/otbExhaustiveExponentialOptimizerTest.cxx b/Testing/Code/Learning/otbExhaustiveExponentialOptimizerTest.cxx
index d83e05a..dbb718b 100644
--- a/Testing/Code/Learning/otbExhaustiveExponentialOptimizerTest.cxx
+++ b/Testing/Code/Learning/otbExhaustiveExponentialOptimizerTest.cxx
@@ -83,7 +83,7 @@ public:
   virtual unsigned int GetNumberOfParameters(void) const {return 2; };
 
   /** \return The accuracy derivative corresponding to the parameters */
-  virtual void GetDerivative(const ParametersType& parameters, DerivativeType& derivative) const {};
+  virtual void GetDerivative(const ParametersType& itkNotUsed(parameters), DerivativeType& itkNotUsed(derivative)) const {};
 
   /// Constructor
   Quadratic2DCostFunction()
@@ -103,7 +103,7 @@ private:
 }; // class Quadratic2DCostFunction
 
 
-int otbExhaustiveExponentialOptimizerTest(int argc, char* argv[])
+int otbExhaustiveExponentialOptimizerTest(int itkNotUsed(argc), char* argv[])
 {
   Quadratic2DCostFunction::Pointer costFunction = Quadratic2DCostFunction::New();
 
diff --git a/Testing/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.cxx b/Testing/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.cxx
index ada6eab..53f7277 100644
--- a/Testing/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.cxx
+++ b/Testing/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.cxx
@@ -31,7 +31,7 @@ typedef otb::Statistics::GaussianAdditiveNoiseSampleListFilter
 <FloatSampleListType, DoubleSampleListType> GaussianFilterType;
 
 
-int otbGaussianAdditiveNoiseSampleListFilterNew(int argc, char * argv[])
+int otbGaussianAdditiveNoiseSampleListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   GaussianFilterType::Pointer filter = GaussianFilterType::New();
   return EXIT_SUCCESS;
@@ -88,5 +88,3 @@ int otbGaussianAdditiveNoiseSampleListFilter(int argc, char * argv[])
 
   return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/Learning/otbGaussianModelComponent.cxx b/Testing/Code/Learning/otbGaussianModelComponent.cxx
index 3491db0..bc30e1a 100644
--- a/Testing/Code/Learning/otbGaussianModelComponent.cxx
+++ b/Testing/Code/Learning/otbGaussianModelComponent.cxx
@@ -21,7 +21,7 @@
 #include "otbGaussianModelComponent.h"
 #include "itkVariableLengthVector.h"
 
-int otbGaussianModelComponentNew(int argc, char * argv[])
+int otbGaussianModelComponentNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
 
   typedef itk::Statistics::ListSample<itk::VariableLengthVector<double> >  SampleType;
diff --git a/Testing/Code/Learning/otbImageClassificationFilter.cxx b/Testing/Code/Learning/otbImageClassificationFilter.cxx
index 0558b9f..f2e37b8 100644
--- a/Testing/Code/Learning/otbImageClassificationFilter.cxx
+++ b/Testing/Code/Learning/otbImageClassificationFilter.cxx
@@ -36,13 +36,13 @@ typedef otb::MachineLearningModelFactory<ValueType, LabelType> MachineLearningMo
 typedef otb::ImageFileReader<ImageType> ReaderType;
 typedef otb::ImageFileWriter<LabeledImageType> WriterType;
 
-int otbImageClassificationFilterNew(int argc, char * argv[])
+int otbImageClassificationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   ClassificationFilterType::Pointer filter = ClassificationFilterType::New();
   return EXIT_SUCCESS;
 }
 
-int otbImageClassificationFilter(int argc, char * argv[])
+int otbImageClassificationFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * modelfname = argv[2];
diff --git a/Testing/Code/Learning/otbKMeansImageClassificationFilter.cxx b/Testing/Code/Learning/otbKMeansImageClassificationFilter.cxx
index 2b0ec4e..a6d259f 100644
--- a/Testing/Code/Learning/otbKMeansImageClassificationFilter.cxx
+++ b/Testing/Code/Learning/otbKMeansImageClassificationFilter.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbKMeansImageClassificationFilter(int argc, char * argv[])
+int otbKMeansImageClassificationFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       infname = argv[1];
   const char *       outfname = argv[2];
diff --git a/Testing/Code/Learning/otbKMeansImageClassificationFilterNew.cxx b/Testing/Code/Learning/otbKMeansImageClassificationFilterNew.cxx
index 0d3da70..a7b0dcc 100644
--- a/Testing/Code/Learning/otbKMeansImageClassificationFilterNew.cxx
+++ b/Testing/Code/Learning/otbKMeansImageClassificationFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorImage.h"
 #include "otbImage.h"
 
-int otbKMeansImageClassificationFilterNew(int argc, char * argv[])
+int otbKMeansImageClassificationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double         PixelType;
diff --git a/Testing/Code/Learning/otbListSampleGeneratorTest.cxx b/Testing/Code/Learning/otbListSampleGeneratorTest.cxx
index 75ea81b..8d3903c 100644
--- a/Testing/Code/Learning/otbListSampleGeneratorTest.cxx
+++ b/Testing/Code/Learning/otbListSampleGeneratorTest.cxx
@@ -24,7 +24,7 @@
 
 #include "otbListSampleGenerator.h"
 
-int otbListSampleGeneratorNew(int argc, char* argv[])
+int otbListSampleGeneratorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::VectorImage<float, 2>                          ImageType;
   typedef otb::VectorData<double, 2>                          VectorDataType;
@@ -58,7 +58,6 @@ int otbListSampleGenerator(int argc, char* argv[])
   std::string classKey = "Class";
 
   typedef double                          PixelType;
-  typedef int                             LabeledPixelType;
   typedef otb::VectorImage<PixelType, 2>  ImageType;
   typedef otb::ImageFileReader<ImageType> ReaderType;
 
diff --git a/Testing/Code/Learning/otbListSampleToBalancedListSampleFilter.cxx b/Testing/Code/Learning/otbListSampleToBalancedListSampleFilter.cxx
index 6913ac4..2b71819 100644
--- a/Testing/Code/Learning/otbListSampleToBalancedListSampleFilter.cxx
+++ b/Testing/Code/Learning/otbListSampleToBalancedListSampleFilter.cxx
@@ -35,7 +35,7 @@ typedef otb::Statistics::ListSampleToBalancedListSampleFilter
 <FloatSampleListType, IntegerSampleListType, DoubleSampleListType> BalancingFilterType;
 
 
-int otbListSampleToBalancedListSampleFilterNew(int argc, char * argv[])
+int otbListSampleToBalancedListSampleFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   BalancingFilterType::Pointer filter = BalancingFilterType::New();
   return EXIT_SUCCESS;
diff --git a/Testing/Code/Learning/otbNeighborhoodMajorityVotingImageFilterNew.cxx b/Testing/Code/Learning/otbNeighborhoodMajorityVotingImageFilterNew.cxx
index 19b1818..0b62b5a 100644
--- a/Testing/Code/Learning/otbNeighborhoodMajorityVotingImageFilterNew.cxx
+++ b/Testing/Code/Learning/otbNeighborhoodMajorityVotingImageFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "itkBinaryBallStructuringElement.h"
 #include "otbNeighborhoodMajorityVotingImageFilter.h"
 
-int otbNeighborhoodMajorityVotingImageFilterNew(int argc, char* argv[])
+int otbNeighborhoodMajorityVotingImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputLabelPixelType; // 8 bits
   typedef unsigned short OutputLabelPixelType; // 16 bits
diff --git a/Testing/Code/Learning/otbPeriodicSOM.cxx b/Testing/Code/Learning/otbPeriodicSOM.cxx
index b22d02d..deb2f90 100644
--- a/Testing/Code/Learning/otbPeriodicSOM.cxx
+++ b/Testing/Code/Learning/otbPeriodicSOM.cxx
@@ -26,7 +26,7 @@
 #include "itkListSample.h"
 #include "itkImageRegionIterator.h"
 
-int otbPeriodicSOMTest(int argc, char* argv[])
+int otbPeriodicSOMTest(int itkNotUsed(argc), char* argv[])
 {
   const unsigned int Dimension = 2;
   char *             inputFileName = argv[1];
diff --git a/Testing/Code/Learning/otbPeriodicSOMNew.cxx b/Testing/Code/Learning/otbPeriodicSOMNew.cxx
index ba8b158..5519841 100644
--- a/Testing/Code/Learning/otbPeriodicSOMNew.cxx
+++ b/Testing/Code/Learning/otbPeriodicSOMNew.cxx
@@ -22,7 +22,7 @@
 #include "itkEuclideanDistanceMetric.h"
 #include "itkListSample.h"
 
-int otbPeriodicSOMNew(int argc, char* argv[])
+int otbPeriodicSOMNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef float                                           ComponentType;
diff --git a/Testing/Code/Learning/otbROIdataConversion.cxx b/Testing/Code/Learning/otbROIdataConversion.cxx
index 712e110..b7bf481 100644
--- a/Testing/Code/Learning/otbROIdataConversion.cxx
+++ b/Testing/Code/Learning/otbROIdataConversion.cxx
@@ -23,7 +23,7 @@
 #include "itkImageRegionIterator.h"
 #include <iostream>
 
-int otbROIdataConversion(int argc, char* argv[])
+int otbROIdataConversion(int itkNotUsed(argc), char* argv[])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
@@ -34,7 +34,6 @@ int otbROIdataConversion(int argc, char* argv[])
 
   typedef otb::ImageFileReader<InputImageType>  ReaderType;
   typedef otb::ImageFileReader<ROIImageType>    ROIReaderType;
-  typedef otb::ImageFileWriter<OutputImageType> WriterType;
 
   ConvertorType::Pointer convertor = ConvertorType::New();
   ReaderType::Pointer    readerIm = ReaderType::New();
diff --git a/Testing/Code/Learning/otbROIdataConversionNew.cxx b/Testing/Code/Learning/otbROIdataConversionNew.cxx
index 908e351..40bcc9f 100644
--- a/Testing/Code/Learning/otbROIdataConversionNew.cxx
+++ b/Testing/Code/Learning/otbROIdataConversionNew.cxx
@@ -22,7 +22,7 @@
 #include "otbImage.h"
 #include "otbVectorImage.h"
 
-int otbROIdataConversionNew(int argc, char* argv[])
+int otbROIdataConversionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double PixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/Learning/otbSEMClassifierNew.cxx b/Testing/Code/Learning/otbSEMClassifierNew.cxx
index 1ff1021..21319c3 100644
--- a/Testing/Code/Learning/otbSEMClassifierNew.cxx
+++ b/Testing/Code/Learning/otbSEMClassifierNew.cxx
@@ -27,7 +27,7 @@
 
 #include <iostream>
 
-int otbSEMClassifierNew(int argc, char* argv[])
+int otbSEMClassifierNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double                                            PixelType;
   typedef otb::VectorImage<PixelType, 2>                    ImageType;
diff --git a/Testing/Code/Learning/otbSOM.cxx b/Testing/Code/Learning/otbSOM.cxx
index e4ec39f..9af697f 100644
--- a/Testing/Code/Learning/otbSOM.cxx
+++ b/Testing/Code/Learning/otbSOM.cxx
@@ -26,7 +26,7 @@
 #include "itkListSample.h"
 #include "itkImageRegionIterator.h"
 
-int otbSOM(int argc, char* argv[])
+int otbSOM(int itkNotUsed(argc), char* argv[])
 {
   const unsigned int Dimension = 2;
   char *             inputFileName = argv[1];
diff --git a/Testing/Code/Learning/otbSOMActivationBuilder.cxx b/Testing/Code/Learning/otbSOMActivationBuilder.cxx
index 006a530..7edb045 100644
--- a/Testing/Code/Learning/otbSOMActivationBuilder.cxx
+++ b/Testing/Code/Learning/otbSOMActivationBuilder.cxx
@@ -27,7 +27,7 @@
 #include "otbVectorImage.h"
 #include "itkImageRegionIterator.h"
 
-int otbSOMActivationBuilder(int argc, char* argv[])
+int otbSOMActivationBuilder(int itkNotUsed(argc), char* argv[])
 {
   const unsigned int Dimension = 2;
   char *             vectorSetFileName = argv[1];
diff --git a/Testing/Code/Learning/otbSOMActivationBuilderNew.cxx b/Testing/Code/Learning/otbSOMActivationBuilderNew.cxx
index 999526c..ed6df72 100644
--- a/Testing/Code/Learning/otbSOMActivationBuilderNew.cxx
+++ b/Testing/Code/Learning/otbSOMActivationBuilderNew.cxx
@@ -25,7 +25,7 @@
 #include "otbImage.h"
 #include "otbVectorImage.h"
 
-int otbSOMActivationBuilderNew(int argc, char* argv[])
+int otbSOMActivationBuilderNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef float                                         ComponentType;
@@ -34,7 +34,7 @@ int otbSOMActivationBuilderNew(int argc, char* argv[])
   typedef itk::Statistics::EuclideanDistanceMetric<PixelType> DistanceType;
 
   typedef otb::SOMMap<PixelType, DistanceType, Dimension>                     MapType;
-  typedef otb::VectorImage<ComponentType, Dimension>                          InputImageType;
+
   typedef itk::Statistics::ListSample<PixelType>                              ListSampleType;
   typedef otb::Image<OutputPixelType, Dimension>                              OutputImageType;
   typedef otb::SOMActivationBuilder<ListSampleType, MapType, OutputImageType> SOMActivationBuilderType;
diff --git a/Testing/Code/Learning/otbSOMClassifier.cxx b/Testing/Code/Learning/otbSOMClassifier.cxx
index 27615f4..e139c27 100644
--- a/Testing/Code/Learning/otbSOMClassifier.cxx
+++ b/Testing/Code/Learning/otbSOMClassifier.cxx
@@ -87,6 +87,8 @@ int otbSOMClassifier(int argc, char* argv[])
 
   OutputImageType::Pointer outputImage = OutputImageType::New();
   outputImage->SetRegions(reader->GetOutput()->GetLargestPossibleRegion());
+  outputImage->SetOrigin(reader->GetOutput()->GetOrigin());
+  outputImage->SetSpacing(reader->GetOutput()->GetSpacing());
   outputImage->Allocate();
 
   ClassifierType::OutputType*               membershipSample = classifier->GetOutput();
diff --git a/Testing/Code/Learning/otbSOMClassifierNew.cxx b/Testing/Code/Learning/otbSOMClassifierNew.cxx
index 180d5c1..7c4c52e 100644
--- a/Testing/Code/Learning/otbSOMClassifierNew.cxx
+++ b/Testing/Code/Learning/otbSOMClassifierNew.cxx
@@ -24,7 +24,7 @@
 #include "itkListSample.h"
 #include "otbVectorImage.h"
 
-int otbSOMClassifierNew(int argc, char* argv[])
+int otbSOMClassifierNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   typedef int    LabelPixelType;
@@ -33,7 +33,6 @@ int otbSOMClassifierNew(int argc, char* argv[])
   typedef itk::VariableLengthVector<InputPixelType>                  PixelType;
   typedef itk::Statistics::EuclideanDistanceMetric<PixelType>              DistanceType;
   typedef otb::SOMMap<PixelType, DistanceType, Dimension>            SOMMapType;
-  typedef otb::VectorImage<InputPixelType, Dimension>                InputImageType;
   typedef itk::Statistics::ListSample<PixelType>                     SampleType;
   typedef otb::SOMClassifier<SampleType, SOMMapType, LabelPixelType> ClassifierType;
 
diff --git a/Testing/Code/Learning/otbSOMImageClassificationFilter.cxx b/Testing/Code/Learning/otbSOMImageClassificationFilter.cxx
index e9de7a2..f072d5a 100644
--- a/Testing/Code/Learning/otbSOMImageClassificationFilter.cxx
+++ b/Testing/Code/Learning/otbSOMImageClassificationFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbSOMImageClassificationFilter(int argc, char * argv[])
+int otbSOMImageClassificationFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * somfname = argv[2];
diff --git a/Testing/Code/Learning/otbSOMImageClassificationFilterNew.cxx b/Testing/Code/Learning/otbSOMImageClassificationFilterNew.cxx
index 27692f9..a4db227 100644
--- a/Testing/Code/Learning/otbSOMImageClassificationFilterNew.cxx
+++ b/Testing/Code/Learning/otbSOMImageClassificationFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImage.h"
 #include "otbSOMMap.h"
 
-int otbSOMImageClassificationFilterNew(int argc, char * argv[])
+int otbSOMImageClassificationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double         PixelType;
diff --git a/Testing/Code/Learning/otbSOMMap.cxx b/Testing/Code/Learning/otbSOMMap.cxx
index 17092f4..d2d7867 100644
--- a/Testing/Code/Learning/otbSOMMap.cxx
+++ b/Testing/Code/Learning/otbSOMMap.cxx
@@ -21,7 +21,7 @@
 #include "itkEuclideanDistanceMetric.h"
 #include "itkVariableLengthVector.h"
 
-int otbSOMMap(int argc, char* argv[])
+int otbSOMMap(int itkNotUsed(argc), char* itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef float                                           InternalPixelType;
diff --git a/Testing/Code/Learning/otbSOMMapNew.cxx b/Testing/Code/Learning/otbSOMMapNew.cxx
index d901c0e..a479c1c 100644
--- a/Testing/Code/Learning/otbSOMMapNew.cxx
+++ b/Testing/Code/Learning/otbSOMMapNew.cxx
@@ -20,7 +20,7 @@
 #include "itkRGBPixel.h"
 #include "itkEuclideanDistanceMetric.h"
 
-int otbSOMMapNew(int argc, char* argv[])
+int otbSOMMapNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef float                                           ComponentType;
diff --git a/Testing/Code/Learning/otbSOMNew.cxx b/Testing/Code/Learning/otbSOMNew.cxx
index 8e42b4e..0a05920 100644
--- a/Testing/Code/Learning/otbSOMNew.cxx
+++ b/Testing/Code/Learning/otbSOMNew.cxx
@@ -22,7 +22,7 @@
 #include "itkEuclideanDistanceMetric.h"
 #include "itkListSample.h"
 
-int otbSOMNew(int argc, char* argv[])
+int otbSOMNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef float                                           ComponentType;
diff --git a/Testing/Code/Learning/otbSOMWithMissingValue.cxx b/Testing/Code/Learning/otbSOMWithMissingValue.cxx
index 53254ac..646d6cb 100644
--- a/Testing/Code/Learning/otbSOMWithMissingValue.cxx
+++ b/Testing/Code/Learning/otbSOMWithMissingValue.cxx
@@ -30,7 +30,7 @@
 
 
 
-int otbSOMWithMissingValueTest(int argc, char* argv[])
+int otbSOMWithMissingValueTest(int itkNotUsed(argc), char* argv[])
 {
   const unsigned int Dimension = 2;
   char *             inputFileName = argv[1];
diff --git a/Testing/Code/Learning/otbSOMWithMissingValueNew.cxx b/Testing/Code/Learning/otbSOMWithMissingValueNew.cxx
index 8ae4a25..9e19650 100644
--- a/Testing/Code/Learning/otbSOMWithMissingValueNew.cxx
+++ b/Testing/Code/Learning/otbSOMWithMissingValueNew.cxx
@@ -29,7 +29,7 @@
 
 #include "otbFlexibleDistanceWithMissingValue.h"
 
-int otbSOMWithMissingValueNew(int argc, char * argv[])
+int otbSOMWithMissingValueNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                 PixelType;
diff --git a/Testing/Code/Learning/otbSOMbasedImageFilter.cxx b/Testing/Code/Learning/otbSOMbasedImageFilter.cxx
index ead78ba..5c5c604 100644
--- a/Testing/Code/Learning/otbSOMbasedImageFilter.cxx
+++ b/Testing/Code/Learning/otbSOMbasedImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "itkEuclideanDistanceMetric.h"
 
 
-int otbSOMbasedImageFilterTest(int argc, char * argv[])
+int otbSOMbasedImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * somfname = argv[2];
diff --git a/Testing/Code/Learning/otbSOMbasedImageFilterNew.cxx b/Testing/Code/Learning/otbSOMbasedImageFilterNew.cxx
index f7eeef1..8e8bbfc 100644
--- a/Testing/Code/Learning/otbSOMbasedImageFilterNew.cxx
+++ b/Testing/Code/Learning/otbSOMbasedImageFilterNew.cxx
@@ -25,7 +25,7 @@
 #include "otbFlexibleDistanceWithMissingValue.h"
 #include "otbSOMbasedImageFilter.h"
 
-int otbSOMbasedImageFilterNew(int argc, char * argv[])
+int otbSOMbasedImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                                 PixelType;
diff --git a/Testing/Code/Learning/otbSVMClassifierImage.cxx b/Testing/Code/Learning/otbSVMClassifierImage.cxx
index 3e0f236..cf874cf 100644
--- a/Testing/Code/Learning/otbSVMClassifierImage.cxx
+++ b/Testing/Code/Learning/otbSVMClassifierImage.cxx
@@ -85,7 +85,6 @@ int otbSVMClassifierImage(int argc, char* argv[])
   /** Read the input image and build the sample */
 
   typedef double                      InputPixelType;
-  typedef std::vector<InputPixelType> InputVectorType;
   typedef int                         LabelPixelType;
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/Learning/otbSVMClassifierNew.cxx b/Testing/Code/Learning/otbSVMClassifierNew.cxx
index 684dda6..a1c1d57 100644
--- a/Testing/Code/Learning/otbSVMClassifierNew.cxx
+++ b/Testing/Code/Learning/otbSVMClassifierNew.cxx
@@ -23,7 +23,7 @@
 #include "itkSubsample.h"
 #include "otbSVMClassifier.h"
 
-int otbSVMClassifierNew(int argc, char* argv[])
+int otbSVMClassifierNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double                           InputPixelType;
   typedef int                              LabelPixelType;
diff --git a/Testing/Code/Learning/otbSVMCrossValidationCostFunctionNew.cxx b/Testing/Code/Learning/otbSVMCrossValidationCostFunctionNew.cxx
index 663d900..cee0700 100644
--- a/Testing/Code/Learning/otbSVMCrossValidationCostFunctionNew.cxx
+++ b/Testing/Code/Learning/otbSVMCrossValidationCostFunctionNew.cxx
@@ -25,13 +25,11 @@
 #include "otbSVMModel.h"
 #include "otbSVMCrossValidationCostFunction.h"
 
-int otbSVMCrossValidationCostFunctionNew(int argc, char* argv[])
+int otbSVMCrossValidationCostFunctionNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef unsigned char LabelPixelType;
-  const unsigned int Dimension = 2;
 
-  typedef otb::Image<InputPixelType,  Dimension>         InputImageType;
   typedef otb::SVMModel<InputPixelType, LabelPixelType>  ModelType;
   typedef otb::SVMCrossValidationCostFunction<ModelType> FunctionType;
 
diff --git a/Testing/Code/Learning/otbSVMImageClassificationFilter.cxx b/Testing/Code/Learning/otbSVMImageClassificationFilter.cxx
index 96c03da..cd613e0 100644
--- a/Testing/Code/Learning/otbSVMImageClassificationFilter.cxx
+++ b/Testing/Code/Learning/otbSVMImageClassificationFilter.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbSVMImageClassificationFilter(int argc, char * argv[])
+int otbSVMImageClassificationFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * modelfname = argv[2];
diff --git a/Testing/Code/Learning/otbSVMImageClassificationFilterNew.cxx b/Testing/Code/Learning/otbSVMImageClassificationFilterNew.cxx
index 4ff2d30..6521bed 100644
--- a/Testing/Code/Learning/otbSVMImageClassificationFilterNew.cxx
+++ b/Testing/Code/Learning/otbSVMImageClassificationFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorImage.h"
 #include "otbImage.h"
 
-int otbSVMImageClassificationFilterNew(int argc, char * argv[])
+int otbSVMImageClassificationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double         PixelType;
diff --git a/Testing/Code/Learning/otbSVMImageClassificationWithRuleFilter.cxx b/Testing/Code/Learning/otbSVMImageClassificationWithRuleFilter.cxx
index f7f0126..3fe98db 100644
--- a/Testing/Code/Learning/otbSVMImageClassificationWithRuleFilter.cxx
+++ b/Testing/Code/Learning/otbSVMImageClassificationWithRuleFilter.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbSVMImageClassificationWithRuleFilter(int argc, char * argv[])
+int otbSVMImageClassificationWithRuleFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * modelfname = argv[2];
diff --git a/Testing/Code/Learning/otbSVMImageClassificationWithRuleFilterNew.cxx b/Testing/Code/Learning/otbSVMImageClassificationWithRuleFilterNew.cxx
index 1c9fc67..6997397 100644
--- a/Testing/Code/Learning/otbSVMImageClassificationWithRuleFilterNew.cxx
+++ b/Testing/Code/Learning/otbSVMImageClassificationWithRuleFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorImage.h"
 #include "otbImage.h"
 
-int otbSVMImageClassificationWithRuleFilterNew(int argc, char * argv[])
+int otbSVMImageClassificationWithRuleFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double         PixelType;
diff --git a/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx b/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx
index ad40d09..7bfa58b 100644
--- a/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx
+++ b/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx
@@ -31,7 +31,7 @@
 
 #include "otbImageFileReader.h"
 
-int otbSVMImageModelEstimatorModelAccessor(int argc, char* argv[])
+int otbSVMImageModelEstimatorModelAccessor(int itkNotUsed(argc), char* argv[])
 {
   const char* inputImageFileName = argv[1];
   const char* trainingImageFileName = argv[2];
@@ -68,7 +68,6 @@ int otbSVMImageModelEstimatorModelAccessor(int argc, char* argv[])
   svmEstimator->Update();
 
   typedef EstimatorType::SVMModelPointer SVMModelPointer;
-  typedef EstimatorType::SVMModelType    SVMModelType;
   SVMModelPointer ptrModel = svmEstimator->GetModel();
 
   std::ofstream f;
diff --git a/Testing/Code/Learning/otbSVMImageModelEstimatorNew.cxx b/Testing/Code/Learning/otbSVMImageModelEstimatorNew.cxx
index 02188fa..9aac87c 100644
--- a/Testing/Code/Learning/otbSVMImageModelEstimatorNew.cxx
+++ b/Testing/Code/Learning/otbSVMImageModelEstimatorNew.cxx
@@ -25,7 +25,7 @@
 
 #include "otbSVMImageModelEstimator.h"
 
-int otbSVMImageModelEstimatorNew(int argc, char* argv[])
+int otbSVMImageModelEstimatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   const unsigned int Dimension = 2;
@@ -34,8 +34,6 @@ int otbSVMImageModelEstimatorNew(int argc, char* argv[])
 
   typedef otb::Image<InputPixelType,  Dimension> TrainingImageType;
 
-  typedef std::vector<double> VectorType;
-
   typedef otb::SVMImageModelEstimator<InputImageType,
       TrainingImageType>   EstimatorType;
 
diff --git a/Testing/Code/Learning/otbSVMImageModelEstimatorTrain.cxx b/Testing/Code/Learning/otbSVMImageModelEstimatorTrain.cxx
index 6f564e0..0942ee5 100644
--- a/Testing/Code/Learning/otbSVMImageModelEstimatorTrain.cxx
+++ b/Testing/Code/Learning/otbSVMImageModelEstimatorTrain.cxx
@@ -27,7 +27,7 @@
 
 #include "otbImageFileReader.h"
 
-int otbSVMImageModelEstimatorTrain(int argc, char* argv[])
+int otbSVMImageModelEstimatorTrain(int itkNotUsed(argc), char* argv[])
 {
   // Force the pseudo-random number generator to always output
   // the same sequence of random numbers
@@ -43,7 +43,6 @@ int otbSVMImageModelEstimatorTrain(int argc, char* argv[])
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<InputPixelType,  Dimension> InputImageType;
   typedef otb::Image<int,  Dimension>                  TrainingImageType;
-  typedef std::vector<double>                          VectorType;
   typedef otb::SVMImageModelEstimator<InputImageType,
       TrainingImageType> EstimatorType;
   typedef otb::ImageFileReader<InputImageType>    InputReaderType;
diff --git a/Testing/Code/Learning/otbSVMImageModelEstimatorTrainOneClass.cxx b/Testing/Code/Learning/otbSVMImageModelEstimatorTrainOneClass.cxx
index c780db0..f262af8 100644
--- a/Testing/Code/Learning/otbSVMImageModelEstimatorTrainOneClass.cxx
+++ b/Testing/Code/Learning/otbSVMImageModelEstimatorTrainOneClass.cxx
@@ -27,7 +27,7 @@
 
 #include "otbImageFileReader.h"
 
-int otbSVMImageModelEstimatorTrainOneClass(int argc, char* argv[])
+int otbSVMImageModelEstimatorTrainOneClass(int itkNotUsed(argc), char* argv[])
 {
   const char* inputImageFileName = argv[1];
   const char* trainingImageFileName = argv[2];
@@ -37,7 +37,6 @@ int otbSVMImageModelEstimatorTrainOneClass(int argc, char* argv[])
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<InputPixelType,  Dimension> InputImageType;
   typedef otb::Image<int,  Dimension>                  TrainingImageType;
-  typedef std::vector<double>                          VectorType;
   typedef otb::SVMImageModelEstimator<InputImageType,
       TrainingImageType> EstimatorType;
   typedef otb::ImageFileReader<InputImageType>    InputReaderType;
diff --git a/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageClassificationTest.cxx b/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageClassificationTest.cxx
index 2b7048b..195cb56 100644
--- a/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageClassificationTest.cxx
+++ b/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageClassificationTest.cxx
@@ -47,7 +47,6 @@ int otbSVMInverseCosSpectralAngleKernelFunctorImageClassificationTest(int argc,
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<InputPixelType,  Dimension> InputImageType;
   typedef otb::Image<int,  Dimension>                  TrainingImageType;
-  typedef std::vector<double>                          VectorType;
   typedef otb::SVMImageModelEstimator<InputImageType,
       TrainingImageType> EstimatorType;
   typedef otb::ImageFileReader<InputImageType>    InputReaderType;
diff --git a/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageModelEstimatorTest.cxx b/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageModelEstimatorTest.cxx
index 3b567b8..a83d7ed 100644
--- a/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageModelEstimatorTest.cxx
+++ b/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageModelEstimatorTest.cxx
@@ -46,7 +46,6 @@ int otbSVMInverseCosSpectralAngleKernelFunctorImageModelEstimatorTest(int argc,
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<InputPixelType,  Dimension> InputImageType;
   typedef otb::Image<int,  Dimension>                  TrainingImageType;
-  typedef std::vector<double>                          VectorType;
   typedef otb::SVMImageModelEstimator<InputImageType,
       TrainingImageType> EstimatorType;
   typedef otb::ImageFileReader<InputImageType>    InputReaderType;
diff --git a/Testing/Code/Learning/otbSVMMarginSampler.cxx b/Testing/Code/Learning/otbSVMMarginSampler.cxx
index 997438b..be0f215 100644
--- a/Testing/Code/Learning/otbSVMMarginSampler.cxx
+++ b/Testing/Code/Learning/otbSVMMarginSampler.cxx
@@ -25,7 +25,7 @@
 #include "otbSVMMarginSampler.h"
 #include "otbSVMModel.h"
 
-int otbSVMMarginSamplerNew(int argc, char* argv[])
+int otbSVMMarginSamplerNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef itk::VariableLengthVector<double>                 SampleType;
   typedef itk::Statistics::ListSample<SampleType>           SampleListType;
diff --git a/Testing/Code/Learning/otbSVMModelAccessor.cxx b/Testing/Code/Learning/otbSVMModelAccessor.cxx
index 85953bb..4549a9c 100644
--- a/Testing/Code/Learning/otbSVMModelAccessor.cxx
+++ b/Testing/Code/Learning/otbSVMModelAccessor.cxx
@@ -25,13 +25,10 @@
 
 #include "otbSVMModel.h"
 
-int otbSVMModelAccessor(int argc, char* argv[])
+int otbSVMModelAccessor(int itkNotUsed(argc), char* argv[])
 {
   typedef unsigned char InputPixelType;
   typedef unsigned char LabelPixelType;
-  const unsigned int Dimension = 2;
-
-  typedef otb::Image<InputPixelType,  Dimension> InputImageType;
 
   typedef otb::SVMModel<InputPixelType, LabelPixelType> ModelType;
 
diff --git a/Testing/Code/Learning/otbSVMModelCopyTest.cxx b/Testing/Code/Learning/otbSVMModelCopyTest.cxx
index 85d3459..f3a1be8 100644
--- a/Testing/Code/Learning/otbSVMModelCopyTest.cxx
+++ b/Testing/Code/Learning/otbSVMModelCopyTest.cxx
@@ -16,21 +16,17 @@
 
 =========================================================================*/
 
-
-
 #include "itkMacro.h"
 #include "otbImage.h"
 #include <iostream>
 
 #include "otbSVMModel.h"
 
-int otbSVMModelCopyTest(int argc, char* argv[])
+int otbSVMModelCopyTest(int itkNotUsed(argc), char* argv[])
 {
   typedef unsigned char InputPixelType;
   typedef unsigned char LabelPixelType;
-  const unsigned int Dimension = 2;
 
-  typedef otb::Image<InputPixelType,  Dimension>        InputImageType;
   typedef otb::SVMModel<InputPixelType, LabelPixelType> ModelType;
 
   ModelType::Pointer svmModel = ModelType::New();
diff --git a/Testing/Code/Learning/otbSVMModelGenericKernelLoadSave.cxx b/Testing/Code/Learning/otbSVMModelGenericKernelLoadSave.cxx
index 9b8a7b6..005b7d2 100644
--- a/Testing/Code/Learning/otbSVMModelGenericKernelLoadSave.cxx
+++ b/Testing/Code/Learning/otbSVMModelGenericKernelLoadSave.cxx
@@ -63,13 +63,10 @@ protected:
 
 }
 
-int otbSVMModelGenericKernelLoadSave(int argc, char* argv[])
+int otbSVMModelGenericKernelLoadSave(int itkNotUsed(argc), char* argv[])
 {
   typedef unsigned char InputPixelType;
   typedef unsigned char LabelPixelType;
-  const unsigned int Dimension = 2;
-
-  typedef otb::Image<InputPixelType,  Dimension> InputImageType;
 
   typedef otb::SVMModel<InputPixelType, LabelPixelType> ModelType;
 
diff --git a/Testing/Code/Learning/otbSVMModelGenericKernelsTest.cxx b/Testing/Code/Learning/otbSVMModelGenericKernelsTest.cxx
index cad93a0..2f6a3f4 100644
--- a/Testing/Code/Learning/otbSVMModelGenericKernelsTest.cxx
+++ b/Testing/Code/Learning/otbSVMModelGenericKernelsTest.cxx
@@ -251,7 +251,6 @@ int otbSVMKernelsTest_generic(int argc, char* argv[])
   std::string classKey = "Class";
 
   typedef double                          PixelType;
-  typedef int                             LabeledPixelType;
   typedef otb::VectorImage<PixelType, 2>  ImageType;
   typedef otb::ImageFileReader<ImageType> ReaderType;
 
diff --git a/Testing/Code/Learning/otbSVMModelLoad.cxx b/Testing/Code/Learning/otbSVMModelLoad.cxx
index 5c26bf6..cde5832 100644
--- a/Testing/Code/Learning/otbSVMModelLoad.cxx
+++ b/Testing/Code/Learning/otbSVMModelLoad.cxx
@@ -24,14 +24,10 @@
 
 #include "otbSVMModel.h"
 
-int otbSVMModelLoad(int argc, char* argv[])
+int otbSVMModelLoad(int itkNotUsed(argc), char* argv[])
 {
   typedef unsigned char InputPixelType;
   typedef unsigned char LabelPixelType;
-  const unsigned int Dimension = 2;
-
-  typedef otb::Image<InputPixelType,  Dimension> InputImageType;
-
   typedef otb::SVMModel<InputPixelType, LabelPixelType> ModelType;
 
   ModelType::Pointer svmModel = ModelType::New();
diff --git a/Testing/Code/Learning/otbSVMModelLoadSave.cxx b/Testing/Code/Learning/otbSVMModelLoadSave.cxx
index 6aac187..a8ffb2c 100644
--- a/Testing/Code/Learning/otbSVMModelLoadSave.cxx
+++ b/Testing/Code/Learning/otbSVMModelLoadSave.cxx
@@ -24,13 +24,10 @@
 
 #include "otbSVMModel.h"
 
-int otbSVMModelLoadSave(int argc, char* argv[])
+int otbSVMModelLoadSave(int itkNotUsed(argc), char* argv[])
 {
   typedef unsigned char InputPixelType;
   typedef unsigned char LabelPixelType;
-  const unsigned int Dimension = 2;
-
-  typedef otb::Image<InputPixelType,  Dimension> InputImageType;
 
   typedef otb::SVMModel<InputPixelType, LabelPixelType> ModelType;
 
diff --git a/Testing/Code/Learning/otbSVMModelNew.cxx b/Testing/Code/Learning/otbSVMModelNew.cxx
index 84964f3..2fff22d 100644
--- a/Testing/Code/Learning/otbSVMModelNew.cxx
+++ b/Testing/Code/Learning/otbSVMModelNew.cxx
@@ -24,13 +24,11 @@
 
 #include "otbSVMModel.h"
 
-int otbSVMModelNew(int argc, char* argv[])
+int otbSVMModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef unsigned char InputPixelType;
   typedef unsigned char LabelPixelType;
-  const unsigned int Dimension = 2;
 
-  typedef otb::Image<InputPixelType,  Dimension>        InputImageType;
   typedef otb::SVMModel<InputPixelType, LabelPixelType> ModelType;
 
   ModelType::Pointer svmModel = ModelType::New();
diff --git a/Testing/Code/Learning/otbSVMPointSetModelEstimatorNew.cxx b/Testing/Code/Learning/otbSVMPointSetModelEstimatorNew.cxx
index a7c6715..1ee69fc 100644
--- a/Testing/Code/Learning/otbSVMPointSetModelEstimatorNew.cxx
+++ b/Testing/Code/Learning/otbSVMPointSetModelEstimatorNew.cxx
@@ -24,7 +24,7 @@
 
 #include "otbSVMPointSetModelEstimator.h"
 
-int otbSVMPointSetModelEstimatorNew(int argc, char* argv[])
+int otbSVMPointSetModelEstimatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef std::vector<double> InputPixelType;
   typedef double              LabelPixelType;
diff --git a/Testing/Code/Learning/otbSVMPointSetModelEstimatorTrain.cxx b/Testing/Code/Learning/otbSVMPointSetModelEstimatorTrain.cxx
index 25c20a8..a804541 100644
--- a/Testing/Code/Learning/otbSVMPointSetModelEstimatorTrain.cxx
+++ b/Testing/Code/Learning/otbSVMPointSetModelEstimatorTrain.cxx
@@ -24,7 +24,7 @@
 
 #include "otbSVMPointSetModelEstimator.h"
 
-int otbSVMPointSetModelEstimatorTrain(int argc, char* argv[])
+int otbSVMPointSetModelEstimatorTrain(int itkNotUsed(argc), char* argv[])
 {
   const char* outputModelFileName = argv[1];
 
diff --git a/Testing/Code/Learning/otbSVMSampleListModelEstimatorTest.cxx b/Testing/Code/Learning/otbSVMSampleListModelEstimatorTest.cxx
index 8749a44..80865d5 100644
--- a/Testing/Code/Learning/otbSVMSampleListModelEstimatorTest.cxx
+++ b/Testing/Code/Learning/otbSVMSampleListModelEstimatorTest.cxx
@@ -33,7 +33,7 @@
 
 #include "otbListSampleGenerator.h"
 
-int otbSVMSampleListModelEstimatorNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
+int otbSVMSampleListModelEstimatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef double InputPixelType;
   typedef double LabelPixelType;
@@ -72,7 +72,6 @@ int otbSVMSampleListModelEstimatorTest(int argc, char* argv[])
   std::string classKey = "Class";
 
   typedef double                          PixelType;
-  typedef int                             LabeledPixelType;
   typedef otb::VectorImage<PixelType, 2>  ImageType;
   typedef otb::ImageFileReader<ImageType> ReaderType;
 
diff --git a/Testing/Code/Learning/otbShiftScaleSampleListFilter.cxx b/Testing/Code/Learning/otbShiftScaleSampleListFilter.cxx
index 99684a0..4f98f29 100644
--- a/Testing/Code/Learning/otbShiftScaleSampleListFilter.cxx
+++ b/Testing/Code/Learning/otbShiftScaleSampleListFilter.cxx
@@ -32,7 +32,7 @@ typedef itk::Statistics::ListSample<FloatSampleType> FloatSampleListType;
 typedef otb::Statistics::ShiftScaleSampleListFilter<FloatSampleListType, DoubleSampleListType> ShiftScaleFilterType;
 
 
-int otbShiftScaleSampleListFilterNew(int argc, char * argv[])
+int otbShiftScaleSampleListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
  ShiftScaleFilterType::Pointer instance = ShiftScaleFilterType::New();
 
@@ -110,5 +110,3 @@ int otbShiftScaleSampleListFilter(int argc, char * argv[])
 
  return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/Learning/otbTrainMachineLearningModel.cxx b/Testing/Code/Learning/otbTrainMachineLearningModel.cxx
index a9f85f4..77abf11 100644
--- a/Testing/Code/Learning/otbTrainMachineLearningModel.cxx
+++ b/Testing/Code/Learning/otbTrainMachineLearningModel.cxx
@@ -112,7 +112,7 @@ bool ReadDataFile(const std::string & infname, InputListSampleType * samples, Ta
   return true;
 }
 
-int otbLibSVMMachineLearningModelNew(int argc, char * argv[])
+int otbLibSVMMachineLearningModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::LibSVMMachineLearningModel<InputValueType, TargetValueType> SVMType;
   SVMType::Pointer svmclassifier = SVMType::New();
@@ -194,7 +194,7 @@ int otbLibSVMMachineLearningModel(int argc, char * argv[])
     }
 }
 
-int otbSVMMachineLearningModelNew(int argc, char * argv[])
+int otbSVMMachineLearningModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::SVMMachineLearningModel<InputValueType,TargetValueType> SVMType;
   SVMType::Pointer svmclassifier = SVMType::New();
@@ -276,7 +276,7 @@ int otbSVMMachineLearningModel(int argc, char * argv[])
     }
 }
 
-int otbKNearestNeighborsMachineLearningModelNew(int argc, char * argv[])
+int otbKNearestNeighborsMachineLearningModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::KNearestNeighborsMachineLearningModel<InputValueType,TargetValueType> KNearestNeighborsType;
   KNearestNeighborsType::Pointer knnclassifier = KNearestNeighborsType::New();
@@ -358,7 +358,7 @@ int otbKNearestNeighborsMachineLearningModel(int argc, char * argv[])
     }
 }
 
-int otbRandomForestsMachineLearningModelNew(int argc, char * argv[])
+int otbRandomForestsMachineLearningModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::RandomForestsMachineLearningModel<InputValueType,TargetValueType> RandomForestType;
   RandomForestType::Pointer rfclassifier = RandomForestType::New();
@@ -449,7 +449,7 @@ int otbRandomForestsMachineLearningModel(int argc, char * argv[])
     }
 }
 
-int otbBoostMachineLearningModelNew(int argc, char * argv[])
+int otbBoostMachineLearningModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::BoostMachineLearningModel<InputValueType,TargetValueType> BoostType;
   BoostType::Pointer classifier = BoostType::New();
@@ -540,7 +540,7 @@ int otbBoostMachineLearningModel(int argc, char * argv[])
     }
 }
 
-int otbANNMachineLearningModelNew(int argc, char * argv[])
+int otbANNMachineLearningModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::NeuralNetworkMachineLearningModel<InputValueType, TargetValueType> ANNType;
   ANNType::Pointer classifier = ANNType::New();
@@ -635,7 +635,7 @@ int otbANNMachineLearningModel(int argc, char * argv[])
     }
 }
 
-int otbNormalBayesMachineLearningModelNew(int argc, char * argv[])
+int otbNormalBayesMachineLearningModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::NormalBayesMachineLearningModel<InputValueType,TargetValueType> NormalBayesType;
   NormalBayesType::Pointer classifier = NormalBayesType::New();
@@ -717,7 +717,7 @@ int otbNormalBayesMachineLearningModel(int argc, char * argv[])
     }
 }
 
-int otbDecisionTreeMachineLearningModelNew(int argc, char * argv[])
+int otbDecisionTreeMachineLearningModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::DecisionTreeMachineLearningModel<InputValueType,TargetValueType> DecisionTreeType;
   DecisionTreeType::Pointer classifier = DecisionTreeType::New();
@@ -800,7 +800,7 @@ int otbDecisionTreeMachineLearningModel(int argc, char * argv[])
 }
 
 
-int otbGradientBoostedTreeMachineLearningModelNew(int argc, char * argv[])
+int otbGradientBoostedTreeMachineLearningModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::GradientBoostedTreeMachineLearningModel<InputValueType,TargetValueType> GBTreeType;
   GBTreeType::Pointer classifier = GBTreeType::New();
@@ -881,5 +881,3 @@ int otbGradientBoostedTreeMachineLearningModel(int argc, char * argv[])
     return EXIT_FAILURE;
     }
 }
-
-
diff --git a/Testing/Code/Markov/otbMRFEnergyEdgeFidelity.cxx b/Testing/Code/Markov/otbMRFEnergyEdgeFidelity.cxx
index 87ce3d3..bf43629 100644
--- a/Testing/Code/Markov/otbMRFEnergyEdgeFidelity.cxx
+++ b/Testing/Code/Markov/otbMRFEnergyEdgeFidelity.cxx
@@ -21,7 +21,7 @@
 #include "otbImage.h"
 #include <fstream>
 
-int otbMRFEnergyEdgeFidelity(int argc, char * argv[])
+int otbMRFEnergyEdgeFidelity(int itkNotUsed(argc), char * argv[])
 {
   const char * outputFile = argv[1];
 
diff --git a/Testing/Code/Markov/otbMRFEnergyEdgeFidelityNew.cxx b/Testing/Code/Markov/otbMRFEnergyEdgeFidelityNew.cxx
index 8357d5a..3a83a03 100644
--- a/Testing/Code/Markov/otbMRFEnergyEdgeFidelityNew.cxx
+++ b/Testing/Code/Markov/otbMRFEnergyEdgeFidelityNew.cxx
@@ -20,13 +20,10 @@
 #include "otbMRFEnergyEdgeFidelity.h"
 #include "otbImage.h"
 
-int otbMRFEnergyEdgeFidelityNew(int argc, char * argv[])
+int otbMRFEnergyEdgeFidelityNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double PixelType;
-  typedef int    PixelType2;
-
   typedef otb::Image<PixelType, 2>                         ImageType;
-  typedef otb::Image<PixelType2, 2>                        ImageType2;
   typedef otb::MRFEnergyEdgeFidelity<ImageType, ImageType> MRFEnergyType;
 
   MRFEnergyType::Pointer object  = MRFEnergyType::New();
diff --git a/Testing/Code/Markov/otbMRFEnergyFisherClassification.cxx b/Testing/Code/Markov/otbMRFEnergyFisherClassification.cxx
index 0511286..6aa38a4 100644
--- a/Testing/Code/Markov/otbMRFEnergyFisherClassification.cxx
+++ b/Testing/Code/Markov/otbMRFEnergyFisherClassification.cxx
@@ -22,7 +22,7 @@
 #include "otbImage.h"
 #include <fstream>
 
-int otbMRFEnergyFisherClassificationNew(int argc, char * argv[])
+int otbMRFEnergyFisherClassificationNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                        PixelTypeInput;
   typedef int                           PixelTypeLabel;
@@ -38,7 +38,7 @@ int otbMRFEnergyFisherClassificationNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbMRFEnergyFisherClassification(int argc, char * argv[])
+int otbMRFEnergyFisherClassification(int itkNotUsed(argc), char * argv[])
 {
   const char * outputFile = argv[1];
 
diff --git a/Testing/Code/Markov/otbMRFEnergyGaussian.cxx b/Testing/Code/Markov/otbMRFEnergyGaussian.cxx
index 0fce547..3a3775f 100644
--- a/Testing/Code/Markov/otbMRFEnergyGaussian.cxx
+++ b/Testing/Code/Markov/otbMRFEnergyGaussian.cxx
@@ -21,7 +21,7 @@
 #include "otbImage.h"
 #include <fstream>
 
-int otbMRFEnergyGaussian(int argc, char * argv[])
+int otbMRFEnergyGaussian(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                    PixelType;
   typedef int                       PixelType2;
diff --git a/Testing/Code/Markov/otbMRFEnergyGaussianClassification.cxx b/Testing/Code/Markov/otbMRFEnergyGaussianClassification.cxx
index ba303d8..0c76010 100644
--- a/Testing/Code/Markov/otbMRFEnergyGaussianClassification.cxx
+++ b/Testing/Code/Markov/otbMRFEnergyGaussianClassification.cxx
@@ -21,7 +21,7 @@
 #include "otbImage.h"
 #include <fstream>
 
-int otbMRFEnergyGaussianClassification(int argc, char * argv[])
+int otbMRFEnergyGaussianClassification(int itkNotUsed(argc), char * argv[])
 {
   const char * outputFile = argv[1];
 
diff --git a/Testing/Code/Markov/otbMRFEnergyGaussianClassificationNew.cxx b/Testing/Code/Markov/otbMRFEnergyGaussianClassificationNew.cxx
index 0f6bfba..67c9f9b 100644
--- a/Testing/Code/Markov/otbMRFEnergyGaussianClassificationNew.cxx
+++ b/Testing/Code/Markov/otbMRFEnergyGaussianClassificationNew.cxx
@@ -20,7 +20,7 @@
 #include "otbMRFEnergyGaussianClassification.h"
 #include "otbImage.h"
 
-int otbMRFEnergyGaussianClassificationNew(int argc, char * argv[])
+int otbMRFEnergyGaussianClassificationNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                                                     PixelType;
   typedef otb::Image<PixelType, 2>                                   ImageType;
diff --git a/Testing/Code/Markov/otbMRFEnergyGaussianNew.cxx b/Testing/Code/Markov/otbMRFEnergyGaussianNew.cxx
index 09ac2c1..90fadb5 100644
--- a/Testing/Code/Markov/otbMRFEnergyGaussianNew.cxx
+++ b/Testing/Code/Markov/otbMRFEnergyGaussianNew.cxx
@@ -20,7 +20,7 @@
 #include "otbMRFEnergyGaussian.h"
 #include "otbImage.h"
 
-int otbMRFEnergyGaussianNew(int argc, char * argv[])
+int otbMRFEnergyGaussianNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                                       PixelType;
   typedef otb::Image<PixelType, 2>                     ImageType;
diff --git a/Testing/Code/Markov/otbMRFEnergyPotts.cxx b/Testing/Code/Markov/otbMRFEnergyPotts.cxx
index cd32709..2424ea4 100644
--- a/Testing/Code/Markov/otbMRFEnergyPotts.cxx
+++ b/Testing/Code/Markov/otbMRFEnergyPotts.cxx
@@ -21,7 +21,7 @@
 #include "otbImage.h"
 #include <fstream>
 
-int otbMRFEnergyPotts(int argc, char * argv[])
+int otbMRFEnergyPotts(int itkNotUsed(argc), char * argv[])
 {
   const char * outputFile = argv[1];
 
diff --git a/Testing/Code/Markov/otbMRFEnergyPottsNew.cxx b/Testing/Code/Markov/otbMRFEnergyPottsNew.cxx
index 86e4da1..54886d2 100644
--- a/Testing/Code/Markov/otbMRFEnergyPottsNew.cxx
+++ b/Testing/Code/Markov/otbMRFEnergyPottsNew.cxx
@@ -20,7 +20,7 @@
 #include "otbMRFEnergyPotts.h"
 #include "otbImage.h"
 
-int otbMRFEnergyPottsNew(int argc, char * argv[])
+int otbMRFEnergyPottsNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                                    PixelType;
   typedef otb::Image<PixelType, 2>                  ImageType;
diff --git a/Testing/Code/Markov/otbMRFOptimizerICM.cxx b/Testing/Code/Markov/otbMRFOptimizerICM.cxx
index 705659b..95fa17a 100644
--- a/Testing/Code/Markov/otbMRFOptimizerICM.cxx
+++ b/Testing/Code/Markov/otbMRFOptimizerICM.cxx
@@ -20,7 +20,7 @@
 #include "otbMRFOptimizerICM.h"
 #include <cstdlib>
 
-int otbMRFOptimizerICM(int argc, char * argv[])
+int otbMRFOptimizerICM(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::MRFOptimizerICM MRFOptimizerICMType;
 
diff --git a/Testing/Code/Markov/otbMRFOptimizerICMNew.cxx b/Testing/Code/Markov/otbMRFOptimizerICMNew.cxx
index 1a92dc8..64e0e75 100644
--- a/Testing/Code/Markov/otbMRFOptimizerICMNew.cxx
+++ b/Testing/Code/Markov/otbMRFOptimizerICMNew.cxx
@@ -20,7 +20,7 @@
 #include "otbMRFOptimizerICM.h"
 #include <cstdlib>
 
-int otbMRFOptimizerICMNew(int argc, char * argv[])
+int otbMRFOptimizerICMNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::MRFOptimizerICM MRFOptimizerType;
 
diff --git a/Testing/Code/Markov/otbMRFOptimizerMetropolis.cxx b/Testing/Code/Markov/otbMRFOptimizerMetropolis.cxx
index ad54344..2d71ad8 100644
--- a/Testing/Code/Markov/otbMRFOptimizerMetropolis.cxx
+++ b/Testing/Code/Markov/otbMRFOptimizerMetropolis.cxx
@@ -21,7 +21,7 @@
 #include <fstream>
 #include <cstdlib>
 
-int otbMRFOptimizerMetropolis(int argc, char * argv[])
+int otbMRFOptimizerMetropolis(int itkNotUsed(argc), char * argv[])
 {
   const char * outputFile = argv[1];
 
diff --git a/Testing/Code/Markov/otbMRFOptimizerMetropolisNew.cxx b/Testing/Code/Markov/otbMRFOptimizerMetropolisNew.cxx
index cc1d18a..e91acf8 100644
--- a/Testing/Code/Markov/otbMRFOptimizerMetropolisNew.cxx
+++ b/Testing/Code/Markov/otbMRFOptimizerMetropolisNew.cxx
@@ -20,7 +20,7 @@
 #include "otbMRFOptimizerMetropolis.h"
 #include <cstdlib>
 
-int otbMRFOptimizerMetropolisNew(int argc, char * argv[])
+int otbMRFOptimizerMetropolisNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::MRFOptimizerMetropolis MRFOptimizerType;
 
diff --git a/Testing/Code/Markov/otbMRFSamplerMAP.cxx b/Testing/Code/Markov/otbMRFSamplerMAP.cxx
index 3cf4d36..0cf14a9 100644
--- a/Testing/Code/Markov/otbMRFSamplerMAP.cxx
+++ b/Testing/Code/Markov/otbMRFSamplerMAP.cxx
@@ -23,7 +23,7 @@
 #include "otbMRFEnergyPotts.h"
 #include <fstream>
 
-int otbMRFSamplerMAP(int argc, char * argv[])
+int otbMRFSamplerMAP(int itkNotUsed(argc), char * argv[])
 {
   const char * inputImage = argv[1];
   const char * labelImage = argv[2];
diff --git a/Testing/Code/Markov/otbMRFSamplerMAPNew.cxx b/Testing/Code/Markov/otbMRFSamplerMAPNew.cxx
index a723f70..b28f285 100644
--- a/Testing/Code/Markov/otbMRFSamplerMAPNew.cxx
+++ b/Testing/Code/Markov/otbMRFSamplerMAPNew.cxx
@@ -22,7 +22,7 @@
 #include "otbMRFSamplerMAP.h"
 #include "otbImage.h"
 
-int otbMRFSamplerMAPNew(int argc, char * argv[])
+int otbMRFSamplerMAPNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                                   PixelType;
   typedef otb::Image<PixelType, 2>                 ImageType;
diff --git a/Testing/Code/Markov/otbMRFSamplerRandom.cxx b/Testing/Code/Markov/otbMRFSamplerRandom.cxx
index 9bbc693..f9995bd 100644
--- a/Testing/Code/Markov/otbMRFSamplerRandom.cxx
+++ b/Testing/Code/Markov/otbMRFSamplerRandom.cxx
@@ -23,7 +23,7 @@
 #include "otbMRFEnergyPotts.h"
 #include <fstream>
 
-int otbMRFSamplerRandom(int argc, char * argv[])
+int otbMRFSamplerRandom(int itkNotUsed(argc), char * argv[])
 {
   const char * inputImage = argv[1];
   const char * labelImage = argv[2];
diff --git a/Testing/Code/Markov/otbMRFSamplerRandomMAP.cxx b/Testing/Code/Markov/otbMRFSamplerRandomMAP.cxx
index 2c74288..714c1fb 100644
--- a/Testing/Code/Markov/otbMRFSamplerRandomMAP.cxx
+++ b/Testing/Code/Markov/otbMRFSamplerRandomMAP.cxx
@@ -24,7 +24,7 @@
 
 #include <fstream>
 
-int otbMRFSamplerRandomMAP(int argc, char * argv[])
+int otbMRFSamplerRandomMAP(int itkNotUsed(argc), char * argv[])
 {
   const char * inputImage = argv[1];
   const char * labelImage = argv[2];
diff --git a/Testing/Code/Markov/otbMRFSamplerRandomMAPNew.cxx b/Testing/Code/Markov/otbMRFSamplerRandomMAPNew.cxx
index ecaa364..54511d7 100644
--- a/Testing/Code/Markov/otbMRFSamplerRandomMAPNew.cxx
+++ b/Testing/Code/Markov/otbMRFSamplerRandomMAPNew.cxx
@@ -20,7 +20,7 @@
 #include "otbMRFSamplerRandomMAP.h"
 #include "otbImage.h"
 
-int otbMRFSamplerRandomMAPNew(int argc, char * argv[])
+int otbMRFSamplerRandomMAPNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                                         PixelType;
   typedef otb::Image<PixelType, 2>                       ImageType;
diff --git a/Testing/Code/Markov/otbMRFSamplerRandomNew.cxx b/Testing/Code/Markov/otbMRFSamplerRandomNew.cxx
index 03e0414..5346753 100644
--- a/Testing/Code/Markov/otbMRFSamplerRandomNew.cxx
+++ b/Testing/Code/Markov/otbMRFSamplerRandomNew.cxx
@@ -20,7 +20,7 @@
 #include "otbMRFSamplerRandom.h"
 #include "otbImage.h"
 
-int otbMRFSamplerRandomNew(int argc, char * argv[])
+int otbMRFSamplerRandomNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                                      PixelType;
   typedef otb::Image<PixelType, 2>                    ImageType;
diff --git a/Testing/Code/Markov/otbMarkovRandomFieldFilter.cxx b/Testing/Code/Markov/otbMarkovRandomFieldFilter.cxx
index d96f111..761b69e 100644
--- a/Testing/Code/Markov/otbMarkovRandomFieldFilter.cxx
+++ b/Testing/Code/Markov/otbMarkovRandomFieldFilter.cxx
@@ -29,7 +29,7 @@
 #include "otbMRFOptimizerMetropolis.h"
 #include "otbMRFSamplerRandom.h"
 
-int otbMarkovRandomFieldFilter(int argc, char* argv[])
+int otbMarkovRandomFieldFilter(int itkNotUsed(argc), char* argv[])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/Markov/otbMarkovRandomFieldFilterNew.cxx b/Testing/Code/Markov/otbMarkovRandomFieldFilterNew.cxx
index e0d31a1..1588c39 100644
--- a/Testing/Code/Markov/otbMarkovRandomFieldFilterNew.cxx
+++ b/Testing/Code/Markov/otbMarkovRandomFieldFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbMarkovRandomFieldFilter.h"
 #include "otbImage.h"
 
-int otbMarkovRandomFieldFilterNew(int argc, char * argv[])
+int otbMarkovRandomFieldFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                                             PixelType;
   typedef otb::Image<PixelType, 2>                           ImageType;
diff --git a/Testing/Code/MultiScale/otbConvexOrConcaveClassificationFilter.cxx b/Testing/Code/MultiScale/otbConvexOrConcaveClassificationFilter.cxx
index 439104c..eeee71d 100644
--- a/Testing/Code/MultiScale/otbConvexOrConcaveClassificationFilter.cxx
+++ b/Testing/Code/MultiScale/otbConvexOrConcaveClassificationFilter.cxx
@@ -20,7 +20,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbConvexOrConcaveClassificationFilter(int argc, char * argv[])
+int otbConvexOrConcaveClassificationFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * levelingfname = argv[2];
diff --git a/Testing/Code/MultiScale/otbConvexOrConcaveClassificationFilterNew.cxx b/Testing/Code/MultiScale/otbConvexOrConcaveClassificationFilterNew.cxx
index 71fa391..466a341 100644
--- a/Testing/Code/MultiScale/otbConvexOrConcaveClassificationFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbConvexOrConcaveClassificationFilterNew.cxx
@@ -18,7 +18,7 @@
 #include "otbConvexOrConcaveClassificationFilter.h"
 #include "otbImage.h"
 
-int otbConvexOrConcaveClassificationFilterNew(int argc, char * argv[])
+int otbConvexOrConcaveClassificationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>        InputImageType;
   typedef otb::Image<unsigned char, 2> OutputImageType;
diff --git a/Testing/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.cxx b/Testing/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.cxx
index ce4f405..4830d71 100644
--- a/Testing/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.cxx
+++ b/Testing/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImage.h"
 #include "itkBinaryBallStructuringElement.h"
 
-int otbGeodesicMorphologyDecompositionImageFilter(int argc, char * argv[])
+int otbGeodesicMorphologyDecompositionImageFilter(int itkNotUsed(argc), char * argv[])
 {
 
   const char *       infname = argv[1];
diff --git a/Testing/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilterNew.cxx b/Testing/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilterNew.cxx
index 611b76d..fdda278 100644
--- a/Testing/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbImage.h"
 #include "itkBinaryBallStructuringElement.h"
 
-int otbGeodesicMorphologyDecompositionImageFilterNew(int argc, char * argv[])
+int otbGeodesicMorphologyDecompositionImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2> ImageType;
   typedef itk::BinaryBallStructuringElement<double,
diff --git a/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.cxx b/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.cxx
index 7e80580..35f00e1 100644
--- a/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.cxx
+++ b/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int otbGeodesicMorphologyIterativeDecompositionImageFilter(int argc, char * argv[])
+int otbGeodesicMorphologyIterativeDecompositionImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename = argv[1];
   const char *       outputFilenamePrefix = argv[2];
diff --git a/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilterNew.cxx b/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilterNew.cxx
index 94a6171..0b648ef 100644
--- a/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilterNew.cxx
@@ -21,7 +21,7 @@
 
 #include "itkMacro.h"
 
-int otbGeodesicMorphologyIterativeDecompositionImageFilterNew(int argc, char * argv[])
+int otbGeodesicMorphologyIterativeDecompositionImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double InputPixelType;
diff --git a/Testing/Code/MultiScale/otbGeodesicMorphologyLevelingFilter.cxx b/Testing/Code/MultiScale/otbGeodesicMorphologyLevelingFilter.cxx
index 7e0e28c..f56ece5 100644
--- a/Testing/Code/MultiScale/otbGeodesicMorphologyLevelingFilter.cxx
+++ b/Testing/Code/MultiScale/otbGeodesicMorphologyLevelingFilter.cxx
@@ -20,7 +20,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbGeodesicMorphologyLevelingFilter(int argc, char * argv[])
+int otbGeodesicMorphologyLevelingFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname     = argv[1];
   const char * inconvfname = argv[2];
diff --git a/Testing/Code/MultiScale/otbGeodesicMorphologyLevelingFilterNew.cxx b/Testing/Code/MultiScale/otbGeodesicMorphologyLevelingFilterNew.cxx
index d0acba1..645a50a 100644
--- a/Testing/Code/MultiScale/otbGeodesicMorphologyLevelingFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbGeodesicMorphologyLevelingFilterNew.cxx
@@ -18,7 +18,7 @@
 #include "otbGeodesicMorphologyLevelingFilter.h"
 #include "otbImage.h"
 
-int otbGeodesicMorphologyLevelingFilterNew(int argc, char * argv[])
+int otbGeodesicMorphologyLevelingFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Image<double, 2>                                                  ImageType;
   typedef otb::GeodesicMorphologyLevelingFilter<ImageType, ImageType, ImageType> FilterType;
diff --git a/Testing/Code/MultiScale/otbMorphologicalClosingProfileFilter.cxx b/Testing/Code/MultiScale/otbMorphologicalClosingProfileFilter.cxx
index 945e1dd..f677de9 100644
--- a/Testing/Code/MultiScale/otbMorphologicalClosingProfileFilter.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalClosingProfileFilter.cxx
@@ -23,7 +23,7 @@
 
 #include "itkMacro.h"
 
-int otbMorphologicalClosingProfileFilter(int argc, char * argv[])
+int otbMorphologicalClosingProfileFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename = argv[1];
   const char *       outputFilenamePrefix = argv[2];
diff --git a/Testing/Code/MultiScale/otbMorphologicalClosingProfileFilterNew.cxx b/Testing/Code/MultiScale/otbMorphologicalClosingProfileFilterNew.cxx
index e66e943..bbb2d85 100644
--- a/Testing/Code/MultiScale/otbMorphologicalClosingProfileFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalClosingProfileFilterNew.cxx
@@ -21,15 +21,12 @@
 
 #include "itkMacro.h"
 
-int otbMorphologicalClosingProfileFilterNew(int argc, char * argv[])
+int otbMorphologicalClosingProfileFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double InputPixelType;
-  typedef double OutputPixelType;
 
   typedef otb::Image<InputPixelType, Dimension>  InputImageType;
-  typedef otb::Image<OutputPixelType, Dimension> OutputImageType;
-
   typedef itk::BinaryBallStructuringElement<InputPixelType, Dimension> StructuringElementType;
   typedef otb::MorphologicalClosingProfileFilter<InputImageType, InputImageType, StructuringElementType>
   ClosingProfileFilterType;
diff --git a/Testing/Code/MultiScale/otbMorphologicalOpeningProfileFilter.cxx b/Testing/Code/MultiScale/otbMorphologicalOpeningProfileFilter.cxx
index 0f6bfa0..47a3d99 100644
--- a/Testing/Code/MultiScale/otbMorphologicalOpeningProfileFilter.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalOpeningProfileFilter.cxx
@@ -23,7 +23,7 @@
 
 #include "itkMacro.h"
 
-int otbMorphologicalOpeningProfileFilter(int argc, char * argv[])
+int otbMorphologicalOpeningProfileFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename = argv[1];
   const char *       outputFilenamePrefix = argv[2];
diff --git a/Testing/Code/MultiScale/otbMorphologicalOpeningProfileFilterNew.cxx b/Testing/Code/MultiScale/otbMorphologicalOpeningProfileFilterNew.cxx
index 9515c44..253fa67 100644
--- a/Testing/Code/MultiScale/otbMorphologicalOpeningProfileFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalOpeningProfileFilterNew.cxx
@@ -21,14 +21,12 @@
 
 #include "itkMacro.h"
 
-int otbMorphologicalOpeningProfileFilterNew(int argc, char * argv[])
+int otbMorphologicalOpeningProfileFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double InputPixelType;
-  typedef double OutputPixelType;
 
   typedef otb::Image<InputPixelType, Dimension>  InputImageType;
-  typedef otb::Image<OutputPixelType, Dimension> OutputImageType;
 
   typedef itk::BinaryBallStructuringElement<InputPixelType, Dimension> StructuringElementType;
   typedef otb::MorphologicalOpeningProfileFilter<InputImageType, InputImageType, StructuringElementType>
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.cxx
index 90d45ed..1f39cb2 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.cxx
@@ -24,9 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-#include "itkMacro.h"
-
-int otbMorphologicalPyramidAnalysisFilter(int argc, char * argv[])
+int otbMorphologicalPyramidAnalysisFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename = argv[1];
   const char *       outputFilenamePrefix = argv[2];
@@ -101,7 +99,7 @@ int otbMorphologicalPyramidAnalysisFilter(int argc, char * argv[])
     writer->SetInput(itInfDeci.Get());
     writer->SetFileName(oss.str().c_str());
     writer->Update();
-    std::cout << "File " << oss << " written" << std::endl;
+    std::cout << "File " << oss.str() << " written" << std::endl;
     oss.str("");
     oss << outputFilenamePrefix << "_sd_" << i << "." << outputFilenameSuffix;
     writer->SetInput(itSupDeci.Get());
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilterNew.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilterNew.cxx
index 15d013c..a887e6b 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkBinaryBallStructuringElement.h"
 #include "otbImage.h"
 
-int otbMorphologicalPyramidAnalysisFilterNew(int argc, char * argv[])
+int otbMorphologicalPyramidAnalysisFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                                                InputPixelType;
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.cxx
index d29555e..8ce7ca9 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int otbMorphologicalPyramidMRToMSConverter(int argc, char * argv[])
+int otbMorphologicalPyramidMRToMSConverter(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename = argv[1];
   const char *       outputFilename1 = argv[2];
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverterNew.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverterNew.cxx
index d3ddfa7..3b07a87 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverterNew.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbMorphologicalPyramidMRToMSConverter.h"
 #include "otbImage.h"
 
-int otbMorphologicalPyramidMRToMSConverterNew(int argc, char * argv[])
+int otbMorphologicalPyramidMRToMSConverterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char InputPixelType;
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidResampler.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidResampler.cxx
index c063d7a..79e84bd 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidResampler.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidResampler.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int otbMorphologicalPyramidResampler(int argc, char * argv[])
+int otbMorphologicalPyramidResampler(int itkNotUsed(argc), char * argv[])
 {
   const char*        inputFilename = argv[1];
   const char*        outputFilename1 = argv[2];
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidResamplerNew.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidResamplerNew.cxx
index 78212f4..81b62ef 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidResamplerNew.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidResamplerNew.cxx
@@ -19,7 +19,7 @@
 #include "otbMorphologicalPyramidResampler.h"
 #include "otbImage.h"
 
-int otbMorphologicalPyramidResamplerNew(int argc, char * argv[])
+int otbMorphologicalPyramidResamplerNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char InputPixelType;
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.cxx
index 21752ff..3eaa699 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int otbMorphologicalPyramidSegmentationFilter(int argc, char * argv[])
+int otbMorphologicalPyramidSegmentationFilter(int itkNotUsed(argc), char * argv[])
 {
   const char*        inputFilename = argv[1];
   const char*        outputFilenamePrefix = argv[2];
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilterNew.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilterNew.cxx
index af470af..cccd791 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbMorphologicalPyramidSegmentationFilter.h"
 #include "otbImage.h"
 
-int otbMorphologicalPyramidSegmentationFilterNew(int argc, char * argv[])
+int otbMorphologicalPyramidSegmentationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char  InputPixelType;
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidSegmenter.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmenter.cxx
index bc816ed..e0bb912 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidSegmenter.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmenter.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int otbMorphologicalPyramidSegmenter(int argc, char * argv[])
+int otbMorphologicalPyramidSegmenter(int itkNotUsed(argc), char * argv[])
 {
   const char*        inputFilename = argv[1];
   const char*        originalFilename = argv[2];
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidSegmenterNew.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmenterNew.cxx
index eda3b5c..39821df 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidSegmenterNew.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmenterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbMorphologicalPyramidSegmenter.h"
 #include "otbImage.h"
 
-int otbMorphologicalPyramidSegmenterNew(int argc, char * argv[])
+int otbMorphologicalPyramidSegmenterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char  InputPixelType;
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.cxx
index ac92d22..322dc88 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImage.h"
 
-int otbMorphologicalPyramidSynthesisFilter(int argc, char * argv[])
+int otbMorphologicalPyramidSynthesisFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename = argv[1];
   const char *       outputFilename = argv[2];
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilterNew.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilterNew.cxx
index f28a48c..5f0c8d0 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbMorphologicalPyramidSynthesisFilter.h"
 #include "otbImage.h"
 
-int otbMorphologicalPyramidSynthesisFilterNew(int argc, char * argv[])
+int otbMorphologicalPyramidSynthesisFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char InputPixelType;
diff --git a/Testing/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.cxx b/Testing/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.cxx
index c0e75ad..e8a61e2 100644
--- a/Testing/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.cxx
+++ b/Testing/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.cxx
@@ -27,7 +27,7 @@
 
 #include "itkMacro.h"
 
-int otbMultiScaleConvexOrConcaveClassificationFilter(int argc, char * argv[])
+int otbMultiScaleConvexOrConcaveClassificationFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename = argv[1];
   const char *       outputFilename = argv[2];
diff --git a/Testing/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilterNew.cxx b/Testing/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilterNew.cxx
index a47fd92..c3a381f 100644
--- a/Testing/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilterNew.cxx
@@ -20,15 +20,13 @@
 #include "otbImage.h"
 #include "itkMacro.h"
 
-int otbMultiScaleConvexOrConcaveClassificationFilterNew(int argc, char * argv[])
+int otbMultiScaleConvexOrConcaveClassificationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double         InputPixelType;
-  typedef double         OutputPixelType;
   typedef unsigned short LabeledPixelType;
 
   typedef otb::Image<InputPixelType, Dimension>  InputImageType;
-  typedef otb::Image<OutputPixelType, Dimension> OutputImageType;
   typedef otb::Image<LabeledPixelType, 2>        LabeledImageType;
 
   typedef otb::MultiScaleConvexOrConcaveClassificationFilter<InputImageType,
diff --git a/Testing/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.cxx b/Testing/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.cxx
index 32c1ed3..c368c5b 100644
--- a/Testing/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.cxx
+++ b/Testing/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.cxx
@@ -25,7 +25,7 @@
 
 #include "itkMacro.h"
 
-int otbProfileDerivativeToMultiScaleCharacteristicsFilter(int argc, char * argv[])
+int otbProfileDerivativeToMultiScaleCharacteristicsFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename = argv[1];
   const char *       outputFilename1 = argv[2];
diff --git a/Testing/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilterNew.cxx b/Testing/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilterNew.cxx
index 854c17a..6392216 100644
--- a/Testing/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbImage.h"
 #include "itkMacro.h"
 
-int otbProfileDerivativeToMultiScaleCharacteristicsFilterNew(int argc, char * argv[])
+int otbProfileDerivativeToMultiScaleCharacteristicsFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double         InputPixelType;
diff --git a/Testing/Code/MultiScale/otbProfileToProfileDerivativeFilter.cxx b/Testing/Code/MultiScale/otbProfileToProfileDerivativeFilter.cxx
index c7ae920..e4ce2af 100644
--- a/Testing/Code/MultiScale/otbProfileToProfileDerivativeFilter.cxx
+++ b/Testing/Code/MultiScale/otbProfileToProfileDerivativeFilter.cxx
@@ -24,7 +24,7 @@
 
 #include "itkMacro.h"
 
-int otbProfileToProfileDerivativeFilter(int argc, char * argv[])
+int otbProfileToProfileDerivativeFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFilename = argv[1];
   const char *       outputFilenamePrefix = argv[2];
diff --git a/Testing/Code/MultiScale/otbProfileToProfileDerivativeFilterNew.cxx b/Testing/Code/MultiScale/otbProfileToProfileDerivativeFilterNew.cxx
index 8fae72a..653fd5d 100644
--- a/Testing/Code/MultiScale/otbProfileToProfileDerivativeFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbProfileToProfileDerivativeFilterNew.cxx
@@ -20,7 +20,7 @@
 
 #include "itkMacro.h"
 
-int otbProfileToProfileDerivativeFilterNew(int argc, char * argv[])
+int otbProfileToProfileDerivativeFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double InputPixelType;
diff --git a/Testing/Code/MultiScale/otbSubsampleImageFilter.cxx b/Testing/Code/MultiScale/otbSubsampleImageFilter.cxx
index 95e1d72..a5f08b7 100644
--- a/Testing/Code/MultiScale/otbSubsampleImageFilter.cxx
+++ b/Testing/Code/MultiScale/otbSubsampleImageFilter.cxx
@@ -25,7 +25,7 @@
 
 #include "otbSubsampleImageFilter.h"
 
-int otbSubsampleImageFilter(int argc, char * argv[])
+int otbSubsampleImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName = argv[1];
   const char * outputFileName1 = argv[2];
diff --git a/Testing/Code/MultiScale/otbSubsampleImageFilterNew.cxx b/Testing/Code/MultiScale/otbSubsampleImageFilterNew.cxx
index c4fee00..e3ccf38 100644
--- a/Testing/Code/MultiScale/otbSubsampleImageFilterNew.cxx
+++ b/Testing/Code/MultiScale/otbSubsampleImageFilterNew.cxx
@@ -25,7 +25,7 @@
 
 #include "otbSubsampleImageFilter.h"
 
-int otbSubsampleImageFilterNew(int argc, char * argv[])
+int otbSubsampleImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/MultiScale/otbWaveletFilterBank.cxx b/Testing/Code/MultiScale/otbWaveletFilterBank.cxx
index dcdcbb1..b90dfbd 100644
--- a/Testing/Code/MultiScale/otbWaveletFilterBank.cxx
+++ b/Testing/Code/MultiScale/otbWaveletFilterBank.cxx
@@ -26,7 +26,7 @@
 #include "otbWaveletOperator.h"
 #include "otbWaveletFilterBank.h"
 
-int otbWaveletFilterBank(int argc, char * argv[])
+int otbWaveletFilterBank(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFileName = argv[1];
   const unsigned int decimFactor = atoi(argv[2]); // 1 for multiscale, 2 for multiresolution
diff --git a/Testing/Code/MultiScale/otbWaveletFilterBankNew.cxx b/Testing/Code/MultiScale/otbWaveletFilterBankNew.cxx
index 4553ba3..2f7d6f0 100644
--- a/Testing/Code/MultiScale/otbWaveletFilterBankNew.cxx
+++ b/Testing/Code/MultiScale/otbWaveletFilterBankNew.cxx
@@ -20,7 +20,7 @@
 #include "otbWaveletOperator.h"
 #include "otbWaveletFilterBank.h"
 
-int otbWaveletFilterBankNew(int argc, char * argv[])
+int otbWaveletFilterBankNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/MultiScale/otbWaveletInverseFilterBankNew.cxx b/Testing/Code/MultiScale/otbWaveletInverseFilterBankNew.cxx
index e6d41e0..311a2f4 100644
--- a/Testing/Code/MultiScale/otbWaveletInverseFilterBankNew.cxx
+++ b/Testing/Code/MultiScale/otbWaveletInverseFilterBankNew.cxx
@@ -20,7 +20,7 @@
 #include "otbWaveletOperator.h"
 #include "otbWaveletFilterBank.h"
 
-int otbWaveletInverseFilterBankNew(int argc, char * argv[])
+int otbWaveletInverseFilterBankNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/MultiScale/otbWaveletInverseTransformNew.cxx b/Testing/Code/MultiScale/otbWaveletInverseTransformNew.cxx
index e92d03b..34ecd15 100644
--- a/Testing/Code/MultiScale/otbWaveletInverseTransformNew.cxx
+++ b/Testing/Code/MultiScale/otbWaveletInverseTransformNew.cxx
@@ -23,7 +23,7 @@
 #include "otbWaveletFilterBank.h"
 #include "otbWaveletTransform.h"
 
-int otbWaveletInverseTransformNew(int argc, char * argv[])
+int otbWaveletInverseTransformNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/MultiScale/otbWaveletOperator.cxx b/Testing/Code/MultiScale/otbWaveletOperator.cxx
index 79ac6ca..9b2baa4 100644
--- a/Testing/Code/MultiScale/otbWaveletOperator.cxx
+++ b/Testing/Code/MultiScale/otbWaveletOperator.cxx
@@ -20,7 +20,7 @@
 
 #include "otbWaveletOperator.h"
 
-int otbWaveletOperator(int argc, char * argv[])
+int otbWaveletOperator(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const otb::Wavelet::WaveletDirection directionID = otb::Wavelet::FORWARD;
   const otb::Wavelet::Wavelet          wvltID = otb::Wavelet::HAAR;
diff --git a/Testing/Code/MultiScale/otbWaveletOperatorNew.cxx b/Testing/Code/MultiScale/otbWaveletOperatorNew.cxx
index 44b102b..866104b 100644
--- a/Testing/Code/MultiScale/otbWaveletOperatorNew.cxx
+++ b/Testing/Code/MultiScale/otbWaveletOperatorNew.cxx
@@ -20,7 +20,7 @@
 
 #include "otbWaveletOperator.h"
 
-int otbWaveletOperatorNew(int argc, char * argv[])
+int otbWaveletOperatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const otb::Wavelet::WaveletDirection directionID = otb::Wavelet::INVERSE;
   const otb::Wavelet::Wavelet          wvltID = otb::Wavelet::SPLINE_BIORTHOGONAL_4_4;
diff --git a/Testing/Code/MultiScale/otbWaveletPacketInverseTransformNew.cxx b/Testing/Code/MultiScale/otbWaveletPacketInverseTransformNew.cxx
index f118a88..cd835ac 100644
--- a/Testing/Code/MultiScale/otbWaveletPacketInverseTransformNew.cxx
+++ b/Testing/Code/MultiScale/otbWaveletPacketInverseTransformNew.cxx
@@ -24,7 +24,7 @@
 #include "otbWaveletPacketTransform.h"
 #include "otbWaveletPacketDecompositionCosts.h"
 
-int otbWaveletPacketInverseTransformNew(int argc, char * argv[])
+int otbWaveletPacketInverseTransformNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/MultiScale/otbWaveletPacketTransform.cxx b/Testing/Code/MultiScale/otbWaveletPacketTransform.cxx
index ab7b883..87c69e6 100644
--- a/Testing/Code/MultiScale/otbWaveletPacketTransform.cxx
+++ b/Testing/Code/MultiScale/otbWaveletPacketTransform.cxx
@@ -29,7 +29,7 @@
 #include "otbWaveletPacketDecompositionCosts.h"
 
 template<otb::Wavelet::Wavelet TWavelet>
-int otbWaveletPacketTransform_generic(int argc, char * argv[])
+int otbWaveletPacketTransform_generic(int itkNotUsed(argc), char * argv[])
 {
   const char *       inputFileName = argv[1];
   const char *       outputFileName = argv[2];
diff --git a/Testing/Code/MultiScale/otbWaveletPacketTransformNew.cxx b/Testing/Code/MultiScale/otbWaveletPacketTransformNew.cxx
index 40fcd88..81b0e02 100644
--- a/Testing/Code/MultiScale/otbWaveletPacketTransformNew.cxx
+++ b/Testing/Code/MultiScale/otbWaveletPacketTransformNew.cxx
@@ -22,7 +22,7 @@
 #include "otbWaveletPacketTransform.h"
 #include "otbWaveletPacketDecompositionCosts.h"
 
-int otbWaveletPacketTransformNew(int argc, char * argv[])
+int otbWaveletPacketTransformNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/MultiScale/otbWaveletTransformNew.cxx b/Testing/Code/MultiScale/otbWaveletTransformNew.cxx
index 57dab99..de8bab3 100644
--- a/Testing/Code/MultiScale/otbWaveletTransformNew.cxx
+++ b/Testing/Code/MultiScale/otbWaveletTransformNew.cxx
@@ -21,7 +21,7 @@
 #include "otbWaveletFilterBank.h"
 #include "otbWaveletTransform.h"
 
-int otbWaveletTransformNew(int argc, char * argv[])
+int otbWaveletTransformNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/MultiTemporal/otbEnvelopeSavitzkyGolayInterpolationFunctorTest.cxx b/Testing/Code/MultiTemporal/otbEnvelopeSavitzkyGolayInterpolationFunctorTest.cxx
index 7520c8d..c1d14a0 100644
--- a/Testing/Code/MultiTemporal/otbEnvelopeSavitzkyGolayInterpolationFunctorTest.cxx
+++ b/Testing/Code/MultiTemporal/otbEnvelopeSavitzkyGolayInterpolationFunctorTest.cxx
@@ -21,7 +21,7 @@
 #include "otbEnvelopeSavitzkyGolayInterpolationFunctor.h"
 #include "otbTimeSeries.h"
 
-int otbEnvelopeSavitzkyGolayInterpolationFunctorTest(int argc, char* argv[])
+int otbEnvelopeSavitzkyGolayInterpolationFunctorTest(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
 
   typedef float PixelType;
diff --git a/Testing/Code/MultiTemporal/otbPolynomialTimeSeriesTest.cxx b/Testing/Code/MultiTemporal/otbPolynomialTimeSeriesTest.cxx
index 21bfd88..f16ec2b 100644
--- a/Testing/Code/MultiTemporal/otbPolynomialTimeSeriesTest.cxx
+++ b/Testing/Code/MultiTemporal/otbPolynomialTimeSeriesTest.cxx
@@ -20,7 +20,7 @@
 #include "itkFixedArray.h"
 #include "otbTimeSeries.h"
 
-int otbPolynomialTimeSeriesTest(int argc, char* argv[])
+int otbPolynomialTimeSeriesTest(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
 
   typedef double CoefficientPrecisionType;
diff --git a/Testing/Code/MultiTemporal/otbSavitzkyGolayInterpolationFunctorNew.cxx b/Testing/Code/MultiTemporal/otbSavitzkyGolayInterpolationFunctorNew.cxx
index e060070..7d8aec5 100644
--- a/Testing/Code/MultiTemporal/otbSavitzkyGolayInterpolationFunctorNew.cxx
+++ b/Testing/Code/MultiTemporal/otbSavitzkyGolayInterpolationFunctorNew.cxx
@@ -21,7 +21,7 @@
 #include "otbSavitzkyGolayInterpolationFunctor.h"
 #include "otbTimeSeries.h"
 
-int otbSavitzkyGolayInterpolationFunctorNew(int argc, char* argv[])
+int otbSavitzkyGolayInterpolationFunctorNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
 
   typedef float PixelType;
diff --git a/Testing/Code/MultiTemporal/otbSavitzkyGolayInterpolationFunctorTest.cxx b/Testing/Code/MultiTemporal/otbSavitzkyGolayInterpolationFunctorTest.cxx
index 0425ecf..87f6879 100644
--- a/Testing/Code/MultiTemporal/otbSavitzkyGolayInterpolationFunctorTest.cxx
+++ b/Testing/Code/MultiTemporal/otbSavitzkyGolayInterpolationFunctorTest.cxx
@@ -21,7 +21,7 @@
 #include "otbSavitzkyGolayInterpolationFunctor.h"
 #include "otbTimeSeries.h"
 
-int otbSavitzkyGolayInterpolationFunctorTest(int argc, char* argv[])
+int otbSavitzkyGolayInterpolationFunctorTest(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
 
   typedef float PixelType;
diff --git a/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorNew.cxx b/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorNew.cxx
index 6510e32..2113342 100644
--- a/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorNew.cxx
+++ b/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorNew.cxx
@@ -21,7 +21,7 @@
 #include "otbTimeSeriesLeastSquareFittingFunctor.h"
 #include "otbTimeSeries.h"
 
-int otbTimeSeriesLeastSquareFittingFunctorNew(int argc, char* argv[])
+int otbTimeSeriesLeastSquareFittingFunctorNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
 
   typedef float PixelType;
diff --git a/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorTest.cxx b/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorTest.cxx
index dc77e43..20826ab 100644
--- a/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorTest.cxx
+++ b/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorTest.cxx
@@ -21,7 +21,7 @@
 #include "otbTimeSeriesLeastSquareFittingFunctor.h"
 #include "otbTimeSeries.h"
 
-int otbTimeSeriesLeastSquareFittingFunctorTest(int argc, char* argv[])
+int otbTimeSeriesLeastSquareFittingFunctorTest(int itkNotUsed(argc), char* argv[])
 {
 
   const unsigned int Degree = 2;
diff --git a/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorWeightsTest.cxx b/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorWeightsTest.cxx
index 73bcebe..9d125b0 100644
--- a/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorWeightsTest.cxx
+++ b/Testing/Code/MultiTemporal/otbTimeSeriesLeastSquareFittingFunctorWeightsTest.cxx
@@ -21,7 +21,7 @@
 #include "otbTimeSeriesLeastSquareFittingFunctor.h"
 #include "otbTimeSeries.h"
 
-int otbTimeSeriesLeastSquareFittingFunctorWeightsTest(int argc, char* argv[])
+int otbTimeSeriesLeastSquareFittingFunctorWeightsTest(int itkNotUsed(argc), char* argv[])
 {
 
   const unsigned int Degree = 2;
diff --git a/Testing/Code/OBIA/otbAttributesMapLabelObjectNew.cxx b/Testing/Code/OBIA/otbAttributesMapLabelObjectNew.cxx
index f23c011..88e3887 100644
--- a/Testing/Code/OBIA/otbAttributesMapLabelObjectNew.cxx
+++ b/Testing/Code/OBIA/otbAttributesMapLabelObjectNew.cxx
@@ -19,7 +19,7 @@
 
 #include "otbAttributesMapLabelObject.h"
 
-int otbAttributesMapLabelObjectNew(int argc, char* argv[])
+int otbAttributesMapLabelObjectNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::AttributesMapLabelObject<unsigned short, 2, double> LabelObjectType;
 
diff --git a/Testing/Code/OBIA/otbAttributesMapLabelObjectWithClassLabelNew.cxx b/Testing/Code/OBIA/otbAttributesMapLabelObjectWithClassLabelNew.cxx
index 822d98b..d5ff95e 100644
--- a/Testing/Code/OBIA/otbAttributesMapLabelObjectWithClassLabelNew.cxx
+++ b/Testing/Code/OBIA/otbAttributesMapLabelObjectWithClassLabelNew.cxx
@@ -19,7 +19,7 @@
 
 #include "otbAttributesMapLabelObjectWithClassLabel.h"
 
-int otbAttributesMapLabelObjectWithClassLabelNew(int argc, char* argv[])
+int otbAttributesMapLabelObjectWithClassLabelNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::AttributesMapLabelObjectWithClassLabel<unsigned short, 2, double, unsigned short> LabelObjectType;
 
diff --git a/Testing/Code/OBIA/otbAttributesMapOpeningLabelMapFilterNew.cxx b/Testing/Code/OBIA/otbAttributesMapOpeningLabelMapFilterNew.cxx
index 9fc6221..09c60f8 100644
--- a/Testing/Code/OBIA/otbAttributesMapOpeningLabelMapFilterNew.cxx
+++ b/Testing/Code/OBIA/otbAttributesMapOpeningLabelMapFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkLabelMap.h"
 #include "otbAttributesMapOpeningLabelMapFilter.h"
 
-int otbAttributesMapOpeningLabelMapFilterNew(int argc, char* argv[])
+int otbAttributesMapOpeningLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::AttributesMapLabelObject<unsigned short, 2, double> LabelObjectType;
   typedef itk::LabelMap<LabelObjectType>                         LabelMapType;
diff --git a/Testing/Code/OBIA/otbBandsStatisticsAttributesLabelMapFilter.cxx b/Testing/Code/OBIA/otbBandsStatisticsAttributesLabelMapFilter.cxx
index d2fdb7a..3da6d95 100644
--- a/Testing/Code/OBIA/otbBandsStatisticsAttributesLabelMapFilter.cxx
+++ b/Testing/Code/OBIA/otbBandsStatisticsAttributesLabelMapFilter.cxx
@@ -45,13 +45,13 @@ typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType>
 typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType, VectorImageType> BandsStatisticsFilterType;
 
 
-int otbBandsStatisticsAttributesLabelMapFilterNew(int argc, char* argv[])
+int otbBandsStatisticsAttributesLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   BandsStatisticsFilterType::Pointer object = BandsStatisticsFilterType::New();
   return EXIT_SUCCESS;
 }
 
-int otbBandsStatisticsAttributesLabelMapFilter(int argc, char* argv[])
+int otbBandsStatisticsAttributesLabelMapFilter(int itkNotUsed(argc), char* argv[])
 {
   const char * infname  = argv[1];
   const char * lfname   = argv[2];
@@ -104,4 +104,3 @@ int otbBandsStatisticsAttributesLabelMapFilter(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/OBIA/otbGISTableToLabelMapFilterNew.cxx b/Testing/Code/OBIA/otbGISTableToLabelMapFilterNew.cxx
index 3c2116a..21bd73b 100644
--- a/Testing/Code/OBIA/otbGISTableToLabelMapFilterNew.cxx
+++ b/Testing/Code/OBIA/otbGISTableToLabelMapFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbGISTable.h"
 #include "itkAttributeLabelObject.h"
 
-int otbGISTableToLabelMapFilterNew(int argc, char * argv[])
+int otbGISTableToLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const int Dimension = 2;
   typedef double PType;
diff --git a/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilter.cxx b/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilter.cxx
index 901d150..475b532 100644
--- a/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilter.cxx
+++ b/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilter.cxx
@@ -24,17 +24,14 @@
 #include "otbImageFileReader.h"
 #include "otbAttributesMapLabelObjectWithClassLabel.h"
 
-int otbImageToLabelMapWithAttributesFilter(int argc, char* argv[])
+int otbImageToLabelMapWithAttributesFilter(int itkNotUsed(argc), char* argv[])
 {
   const char * infname = argv[1];
   const char * lfname  = argv[2];
 
   // Convenient typedefs
   typedef otb::VectorImage<double, 2>                           ImageType;
-  typedef ImageType::IndexType         IndexType;
-
   typedef otb::Image<unsigned int, 2>                           LabeledImageType;
-
   typedef otb::AttributesMapLabelObjectWithClassLabel<double, 2, double, double> LabelObjectType;
 
   typedef otb::ImageToLabelMapWithAttributesFilter<ImageType,
diff --git a/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilterNew.cxx b/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilterNew.cxx
index 2af952e..92a621b 100644
--- a/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilterNew.cxx
+++ b/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilterNew.cxx
@@ -24,7 +24,7 @@
 #include "itkLabelMap.h"
 #include "otbAttributesMapLabelObjectWithClassLabel.h"
 
-int otbImageToLabelMapWithAttributesFilterNew(int argc, char* argv[])
+int otbImageToLabelMapWithAttributesFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
 
   typedef otb::VectorImage<double, 2>                 ImageType;
diff --git a/Testing/Code/OBIA/otbKMeansAttributesLabelMapFilter.cxx b/Testing/Code/OBIA/otbKMeansAttributesLabelMapFilter.cxx
index 544a94a..b3def1e 100644
--- a/Testing/Code/OBIA/otbKMeansAttributesLabelMapFilter.cxx
+++ b/Testing/Code/OBIA/otbKMeansAttributesLabelMapFilter.cxx
@@ -48,13 +48,13 @@ typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType>
 typedef otb::ShapeAttributesLabelMapFilter<LabelMapType>                            ShapeFilterType;
 typedef otb::KMeansAttributesLabelMapFilter<LabelMapType>                           KMeansAttributesLabelMapFilterType;
 
-int otbKMeansAttributesLabelMapFilterNew(int argc, char * argv[])
+int otbKMeansAttributesLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   KMeansAttributesLabelMapFilterType::Pointer radiometricLabelMapFilter = KMeansAttributesLabelMapFilterType::New();
   return EXIT_SUCCESS;
 }
 
-int otbKMeansAttributesLabelMapFilter(int argc, char * argv[])
+int otbKMeansAttributesLabelMapFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * lfname  = argv[2];
diff --git a/Testing/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.cxx b/Testing/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.cxx
index 4cb9e4e..9c3c1c5 100644
--- a/Testing/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.cxx
+++ b/Testing/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.cxx
@@ -36,7 +36,7 @@ typedef otb::LabelImageToLabelMapWithAdjacencyFilter
 < LabelImageType, LabelMapType>                     FilterType;
 
 
-int otbLabelImageToLabelMapWithAdjacencyFilterNew(int argc, char * argv[])
+int otbLabelImageToLabelMapWithAdjacencyFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   // Instantiation
   FilterType::Pointer filter = FilterType::New();
@@ -44,7 +44,7 @@ int otbLabelImageToLabelMapWithAdjacencyFilterNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbLabelImageToLabelMapWithAdjacencyFilter(int argc, char * argv[])
+int otbLabelImageToLabelMapWithAdjacencyFilter(int itkNotUsed(argc), char * argv[])
 {
   LabelReaderType::Pointer reader = LabelReaderType::New();
   reader->SetFileName(argv[1]);
diff --git a/Testing/Code/OBIA/otbLabelMapSVMClassifier.cxx b/Testing/Code/OBIA/otbLabelMapSVMClassifier.cxx
index 3eaafae..a8b42be 100644
--- a/Testing/Code/OBIA/otbLabelMapSVMClassifier.cxx
+++ b/Testing/Code/OBIA/otbLabelMapSVMClassifier.cxx
@@ -76,13 +76,13 @@ LabelObjectType::Pointer makeTrainingSample(LabelMapType* labelMap, LabelType la
   return newLabelObject;
 }
 
-int otbLabelMapSVMClassifierNew(int argc, char * argv[])
+int otbLabelMapSVMClassifierNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   ClassifierType::Pointer classifier = ClassifierType::New();
   return EXIT_SUCCESS;
 }
 
-int otbLabelMapSVMClassifier(int argc, char * argv[])
+int otbLabelMapSVMClassifier(int itkNotUsed(argc), char * argv[])
 {
   const char * infname  = argv[1];
   const char * lfname   = argv[2];
@@ -176,5 +176,3 @@ int otbLabelMapSVMClassifier(int argc, char * argv[])
 
   return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/OBIA/otbLabelMapSourceNew.cxx b/Testing/Code/OBIA/otbLabelMapSourceNew.cxx
index 7dfc261..0cc7505 100644
--- a/Testing/Code/OBIA/otbLabelMapSourceNew.cxx
+++ b/Testing/Code/OBIA/otbLabelMapSourceNew.cxx
@@ -21,7 +21,7 @@
 #include "itkLabelMap.h"
 #include "otbAttributesMapLabelObject.h"
 
-int otbLabelMapSourceNew(int argc, char * argv[])
+int otbLabelMapSourceNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef unsigned short LabelType;
diff --git a/Testing/Code/OBIA/otbLabelMapToAttributeImageFilterNew.cxx b/Testing/Code/OBIA/otbLabelMapToAttributeImageFilterNew.cxx
index 1e08547..36a421e 100644
--- a/Testing/Code/OBIA/otbLabelMapToAttributeImageFilterNew.cxx
+++ b/Testing/Code/OBIA/otbLabelMapToAttributeImageFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkLabelMap.h"
 #include "otbVectorImage.h"
 
-int otbLabelMapToAttributeImageFilterNew(int argc, char* argv[])
+int otbLabelMapToAttributeImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::AttributesMapLabelObject<unsigned int, 2, float> LabelObjectType;
   typedef itk::LabelMap<LabelObjectType>                        LabelMapType;
diff --git a/Testing/Code/OBIA/otbLabelMapToGISTableFilterNew.cxx b/Testing/Code/OBIA/otbLabelMapToGISTableFilterNew.cxx
index 9de03dd..84a42e1 100644
--- a/Testing/Code/OBIA/otbLabelMapToGISTableFilterNew.cxx
+++ b/Testing/Code/OBIA/otbLabelMapToGISTableFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbGISTable.h"
 #include "itkAttributeLabelObject.h"
 
-int otbLabelMapToGISTableFilterNew(int argc, char * argv[])
+int otbLabelMapToGISTableFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const int Dimension = 2;
   typedef unsigned char PType;
diff --git a/Testing/Code/OBIA/otbLabelMapToSampleListFilterNew.cxx b/Testing/Code/OBIA/otbLabelMapToSampleListFilterNew.cxx
index 850a5d2..a1db87e 100644
--- a/Testing/Code/OBIA/otbLabelMapToSampleListFilterNew.cxx
+++ b/Testing/Code/OBIA/otbLabelMapToSampleListFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "itkVariableLengthVector.h"
 #include "itkListSample.h"
 
-int otbLabelMapToSampleListFilterNew(int argc, char* argv[])
+int otbLabelMapToSampleListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::AttributesMapLabelObject<unsigned short, 2, double> LabelObjectType;
   typedef itk::LabelMap<LabelObjectType>                         LabelMapType;
diff --git a/Testing/Code/OBIA/otbLabelMapToVectorDataFilter.cxx b/Testing/Code/OBIA/otbLabelMapToVectorDataFilter.cxx
index 0510c32..7d03ea5 100644
--- a/Testing/Code/OBIA/otbLabelMapToVectorDataFilter.cxx
+++ b/Testing/Code/OBIA/otbLabelMapToVectorDataFilter.cxx
@@ -51,10 +51,7 @@ int otbLabelMapToVectorDataFilter(int argc, char * argv[])
   typedef otb::AttributesMapLabelObject<LabelType, Dimension, double>             LabelObjectType;
   typedef itk::LabelMap<LabelObjectType>                                          LabelMapType;
   typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType>         LabelMapFilterType;
-  typedef otb::Polygon<double>                                                    PolygonType;
-  typedef otb::Functor::LabelObjectToPolygonFunctor<LabelObjectType, PolygonType> FunctorType;
   typedef otb::VectorData<double, 2>                                              VectorDataType;
-  typedef VectorDataType::DataNodeType                                            DataNodeType;
   typedef otb::VectorDataFileWriter<VectorDataType>                               WriterType;
   typedef otb::VectorDataProjectionFilter<VectorDataType, VectorDataType>         VectorDataFilterType;
 
diff --git a/Testing/Code/OBIA/otbLabelMapToVectorDataFilterNew.cxx b/Testing/Code/OBIA/otbLabelMapToVectorDataFilterNew.cxx
index b8af494..9161b7e 100644
--- a/Testing/Code/OBIA/otbLabelMapToVectorDataFilterNew.cxx
+++ b/Testing/Code/OBIA/otbLabelMapToVectorDataFilterNew.cxx
@@ -20,11 +20,9 @@
 #include "otbVectorData.h"
 #include "itkAttributeLabelObject.h"
 
-int otbLabelMapToVectorDataFilterNew(int argc, char * argv[])
+int otbLabelMapToVectorDataFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const int dim = 2;
-  typedef unsigned char PType;
-
   typedef otb::VectorData<> VectorDataType;
 
   typedef itk::AttributeLabelObject<unsigned long, dim, double> LabelObjectType;
diff --git a/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilterNew.cxx b/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilterNew.cxx
index 3a8fc86..358637d 100644
--- a/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilterNew.cxx
+++ b/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "itkVariableLengthVector.h"
 #include "itkListSample.h"
 
-int otbLabelMapWithClassLabelToLabeledSampleListFilterNew(int argc, char* argv[])
+int otbLabelMapWithClassLabelToLabeledSampleListFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::AttributesMapLabelObjectWithClassLabel
     <unsigned short, 2, double, unsigned short>                     LabelObjectType;
diff --git a/Testing/Code/OBIA/otbLabelObjectToPolygonFunctorNew.cxx b/Testing/Code/OBIA/otbLabelObjectToPolygonFunctorNew.cxx
index 0774442..25797f5 100644
--- a/Testing/Code/OBIA/otbLabelObjectToPolygonFunctorNew.cxx
+++ b/Testing/Code/OBIA/otbLabelObjectToPolygonFunctorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbAttributesMapLabelObject.h"
 #include <cstdlib>
 
-int otbLabelObjectToPolygonFunctorNew(int argc, char * argv[])
+int otbLabelObjectToPolygonFunctorNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef unsigned short LabelType;
diff --git a/Testing/Code/OBIA/otbMeanShiftConnectedComponentSegmentationFilterTest.cxx b/Testing/Code/OBIA/otbMeanShiftConnectedComponentSegmentationFilterTest.cxx
index afbb4f0..f538e27 100644
--- a/Testing/Code/OBIA/otbMeanShiftConnectedComponentSegmentationFilterTest.cxx
+++ b/Testing/Code/OBIA/otbMeanShiftConnectedComponentSegmentationFilterTest.cxx
@@ -40,7 +40,7 @@ typedef otb::MeanShiftConnectedComponentSegmentationFilter
 typedef otb::MeanShiftSmoothingImageFilter<ImageType, ImageType> MeanShiftFilterType;
 
 
-int otbMeanShiftConnectedComponentSegmentationFilter(int argc, char * argv[])
+int otbMeanShiftConnectedComponentSegmentationFilter(int itkNotUsed(argc), char * argv[])
 {
 
   /* mean shift parameters */
diff --git a/Testing/Code/OBIA/otbMeanShiftStreamingConnectedComponentOBIATest.cxx b/Testing/Code/OBIA/otbMeanShiftStreamingConnectedComponentOBIATest.cxx
index 6f6fff2..9d2d1fa 100644
--- a/Testing/Code/OBIA/otbMeanShiftStreamingConnectedComponentOBIATest.cxx
+++ b/Testing/Code/OBIA/otbMeanShiftStreamingConnectedComponentOBIATest.cxx
@@ -50,7 +50,7 @@ typedef otb::StreamingConnectedComponentSegmentationOBIAToVectorDataFilter
 typedef otb::MeanShiftSmoothingImageFilter<ImageType, ImageType> MeanShiftFilterType;
 
 
-int otbMeanShiftStreamingConnectedComponentSegmentationOBIAToVectorDataFilter(int argc, char * argv[])
+int otbMeanShiftStreamingConnectedComponentSegmentationOBIAToVectorDataFilter(int itkNotUsed(argc), char * argv[])
 {
 
   /* mean shift parameters */
diff --git a/Testing/Code/OBIA/otbMinMaxAttributesLabelMapFilter.cxx b/Testing/Code/OBIA/otbMinMaxAttributesLabelMapFilter.cxx
index fbe6361..e18b15e 100644
--- a/Testing/Code/OBIA/otbMinMaxAttributesLabelMapFilter.cxx
+++ b/Testing/Code/OBIA/otbMinMaxAttributesLabelMapFilter.cxx
@@ -43,13 +43,13 @@ typedef otb::LabelImageToLabelMapWithAdjacencyFilter<LabeledImageType, LabelMapT
 typedef otb::ShapeAttributesLabelMapFilter<LabelMapType>                        ShapeFilterType;
 typedef otb::MinMaxAttributesLabelMapFilter<LabelMapType>                       MinMaxAttributesLabelMapFilterType;
 
-int otbMinMaxAttributesLabelMapFilterNew(int argc, char * argv[])
+int otbMinMaxAttributesLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   MinMaxAttributesLabelMapFilterType::Pointer radiometricLabelMapFilter = MinMaxAttributesLabelMapFilterType::New();
   return EXIT_SUCCESS;
 }
 
-int otbMinMaxAttributesLabelMapFilter(int argc, char * argv[])
+int otbMinMaxAttributesLabelMapFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * lfname  = argv[2];
diff --git a/Testing/Code/OBIA/otbNormalizeAttributesLabelMapFilter.cxx b/Testing/Code/OBIA/otbNormalizeAttributesLabelMapFilter.cxx
index 62cb5a5..7f9de29 100644
--- a/Testing/Code/OBIA/otbNormalizeAttributesLabelMapFilter.cxx
+++ b/Testing/Code/OBIA/otbNormalizeAttributesLabelMapFilter.cxx
@@ -45,13 +45,13 @@ typedef otb::ShapeAttributesLabelMapFilter<LabelMapType>
 typedef otb::MinMaxAttributesLabelMapFilter<LabelMapType>                       MinMaxAttributesLabelMapFilterType;
 typedef otb::NormalizeAttributesLabelMapFilter<LabelMapType>                    NormalizeAttributesLabelMapFilterType;
 
-int otbNormalizeAttributesLabelMapFilterNew(int argc, char * argv[])
+int otbNormalizeAttributesLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   NormalizeAttributesLabelMapFilterType::Pointer normalizeLabelMapFilter = NormalizeAttributesLabelMapFilterType::New();
   return EXIT_SUCCESS;
 }
 
-int otbNormalizeAttributesLabelMapFilter(int argc, char * argv[])
+int otbNormalizeAttributesLabelMapFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * infname  = argv[1];
   const char * lfname   = argv[2];
diff --git a/Testing/Code/OBIA/otbShapeAttributesLabelMapFilterNew.cxx b/Testing/Code/OBIA/otbShapeAttributesLabelMapFilterNew.cxx
index 8245fd2..821d620 100644
--- a/Testing/Code/OBIA/otbShapeAttributesLabelMapFilterNew.cxx
+++ b/Testing/Code/OBIA/otbShapeAttributesLabelMapFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkLabelMap.h"
 #include "otbShapeAttributesLabelMapFilter.h"
 
-int otbShapeAttributesLabelMapFilterNew(int argc, char* argv[])
+int otbShapeAttributesLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::AttributesMapLabelObject<unsigned short, 2, double> LabelObjectType;
   typedef itk::LabelMap<LabelObjectType>                         LabelMapType;
diff --git a/Testing/Code/OBIA/otbStatisticsAttributesLabelMapFilterNew.cxx b/Testing/Code/OBIA/otbStatisticsAttributesLabelMapFilterNew.cxx
index 393f78e..cb384d0 100644
--- a/Testing/Code/OBIA/otbStatisticsAttributesLabelMapFilterNew.cxx
+++ b/Testing/Code/OBIA/otbStatisticsAttributesLabelMapFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbStatisticsAttributesLabelMapFilter.h"
 #include "otbImage.h"
 
-int otbStatisticsAttributesLabelMapFilterNew(int argc, char* argv[])
+int otbStatisticsAttributesLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Image<double, 2>                                   ImageType;
   typedef otb::AttributesMapLabelObject<unsigned short, 2, double> LabelObjectType;
diff --git a/Testing/Code/OBIA/otbStreamingConnectedComponentOBIATest.cxx b/Testing/Code/OBIA/otbStreamingConnectedComponentOBIATest.cxx
index 20756c9..012cba1 100644
--- a/Testing/Code/OBIA/otbStreamingConnectedComponentOBIATest.cxx
+++ b/Testing/Code/OBIA/otbStreamingConnectedComponentOBIATest.cxx
@@ -40,7 +40,7 @@ typedef otb::StreamingConnectedComponentSegmentationOBIAToVectorDataFilter
     MaskImageType,
     VectorDataType >  ConnectedComponentSegmentationOBIAToVectorDataFilterType;
 
-int otbStreamingConnectedComponentSegmentationOBIAToVectorDataFilterNew(int argc, char * argv[])
+int otbStreamingConnectedComponentSegmentationOBIAToVectorDataFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   ConnectedComponentSegmentationOBIAToVectorDataFilterType::FilterType::Pointer connected
     = ConnectedComponentSegmentationOBIAToVectorDataFilterType::FilterType::New();
@@ -49,7 +49,7 @@ int otbStreamingConnectedComponentSegmentationOBIAToVectorDataFilterNew(int argc
   return EXIT_SUCCESS;
 }
 
-int otbStreamingConnectedComponentSegmentationOBIAToVectorDataFilter(int argc, char * argv[])
+int otbStreamingConnectedComponentSegmentationOBIAToVectorDataFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename          = argv[1];
   const char * outputFilename         = argv[2];
diff --git a/Testing/Code/OBIA/otbVectorDataToLabelMapFilter.cxx b/Testing/Code/OBIA/otbVectorDataToLabelMapFilter.cxx
index 7a8b93f..7101a71 100644
--- a/Testing/Code/OBIA/otbVectorDataToLabelMapFilter.cxx
+++ b/Testing/Code/OBIA/otbVectorDataToLabelMapFilter.cxx
@@ -79,9 +79,6 @@ int otbVectorDataToLabelMapFilter(int argc, char * argv[])
   p->SetVectorDataObject(reader->GetOutput());
   typedef VectorDataType::DataNodeType::PolygonType::RegionType RegionType;
   RegionType region;
-  typedef RegionType::IndexType index;
-  typedef RegionType::SizeType  size;
-
   p->SetBoundingRegion(region);
 
   //Compute the global bounding box of the vectordata
diff --git a/Testing/Code/OBIA/otbVectorDataToLabelMapFilterNew.cxx b/Testing/Code/OBIA/otbVectorDataToLabelMapFilterNew.cxx
index 1408a46..81df72f 100644
--- a/Testing/Code/OBIA/otbVectorDataToLabelMapFilterNew.cxx
+++ b/Testing/Code/OBIA/otbVectorDataToLabelMapFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbVectorDataToLabelMapFilter.h"
 #include "otbAttributesMapLabelObject.h"
 
-int otbVectorDataToLabelMapFilterNew(int argc, char * argv[])
+int otbVectorDataToLabelMapFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef unsigned short LabelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.cxx b/Testing/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.cxx
index 99472ab..5762392 100644
--- a/Testing/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.cxx
+++ b/Testing/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.cxx
@@ -22,7 +22,7 @@
 #include "otbVectorDataFileWriter.h"
 #include "otbLabeledSampleLocalizationGenerator.h"
 
-int otbLabeledSampleLocalizationGeneratorNew(int argc, char* argv[])
+int otbLabeledSampleLocalizationGeneratorNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   typedef otb::VectorData<>                                        VectorDataType;
   typedef otb::LabeledSampleLocalizationGenerator<VectorDataType>  GeneratorType;
@@ -35,7 +35,7 @@ int otbLabeledSampleLocalizationGeneratorNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbLabeledSampleLocalizationGenerator(int argc, char* argv[])
+int otbLabeledSampleLocalizationGenerator(int itkNotUsed(argc), char* argv[])
 {
   const char * inputVD1  = argv[1];
   const char * inputVD2  = argv[2];
diff --git a/Testing/Code/ObjectDetection/otbStandardMetaImageFunctionBuilder.cxx b/Testing/Code/ObjectDetection/otbStandardMetaImageFunctionBuilder.cxx
index 3f7c4fa..c33e4d5 100644
--- a/Testing/Code/ObjectDetection/otbStandardMetaImageFunctionBuilder.cxx
+++ b/Testing/Code/ObjectDetection/otbStandardMetaImageFunctionBuilder.cxx
@@ -30,7 +30,7 @@
 #include "otbHaralickTexturesImageFunction.h"
 
 
-int otbStandardMetaImageFunctionBuilderNew(int argc, char* argv[])
+int otbStandardMetaImageFunctionBuilderNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   typedef double                                                PrecisionType;
   typedef otb::StandardMetaImageFunctionBuilder<PrecisionType>  BuilderType;
@@ -43,7 +43,7 @@ int otbStandardMetaImageFunctionBuilderNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbStandardMetaImageFunctionBuilder(int argc, char* argv[])
+int otbStandardMetaImageFunctionBuilder(int itkNotUsed(argc), char* argv[])
 {
   const char * inputFilename  = argv[1];
 
@@ -67,16 +67,9 @@ int otbStandardMetaImageFunctionBuilder(int argc, char* argv[])
 
   typedef otb::RadiometricMomentsImageFunction<ImageType, CoordRepType>  RadiometricMomentsIF;
   typedef otb::ImageFunctionAdaptor<RadiometricMomentsIF, PrecisionType>                AdaptedRadiometricMomentsIF;
-
   typedef otb::FourierMellinDescriptorsImageFunction<ImageType, CoordRepType>  FourierMellinDescriptorsIF;
   typedef otb::ImageFunctionAdaptor<FourierMellinDescriptorsIF, PrecisionType> AdaptedFourierMellinDescriptorsIF;
 
-  typedef otb::FlusserMomentsImageFunction<ImageType, CoordRepType>  LocalHistogramIF;
-  typedef otb::ImageFunctionAdaptor<LocalHistogramIF, PrecisionType>   AdaptedLocalHistogramIF;
-
-  typedef otb::HaralickTexturesImageFunction<ImageType, CoordRepType>  HaralickTexturesIF;
-  typedef otb::ImageFunctionAdaptor<HaralickTexturesIF, PrecisionType> AdaptedHaralickTexturesIF;
-
   p1.push_back(7);
   p1.push_back(128);
   p1.push_back(0);
diff --git a/Testing/Code/Projections/CMakeLists.txt b/Testing/Code/Projections/CMakeLists.txt
index 088dbd3..418d61b 100644
--- a/Testing/Code/Projections/CMakeLists.txt
+++ b/Testing/Code/Projections/CMakeLists.txt
@@ -121,7 +121,7 @@ add_test(prTvSensorModelPleiades-PRE-TIFF ${PROJECTIONS_TESTS1}
 )
 
 add_test(prTvSensorModelPleiades-JP2 ${PROJECTIONS_TESTS1}
-  --ignore-order --compare-ascii ${NOTOL}
+  --ignore-order --compare-ascii ${EPSILON_9}
          ${BASELINE_FILES}/prTvSensorModelPleiades.txt
          ${TEMP}/prTvSensorModelPleiades_OUT.txt
          --ignore-lines-with 2 meters_per_pixel_x meters_per_pixel_y
@@ -386,7 +386,7 @@ add_test(prTvOrthoRectificationSPOT5 ${PROJECTIONS_TESTS2}
         -5
         39
         N
-        5
+        50
         )
 
  add_test(prTvOrthoRectificationMonoThreadSPOT5 ${PROJECTIONS_TESTS2}
@@ -403,7 +403,7 @@ add_test(prTvOrthoRectificationSPOT5 ${PROJECTIONS_TESTS2}
         -5
         39
         N
-        5
+        50
         )
 endif()
 
@@ -1376,7 +1376,7 @@ add_test(prTvGeometriesProjectionFilterFromMapToSensor ${PROJECTIONS_TESTS3}
 endif()
 
 add_test(prTvVectorDataProjectionFilterFromMapToGeo ${PROJECTIONS_TESTS3}
-        --compare-ascii ${NOTOL}
+        --compare-ogr ${NOTOL}
         ${BASELINE_FILES}/prTvVectorDataProjectionFilterFromMapToGeo.kml
         ${TEMP}/prTvVectorDataProjectionFilterFromMapToGeo.kml
         otbVectorDataProjectionFilterFromMapToGeo
@@ -1385,7 +1385,7 @@ add_test(prTvVectorDataProjectionFilterFromMapToGeo ${PROJECTIONS_TESTS3}
 )
 
 add_test(prTvGeometriesProjectionFilterFromMapToGeo ${PROJECTIONS_TESTS3}
-        --compare-ascii ${NOTOL}
+        --compare-ogr ${NOTOL}
         ${BASELINE_FILES}/prTvVectorDataProjectionFilterFromMapToGeo.kml
         ${TEMP}/prTvGeometriesProjectionFilterFromMapToGeo.kml
         otbGeometriesProjectionFilterFromMapToGeo
@@ -1682,7 +1682,7 @@ otbImageToEnvelopeVectorDataFilterNew)
 
 if(OTB_DATA_USE_LARGEINPUT)
 add_test(prTvImageToEnvelopeVectorDataFilter ${PROJECTIONS_TESTS4}
---compare-ascii ${EPSILON_6}
+--compare-ogr ${EPSILON_6}
   ${BASELINE_FILES}/prTvImageToEnvelopeVectorDataFilterOutput.kml
   ${TEMP}/prTvImageToEnvelopeVectorDataFilterOutput.kml
   otbImageToEnvelopeVectorDataFilter
diff --git a/Testing/Code/Projections/otbCompositeTransformNew.cxx b/Testing/Code/Projections/otbCompositeTransformNew.cxx
index 7daf313..e51f1d4 100644
--- a/Testing/Code/Projections/otbCompositeTransformNew.cxx
+++ b/Testing/Code/Projections/otbCompositeTransformNew.cxx
@@ -24,7 +24,7 @@
 #include "otbMapProjections.h"
 #include "otbInverseSensorModel.h"
 
-int otbCompositeTransformNew(int argc, char* argv[])
+int otbCompositeTransformNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::UtmInverseProjection       MapProjectionType;
   typedef otb::InverseSensorModel<double> SensorModelType;
diff --git a/Testing/Code/Projections/otbForwardBackwardProjectionConsistency.cxx b/Testing/Code/Projections/otbForwardBackwardProjectionConsistency.cxx
index 39ab83f..ec9af33 100644
--- a/Testing/Code/Projections/otbForwardBackwardProjectionConsistency.cxx
+++ b/Testing/Code/Projections/otbForwardBackwardProjectionConsistency.cxx
@@ -33,7 +33,7 @@ typedef TransformType::InputPointType     PointType;
 typedef itk::Statistics::EuclideanDistanceMetric<ImageType::PointType> DistanceType;
 typedef itk::Statistics::MersenneTwisterRandomVariateGenerator   RandomGeneratorType;
 
-int otbForwardBackwardProjectionConsistency(int argc, char* argv[])
+int otbForwardBackwardProjectionConsistency(int itkNotUsed(argc), char* argv[])
 {
   std::string infname   = argv[1];
   std::string demDir    = argv[2];
diff --git a/Testing/Code/Projections/otbGCPsToRPCSensorModelImageFilterCheckRpcModel.cxx b/Testing/Code/Projections/otbGCPsToRPCSensorModelImageFilterCheckRpcModel.cxx
index 4c24414..fb42be8 100644
--- a/Testing/Code/Projections/otbGCPsToRPCSensorModelImageFilterCheckRpcModel.cxx
+++ b/Testing/Code/Projections/otbGCPsToRPCSensorModelImageFilterCheckRpcModel.cxx
@@ -23,7 +23,7 @@
 #include "otbGenericRSTransform.h"
 #include "otbGeographicalDistance.h"
 
-int otbGCPsToRPCSensorModelImageFilterCheckRpcModel(int argc, char* argv[])
+int otbGCPsToRPCSensorModelImageFilterCheckRpcModel(int argc, char * argv[])
 {
   // Set command line arguments
   typedef otb::CommandLineArgumentParser ParserType;
diff --git a/Testing/Code/Projections/otbGCPsToRPCSensorModelImageFilterNew.cxx b/Testing/Code/Projections/otbGCPsToRPCSensorModelImageFilterNew.cxx
index 2851520..4af1d3e 100644
--- a/Testing/Code/Projections/otbGCPsToRPCSensorModelImageFilterNew.cxx
+++ b/Testing/Code/Projections/otbGCPsToRPCSensorModelImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImage.h"
 #include "otbGCPsToRPCSensorModelImageFilter.h"
 
-int otbGCPsToRPCSensorModelImageFilterNew(int argc, char* argv[])
+int otbGCPsToRPCSensorModelImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Image<float, 2>                            ImageType;
   typedef otb::GCPsToRPCSensorModelImageFilter<ImageType> GCPToSensorModelFilterType;
diff --git a/Testing/Code/Projections/otbGenericMapProjection.cxx b/Testing/Code/Projections/otbGenericMapProjection.cxx
index 8ee5817..8d80226 100644
--- a/Testing/Code/Projections/otbGenericMapProjection.cxx
+++ b/Testing/Code/Projections/otbGenericMapProjection.cxx
@@ -21,7 +21,7 @@
 
 #include "otbGenericMapProjection.h"
 
-int otbGenericMapProjection(int argc, char* argv[])
+int otbGenericMapProjection(int itkNotUsed(argc), char* argv[])
 {
   const char *  outFileName = argv[1];
   std::ofstream file;
diff --git a/Testing/Code/Projections/otbGenericMapProjectionNew.cxx b/Testing/Code/Projections/otbGenericMapProjectionNew.cxx
index de8bdad..02de3d7 100644
--- a/Testing/Code/Projections/otbGenericMapProjectionNew.cxx
+++ b/Testing/Code/Projections/otbGenericMapProjectionNew.cxx
@@ -22,7 +22,7 @@
 
 #include "otbGenericMapProjection.h"
 
-int otbGenericMapProjectionNew(int argc, char* argv[])
+int otbGenericMapProjectionNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
 
   typedef otb::GenericMapProjection<otb::TransformDirection::FORWARD> MapProjectionType;
diff --git a/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx b/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx
index ea2512e..160c74a 100644
--- a/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx
+++ b/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx
@@ -41,7 +41,7 @@ typedef ImageResamplerType::SpacingType             SpacingType;
 typedef otb::ImageFileReader<ImageType>             ReaderType;
 typedef otb::ImageFileWriter<ImageType>    WriterType;
 
-int otbGenericRSResampleImageFilterNew(int argc, char* argv[])
+int otbGenericRSResampleImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   // SmartPointer instanciation
   ImageResamplerType::Pointer resampler = ImageResamplerType::New();
@@ -49,7 +49,7 @@ int otbGenericRSResampleImageFilterNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbGenericRSResampleImageFilter(int argc, char* argv[])
+int otbGenericRSResampleImageFilter(int itkNotUsed(argc), char* argv[])
 {
 
   // SmartPointer instanciation
@@ -132,7 +132,7 @@ int otbGenericRSResampleImageFilter(int argc, char* argv[])
 }
 
 
-int otbGenericRSResampleImageFilterFromMap(int argc, char* argv[])
+int otbGenericRSResampleImageFilterFromMap(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::MultiChannelExtractROI<PixelType, PixelType>  ExtractROIType;
 
@@ -205,4 +205,3 @@ int otbGenericRSResampleImageFilterFromMap(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/Projections/otbGenericRSTransform.cxx b/Testing/Code/Projections/otbGenericRSTransform.cxx
index b6feb6e..44bd55b 100644
--- a/Testing/Code/Projections/otbGenericRSTransform.cxx
+++ b/Testing/Code/Projections/otbGenericRSTransform.cxx
@@ -23,7 +23,7 @@
 #include "otbGenericRSTransform.h"
 #include <ogr_spatialref.h>
 
-int otbGenericRSTransform(int argc, char* argv[])
+int otbGenericRSTransform(int itkNotUsed(argc), char* argv[])
 {
   OGRSpatialReference oSRS;
 
diff --git a/Testing/Code/Projections/otbGenericRSTransformFromImage.cxx b/Testing/Code/Projections/otbGenericRSTransformFromImage.cxx
index 6d052ab..2afa82d 100644
--- a/Testing/Code/Projections/otbGenericRSTransformFromImage.cxx
+++ b/Testing/Code/Projections/otbGenericRSTransformFromImage.cxx
@@ -41,7 +41,7 @@ typedef itk::Statistics::EuclideanDistanceMetric<Point3DType> Distance3DType;
 typedef otb::GeographicalDistance<ImageType::PointType>          GeoDistanceType;
 typedef otb::GeographicalDistance<Point3DType>          GeoDistance3DType;
 
-int otbGenericRSTransformFromImage(int argc, char* argv[])
+int otbGenericRSTransformFromImage(int itkNotUsed(argc), char* argv[])
 {
   /*
    * This test checks if we can instanciate a GenericRSTransform from the image information
@@ -76,7 +76,7 @@ int otbGenericRSTransformFromImage(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbGenericRSTransformImageAndMNTToWGS84ConversionChecking(int argc, char* argv[])
+int otbGenericRSTransformImageAndMNTToWGS84ConversionChecking(int itkNotUsed(argc), char* argv[])
 {
   std::string infname = argv[1];
   std::string demdir = argv[2];
diff --git a/Testing/Code/Projections/otbGenericRSTransformGenericConversionCheckingFromGCP.cxx b/Testing/Code/Projections/otbGenericRSTransformGenericConversionCheckingFromGCP.cxx
index 66b339c..46052e8 100644
--- a/Testing/Code/Projections/otbGenericRSTransformGenericConversionCheckingFromGCP.cxx
+++ b/Testing/Code/Projections/otbGenericRSTransformGenericConversionCheckingFromGCP.cxx
@@ -33,7 +33,7 @@ typedef TransformType::InputPointType     PointType;
 typedef itk::Statistics::EuclideanDistanceMetric<ImageType::PointType> DistanceType;
 typedef otb::GeographicalDistance<ImageType::PointType>          GeoDistanceType;
 
-int otbGenericRSTransformGenericConversionCheckingFromGCP(int argc, char* argv[])
+int otbGenericRSTransformGenericConversionCheckingFromGCP(int itkNotUsed(argc), char* argv[])
 {
   std::string infname   = argv[1];
   std::string demDir    = argv[2];
diff --git a/Testing/Code/Projections/otbGenericRSTransformNew.cxx b/Testing/Code/Projections/otbGenericRSTransformNew.cxx
index 617e8dd..7046a7c 100644
--- a/Testing/Code/Projections/otbGenericRSTransformNew.cxx
+++ b/Testing/Code/Projections/otbGenericRSTransformNew.cxx
@@ -22,7 +22,7 @@
 
 #include "otbGenericRSTransform.h"
 
-int otbGenericRSTransformNew(int argc, char* argv[])
+int otbGenericRSTransformNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
 
   typedef otb::GenericRSTransform<> TransformType;
diff --git a/Testing/Code/Projections/otbGenericRSTransformWithSRID.cxx b/Testing/Code/Projections/otbGenericRSTransformWithSRID.cxx
index c85db29..811e32d 100644
--- a/Testing/Code/Projections/otbGenericRSTransformWithSRID.cxx
+++ b/Testing/Code/Projections/otbGenericRSTransformWithSRID.cxx
@@ -28,7 +28,7 @@
   * except using the SRID to build the wkt.
   */
 
-int otbGenericRSTransformWithSRID(int argc, char* argv[])
+int otbGenericRSTransformWithSRID(int itkNotUsed(argc), char* argv[])
 {
   OGRSpatialReference oSRS;
 
diff --git a/Testing/Code/Projections/otbGeocentricTransform.cxx b/Testing/Code/Projections/otbGeocentricTransform.cxx
index 59278fc..849d2fa 100644
--- a/Testing/Code/Projections/otbGeocentricTransform.cxx
+++ b/Testing/Code/Projections/otbGeocentricTransform.cxx
@@ -24,7 +24,7 @@
 #include "otbImage.h"
 #include "otbGeocentricTransform.h"
 
-int otbGeocentricTransform(int argc, char* argv[])
+int otbGeocentricTransform(int itkNotUsed(argc), char* argv[])
 {
   const char *  outFileName = argv[1];
   std::ofstream file;
diff --git a/Testing/Code/Projections/otbGeocentricTransformNew.cxx b/Testing/Code/Projections/otbGeocentricTransformNew.cxx
index 5b26492..cbc7736 100644
--- a/Testing/Code/Projections/otbGeocentricTransformNew.cxx
+++ b/Testing/Code/Projections/otbGeocentricTransformNew.cxx
@@ -21,7 +21,7 @@
 #include "otbImage.h"
 #include "otbGeocentricTransform.h"
 
-int otbGeocentricTransformNew(int argc, char* argv[])
+int otbGeocentricTransformNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
 
   typedef otb::GeocentricTransform<otb::TransformDirection::FORWARD> ProjectionType;
diff --git a/Testing/Code/Projections/otbGeographicalDistance.cxx b/Testing/Code/Projections/otbGeographicalDistance.cxx
index f31f9dd..2d2206f 100644
--- a/Testing/Code/Projections/otbGeographicalDistance.cxx
+++ b/Testing/Code/Projections/otbGeographicalDistance.cxx
@@ -18,7 +18,7 @@
 #include "itkPoint.h"
 #include "otbGeographicalDistance.h"
 
-int otbGeographicalDistanceNew(int argc, char * argv[])
+int otbGeographicalDistanceNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef itk::Point<double, 2> PointType;
   typedef otb::GeographicalDistance<PointType> DistanceType;
@@ -29,7 +29,7 @@ int otbGeographicalDistanceNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbGeographicalDistance(int argc, char * argv[])
+int otbGeographicalDistance(int itkNotUsed(argc), char * argv[])
 {
   typedef itk::Point<double, 2> PointType;
   typedef otb::GeographicalDistance<PointType> GeoDistanceType;
diff --git a/Testing/Code/Projections/otbImageToEnvelopeVectorDataFilter.cxx b/Testing/Code/Projections/otbImageToEnvelopeVectorDataFilter.cxx
index 3d11669..a7a9fb5 100644
--- a/Testing/Code/Projections/otbImageToEnvelopeVectorDataFilter.cxx
+++ b/Testing/Code/Projections/otbImageToEnvelopeVectorDataFilter.cxx
@@ -30,7 +30,7 @@ typedef otb::VectorDataFileWriter<VectorDataType> WriterType;
 typedef otb::ImageToEnvelopeVectorDataFilter
     <ImageType, VectorDataType>                    FilterType;
 
-int otbImageToEnvelopeVectorDataFilterNew(int argc, char* argv[])
+int otbImageToEnvelopeVectorDataFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   // Instantiation
   FilterType::Pointer filter = FilterType::New();
@@ -38,7 +38,7 @@ int otbImageToEnvelopeVectorDataFilterNew(int argc, char* argv[])
   return EXIT_SUCCESS;
 }
 
-int otbImageToEnvelopeVectorDataFilter(int argc, char* argv[])
+int otbImageToEnvelopeVectorDataFilter(int itkNotUsed(argc), char* argv[])
 {
   ReaderType::Pointer reader = ReaderType::New();
   reader->SetFileName(argv[1]);
diff --git a/Testing/Code/Projections/otbImageToGenericRSOutputParameters.cxx b/Testing/Code/Projections/otbImageToGenericRSOutputParameters.cxx
index 169724d..2fde015 100644
--- a/Testing/Code/Projections/otbImageToGenericRSOutputParameters.cxx
+++ b/Testing/Code/Projections/otbImageToGenericRSOutputParameters.cxx
@@ -28,14 +28,14 @@
 typedef otb::VectorImage<double, 2>       ImageType;
 typedef otb::ImageToGenericRSOutputParameters<ImageType>  FilterType;
 
-int otbImageToGenericRSOutputParametersNew (int argc, char * argv[])
+int otbImageToGenericRSOutputParametersNew (int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   FilterType::Pointer filter = FilterType::New();
 
   return EXIT_SUCCESS;
 }
 
-int otbImageToGenericRSOutputParameters (int argc, char * argv[])
+int otbImageToGenericRSOutputParameters (int itkNotUsed(argc), char * argv[])
 {
   const char * infname = argv[1];
   const char * outfname = argv[2];
diff --git a/Testing/Code/Projections/otbLeastSquareAffineTransformEstimatorNew.cxx b/Testing/Code/Projections/otbLeastSquareAffineTransformEstimatorNew.cxx
index 60e86df..ffb56c2 100644
--- a/Testing/Code/Projections/otbLeastSquareAffineTransformEstimatorNew.cxx
+++ b/Testing/Code/Projections/otbLeastSquareAffineTransformEstimatorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbLeastSquareAffineTransformEstimator.h"
 #include "itkPoint.h"
 
-int otbLeastSquareAffineTransformEstimatorNew(int argc, char* argv[])
+int otbLeastSquareAffineTransformEstimatorNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef itk::Point<float,   2>                              PointType;
   typedef otb::LeastSquareAffineTransformEstimator<PointType> EstimatorType;
diff --git a/Testing/Code/Projections/otbMapProjection.cxx b/Testing/Code/Projections/otbMapProjection.cxx
index 0b0ec4a..644706c 100644
--- a/Testing/Code/Projections/otbMapProjection.cxx
+++ b/Testing/Code/Projections/otbMapProjection.cxx
@@ -23,7 +23,7 @@
 #include "otbImage.h"
 #include "otbMapProjections.h"
 
-int otbMapProjection(int argc, char* argv[])
+int otbMapProjection(int itkNotUsed(argc), char* argv[])
 {
   const char *  outFileName = argv[1];
   std::ofstream file;
diff --git a/Testing/Code/Projections/otbMapProjectionsNew.cxx b/Testing/Code/Projections/otbMapProjectionsNew.cxx
index 6f431e6..a395223 100644
--- a/Testing/Code/Projections/otbMapProjectionsNew.cxx
+++ b/Testing/Code/Projections/otbMapProjectionsNew.cxx
@@ -24,7 +24,7 @@
 #include "otbImage.h"
 #include "otbMapProjections.h"
 
-int otbMapProjectionsNew(int argc, char* argv[])
+int otbMapProjectionsNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   otb::AlbersInverseProjection::Pointer      lAlbersProjection = otb::AlbersInverseProjection::New();
   otb::AlbersForwardProjection::Pointer      lAlbersProjection2 = otb::AlbersForwardProjection::New();
@@ -115,7 +115,7 @@ int otbMapProjectionsNew(int argc, char* argv[])
 
 
 //Test the specific accessors for some map projection
-int otbMapProjectionsTest(int argc, char * argv[])
+int otbMapProjectionsTest(int itkNotUsed(argc), char * argv[])
 {
   char * filename = argv[1];
   std::ofstream file;
diff --git a/Testing/Code/Projections/otbOrthoRectificationFilter.cxx b/Testing/Code/Projections/otbOrthoRectificationFilter.cxx
index 5905db4..6fa51f0 100644
--- a/Testing/Code/Projections/otbOrthoRectificationFilter.cxx
+++ b/Testing/Code/Projections/otbOrthoRectificationFilter.cxx
@@ -36,7 +36,9 @@ int otbOrthoRectificationFilter(int argc, char* argv[])
   if (argc != 12)
     {
     std::cout << argv[0] <<
-    " <input filename> <output filename> <origin easting> <origin northing> <x size> <y size> <x spacing> <y spacing> <UTM zone> <UTM hemisphere>"
+    " <input filename> <output filename> <origin easting> <origin northing>"
+    " <x size> <y size> <x spacing> <y spacing> <UTM zone> <UTM hemisphere>"
+    " <grid_spacing>"
               << std::endl;
 
     return EXIT_FAILURE;
diff --git a/Testing/Code/Projections/otbOrthoRectificationFilterNew.cxx b/Testing/Code/Projections/otbOrthoRectificationFilterNew.cxx
index 6e080d3..ac3c888 100644
--- a/Testing/Code/Projections/otbOrthoRectificationFilterNew.cxx
+++ b/Testing/Code/Projections/otbOrthoRectificationFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbMapProjections.h"
 #include "otbOrthoRectificationFilter.h"
 
-int otbOrthoRectificationFilterNew(int argc, char* argv[])
+int otbOrthoRectificationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Image<double, 2>                                                     ImageType;
   typedef otb::UtmInverseProjection                                                 UtmMapProjectionType;
diff --git a/Testing/Code/Projections/otbOssimElevManagerTest.cxx b/Testing/Code/Projections/otbOssimElevManagerTest.cxx
index caaf8cc..4ca7f02 100644
--- a/Testing/Code/Projections/otbOssimElevManagerTest.cxx
+++ b/Testing/Code/Projections/otbOssimElevManagerTest.cxx
@@ -41,7 +41,6 @@ int otbOssimElevManagerTest(int argc, char* argv[])
   typedef otb::ImageFileWriter<ImageType>              WriterType;
   typedef itk::ImageRegionIteratorWithIndex<ImageType> IteratorType;
 
-  typedef ImageType::PointType   PoinType;
   typedef ImageType::RegionType  RegionType;
   typedef ImageType::SpacingType SpacingType;
   typedef RegionType::IndexType  IndexType;
diff --git a/Testing/Code/Projections/otbOssimElevManagerTest2.cxx b/Testing/Code/Projections/otbOssimElevManagerTest2.cxx
index 93a0baa..131d07c 100644
--- a/Testing/Code/Projections/otbOssimElevManagerTest2.cxx
+++ b/Testing/Code/Projections/otbOssimElevManagerTest2.cxx
@@ -37,8 +37,6 @@ int otbOssimElevManagerTest2(int argc, char* argv[])
   const ossimFilename srtmDir(argv[1]);
   const char *        outfname = argv[2];
 
-  typedef double PixelType;
-
   typedef itk::Point<double, 2> PointType;
   PointType origin;
   double    spacing;
diff --git a/Testing/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.cxx b/Testing/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.cxx
index faff72b..29068e0 100644
--- a/Testing/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.cxx
+++ b/Testing/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.cxx
@@ -28,7 +28,6 @@ int otbPhysicalToRPCSensorModelImageFilter(int argc, char* argv[])
   typedef double                                      PixelType;
   typedef otb::VectorImage<PixelType, Dimension>      ImageType;
   typedef otb::PhysicalToRPCSensorModelImageFilter<ImageType> PhysicalToSensorModelType;
-  typedef PhysicalToSensorModelType::SizeType         SizeType;
 
   // Object instanciation
   PhysicalToSensorModelType::Pointer estimator = PhysicalToSensorModelType::New();
diff --git a/Testing/Code/Projections/otbProjectionBaseNew.cxx b/Testing/Code/Projections/otbProjectionBaseNew.cxx
index 17b72ea..4ce930b 100644
--- a/Testing/Code/Projections/otbProjectionBaseNew.cxx
+++ b/Testing/Code/Projections/otbProjectionBaseNew.cxx
@@ -22,7 +22,7 @@
 
 #include "otbMapProjections.h"
 
-int otbProjectionBaseNew(int argc, char* argv[])
+int otbProjectionBaseNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   otb::AlbersInverseProjection::Pointer      lAlbersProjection = otb::AlbersInverseProjection::New();
   otb::AzimEquDistForwardProjection::Pointer lAzimEquDistProjection = otb::AzimEquDistForwardProjection::New();
diff --git a/Testing/Code/Projections/otbRationalTransform.cxx b/Testing/Code/Projections/otbRationalTransform.cxx
index c575fae..be56b0b 100644
--- a/Testing/Code/Projections/otbRationalTransform.cxx
+++ b/Testing/Code/Projections/otbRationalTransform.cxx
@@ -20,7 +20,7 @@
 #include "otbRationalTransform.h"
 #include <fstream>
 
-int otbRationalTransformNew(int argc, char* argv[])
+int otbRationalTransformNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::RationalTransform<> RationalTransformType;
 
@@ -96,4 +96,3 @@ int otbRationalTransform(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/Projections/otbRationalTransformToDisplacementFieldSource.cxx b/Testing/Code/Projections/otbRationalTransformToDisplacementFieldSource.cxx
index 8b8fe60..0d59043 100644
--- a/Testing/Code/Projections/otbRationalTransformToDisplacementFieldSource.cxx
+++ b/Testing/Code/Projections/otbRationalTransformToDisplacementFieldSource.cxx
@@ -27,7 +27,6 @@
 
 int otbRationalTransformToDisplacementFieldSourceTest(int argc, char* argv[])
 {
-  typedef otb::RationalTransform<> RationalTransformType;
 
   /** Check command line arguments. */
   if( argc < 2 )
@@ -42,7 +41,6 @@ int otbRationalTransformToDisplacementFieldSourceTest(int argc, char* argv[])
   const unsigned int  Dimension = 2;
   typedef float       ScalarPixelType;
   typedef double      CoordRepresentationType;
-  const unsigned int  SplineOrder = 3;
 
   typedef itk::Vector<ScalarPixelType, Dimension >    VectorPixelType;
   typedef otb::Image<VectorPixelType, Dimension >     DisplacementFieldImageType;
@@ -58,7 +56,6 @@ int otbRationalTransformToDisplacementFieldSourceTest(int argc, char* argv[])
   typedef DisplacementFieldGeneratorType::SpacingType    SpacingType;
   typedef DisplacementFieldGeneratorType::OriginType     OriginType;
   typedef DisplacementFieldGeneratorType::IndexType      IndexType;
-  typedef DisplacementFieldGeneratorType::RegionType     RegionType;
   typedef otb::ImageFileWriter<DisplacementFieldImageType >   WriterType;
 
   /** Create output information. */
diff --git a/Testing/Code/Projections/otbRegionProjectionResampler.cxx b/Testing/Code/Projections/otbRegionProjectionResampler.cxx
index 404acc0..5b5f66a 100644
--- a/Testing/Code/Projections/otbRegionProjectionResampler.cxx
+++ b/Testing/Code/Projections/otbRegionProjectionResampler.cxx
@@ -66,8 +66,6 @@ int otbRegionProjectionResampler(int argc, char* argv[])
   typedef itk::LinearInterpolateImageFunction<ImageType, double>     InterpolatorType;
   typedef itk::RescaleIntensityImageFilter<ImageType, CharImageType> RescalerType;
   typedef otb::StreamingResampleImageFilter<ImageType, ImageType>    ResamplerType;
-  typedef itk::TranslationTransform<double, 2>                       TransformType;
-  typedef otb::CompositeTransform<ModelType, TransformType>          CompositeType;
 
   ImageType::IndexType   start;
   ImageType::SizeType    size;
diff --git a/Testing/Code/Projections/otbSensorModelsNew.cxx b/Testing/Code/Projections/otbSensorModelsNew.cxx
index bc8f590..937fa8f 100644
--- a/Testing/Code/Projections/otbSensorModelsNew.cxx
+++ b/Testing/Code/Projections/otbSensorModelsNew.cxx
@@ -24,7 +24,7 @@
 #include "otbForwardSensorModel.h"
 #include "otbInverseSensorModel.h"
 
-int otbSensorModelsNew(int argc, char* argv[])
+int otbSensorModelsNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::SensorModelBase<double> SensorModelBaseType;
   SensorModelBaseType::Pointer lSensorModelBase = SensorModelBaseType::New();
diff --git a/Testing/Code/Projections/otbTileMapTransform.cxx b/Testing/Code/Projections/otbTileMapTransform.cxx
index 43b2da4..cac0128 100644
--- a/Testing/Code/Projections/otbTileMapTransform.cxx
+++ b/Testing/Code/Projections/otbTileMapTransform.cxx
@@ -20,7 +20,7 @@
 #include <iomanip>
 #include "otbTileMapTransform.h"
 
-int otbTileMapTransform(int argc, char* argv[])
+int otbTileMapTransform(int itkNotUsed(argc), char* argv[])
 {
   const char *  outFileName = argv[1];
   std::ofstream file;
diff --git a/Testing/Code/Projections/otbUtmMapProjection.cxx b/Testing/Code/Projections/otbUtmMapProjection.cxx
index 2fce966..c7ddb14 100644
--- a/Testing/Code/Projections/otbUtmMapProjection.cxx
+++ b/Testing/Code/Projections/otbUtmMapProjection.cxx
@@ -23,7 +23,7 @@
 #include "otbMapProjections.h"
 #include "otbUtils.h"
 
-int otbUtmMapProjection(int argc, char* argv[])
+int otbUtmMapProjection(int itkNotUsed(argc), char* argv[])
 {
   const char *  outFileName = argv[1];
   std::ofstream file;
diff --git a/Testing/Code/Projections/otbVectorDataExtractROIandProjection.cxx b/Testing/Code/Projections/otbVectorDataExtractROIandProjection.cxx
index 23c91db..eec3ae3 100644
--- a/Testing/Code/Projections/otbVectorDataExtractROIandProjection.cxx
+++ b/Testing/Code/Projections/otbVectorDataExtractROIandProjection.cxx
@@ -24,7 +24,7 @@
 #include <fstream>
 #include <iostream>
 
-int otbVectorDataExtractROIandProjection(int argc, char * argv[])
+int otbVectorDataExtractROIandProjection(int itkNotUsed(argc), char * argv[])
 {
 
   //Read the vector data
diff --git a/Testing/Code/Projections/otbVectorDataIntoImageProjectionFilterTest.cxx b/Testing/Code/Projections/otbVectorDataIntoImageProjectionFilterTest.cxx
index 652b521..2b0396c 100644
--- a/Testing/Code/Projections/otbVectorDataIntoImageProjectionFilterTest.cxx
+++ b/Testing/Code/Projections/otbVectorDataIntoImageProjectionFilterTest.cxx
@@ -37,7 +37,7 @@
 * prTvVectorDataIntoImageProjectionFilterTest_4 failed because of the bug http://bugs.orfeo-toolbox.org/view.php?id=333.
 */
 
-int otbVectorDataIntoImageProjectionFilterTest(int argc, char * argv[])
+int otbVectorDataIntoImageProjectionFilterTest(int itkNotUsed(argc), char * argv[])
 {
   typedef float                                           PixelType;
   typedef otb::VectorImage<PixelType, 2>                  VectorImageType;
@@ -99,7 +99,7 @@ int otbVectorDataIntoImageProjectionFilterTest(int argc, char * argv[])
 
 
 
-int otbVectorDataIntoImageProjectionFilterCompareImplTest(int argc, char * argv[])
+int otbVectorDataIntoImageProjectionFilterCompareImplTest(int itkNotUsed(argc), char * argv[])
 {
   typedef float                                           PixelType;
   typedef otb::VectorImage<PixelType, 2>                  VectorImageType;
@@ -120,8 +120,6 @@ int otbVectorDataIntoImageProjectionFilterCompareImplTest(int argc, char * argv[
   typedef otb::VectorDataExtractROI<VectorDataType>       VectorDataExtractROIType;
   typedef VectorDataExtractROIType::RegionType            RemoteSensingRegionType;
 
-  typedef itk::PreOrderTreeIterator<VectorDataType::DataTreeType> TreeIteratorType;
-
   std::string imageInputFilename = argv[1];
   std::string vectorDataInputFilename = argv[2];
   std::string demDirectory = argv[3];
diff --git a/Testing/Code/Projections/otbVectorDataProjectionFilterNew.cxx b/Testing/Code/Projections/otbVectorDataProjectionFilterNew.cxx
index ce3276a..62a2c90 100644
--- a/Testing/Code/Projections/otbVectorDataProjectionFilterNew.cxx
+++ b/Testing/Code/Projections/otbVectorDataProjectionFilterNew.cxx
@@ -19,7 +19,7 @@
 #include "otbVectorDataProjectionFilter.h"
 #include "otbVectorData.h"
 
-int otbVectorDataProjectionFilterNew(int argc, char * argv[])
+int otbVectorDataProjectionFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
 
   typedef otb::VectorData<double> InputVectorDataType;
diff --git a/Testing/Code/Projections/otbVectorDataTransformFilter.cxx b/Testing/Code/Projections/otbVectorDataTransformFilter.cxx
index 928ffa7..8dcadb6 100644
--- a/Testing/Code/Projections/otbVectorDataTransformFilter.cxx
+++ b/Testing/Code/Projections/otbVectorDataTransformFilter.cxx
@@ -32,13 +32,13 @@ typedef otb::VectorData<>                      VectorDataType;
 typedef otb::VectorDataTransformFilter
         <VectorDataType, VectorDataType>       VectorDataTransformType;
 
-int otbVectorDataTransformFilterNew (int argc, char * argv[])
+int otbVectorDataTransformFilterNew (int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   VectorDataTransformType::Pointer transformFilter = VectorDataTransformType::New();
   return EXIT_SUCCESS;
 }
 
-int otbVectorDataTransformFilter (int argc, char * argv[])
+int otbVectorDataTransformFilter (int itkNotUsed(argc), char * argv[])
 {
   typedef otb::VectorImage<double, 2>             ImageType;
   typedef otb::VectorData<>                      VectorDataType;
diff --git a/Testing/Code/Radiometry/CMakeLists.txt b/Testing/Code/Radiometry/CMakeLists.txt
index 2faef11..e6ee27c 100644
--- a/Testing/Code/Radiometry/CMakeLists.txt
+++ b/Testing/Code/Radiometry/CMakeLists.txt
@@ -95,7 +95,7 @@ add_test(raTvImageToLuminanceImageFilterAutoSpot5 ${RADIOMETRY_TESTS2}
         ${TEMP}/raTvImageToLuminanceImageFilterAutoSpot5.tif
          )
 
-add_test(raTvImageToLuminanceImageFilterAutoIkonos ${RADIOMETRY_TESTS2}
+add_test(raTvImageToLuminanceImageFilterAutoIkonos ${RADIOMETRY_TESTS2} 
   --compare-image ${EPSILON_12}  ${BASELINE}/raTvImageToLuminanceImageFilterAutoIkonos.tif
                           ${TEMP}/raTvImageToLuminanceImageFilterAutoIkonos.tif
         otbImageToLuminanceImageFilterAuto
@@ -340,6 +340,407 @@ add_test(raTuImageToReflectanceImageFilterAutoFORMOSAT2 ${RADIOMETRY_TESTS2}
 
 endif()
 
+
+# -------            otb::LuminanceToImageImageFilter   ------------------------------ 
+add_test(raTuLuminanceToImageImageFilterNew ${RADIOMETRY_TESTS2}
+        otbLuminanceToImageImageFilterNew
+)
+
+add_test(raTvLuminanceToImageImageFilter ${RADIOMETRY_TESTS2}
+  --compare-image ${EPSILON_12}  ${INPUTDATA}/verySmallFSATSW.tif
+                          ${TEMP}/raTvverySmallFSATSWImageFilter.tif
+        otbLuminanceToImageImageFilter
+        ${BASELINE}/raTvImageToLuminanceImageFilter.tif
+        ${TEMP}/raTvverySmallFSATSWImageFilter.tif
+        10   #channel 1 alpha
+        20   #channel 2 alpha
+        30   #channel 3 alpha
+        40   #channel 4 alpha
+        1    #channel 1 beta
+        2    #channel 2 beta
+        3    #channel 3 beta
+        4    #channel 4 beta
+         )
+
+if(OTB_DATA_USE_LARGEINPUT)
+
+set(TEHERANSPOT5DIR ${TEMP}/OpticalCalibLumToImSPOT5)
+file(MAKE_DIRECTORY ${TEHERANSPOT5DIR})
+file(GLOB MTDATA ${LARGEINPUT}/SPOT5/TEHERAN/*.DIM)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${TEHERANSPOT5DIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvImageToLuminanceImageFilterAutoSpot5.tif ${TEHERANSPOT5DIR}/IMAGERY.TIF COPYONLY)
+add_test(raTvLuminanceToImageImageFilterAutoSpot5 ${RADIOMETRY_TESTS2}
+  --compare-image ${EPSILON_12}  ${TEHERANSPOT5DIR}/raTvSMALLTEHERANLuminanceToImageImageFilterAutoSpot5.tif
+                          ${TEHERANSPOT5DIR}/raTvLuminanceToImageImageFilterAutoSpot5.tif
+        otbLuminanceToImageImageFilterAuto
+        ${TEHERANSPOT5DIR}/IMAGERY.TIF 
+	${LARGEINPUT}/SPOT5/TEHERAN/IMAGERY.TIF
+        ${TEHERANSPOT5DIR}/raTvLuminanceToImageImageFilterAutoSpot5.tif
+	${TEHERANSPOT5DIR}/raTvSMALLTEHERANLuminanceToImageImageFilterAutoSpot5.tif
+         )
+
+set(BLOSSEVILLEIKONOSDIR ${TEMP}/OpticalCalibLumToImIkonos)
+file(MAKE_DIRECTORY ${BLOSSEVILLEIKONOSDIR})
+file(GLOB MTDATA ${LARGEINPUT}/IKONOS/BLOSSEVILLE/*metadata.txt ${LARGEINPUT}/IKONOS/BLOSSEVILLE/*pan*)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${BLOSSEVILLEIKONOSDIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvImageToLuminanceImageFilterAutoIkonos.tif ${BLOSSEVILLEIKONOSDIR}/po_2619900_pan_0000000.tif COPYONLY)
+add_test(raTvLuminanceToImageImageFilterAutoIkonos ${RADIOMETRY_TESTS2}
+  --compare-image ${EPSILON_12}  ${BLOSSEVILLEIKONOSDIR}/raTvSMALLBLOSSEVILLELuminanceToImageImageFilterAutoIkonos.tif
+                          ${BLOSSEVILLEIKONOSDIR}/raTvLuminanceToImageImageFilterAutoIkonos.tif
+        otbLuminanceToImageImageFilterAuto
+	${BLOSSEVILLEIKONOSDIR}/po_2619900_pan_0000000.tif
+        ${LARGEINPUT}/IKONOS/BLOSSEVILLE/po_2619900_pan_0000000.tif
+        ${BLOSSEVILLEIKONOSDIR}/raTvLuminanceToImageImageFilterAutoIkonos.tif
+	${BLOSSEVILLEIKONOSDIR}/raTvSMALLBLOSSEVILLELuminanceToImageImageFilterAutoIkonos.tif
+         )
+
+set(ROMEWV2DIR ${TEMP}/OpticalCalibLumToImWv2PAN)
+file(MAKE_DIRECTORY ${ROMEWV2DIR})
+set(MTDATADIR ${LARGEINPUT}/WORLDVIEW2/ROME/WV-2_standard_8band_bundle_16bit/052298844010_01_P001_PAN)
+file(GLOB MTDATA ${MTDATADIR}/*TIL ${MTDATADIR}/*RPB ${MTDATADIR}/*XML ${MTDATADIR}/*IMD)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${ROMEWV2DIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvImageToLuminanceImageFilterAutoWV2PAN.tif ${ROMEWV2DIR}/09DEC10103019-P2AS-052298844010_01_P001.TIF COPYONLY)
+add_test(raTvLuminanceToImageImageFilterAutoWV2PAN ${RADIOMETRY_TESTS2}
+   --compare-image ${EPSILON_12}  ${ROMEWV2DIR}/raTvSMALLROMELuminanceToImageImageFilterAutoWV2PAN.tif
+                       ${ROMEWV2DIR}/raTvLuminanceToImageImageFilterAutoWV2PAN.tif
+        otbLuminanceToImageImageFilterAuto
+	${ROMEWV2DIR}/09DEC10103019-P2AS-052298844010_01_P001.TIF
+        ${LARGEINPUT}/WORLDVIEW2/ROME/WV-2_standard_8band_bundle_16bit/052298844010_01_P001_PAN/09DEC10103019-P2AS-052298844010_01_P001.TIF
+        ${ROMEWV2DIR}/raTvLuminanceToImageImageFilterAutoWV2PAN.tif
+	${ROMEWV2DIR}/raTvSMALLROMELuminanceToImageImageFilterAutoWV2PAN.tif
+         )
+
+set(ROMEWV2DIR ${TEMP}/OpticalCalibLumToImWv2MULTI)
+file(MAKE_DIRECTORY ${ROMEWV2DIR})
+set(MTDATADIR ${LARGEINPUT}/WORLDVIEW2/ROME/WV-2_standard_8band_bundle_16bit/052298844010_01_P001_MUL)
+file(GLOB MTDATA ${MTDATADIR}/*TIL ${MTDATADIR}/*RPB ${MTDATADIR}/*XML ${MTDATADIR}/*IMD)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${ROMEWV2DIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvImageToLuminanceImageFilterAutoWV2Multi.tif ${ROMEWV2DIR}/09DEC10103019-M2AS-052298844010_01_P001.TIF COPYONLY)
+add_test(raTvLuminanceToImageImageFilterAutoWV2MULTI ${RADIOMETRY_TESTS2}
+   --compare-image ${EPSILON_12}  ${ROMEWV2DIR}/raTvSMALLROMELuminanceToImageImageFilterAutoWV2Multi.tif
+                       ${ROMEWV2DIR}/raTvLuminanceToImageImageFilterAutoWV2Multi.tif
+        otbLuminanceToImageImageFilterAuto
+	${ROMEWV2DIR}/09DEC10103019-M2AS-052298844010_01_P001.TIF
+        ${LARGEINPUT}/WORLDVIEW2/ROME/WV-2_standard_8band_bundle_16bit/052298844010_01_P001_MUL/09DEC10103019-M2AS-052298844010_01_P001.TIF
+	${ROMEWV2DIR}/raTvLuminanceToImageImageFilterAutoWV2Multi.tif
+        ${ROMEWV2DIR}/raTvSMALLROMELuminanceToImageImageFilterAutoWV2Multi.tif
+         )
+
+set(TOULOUSEQBDIR ${TEMP}/OpticalCalibLumToImQBPAN)
+file(MAKE_DIRECTORY ${TOULOUSEQBDIR})
+set(MTDATADIR ${LARGEINPUT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN)
+file(GLOB MTDATA ${MTDATADIR}/*TIL ${MTDATADIR}/*RPB ${MTDATADIR}/*XML ${MTDATADIR}/*IMD)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${TOULOUSEQBDIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvImageToLuminanceImageFilterAutoQuickbirdPAN.tif ${TOULOUSEQBDIR}/02APR01105228-P1BS-000000128955_01_P001.TIF COPYONLY)
+add_test(raTvLuminanceToImageImageFilterAutoQuickbirdPAN ${RADIOMETRY_TESTS2}
+   --compare-image ${EPSILON_12}  ${TOULOUSEQBDIR}/raTvSMALLTOULOUSELuminanceToImageImageFilterAutoQuickbirdPAN.tif
+                       ${TOULOUSEQBDIR}/raTvLuminanceToImageImageFilterAutoQuickbirdPAN.tif
+        otbLuminanceToImageImageFilterAuto
+	${TOULOUSEQBDIR}/02APR01105228-P1BS-000000128955_01_P001.TIF
+        ${LARGEINPUT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
+        ${TOULOUSEQBDIR}/raTvLuminanceToImageImageFilterAutoQuickbirdPAN.tif
+	${TOULOUSEQBDIR}/raTvSMALLTOULOUSELuminanceToImageImageFilterAutoQuickbirdPAN.tif
+         )
+
+set(TOULOUSEQBDIR ${TEMP}/OpticalCalibLumToImQBXS)
+file(MAKE_DIRECTORY ${TOULOUSEQBDIR})
+set(MTDATADIR ${LARGEINPUT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_MUL)
+file(GLOB MTDATA ${MTDATADIR}/*TIL ${MTDATADIR}/*RPB ${MTDATADIR}/*XML ${MTDATADIR}/*IMD)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${TOULOUSEQBDIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvImageToLuminanceImageFilterAutoQuickbirdXS.tif ${TOULOUSEQBDIR}/02APR01105228-M1BS-000000128955_01_P001.TIF COPYONLY)
+add_test(raTvLuminanceToImageImageFilterAutoQuickbirdXS ${RADIOMETRY_TESTS2}
+   --compare-image ${EPSILON_12}  ${TOULOUSEQBDIR}/raTvSMALLTOULOUSELuminanceToImageImageFilterAutoQuickbirdXS.tif
+                       ${TOULOUSEQBDIR}/raTvLuminanceToImageImageFilterAutoQuickbirdXS.tif
+        otbLuminanceToImageImageFilterAuto
+	${TOULOUSEQBDIR}/02APR01105228-M1BS-000000128955_01_P001.TIF
+        ${LARGEINPUT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_MUL/02APR01105228-M1BS-000000128955_01_P001.TIF
+        ${TOULOUSEQBDIR}/raTvLuminanceToImageImageFilterAutoQuickbirdXS.tif
+	${TOULOUSEQBDIR}/raTvSMALLTOULOUSELuminanceToImageImageFilterAutoQuickbirdXS.tif
+         )
+
+set(SUDOUESTFORMOSATDIR ${TEMP}/OpticalCalibLumToImFormosat)
+file(MAKE_DIRECTORY ${SUDOUESTFORMOSATDIR})
+set(MTDATADIR ${LARGEINPUT}/FORMOSAT/Sudouest_20071013_MS_fmsat)
+file(GLOB MTDATA ${MTDATADIR}/*.DIM)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${SUDOUESTFORMOSATDIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvImageToLuminanceImageFilterAutoFormosat.tif ${SUDOUESTFORMOSATDIR}/IMAGERY.TIF COPYONLY)
+add_test(raTvLuminanceToImageImageFilterAutoFORMOSAT ${RADIOMETRY_TESTS2}
+   --compare-image ${EPSILON_12}  ${SUDOUESTFORMOSATDIR}/raTvSMALLSOLuminanceToImageImageFilterAutoFormosat.tif
+                       ${SUDOUESTFORMOSATDIR}/raTvLuminanceToImageImageFilterAutoFormosat.tif
+        otbLuminanceToImageImageFilterAuto
+	${SUDOUESTFORMOSATDIR}/IMAGERY.TIF
+        ${LARGEINPUT}/FORMOSAT/Sudouest_20071013_MS_fmsat/IMAGERY.TIF
+        ${SUDOUESTFORMOSATDIR}/raTvLuminanceToImageImageFilterAutoFormosat.tif
+	${SUDOUESTFORMOSATDIR}/raTvSMALLSOLuminanceToImageImageFilterAutoFormosat.tif
+         )
+
+endif()
+
+
+# -------            otb::ReflectanceToLuminanceImageFilter   ------------------------------
+add_test(raTuReflectanceToLuminanceImageFilterNew ${RADIOMETRY_TESTS2}
+        otbReflectanceToLuminanceImageFilterNew
+)
+
+add_test(raTvReflectanceToLuminanceImageFilter ${RADIOMETRY_TESTS2}
+  --compare-image ${EPSILON_12}  ${INPUTDATA}/verySmallFSATSW.tif
+                          ${TEMP}/raTvverySmallFSATSWImageFilterDsol.tif
+        otbReflectanceToLuminanceImageFilter
+        ${BASELINE}/raTvLuminanceToReflectanceImageFilterDsol.tif
+        ${TEMP}/raTvverySmallFSATSWImageFilterDsol.tif
+        0.2 #radius
+        10  #channel 1 illumination
+        20  #channel 2 illumination
+        30  #channel 3 illumination
+        40  #channel 4 illumination
+        0.9923885328
+)
+
+add_test(raTvReflectanceToLuminanceImageFilterDayMonth ${RADIOMETRY_TESTS2}
+  --compare-image ${EPSILON_12}  ${INPUTDATA}/verySmallFSATSW.tif
+                          ${TEMP}/raTvverySmallFSATSWImageFilterDayMounth.tif
+        otbReflectanceToLuminanceImageFilter
+        ${BASELINE}/raTvLuminanceToReflectanceImageFilter.tif
+        ${TEMP}/raTvverySmallFSATSWImageFilterDayMounth.tif
+        0.2 #radius
+        10  #channel 1 illumination
+        20  #channel 2 illumination
+        30  #channel 3 illumination
+        40  #channel 4 illumination
+        3   #day
+        5   #mounth
+        )
+
+if(OTB_DATA_USE_LARGEINPUT)
+
+set(TEHERANSPOT5DIR ${TEMP}/OpticalCalibRefToLumSPOT5)
+file(MAKE_DIRECTORY ${TEHERANSPOT5DIR})
+file(GLOB MTDATA ${LARGEINPUT}/SPOT5/TEHERAN/*.DIM)
+foreach(f ${MTDATA})  
+	configure_file(${f} ${TEHERANSPOT5DIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoSpot5.tif ${TEHERANSPOT5DIR}/IMAGERY.TIF COPYONLY)
+add_test(raTvReflectanceToLuminanceImageFilterAutoSpot5 ${RADIOMETRY_TESTS2}
+  --compare-image ${EPSILON_12}  ${BASELINE}/raTvImageToLuminanceImageFilterAutoSpot5.tif
+                          ${TEHERANSPOT5DIR}/raTvReflectanceToLuminanceImageFilterAutoSpot5.tif
+        otbReflectanceToLuminanceImageFilterAuto
+        ${TEHERANSPOT5DIR}/IMAGERY.TIF 
+        ${TEHERANSPOT5DIR}/raTvReflectanceToLuminanceImageFilterAutoSpot5.tif
+         )
+
+set(BLOSSEVILLEIKONOSDIR ${TEMP}/OpticalCalibRefToLumIkonos)
+file(MAKE_DIRECTORY ${BLOSSEVILLEIKONOSDIR})
+file(GLOB MTDATA ${LARGEINPUT}/IKONOS/BLOSSEVILLE/*metadata.txt ${LARGEINPUT}/IKONOS/BLOSSEVILLE/*pan*)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${BLOSSEVILLEIKONOSDIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoIkonos.tif ${BLOSSEVILLEIKONOSDIR}/po_2619900_pan_0000000.tif COPYONLY)
+add_test(raTvReflectanceToLuminanceImageFilterAutoIkonos ${RADIOMETRY_TESTS2}
+  --compare-image ${EPSILON_12}  ${BASELINE}/raTvImageToLuminanceImageFilterAutoIkonos.tif
+                          ${BLOSSEVILLEIKONOSDIR}/raTvReflectanceToLuminanceImageFilterAutoIkonos.tif
+        otbReflectanceToLuminanceImageFilterAuto
+	${BLOSSEVILLEIKONOSDIR}/po_2619900_pan_0000000.tif
+        ${BLOSSEVILLEIKONOSDIR}/raTvReflectanceToLuminanceImageFilterAutoIkonos.tif
+         )
+
+set(ROMEWV2DIR ${TEMP}/OpticalCalibRefToLumWv2PAN)
+file(MAKE_DIRECTORY ${ROMEWV2DIR})
+set(MTDATADIR ${LARGEINPUT}/WORLDVIEW2/ROME/WV-2_standard_8band_bundle_16bit/052298844010_01_P001_PAN)
+file(GLOB MTDATA ${MTDATADIR}/*TIL ${MTDATADIR}/*RPB ${MTDATADIR}/*XML ${MTDATADIR}/*IMD)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${ROMEWV2DIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoWV2PAN.tif ${ROMEWV2DIR}/09DEC10103019-P2AS-052298844010_01_P001.TIF COPYONLY)
+add_test(raTvReflectanceToLuminanceImageFilterAutoWV2PAN ${RADIOMETRY_TESTS2}
+   --compare-image ${EPSILON_12}  ${BASELINE}/raTvImageToLuminanceImageFilterAutoWV2PAN.tif
+                       ${ROMEWV2DIR}/raTvReflectanceToLuminanceImageFilterAutoWV2PAN.tif
+        otbReflectanceToLuminanceImageFilterAuto
+	${ROMEWV2DIR}/09DEC10103019-P2AS-052298844010_01_P001.TIF
+        ${ROMEWV2DIR}/raTvReflectanceToLuminanceImageFilterAutoWV2PAN.tif
+         )
+
+set(ROMEWV2DIR ${TEMP}/OpticalCalibRefToLumWv2MULTI)
+file(MAKE_DIRECTORY ${ROMEWV2DIR})
+set(MTDATADIR ${LARGEINPUT}/WORLDVIEW2/ROME/WV-2_standard_8band_bundle_16bit/052298844010_01_P001_MUL)
+file(GLOB MTDATA ${MTDATADIR}/*TIL ${MTDATADIR}/*RPB ${MTDATADIR}/*XML ${MTDATADIR}/*IMD)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${ROMEWV2DIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoWV2Multi.tif ${ROMEWV2DIR}/09DEC10103019-M2AS-052298844010_01_P001.TIF COPYONLY)
+add_test(raTvReflectanceToLuminanceImageFilterAutoWV2MULTI ${RADIOMETRY_TESTS2}
+   --compare-image ${EPSILON_12}  ${BASELINE}/raTvImageToLuminanceImageFilterAutoWV2Multi.tif
+                       ${ROMEWV2DIR}/raTvReflectanceToLuminanceImageFilterAutoWV2Multi.tif
+        otbReflectanceToLuminanceImageFilterAuto
+	${ROMEWV2DIR}/09DEC10103019-M2AS-052298844010_01_P001.TIF
+	${ROMEWV2DIR}/raTvReflectanceToLuminanceImageFilterAutoWV2Multi.tif
+         )
+
+set(TOULOUSEQBDIR ${TEMP}/OpticalCalibRefToLumQBPAN)
+file(MAKE_DIRECTORY ${TOULOUSEQBDIR})
+set(MTDATADIR ${LARGEINPUT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN)
+file(GLOB MTDATA ${MTDATADIR}/*TIL ${MTDATADIR}/*RPB ${MTDATADIR}/*XML ${MTDATADIR}/*IMD)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${TOULOUSEQBDIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoQuickbirdPAN.tif ${TOULOUSEQBDIR}/02APR01105228-P1BS-000000128955_01_P001.TIF COPYONLY)
+add_test(raTvReflectanceToLuminanceImageFilterAutoQuickbirdPAN ${RADIOMETRY_TESTS2}
+   --compare-image ${EPSILON_12}  ${BASELINE}/raTvImageToLuminanceImageFilterAutoQuickbirdPAN.tif
+                       ${TOULOUSEQBDIR}/raTvReflectanceToLuminanceImageFilterAutoQuickbirdPAN.tif
+        otbReflectanceToLuminanceImageFilterAuto
+	${TOULOUSEQBDIR}/02APR01105228-P1BS-000000128955_01_P001.TIF
+        ${TOULOUSEQBDIR}/raTvReflectanceToLuminanceImageFilterAutoQuickbirdPAN.tif
+         )
+
+set(TOULOUSEQBDIR ${TEMP}/OpticalCalibRefToLumQBXS)
+file(MAKE_DIRECTORY ${TOULOUSEQBDIR})
+set(MTDATADIR ${LARGEINPUT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_MUL)
+file(GLOB MTDATA ${MTDATADIR}/*TIL ${MTDATADIR}/*RPB ${MTDATADIR}/*XML ${MTDATADIR}/*IMD)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${TOULOUSEQBDIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoQuickbirdXS.tif ${TOULOUSEQBDIR}/02APR01105228-M1BS-000000128955_01_P001.TIF COPYONLY)
+add_test(raTvReflectanceToLuminanceImageFilterAutoQuickbirdXS ${RADIOMETRY_TESTS2}
+   --compare-image ${EPSILON_12}  ${BASELINE}/raTvImageToLuminanceImageFilterAutoQuickbirdXS.tif
+                       ${TOULOUSEQBDIR}/raTvReflectanceToLuminanceImageFilterAutoQuickbirdXS.tif
+        otbReflectanceToLuminanceImageFilterAuto
+	${TOULOUSEQBDIR}/02APR01105228-M1BS-000000128955_01_P001.TIF
+        ${TOULOUSEQBDIR}/raTvReflectanceToLuminanceImageFilterAutoQuickbirdXS.tif
+         )
+
+# ${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoFormosat.tif : this image seems to be corrupted
+#set(SUDOUESTFORMOSATDIR ${TEMP}/OpticalCalibRefToLumFormosat)
+#file(MAKE_DIRECTORY ${SUDOUESTFORMOSATDIR})
+#set(MTDATADIR ${LARGEINPUT}/FORMOSAT/Sudouest_20071013_MS_fmsat)
+#file(GLOB MTDATA ${MTDATADIR}/*.DIM)
+#foreach(f ${MTDATA}) 
+#	configure_file(${f} ${SUDOUESTFORMOSATDIR} COPYONLY)  
+#endforeach(f)
+#configure_file(${BASELINE}/raTvLuminanceToReflectanceImageFilterAutoFormosat.tif ${SUDOUESTFORMOSATDIR}/IMAGERY.TIF COPYONLY)
+#add_test(raTvReflectanceToLuminanceImageFilterAutoFORMOSAT ${RADIOMETRY_TESTS2}
+#   --compare-image ${EPSILON_12} ${BASELINE}/raTvImageToLuminanceImageFilterAutoFormosat.tif
+#                       ${SUDOUESTFORMOSATDIR}/raTvReflectanceToLuminanceImageFilterAutoFormosat.tif
+#        otbReflectanceToLuminanceImageFilterAuto
+#	${SUDOUESTFORMOSATDIR}/IMAGERY.TIF
+#        ${SUDOUESTFORMOSATDIR}/raTvReflectanceToLuminanceImageFilterAutoFormosat.tif
+#         )
+
+endif()
+
+# -------            otb::ReflectanceToImageImageFilter   ------------------------------
+add_test(raTuReflectanceToImageImageFilterNew ${RADIOMETRY_TESTS2}
+        otbReflectanceToImageImageFilterNew
+)
+
+add_test(raTvReflectanceToImageImageFilter ${RADIOMETRY_TESTS2}
+  --compare-image ${EPSILON_12}  ${INPUTDATA}/verySmallFSATSW.tif
+                          ${TEMP}/raTvReflectanceToImageImageFilterDsol.tif
+        otbReflectanceToImageImageFilter
+	${BASELINE}/raTvImageToReflectanceImageFilterDsol.tif
+        ${TEMP}/raTvReflectanceToImageImageFilterDsol.tif
+        0.2 #radius
+        1   #channel 1 alpha
+        2   #channel 2 alpha
+        3   #channel 3 alpha
+        4   #channel 4 alpha
+        10  #channel 1 beta
+        11  #channel 2 beta
+        12  #channel 3 beta
+        13  #channel 4 beta
+        10  #channel 1 illumination
+        20  #channel 2 illumination
+        30  #channel 3 illumination
+        40  #channel 4 illumination
+        0.9923885328 #d/d0 corresponding to the date 03/05
+         )
+
+add_test(raTvRomaniaReflectanceToImage ${RADIOMETRY_TESTS2}
+  --compare-image ${EPSILON_12}
+                  ${INPUTDATA}/Romania_Extract.tif
+                  ${TEMP}/raTvRomaniaImage.tif
+        otbReflectanceToImageImageFilter  
+	${BASELINE}/raTvRomania_Reflectance.tif
+        ${TEMP}/raTvRomaniaImage.tif
+        27.3                 # = 90-62.70 : elevation et azimuth solaire
+        1.981247824          #channel 1 alpha = 0.881338*2.24800
+        4.332207085          #channel 2 alpha = 0.858713*5.04500
+        2.32064768           #channel 3 alpha = 0.685568*3.38500
+        9.3177861            #channel 4 alpha = 6.19122*1.50500
+        0                    #channel 1 beta
+        0                    #channel 2 beta
+        0                    #channel 3 beta
+        0                    #channel 4 beta
+        1057.56              #channel 1 illumination
+        1570.23              #channel 2 illumination
+        1842.94              #channel 3 illumination
+        232.820              #channel 4 illumination
+        0.9889145564708814   #= sqrt(0.977952) d/d0 corresponding to the date 03/05
+        )
+
+add_test(raTvReflectanceToImageImageFilterDayMounth ${RADIOMETRY_TESTS2}
+  --compare-image ${EPSILON_12}  ${INPUTDATA}/verySmallFSATSW.tif
+                          ${TEMP}/raTvReflectanceToImageImageFilterDayMounth.tif
+        otbReflectanceToImageImageFilter
+	${BASELINE}/raTvImageToReflectanceImageFilter.tif
+        ${TEMP}/raTvReflectanceToImageImageFilterDayMounth.tif
+        0.2 #radius
+        1   #channel 1 alpha
+        2   #channel 2 alpha
+        3   #channel 3 alpha
+        4   #channel 4 alpha
+        10  #channel 1 beta
+        11  #channel 2 beta
+        12  #channel 3 beta
+        13  #channel 4 beta
+        10  #channel 1 illumination
+        20  #channel 2 illumination
+        30  #channel 3 illumination
+        40  #channel 4 illumination
+        3   #day
+        5   #mounth
+       )
+
+if(OTB_DATA_USE_LARGEINPUT)
+
+set(TEHERANSPOT5DIR ${TEMP}/OpticalCalibRefToImSPOT5)
+file(MAKE_DIRECTORY ${TEHERANSPOT5DIR})
+file(GLOB MTDATA ${LARGEINPUT}/SPOT5/TEHERAN/*.DIM)
+foreach(f ${MTDATA}) 
+	configure_file(${f} ${TEHERANSPOT5DIR} COPYONLY)  
+endforeach(f)
+configure_file(${BASELINE}/raTvImageToReflectanceImageFilterAuto.tif ${TEHERANSPOT5DIR}/IMAGERY.TIF COPYONLY)
+add_test(raTvReflectanceToImageImageFilterAutoSpot5 ${RADIOMETRY_TESTS2}
+  --compare-image ${EPSILON_12}  ${TEHERANSPOT5DIR}/raTvSMALLTEHERANReflectanceToImageImageFilterAutoSpot5.tif
+                          ${TEHERANSPOT5DIR}/raTvReflectanceToImageImageFilterAutoSpot5.tif
+        otbReflectanceToImageImageFilterAuto
+        ${TEHERANSPOT5DIR}/IMAGERY.TIF 
+	${LARGEINPUT}/SPOT5/TEHERAN/IMAGERY.TIF
+        ${TEHERANSPOT5DIR}/raTvReflectanceToImageImageFilterAutoSpot5.tif
+	${TEHERANSPOT5DIR}/raTvSMALLTEHERANReflectanceToImageImageFilterAutoSpot5.tif
+         )
+
+
+add_test(raTuReflectanceToImageImageFilterAutoFORMOSAT2 ${RADIOMETRY_TESTS2}
+        otbReflectanceToImageImageFilterAuto
+                ${LARGEINPUT}/FORMOSAT/Sudouest_20071013_MS_fmsat/IMAGERY.TIF
+		${LARGEINPUT}/FORMOSAT/Sudouest_20071013_MS_fmsat/IMAGERY.TIF	
+                ${TEMP}/raTvReflectanceToImageImageFilterAutoFORMOSAT2.tif
+		${TEMP}/raTvSMALLReflectanceToImageImageFilterAutoFORMOSAT2.tif
+         )
+endif()
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbRADIOMETRY_TESTS3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -379,6 +780,11 @@ add_test(raTuAtmosphericCorrectionParametersNew ${RADIOMETRY_TESTS3}
         otbAtmosphericCorrectionParametersNew
 )
 
+# -------            otb::ImageMetadataCorrectionParameters   ------------------------------
+add_test(raTuImageMetadataCorrectionParametersNew ${RADIOMETRY_TESTS3}
+        otbImageMetadataCorrectionParametersNew
+)
+
 ##########           otb::FilterFunctionValues -------------------
 # in otbAtmosphericCorrectionParameters.h/.cxx
 add_test(raTuFilterFunctionValuesTest ${RADIOMETRY_TESTS3}
@@ -464,6 +870,24 @@ add_test(raTvAtmosphericRadiativeTermsTest ${RADIOMETRY_TESTS3}
 )
 
 # -------            otb::ReflectanceToSurfaceReflectanceImageFilter   ------------------------------
+#add_test(raTuReflectanceToSurfaceReflectanceImageFilterNew ${RADIOMETRY_TESTS3}
+#        otbReflectanceToSurfaceReflectanceImageFilterNew
+#)
+#add_test(raTvReflectanceToSurfaceReflectanceImageFilter ${RADIOMETRY_TESTS3}
+#  --compare-image ${EPSILON_12}  ${BASELINE}/raTvReflectanceToSurfaceReflectanceImageFilter.tif
+#                              ${TEMP}/raTvReflectanceToSurfaceReflectanceImageFilter.tif
+#        otbReflectanceToSurfaceReflectanceImageFilterTest
+#        ${INPUTDATA}/verySmallFSATSW.tif
+#        ${TEMP}/raTvReflectanceToSurfaceReflectanceImageFilter.tif
+#        # SAME VALUE FOR EACH CHANNEL
+#        1 1 1 1 # intrinsic atmospheric reflectance
+#        2 2 2 2 # spherical albedo of the atmosphere
+#        3 3 3 3 # total transmission
+#        2 2 2 2 # downward transmittance
+#        3 3 3 3 # upward transmittance
+#       )
+
+# -------            otb::ReflectanceToSurfaceReflectanceImageFilter   ------------------------------
 add_test(raTuReflectanceToSurfaceReflectanceImageFilterNew ${RADIOMETRY_TESTS3}
         otbReflectanceToSurfaceReflectanceImageFilterNew
 )
@@ -481,10 +905,24 @@ add_test(raTvReflectanceToSurfaceReflectanceImageFilter ${RADIOMETRY_TESTS3}
         3 3 3 3 # upward transmittance
        )
 
+add_test(raTvReflectanceToSurfaceReflectanceImageFilter2 ${RADIOMETRY_TESTS3}
+  --compare-image ${EPSILON_12}  ${BASELINE}/raTvReflectanceToSurfaceReflectanceImageFilter2.tif
+                              ${TEMP}/raTvReflectanceToSurfaceReflectanceImageFilter2.tif
+        otbReflectanceToSurfaceReflectanceImageFilterTest2
+        ${INPUTDATA}/ToulouseExtract_WithGeom.tif
+        ${TEMP}/raTvReflectanceToSurfaceReflectanceImageFilter2.tif
+        1013
+        1.424
+        0.344
+        1
+        0.1
+       )
+
+
 if(OTB_DATA_USE_LARGEINPUT)
 #this test was comment after the refactoring of astmospheric correction classes
 #//TODO Need to rewrite tests with baselines generated directly with 6S.
-#add_test(raTvReflectanceToSurfaceReflectanceImageFilter2 ${RADIOMETRY_TESTS3}
+#add_test(raTvReflectanceToSurfaceReflectanceImageFilter3 ${RADIOMETRY_TESTS3}
 #  --compare-ascii ${EPSILON_12}  ${BASELINE_FILES}/raTvReflectanceToSurfaceReflectanceImageFilter2.txt
 #                              ${TEMP}/raTvReflectanceToSurfaceReflectanceImageFilter2.txt
 #        otbReflectanceToSurfaceReflectanceImageFilterTest2
@@ -507,17 +945,17 @@ add_test(raTvRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter ${RADIOMET
                 ${INPUTDATA}/RADIO_WAVELENGHT_SPECTRAL_BAND_SPOT4_1_MIR.txt  # wavelengths, channel 4
       )
 
-# -------            otb::SurfaceAdjacencyEffect6SCorrectionSchemeFilter   ------------------------------
-add_test(raTuSurfaceAdjacencyEffect6SCorrectionSchemeFilterNew ${RADIOMETRY_TESTS3}
-        otbSurfaceAdjacencyEffect6SCorrectionSchemeFilterNew
+# -------            otb::SurfaceAdjacencyEffectCorrectionSchemeFilter   ------------------------------
+add_test(raTuSurfaceAdjacencyEffectCorrectionSchemeFilterNew ${RADIOMETRY_TESTS3}
+        otbSurfaceAdjacencyEffectCorrectionSchemeFilterNew
 )
 
-add_test(raTvSurfaceAdjacencyEffect6SCorrectionSchemeFilter ${RADIOMETRY_TESTS3}
+add_test(raTvSurfaceAdjacencyEffectCorrectionSchemeFilter ${RADIOMETRY_TESTS3}
  --compare-image ${EPSILON_12}  ${BASELINE}/raTvSurfaceAdjacencyEffect6SCorrectionSchemeFilter.tif
                              ${TEMP}/raTvSurfaceAdjacencyEffect6SCorrectionSchemeFilter.tif
 # --compare-ascii ${EPSILON_6} ${BASELINE_FILES}/raTvSurfaceAdjacencyEffect6SCorrectionSchemeFilterOutput6SVallues.txt
 #                           ${TEMP}/raTvSurfaceAdjacencyEffect6SCorrectionSchemeFilterOutput6SVallues.txt
-        otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter
+        otbSurfaceAdjacencyEffectCorrectionSchemeFilter
         ${BASELINE}/raTvRomania_Correction.tif
         ${TEMP}/raTvSurfaceAdjacencyEffect6SCorrectionSchemeFilter.tif
         2                                                            # Radius;
@@ -534,15 +972,25 @@ add_test(raTvSurfaceAdjacencyEffect6SCorrectionSchemeFilter ${RADIOMETRY_TESTS3}
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbRADIOMETRY_TESTS4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-# -------            otb::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms   ------------------------------
-add_test(raTuAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTermsNew ${RADIOMETRY_TESTS4}
-        otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTermsNew)
+# -------            otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms   ------------------------------
+add_test(raTuRadiometryCorrectionParametersToAtmosphericRadiativeTermsNew ${RADIOMETRY_TESTS4}
+        otbRadiometryCorrectionParametersToAtmosphericRadiativeTermsNew)
+
+add_test(raTvRadiometryCorrectionParametersToAtmosphericRadiativeTerms ${RADIOMETRY_TESTS4}
+--compare-ascii ${EPSILON_4}
+                ${BASELINE_FILES}/raTvSIXSTraitsComputeAtmosphericParametersTest.txt
+                ${TEMP}/raTvCorrectionTo6SRadiative.txt
+        otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms
+                ${INPUTDATA}/in6S_otb
+                ${TEMP}/raTvCorrectionTo6SRadiative.txt
+)
 
-add_test(raTvAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms ${RADIOMETRY_TESTS4}
+# New test
+add_test(raTvRadiometryCorrectionParametersToAtmosphericRadiativeTerms ${RADIOMETRY_TESTS4}
 --compare-ascii ${EPSILON_4}
                 ${BASELINE_FILES}/raTvSIXSTraitsComputeAtmosphericParametersTest.txt
                 ${TEMP}/raTvCorrectionTo6SRadiative.txt
-        otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
+        otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms
                 ${INPUTDATA}/in6S_otb
                 ${TEMP}/raTvCorrectionTo6SRadiative.txt
 )
@@ -1693,25 +2141,35 @@ otbLuminanceToReflectanceImageFilterAuto.cxx
 otbImageToReflectanceImageFilterNew.cxx
 otbImageToReflectanceImageFilter.cxx
 otbImageToReflectanceImageFilterAuto.cxx
+otbLuminanceToImageImageFilterNew.cxx
+otbLuminanceToImageImageFilter.cxx
+otbLuminanceToImageImageFilterAuto.cxx
+otbReflectanceToLuminanceImageFilterNew.cxx
+otbReflectanceToLuminanceImageFilter.cxx
+otbReflectanceToLuminanceImageFilterAuto.cxx
+otbReflectanceToImageImageFilterNew.cxx
+otbReflectanceToImageImageFilter.cxx
+otbReflectanceToImageImageFilterAuto.cxx
 )
 set(Radiometry_SRCS3
 otbRadiometryTests3.cxx
 otbDEMCaracteristicsExtractorNew.cxx
 otbDEMCaracteristicsExtractor.cxx
 otbAtmosphericCorrectionParametersNew.cxx
+otbImageMetadataCorrectionParametersNew.cxx
 otbFilterFunctionValues.cxx
 otbSIXSTraitsTest.cxx
 otbSIXSTraitsComputeAtmosphericParameters.cxx
 otbAtmosphericRadiativeTermsTest.cxx
 otbReflectanceToSurfaceReflectanceImageFilterTest.cxx
-otbSurfaceAdjacencyEffect6SCorrectionSchemeFilterNew.cxx
-otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.cxx
+otbSurfaceAdjacencyEffectCorrectionSchemeFilterNew.cxx
+otbSurfaceAdjacencyEffectCorrectionSchemeFilter.cxx
 otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter.cxx
 )
 set(Radiometry_SRCS4
 otbRadiometryTests4.cxx
-otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTermsNew.cxx
-otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
+otbRadiometryCorrectionParametersToAtmosphericRadiativeTermsNew.cxx
+otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.cxx
 otbAtmosphericCorrectionSequencement.cxx
 otbEVIRAndBAndNIRVegetationIndexImageFilter.cxx
 otbEVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
diff --git a/Testing/Code/Radiometry/otbAVIMultiChannelRAndGAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbAVIMultiChannelRAndGAndNIRVegetationIndexImageFilter.cxx
index 5e22b7e..3f9a5cb 100644
--- a/Testing/Code/Radiometry/otbAVIMultiChannelRAndGAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbAVIMultiChannelRAndGAndNIRVegetationIndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbVegetationIndicesFunctor.h"
 
-int otbAVIMultiChannelRAndGAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int otbAVIMultiChannelRAndGAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<double, Dimension>   InputImageType;
diff --git a/Testing/Code/Radiometry/otbAVIRAndGAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbAVIRAndGAndNIRVegetationIndexImageFilter.cxx
index bdf67d6..a45e8f2 100644
--- a/Testing/Code/Radiometry/otbAVIRAndGAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbAVIRAndGAndNIRVegetationIndexImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "otbVegetationIndicesFunctor.h"
 
-int otbAVIRAndGAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int otbAVIRAndGAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/Radiometry/otbAeronetExtractData.cxx b/Testing/Code/Radiometry/otbAeronetExtractData.cxx
index d3881b3..f62533e 100644
--- a/Testing/Code/Radiometry/otbAeronetExtractData.cxx
+++ b/Testing/Code/Radiometry/otbAeronetExtractData.cxx
@@ -22,7 +22,7 @@
 #include <fstream>
 #include <iomanip>
 
-int otbAeronetExtractData(int argc, char * argv[])
+int otbAeronetExtractData(int itkNotUsed(argc), char * argv[])
 {
   otb::AeronetFileReader::Pointer reader = otb::AeronetFileReader::New();
 
diff --git a/Testing/Code/Radiometry/otbAeronetExtractDataBadData.cxx b/Testing/Code/Radiometry/otbAeronetExtractDataBadData.cxx
index 6974313..0be0280 100644
--- a/Testing/Code/Radiometry/otbAeronetExtractDataBadData.cxx
+++ b/Testing/Code/Radiometry/otbAeronetExtractDataBadData.cxx
@@ -19,7 +19,7 @@
 #include "otbAeronetFileReader.h"
 #include "otbSystem.h"
 
-int otbAeronetExtractDataBadData(int argc, char * argv[])
+int otbAeronetExtractDataBadData(int itkNotUsed(argc), char * argv[])
 {
   otb::AeronetFileReader::Pointer reader = otb::AeronetFileReader::New();
 
diff --git a/Testing/Code/Radiometry/otbAeronetNew.cxx b/Testing/Code/Radiometry/otbAeronetNew.cxx
index 025c998..934553f 100644
--- a/Testing/Code/Radiometry/otbAeronetNew.cxx
+++ b/Testing/Code/Radiometry/otbAeronetNew.cxx
@@ -18,7 +18,7 @@
 #include "otbAeronetData.h"
 #include "otbAeronetFileReader.h"
 
-int otbAeronetNew(int argc, char * argv[])
+int otbAeronetNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   otb::AeronetData::Pointer       data = otb::AeronetData::New();
   otb::AeronetFileReader::Pointer reader = otb::AeronetFileReader::New();
diff --git a/Testing/Code/Radiometry/otbAtmosphericCorrectionParametersNew.cxx b/Testing/Code/Radiometry/otbAtmosphericCorrectionParametersNew.cxx
index 7cf4a95..bb55df1 100644
--- a/Testing/Code/Radiometry/otbAtmosphericCorrectionParametersNew.cxx
+++ b/Testing/Code/Radiometry/otbAtmosphericCorrectionParametersNew.cxx
@@ -22,7 +22,7 @@
 
 #include <cstdlib>
 
-int otbAtmosphericCorrectionParametersNew(int argc, char * argv[])
+int otbAtmosphericCorrectionParametersNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::AtmosphericCorrectionParameters AtmosphericCorrectionParametersType;
   typedef otb::FilterFunctionValues            FilterFunctionValuesType;
diff --git a/Testing/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx b/Testing/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
deleted file mode 100644
index c8d12a6..0000000
--- a/Testing/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
+++ /dev/null
@@ -1,184 +0,0 @@
-/*=========================================================================
-
-  Program:   ORFEO Toolbox
-  Language:  C++
-  Date:      $Date$
-  Version:   $Revision$
-
-
-  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
-     PURPOSE.  See the above copyright notices for more information.
-
-=========================================================================*/
-
-#include "otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h"
-#include "otbAtmosphericCorrectionParameters.h"
-#include "otbAtmosphericRadiativeTerms.h"
-#include <vector>
-#include <fstream>
-#include <iostream>
-#include <iomanip>
-#include <cstdlib>
-
-int otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms(int argc, char * argv[])
-{
-  const char * wavelenghFile  = argv[1];
-  const char * outputFile     = argv[2];
-
-  typedef otb::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms CorrectionParametersTo6SRadiativeTermsType;
-  typedef otb::AtmosphericCorrectionParameters                              CorrectionParametersType;
-  typedef otb::AtmosphericRadiativeTerms                                    RadiativeTermsType;
-  typedef CorrectionParametersType::AerosolModelType                        AerosolModelType;
-  typedef otb::FilterFunctionValues                                         FilterFunctionValuesType;
-  typedef FilterFunctionValuesType::WavelengthSpectralBandType              ValueType;
-  typedef FilterFunctionValuesType::ValuesVectorType                        ValuesVectorType;
-
-  // Instantiating object
-  CorrectionParametersTo6SRadiativeTermsType::Pointer object         = CorrectionParametersTo6SRadiativeTermsType::New();
-  CorrectionParametersType::Pointer                   param          = CorrectionParametersType::New();
-  AerosolModelType                                    aerosolModel;
-  FilterFunctionValuesType::Pointer                   functionValues = FilterFunctionValuesType::New();
-  ValuesVectorType                                    vect;
-  RadiativeTermsType::Pointer                         radiative      = RadiativeTermsType::New();
-
-  ValueType val = 0.0025;
-
-  //for(unsigned int i=0; i<wavelenghFiles.size(); ++i)
-  //{
-  //functionValues = FilterFunctionValuesType::New();
-  vect.clear();
-
-  // Filter function values initialization
-  float minSpectralValue(0.);
-  float maxSpectralValue(0.);
-  float value(0.);
-  // Correction parameters initialization
-  double       solarZenithalAngle(0.);
-  double       solarAzimutalAngle(0.);
-  double       viewingZenithalAngle(0.);
-  double       viewingAzimutalAngle(0.);
-  unsigned int month(0);
-  unsigned int day(0);
-  double       atmosphericPressure(0.);
-  double       waterVaporAmount(0.);
-  double       ozoneAmount(0.);
-  double       aerosolOptical(0.);
-
-  std::ifstream fin;
-  std::ofstream fout;
-  //Read input file parameters
-  fin.open(wavelenghFile);
-  fin >> solarZenithalAngle; //asol;
-  fin >> solarAzimutalAngle; //phi0;
-  fin >> viewingZenithalAngle; //avis;
-  fin >> viewingAzimutalAngle; //phiv;
-  fin >> month; //month;
-  fin >> day; //jday;
-  fin >> atmosphericPressure; //pressure;
-  fin >> waterVaporAmount; //uw;
-  fin >> ozoneAmount; //uo3;
-  unsigned int aer(0);
-  fin >> aer; //iaer;
-  aerosolModel = static_cast<AerosolModelType>(aer);
-  fin >> aerosolOptical; //taer55;
-  fin >> minSpectralValue; //wlinf;
-  fin >> maxSpectralValue; //wlsup;
-
-  std::string line;
-  std::getline(fin, line);
-  while (std::getline(fin, line))
-    {
-    value = atof(line.c_str());
-    vect.push_back(value);
-    }
-
-  fin.close();
-  functionValues->SetFilterFunctionValues(vect);
-  functionValues->SetMinSpectralValue(minSpectralValue);
-  functionValues->SetMaxSpectralValue(maxSpectralValue);
-  functionValues->SetUserStep(val);
-  param->SetWavelengthSpectralBandWithIndex(0, functionValues);
-  //}
-
-  //aerosolModel = static_cast<AerosolModelType>(::atoi(argv[16]));
-
-  // Set parameters
-  param->SetSolarZenithalAngle(static_cast<double>(solarZenithalAngle));
-  param->SetSolarAzimutalAngle(static_cast<double>(solarAzimutalAngle));
-  param->SetViewingZenithalAngle(static_cast<double>(viewingZenithalAngle));
-  param->SetViewingAzimutalAngle(static_cast<double>(viewingAzimutalAngle));
-  param->SetMonth(month);
-  param->SetDay(day);
-  param->SetAtmosphericPressure(static_cast<double>(atmosphericPressure));
-  param->SetWaterVaporAmount(static_cast<double>(waterVaporAmount));
-  param->SetOzoneAmount(static_cast<double>(ozoneAmount));
-  param->SetAerosolModel(aerosolModel);
-  param->SetAerosolOptical(static_cast<double>(aerosolOptical));
-
-  object->SetInput(param);
-  object->Update();
-  radiative = object->GetOutput();
-
-  fout.open(outputFile);
-  fout << " ---------------------------------------------------------" << std::endl;
-  fout << "Inputs values:" << std::setprecision(10) << std::endl;
-  fout << "   ----->  SolarZenithalAngle :                              " << solarZenithalAngle << std::endl;
-  fout << "   ----->  SolarAzimutalAngle :                              " << solarAzimutalAngle << std::endl;
-  fout << "   ----->  ViewingZenithalAngle :                            " << viewingZenithalAngle << std::endl;
-  fout << "   ----->  ViewingAzimutalAngle :                            " << viewingAzimutalAngle << std::endl;
-  fout << "   ----->  Month :                                           " << month << std::endl;
-  fout << "   ----->  Day :                                             " << day << std::endl;
-  fout << "   ----->  AtmosphericPressure :                             " << atmosphericPressure << std::endl;
-  fout << "   ----->  WaterVaporAmount :                                " << waterVaporAmount << std::endl;
-  fout << "   ----->  OzoneAmount :                                     " << ozoneAmount << std::endl;
-  fout << "   ----->  AerosolModel :                                    " << aer << std::endl;
-  fout << "   ----->  AerosolOptical :                                  " << aerosolOptical << std::endl;
-  fout << "   ----->  MinSpectralValue :                                " << minSpectralValue << std::endl;
-  fout << "   ----->  MaxSpectralValue :                                " << maxSpectralValue << std::endl;
-  fout << "   ----->  UserStep :                                        " << functionValues->GetUserStep() << std::endl;
-  fout << " ---------------------------------------------------------" << std::endl;
-  fout << "Outputs values:" << std::endl;
-  fout << "   ----->  atmospheric reflectance :                         " <<
-  radiative->GetIntrinsicAtmosphericReflectance(0) << std::endl;
-  fout << "   ----->  atmospheric spherical albedo :                    " << radiative->GetSphericalAlbedo(0) <<
-  std::endl;
-  fout << "   ----->  total gaseous transmission :                      " <<
-  radiative->GetTotalGaseousTransmission(0) << std::endl;
-  fout << "   ----->  downward transmittance :                          " << radiative->GetDownwardTransmittance(0) <<
-  std::endl;
-  fout << "   ----->  upward transmittance :                            " << radiative->GetUpwardTransmittance(0) <<
-  std::endl;
-  fout << "   ----->  upward diffuse transmittance :                    " <<
-  radiative->GetUpwardDiffuseTransmittance(0) << std::endl;
-  fout << "   ----->  upward direct transmittance :                     " <<
-  radiative->GetUpwardDirectTransmittance(0) << std::endl;
-  fout << "   ----->  upward diffuse transmittance for rayleigh :       " <<
-  radiative->GetUpwardDiffuseTransmittanceForRayleigh(0) << std::endl;
-  fout << "   ----->  upward diffuse transmittance for aerosols :       " <<
-  radiative->GetUpwardDiffuseTransmittanceForAerosol(0) << std::endl;
-  fout << "   ----->  MinSpectralValue update:                          " << functionValues->GetMinSpectralValue() <<
-  std::endl;
-  fout << "   ----->  MaxSpectralValue update :                         " << functionValues->GetMaxSpectralValue() <<
-  std::endl;
-  fout << " ---------------------------------------------------------" << std::endl;
-  fout << "Input wavelength band values [" << functionValues->GetFilterFunctionValues().size() << "]:" << std::endl;
-  for (unsigned int i = 0; i < functionValues->GetFilterFunctionValues().size(); ++i)
-    {
-    fout << "    " << functionValues->GetFilterFunctionValues()[i] << std::endl;
-    }
-  fout << " ---------------------------------------------------------" << std::endl;
-  fout << "Output wavelength band values 6S [" << functionValues->GetFilterFunctionValues6S().size() << "]:" <<
-  std::endl;
-  for (unsigned int i = 0; i < functionValues->GetFilterFunctionValues6S().size(); ++i)
-    {
-    fout << "            " << functionValues->GetFilterFunctionValues6S()[i] << std::endl;
-    }
-  fout << std::endl;
-  fout.close();
-  return EXIT_SUCCESS;
-}
diff --git a/Testing/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTermsNew.cxx b/Testing/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTermsNew.cxx
deleted file mode 100644
index 34e58cc..0000000
--- a/Testing/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTermsNew.cxx
+++ /dev/null
@@ -1,33 +0,0 @@
-/*=========================================================================
-
-  Program:   ORFEO Toolbox
-  Language:  C++
-  Date:      $Date$
-  Version:   $Revision$
-
-
-  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
-     PURPOSE.  See the above copyright notices for more information.
-
-=========================================================================*/
-
-#include "otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h"
-#include <cstdlib>
-
-int otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTermsNew(int argc, char * argv[])
-{
-  typedef otb::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
-  AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTermsType;
-  // Instantiating object
-  AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTermsType::Pointer object =
-    AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTermsType::New();
-
-  std::cout << object << std::endl;
-
-  return EXIT_SUCCESS;
-}
diff --git a/Testing/Code/Radiometry/otbAtmosphericCorrectionSequencement.cxx b/Testing/Code/Radiometry/otbAtmosphericCorrectionSequencement.cxx
index fafc60f..33ce449 100644
--- a/Testing/Code/Radiometry/otbAtmosphericCorrectionSequencement.cxx
+++ b/Testing/Code/Radiometry/otbAtmosphericCorrectionSequencement.cxx
@@ -19,11 +19,11 @@
 
 #include "otbImageToLuminanceImageFilter.h"
 #include "otbLuminanceToReflectanceImageFilter.h"
-#include "otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h"
+#include "otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h"
 #include "otbAtmosphericCorrectionParameters.h"
 #include "otbAtmosphericRadiativeTerms.h"
 #include "otbReflectanceToSurfaceReflectanceImageFilter.h"
-#include "otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.h"
+#include "otbSurfaceAdjacencyEffectCorrectionSchemeFilter.h"
 
 #include "otbVectorImage.h"
 #include "otbImageFileReader.h"
@@ -120,23 +120,42 @@ int otbAtmosphericCorrectionSequencementTest(int argc, char *argv[])
   filterLuminanceToReflectance->SetInput(filterImageToLuminance->GetOutput());
 
 //-------------------------------
-  typedef otb::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
-  AtmosphericCorrectionParametersTo6SRadiativeTermsType;
-  typedef otb::AtmosphericCorrectionParameters
-  AtmosphericCorrectionParametersType;
-  typedef otb::AtmosphericRadiativeTerms
-  AtmosphericRadiativeTermsType;
-  typedef AtmosphericCorrectionParametersType::AerosolModelType
-  AerosolModelType;
-
-  typedef otb::FilterFunctionValues
-  FilterFunctionValuesType;
-  typedef FilterFunctionValuesType::ValuesVectorType
-  ValuesVectorType;
+  /*typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms  RadiometryCorrectionParametersToRadiativeTermsType;
+  typedef otb::AtmosphericCorrectionParameters                            AtmosphericCorrectionParametersType;
+  typedef otb::AtmosphericRadiativeTerms                                  AtmosphericRadiativeTermsType;
+  typedef AtmosphericCorrectionParametersType::AerosolModelType           AerosolModelType;
+
+  typedef otb::FilterFunctionValues                                       FilterFunctionValuesType;
+  typedef FilterFunctionValuesType::ValuesVectorType                      ValuesVectorType;
 
   AtmosphericCorrectionParametersType::Pointer dataAtmosphericCorrectionParameters =
     AtmosphericCorrectionParametersType::New();
-  AtmosphericRadiativeTermsType::Pointer dataAtmosphericRadiativeTerms = AtmosphericRadiativeTermsType::New();
+  AtmosphericRadiativeTermsType::Pointer dataAtmosphericRadiativeTerms = AtmosphericRadiativeTermsType::New(); */
+
+  typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms     CorrectionParametersToRadiativeTermsType;
+
+  typedef otb::AtmosphericCorrectionParameters                              AtmoCorrectionParametersType;
+  typedef AtmoCorrectionParametersType::Pointer                   AtmoCorrectionParametersPointerType;
+  typedef AtmoCorrectionParametersType::AerosolModelType                    AerosolModelType;
+
+  typedef otb::ImageMetadataCorrectionParameters                            AcquiCorrectionParametersType;
+  typedef AcquiCorrectionParametersType::Pointer                  AcquiCorrectionParametersPointerType;
+
+  typedef otb::AtmosphericRadiativeTerms                                    AtmosphericRadiativeTermsType;
+  typedef AtmosphericRadiativeTermsType::Pointer                  AtmosphericRadiativeTermsPointerType;
+  typedef otb::AtmosphericRadiativeTerms::DataVectorType DataVectorType;
+
+  typedef otb::FilterFunctionValues                                         FilterFunctionValuesType;
+  typedef FilterFunctionValuesType::WavelengthSpectralBandType              ValueType;                //float
+  typedef FilterFunctionValuesType::ValuesVectorType                        ValuesVectorType;         //std::vector<float>
+
+  typedef AcquiCorrectionParametersType::WavelengthSpectralBandVectorType        WavelengthSpectralBandVectorType;
+
+  AcquiCorrectionParametersPointerType paramAcqui = AcquiCorrectionParametersType::New();
+  AtmoCorrectionParametersPointerType  paramAtmo = AtmoCorrectionParametersType::New();
+  FilterFunctionValuesType::Pointer                   functionValues;
+
+
 
   double minSpectralValue(0.);
   double maxSpectralValue(0.);
@@ -168,13 +187,13 @@ int otbAtmosphericCorrectionSequencementTest(int argc, char *argv[])
     functionValues->SetMinSpectralValue(minSpectralValue);
     functionValues->SetMaxSpectralValue(maxSpectralValue);
     functionValues->SetUserStep(userStep);
-    dataAtmosphericCorrectionParameters->SetWavelengthSpectralBandWithIndex(i, functionValues);
+    paramAcqui->SetWavelengthSpectralBandWithIndex(i, functionValues);
     }
 
   fin.close();
 
   // Set parameters
-  dataAtmosphericCorrectionParameters->SetSolarZenithalAngle(filterLuminanceToReflectance->GetZenithalSolarAngle());
+  /*dataAtmosphericCorrectionParameters->SetSolarZenithalAngle(filterLuminanceToReflectance->GetZenithalSolarAngle());
   dataAtmosphericCorrectionParameters->SetSolarAzimutalAngle(static_cast<double>(atof(argv[8])));
   dataAtmosphericCorrectionParameters->SetViewingZenithalAngle(static_cast<double>(atof(argv[9])));
   dataAtmosphericCorrectionParameters->SetViewingAzimutalAngle(static_cast<double>(atof(argv[10])));
@@ -187,11 +206,26 @@ int otbAtmosphericCorrectionSequencementTest(int argc, char *argv[])
   dataAtmosphericCorrectionParameters->SetAerosolModel(aerosolModel);
   dataAtmosphericCorrectionParameters->SetAerosolOptical(static_cast<double>(atof(argv[15])));
 
-  AtmosphericCorrectionParametersTo6SRadiativeTermsType::Pointer
+  RadiometryCorrectionParametersToRadiativeTermsType::Pointer
     filterAtmosphericCorrectionParametersTo6SRadiativeTerms =
-    AtmosphericCorrectionParametersTo6SRadiativeTermsType::New();
+    RadiometryCorrectionParametersToRadiativeTermsType::New();
   filterAtmosphericCorrectionParametersTo6SRadiativeTerms->SetInput(dataAtmosphericCorrectionParameters);
-  filterAtmosphericCorrectionParametersTo6SRadiativeTerms->Update();
+  filterAtmosphericCorrectionParametersTo6SRadiativeTerms->Update(); */
+
+  paramAcqui->SetSolarZenithalAngle(filterLuminanceToReflectance->GetZenithalSolarAngle());
+  paramAcqui->SetSolarAzimutalAngle(static_cast<double>(atof(argv[8])));
+  paramAcqui->SetViewingZenithalAngle(static_cast<double>(atof(argv[9])));
+  paramAcqui->SetViewingAzimutalAngle(static_cast<double>(atof(argv[10])));
+  paramAcqui->SetMonth(month);
+  paramAcqui->SetDay(day);
+  paramAtmo->SetAtmosphericPressure(static_cast<double>(atof(argv[11])));
+  paramAtmo->SetWaterVaporAmount(static_cast<double>(atof(argv[12])));
+  paramAtmo->SetOzoneAmount(static_cast<double>(atof(argv[13])));
+  AerosolModelType aerosolModel = static_cast<AerosolModelType>(::atoi(argv[14]));
+  paramAtmo->SetAerosolModel(aerosolModel);
+  paramAtmo->SetAerosolOptical(static_cast<double>(atof(argv[15])));
+
+  AtmosphericRadiativeTermsPointerType  radiative = CorrectionParametersToRadiativeTermsType::Compute(paramAtmo,paramAcqui);
 
 //-------------------------------
 
@@ -200,29 +234,25 @@ int otbAtmosphericCorrectionSequencementTest(int argc, char *argv[])
   ReflectanceToSurfaceReflectanceImageFilterType::Pointer filterReflectanceToSurfaceReflectanceImageFilter =
     ReflectanceToSurfaceReflectanceImageFilterType::New();
 
-  filterReflectanceToSurfaceReflectanceImageFilter->SetAtmosphericRadiativeTerms(
-    filterAtmosphericCorrectionParametersTo6SRadiativeTerms->GetOutput());
+  filterReflectanceToSurfaceReflectanceImageFilter->SetAtmosphericRadiativeTerms(radiative);
   filterReflectanceToSurfaceReflectanceImageFilter->SetInput(filterLuminanceToReflectance->GetOutput());
 
 //-------------------------------
-  typedef otb::SurfaceAdjacencyEffect6SCorrectionSchemeFilter<ImageType,
-      ImageType> SurfaceAdjacencyEffect6SCorrectionSchemeFilterType;
-  SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::Pointer filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter =
-    SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::New();
-
-  filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetAtmosphericRadiativeTerms(
-    filterAtmosphericCorrectionParametersTo6SRadiativeTerms->GetOutput());
-  filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetWindowRadius(atoi(argv[17]));
-  filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetPixelSpacingInKilometers(static_cast<double>(atof(argv[18])));
-  filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetZenithalViewingAngle(
-    dataAtmosphericCorrectionParameters->GetViewingZenithalAngle());
-  filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->SetInput(
-    filterReflectanceToSurfaceReflectanceImageFilter->GetOutput());
+  typedef otb::SurfaceAdjacencyEffectCorrectionSchemeFilter<ImageType,
+      ImageType> SurfaceAdjacencyEffectCorrectionSchemeFilterType;
+  SurfaceAdjacencyEffectCorrectionSchemeFilterType::Pointer filterSurfaceAdjacencyEffectCorrectionSchemeFilter =
+    SurfaceAdjacencyEffectCorrectionSchemeFilterType::New();
+
+  filterSurfaceAdjacencyEffectCorrectionSchemeFilter->SetAtmosphericRadiativeTerms(radiative);
+  filterSurfaceAdjacencyEffectCorrectionSchemeFilter->SetWindowRadius(atoi(argv[17]));
+  filterSurfaceAdjacencyEffectCorrectionSchemeFilter->SetPixelSpacingInKilometers(static_cast<double>(atof(argv[18])));
+  filterSurfaceAdjacencyEffectCorrectionSchemeFilter->SetZenithalViewingAngle(paramAcqui->GetViewingZenithalAngle());
+  filterSurfaceAdjacencyEffectCorrectionSchemeFilter->SetInput(filterReflectanceToSurfaceReflectanceImageFilter->GetOutput());
 
 //-------------------------------
   WriterType::Pointer writer = WriterType::New();
   writer->SetFileName(argv[2]);
-  writer->SetInput(filterSurfaceAdjacencyEffect6SCorrectionSchemeFilter->GetOutput());
+  writer->SetInput(filterSurfaceAdjacencyEffectCorrectionSchemeFilter->GetOutput());
   writer->Update();
 
   return EXIT_SUCCESS;
diff --git a/Testing/Code/Radiometry/otbAtmosphericRadiativeTermsTest.cxx b/Testing/Code/Radiometry/otbAtmosphericRadiativeTermsTest.cxx
index 0c6aed4..8fea0ba 100644
--- a/Testing/Code/Radiometry/otbAtmosphericRadiativeTermsTest.cxx
+++ b/Testing/Code/Radiometry/otbAtmosphericRadiativeTermsTest.cxx
@@ -23,7 +23,7 @@
 #include "otbAtmosphericRadiativeTerms.h"
 #include <cstdlib>
 
-int otbAtmosphericRadiativeTermsNew(int argc, char * argv[])
+int otbAtmosphericRadiativeTermsNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::AtmosphericRadiativeTerms AtmosphericRadiativeTermsType;
 
@@ -33,7 +33,7 @@ int otbAtmosphericRadiativeTermsNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbAtmosphericRadiativeTermsSingleChannelNew(int argc, char * argv[])
+int otbAtmosphericRadiativeTermsSingleChannelNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::AtmosphericRadiativeTermsSingleChannel AtmosphericRadiativeTermsType;
 
@@ -60,7 +60,7 @@ std::ostream& operator<<(std::ostream& os, const otb::AtmosphericRadiativeTerms:
   return os;
 }
 
-int otbAtmosphericRadiativeTermsTest(int argc, char * argv[])
+int otbAtmosphericRadiativeTermsTest(int itkNotUsed(argc), char * argv[])
 {
   char * filename = argv[1];
   std::ofstream file;
diff --git a/Testing/Code/Radiometry/otbDEMCaracteristicsExtractor.cxx b/Testing/Code/Radiometry/otbDEMCaracteristicsExtractor.cxx
index 18ca558..d790c5b 100644
--- a/Testing/Code/Radiometry/otbDEMCaracteristicsExtractor.cxx
+++ b/Testing/Code/Radiometry/otbDEMCaracteristicsExtractor.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileWriter.h"
 #include "otbImageFileReader.h"
 
-int otbDEMCaracteristicsExtractor(int argc, char * argv[])
+int otbDEMCaracteristicsExtractor(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputSlotFileName = argv[6];
diff --git a/Testing/Code/Radiometry/otbDEMCaracteristicsExtractorNew.cxx b/Testing/Code/Radiometry/otbDEMCaracteristicsExtractorNew.cxx
index 1e653f9..efb70d5 100644
--- a/Testing/Code/Radiometry/otbDEMCaracteristicsExtractorNew.cxx
+++ b/Testing/Code/Radiometry/otbDEMCaracteristicsExtractorNew.cxx
@@ -20,7 +20,7 @@
 #include "otbDEMCaracteristicsExtractor.h"
 #include "otbImage.h"
 
-int otbDEMCaracteristicsExtractorNew(int argc, char * argv[])
+int otbDEMCaracteristicsExtractorNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef double                                                          PixelType;
diff --git a/Testing/Code/Radiometry/otbEVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbEVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
index f8f6537..37445a1 100644
--- a/Testing/Code/Radiometry/otbEVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbEVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbVegetationIndicesFunctor.h"
 
 template<class TInputImage, class TOutputImage, class TFunction>
-int generic_EVIMultiChannelRAndBAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int generic_EVIMultiChannelRAndBAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::ImageFileReader<TInputImage>  ReaderType;
   typedef otb::ImageFileWriter<TOutputImage> WriterType;
diff --git a/Testing/Code/Radiometry/otbEVIRAndBAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbEVIRAndBAndNIRVegetationIndexImageFilter.cxx
index 1ec7d5e..a781772 100644
--- a/Testing/Code/Radiometry/otbEVIRAndBAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbEVIRAndBAndNIRVegetationIndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbVegetationIndicesFunctor.h"
 
 template<class TInputRImage, class TInputBImage, class TInputNIRImage, class TOutputImage, class TFunction>
-int generic_EVIRAndBAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int generic_EVIRAndBAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::ImageFileReader<TInputRImage>   RReaderType;
   typedef otb::ImageFileReader<TInputBImage>   BReaderType;
diff --git a/Testing/Code/Radiometry/otbFilterFunctionValues.cxx b/Testing/Code/Radiometry/otbFilterFunctionValues.cxx
index 8380456..2384f0a 100644
--- a/Testing/Code/Radiometry/otbFilterFunctionValues.cxx
+++ b/Testing/Code/Radiometry/otbFilterFunctionValues.cxx
@@ -26,8 +26,6 @@
 #include "itksys/SystemTools.hxx"
 #include "otbSpectralResponse.h"
 
-
-
 int otbFilterFunctionValuesSpectralResponseTest(int argc, char * argv[])
 {
 
@@ -123,7 +121,7 @@ int otbFilterFunctionValuesTest(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbFilterFunctionValuesDigitalGlobeTest(int argc, char * argv[])
+int otbFilterFunctionValuesDigitalGlobeTest(int itkNotUsed(argc), char * argv[])
 {
   const char *       infname   = argv[1];
   const char *       outname   = argv[2];
diff --git a/Testing/Code/Radiometry/otbGAndRIndexImageFilter.cxx b/Testing/Code/Radiometry/otbGAndRIndexImageFilter.cxx
index c4224c2..4361f8d 100644
--- a/Testing/Code/Radiometry/otbGAndRIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbGAndRIndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbSoilIndicesFunctor.h"
 
 template<class TInputGImage, class TInputRImage, class TOutputImage, class TFunction>
-int generic_GAndRIndexImageFilter(int argc, char * argv[])
+int generic_GAndRIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::ImageFileReader<TInputGImage> GReaderType;
   typedef otb::ImageFileReader<TInputRImage> RReaderType;
diff --git a/Testing/Code/Radiometry/otbGAndRIndexImageFilterNew.cxx b/Testing/Code/Radiometry/otbGAndRIndexImageFilterNew.cxx
index 2e5edcb..f24c9a7 100644
--- a/Testing/Code/Radiometry/otbGAndRIndexImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbGAndRIndexImageFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "otbImage.h"
 #include "otbImage.h"
 
-int otbGAndRIndexImageFilterNew(int argc, char * argv[])
+int otbGAndRIndexImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                    PixelType;
diff --git a/Testing/Code/Radiometry/otbIBGAndRAndNIRIndexImageFilter.cxx b/Testing/Code/Radiometry/otbIBGAndRAndNIRIndexImageFilter.cxx
index d749cfc..52d42f1 100644
--- a/Testing/Code/Radiometry/otbIBGAndRAndNIRIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbIBGAndRAndNIRIndexImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "otbSoilIndicesFunctor.h"
 
-int otbIBGAndRAndNIRIndexImageFilter(int argc, char * argv[])
+int otbIBGAndRAndNIRIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/Radiometry/otbIBMultiChannelGAndRAndNIRIndexImageFilter.cxx b/Testing/Code/Radiometry/otbIBMultiChannelGAndRAndNIRIndexImageFilter.cxx
index 4376c26..ef5ff12 100644
--- a/Testing/Code/Radiometry/otbIBMultiChannelGAndRAndNIRIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbIBMultiChannelGAndRAndNIRIndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbSoilIndicesFunctor.h"
 
-int otbIBMultiChannelGAndRAndNIRIndexImageFilter(int argc, char * argv[])
+int otbIBMultiChannelGAndRAndNIRIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<double, Dimension>   InputImageType;
diff --git a/Testing/Code/Radiometry/otbISUMultiChannelRAndNIRIndexImageFilter.cxx b/Testing/Code/Radiometry/otbISUMultiChannelRAndNIRIndexImageFilter.cxx
index 3b54b59..82dcaa2 100644
--- a/Testing/Code/Radiometry/otbISUMultiChannelRAndNIRIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbISUMultiChannelRAndNIRIndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbBuiltUpIndicesFunctor.h"
 
-int otbISUMultiChannelRAndNIRIndexImageFilter(int argc, char * argv[])
+int otbISUMultiChannelRAndNIRIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<double, Dimension>   InputImageType;
diff --git a/Testing/Code/Radiometry/otbISURAndNIRIndexImageFilter.cxx b/Testing/Code/Radiometry/otbISURAndNIRIndexImageFilter.cxx
index 89a6650..5e2e3e6 100644
--- a/Testing/Code/Radiometry/otbISURAndNIRIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbISURAndNIRIndexImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "otbBuiltUpIndicesFunctor.h"
 
-int otbISURAndNIRIndexImageFilter(int argc, char * argv[])
+int otbISURAndNIRIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/Radiometry/otbImageMetadataCorrectionParametersNew.cxx b/Testing/Code/Radiometry/otbImageMetadataCorrectionParametersNew.cxx
new file mode 100644
index 0000000..91914d5
--- /dev/null
+++ b/Testing/Code/Radiometry/otbImageMetadataCorrectionParametersNew.cxx
@@ -0,0 +1,31 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+#include "otbImageMetadataCorrectionParameters.h"
+
+int otbImageMetadataCorrectionParametersNew(int argc, char * argv[])
+{
+  typedef otb::ImageMetadataCorrectionParameters CorrectionParametersType;
+  
+  // Instantiating object
+  CorrectionParametersType::Pointer objectAtmo = CorrectionParametersType::New();
+  
+  std::cout << objectAtmo << std::endl;
+  
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbImageToLuminanceImageFilter.cxx b/Testing/Code/Radiometry/otbImageToLuminanceImageFilter.cxx
index 0263b8b..43c1e60 100644
--- a/Testing/Code/Radiometry/otbImageToLuminanceImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbImageToLuminanceImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "itkVariableLengthVector.h"
 
-int otbImageToLuminanceImageFilter(int argc, char * argv[])
+int otbImageToLuminanceImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
diff --git a/Testing/Code/Radiometry/otbImageToLuminanceImageFilterAuto.cxx b/Testing/Code/Radiometry/otbImageToLuminanceImageFilterAuto.cxx
index 5757305..1cd9d92 100644
--- a/Testing/Code/Radiometry/otbImageToLuminanceImageFilterAuto.cxx
+++ b/Testing/Code/Radiometry/otbImageToLuminanceImageFilterAuto.cxx
@@ -25,7 +25,7 @@
 #include "otbMultiChannelExtractROI.h"
 
 //Test the retrieval of parameters from the image metadata
-int otbImageToLuminanceImageFilterAuto(int argc, char * argv[])
+int otbImageToLuminanceImageFilterAuto(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
@@ -37,7 +37,6 @@ int otbImageToLuminanceImageFilterAuto(int argc, char * argv[])
   typedef otb::ImageFileReader<InputImageType>                              ReaderType;
   typedef otb::ImageFileWriter<OutputImageType>                             WriterType;
   typedef otb::ImageToLuminanceImageFilter<InputImageType, OutputImageType> ImageToLuminanceImageFilterType;
-  typedef ImageToLuminanceImageFilterType::VectorType                       VectorType;
   typedef otb::MultiChannelExtractROI<PixelType, PixelType>                 RoiFilterType;
 
   ReaderType::Pointer reader  = ReaderType::New();
diff --git a/Testing/Code/Radiometry/otbImageToLuminanceImageFilterNew.cxx b/Testing/Code/Radiometry/otbImageToLuminanceImageFilterNew.cxx
index bc27437..902498a 100644
--- a/Testing/Code/Radiometry/otbImageToLuminanceImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbImageToLuminanceImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImageToLuminanceImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbImageToLuminanceImageFilterNew(int argc, char * argv[])
+int otbImageToLuminanceImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef double                                 PixelType;
diff --git a/Testing/Code/Radiometry/otbImageToReflectanceImageFilterAuto.cxx b/Testing/Code/Radiometry/otbImageToReflectanceImageFilterAuto.cxx
index 41389d2..f0590df 100644
--- a/Testing/Code/Radiometry/otbImageToReflectanceImageFilterAuto.cxx
+++ b/Testing/Code/Radiometry/otbImageToReflectanceImageFilterAuto.cxx
@@ -24,7 +24,7 @@
 #include "itkVariableLengthVector.h"
 #include "otbMultiChannelExtractROI.h"
 
-int otbImageToReflectanceImageFilterAuto(int argc, char * argv[])
+int otbImageToReflectanceImageFilterAuto(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
@@ -36,7 +36,7 @@ int otbImageToReflectanceImageFilterAuto(int argc, char * argv[])
   typedef otb::ImageFileReader<InputImageType>                                ReaderType;
   typedef otb::ImageFileWriter<OutputImageType>                               WriterType;
   typedef otb::ImageToReflectanceImageFilter<InputImageType, OutputImageType> ImageToReflectanceImageFilterType;
-  typedef ImageToReflectanceImageFilterType::VectorType                       VectorType;
+
   typedef otb::MultiChannelExtractROI<PixelType, PixelType>                   RoiFilterType;
 
   ReaderType::Pointer reader  = ReaderType::New();
diff --git a/Testing/Code/Radiometry/otbImageToReflectanceImageFilterNew.cxx b/Testing/Code/Radiometry/otbImageToReflectanceImageFilterNew.cxx
index 33f183f..7d816c9 100644
--- a/Testing/Code/Radiometry/otbImageToReflectanceImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbImageToReflectanceImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbImageToReflectanceImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbImageToReflectanceImageFilterNew(int argc, char * argv[])
+int otbImageToReflectanceImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef double                                 PixelType;
diff --git a/Testing/Code/Radiometry/otbLAIFromNDVILogarithmicFunctorTest.cxx b/Testing/Code/Radiometry/otbLAIFromNDVILogarithmicFunctorTest.cxx
index 1af1a59..b593611 100644
--- a/Testing/Code/Radiometry/otbLAIFromNDVILogarithmicFunctorTest.cxx
+++ b/Testing/Code/Radiometry/otbLAIFromNDVILogarithmicFunctorTest.cxx
@@ -18,7 +18,7 @@
 #include "itkMacro.h"
 #include "otbVegetationIndicesFunctor.h"
 
-int otbLAIFromNDVILogarithmic(int argc, char * argv[])
+int otbLAIFromNDVILogarithmic(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           PixelType;
 
diff --git a/Testing/Code/Radiometry/otbLAIFromReflectancesLinearFunctorTest.cxx b/Testing/Code/Radiometry/otbLAIFromReflectancesLinearFunctorTest.cxx
index e9cefa8..0b00a38 100644
--- a/Testing/Code/Radiometry/otbLAIFromReflectancesLinearFunctorTest.cxx
+++ b/Testing/Code/Radiometry/otbLAIFromReflectancesLinearFunctorTest.cxx
@@ -18,7 +18,7 @@
 #include "itkMacro.h"
 #include "otbVegetationIndicesFunctor.h"
 
-int otbLAIFromReflectancesLinear(int argc, char * argv[])
+int otbLAIFromReflectancesLinear(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           PixelType;
 
diff --git a/Testing/Code/Radiometry/otbLandsatTMBrightTest.cxx b/Testing/Code/Radiometry/otbLandsatTMBrightTest.cxx
index 9a91e73..1932b8f 100644
--- a/Testing/Code/Radiometry/otbLandsatTMBrightTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMBrightTest.cxx
@@ -25,7 +25,7 @@
 #include <vector>
 #include <algorithm>
 
-int otbLandsatTMBrightTest(int argc, char * argv[])
+int otbLandsatTMBrightTest(int itkNotUsed(argc), char * argv[])
 {
 
   typedef float InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexBIOTest.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexBIOTest.cxx
index 5950589..7654496 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexBIOTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexBIOTest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexBIO(int argc, char * argv[])
+int otbLandsatTMIndexBIO(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexBrightTest.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexBrightTest.cxx
index f80d519..b478997 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexBrightTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexBrightTest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexBright(int argc, char * argv[])
+int otbLandsatTMIndexBright(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexMIR1Test.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexMIR1Test.cxx
index ac5f484..f98f91c 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexMIR1Test.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexMIR1Test.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexMIR1(int argc, char * argv[])
+int otbLandsatTMIndexMIR1(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexMIR2Test.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexMIR2Test.cxx
index 2907e18..83fa345 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexMIR2Test.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexMIR2Test.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexMIR2(int argc, char * argv[])
+int otbLandsatTMIndexMIR2(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexMIRTIRTest.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexMIRTIRTest.cxx
index 6e665d1..1cd45af 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexMIRTIRTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexMIRTIRTest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexMIRTIR(int argc, char * argv[])
+int otbLandsatTMIndexMIRTIR(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexNDBBBITest.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexNDBBBITest.cxx
index dbe37d2..5402c94 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexNDBBBITest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexNDBBBITest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexNDBBBI(int argc, char * argv[])
+int otbLandsatTMIndexNDBBBI(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexNDBSITest.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexNDBSITest.cxx
index 07d0f7a..4d4ffa3 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexNDBSITest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexNDBSITest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexNDBSI(int argc, char * argv[])
+int otbLandsatTMIndexNDBSI(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexNDSITest.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexNDSITest.cxx
index 2591846..07bda88 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexNDSITest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexNDSITest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexNDSI(int argc, char * argv[])
+int otbLandsatTMIndexNDSI(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexNDSIVisTest.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexNDSIVisTest.cxx
index 2d2578b..1a1b2de 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexNDSIVisTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexNDSIVisTest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexNDSIVis(int argc, char * argv[])
+int otbLandsatTMIndexNDSIVis(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexNDVITest.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexNDVITest.cxx
index 7d07fec..0e36085 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexNDVITest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexNDVITest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexNDVI(int argc, char * argv[])
+int otbLandsatTMIndexNDVI(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexNIRTest.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexNIRTest.cxx
index 190c0d5..b1dc6f7 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexNIRTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexNIRTest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexNIR(int argc, char * argv[])
+int otbLandsatTMIndexNIR(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexTIRTest.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexTIRTest.cxx
index cf6dbb9..b2f95b1 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexTIRTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexTIRTest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexTIR(int argc, char * argv[])
+int otbLandsatTMIndexTIR(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     L7InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMIndexVisTest.cxx b/Testing/Code/Radiometry/otbLandsatTMIndexVisTest.cxx
index 4fa694a..0b10153 100644
--- a/Testing/Code/Radiometry/otbLandsatTMIndexVisTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMIndexVisTest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMIndexVis(int argc, char * argv[])
+int otbLandsatTMIndexVis(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMKernelSpectralRules.cxx b/Testing/Code/Radiometry/otbLandsatTMKernelSpectralRules.cxx
index 7017615..75113c2 100644
--- a/Testing/Code/Radiometry/otbLandsatTMKernelSpectralRules.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMKernelSpectralRules.cxx
@@ -331,7 +331,7 @@ int computeRules(double TM1, double TM2, double TM3, double TM4, double TM5, dou
 
 }
 
-int otbLandsatTMKernelSpectralRules(int argc, char * argv[])
+int otbLandsatTMKernelSpectralRules(int itkNotUsed(argc), char * argv[])
 {
   double TM1 = (::atof(argv[1]));
   double TM2 = (::atof(argv[2]));
@@ -347,7 +347,7 @@ int otbLandsatTMKernelSpectralRules(int argc, char * argv[])
 }
 
 
-int otbLandsatTMKernelSpectralRulesWithImage(int argc, char * argv[])
+int otbLandsatTMKernelSpectralRulesWithImage(int itkNotUsed(argc), char * argv[])
 {
 
   typedef double InputPixelType;
@@ -401,6 +401,3 @@ int otbLandsatTMKernelSpectralRulesWithImage(int argc, char * argv[])
 
   return EXIT_SUCCESS;
 }
-
-
-
diff --git a/Testing/Code/Radiometry/otbLandsatTMLinguisticLabelsTest.cxx b/Testing/Code/Radiometry/otbLandsatTMLinguisticLabelsTest.cxx
index 1b6a1a9..bf48745 100644
--- a/Testing/Code/Radiometry/otbLandsatTMLinguisticLabelsTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMLinguisticLabelsTest.cxx
@@ -19,7 +19,7 @@
 #include "itkFixedArray.h"
 #include "otbLandsatTMIndices.h"
 
-int otbLandsatTMLinguisticLabels(int argc, char * argv[])
+int otbLandsatTMLinguisticLabels(int itkNotUsed(argc), char * argv[])
 {
   typedef double                           OutputPixelType;
   typedef itk::FixedArray< double, 8 >     InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMSpectralRuleBasedClassifierTest.cxx b/Testing/Code/Radiometry/otbLandsatTMSpectralRuleBasedClassifierTest.cxx
index a43f829..4a769f2 100644
--- a/Testing/Code/Radiometry/otbLandsatTMSpectralRuleBasedClassifierTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMSpectralRuleBasedClassifierTest.cxx
@@ -24,7 +24,7 @@
 #include "itkUnaryFunctorImageFilter.h"
 #include <algorithm>
 
-int otbLandsatTMSpectralRuleBasedClassifierTest(int argc, char * argv[])
+int otbLandsatTMSpectralRuleBasedClassifierTest(int itkNotUsed(argc), char * argv[])
 {
 
   typedef double InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMThickCloudTest.cxx b/Testing/Code/Radiometry/otbLandsatTMThickCloudTest.cxx
index 8f5f212..17ec453 100644
--- a/Testing/Code/Radiometry/otbLandsatTMThickCloudTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMThickCloudTest.cxx
@@ -25,7 +25,7 @@
 #include <vector>
 #include <algorithm>
 
-int otbLandsatTMThickCloudTest(int argc, char * argv[])
+int otbLandsatTMThickCloudTest(int itkNotUsed(argc), char * argv[])
 {
 
   typedef double InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMThinCloudTest.cxx b/Testing/Code/Radiometry/otbLandsatTMThinCloudTest.cxx
index 8aae688..feb7667 100644
--- a/Testing/Code/Radiometry/otbLandsatTMThinCloudTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMThinCloudTest.cxx
@@ -26,7 +26,7 @@
 #include <vector>
 #include <algorithm>
 
-int otbLandsatTMThinCloudTest(int argc, char * argv[])
+int otbLandsatTMThinCloudTest(int itkNotUsed(argc), char * argv[])
 {
 
   typedef double InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLandsatTMVegetationTest.cxx b/Testing/Code/Radiometry/otbLandsatTMVegetationTest.cxx
index 1c1acd1..139d74d 100644
--- a/Testing/Code/Radiometry/otbLandsatTMVegetationTest.cxx
+++ b/Testing/Code/Radiometry/otbLandsatTMVegetationTest.cxx
@@ -26,7 +26,7 @@
 #include <vector>
 #include <algorithm>
 
-int otbLandsatTMVegetationTest(int argc, char * argv[])
+int otbLandsatTMVegetationTest(int itkNotUsed(argc), char * argv[])
 {
 
   typedef double InputPixelType;
diff --git a/Testing/Code/Radiometry/otbLuminanceToImageImageFilter.cxx b/Testing/Code/Radiometry/otbLuminanceToImageImageFilter.cxx
new file mode 100644
index 0000000..7de16fb
--- /dev/null
+++ b/Testing/Code/Radiometry/otbLuminanceToImageImageFilter.cxx
@@ -0,0 +1,68 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+
+#include "otbLuminanceToImageImageFilter.h"
+#include "otbVectorImage.h"
+#include "otbImageFileReader.h"
+#include "otbImageFileWriter.h"
+#include "itkVariableLengthVector.h"
+
+int otbLuminanceToImageImageFilter(int itkNotUsed(argc), char * argv[])
+{
+  const char * inputFileName  = argv[1];
+  const char * outputFileName = argv[2];
+
+  const unsigned int Dimension = 2;
+  typedef double                                                            PixelType;
+  typedef otb::VectorImage<PixelType, Dimension>                            InputImageType;
+  typedef otb::VectorImage<PixelType, Dimension>                            OutputImageType;
+  typedef otb::ImageFileReader<InputImageType>                              ReaderType;
+  typedef otb::ImageFileWriter<OutputImageType>                             WriterType;
+  typedef otb::LuminanceToImageImageFilter<InputImageType, OutputImageType> LuminanceToImageImageFilterType;
+  typedef LuminanceToImageImageFilterType::VectorType                       VectorType;
+
+  ReaderType::Pointer reader  = ReaderType::New();
+  WriterType::Pointer writer = WriterType::New();
+  reader->SetFileName(inputFileName);
+  writer->SetFileName(outputFileName);
+  reader->UpdateOutputInformation();
+
+  unsigned int nbOfComponent = reader->GetOutput()->GetNumberOfComponentsPerPixel();
+
+  VectorType alpha(nbOfComponent);
+  VectorType beta(nbOfComponent);
+  alpha.Fill(0);
+  beta.Fill(0);
+
+  for (unsigned int i = 0; i < nbOfComponent; ++i)
+    {
+    alpha[i] = static_cast<double>(atof(argv[i + 3]));
+    beta[i] = static_cast<double>(atof(argv[i + 7]));
+    }
+
+  // Instantiating object
+  LuminanceToImageImageFilterType::Pointer filter = LuminanceToImageImageFilterType::New();
+  filter->SetAlpha(alpha);
+  filter->SetBeta(beta);
+  filter->SetInput(reader->GetOutput());
+  writer->SetInput(filter->GetOutput());
+  writer->Update();
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbLuminanceToImageImageFilterAuto.cxx b/Testing/Code/Radiometry/otbLuminanceToImageImageFilterAuto.cxx
new file mode 100644
index 0000000..e1ebde3
--- /dev/null
+++ b/Testing/Code/Radiometry/otbLuminanceToImageImageFilterAuto.cxx
@@ -0,0 +1,73 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+
+#include "otbLuminanceToImageImageFilter.h"
+#include "otbVectorImage.h"
+#include "otbImageFileReader.h"
+#include "otbImageFileWriter.h"
+#include "itkVariableLengthVector.h"
+#include "otbMultiChannelExtractROI.h"
+
+//Test the retrieval of parameters from the image metadata
+int otbLuminanceToImageImageFilterAuto(int itkNotUsed(argc), char * argv[])
+{
+  const char * inputFileName  = argv[1];
+  const char * inputFileName2  = argv[2];
+  const char * outputFileName = argv[3];
+  const char * outputFileName2 = argv[4];
+
+  const unsigned int Dimension = 2;
+  typedef double                                                            PixelType;
+  typedef otb::VectorImage<PixelType, Dimension>                            InputImageType;
+  typedef otb::VectorImage<PixelType, Dimension>                            OutputImageType;
+  typedef otb::ImageFileReader<InputImageType>                              ReaderType;
+  typedef otb::ImageFileWriter<OutputImageType>                             WriterType;
+  typedef otb::LuminanceToImageImageFilter<InputImageType, OutputImageType> LuminanceToImageImageFilterType;
+  typedef otb::MultiChannelExtractROI<PixelType, PixelType>                 RoiFilterType;
+
+  ReaderType::Pointer reader  = ReaderType::New();
+  WriterType::Pointer writer = WriterType::New();
+  reader->SetFileName(inputFileName);
+  writer->SetFileName(outputFileName);
+  reader->UpdateOutputInformation();
+
+  ReaderType::Pointer reader2  = ReaderType::New();
+  WriterType::Pointer writer2 = WriterType::New();
+  reader2->SetFileName(inputFileName2);
+  writer2->SetFileName(outputFileName2);
+  reader2->UpdateOutputInformation();
+
+  // Instantiating object
+  LuminanceToImageImageFilterType::Pointer filter = LuminanceToImageImageFilterType::New();
+
+  filter->SetInput(reader->GetOutput());
+  writer->SetInput(filter->GetOutput());
+  writer->Update();
+
+  RoiFilterType::Pointer roiFilter = RoiFilterType::New();
+  roiFilter->SetStartX(1000);
+  roiFilter->SetStartY(1000);
+  roiFilter->SetSizeX(100);
+  roiFilter->SetSizeY(100);
+  roiFilter->SetInput(reader2->GetOutput());
+  writer2->SetInput(roiFilter->GetOutput());
+  writer2->Update();
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbLuminanceToImageImageFilterNew.cxx b/Testing/Code/Radiometry/otbLuminanceToImageImageFilterNew.cxx
new file mode 100644
index 0000000..8ae4877
--- /dev/null
+++ b/Testing/Code/Radiometry/otbLuminanceToImageImageFilterNew.cxx
@@ -0,0 +1,37 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+
+#include "otbLuminanceToImageImageFilter.h"
+#include "otbVectorImage.h"
+
+int otbLuminanceToImageImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
+{
+  const unsigned int Dimension = 2;
+  typedef double                                 PixelType;
+  typedef otb::VectorImage<PixelType, Dimension> InputImageType;
+
+  typedef otb::LuminanceToImageImageFilter<InputImageType, InputImageType> LuminanceToImageImageFilterType;
+
+  // Instantiating object
+  LuminanceToImageImageFilterType::Pointer filter = LuminanceToImageImageFilterType::New();
+
+  std::cout << filter << std::endl;
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbLuminanceToReflectanceImageFilterAuto.cxx b/Testing/Code/Radiometry/otbLuminanceToReflectanceImageFilterAuto.cxx
index 3aace93..633dec1 100644
--- a/Testing/Code/Radiometry/otbLuminanceToReflectanceImageFilterAuto.cxx
+++ b/Testing/Code/Radiometry/otbLuminanceToReflectanceImageFilterAuto.cxx
@@ -25,7 +25,7 @@
 #include "itkVariableLengthVector.h"
 #include "otbMultiChannelExtractROI.h"
 
-int otbLuminanceToReflectanceImageFilterAuto(int argc, char * argv[])
+int otbLuminanceToReflectanceImageFilterAuto(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
@@ -39,7 +39,6 @@ int otbLuminanceToReflectanceImageFilterAuto(int argc, char * argv[])
   typedef otb::ImageToLuminanceImageFilter<InputImageType, OutputImageType> ImageToLuminanceImageFilterType;
   typedef otb::LuminanceToReflectanceImageFilter<OutputImageType,
       OutputImageType> LuminanceToReflectanceImageFilterType;
-  typedef ImageToLuminanceImageFilterType::VectorType       VectorType;
   typedef otb::MultiChannelExtractROI<PixelType, PixelType> RoiFilterType;
 
   ReaderType::Pointer reader  = ReaderType::New();
diff --git a/Testing/Code/Radiometry/otbLuminanceToReflectanceImageFilterNew.cxx b/Testing/Code/Radiometry/otbLuminanceToReflectanceImageFilterNew.cxx
index d656a88..7484ce7 100644
--- a/Testing/Code/Radiometry/otbLuminanceToReflectanceImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbLuminanceToReflectanceImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbLuminanceToReflectanceImageFilter.h"
 #include "otbVectorImage.h"
 
-int otbLuminanceToReflectanceImageFilterNew(int argc, char * argv[])
+int otbLuminanceToReflectanceImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef double                                 PixelType;
diff --git a/Testing/Code/Radiometry/otbMultiChannelGAndRIndexImageFilter.cxx b/Testing/Code/Radiometry/otbMultiChannelGAndRIndexImageFilter.cxx
index 58ba9fd..6062cfa 100644
--- a/Testing/Code/Radiometry/otbMultiChannelGAndRIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbMultiChannelGAndRIndexImageFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbVegetationIndicesFunctor.h"
 
 template<class TInputImage, class TOutputImage, class TFunction>
-int generic_MultiChannelGAndRIndexImageFilter(int argc, char * argv[])
+int generic_MultiChannelGAndRIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::ImageFileReader<TInputImage>  ReaderType;
   typedef otb::ImageFileWriter<TOutputImage> WriterType;
diff --git a/Testing/Code/Radiometry/otbMultiChannelGAndRIndexImageFilterNew.cxx b/Testing/Code/Radiometry/otbMultiChannelGAndRIndexImageFilterNew.cxx
index dea8cab..0d03e54 100644
--- a/Testing/Code/Radiometry/otbMultiChannelGAndRIndexImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbMultiChannelGAndRIndexImageFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbImage.h"
 #include "otbVectorImage.h"
 
-int otbMultiChannelGAndRIndexImageFilterNew(int argc, char * argv[])
+int otbMultiChannelGAndRIndexImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<unsigned char, Dimension>                              InputImageType;
diff --git a/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
index 7fe4d30..e6dfe71 100644
--- a/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbVegetationIndicesFunctor.h"
 
 template<class TInputImage, class TOutputImage, class TFunction>
-int generic_MultiChannelRAndBAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int generic_MultiChannelRAndBAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::ImageFileReader<TInputImage>  ReaderType;
   typedef otb::ImageFileWriter<TOutputImage> WriterType;
diff --git a/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilterNew.cxx b/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilterNew.cxx
index 11c3bf6..dd5bad8 100644
--- a/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbImage.h"
 #include "otbVectorImage.h"
 
-int otbMultiChannelRAndBAndNIRVegetationIndexImageFilterNew(int argc, char * argv[])
+int otbMultiChannelRAndBAndNIRVegetationIndexImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<unsigned char, Dimension> InputImageType;
diff --git a/Testing/Code/Radiometry/otbMultiChannelRAndGAndNIRIndexImageFilterNew.cxx b/Testing/Code/Radiometry/otbMultiChannelRAndGAndNIRIndexImageFilterNew.cxx
index f1323d6..0da5eef 100644
--- a/Testing/Code/Radiometry/otbMultiChannelRAndGAndNIRIndexImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbMultiChannelRAndGAndNIRIndexImageFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbImage.h"
 #include "otbVectorImage.h"
 
-int otbMultiChannelRAndGAndNIRIndexImageFilterNew(int argc, char * argv[])
+int otbMultiChannelRAndGAndNIRIndexImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<unsigned char, Dimension> InputImageType;
diff --git a/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.cxx
index a2b5ffe..284cd07 100644
--- a/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbVegetationIndicesFunctor.h"
 
 template<class TInputImage, class TOutputImage, class TFunction>
-int generic_MultiChannelRAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int generic_MultiChannelRAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::ImageFileReader<TInputImage>  ReaderType;
   typedef otb::ImageFileWriter<TOutputImage> WriterType;
diff --git a/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilterNew.cxx b/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilterNew.cxx
index 87b076c..cd3fe3a 100644
--- a/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbImage.h"
 #include "otbVectorImage.h"
 
-int otbMultiChannelRAndNIRVegetationIndexImageFilterNew(int argc, char * argv[])
+int otbMultiChannelRAndNIRVegetationIndexImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<unsigned char, Dimension> InputImageType;
diff --git a/Testing/Code/Radiometry/otbNDBIMultiChannelTM4AndTM5IndexImageFilter.cxx b/Testing/Code/Radiometry/otbNDBIMultiChannelTM4AndTM5IndexImageFilter.cxx
index 997c670..53012a6 100644
--- a/Testing/Code/Radiometry/otbNDBIMultiChannelTM4AndTM5IndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbNDBIMultiChannelTM4AndTM5IndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbBuiltUpIndicesFunctor.h"
 
-int otbNDBIMultiChannelTM4AndTM5IndexImageFilter(int argc, char * argv[])
+int otbNDBIMultiChannelTM4AndTM5IndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<double, Dimension>   InputImageType;
diff --git a/Testing/Code/Radiometry/otbNDBITM4AndTM5IndexImageFilter.cxx b/Testing/Code/Radiometry/otbNDBITM4AndTM5IndexImageFilter.cxx
index d6abcaa..356dda6 100644
--- a/Testing/Code/Radiometry/otbNDBITM4AndTM5IndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbNDBITM4AndTM5IndexImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "otbBuiltUpIndicesFunctor.h"
 
-int otbNDBITM4AndTM5IndexImageFilter(int argc, char * argv[])
+int otbNDBITM4AndTM5IndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/Radiometry/otbNDWIMultiChannelWaterIndexImageFilter.cxx b/Testing/Code/Radiometry/otbNDWIMultiChannelWaterIndexImageFilter.cxx
index 3471054..67087c4 100644
--- a/Testing/Code/Radiometry/otbNDWIMultiChannelWaterIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbNDWIMultiChannelWaterIndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbWaterIndicesFunctor.h"
 
-int otbNDWIMultiChannelWaterIndexImageFilter(int argc, char * argv[])
+int otbNDWIMultiChannelWaterIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<double, Dimension>   InputImageType;
diff --git a/Testing/Code/Radiometry/otbNDWIWaterIndexImageFilter.cxx b/Testing/Code/Radiometry/otbNDWIWaterIndexImageFilter.cxx
index 005b3ad..0d4a3e4 100644
--- a/Testing/Code/Radiometry/otbNDWIWaterIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbNDWIWaterIndexImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "otbWaterIndicesFunctor.h"
 
-int otbNDWIWaterIndexImageFilter(int argc, char * argv[])
+int otbNDWIWaterIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.cxx
index 3c1a5f0..0174ae6 100644
--- a/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbVegetationIndicesFunctor.h"
 
 template<class TInputRImage, class TInputBImage, class TInputNIRImage, class TOutputImage, class TFunction>
-int generic_RAndBAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int generic_RAndBAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::ImageFileReader<TInputRImage>   RReaderType;
   typedef otb::ImageFileReader<TInputBImage>   BReaderType;
diff --git a/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilterNew.cxx b/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilterNew.cxx
index 0ad2e68..8ff6ce7 100644
--- a/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbRAndBAndNIRIndexImageFilter.h"
 #include "otbImage.h"
 
-int otbRAndBAndNIRVegetationIndexImageFilterNew(int argc, char * argv[])
+int otbRAndBAndNIRVegetationIndexImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                    PixelType;
diff --git a/Testing/Code/Radiometry/otbRAndGAndNIRVegetationIndexImageFilterNew.cxx b/Testing/Code/Radiometry/otbRAndGAndNIRVegetationIndexImageFilterNew.cxx
index 0619baa..6a9dff3 100644
--- a/Testing/Code/Radiometry/otbRAndGAndNIRVegetationIndexImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbRAndGAndNIRVegetationIndexImageFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbRAndGAndNIRIndexImageFilter.h"
 #include "otbImage.h"
 
-int otbRAndGAndNIRVegetationIndexImageFilterNew(int argc, char * argv[])
+int otbRAndGAndNIRVegetationIndexImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                    PixelType;
diff --git a/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.cxx
index e96e6ed..7bfaa42 100644
--- a/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbVegetationIndicesFunctor.h"
 
 template<class TInputRImage, class TInputNIRImage, class TOutputImage, class TFunction>
-int generic_RAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int generic_RAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::ImageFileReader<TInputRImage>   RReaderType;
   typedef otb::ImageFileReader<TInputNIRImage> NIRReaderType;
diff --git a/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilterNew.cxx b/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilterNew.cxx
index 0573323..4895ed9 100644
--- a/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "otbImage.h"
 #include "otbImage.h"
 
-int otbRAndNIRVegetationIndexImageFilterNew(int argc, char * argv[])
+int otbRAndNIRVegetationIndexImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef unsigned char                    PixelType;
diff --git a/Testing/Code/Radiometry/otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.cxx b/Testing/Code/Radiometry/otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.cxx
new file mode 100644
index 0000000..1ad9654
--- /dev/null
+++ b/Testing/Code/Radiometry/otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.cxx
@@ -0,0 +1,178 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+#include "otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h"
+#include "otbAtmosphericCorrectionParameters.h"
+#include "otbImageMetadataCorrectionParameters.h"
+#include "otbAtmosphericRadiativeTerms.h"
+#include <vector>
+#include <fstream>
+#include <iostream>
+#include <iomanip>
+#include <cstdlib>
+
+int otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms(int argc, char * argv[])
+{
+  const char * wavelenghFile  = argv[1];
+  const char * outputFile     = argv[2];
+
+  typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms CorrectionParametersToRadiativeTermsType;
+  typedef otb::AtmosphericCorrectionParameters                              AtmoCorrectionParametersType;
+  typedef otb::ImageMetadataCorrectionParameters                             AcquiCorrectionParametersType;
+  typedef otb::AtmosphericRadiativeTerms                                    RadiativeTermsType;
+  typedef AtmoCorrectionParametersType::AerosolModelType                        AerosolModelType;
+  typedef otb::FilterFunctionValues                                         FilterFunctionValuesType;
+  typedef FilterFunctionValuesType::WavelengthSpectralBandType              ValueType;
+  typedef FilterFunctionValuesType::ValuesVectorType                        ValuesVectorType;
+
+  // Instantiating object
+  AtmoCorrectionParametersType::Pointer                   paramAtmo          = AtmoCorrectionParametersType::New();
+  AcquiCorrectionParametersType::Pointer                  paramAcqui         = AcquiCorrectionParametersType::New();
+  AerosolModelType                                    aerosolModel;
+  FilterFunctionValuesType::Pointer                   functionValues = FilterFunctionValuesType::New();
+  ValuesVectorType                                    vect;
+
+  ValueType val = 0.0025;
+
+  vect.clear();
+
+  // Filter function values initialization
+  float minSpectralValue(0.);
+  float maxSpectralValue(0.);
+  float value(0.);
+  // Correction parameters initialization
+  double       solarZenithalAngle(0.);
+  double       solarAzimutalAngle(0.);
+  double       viewingZenithalAngle(0.);
+  double       viewingAzimutalAngle(0.);
+  unsigned int month(0);
+  unsigned int day(0);
+  double       atmosphericPressure(0.);
+  double       waterVaporAmount(0.);
+  double       ozoneAmount(0.);
+  double       aerosolOptical(0.);
+
+  std::ifstream fin;
+  std::ofstream fout;
+  //Read input file parameters
+  fin.open(wavelenghFile);
+  fin >> solarZenithalAngle; //asol;
+  fin >> solarAzimutalAngle; //phi0;
+  fin >> viewingZenithalAngle; //avis;
+  fin >> viewingAzimutalAngle; //phiv;
+  fin >> month; //month;
+  fin >> day; //jday;
+  fin >> atmosphericPressure; //pressure;
+  fin >> waterVaporAmount; //uw;
+  fin >> ozoneAmount; //uo3;
+  unsigned int aer(0);
+  fin >> aer; //iaer;
+  aerosolModel = static_cast<AerosolModelType>(aer);
+  fin >> aerosolOptical; //taer55;
+  fin >> minSpectralValue; //wlinf;
+  fin >> maxSpectralValue; //wlsup;
+
+  std::string line;
+  std::getline(fin, line);
+  while (std::getline(fin, line))
+    {
+    value = atof(line.c_str());
+    vect.push_back(value);
+    }
+
+  fin.close();
+  functionValues->SetFilterFunctionValues(vect);
+  functionValues->SetMinSpectralValue(minSpectralValue);
+  functionValues->SetMaxSpectralValue(maxSpectralValue);
+  functionValues->SetUserStep(val);
+  paramAcqui->SetWavelengthSpectralBandWithIndex(0, functionValues);
+
+  // Set parameters
+  paramAcqui->SetSolarZenithalAngle(static_cast<double>(solarZenithalAngle));
+  paramAcqui->SetSolarAzimutalAngle(static_cast<double>(solarAzimutalAngle));
+  paramAcqui->SetViewingZenithalAngle(static_cast<double>(viewingZenithalAngle));
+  paramAcqui->SetViewingAzimutalAngle(static_cast<double>(viewingAzimutalAngle));
+  paramAcqui->SetMonth(month);
+  paramAcqui->SetDay(day);
+  paramAtmo->SetAtmosphericPressure(static_cast<double>(atmosphericPressure));
+  paramAtmo->SetWaterVaporAmount(static_cast<double>(waterVaporAmount));
+  paramAtmo->SetOzoneAmount(static_cast<double>(ozoneAmount));
+  paramAtmo->SetAerosolModel(aerosolModel);
+  paramAtmo->SetAerosolOptical(static_cast<double>(aerosolOptical));
+
+  RadiativeTermsType::Pointer  radiative = CorrectionParametersToRadiativeTermsType::Compute(paramAtmo,paramAcqui);
+
+
+  fout.open(outputFile);
+  fout << " ---------------------------------------------------------" << std::endl;
+  fout << "Inputs values:" << std::setprecision(10) << std::endl;
+  fout << "   ----->  SolarZenithalAngle :                              " << solarZenithalAngle << std::endl;
+  fout << "   ----->  SolarAzimutalAngle :                              " << solarAzimutalAngle << std::endl;
+  fout << "   ----->  ViewingZenithalAngle :                            " << viewingZenithalAngle << std::endl;
+  fout << "   ----->  ViewingAzimutalAngle :                            " << viewingAzimutalAngle << std::endl;
+  fout << "   ----->  Month :                                           " << month << std::endl;
+  fout << "   ----->  Day :                                             " << day << std::endl;
+  fout << "   ----->  AtmosphericPressure :                             " << atmosphericPressure << std::endl;
+  fout << "   ----->  WaterVaporAmount :                                " << waterVaporAmount << std::endl;
+  fout << "   ----->  OzoneAmount :                                     " << ozoneAmount << std::endl;
+  fout << "   ----->  AerosolModel :                                    " << aer << std::endl;
+  fout << "   ----->  AerosolOptical :                                  " << aerosolOptical << std::endl;
+  fout << "   ----->  MinSpectralValue :                                " << minSpectralValue << std::endl;
+  fout << "   ----->  MaxSpectralValue :                                " << maxSpectralValue << std::endl;
+  fout << "   ----->  UserStep :                                        " << functionValues->GetUserStep() << std::endl;
+  fout << " ---------------------------------------------------------" << std::endl;
+  fout << "Outputs values:" << std::endl;
+  fout << "   ----->  atmospheric reflectance :                         " <<
+  radiative->GetIntrinsicAtmosphericReflectance(0) << std::endl;
+  fout << "   ----->  atmospheric spherical albedo :                    " << radiative->GetSphericalAlbedo(0) <<
+  std::endl;
+  fout << "   ----->  total gaseous transmission :                      " <<
+  radiative->GetTotalGaseousTransmission(0) << std::endl;
+  fout << "   ----->  downward transmittance :                          " << radiative->GetDownwardTransmittance(0) <<
+  std::endl;
+  fout << "   ----->  upward transmittance :                            " << radiative->GetUpwardTransmittance(0) <<
+  std::endl;
+  fout << "   ----->  upward diffuse transmittance :                    " <<
+  radiative->GetUpwardDiffuseTransmittance(0) << std::endl;
+  fout << "   ----->  upward direct transmittance :                     " <<
+  radiative->GetUpwardDirectTransmittance(0) << std::endl;
+  fout << "   ----->  upward diffuse transmittance for rayleigh :       " <<
+  radiative->GetUpwardDiffuseTransmittanceForRayleigh(0) << std::endl;
+  fout << "   ----->  upward diffuse transmittance for aerosols :       " <<
+  radiative->GetUpwardDiffuseTransmittanceForAerosol(0) << std::endl;
+  fout << "   ----->  MinSpectralValue update:                          " << functionValues->GetMinSpectralValue() <<
+  std::endl;
+  fout << "   ----->  MaxSpectralValue update :                         " << functionValues->GetMaxSpectralValue() <<
+  std::endl;
+  fout << " ---------------------------------------------------------" << std::endl;
+  fout << "Input wavelength band values [" << functionValues->GetFilterFunctionValues().size() << "]:" << std::endl;
+  for (unsigned int i = 0; i < functionValues->GetFilterFunctionValues().size(); ++i)
+    {
+    fout << "    " << functionValues->GetFilterFunctionValues()[i] << std::endl;
+    }
+  fout << " ---------------------------------------------------------" << std::endl;
+  fout << "Output wavelength band values 6S [" << functionValues->GetFilterFunctionValues6S().size() << "]:" <<
+  std::endl;
+  for (unsigned int i = 0; i < functionValues->GetFilterFunctionValues6S().size(); ++i)
+    {
+    fout << "            " << functionValues->GetFilterFunctionValues6S()[i] << std::endl;
+    }
+  fout << std::endl;
+  fout.close();
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbRadiometryCorrectionParametersToAtmosphericRadiativeTermsNew.cxx b/Testing/Code/Radiometry/otbRadiometryCorrectionParametersToAtmosphericRadiativeTermsNew.cxx
new file mode 100644
index 0000000..897cd9d
--- /dev/null
+++ b/Testing/Code/Radiometry/otbRadiometryCorrectionParametersToAtmosphericRadiativeTermsNew.cxx
@@ -0,0 +1,35 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+
+#include "otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h"
+#include <cstdlib>
+
+int otbRadiometryCorrectionParametersToAtmosphericRadiativeTermsNew(int argc, char * argv[])
+{
+  typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms
+  RadiometryCorrectionParametersToAtmosphericRadiativeTermsType;
+  // Instantiating object
+  //RadiometryCorrectionParametersToAtmosphericRadiativeTermsType::Pointer object =
+  //  RadiometryCorrectionParametersToAtmosphericRadiativeTermsType::New();
+
+  RadiometryCorrectionParametersToAtmosphericRadiativeTermsType* object = new RadiometryCorrectionParametersToAtmosphericRadiativeTermsType;
+
+  std::cout << object << std::endl;
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbRadiometryTests2.cxx b/Testing/Code/Radiometry/otbRadiometryTests2.cxx
index eb18496..b80e68c 100644
--- a/Testing/Code/Radiometry/otbRadiometryTests2.cxx
+++ b/Testing/Code/Radiometry/otbRadiometryTests2.cxx
@@ -37,4 +37,13 @@ void RegisterTests()
   REGISTER_TEST(otbImageToReflectanceImageFilterNew);
   REGISTER_TEST(otbImageToReflectanceImageFilter);
   REGISTER_TEST(otbImageToReflectanceImageFilterAuto);
+  REGISTER_TEST(otbLuminanceToImageImageFilterNew);
+  REGISTER_TEST(otbLuminanceToImageImageFilter);
+  REGISTER_TEST(otbLuminanceToImageImageFilterAuto);
+  REGISTER_TEST(otbReflectanceToLuminanceImageFilterNew);
+  REGISTER_TEST(otbReflectanceToLuminanceImageFilter);
+  REGISTER_TEST(otbReflectanceToLuminanceImageFilterAuto);
+  REGISTER_TEST(otbReflectanceToImageImageFilterNew);
+  REGISTER_TEST(otbReflectanceToImageImageFilter);
+  REGISTER_TEST(otbReflectanceToImageImageFilterAuto);
 }
diff --git a/Testing/Code/Radiometry/otbRadiometryTests3.cxx b/Testing/Code/Radiometry/otbRadiometryTests3.cxx
index cdf48de..2cf2fd0 100644
--- a/Testing/Code/Radiometry/otbRadiometryTests3.cxx
+++ b/Testing/Code/Radiometry/otbRadiometryTests3.cxx
@@ -27,6 +27,7 @@ void RegisterTests()
   REGISTER_TEST(otbDEMCaracteristicsExtractorNew);
   REGISTER_TEST(otbDEMCaracteristicsExtractor);
   REGISTER_TEST(otbAtmosphericCorrectionParametersNew);
+  REGISTER_TEST(otbImageMetadataCorrectionParametersNew);
   REGISTER_TEST(otbFilterFunctionValuesTest);
   REGISTER_TEST(otbFilterFunctionValuesSpectralResponseTest);
   REGISTER_TEST(otbFilterFunctionValuesDigitalGlobeTest);
@@ -38,7 +39,7 @@ void RegisterTests()
   REGISTER_TEST(otbReflectanceToSurfaceReflectanceImageFilterNew);
   REGISTER_TEST(otbReflectanceToSurfaceReflectanceImageFilterTest);
   REGISTER_TEST(otbReflectanceToSurfaceReflectanceImageFilterTest2);
-  REGISTER_TEST(otbSurfaceAdjacencyEffect6SCorrectionSchemeFilterNew);
-  REGISTER_TEST(otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter);
+  REGISTER_TEST(otbSurfaceAdjacencyEffectCorrectionSchemeFilterNew);
+  REGISTER_TEST(otbSurfaceAdjacencyEffectCorrectionSchemeFilter);
   REGISTER_TEST(otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter);
 }
diff --git a/Testing/Code/Radiometry/otbRadiometryTests4.cxx b/Testing/Code/Radiometry/otbRadiometryTests4.cxx
index db230c7..be12929 100644
--- a/Testing/Code/Radiometry/otbRadiometryTests4.cxx
+++ b/Testing/Code/Radiometry/otbRadiometryTests4.cxx
@@ -24,8 +24,8 @@
 
 void RegisterTests()
 {
-  REGISTER_TEST(otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTermsNew);
-  REGISTER_TEST(otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms);
+  REGISTER_TEST(otbRadiometryCorrectionParametersToAtmosphericRadiativeTermsNew);
+  REGISTER_TEST(otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms);
   REGISTER_TEST(otbAtmosphericCorrectionSequencementTest);
   REGISTER_TEST(otbEVIRAndBAndNIRVegetationIndexImageFilter);
   REGISTER_TEST(otbEVIMultiChannelRAndBAndNIRVegetationIndexImageFilter);
diff --git a/Testing/Code/Radiometry/otbReflectanceToImageImageFilter.cxx b/Testing/Code/Radiometry/otbReflectanceToImageImageFilter.cxx
new file mode 100644
index 0000000..5570816
--- /dev/null
+++ b/Testing/Code/Radiometry/otbReflectanceToImageImageFilter.cxx
@@ -0,0 +1,183 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+
+#include "otbReflectanceToImageImageFilter.h"
+
+//#include "otbReflectanceToLuminanceImageFilter.h"
+//#include "otbLuminanceToImageImageFilter.h"
+
+#include "otbVectorImage.h"
+#include "otbImageFileReader.h"
+#include "otbImageFileWriter.h"
+#include "itkVariableLengthVector.h"
+
+int otbReflectanceToImageImageFilter(int argc, char * argv[])
+{
+  const char * inputFileName  = argv[1];
+  const char * outputFileName = argv[2];
+  const double angle = static_cast<double>(atof(argv[3]));
+  double       flux = 0.;
+  int          day = 1;
+  int          month = 1;
+
+  if (argc == 17)
+    {
+    flux = static_cast<double>(atof(argv[16]));
+    }
+  else
+    {
+    day = atoi(argv[16]);
+    month = atoi(argv[17]);
+    }
+
+  const unsigned int Dimension = 2;
+  typedef double                                                              PixelType;
+  typedef otb::VectorImage<PixelType, Dimension>                              InputImageType;
+  typedef otb::VectorImage<PixelType, Dimension>                              OutputImageType;
+  typedef otb::ImageFileReader<InputImageType>                                ReaderType;
+  typedef otb::ImageFileWriter<OutputImageType>                               WriterType;
+  typedef otb::ReflectanceToImageImageFilter<InputImageType, OutputImageType> ReflectanceToImageImageFilterType;
+  typedef ReflectanceToImageImageFilterType::VectorType                       VectorType;
+
+  ReaderType::Pointer reader  = ReaderType::New();
+  WriterType::Pointer writer = WriterType::New();
+  reader->SetFileName(inputFileName);
+  writer->SetFileName(outputFileName);
+  reader->UpdateOutputInformation();
+
+  unsigned int nbOfComponent = reader->GetOutput()->GetNumberOfComponentsPerPixel();
+
+  VectorType alpha(nbOfComponent);
+  VectorType beta(nbOfComponent);
+  VectorType solarIllumination(nbOfComponent);
+  alpha.Fill(0);
+  beta.Fill(0);
+  solarIllumination.Fill(0);
+
+  for (unsigned int i = 0; i < nbOfComponent; ++i)
+    {
+    alpha[i] = static_cast<double>(atof(argv[i + 4]));
+    beta[i] = static_cast<double>(atof(argv[i + 8]));
+    solarIllumination[i] = static_cast<double>(atof(argv[i + 12]));
+    }
+
+  // Instantiating object
+  ReflectanceToImageImageFilterType::Pointer filter = ReflectanceToImageImageFilterType::New();
+
+  filter->SetAlpha(alpha);
+  filter->SetBeta(beta);
+  filter->SetZenithalSolarAngle(angle);
+  filter->SetSolarIllumination(solarIllumination);
+
+  if (argc == 17)
+    {
+    filter->SetFluxNormalizationCoefficient(flux);
+    }
+  else
+    {
+    filter->SetDay(day);
+    filter->SetMonth(month);
+    }
+
+  filter->SetInput(reader->GetOutput());
+  writer->SetInput(filter->GetOutput());
+  writer->Update();
+
+  return EXIT_SUCCESS;
+
+
+  /*const char * inputFileName  = argv[1];
+  const char * outputFileName = argv[2];
+  const double angle = static_cast<double>(atof(argv[3]));
+  double       flux = 0.;
+  int          day = 1;
+  int          month = 1;
+
+  if (argc == 17)
+    {
+    flux = static_cast<double>(atof(argv[16]));
+    }
+  else
+    {
+    day = atoi(argv[16]);
+    month = atoi(argv[17]);
+    }
+
+  const unsigned int Dimension = 2;
+  typedef double                                                              PixelType;
+  typedef otb::VectorImage<PixelType, Dimension>                              InputImageType;
+  typedef otb::VectorImage<PixelType, Dimension>                              OutputImageType;
+  typedef otb::ImageFileReader<InputImageType>                                ReaderType;
+  typedef otb::ImageFileWriter<OutputImageType>                               WriterType;
+
+typedef otb::ReflectanceToLuminanceImageFilter<InputImageType, InputImageType> ReflectanceToLuminanceImageFilterType;
+typedef otb::LuminanceToImageImageFilter<InputImageType, OutputImageType> LuminanceToImageImageFilterType;
+
+  typedef ReflectanceToLuminanceImageFilterType::VectorType                       VectorType;
+
+  ReaderType::Pointer reader  = ReaderType::New();
+  WriterType::Pointer writer = WriterType::New();
+  reader->SetFileName(inputFileName);
+  writer->SetFileName(outputFileName);
+  reader->UpdateOutputInformation();
+
+  unsigned int nbOfComponent = reader->GetOutput()->GetNumberOfComponentsPerPixel();
+
+  VectorType alpha(nbOfComponent);
+  VectorType beta(nbOfComponent);
+  VectorType solarIllumination(nbOfComponent);
+  alpha.Fill(0);
+  beta.Fill(0);
+  solarIllumination.Fill(0);
+
+  for (unsigned int i = 0; i < nbOfComponent; ++i)
+    {
+    alpha[i] = static_cast<double>(atof(argv[i + 4]));
+    beta[i] = static_cast<double>(atof(argv[i + 8]));
+    solarIllumination[i] = static_cast<double>(atof(argv[i + 12]));
+    }
+
+  // Instantiating object
+
+ReflectanceToLuminanceImageFilterType::Pointer filter = ReflectanceToLuminanceImageFilterType::New();
+LuminanceToImageImageFilterType::Pointer filter2 = LuminanceToImageImageFilterType::New();
+
+  filter2->SetAlpha(alpha);
+  filter2->SetBeta(beta);
+  filter->SetZenithalSolarAngle(angle);
+  filter->SetSolarIllumination(solarIllumination);
+
+  if (argc == 17)
+    {
+    filter->SetFluxNormalizationCoefficient(flux);
+    }
+  else
+    {
+    filter->SetDay(day);
+    filter->SetMonth(month);
+    }
+
+  filter->SetInput(reader->GetOutput());
+  filter2->SetInput(filter->GetOutput());
+  writer->SetInput(filter2->GetOutput());
+  writer->Update();
+
+  return EXIT_SUCCESS; */
+
+}
diff --git a/Testing/Code/Radiometry/otbReflectanceToImageImageFilterAuto.cxx b/Testing/Code/Radiometry/otbReflectanceToImageImageFilterAuto.cxx
new file mode 100644
index 0000000..f6d143f
--- /dev/null
+++ b/Testing/Code/Radiometry/otbReflectanceToImageImageFilterAuto.cxx
@@ -0,0 +1,71 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+
+#include "otbReflectanceToImageImageFilter.h"
+#include "otbVectorImage.h"
+#include "otbImageFileReader.h"
+#include "otbImageFileWriter.h"
+#include "itkVariableLengthVector.h"
+#include "otbMultiChannelExtractROI.h"
+
+int otbReflectanceToImageImageFilterAuto(int itkNotUsed(argc), char * argv[])
+{
+  const char * inputFileName  = argv[1];
+  const char * inputFileName2  = argv[2];
+  const char * outputFileName = argv[3];
+  const char * outputFileName2 = argv[4];
+
+  const unsigned int Dimension = 2;
+  typedef double                                                              PixelType;
+  typedef otb::VectorImage<PixelType, Dimension>                              InputImageType;
+  typedef otb::VectorImage<PixelType, Dimension>                              OutputImageType;
+  typedef otb::ImageFileReader<InputImageType>                                ReaderType;
+  typedef otb::ImageFileWriter<OutputImageType>                               WriterType;
+  typedef otb::ReflectanceToImageImageFilter<InputImageType, OutputImageType> ReflectanceToImageImageFilterType;
+  typedef otb::MultiChannelExtractROI<PixelType, PixelType>                   RoiFilterType;
+
+  ReaderType::Pointer reader  = ReaderType::New();
+  WriterType::Pointer writer = WriterType::New();
+  reader->SetFileName(inputFileName);
+  writer->SetFileName(outputFileName);
+  reader->UpdateOutputInformation();
+
+  ReaderType::Pointer reader2  = ReaderType::New();
+  WriterType::Pointer writer2 = WriterType::New();
+  reader2->SetFileName(inputFileName2);
+  writer2->SetFileName(outputFileName2);
+  reader2->UpdateOutputInformation();
+
+  // Instantiating object
+  ReflectanceToImageImageFilterType::Pointer filter = ReflectanceToImageImageFilterType::New();
+  filter->SetInput(reader->GetOutput());
+  writer->SetInput(filter->GetOutput());
+  writer->Update();
+
+  RoiFilterType::Pointer roiFilter = RoiFilterType::New();
+  roiFilter->SetStartX(1000);
+  roiFilter->SetStartY(1000);
+  roiFilter->SetSizeX(100);
+  roiFilter->SetSizeY(100);
+  roiFilter->SetInput(reader2->GetOutput());
+  writer2->SetInput(roiFilter->GetOutput());
+  writer2->Update();
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbReflectanceToImageImageFilterNew.cxx b/Testing/Code/Radiometry/otbReflectanceToImageImageFilterNew.cxx
new file mode 100644
index 0000000..c2c0dda
--- /dev/null
+++ b/Testing/Code/Radiometry/otbReflectanceToImageImageFilterNew.cxx
@@ -0,0 +1,37 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+
+#include "otbReflectanceToImageImageFilter.h"
+#include "otbVectorImage.h"
+
+int otbReflectanceToImageImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
+{
+  const unsigned int Dimension = 2;
+  typedef double                                 PixelType;
+  typedef otb::VectorImage<PixelType, Dimension> InputImageType;
+
+  typedef otb::ReflectanceToImageImageFilter<InputImageType, InputImageType> ReflectanceToImageImageFilterType;
+
+  // Instantiating object
+  ReflectanceToImageImageFilterType::Pointer filter = ReflectanceToImageImageFilterType::New();
+
+  std::cout << filter << std::endl;
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbReflectanceToLuminanceImageFilter.cxx b/Testing/Code/Radiometry/otbReflectanceToLuminanceImageFilter.cxx
new file mode 100644
index 0000000..e008884
--- /dev/null
+++ b/Testing/Code/Radiometry/otbReflectanceToLuminanceImageFilter.cxx
@@ -0,0 +1,90 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+
+#include "otbReflectanceToLuminanceImageFilter.h"
+#include "otbVectorImage.h"
+#include "otbImageFileReader.h"
+#include "otbImageFileWriter.h"
+#include "itkVariableLengthVector.h"
+
+int otbReflectanceToLuminanceImageFilter(int argc, char * argv[])
+{
+  const char * inputFileName  = argv[1];
+  const char * outputFileName = argv[2];
+  const double angle = static_cast<double>(atof(argv[3]));
+  double       flux = 0.;
+  int          day = 1;
+  int          month = 1;
+
+  if (argc == 9)
+    {
+    flux = static_cast<double>(atof(argv[8]));
+    }
+  else
+    {
+    day = atoi(argv[8]);
+    month = atoi(argv[9]);
+    }
+
+  const unsigned int Dimension = 2;
+  typedef double                                                                  PixelType;
+  typedef otb::VectorImage<PixelType, Dimension>                                  InputImageType;
+  typedef otb::VectorImage<PixelType, Dimension>                                  OutputImageType;
+  typedef otb::ImageFileReader<InputImageType>                                    ReaderType;
+  typedef otb::ImageFileWriter<OutputImageType>                                   WriterType;
+  typedef otb::ReflectanceToLuminanceImageFilter<InputImageType, OutputImageType> ReflectanceToLuminanceImageFilterType;
+  typedef ReflectanceToLuminanceImageFilterType::VectorType                       VectorType;
+
+  ReaderType::Pointer reader  = ReaderType::New();
+  WriterType::Pointer writer = WriterType::New();
+  reader->SetFileName(inputFileName);
+  writer->SetFileName(outputFileName);
+  reader->UpdateOutputInformation();
+
+  unsigned int nbOfComponent = reader->GetOutput()->GetNumberOfComponentsPerPixel();
+  // WARNING : 1 ELEMENT FOR EACH PIXEL IMAGE COMPONENT
+  VectorType solarIllumination(nbOfComponent);
+  solarIllumination.Fill(0);
+  solarIllumination[0] = static_cast<double>(atof(argv[4]));
+  solarIllumination[1] = static_cast<double>(atof(argv[5]));
+  solarIllumination[2] = static_cast<double>(atof(argv[6]));
+  solarIllumination[3] = static_cast<double>(atof(argv[7]));
+
+  // Instantiating object
+  ReflectanceToLuminanceImageFilterType::Pointer filter = ReflectanceToLuminanceImageFilterType::New();
+
+  filter->SetZenithalSolarAngle(angle);
+  filter->SetSolarIllumination(solarIllumination);
+  filter->SetUseClamp(false);
+  if (argc == 9)
+    {
+    filter->SetFluxNormalizationCoefficient(flux);
+    }
+  else
+    {
+    filter->SetDay(day);
+    filter->SetMonth(month);
+    }
+
+  filter->SetInput(reader->GetOutput());
+  writer->SetInput(filter->GetOutput());
+  writer->Update();
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbReflectanceToLuminanceImageFilterAuto.cxx b/Testing/Code/Radiometry/otbReflectanceToLuminanceImageFilterAuto.cxx
new file mode 100644
index 0000000..a1c6b2c
--- /dev/null
+++ b/Testing/Code/Radiometry/otbReflectanceToLuminanceImageFilterAuto.cxx
@@ -0,0 +1,57 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+
+#include "otbReflectanceToLuminanceImageFilter.h"
+#include "otbVectorImage.h"
+#include "otbImageFileReader.h"
+#include "otbImageFileWriter.h"
+#include "itkVariableLengthVector.h"
+#include "otbMultiChannelExtractROI.h"
+
+int otbReflectanceToLuminanceImageFilterAuto(int itkNotUsed(argc), char * argv[])
+{
+
+const char * inputFileName  = argv[1];
+  const char * outputFileName  = argv[2];
+
+  const unsigned int Dimension = 2;
+  typedef double                                                            PixelType;
+  typedef otb::VectorImage<PixelType, Dimension>                            InputImageType;
+  typedef otb::VectorImage<PixelType, Dimension>                            OutputImageType;
+  typedef otb::ImageFileReader<InputImageType>                              ReaderType;
+  typedef otb::ImageFileWriter<OutputImageType>                             WriterType;
+  typedef otb::ReflectanceToLuminanceImageFilter<OutputImageType,
+      OutputImageType> ReflectanceToLuminanceImageFilterType;
+
+  ReaderType::Pointer reader  = ReaderType::New();
+  WriterType::Pointer writer = WriterType::New();
+  reader->SetFileName(inputFileName);
+  writer->SetFileName(outputFileName);
+  reader->UpdateOutputInformation();
+
+  // Instantiating object
+  ReflectanceToLuminanceImageFilterType::Pointer filterToLuminance = ReflectanceToLuminanceImageFilterType::New();
+
+  filterToLuminance->SetInput(reader->GetOutput());
+  writer->SetInput(filterToLuminance->GetOutput());
+  writer->Update();
+
+  return EXIT_SUCCESS;
+
+}
diff --git a/Testing/Code/Radiometry/otbReflectanceToLuminanceImageFilterNew.cxx b/Testing/Code/Radiometry/otbReflectanceToLuminanceImageFilterNew.cxx
new file mode 100644
index 0000000..c5190f3
--- /dev/null
+++ b/Testing/Code/Radiometry/otbReflectanceToLuminanceImageFilterNew.cxx
@@ -0,0 +1,37 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+
+#include "otbReflectanceToLuminanceImageFilter.h"
+#include "otbVectorImage.h"
+
+int otbReflectanceToLuminanceImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
+{
+  const unsigned int Dimension = 2;
+  typedef double                                 PixelType;
+  typedef otb::VectorImage<PixelType, Dimension> InputImageType;
+
+  typedef otb::ReflectanceToLuminanceImageFilter<InputImageType, InputImageType> ReflectanceToLuminanceImageFilterType;
+
+  // Instantiating object
+  ReflectanceToLuminanceImageFilterType::Pointer filter = ReflectanceToLuminanceImageFilterType::New();
+
+  std::cout << filter << std::endl;
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilterTest.cxx b/Testing/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilterTest.cxx
index 46eee24..52b304b 100644
--- a/Testing/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilterTest.cxx
+++ b/Testing/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilterTest.cxx
@@ -18,14 +18,20 @@
 #include "itkMacro.h"
 
 #include <fstream>
+#include <iostream>
 
 #include "otbReflectanceToSurfaceReflectanceImageFilter.h"
 #include "otbVectorImage.h"
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 #include "otbAtmosphericRadiativeTerms.h"
+#include "otbAtmosphericCorrectionParameters.h"
 
-int otbReflectanceToSurfaceReflectanceImageFilterNew(int argc, char * argv[])
+#include "itkMetaDataDictionary.h"
+#include "otbOpticalImageMetadataInterfaceFactory.h"
+#include "otbOpticalImageMetadataInterface.h"
+
+int otbReflectanceToSurfaceReflectanceImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
   typedef double                                 PixelType;
@@ -42,7 +48,7 @@ int otbReflectanceToSurfaceReflectanceImageFilterNew(int argc, char * argv[])
   return EXIT_SUCCESS;
 }
 
-int otbReflectanceToSurfaceReflectanceImageFilterTest(int argc, char * argv[])
+int otbReflectanceToSurfaceReflectanceImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
@@ -53,11 +59,14 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest(int argc, char * argv[])
   typedef otb::VectorImage<PixelType, Dimension> OutputImageType;
   typedef otb::ImageFileReader<InputImageType>   ReaderType;
   typedef otb::ImageFileWriter<OutputImageType>  WriterType;
+
   typedef otb::ReflectanceToSurfaceReflectanceImageFilter<InputImageType,
       OutputImageType>
   ReflectanceToSurfaceReflectanceImageFilterType;
+
   typedef otb::AtmosphericRadiativeTerms::DataVectorType DataVectorType;
-  otb::AtmosphericRadiativeTerms::Pointer atmo = otb::AtmosphericRadiativeTerms::New();
+  otb::AtmosphericRadiativeTerms::Pointer atmoRadTerms = otb::AtmosphericRadiativeTerms::New();
+
 
   ReaderType::Pointer reader  = ReaderType::New();
   WriterType::Pointer writer = WriterType::New();
@@ -82,16 +91,16 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest(int argc, char * argv[])
     upTrans.push_back(static_cast<double>(atof(argv[3 + j + 4 * nbChannel])));
     }
 
-  atmo->SetIntrinsicAtmosphericReflectances(intrinsic);
-  atmo->SetSphericalAlbedos(albedo);
-  atmo->SetTotalGaseousTransmissions(gaseous);
-  atmo->SetDownwardTransmittances(downTrans);
-  atmo->SetUpwardTransmittances(upTrans);
+  atmoRadTerms->SetIntrinsicAtmosphericReflectances(intrinsic);
+  atmoRadTerms->SetSphericalAlbedos(albedo);
+  atmoRadTerms->SetTotalGaseousTransmissions(gaseous);
+  atmoRadTerms->SetDownwardTransmittances(downTrans);
+  atmoRadTerms->SetUpwardTransmittances(upTrans);
 
   // Instantiating object
   ReflectanceToSurfaceReflectanceImageFilterType::Pointer filter
       = ReflectanceToSurfaceReflectanceImageFilterType::New();
-  filter->SetAtmosphericRadiativeTerms(atmo);
+  filter->SetAtmosphericRadiativeTerms(atmoRadTerms);
   filter->SetInput(reader->GetOutput());
   writer->SetInput(filter->GetOutput());
 
@@ -101,7 +110,7 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest(int argc, char * argv[])
 }
 
 //Check the correct generation of the atmospheric parameters
-int otbReflectanceToSurfaceReflectanceImageFilterTest2(int argc, char * argv[])
+int otbReflectanceToSurfaceReflectanceImageFilterTest2(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
@@ -116,6 +125,18 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest2(int argc, char * argv[])
       OutputImageType>
   ReflectanceToSurfaceReflectanceImageFilterType;
 
+  typedef otb::AtmosphericCorrectionParameters                              AtmoCorrectionParametersType;
+  typedef AtmoCorrectionParametersType::AerosolModelType                        AerosolModelType;
+  AtmoCorrectionParametersType::Pointer                   paramAtmo          = AtmoCorrectionParametersType::New();
+
+
+  paramAtmo->SetAtmosphericPressure(static_cast<double>(atof(argv[3])));
+  paramAtmo->SetWaterVaporAmount(static_cast<double>(atof(argv[4])));
+  paramAtmo->SetOzoneAmount(static_cast<double>(atof(argv[5])));
+  paramAtmo->SetAerosolModel(static_cast<AerosolModelType>(atoi(argv[6])));
+  paramAtmo->SetAerosolOptical(static_cast<double>(atof(argv[7])));
+
+
   ReaderType::Pointer reader  = ReaderType::New();
   WriterType::Pointer writer = WriterType::New();
   reader->SetFileName(inputFileName);
@@ -127,12 +148,17 @@ int otbReflectanceToSurfaceReflectanceImageFilterTest2(int argc, char * argv[])
   ReflectanceToSurfaceReflectanceImageFilterType::Pointer filter
       = ReflectanceToSurfaceReflectanceImageFilterType::New();
   filter->SetInput(reader->GetOutput());
-  filter->GenerateParameters();
+  filter->SetAtmoCorrectionParameters(paramAtmo);
+  writer->SetInput(filter->GetOutput());
+
+  writer->Update();
+
+  /*filter->GenerateParameters();
   otb::AtmosphericRadiativeTerms::Pointer terms = filter->GetAtmosphericRadiativeTerms();
 
   std::ofstream fout (outputFileName);
   fout << terms;
-  fout.close();
+  fout.close(); */
 
   return EXIT_SUCCESS;
 }
diff --git a/Testing/Code/Radiometry/otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter.cxx b/Testing/Code/Radiometry/otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter.cxx
index d5e71d8..37e2234 100644
--- a/Testing/Code/Radiometry/otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter.cxx
@@ -21,13 +21,13 @@
 #include "otbVectorImage.h"
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
-#include "otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h"
+#include "otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h"
 #include "otbAtmosphericCorrectionParameters.h"
 #include "otbAtmosphericRadiativeTerms.h"
 #include <fstream>
 #include <iostream>
 
-int otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter(int argc, char * argv[])
+int otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char *              inputFileName  = argv[1];
   const char *              outputFileName = argv[2];
@@ -44,19 +44,40 @@ int otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter(int argc, char *
   typedef otb::ReflectanceToSurfaceReflectanceImageFilter<InputImageType,
       OutputImageType>
   ReflectanceToSurfaceReflectanceImageFilterType;
-  typedef otb::AtmosphericRadiativeTerms::DataVectorType DataVectorType;
-  typedef otb::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
-  CorrectionParametersTo6SRadiativeTermsType;
-  typedef otb::AtmosphericCorrectionParameters                 CorrectionParametersType;
+  
+  typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms
+  CorrectionParametersToRadiativeTermsType;
+  /*typedef otb::AtmosphericCorrectionParameters                 CorrectionParametersType; chris
   typedef otb::AtmosphericRadiativeTerms                       RadiativeTermsType;
   typedef otb::FilterFunctionValues                            FilterFunctionValuesType;
   typedef CorrectionParametersType::AerosolModelType           AerosolModelType;
   typedef FilterFunctionValuesType::WavelengthSpectralBandType ValueType;
-  typedef FilterFunctionValuesType::ValuesVectorType           ValuesVectorType;
+  typedef FilterFunctionValuesType::ValuesVectorType           ValuesVectorType; */
+
+  typedef otb::AtmosphericCorrectionParameters                              AtmoCorrectionParametersType;
+  typedef AtmoCorrectionParametersType::Pointer                    AtmoCorrectionParametersPointerType;
+  typedef AtmoCorrectionParametersType::AerosolModelType                    AerosolModelType;
+
+  typedef otb::ImageMetadataCorrectionParameters                             AcquiCorrectionParametersType;
+  typedef AcquiCorrectionParametersType::Pointer                   AcquiCorrectionParametersPointerType;
+
+  typedef otb::AtmosphericRadiativeTerms                                    AtmosphericRadiativeTermsType;
+  typedef AtmosphericRadiativeTermsType::Pointer                   AtmosphericRadiativeTermsPointerType;
+  typedef otb::AtmosphericRadiativeTerms::DataVectorType DataVectorType;
+
+  typedef otb::FilterFunctionValues                                     FilterFunctionValuesType;
+  typedef FilterFunctionValuesType::WavelengthSpectralBandType          ValueType;                //float
+  typedef FilterFunctionValuesType::ValuesVectorType                    ValuesVectorType;         //std::vector<float>
 
-  RadiativeTermsType::Pointer                         radiative     = RadiativeTermsType::New();
-  CorrectionParametersType::Pointer                   param         = CorrectionParametersType::New();
-  CorrectionParametersTo6SRadiativeTermsType::Pointer corrToRadia   = CorrectionParametersTo6SRadiativeTermsType::New();
+  typedef AcquiCorrectionParametersType::WavelengthSpectralBandVectorType        WavelengthSpectralBandVectorType;
+
+
+
+  //AtmosphericRadiativeTermsType::Pointer                         radiative     = AtmosphericRadiativeTermsType::New(); chris
+  //CorrectionParametersType::Pointer                   param         = CorrectionParametersType::New(); chris
+  //CorrectionParametersToRadiativeTermsType*           corrToRadia   = new CorrectionParametersToRadiativeTermsType; chris
+  AcquiCorrectionParametersPointerType paramAcqui = AcquiCorrectionParametersType::New();
+  AtmoCorrectionParametersPointerType  paramAtmo = AtmoCorrectionParametersType::New();
   FilterFunctionValuesType::Pointer                   functionValues;
 
   ReaderType::Pointer reader  = ReaderType::New();
@@ -103,7 +124,7 @@ int otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter(int argc, char *
   fin >> aerosolOptical; //taer55;
   fin.close();
   // Set atmospheric parameters
-  param->SetSolarZenithalAngle(static_cast<double>(solarZenithalAngle));
+  /*param->SetSolarZenithalAngle(static_cast<double>(solarZenithalAngle));
   param->SetSolarAzimutalAngle(static_cast<double>(solarAzimutalAngle));
   param->SetViewingZenithalAngle(static_cast<double>(viewingZenithalAngle));
   param->SetViewingAzimutalAngle(static_cast<double>(viewingAzimutalAngle));
@@ -113,7 +134,20 @@ int otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter(int argc, char *
   param->SetWaterVaporAmount(static_cast<double>(waterVaporAmount));
   param->SetOzoneAmount(static_cast<double>(ozoneAmount));
   param->SetAerosolModel(aerosolModel);
-  param->SetAerosolOptical(static_cast<double>(aerosolOptical));
+  param->SetAerosolOptical(static_cast<double>(aerosolOptical)); */
+
+  paramAcqui->SetSolarZenithalAngle(solarZenithalAngle);
+  paramAcqui->SetSolarAzimutalAngle(solarAzimutalAngle);
+  paramAcqui->SetViewingZenithalAngle(viewingZenithalAngle);
+  paramAcqui->SetViewingAzimutalAngle(viewingAzimutalAngle);
+  paramAcqui->SetMonth(month);
+  paramAcqui->SetDay(day);
+  paramAtmo->SetAtmosphericPressure(atmosphericPressure);
+  paramAtmo->SetWaterVaporAmount(waterVaporAmount);
+  paramAtmo->SetOzoneAmount(ozoneAmount);
+  paramAtmo->SetAerosolModel(aerosolModel);
+  paramAtmo->SetAerosolOptical(aerosolOptical);
+
 
   ValuesVectorType vect;
   for (unsigned int j = 0; j < nbChannel; ++j)
@@ -150,15 +184,14 @@ int otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter(int argc, char *
     functionValues->SetMaxSpectralValue(maxSpectralValue);
     functionValues->SetUserStep(val);
 
-    param->SetWavelengthSpectralBandWithIndex(j, functionValues);
+    paramAcqui->SetWavelengthSpectralBandWithIndex(j, functionValues);
     }
 
-  corrToRadia->SetInput(param);
-  corrToRadia->Update();
+  AtmosphericRadiativeTermsPointerType  radiative = CorrectionParametersToRadiativeTermsType::Compute(paramAtmo,paramAcqui);
 
   // Instantiating object
   ReflectanceToSurfaceReflectanceImageFilterType::Pointer filter = ReflectanceToSurfaceReflectanceImageFilterType::New();
-  filter->SetAtmosphericRadiativeTerms(corrToRadia->GetOutput());
+  filter->SetAtmosphericRadiativeTerms(radiative);
   filter->SetInput(reader->GetOutput());
   writer->SetInput(filter->GetOutput());
 
diff --git a/Testing/Code/Radiometry/otbSIXSTraitsComputeAtmosphericParameters.cxx b/Testing/Code/Radiometry/otbSIXSTraitsComputeAtmosphericParameters.cxx
index e5e0ce7..a2e9d9e 100644
--- a/Testing/Code/Radiometry/otbSIXSTraitsComputeAtmosphericParameters.cxx
+++ b/Testing/Code/Radiometry/otbSIXSTraitsComputeAtmosphericParameters.cxx
@@ -24,7 +24,7 @@
 #include <iomanip>
 #include <cstdlib>
 
-int otbSIXSTraitsComputeAtmosphericParametersTest(int argc, char * argv[])
+int otbSIXSTraitsComputeAtmosphericParametersTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inname   = argv[1];
   const char * outname  = argv[2];
diff --git a/Testing/Code/Radiometry/otbSIXSTraitsTest.cxx b/Testing/Code/Radiometry/otbSIXSTraitsTest.cxx
index 31d81e8..1e45bbf 100644
--- a/Testing/Code/Radiometry/otbSIXSTraitsTest.cxx
+++ b/Testing/Code/Radiometry/otbSIXSTraitsTest.cxx
@@ -18,7 +18,7 @@
 
 #include "otbSIXSTraits.h"
 
-int otbSIXSTraitsTest(int argc, char * argv[])
+int otbSIXSTraitsTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   otb::SIXSTraits *var(NULL);
   var = new otb::SIXSTraits();
diff --git a/Testing/Code/Radiometry/otbSarBrightnessFunction.cxx b/Testing/Code/Radiometry/otbSarBrightnessFunction.cxx
index 9b6d795..51b6a7e 100644
--- a/Testing/Code/Radiometry/otbSarBrightnessFunction.cxx
+++ b/Testing/Code/Radiometry/otbSarBrightnessFunction.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include <iostream>
 
-int otbSarBrightnessFunction(int argc, char* argv[])
+int otbSarBrightnessFunction(int itkNotUsed(argc), char* argv[])
 {
 
   const char * infname  = argv[1];
diff --git a/Testing/Code/Radiometry/otbSarBrightnessFunctionWithoutNoise.cxx b/Testing/Code/Radiometry/otbSarBrightnessFunctionWithoutNoise.cxx
index da89262..8b0f967 100644
--- a/Testing/Code/Radiometry/otbSarBrightnessFunctionWithoutNoise.cxx
+++ b/Testing/Code/Radiometry/otbSarBrightnessFunctionWithoutNoise.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include <iostream>
 
-int otbSarBrightnessFunctionWithoutNoise(int argc, char* argv[])
+int otbSarBrightnessFunctionWithoutNoise(int itkNotUsed(argc), char* argv[])
 {
 
   const char * infname  = argv[1];
diff --git a/Testing/Code/Radiometry/otbSarBrightnessFunctor.cxx b/Testing/Code/Radiometry/otbSarBrightnessFunctor.cxx
index c230e71..a407fd5 100644
--- a/Testing/Code/Radiometry/otbSarBrightnessFunctor.cxx
+++ b/Testing/Code/Radiometry/otbSarBrightnessFunctor.cxx
@@ -19,7 +19,7 @@
 
 #include "otbSarBrightnessFunctor.h"
 
-int otbSarBrightnessFunctor(int argc, char * argv[])
+int otbSarBrightnessFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                   ScalarType;
 
diff --git a/Testing/Code/Radiometry/otbSarBrightnessFunctorWithoutNoise.cxx b/Testing/Code/Radiometry/otbSarBrightnessFunctorWithoutNoise.cxx
index e393e07..60f6445 100644
--- a/Testing/Code/Radiometry/otbSarBrightnessFunctorWithoutNoise.cxx
+++ b/Testing/Code/Radiometry/otbSarBrightnessFunctorWithoutNoise.cxx
@@ -19,7 +19,7 @@
 
 #include "otbSarBrightnessFunctor.h"
 
-int otbSarBrightnessFunctorWithoutNoise(int argc, char * argv[])
+int otbSarBrightnessFunctorWithoutNoise(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                   ScalarType;
 
diff --git a/Testing/Code/Radiometry/otbSarParametricMapFunctionTest.cxx b/Testing/Code/Radiometry/otbSarParametricMapFunctionTest.cxx
index 542e540..ee57f5b 100644
--- a/Testing/Code/Radiometry/otbSarParametricMapFunctionTest.cxx
+++ b/Testing/Code/Radiometry/otbSarParametricMapFunctionTest.cxx
@@ -23,7 +23,7 @@
 #include "otbSarParametricMapFunction.h"
 #include "itkPointSet.h"
 
-int otbSarParametricMapFunctionTest(int argc, char* argv[])
+int otbSarParametricMapFunctionTest(int itkNotUsed(argc), char* argv[])
 {
 
   const char * infname  = argv[1];
@@ -37,7 +37,6 @@ int otbSarParametricMapFunctionTest(int argc, char* argv[])
   typedef InputImageType::PixelType                       InputPixelType;
   typedef otb::ImageFileReader<InputImageType>            ReaderType;
   typedef otb::SarParametricMapFunction<InputImageType>   FunctionType;
-  typedef FunctionType::PointType                         PointType;
   typedef FunctionType::PointSetType                      PointSetType;
 
   /**Instantiation ofa Smart Pointer*/
@@ -106,4 +105,3 @@ int otbSarParametricMapFunctionTest(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
diff --git a/Testing/Code/Radiometry/otbSarParametricMapFunctionToImageFilter.cxx b/Testing/Code/Radiometry/otbSarParametricMapFunctionToImageFilter.cxx
index a7bfb9b..f79b92d 100644
--- a/Testing/Code/Radiometry/otbSarParametricMapFunctionToImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbSarParametricMapFunctionToImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "itkPointSet.h"
 
 
-int otbSarParametricMapFunctionToImageFilter(int argc, char * argv[])
+int otbSarParametricMapFunctionToImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef float                                                                     PixelType;
diff --git a/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunction.cxx b/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunction.cxx
index 42963b7..4c07289 100644
--- a/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunction.cxx
+++ b/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunction.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include <iostream>
 
-int otbSarRadiometricCalibrationFunction(int argc, char* argv[])
+int otbSarRadiometricCalibrationFunction(int itkNotUsed(argc), char* argv[])
 {
 
   const char * infname  = argv[1];
diff --git a/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctionWithoutNoise.cxx b/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctionWithoutNoise.cxx
index 40cbc2e..995f75d 100644
--- a/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctionWithoutNoise.cxx
+++ b/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctionWithoutNoise.cxx
@@ -21,7 +21,7 @@
 #include "otbImageFileReader.h"
 #include <iostream>
 
-int otbSarRadiometricCalibrationFunctionWithoutNoise(int argc, char* argv[])
+int otbSarRadiometricCalibrationFunctionWithoutNoise(int itkNotUsed(argc), char* argv[])
 {
 
   const char * infname  = argv[1];
diff --git a/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctor.cxx b/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctor.cxx
index 65af375..0cb8307 100644
--- a/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctor.cxx
+++ b/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctor.cxx
@@ -19,7 +19,7 @@
 
 #include "otbSarRadiometricCalibrationFunctor.h"
 
-int otbSarRadiometricCalibrationFunctor(int argc, char * argv[])
+int otbSarRadiometricCalibrationFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                   ScalarType;
 
diff --git a/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctorWithoutNoise.cxx b/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctorWithoutNoise.cxx
index 6494cce..6b713f1 100644
--- a/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctorWithoutNoise.cxx
+++ b/Testing/Code/Radiometry/otbSarRadiometricCalibrationFunctorWithoutNoise.cxx
@@ -19,7 +19,7 @@
 
 #include "otbSarRadiometricCalibrationFunctor.h"
 
-int otbSarRadiometricCalibrationFunctorWithoutNoise(int argc, char * argv[])
+int otbSarRadiometricCalibrationFunctorWithoutNoise(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double                   ScalarType;
 
diff --git a/Testing/Code/Radiometry/otbSetASetBMultiChannelRAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbSetASetBMultiChannelRAndNIRVegetationIndexImageFilter.cxx
index e237174..80dec5a 100644
--- a/Testing/Code/Radiometry/otbSetASetBMultiChannelRAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbSetASetBMultiChannelRAndNIRVegetationIndexImageFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbVegetationIndicesFunctor.h"
 
 template<class TInputImage, class TOutputImage, class TFunction>
-void generic_SetASetBMultiChannelRAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+void generic_SetASetBMultiChannelRAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::ImageFileReader<TInputImage>  ReaderType;
   typedef otb::ImageFileWriter<TOutputImage> WriterType;
diff --git a/Testing/Code/Radiometry/otbSetASetBRAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbSetASetBRAndNIRVegetationIndexImageFilter.cxx
index 872610c..7e024e4 100644
--- a/Testing/Code/Radiometry/otbSetASetBRAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbSetASetBRAndNIRVegetationIndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbVegetationIndicesFunctor.h"
 
 template<class TInputRImage, class TInputNIRImage, class TOutputImage, class TFunction>
-void generic_SetASetBRAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+void generic_SetASetBRAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   typedef otb::ImageFileReader<TInputRImage>   RReaderType;
   typedef otb::ImageFileReader<TInputNIRImage> NIRReaderType;
diff --git a/Testing/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.cxx b/Testing/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.cxx
deleted file mode 100644
index a65d8b3..0000000
--- a/Testing/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.cxx
+++ /dev/null
@@ -1,173 +0,0 @@
-/*=========================================================================
-
-  Program:   ORFEO Toolbox
-  Language:  C++
-  Date:      $Date$
-  Version:   $Revision$
-
-
-  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
-     PURPOSE.  See the above copyright notices for more information.
-
-=========================================================================*/
-#include "itkMacro.h"
-
-#include "otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.h"
-#include "otbVectorImage.h"
-#include "otbImage.h"
-#include "otbImageFileReader.h"
-#include "otbImageFileWriter.h"
-#include "otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h"
-#include "otbAtmosphericCorrectionParameters.h"
-#include "otbAtmosphericRadiativeTerms.h"
-#include <fstream>
-#include <iostream>
-
-int otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter(int argc, char * argv[])
-{
-  const char * inputFileName  = argv[1];
-  const char * outputFileName = argv[2];
-  const char * paramFile = argv[5];
-
-  const unsigned int Dimension = 2;
-  typedef double                                 PixelType;
-  typedef otb::VectorImage<PixelType, Dimension> InputImageType;
-  typedef otb::VectorImage<PixelType, Dimension> OutputImageType;
-  typedef otb::ImageFileReader<InputImageType>   ReaderType;
-  typedef otb::ImageFileWriter<OutputImageType>  WriterType;
-
-  typedef otb::SurfaceAdjacencyEffect6SCorrectionSchemeFilter<InputImageType,
-      OutputImageType>
-  SurfaceAdjacencyEffect6SCorrectionSchemeFilterType;
-  typedef SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::WeightingMatrixType WeightingMatrixType;
-  typedef SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::WeightingValuesContainerType
-  WeightingValuesContainerType;
-
-  typedef otb::AtmosphericRadiativeTerms::DataVectorType                    DataVectorType;
-  typedef otb::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms CorrectionParametersTo6SRadiativeTermsType;
-  typedef otb::AtmosphericCorrectionParameters                              CorrectionParametersType;
-  typedef otb::AtmosphericRadiativeTerms                                    RadiativeTermsType;
-  typedef otb::FilterFunctionValues                                         FilterFunctionValuesType;
-  typedef CorrectionParametersType::AerosolModelType                        AerosolModelType;
-  typedef FilterFunctionValuesType::WavelengthSpectralBandType              ValueType;
-  typedef FilterFunctionValuesType::ValuesVectorType                        ValuesVectorType;
-
-  RadiativeTermsType::Pointer                         radiative     = RadiativeTermsType::New();
-  CorrectionParametersType::Pointer                   param         = CorrectionParametersType::New();
-  CorrectionParametersTo6SRadiativeTermsType::Pointer corrToRadia   = CorrectionParametersTo6SRadiativeTermsType::New();
-  FilterFunctionValuesType::Pointer                   functionValues;
-  // Instantiating object
-  SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::Pointer filter =
-    SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::New();
-
-  ReaderType::Pointer reader  = ReaderType::New();
-  WriterType::Pointer writer = WriterType::New();
-  reader->SetFileName(inputFileName);
-  writer->SetFileName(outputFileName);
-  reader->UpdateOutputInformation();
-  std::vector<const char *> wavelenghFiles;
-  unsigned int              nbChannel = reader->GetOutput()->GetNumberOfComponentsPerPixel();
-  for (unsigned int i = 0; i < nbChannel; ++i)
-    {
-    wavelenghFiles.push_back(argv[i + 6]);
-    }
-
-  ValueType val = 0.0025;
-
-  // Correction parameters initialization
-  double       solarZenithalAngle(0.);
-  double       solarAzimutalAngle(0.);
-  double       viewingZenithalAngle(0.);
-  double       viewingAzimutalAngle(0.);
-  unsigned int month(0);
-  unsigned int day(0);
-  double       atmosphericPressure(0.);
-  double       waterVaporAmount(0.);
-  double       ozoneAmount(0.);
-  double       aerosolOptical(0.);
-
-  std::ifstream fin;
-  fin.open(paramFile);
-  //Read input file parameters
-  fin >> solarZenithalAngle; //asol;
-  fin >> solarAzimutalAngle; //phi0;
-  fin >> viewingZenithalAngle; //avis;
-  fin >> viewingAzimutalAngle; //phiv;
-  fin >> month; //month;
-  fin >> day; //jday;
-  fin >> atmosphericPressure; //pressure;
-  fin >> waterVaporAmount; //uw;
-  fin >> ozoneAmount; //uo3;
-  unsigned int aer(0);
-  fin >> aer; //iaer;
-  AerosolModelType aerosolModel = static_cast<AerosolModelType>(aer);
-  fin >> aerosolOptical; //taer55;
-  fin.close();
-  // Set atmospheric parameters
-  param->SetSolarZenithalAngle(static_cast<double>(solarZenithalAngle));
-  param->SetSolarAzimutalAngle(static_cast<double>(solarAzimutalAngle));
-  param->SetViewingZenithalAngle(static_cast<double>(viewingZenithalAngle));
-  param->SetViewingAzimutalAngle(static_cast<double>(viewingAzimutalAngle));
-  param->SetMonth(month);
-  param->SetDay(day);
-  param->SetAtmosphericPressure(static_cast<double>(atmosphericPressure));
-  param->SetWaterVaporAmount(static_cast<double>(waterVaporAmount));
-  param->SetOzoneAmount(static_cast<double>(ozoneAmount));
-  param->SetAerosolModel(aerosolModel);
-  param->SetAerosolOptical(static_cast<double>(aerosolOptical));
-
-  ValuesVectorType vect;
-  for (unsigned int j = 0; j < nbChannel; ++j)
-    {
-    functionValues = FilterFunctionValuesType::New();
-    vect.clear();
-
-    // Filter function values initialization
-    float minSpectralValue(0.);
-    float maxSpectralValue(0.);
-    float value(0.);
-
-    std::ifstream fin;
-    //Read input file parameters
-    fin.open(wavelenghFiles[j]);
-    fin >> minSpectralValue; //wlinf;
-    fin >> maxSpectralValue; //wlsup;
-
-    std::string line;
-    std::getline(fin, line);
-    while (std::getline(fin, line) )
-      {
-      value = atof(line.c_str());
-      vect.push_back(value);
-      std::cout << "value " << value << std::endl;
-      }
-    std::cout << "vec size " << vect.size()<< std::endl;
-    fin.close();
-    functionValues->SetFilterFunctionValues(vect);
-    functionValues->SetMinSpectralValue(minSpectralValue);
-    functionValues->SetMaxSpectralValue(maxSpectralValue);
-    functionValues->SetUserStep(val);
-
-    param->SetWavelengthSpectralBandWithIndex(j, functionValues);
-    }
-
-  corrToRadia->SetInput(param);
-  corrToRadia->Update();
-
-  filter->SetAtmosphericRadiativeTerms(corrToRadia->GetOutput());
-  filter->SetWindowRadius(atoi(argv[3]));
-  filter->SetPixelSpacingInKilometers(static_cast<double>(atof(argv[4])));
-  filter->SetZenithalViewingAngle(param->GetViewingZenithalAngle());
-
-  filter->SetInput(reader->GetOutput());
-  writer->SetInput(filter->GetOutput());
-
-  writer->Update();
-
-  return EXIT_SUCCESS;
-}
diff --git a/Testing/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilterNew.cxx b/Testing/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilterNew.cxx
deleted file mode 100644
index 2a2d9ac..0000000
--- a/Testing/Code/Radiometry/otbSurfaceAdjacencyEffect6SCorrectionSchemeFilterNew.cxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/*=========================================================================
-
-  Program:   ORFEO Toolbox
-  Language:  C++
-  Date:      $Date$
-  Version:   $Revision$
-
-
-  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
-     PURPOSE.  See the above copyright notices for more information.
-
-=========================================================================*/
-#include "itkMacro.h"
-
-#include "otbSurfaceAdjacencyEffect6SCorrectionSchemeFilter.h"
-#include "otbVectorImage.h"
-#include "otbImage.h"
-
-int otbSurfaceAdjacencyEffect6SCorrectionSchemeFilterNew(int argc, char * argv[])
-{
-  const unsigned int Dimension = 2;
-  typedef double                                 PixelType;
-  typedef otb::VectorImage<PixelType, Dimension> InputImageType;
-  typedef otb::SurfaceAdjacencyEffect6SCorrectionSchemeFilter<InputImageType,
-      InputImageType>
-  SurfaceAdjacencyEffect6SCorrectionSchemeFilterType;
-
-  // Instantiating object
-  SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::Pointer filter =
-    SurfaceAdjacencyEffect6SCorrectionSchemeFilterType::New();
-
-  std::cout << filter << std::endl;
-
-  return EXIT_SUCCESS;
-}
diff --git a/Testing/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.cxx b/Testing/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.cxx
new file mode 100644
index 0000000..549b33e
--- /dev/null
+++ b/Testing/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.cxx
@@ -0,0 +1,182 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+
+#include "otbSurfaceAdjacencyEffectCorrectionSchemeFilter.h"
+#include "otbVectorImage.h"
+#include "otbImage.h"
+#include "otbImageFileReader.h"
+#include "otbImageFileWriter.h"
+#include "otbRadiometryCorrectionParametersToAtmosphericRadiativeTerms.h"
+#include "otbAtmosphericCorrectionParameters.h"
+#include "otbAtmosphericRadiativeTerms.h"
+#include <fstream>
+#include <iostream>
+
+int otbSurfaceAdjacencyEffectCorrectionSchemeFilter(int argc, char * argv[])
+{
+  const char * inputFileName  = argv[1];
+  const char * outputFileName = argv[2];
+  const char * paramFile = argv[5];
+
+  const unsigned int Dimension = 2;
+  typedef double                                 PixelType;
+  typedef otb::VectorImage<PixelType, Dimension> InputImageType;
+  typedef otb::VectorImage<PixelType, Dimension> OutputImageType;
+  typedef otb::ImageFileReader<InputImageType>   ReaderType;
+  typedef otb::ImageFileWriter<OutputImageType>  WriterType;
+
+  typedef otb::SurfaceAdjacencyEffectCorrectionSchemeFilter<InputImageType,
+      OutputImageType>
+  SurfaceAdjacencyEffectCorrectionSchemeFilterType;
+
+
+  typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms     CorrectionParametersToRadiativeTermsType;
+
+  typedef otb::AtmosphericCorrectionParameters                              AtmoCorrectionParametersType;
+  typedef AtmoCorrectionParametersType::Pointer                    AtmoCorrectionParametersPointerType;
+  typedef AtmoCorrectionParametersType::AerosolModelType                    AerosolModelType;
+
+  typedef otb::ImageMetadataCorrectionParameters                             AcquiCorrectionParametersType;
+  typedef AcquiCorrectionParametersType::Pointer                   AcquiCorrectionParametersPointerType;
+
+  typedef otb::AtmosphericRadiativeTerms                                    AtmosphericRadiativeTermsType;
+  typedef AtmosphericRadiativeTermsType::Pointer                   AtmosphericRadiativeTermsPointerType;
+  typedef otb::AtmosphericRadiativeTerms::DataVectorType DataVectorType;
+
+  typedef otb::FilterFunctionValues                                     FilterFunctionValuesType;
+  typedef FilterFunctionValuesType::WavelengthSpectralBandType          ValueType;                //float
+  typedef FilterFunctionValuesType::ValuesVectorType                    ValuesVectorType;         //std::vector<float>
+
+  typedef AcquiCorrectionParametersType::WavelengthSpectralBandVectorType        WavelengthSpectralBandVectorType;
+
+
+  AcquiCorrectionParametersPointerType paramAcqui = AcquiCorrectionParametersType::New();
+  AtmoCorrectionParametersPointerType  paramAtmo = AtmoCorrectionParametersType::New();
+  FilterFunctionValuesType::Pointer                   functionValues;
+
+  // Instantiating object
+  SurfaceAdjacencyEffectCorrectionSchemeFilterType::Pointer filter = SurfaceAdjacencyEffectCorrectionSchemeFilterType::New();
+
+  ReaderType::Pointer reader  = ReaderType::New();
+  WriterType::Pointer writer = WriterType::New();
+  reader->SetFileName(inputFileName);
+  writer->SetFileName(outputFileName);
+  reader->UpdateOutputInformation();
+  std::vector<const char *> wavelenghFiles;
+  unsigned int              nbChannel = reader->GetOutput()->GetNumberOfComponentsPerPixel();
+  for (unsigned int i = 0; i < nbChannel; ++i)
+    {
+    wavelenghFiles.push_back(argv[i + 6]);
+    }
+
+  ValueType val = 0.0025;
+
+  // Correction parameters initialization
+  double       solarZenithalAngle(0.);
+  double       solarAzimutalAngle(0.);
+  double       viewingZenithalAngle(0.);
+  double       viewingAzimutalAngle(0.);
+  unsigned int month(0);
+  unsigned int day(0);
+  double       atmosphericPressure(0.);
+  double       waterVaporAmount(0.);
+  double       ozoneAmount(0.);
+  double       aerosolOptical(0.);
+
+  std::ifstream fin;
+  fin.open(paramFile);
+  //Read input file parameters
+  fin >> solarZenithalAngle; //asol;
+  fin >> solarAzimutalAngle; //phi0;
+  fin >> viewingZenithalAngle; //avis;
+  fin >> viewingAzimutalAngle; //phiv;
+  fin >> month; //month;
+  fin >> day; //jday;
+  fin >> atmosphericPressure; //pressure;
+  fin >> waterVaporAmount; //uw;
+  fin >> ozoneAmount; //uo3;
+  unsigned int aer(0);
+  fin >> aer; //iaer;
+  AerosolModelType aerosolModel = static_cast<AerosolModelType>(aer);
+  fin >> aerosolOptical; //taer55;
+  fin.close();
+
+  // Set atmospheric parameters
+  paramAcqui->SetSolarZenithalAngle(solarZenithalAngle);
+  paramAcqui->SetSolarAzimutalAngle(solarAzimutalAngle);
+  paramAcqui->SetViewingZenithalAngle(viewingZenithalAngle);
+  paramAcqui->SetViewingAzimutalAngle(viewingAzimutalAngle);
+  paramAcqui->SetMonth(month);
+  paramAcqui->SetDay(day);
+  paramAtmo->SetAtmosphericPressure(atmosphericPressure);
+  paramAtmo->SetWaterVaporAmount(waterVaporAmount);
+  paramAtmo->SetOzoneAmount(ozoneAmount);
+  paramAtmo->SetAerosolModel(aerosolModel);
+  paramAtmo->SetAerosolOptical(aerosolOptical);
+
+  ValuesVectorType vect;
+  for (unsigned int j = 0; j < nbChannel; ++j)
+    {
+    functionValues = FilterFunctionValuesType::New();
+    vect.clear();
+
+    // Filter function values initialization
+    float minSpectralValue(0.);
+    float maxSpectralValue(0.);
+    float value(0.);
+
+    std::ifstream fin;
+    //Read input file parameters
+    fin.open(wavelenghFiles[j]);
+    fin >> minSpectralValue; //wlinf;
+    fin >> maxSpectralValue; //wlsup;
+
+    std::string line;
+    std::getline(fin, line);
+    while (std::getline(fin, line) )
+      {
+      value = atof(line.c_str());
+      vect.push_back(value);
+      std::cout << "value " << value << std::endl;
+      }
+    std::cout << "vec size " << vect.size()<< std::endl;
+    fin.close();
+    functionValues->SetFilterFunctionValues(vect);
+    functionValues->SetMinSpectralValue(minSpectralValue);
+    functionValues->SetMaxSpectralValue(maxSpectralValue);
+    functionValues->SetUserStep(val);
+
+    paramAcqui->SetWavelengthSpectralBandWithIndex(j, functionValues);
+    }
+
+
+  AtmosphericRadiativeTermsPointerType  radiative = CorrectionParametersToRadiativeTermsType::Compute(paramAtmo,paramAcqui);
+
+  filter->SetAtmosphericRadiativeTerms(radiative);
+  filter->SetWindowRadius(atoi(argv[3]));
+  filter->SetPixelSpacingInKilometers(static_cast<double>(atof(argv[4])));
+  filter->SetZenithalViewingAngle(paramAcqui->GetViewingZenithalAngle());
+
+  filter->SetInput(reader->GetOutput());
+  writer->SetInput(filter->GetOutput());
+
+  writer->Update();
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilterNew.cxx b/Testing/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilterNew.cxx
new file mode 100644
index 0000000..8e99483
--- /dev/null
+++ b/Testing/Code/Radiometry/otbSurfaceAdjacencyEffectCorrectionSchemeFilterNew.cxx
@@ -0,0 +1,40 @@
+/*=========================================================================
+
+  Program:   ORFEO Toolbox
+  Language:  C++
+  Date:      $Date$
+  Version:   $Revision$
+
+
+  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
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#include "itkMacro.h"
+
+#include "otbSurfaceAdjacencyEffectCorrectionSchemeFilter.h"
+#include "otbVectorImage.h"
+#include "otbImage.h"
+
+int otbSurfaceAdjacencyEffectCorrectionSchemeFilterNew(int argc, char * argv[])
+{
+  const unsigned int Dimension = 2;
+  typedef double                                 PixelType;
+  typedef otb::VectorImage<PixelType, Dimension> InputImageType;
+  typedef otb::SurfaceAdjacencyEffectCorrectionSchemeFilter<InputImageType,
+      InputImageType>
+  SurfaceAdjacencyEffectCorrectionSchemeFilterType;
+
+  // Instantiating object
+  SurfaceAdjacencyEffectCorrectionSchemeFilterType::Pointer filter =
+    SurfaceAdjacencyEffectCorrectionSchemeFilterType::New();
+
+  std::cout << filter << std::endl;
+
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Radiometry/otbTSARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbTSARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
index 7229d9b..aa3a7bf 100644
--- a/Testing/Code/Radiometry/otbTSARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbTSARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbVegetationIndicesFunctor.h"
 
-int otbTSARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int otbTSARVIMultiChannelRAndBAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<double, Dimension>   InputImageType;
diff --git a/Testing/Code/Radiometry/otbTSARVIRAndBAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbTSARVIRAndBAndNIRVegetationIndexImageFilter.cxx
index 5feb8be..b6fa46d 100644
--- a/Testing/Code/Radiometry/otbTSARVIRAndBAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbTSARVIRAndBAndNIRVegetationIndexImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "otbVegetationIndicesFunctor.h"
 
-int otbTSARVIRAndBAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int otbTSARVIRAndBAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/Radiometry/otbTerraSarBrightnessFunctor.cxx b/Testing/Code/Radiometry/otbTerraSarBrightnessFunctor.cxx
index f313896..7e79fdc 100644
--- a/Testing/Code/Radiometry/otbTerraSarBrightnessFunctor.cxx
+++ b/Testing/Code/Radiometry/otbTerraSarBrightnessFunctor.cxx
@@ -21,7 +21,7 @@
 
 #include "otbTerraSarBrightnessFunctor.h"
 
-int otbTerraSarBrightnessFunctor(int argc, char * argv[])
+int otbTerraSarBrightnessFunctor(int itkNotUsed(argc), char * argv[])
 {
   char * outFilename = argv[5];
   double calFact =  atof(argv[4]);
diff --git a/Testing/Code/Radiometry/otbTerraSarBrightnessImageComplexFilterTest.cxx b/Testing/Code/Radiometry/otbTerraSarBrightnessImageComplexFilterTest.cxx
index 4d0d2d8..613d728 100644
--- a/Testing/Code/Radiometry/otbTerraSarBrightnessImageComplexFilterTest.cxx
+++ b/Testing/Code/Radiometry/otbTerraSarBrightnessImageComplexFilterTest.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbComplexToVectorImageCastFilter.h"
 
-int otbTerraSarBrightnessImageComplexFilterTest(int argc, char * argv[])
+int otbTerraSarBrightnessImageComplexFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
diff --git a/Testing/Code/Radiometry/otbTerraSarBrightnessImageFilterNew.cxx b/Testing/Code/Radiometry/otbTerraSarBrightnessImageFilterNew.cxx
index 4e7c658..abb7242 100644
--- a/Testing/Code/Radiometry/otbTerraSarBrightnessImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbTerraSarBrightnessImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbTerraSarBrightnessImageFilter.h"
 #include "otbImage.h"
 
-int otbTerraSarBrightnessImageFilterNew(int argc, char * argv[])
+int otbTerraSarBrightnessImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Image<double, 2>               ImageType;
   typedef otb::Image<std::complex<double>, 2> ComplexImageType;
diff --git a/Testing/Code/Radiometry/otbTerraSarBrightnessImageFilterTest.cxx b/Testing/Code/Radiometry/otbTerraSarBrightnessImageFilterTest.cxx
index e230f43..aaaa92d 100644
--- a/Testing/Code/Radiometry/otbTerraSarBrightnessImageFilterTest.cxx
+++ b/Testing/Code/Radiometry/otbTerraSarBrightnessImageFilterTest.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbTerraSarBrightnessImageFilterTest(int argc, char * argv[])
+int otbTerraSarBrightnessImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
diff --git a/Testing/Code/Radiometry/otbTerraSarCalibrationImageFilterNew.cxx b/Testing/Code/Radiometry/otbTerraSarCalibrationImageFilterNew.cxx
index 6ef4c95..2062139 100644
--- a/Testing/Code/Radiometry/otbTerraSarCalibrationImageFilterNew.cxx
+++ b/Testing/Code/Radiometry/otbTerraSarCalibrationImageFilterNew.cxx
@@ -20,7 +20,7 @@
 #include "otbTerraSarCalibrationImageFilter.h"
 #include "otbImage.h"
 
-int otbTerraSarCalibrationImageFilterNew(int argc, char * argv[])
+int otbTerraSarCalibrationImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::Image<double, 2>               ImageType;
   typedef otb::Image<std::complex<double>, 2> ComplexImageType;
diff --git a/Testing/Code/Radiometry/otbWDVIMultiChannelRAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbWDVIMultiChannelRAndNIRVegetationIndexImageFilter.cxx
index 18a41eb..7b1b267 100644
--- a/Testing/Code/Radiometry/otbWDVIMultiChannelRAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbWDVIMultiChannelRAndNIRVegetationIndexImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbVegetationIndicesFunctor.h"
 
-int otbWDVIMultiChannelRAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int otbWDVIMultiChannelRAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<double, Dimension>   InputImageType;
diff --git a/Testing/Code/Radiometry/otbWDVIRAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbWDVIRAndNIRVegetationIndexImageFilter.cxx
index 5a15543..10ad690 100644
--- a/Testing/Code/Radiometry/otbWDVIRAndNIRVegetationIndexImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbWDVIRAndNIRVegetationIndexImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileWriter.h"
 #include "otbVegetationIndicesFunctor.h"
 
-int otbWDVIRAndNIRVegetationIndexImageFilter(int argc, char * argv[])
+int otbWDVIRAndNIRVegetationIndexImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef double                           PixelType;
diff --git a/Testing/Code/Radiometry/otbWaterSqrtSpectralAngleImageFilter.cxx b/Testing/Code/Radiometry/otbWaterSqrtSpectralAngleImageFilter.cxx
index 41dc55d..314c0fc 100644
--- a/Testing/Code/Radiometry/otbWaterSqrtSpectralAngleImageFilter.cxx
+++ b/Testing/Code/Radiometry/otbWaterSqrtSpectralAngleImageFilter.cxx
@@ -23,7 +23,7 @@
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
 
-int otbWaterSqrtSpectralAngleImageFilter(int argc, char * argv[])
+int otbWaterSqrtSpectralAngleImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const unsigned int Dimension = 2;
   typedef otb::VectorImage<double, Dimension> InputImageType;
diff --git a/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx
index ac9ea60..117bd61 100644
--- a/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx
+++ b/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx
@@ -28,7 +28,7 @@
 #include "otbSinclairToMuellerMatrixFunctor.h"
 
 
-int otbMuellerToPolarisationDegreeAndPowerImageFilter(int argc, char * argv[])
+int otbMuellerToPolarisationDegreeAndPowerImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilterNew.cxx
index 8d3db81..9dfcabb 100644
--- a/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilterNew.cxx
+++ b/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "otbVectorImage.h"
 #include "otbMuellerToPolarisationDegreeAndPowerImageFilter.h"
 
-int otbMuellerToPolarisationDegreeAndPowerImageFilterNew(int argc, char * argv[])
+int otbMuellerToPolarisationDegreeAndPowerImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceFunctor.cxx b/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceFunctor.cxx
index 5812b14..e52054b 100644
--- a/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceFunctor.cxx
+++ b/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceFunctor.cxx
@@ -21,7 +21,7 @@
 #include "itkVariableLengthVector.h"
 #include <complex>
 
-int otbMuellerToReciprocalCovarianceFunctor(int argc, char * argv[])
+int otbMuellerToReciprocalCovarianceFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef std::complex<double>                   ComplexType;
  typedef itk::VariableLengthVector<double> VectorDoubleType;
diff --git a/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceImageFilter.cxx
index fb90acf..e3ace6f 100644
--- a/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceImageFilter.cxx
+++ b/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceImageFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbMuellerToReciprocalCovarianceImageFilter.h"
 #include "otbExtractROI.h"
 
-int otbMuellerToReciprocalCovarianceImageFilter(int argc, char * argv[])
+int otbMuellerToReciprocalCovarianceImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceImageFilterNew.cxx
index 58951f2..7417784 100644
--- a/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceImageFilterNew.cxx
+++ b/Testing/Code/SARPolarimetry/otbMuellerToReciprocalCovarianceImageFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "otbVectorImage.h"
 #include "otbMuellerToReciprocalCovarianceImageFilter.h"
 
-int otbMuellerToReciprocalCovarianceImageFilterNew(int argc, char * argv[])
+int otbMuellerToReciprocalCovarianceImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.cxx
index 0a07275..dab9e4d 100644
--- a/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.cxx
+++ b/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbMultiChannelsPolarimetricSynthesisFilter.h"
 
-int otbMultiChannelsPolarimetricSynthesisFilter(int argc, char * argv[])
+int otbMultiChannelsPolarimetricSynthesisFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename1  = argv[1];
   const char * inputFilename2  = argv[2];
diff --git a/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx
index a665a9c..253c585 100644
--- a/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx
+++ b/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx
@@ -24,7 +24,7 @@
 #include "otbVectorImage.h"
 #include "otbMultiChannelsPolarimetricSynthesisFilter.h"
 
-int otbMultiChannelsPolarimetricSynthesisFilterNew(int argc, char * argv[])
+int otbMultiChannelsPolarimetricSynthesisFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef double InputPixelType;
   typedef double OutputPixelType;
diff --git a/Testing/Code/SARPolarimetry/otbPolarimetricData.cxx b/Testing/Code/SARPolarimetry/otbPolarimetricData.cxx
index 4dccc4b..d3ad47c 100644
--- a/Testing/Code/SARPolarimetry/otbPolarimetricData.cxx
+++ b/Testing/Code/SARPolarimetry/otbPolarimetricData.cxx
@@ -21,7 +21,7 @@
 
 #include "otbPolarimetricData.h"
 
-int otbPolarimetricDataNew(int argc, char * argv[])
+int otbPolarimetricDataNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   otb::PolarimetricData::Pointer  data = otb::PolarimetricData::New();
 
@@ -30,7 +30,7 @@ int otbPolarimetricDataNew(int argc, char * argv[])
 
 
 
-int otbPolarimetricDataTest(int argc, char * argv[])
+int otbPolarimetricDataTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   otb::PolarimetricData::Pointer  data = otb::PolarimetricData::New();
 
diff --git a/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.cxx b/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.cxx
index ba86bdb..095021e 100644
--- a/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.cxx
+++ b/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.cxx
@@ -19,7 +19,7 @@
 #include "vcl_cmath.h"
 #include "otbPolarimetricSynthesisFunctor.h"
 
-int otbPolarimetricSynthesisFunctor(int argc, char * argv[])
+int otbPolarimetricSynthesisFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef std::complex<double>                   ComplexType;
 
diff --git a/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToReciprocalMuellerImageFilter.cxx b/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToReciprocalMuellerImageFilter.cxx
index baee627..f33011d 100644
--- a/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToReciprocalMuellerImageFilter.cxx
+++ b/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToReciprocalMuellerImageFilter.cxx
@@ -26,7 +26,7 @@
 #include "otbReciprocalCoherencyToReciprocalMuellerImageFilter.h"
 
 
-int otbReciprocalCoherencyToReciprocalMuellerImageFilter(int argc, char * argv[])
+int otbReciprocalCoherencyToReciprocalMuellerImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToReciprocalMuellerImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToReciprocalMuellerImageFilterNew.cxx
index 69db80c..0cb3293 100644
--- a/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToReciprocalMuellerImageFilterNew.cxx
+++ b/Testing/Code/SARPolarimetry/otbReciprocalCoherencyToReciprocalMuellerImageFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "otbVectorImage.h"
 #include "otbReciprocalCoherencyToReciprocalMuellerImageFilter.h"
 
-int otbReciprocalCoherencyToReciprocalMuellerImageFilterNew(int argc, char * argv[])
+int otbReciprocalCoherencyToReciprocalMuellerImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToCoherencyDegreeImageFilter.cxx b/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToCoherencyDegreeImageFilter.cxx
index 0d05dd3..80d72bd 100644
--- a/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToCoherencyDegreeImageFilter.cxx
+++ b/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToCoherencyDegreeImageFilter.cxx
@@ -26,7 +26,7 @@
 #include "otbReciprocalCovarianceToCoherencyDegreeImageFilter.h"
 
 
-int otbReciprocalCovarianceToCoherencyDegreeImageFilter(int argc, char * argv[])
+int otbReciprocalCovarianceToCoherencyDegreeImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToCoherencyDegreeImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToCoherencyDegreeImageFilterNew.cxx
index 2bfac7b..3b5770d 100644
--- a/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToCoherencyDegreeImageFilterNew.cxx
+++ b/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToCoherencyDegreeImageFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "otbVectorImage.h"
 #include "otbReciprocalCovarianceToCoherencyDegreeImageFilter.h"
 
-int otbReciprocalCovarianceToCoherencyDegreeImageFilterNew(int argc, char * argv[])
+int otbReciprocalCovarianceToCoherencyDegreeImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.cxx b/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.cxx
index 7c5f3b1..bf4bea8 100644
--- a/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.cxx
+++ b/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.cxx
@@ -25,17 +25,14 @@
 #include "otbReciprocalCovarianceToReciprocalCoherencyImageFilter.h"
 
 
-int otbReciprocalCovarianceToReciprocalCoherencyImageFilter(int argc, char * argv[])
+int otbReciprocalCovarianceToReciprocalCoherencyImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
 
   typedef double                   PixelType;
   typedef std::complex<PixelType>  InputPixelType;
-
-  typedef otb::VectorImage<PixelType>      RealImageType;
   typedef otb::VectorImage<InputPixelType> ImageType;
-
   typedef otb::ReciprocalCovarianceToReciprocalCoherencyImageFilter<ImageType, ImageType> FilterType;
 
   typedef otb::ImageFileReader<ImageType>  ReaderType;
diff --git a/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilterNew.cxx
index c07c203..13991bd 100644
--- a/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilterNew.cxx
+++ b/Testing/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "otbVectorImage.h"
 #include "otbReciprocalCovarianceToReciprocalCoherencyImageFilter.h"
 
-int otbReciprocalCovarianceToReciprocalCoherencyImageFilterNew(int argc, char * argv[])
+int otbReciprocalCovarianceToReciprocalCoherencyImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilter.cxx b/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilter.cxx
index 7e05e3f..702a2da 100644
--- a/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilter.cxx
+++ b/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileWriter.h"
 #include "otbReciprocalHAlphaImageFilter.h"
 
-int otbReciprocalHAlphaImageFilter(int argc, char * argv[])
+int otbReciprocalHAlphaImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilterNew.cxx
index a311fbf..8afdb91 100644
--- a/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilterNew.cxx
+++ b/Testing/Code/SARPolarimetry/otbReciprocalHAlphaImageFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "otbVectorImage.h"
 #include "otbReciprocalHAlphaImageFilter.h"
 
-int otbReciprocalHAlphaImageFilterNew(int argc, char * argv[])
+int otbReciprocalHAlphaImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.cxx b/Testing/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.cxx
index 05759f6..2094d45 100644
--- a/Testing/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.cxx
+++ b/Testing/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.cxx
@@ -24,7 +24,7 @@
 #include "otbImageFileWriter.h"
 #include "otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h"
 
-int otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter(int argc, char * argv[])
+int otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
diff --git a/Testing/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilterNew.cxx b/Testing/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilterNew.cxx
index 3eb110b..80c372c 100644
--- a/Testing/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilterNew.cxx
+++ b/Testing/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilterNew.cxx
@@ -23,7 +23,7 @@
 #include "otbVectorImage.h"
 #include "otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h"
 
-int otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilterNew(int argc, char * argv[])
+int otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/SARPolarimetry/otbSinclairImageFilter.cxx b/Testing/Code/SARPolarimetry/otbSinclairImageFilter.cxx
index c8072da..d6810a9 100644
--- a/Testing/Code/SARPolarimetry/otbSinclairImageFilter.cxx
+++ b/Testing/Code/SARPolarimetry/otbSinclairImageFilter.cxx
@@ -33,7 +33,7 @@
 #include "otbMultiChannelExtractROI.h"
 
 
-int otbSinclairImageFilterNew(int argc, char * argv[])
+int otbSinclairImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef std::complex<float>        ComplexType;
   typedef otb::Image<ComplexType, 2> CplxImageType;
@@ -50,7 +50,7 @@ int otbSinclairImageFilterNew(int argc, char * argv[])
 
 
 template<class TInputPixel, class TOutputPixel, class TFunction>
-int generic_SinclairImageFilter(int argc, char * argv[])
+int generic_SinclairImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * outputFilename = argv[4];
 
diff --git a/Testing/Code/SARPolarimetry/otbSinclairReciprocalImageFilter.cxx b/Testing/Code/SARPolarimetry/otbSinclairReciprocalImageFilter.cxx
index fe21cc0..66954b9 100644
--- a/Testing/Code/SARPolarimetry/otbSinclairReciprocalImageFilter.cxx
+++ b/Testing/Code/SARPolarimetry/otbSinclairReciprocalImageFilter.cxx
@@ -31,7 +31,7 @@
 #include "otbMultiChannelExtractROI.h"
 
 
-int otbSinclairReciprocalImageFilterNew(int argc, char * argv[])
+int otbSinclairReciprocalImageFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef std::complex<float>        ComplexType;
   typedef otb::Image<ComplexType, 2> CplxImageType;
@@ -48,7 +48,7 @@ int otbSinclairReciprocalImageFilterNew(int argc, char * argv[])
 
 
 template<class TInputPixel, class TOutputPixel, class TFunction>
-int generic_SinclairReciprocalImageFilter(int argc, char * argv[])
+int generic_SinclairReciprocalImageFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename1 = argv[1];
   const char * inputFilename2 = argv[2];
@@ -98,11 +98,9 @@ int otbSinclairReciprocalImageFilter(int argc, char * argv[])
   const unsigned int Dimension = 2;
   typedef std::complex <double> InputPixelType;
   typedef std::complex <double> OutputPixelType;
-  typedef double                OutputRealPixelType;
 
   typedef otb::Image<InputPixelType,  Dimension>       InputImageType;
   typedef otb::VectorImage<OutputPixelType, Dimension> OutputImageType;
-  typedef otb::VectorImage<OutputRealPixelType, Dimension> OutputRealImageType;
 
   std::string strArgv(argv[1]);
   argc--;
diff --git a/Testing/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.cxx b/Testing/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.cxx
index e49511a..c883bde 100644
--- a/Testing/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.cxx
+++ b/Testing/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.cxx
@@ -19,7 +19,7 @@
 #include "otbSinclairToCircularCovarianceMatrixFunctor.h"
 #include "itkVariableLengthVector.h"
 
-int otbSinclairToCircularCovarianceMatrixFunctor(int argc, char * argv[])
+int otbSinclairToCircularCovarianceMatrixFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef std::complex<double>                   ComplexType;
   typedef itk::VariableLengthVector<ComplexType> OutputType;
diff --git a/Testing/Code/SARPolarimetry/otbSinclairToCoherencyMatrixFunctor.cxx b/Testing/Code/SARPolarimetry/otbSinclairToCoherencyMatrixFunctor.cxx
index 64ac59c..f2dbe77 100644
--- a/Testing/Code/SARPolarimetry/otbSinclairToCoherencyMatrixFunctor.cxx
+++ b/Testing/Code/SARPolarimetry/otbSinclairToCoherencyMatrixFunctor.cxx
@@ -19,7 +19,7 @@
 #include "otbSinclairToCoherencyMatrixFunctor.h"
 #include "itkVariableLengthVector.h"
 
-int otbSinclairToCoherencyMatrixFunctor(int argc, char * argv[])
+int otbSinclairToCoherencyMatrixFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef std::complex<double>                   ComplexType;
   typedef itk::VariableLengthVector<ComplexType> OutputType;
diff --git a/Testing/Code/SARPolarimetry/otbSinclairToCovarianceMatrixFunctor.cxx b/Testing/Code/SARPolarimetry/otbSinclairToCovarianceMatrixFunctor.cxx
index 69504bd..cbbf392 100644
--- a/Testing/Code/SARPolarimetry/otbSinclairToCovarianceMatrixFunctor.cxx
+++ b/Testing/Code/SARPolarimetry/otbSinclairToCovarianceMatrixFunctor.cxx
@@ -20,7 +20,7 @@
 #include "otbSinclairToCovarianceMatrixFunctor.h"
 #include "itkVariableLengthVector.h"
 
-int otbSinclairToCovarianceMatrixFunctor(int argc, char * argv[])
+int otbSinclairToCovarianceMatrixFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef std::complex<double>                   ComplexType;
   typedef itk::VariableLengthVector<ComplexType> OutputType;
diff --git a/Testing/Code/SARPolarimetry/otbSinclairToMuellerMatrixFunctor.cxx b/Testing/Code/SARPolarimetry/otbSinclairToMuellerMatrixFunctor.cxx
index 9cb9331..7540617 100644
--- a/Testing/Code/SARPolarimetry/otbSinclairToMuellerMatrixFunctor.cxx
+++ b/Testing/Code/SARPolarimetry/otbSinclairToMuellerMatrixFunctor.cxx
@@ -20,7 +20,7 @@
 #include "otbSinclairToMuellerMatrixFunctor.h"
 #include "itkVariableLengthVector.h"
 
-int otbSinclairToMuellerMatrixFunctor(int argc, char * argv[])
+int otbSinclairToMuellerMatrixFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef std::complex<double>                   ComplexType;
   typedef itk::VariableLengthVector<double>  OutputType;
diff --git a/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.cxx b/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.cxx
index dec7392..18c8d48 100644
--- a/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.cxx
+++ b/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.cxx
@@ -19,7 +19,7 @@
 #include "otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h"
 #include "itkVariableLengthVector.h"
 
-int otbSinclairToReciprocalCircularCovarianceMatrixFunctor(int argc, char * argv[])
+int otbSinclairToReciprocalCircularCovarianceMatrixFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef std::complex<double>                   ComplexType;
   typedef itk::VariableLengthVector<ComplexType> OutputType;
diff --git a/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyMatrixFunctor.cxx b/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyMatrixFunctor.cxx
index 9e6d112..5db7d73 100644
--- a/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyMatrixFunctor.cxx
+++ b/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyMatrixFunctor.cxx
@@ -20,7 +20,7 @@
 #include "otbSinclairToReciprocalCoherencyMatrixFunctor.h"
 #include "itkVariableLengthVector.h"
 
-int otbSinclairToReciprocalCoherencyMatrixFunctor(int argc, char * argv[])
+int otbSinclairToReciprocalCoherencyMatrixFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef std::complex<double>                   ComplexType;
   typedef itk::VariableLengthVector<ComplexType> OutputType;
diff --git a/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceMatrixFunctor.cxx b/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceMatrixFunctor.cxx
index c64d038..36ee6b1 100644
--- a/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceMatrixFunctor.cxx
+++ b/Testing/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceMatrixFunctor.cxx
@@ -20,7 +20,7 @@
 #include "otbSinclairToReciprocalCovarianceMatrixFunctor.h"
 #include "itkVariableLengthVector.h"
 
-int otbSinclairToReciprocalCovarianceMatrixFunctor(int argc, char * argv[])
+int otbSinclairToReciprocalCovarianceMatrixFunctor(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef std::complex<double>                   ComplexType;
   typedef itk::VariableLengthVector<ComplexType> OutputType;
diff --git a/Testing/Code/SARPolarimetry/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx
index d851d33..66fa248 100644
--- a/Testing/Code/SARPolarimetry/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx
+++ b/Testing/Code/SARPolarimetry/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx
@@ -26,7 +26,7 @@
 #include "otbImageFileWriter.h"
 #include "otbMultiChannelsPolarimetricSynthesisFilter.h"
 
-int otbVectorMultiChannelsPolarimetricSynthesisFilter(int argc, char * argv[])
+int otbVectorMultiChannelsPolarimetricSynthesisFilter(int itkNotUsed(argc), char * argv[])
 {
   const char * inputFilename  = argv[1];
   const char * outputFilename = argv[2];
@@ -43,7 +43,6 @@ int otbVectorMultiChannelsPolarimetricSynthesisFilter(int argc, char * argv[])
   typedef otb::Image<OutputPixelType, Dimension>                                         OutputImageType;
   typedef otb::ImageFileReader<InputImageType>                                           ReaderType;
   typedef otb::ImageFileWriter<OutputImageType>                                          WriterType;
-  typedef itk::FixedArray<int, 4>                                                        IndexArrayType;
   typedef otb::MultiChannelsPolarimetricSynthesisFilter<InputImageType, OutputImageType> FilterType;
 
   FilterType::Pointer polarimetricSynthesis = FilterType::New();
diff --git a/Testing/Code/Segmentation/otbHooverInstanceFilterNew.cxx b/Testing/Code/Segmentation/otbHooverInstanceFilterNew.cxx
index de20138..f582288 100644
--- a/Testing/Code/Segmentation/otbHooverInstanceFilterNew.cxx
+++ b/Testing/Code/Segmentation/otbHooverInstanceFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkLabelMap.h"
 #include "otbAttributesMapLabelObject.h"
 
-int otbHooverInstanceFilterNew(int argc, char* argv[])
+int otbHooverInstanceFilterNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   typedef otb::AttributesMapLabelObject<unsigned int, 2, float> LabelObjectType;
   typedef itk::LabelMap<LabelObjectType>                      LabelMapType;
diff --git a/Testing/Code/Segmentation/otbHooverMatrixFilterNew.cxx b/Testing/Code/Segmentation/otbHooverMatrixFilterNew.cxx
index bfc82dc..7150e9d 100644
--- a/Testing/Code/Segmentation/otbHooverMatrixFilterNew.cxx
+++ b/Testing/Code/Segmentation/otbHooverMatrixFilterNew.cxx
@@ -21,7 +21,7 @@
 #include "itkLabelMap.h"
 #include "itkLabelObject.h"
 
-int otbHooverMatrixFilterNew(int argc, char* argv[])
+int otbHooverMatrixFilterNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   typedef itk::LabelObject<unsigned int, 2>          LabelObjectType;
   typedef itk::LabelMap<LabelObjectType>            LabelMapType;
diff --git a/Testing/Code/Segmentation/otbMeanShiftSegmentationFilter.cxx b/Testing/Code/Segmentation/otbMeanShiftSegmentationFilter.cxx
index 5949156..a2c48ef 100644
--- a/Testing/Code/Segmentation/otbMeanShiftSegmentationFilter.cxx
+++ b/Testing/Code/Segmentation/otbMeanShiftSegmentationFilter.cxx
@@ -48,7 +48,6 @@ int otbMeanShiftSegmentationFilter(int argc, char * argv[])
 
   const unsigned int Dimension = 2;
   typedef float                                            PixelType;
-  typedef double                                           KernelType;
   typedef otb::VectorImage<PixelType, Dimension>           ImageType;
   typedef otb::Image<unsigned int, Dimension>              LabelImageType;
   typedef otb::ImageFileReader<ImageType>                  ReaderType;
diff --git a/Testing/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.cxx b/Testing/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.cxx
index 71a76b5..2cbf316 100644
--- a/Testing/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.cxx
+++ b/Testing/Code/Segmentation/otbStreamingImageToOGRLayerSegmentationFilter.cxx
@@ -29,7 +29,7 @@
 
 #include "otbOGRDataSourceWrapper.h"
 
-int otbStreamingImageToOGRLayerSegmentationFilterNew(int argc, char * argv[])
+int otbStreamingImageToOGRLayerSegmentationFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef float InputPixelType;
   const unsigned int Dimension = 2;
diff --git a/Testing/Code/Simulation/CMakeLists.txt b/Testing/Code/Simulation/CMakeLists.txt
index e9e4530..8858fad 100644
--- a/Testing/Code/Simulation/CMakeLists.txt
+++ b/Testing/Code/Simulation/CMakeLists.txt
@@ -49,26 +49,81 @@ add_test(siTuSatelliteRSR ${Simulation_TESTS2}
         2 #num band
         )
 
+add_test(siTuSatelliteRSRCheckValue ${Simulation_TESTS2}
+        otbSatelliteRSRCheckValue
+        ${INPUTDATA}/Radiometry/SPOT5/HRG2/rep6S.dat
+        4 #nb band
+        0.50 #lambda
+        0 #num band
+        0.557 #expected
+        )
+
+add_test(siTuSatelliteRSRCheckValue2 ${Simulation_TESTS2}
+        otbSatelliteRSRCheckValue
+        ${INPUTDATA}/Radiometry/SPOT5/HRG2/rep6S.dat
+        4 #nb band
+        0.68 #lambda
+        1 #num band
+        0.717 #expected
+        )            
+
+add_test(siTuSatelliteRSRSolarIrradianceCheckValue ${Simulation_TESTS2}
+        otbSatelliteRSRSolarIrradianceCheckValue
+        ${INPUTDATA}/Radiometry/SPOT5/HRG2/rep6S.dat
+        4 #nb band
+        0.45 #lambda
+        2.0573899e3 #expected
+        )      
+
+add_test(siTuSatelliteRSRSolarIrradianceCheckValue2 ${Simulation_TESTS2}
+        otbSatelliteRSRSolarIrradianceCheckValue
+        ${INPUTDATA}/Radiometry/SPOT5/HRG2/rep6S.dat
+        4 #nb band
+        1.7525000e+00  #lambda
+        1.8526000e+02 #expected
+        )      
+      
 add_test(siTuReduceSpectralResponseNew ${Simulation_TESTS2}
         otbReduceSpectralResponseNew
         )
 
+      
+add_test(siTuReduceSpectralResponseSimpleValues ${Simulation_TESTS2}
+        otbReduceSpectralResponseSimpleValues
+        ${TEMP}/siTuReduceSpectralResponseSimpleValuesRSRLum.txt
+        0 # reflectance mode
+        )
+
+add_test(siTuReduceSpectralResponseSimpleValuesReflectance ${Simulation_TESTS2}
+        otbReduceSpectralResponseSimpleValues
+        ${TEMP}/siTuReduceSpectralResponseSimpleValuesRSRRefl.txt
+        1 # reflectance mode
+        )
+      
 add_test(siTuReduceSpectralResponse ${Simulation_TESTS2}
         otbReduceSpectralResponse
         ${SPECTRUM_DB}/jpl/beckman/minerals/Arsenate/txt/A01Ac.txt
         ${INPUTDATA}/Radiometry/SPOT5/HRG2/rep6S.dat
         4 #nb band
+        0 #reflectance mode
         )
 
-add_test(siTvReduceSpectralResponse ${Simulation_TESTS2}
-    --compare-ascii ${NOTOL} ${BASELINE_FILES}/Simulation/siTvReduceSpectralResponse.txt
-                   ${TEMP}/siTvReduceSpectralResponse.txt
+add_test(siTuReduceSpectralResponseReflectanceMode ${Simulation_TESTS2}
+        otbReduceSpectralResponse
+        ${SPECTRUM_DB}/jpl/beckman/minerals/Arsenate/txt/A01Ac.txt
+        ${INPUTDATA}/Radiometry/SPOT5/HRG2/rep6S.dat
+        4 #nb band
+        1 #reflectance mode
+        )
+
+add_test(siTvReduceSpectralResponseReflectanceMode ${Simulation_TESTS2}
         otbReduceSpectralResponse
         ${INPUTDATA}/SpectralResponse1.txt
         ${INPUTDATA}/Radiometry/Test/rep6S.dat
         4 #nb band
-        ${TEMP}/siTvReduceSpectralResponse.txt
-        )
+        1 #reflectance mode
+        ${TEMP}/siTvReduceSpectralResponseReflectanceMode.txt
+        )      
 
 add_test(siTuReduceSpectralResponseClassifierRAndNIR ${Simulation_TESTS2}
         otbReduceSpectralResponseClassifierRAndNIR
diff --git a/Testing/Code/Simulation/otbAtmosphericCorrectionsRSRSVMClassifier.cxx b/Testing/Code/Simulation/otbAtmosphericCorrectionsRSRSVMClassifier.cxx
index 8d0eedf..e1699c2 100644
--- a/Testing/Code/Simulation/otbAtmosphericCorrectionsRSRSVMClassifier.cxx
+++ b/Testing/Code/Simulation/otbAtmosphericCorrectionsRSRSVMClassifier.cxx
@@ -45,9 +45,24 @@ int otbAtmosphericCorrectionsRSRSVMClassifier(int argc, char * argv[])
 
   typedef otb::AtmosphericEffects<SpectralResponseType, SatRSRType> AtmosphericEffectsType;
 
-  typedef AtmosphericEffectsType::AtmosphericCorrectionParametersType AtmosphericCorrectionParametersType;
-  typedef AtmosphericCorrectionParametersType::AerosolModelType AerosolModelType;
+  /*typedef AtmosphericEffectsType::AtmosphericCorrectionParametersType AtmosphericCorrectionParametersType; chris
   typedef AtmosphericCorrectionParametersType::AerosolModelType AerosolModelType;
+  typedef AtmosphericCorrectionParametersType::AerosolModelType AerosolModelType; */
+
+
+  typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms     CorrectionParametersToRadiativeTermsType;
+
+  typedef otb::AtmosphericCorrectionParameters                              AtmoCorrectionParametersType;
+  typedef AtmoCorrectionParametersType::Pointer                   AtmoCorrectionParametersPointerType;
+
+  typedef AtmoCorrectionParametersType::AerosolModelType                    AerosolModelType;
+
+  typedef otb::ImageMetadataCorrectionParameters                            AcquiCorrectionParametersType;
+  typedef AcquiCorrectionParametersType::Pointer                  AcquiCorrectionParametersPointerType;
+
+  typedef otb::AtmosphericRadiativeTerms                                    AtmosphericRadiativeTermsType;
+  typedef AtmosphericRadiativeTermsType::Pointer                  AtmosphericRadiativeTermsPointerType;
+
 
   typedef itk::VariableLengthVector<double> SampleType;
   typedef itk::Statistics::ListSample<SampleType> SampleListType;
@@ -109,15 +124,19 @@ int otbAtmosphericCorrectionsRSRSVMClassifier(int argc, char * argv[])
   float percentage = atof(argv[19]);
 
   //Instantiation
-  AtmosphericCorrectionParametersType::Pointer
-    dataAtmosphericCorrectionParameters = AtmosphericCorrectionParametersType::New();
+  /*AtmosphericCorrectionParametersType::Pointer chris
+    dataAtmosphericCorrectionParameters = AtmosphericCorrectionParametersType::New(); */
+
+  AcquiCorrectionParametersPointerType paramAcqui = AcquiCorrectionParametersType::New();
+  AtmoCorrectionParametersPointerType  paramAtmo = AtmoCorrectionParametersType::New();
+
   SatRSRPointerType satRSR = SatRSRType::New();
 
   satRSR->SetNbBands(nbBand);
   satRSR->Load(fileSatG);
 
   // Set parameters
-  dataAtmosphericCorrectionParameters->SetSolarZenithalAngle(zenithSolarAngle);
+  /*dataAtmosphericCorrectionParameters->SetSolarZenithalAngle(zenithSolarAngle); chris
   dataAtmosphericCorrectionParameters->SetSolarAzimutalAngle(azimutSolarAngle);
   dataAtmosphericCorrectionParameters->SetViewingZenithalAngle(viewingZenitalAngle);
   dataAtmosphericCorrectionParameters->SetViewingAzimutalAngle(viewingAzimutalAngle);
@@ -129,7 +148,22 @@ int otbAtmosphericCorrectionsRSRSVMClassifier(int argc, char * argv[])
 
   AerosolModelType aerosolModel = static_cast<AerosolModelType> (aerosolModelValue);
   dataAtmosphericCorrectionParameters->SetAerosolModel(aerosolModel);
-  dataAtmosphericCorrectionParameters->SetAerosolOptical(aerosolOptical);
+  dataAtmosphericCorrectionParameters->SetAerosolOptical(aerosolOptical); */
+
+  paramAcqui->SetSolarZenithalAngle(zenithSolarAngle);
+  paramAcqui->SetSolarAzimutalAngle(azimutSolarAngle);
+  paramAcqui->SetViewingZenithalAngle(viewingZenitalAngle);
+  paramAcqui->SetViewingAzimutalAngle(viewingAzimutalAngle);
+  paramAcqui->SetMonth(month);
+  paramAcqui->SetDay(day);
+  paramAtmo->SetAtmosphericPressure(atmoPressure);
+  paramAtmo->SetWaterVaporAmount(waterVaporAmount);
+  paramAtmo->SetOzoneAmount(ozoneAmount);
+  AerosolModelType aerosolModel = static_cast<AerosolModelType>(aerosolModelValue);
+  paramAtmo->SetAerosolModel(aerosolModel);
+  paramAtmo->SetAerosolOptical(aerosolOptical);
+
+  AtmosphericRadiativeTermsPointerType  radiative = CorrectionParametersToRadiativeTermsType::Compute(paramAtmo,paramAcqui);
 
   //divide into training and testing files
   //90% of files are used for training and 10% for testing
@@ -205,10 +239,10 @@ int otbAtmosphericCorrectionsRSRSVMClassifier(int argc, char * argv[])
       reduceSpectralResponse->SetInputSpectralResponse(spectralResponse);
       reduceSpectralResponse->CalculateResponse();
 
-      atmosphericEffectsFilter->SetDataAtmosphericCorrectionParameters(dataAtmosphericCorrectionParameters);
+      atmosphericEffectsFilter->SetAtmosphericRadiativeTerms(radiative);
       atmosphericEffectsFilter->SetInputSatRSR(satRSR);
       atmosphericEffectsFilter->SetInputSpectralResponse(reduceSpectralResponse->GetReduceResponse());
-      atmosphericEffectsFilter->Process6S();
+      atmosphericEffectsFilter->Process();
 
       //Get the response in an itk::VariableLengthVector and add it to the sample list for SVMModelEstimator
       SampleType sample;
@@ -252,10 +286,10 @@ int otbAtmosphericCorrectionsRSRSVMClassifier(int argc, char * argv[])
       reduceSpectralResponse->SetInputSpectralResponse(spectralResponse);
       reduceSpectralResponse->CalculateResponse();
 
-      atmosphericEffectsFilter->SetDataAtmosphericCorrectionParameters(dataAtmosphericCorrectionParameters);
+      atmosphericEffectsFilter->SetAtmosphericRadiativeTerms(radiative);
       atmosphericEffectsFilter->SetInputSatRSR(satRSR);
       atmosphericEffectsFilter->SetInputSpectralResponse(reduceSpectralResponse->GetReduceResponse());
-      atmosphericEffectsFilter->Process6S();
+      atmosphericEffectsFilter->Process();
 
       //Get the response in an itk::VariableLengthVector and add it to the sample list for SVMClassifier
       SampleType sample;
diff --git a/Testing/Code/Simulation/otbAtmosphericEffects.cxx b/Testing/Code/Simulation/otbAtmosphericEffects.cxx
index 3d8c7a7..1f45adb 100644
--- a/Testing/Code/Simulation/otbAtmosphericEffects.cxx
+++ b/Testing/Code/Simulation/otbAtmosphericEffects.cxx
@@ -23,7 +23,9 @@
 #include "otbAtmosphericEffects.h"
 #include "otbReduceSpectralResponse.h"
 
-
+#include "otbAtmosphericCorrectionParameters.h"
+#include "otbImageMetadataCorrectionParameters.h"
+#include "otbAtmosphericRadiativeTerms.h"
 
 int otbAtmosphericEffects(int argc, char * argv[])
 {
@@ -36,10 +38,21 @@ int otbAtmosphericEffects(int argc, char * argv[])
 
    typedef otb::AtmosphericEffects< SpectralResponseType, SatRSRType>  AtmosphericEffectsType;
 
-   typedef AtmosphericEffectsType::AtmosphericCorrectionParametersType  AtmosphericCorrectionParametersType;
-   typedef AtmosphericCorrectionParametersType::AerosolModelType AerosolModelType;
 
+    typedef otb::RadiometryCorrectionParametersToAtmosphericRadiativeTerms     CorrectionParametersToRadiativeTermsType;
+
+    typedef otb::AtmosphericCorrectionParameters                              AtmoCorrectionParametersType;
+    typedef AtmoCorrectionParametersType::Pointer                   AtmoCorrectionParametersPointerType;
+
+    typedef AtmoCorrectionParametersType::AerosolModelType                    AerosolModelType;
+
+    typedef otb::ImageMetadataCorrectionParameters                            AcquiCorrectionParametersType;
+    typedef AcquiCorrectionParametersType::Pointer                  AcquiCorrectionParametersPointerType;
 
+    typedef otb::AtmosphericRadiativeTerms                                    AtmosphericRadiativeTermsType;
+    typedef AtmosphericRadiativeTermsType::Pointer                  AtmosphericRadiativeTermsPointerType;
+
+    
 
 
 
@@ -69,7 +82,11 @@ int otbAtmosphericEffects(int argc, char * argv[])
    //Instantiation
    SpectralResponseType::Pointer spectrum = SpectralResponseType::New();
    SatRSRType::Pointer  satRSR=SatRSRType::New();
-   AtmosphericCorrectionParametersType::Pointer dataAtmosphericCorrectionParameters = AtmosphericCorrectionParametersType::New();
+   //AtmosphericCorrectionParametersType::Pointer dataAtmosphericCorrectionParameters = AtmosphericCorrectionParametersType::New();
+
+   AcquiCorrectionParametersPointerType paramAcqui = AcquiCorrectionParametersType::New();
+   AtmoCorrectionParametersPointerType  paramAtmo = AtmoCorrectionParametersType::New();
+
    ReduceSpectralResponseType::Pointer reduceSpectralResponse = ReduceSpectralResponseType::New();
    AtmosphericEffectsType::Pointer  atmosphericEffectsFilter = AtmosphericEffectsType::New();
 
@@ -80,18 +97,20 @@ int otbAtmosphericEffects(int argc, char * argv[])
    satRSR->Load(fileSatG);
 
    // Set parameters
-   dataAtmosphericCorrectionParameters->SetSolarZenithalAngle(zenithSolarAngle);
-   dataAtmosphericCorrectionParameters->SetSolarAzimutalAngle(azimutSolarAngle);
-   dataAtmosphericCorrectionParameters->SetViewingZenithalAngle(viewingZenitalAngle);
-   dataAtmosphericCorrectionParameters->SetViewingAzimutalAngle(viewingAzimutalAngle);
-   dataAtmosphericCorrectionParameters->SetMonth(month);
-   dataAtmosphericCorrectionParameters->SetDay(day);
-   dataAtmosphericCorrectionParameters->SetAtmosphericPressure(atmoPressure);
-   dataAtmosphericCorrectionParameters->SetWaterVaporAmount(waterVaporAmount);
-   dataAtmosphericCorrectionParameters->SetOzoneAmount(ozoneAmount);
+   paramAcqui->SetSolarZenithalAngle(zenithSolarAngle);
+   paramAcqui->SetSolarAzimutalAngle(azimutSolarAngle);
+   paramAcqui->SetViewingZenithalAngle(viewingZenitalAngle);
+   paramAcqui->SetViewingAzimutalAngle(viewingAzimutalAngle);
+   paramAcqui->SetMonth(month);
+   paramAcqui->SetDay(day);
+   paramAtmo->SetAtmosphericPressure(atmoPressure);
+   paramAtmo->SetWaterVaporAmount(waterVaporAmount);
+   paramAtmo->SetOzoneAmount(ozoneAmount);
    AerosolModelType aerosolModel = static_cast<AerosolModelType>(aerosolModelValue);
-   dataAtmosphericCorrectionParameters->SetAerosolModel(aerosolModel);
-   dataAtmosphericCorrectionParameters->SetAerosolOptical(aerosolOptical);
+   paramAtmo->SetAerosolModel(aerosolModel);
+   paramAtmo->SetAerosolOptical(aerosolOptical);
+
+   AtmosphericRadiativeTermsPointerType  radiative = CorrectionParametersToRadiativeTermsType::Compute(paramAtmo,paramAcqui);
 
 
    //Compute Reduce Spectral Response
@@ -99,10 +118,10 @@ int otbAtmosphericEffects(int argc, char * argv[])
    reduceSpectralResponse->SetInputSpectralResponse(spectrum);
    reduceSpectralResponse->CalculateResponse();
 
-   atmosphericEffectsFilter->SetDataAtmosphericCorrectionParameters(dataAtmosphericCorrectionParameters);
+   atmosphericEffectsFilter->SetAtmosphericRadiativeTerms(radiative);
    atmosphericEffectsFilter->SetInputSatRSR(satRSR);
    atmosphericEffectsFilter->SetInputSpectralResponse(reduceSpectralResponse->GetReduceResponse());
-   atmosphericEffectsFilter->Process6S();
+   atmosphericEffectsFilter->Process();
 
    atmosphericEffectsFilter->GetCorrectedSpectralResponse();
 
diff --git a/Testing/Code/Simulation/otbImageSimulationMethodKMeansClassif.cxx b/Testing/Code/Simulation/otbImageSimulationMethodKMeansClassif.cxx
index 7f60aff..6d4efb3 100644
--- a/Testing/Code/Simulation/otbImageSimulationMethodKMeansClassif.cxx
+++ b/Testing/Code/Simulation/otbImageSimulationMethodKMeansClassif.cxx
@@ -35,7 +35,7 @@
 #include "otbKMeansImageClassificationFilter.h"
 #include "itkImageRegionIterator.h"
 
-int otbImageSimulationMethodKMeansClassif(int argc, char * argv[])
+int otbImageSimulationMethodKMeansClassif(int itkNotUsed(argc), char * argv[])
 {
    const char * satRSRFilename = argv[1];
    unsigned int nbBands = static_cast<unsigned int>(atoi(argv[2]));
@@ -57,8 +57,6 @@ int otbImageSimulationMethodKMeansClassif(int argc, char * argv[])
    typedef otb::VectorData<double, Dimension>                                         VectorDataType;
    typedef otb::AttributesMapLabelObject<LabelType, Dimension, std::string>           LabelObjectType;
    typedef itk::LabelMap<LabelObjectType>                                             LabelMapType;
-   typedef otb::VectorDataFileReader<VectorDataType>                                  VectorDataFileReaderType;
-
    typedef otb::SpatialisationFilter<LabelMapType>                                    SpatialisationFilterType;
    typedef otb::ProspectModel                                                         SimulationStep1Type;
    typedef otb::SailModel                                                             SimulationStep2Type;
@@ -73,8 +71,6 @@ int otbImageSimulationMethodKMeansClassif(int argc, char * argv[])
    typedef itk::Statistics::KdTreeBasedKmeansEstimator<TreeType>            EstimatorType;
 
    typedef otb::KMeansImageClassificationFilter<OutputImageType, LabelImageType, nbClasses> ClassificationFilterType;
-   typedef ClassificationFilterType::KMeansParametersType                    KMeansParametersType;
-
    typedef itk::ImageRegionIterator<OutputImageType> ImageRegionIteratorType;
 
 
@@ -198,5 +194,3 @@ int otbImageSimulationMethodKMeansClassif(int argc, char * argv[])
 
    return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/Simulation/otbImageSimulationMethodSVMClassif.cxx b/Testing/Code/Simulation/otbImageSimulationMethodSVMClassif.cxx
index e025f03..18a66ee 100644
--- a/Testing/Code/Simulation/otbImageSimulationMethodSVMClassif.cxx
+++ b/Testing/Code/Simulation/otbImageSimulationMethodSVMClassif.cxx
@@ -33,7 +33,7 @@
 #include "otbSVMImageClassificationFilter.h"
 #include "otbImageFileReader.h"
 
-int otbImageSimulationMethodSVMClassif(int argc, char * argv[])
+int otbImageSimulationMethodSVMClassif(int itkNotUsed(argc), char * argv[])
 {
    const char * satRSRFilename = argv[1];
    unsigned int nbBands = static_cast<unsigned int>(atoi(argv[2]));
diff --git a/Testing/Code/Simulation/otbImageSimulationMethodWithSpatialisationTest.cxx b/Testing/Code/Simulation/otbImageSimulationMethodWithSpatialisationTest.cxx
index 5270e88..fece131 100644
--- a/Testing/Code/Simulation/otbImageSimulationMethodWithSpatialisationTest.cxx
+++ b/Testing/Code/Simulation/otbImageSimulationMethodWithSpatialisationTest.cxx
@@ -28,7 +28,7 @@
 #include "otbAttributesMapLabelObject.h"
 #include "otbImageFileReader.h"
 
-int otbImageSimulationMethodWithSpatialisationTest(int argc, char * argv[])
+int otbImageSimulationMethodWithSpatialisationTest(int itkNotUsed(argc), char * argv[])
 {
    const char * satRSRFilename = argv[1];
    unsigned int nbBands = static_cast<unsigned int>(atoi(argv[2]));
diff --git a/Testing/Code/Simulation/otbImageSimulationMethodWithVectorDataTest.cxx b/Testing/Code/Simulation/otbImageSimulationMethodWithVectorDataTest.cxx
index 291e223..cfe36f9 100644
--- a/Testing/Code/Simulation/otbImageSimulationMethodWithVectorDataTest.cxx
+++ b/Testing/Code/Simulation/otbImageSimulationMethodWithVectorDataTest.cxx
@@ -28,7 +28,7 @@
 #include "otbAttributesMapLabelObject.h"
 #include "otbImageFileReader.h"
 
-int otbImageSimulationMethodWithVectorDataTest(int argc, char * argv[])
+int otbImageSimulationMethodWithVectorDataTest(int itkNotUsed(argc), char * argv[])
 {
    const char * infilename  = argv[1];
    const char * satRSRFilename = argv[2];
diff --git a/Testing/Code/Simulation/otbLabelMapToSimulatedImageFilterTest.cxx b/Testing/Code/Simulation/otbLabelMapToSimulatedImageFilterTest.cxx
index 6c09141..668fb2d 100644
--- a/Testing/Code/Simulation/otbLabelMapToSimulatedImageFilterTest.cxx
+++ b/Testing/Code/Simulation/otbLabelMapToSimulatedImageFilterTest.cxx
@@ -25,7 +25,7 @@
 #include "otbProspectModel.h"
 #include "otbSailModel.h"
 
-int otbLabelMapToSimulatedImageFilterTest(int argc, char * argv[])
+int otbLabelMapToSimulatedImageFilterTest(int itkNotUsed(argc), char * argv[])
 {
    const char * infilename  = argv[1];
    const char * satRSRFilename = argv[2];
diff --git a/Testing/Code/Simulation/otbReduceSpectralResponse.cxx b/Testing/Code/Simulation/otbReduceSpectralResponse.cxx
index 2c1ad75..0516dfb 100644
--- a/Testing/Code/Simulation/otbReduceSpectralResponse.cxx
+++ b/Testing/Code/Simulation/otbReduceSpectralResponse.cxx
@@ -22,67 +22,193 @@
 #include "otbSatelliteRSR.h"
 #include "otbReduceSpectralResponse.h"
 
+typedef otb::SpectralResponse<double, double> ResponseType;
+typedef ResponseType::Pointer ResponsePointerType;
+typedef ResponseType::VectorPairType SpectrumType;
+typedef ResponseType::PairType PairType;
+typedef otb::SatelliteRSR<double, double> SatRSRType;
+typedef SatRSRType::Pointer SatRSRPointerType;
+typedef otb::ReduceSpectralResponse<ResponseType, SatRSRType> ReduceResponseType;
+typedef ReduceResponseType::Pointer ReduceResponseTypePointerType;
+
 int otbReduceSpectralResponse(int argc, char * argv[])
 {
-  if ((argc != 4) && (argc != 5))
+  if ((argc != 5) && (argc != 6))
     {
     std::cout << argv[0] << std::endl << "\t" << "<Spectral_response_filename>";
     std::cout << "\t" << "<RSR_filename>" << "\t" << "<Nb total satellite band>";
-    std::cout << "\t" << "(<Output_filename>)" << std::endl;
+    std::cout << "\t" << "<reflectance mode>" << "\t" << "(<Output_filename>)" << std::endl;
     return EXIT_FAILURE;
     }
 
-  typedef otb::SpectralResponse<double, double> ResponseType;
-  typedef ResponseType::Pointer ResponsePointerType;
-
-  typedef otb::SatelliteRSR<double, double> SatRSRType;
-  typedef SatRSRType::Pointer SatRSRPointerType;
-
-  typedef otb::ReduceSpectralResponse<ResponseType, SatRSRType> ReduceResponseType;
-  typedef ReduceResponseType::Pointer ReduceResponseTypePointerType;
-
   const std::string spectreFile(argv[1]);
   const std::string RSRfile(argv[2]);
   unsigned int nbBand = atoi(argv[3]);
-
+  bool reflectanceMode(atoi(argv[4]));
   //Instantiation
   ResponsePointerType mySpectralResponse = ResponseType::New();
   /** Load the spectral response file*/
   mySpectralResponse->Load(spectreFile, 100.0);
-
   SatRSRPointerType myRSR = SatRSRType::New();
   /** Set the satelite number of bands */
   myRSR->SetNbBands(nbBand);
   /** Load the satelite response file*/
   myRSR->Load(RSRfile);
-
-  ReduceResponseTypePointerType myReduceResponse = ReduceResponseType::New();
   //Instantiation
-  //ResponsePointerType  myResponse=ResponseType::New();
+  ReduceResponseTypePointerType myReduceResponse = ReduceResponseType::New();
   /** Load the satelite response in the simulator */
   myReduceResponse->SetInputSatRSR(myRSR);
   /** Load the spectral response of the object in the simulator*/
   myReduceResponse->SetInputSpectralResponse(mySpectralResponse);
-  //Load file into vector
-
-  /** Print the input spectral response*/
-  //std::cout << mySpectralResponse << std::endl;
-  //itk::Indent ind;
-  /** Print the input Satelite RSR*/
-  //std::cout << myRSR << std::endl;
-  //myResponse->PrintSelf(std::cout, ind);
-  /** Compute the RSR reduce spectral response*/
+  /** Set the reflectance or luminance mode */
+  myReduceResponse->SetReflectanceMode(reflectanceMode);
   myReduceResponse->CalculateResponse();
   /** Print the Reduce SR*/
   std::cout << myReduceResponse << std::endl;
-  if (argc == 5)
+  if (argc == 6)
     {
-    char * outputName = argv[4];
+    char * outputName = argv[5];
     std::ofstream outputFile(outputName, std::ios::out);
-
     outputFile << myReduceResponse << std::endl;
     }
   else std::cout << myReduceResponse << std::endl;
+  return EXIT_SUCCESS;
+}
+
+bool check_spectral_response(ResponsePointerType spectralResponse,
+                             SpectrumType::const_iterator first,
+                             SpectrumType::const_iterator last,
+                             ResponseType::ValuePrecisionType tolerance)
+{
+  while( first != last )
+    {
+    ResponseType::ValuePrecisionType expected = (*first).second;
+    ResponseType::ValuePrecisionType actual = (*spectralResponse)((*first).first);
+    if(fabs(expected - actual) > tolerance) return false;
+    ++first;
+    }
+  return true;
+}
+
+int otbReduceSpectralResponseSimpleValues(int argc, char * argv[])
+{
+  if (argc != 3)
+    {
+    std::cout << argv[0] << "\t <temporary spectral response filename>";
+    std::cout << "\t <reflectance mode>";
+    std::cout << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  // let's create a spectral response
+  const ResponseType::PrecisionType lambdaMin(0.4);
+  const ResponseType::PrecisionType lambdaMax(1.4);
+  const ResponseType::PrecisionType lambdaStep(0.001);
+  ResponseType::PrecisionType currentLambda(lambdaMin);
+  SpectrumType spectrum;
+  while(currentLambda < lambdaMax)
+    {
+    PairType spectralValue;
+    spectralValue.first = currentLambda;
+    spectralValue.second = ResponseType::ValuePrecisionType(1.0);
+    spectrum.push_back(spectralValue);
+    currentLambda += lambdaStep;
+    }
+  ResponsePointerType spectralResponse = ResponseType::New();
+  spectralResponse->SetResponse(spectrum);
 
+  // Check that the spectral response is OK
+  const ResponseType::ValuePrecisionType tolerance = 10e-6;
+  if(!check_spectral_response(spectralResponse, spectrum.begin(),
+                              spectrum.end(), tolerance))
+    {
+    std::cout << "Error detected in stored spectral response (without guess)"
+              << std::endl;
+    return EXIT_FAILURE;
+    }
+  spectralResponse->SetUsePosGuess(true);
+  if(!check_spectral_response(spectralResponse, spectrum.begin(),
+                              spectrum.end(), tolerance))
+    {
+    std::cout << "Error detected in stored spectral response (with guess)"
+              << std::endl;
+    return EXIT_FAILURE;
+    }
+ 
+  // Let's create a satellite RSR with 2 bands and constant solar irradiance per band
+  // Disjoint bands and B0 is shorter wavelength than B1 for simplicity
+  const std::string RSRfileName(argv[1]);
+  std::ofstream satFile(RSRfileName.c_str());
+  const ResponseType::PrecisionType lambdaMinB0(0.45);
+  const ResponseType::PrecisionType lambdaMaxB0(0.65);
+  const ResponseType::PrecisionType lambdaMinB1(0.75);
+  const ResponseType::PrecisionType lambdaMaxB1(0.85);
+  const ResponseType::ValuePrecisionType rsrValueB0(0.5);
+  const ResponseType::ValuePrecisionType rsrValueB1(1.0);
+  const ResponseType::ValuePrecisionType solarIrradianceB0(2.0);
+  const ResponseType::ValuePrecisionType solarIrradianceB1(4.0);
+  currentLambda = lambdaMin;
+  while(currentLambda < lambdaMax)
+    {
+    ResponseType::ValuePrecisionType solarIrradiance(0);
+    ResponseType::ValuePrecisionType rsrB0(0);
+    ResponseType::ValuePrecisionType rsrB1(0);
+    // B0
+    if(currentLambda >= lambdaMinB0 && currentLambda <= lambdaMaxB0)
+      {
+      solarIrradiance = solarIrradianceB0;
+      rsrB0 = rsrValueB0;
+      }
+    // B1
+    if(currentLambda >= lambdaMinB1 && currentLambda <= lambdaMaxB1)
+      {
+      solarIrradiance = solarIrradianceB1;
+      rsrB1 = rsrValueB1;
+      }
+    satFile.setf( std::ios::fixed, std:: ios::floatfield );
+    satFile.precision(4);
+    satFile << currentLambda << "\t"
+           << solarIrradiance << "\t"
+           << rsrB0 << "\t"
+           << rsrB1 << "\t" << std::endl;
+    currentLambda += lambdaStep;
+    }
+  satFile.close();
+
+  SatRSRPointerType myRSR = SatRSRType::New();
+  myRSR->SetNbBands(2);
+  myRSR->Load(RSRfileName);
+
+  ReduceResponseTypePointerType myReduceResponse = ReduceResponseType::New();
+  myReduceResponse->SetInputSatRSR(myRSR);
+  myReduceResponse->SetInputSpectralResponse(spectralResponse);
+  myReduceResponse->SetReflectanceMode(static_cast<bool>(atoi(argv[2])));
+  myReduceResponse->CalculateResponse();
+
+  //check B0
+  ResponseType::ValuePrecisionType b0Result = (*myReduceResponse)(0);
+  ResponseType::PrecisionType centralLambda = 0.5*(lambdaMaxB0+lambdaMinB0);
+  ResponseType::ValuePrecisionType b0Expected = ((*spectralResponse)(centralLambda));
+
+  if(fabs(b0Result-b0Expected)>tolerance)
+    {
+    std::cout << "Wrong value for B0: expected eq. luminance = " << b0Expected
+              << "; got " << b0Result
+              << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  //check B1
+  ResponseType::ValuePrecisionType b1Result = (*myReduceResponse)(1);
+  centralLambda = 0.5*(lambdaMaxB1+lambdaMinB1);
+  ResponseType::ValuePrecisionType b1Expected = ((*spectralResponse)(centralLambda));
+
+  if(fabs(b1Result-b1Expected)>tolerance)
+    {
+    std::cout << "Wrong value for B1: expected eq. luminance = " << b1Expected
+              << "; got " << b1Result
+              << std::endl;
+    return EXIT_FAILURE;
+    }
   return EXIT_SUCCESS;
 }
diff --git a/Testing/Code/Simulation/otbReduceSpectralResponseClassifierRAndNIR.cxx b/Testing/Code/Simulation/otbReduceSpectralResponseClassifierRAndNIR.cxx
index da67d66..4e29be4 100644
--- a/Testing/Code/Simulation/otbReduceSpectralResponseClassifierRAndNIR.cxx
+++ b/Testing/Code/Simulation/otbReduceSpectralResponseClassifierRAndNIR.cxx
@@ -39,10 +39,8 @@ int otbReduceSpectralResponseClassifierRAndNIR(int argc, char * argv[])
 
 
   typedef otb::SpectralResponse< double, double>  ResponseType;
-  typedef ResponseType::Pointer  ResponsePointerType;
 
   typedef otb::SatelliteRSR< double, double>  SatRSRType;
-  typedef SatRSRType::Pointer  SatRSRPointerType;
 
   typedef otb::ReduceSpectralResponse < ResponseType, SatRSRType>  ReduceResponseType;
   typedef ReduceResponseType::Pointer  ReduceResponseTypePointerType;
diff --git a/Testing/Code/Simulation/otbReduceSpectralResponseNew.cxx b/Testing/Code/Simulation/otbReduceSpectralResponseNew.cxx
index 3a64336..8388c4e 100644
--- a/Testing/Code/Simulation/otbReduceSpectralResponseNew.cxx
+++ b/Testing/Code/Simulation/otbReduceSpectralResponseNew.cxx
@@ -22,7 +22,7 @@
 #include "otbSatelliteRSR.h"
 #include "otbReduceSpectralResponse.h"
 
-int otbReduceSpectralResponseNew(int argc, char * argv[])
+int otbReduceSpectralResponseNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::SpectralResponse< double, double>  ResponseType;
   //typedef ResponseType::Pointer  ResponsePointerType;
diff --git a/Testing/Code/Simulation/otbSatelliteRSR.cxx b/Testing/Code/Simulation/otbSatelliteRSR.cxx
index eba73b9..58aab66 100644
--- a/Testing/Code/Simulation/otbSatelliteRSR.cxx
+++ b/Testing/Code/Simulation/otbSatelliteRSR.cxx
@@ -51,3 +51,69 @@ int otbSatelliteRSR(int argc, char * argv[])
 
   return EXIT_SUCCESS;
 }
+
+int otbSatelliteRSRCheckValue(int argc, char * argv[])
+{
+  typedef otb::SatelliteRSR< double, double>  ResponseType;
+  typedef ResponseType::Pointer  ResponsePointerType;
+
+  if ( argc!=6 )
+  {
+  std::cout << argv[0] << std::endl << "\t" << "<RSR_filename>"<< "\t" << "<Nb total band>"<< "\t"
+            << "<lambda>"<< "\t" << "<band>"<< "\t" << "<expected>" << std::endl;
+  return EXIT_FAILURE;
+  }
+  //Instantiation
+  ResponsePointerType  myResponse=ResponseType::New();
+
+  myResponse->SetNbBands(atoi(argv[2]));
+  //Load file into vector
+  const std::string file(argv[1]);
+  myResponse->Load(file);
+  //itk::Indent ind;
+  unsigned int NumBand = atoi(argv[4]);
+  double lambda = atof(argv[3]);
+  double expected = atof(argv[5]);
+
+  double rsr_value = (*myResponse)(lambda, NumBand);
+  
+  std::cout << "RSR("<<lambda<<","<< NumBand <<")= " << rsr_value << std::endl;
+
+  if(fabs(rsr_value - expected) > 10e-3) return EXIT_FAILURE;
+
+  return EXIT_SUCCESS;
+}
+
+int otbSatelliteRSRSolarIrradianceCheckValue(int argc, char * argv[])
+{
+  typedef otb::SatelliteRSR< double, double>  ResponseType;
+  typedef ResponseType::Pointer  ResponsePointerType;
+
+  if ( argc!=5 )
+  {
+  std::cout << argv[0] << std::endl << "\t" << "<RSR_filename>"<< "\t" << "<Nb total band>"<< "\t"
+            << "<lambda>"<< "\t" << "\t" << "<expected>" << std::endl;
+  return EXIT_FAILURE;
+  }
+  //Instantiation
+  ResponsePointerType  myResponse=ResponseType::New();
+
+  myResponse->SetNbBands(atoi(argv[2]));
+  //Load file into vector
+  const std::string file(argv[1]);
+  myResponse->Load(file);
+  //itk::Indent ind;
+  double lambda = atof(argv[3]);
+  double expected = atof(argv[4]);
+
+  double solar_irradiance = (*(myResponse->GetSolarIrradiance()))(lambda);
+
+  std::cout << "SolarIrradiance("<<lambda <<")= " << solar_irradiance << std::endl;
+  if(fabs(solar_irradiance - expected) > 10e-3)
+    {
+    std::cout << "Expected value was = " << expected << std::endl;
+    return EXIT_FAILURE;
+    }
+  
+  return EXIT_SUCCESS;
+}
diff --git a/Testing/Code/Simulation/otbSatelliteRSRNew.cxx b/Testing/Code/Simulation/otbSatelliteRSRNew.cxx
index 7168adf..0da7a60 100644
--- a/Testing/Code/Simulation/otbSatelliteRSRNew.cxx
+++ b/Testing/Code/Simulation/otbSatelliteRSRNew.cxx
@@ -20,7 +20,7 @@
 
 #include "otbSatelliteRSR.h"
 
-int otbSatelliteRSRNew(int argc, char * argv[])
+int otbSatelliteRSRNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::SatelliteRSR< double, double>  ResponseType;
   typedef ResponseType::Pointer  ResponsePointerType;
diff --git a/Testing/Code/Simulation/otbSimulationTests2.cxx b/Testing/Code/Simulation/otbSimulationTests2.cxx
index 951461f..2497dcc 100644
--- a/Testing/Code/Simulation/otbSimulationTests2.cxx
+++ b/Testing/Code/Simulation/otbSimulationTests2.cxx
@@ -28,8 +28,11 @@ void RegisterTests()
   REGISTER_TEST(otbSpectralResponse);
   REGISTER_TEST(otbSatelliteRSRNew);
   REGISTER_TEST(otbSatelliteRSR);
+  REGISTER_TEST(otbSatelliteRSRCheckValue);
+  REGISTER_TEST(otbSatelliteRSRSolarIrradianceCheckValue);
   REGISTER_TEST(otbReduceSpectralResponseNew);
   REGISTER_TEST(otbReduceSpectralResponse);
+  REGISTER_TEST(otbReduceSpectralResponseSimpleValues);
   REGISTER_TEST(otbReduceSpectralResponseClassifierRAndNIR);
   REGISTER_TEST(otbAtmosphericEffects);
   REGISTER_TEST(otbSpatialisationTestNew);
diff --git a/Testing/Code/Simulation/otbSpatialisationTest.cxx b/Testing/Code/Simulation/otbSpatialisationTest.cxx
index 109d748..e32906c 100644
--- a/Testing/Code/Simulation/otbSpatialisationTest.cxx
+++ b/Testing/Code/Simulation/otbSpatialisationTest.cxx
@@ -23,7 +23,7 @@
 #include "otbImage.h"
 #include "otbAttributesMapLabelObject.h"
 
-int otbSpatialisationTest(int argc, char * argv[])
+int otbSpatialisationTest(int itkNotUsed(argc), char * argv[])
 {
   const char * outfilename  = argv[1];
 
diff --git a/Testing/Code/Simulation/otbSpatialisationTestNew.cxx b/Testing/Code/Simulation/otbSpatialisationTestNew.cxx
index 36d9f48..dd39d1a 100644
--- a/Testing/Code/Simulation/otbSpatialisationTestNew.cxx
+++ b/Testing/Code/Simulation/otbSpatialisationTestNew.cxx
@@ -23,11 +23,10 @@
 #include "otbImage.h"
 #include "otbAttributesMapLabelObject.h"
 
-int otbSpatialisationTestNew(int argc, char * argv[])
+int otbSpatialisationTestNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef unsigned short LabelType;
   const unsigned int Dimension = 2;
-  typedef otb::Image<LabelType, Dimension> ImageType;
   typedef otb::AttributesMapLabelObject<LabelType, Dimension, std::string>    LabelObjectType;
   typedef itk::LabelMap<LabelObjectType>                                      LabelMapType;
   typedef otb::SpatialisationFilter<LabelMapType>                             FilterType;
diff --git a/Testing/Code/Simulation/otbSpectralResponseNew.cxx b/Testing/Code/Simulation/otbSpectralResponseNew.cxx
index 657aa3e..b16b208 100644
--- a/Testing/Code/Simulation/otbSpectralResponseNew.cxx
+++ b/Testing/Code/Simulation/otbSpectralResponseNew.cxx
@@ -20,7 +20,7 @@
 
 #include "otbSpectralResponse.h"
 
-int otbSpectralResponseNew(int argc, char * argv[])
+int otbSpectralResponseNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   typedef otb::SpectralResponse< double, double>  ResponseType;
   typedef ResponseType::Pointer  ResponsePointerType;
diff --git a/Testing/Code/Simulation/otbSurfaceReflectanceToReflectanceFilterNew.cxx b/Testing/Code/Simulation/otbSurfaceReflectanceToReflectanceFilterNew.cxx
index 9aaaf5b..da7f3c1 100644
--- a/Testing/Code/Simulation/otbSurfaceReflectanceToReflectanceFilterNew.cxx
+++ b/Testing/Code/Simulation/otbSurfaceReflectanceToReflectanceFilterNew.cxx
@@ -24,7 +24,7 @@
 #include "otbSurfaceReflectanceToReflectanceFilter.h"
 #include "otbAtmosphericRadiativeTerms.h"
 
-int otbSurfaceReflectanceToReflectanceFilterNew(int argc, char * argv[])
+int otbSurfaceReflectanceToReflectanceFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   const unsigned int                            Dimension = 2;
   typedef double                                PixelType;
@@ -51,7 +51,7 @@ int otbSurfaceReflectanceToReflectanceFilterTest(int argc, char * argv[])
   typedef double                                PixelType;
   typedef otb::VectorImage<PixelType, Dimension> ImageType;
 
-  typedef itk::ImageRegionIterator< ImageType > IteratorType;
+//  typedef itk::ImageRegionIterator< ImageType > IteratorType;
   //typedef ResponseType::PairType    PairType;
   //typedef otb::ObjectList< PairType > PairListType;
   //   PairListType::Pointer pairList = PairListType::New();
diff --git a/Testing/Code/SpatialReasoning/otbImageListToRCC8GraphFilterNew.cxx b/Testing/Code/SpatialReasoning/otbImageListToRCC8GraphFilterNew.cxx
index 28c349d..c799a7e 100644
--- a/Testing/Code/SpatialReasoning/otbImageListToRCC8GraphFilterNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbImageListToRCC8GraphFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbImageListToRCC8GraphFilter.h"
 #include "otbPolygon.h"
 
-int otbImageListToRCC8GraphFilterNew(int argc, char* argv[])
+int otbImageListToRCC8GraphFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned short                        LabelPixelType;
diff --git a/Testing/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.cxx b/Testing/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.cxx
index df6cf4c..990c902 100644
--- a/Testing/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.cxx
+++ b/Testing/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.cxx
@@ -25,7 +25,7 @@
 #include "otbImageFileReader.h"
 #include "otbRCC8GraphFileWriter.h"
 
-int otbImageMultiSegmentationToRCC8GraphFilter(int argc, char* argv[])
+int otbImageMultiSegmentationToRCC8GraphFilter(int itkNotUsed(argc), char* argv[])
 {
   const unsigned int Dimension = 2;
   char *             outputFilename = argv[1];
diff --git a/Testing/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilterNew.cxx b/Testing/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilterNew.cxx
index 7c6581a..ed38a06 100644
--- a/Testing/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilterNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbPolygon.h"
 #include "otbImageMultiSegmentationToRCC8GraphFilter.h"
 
-int otbImageMultiSegmentationToRCC8GraphFilterNew(int argc, char* argv[])
+int otbImageMultiSegmentationToRCC8GraphFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int Dimension = 2;
   typedef unsigned short                        LabelPixelType;
diff --git a/Testing/Code/SpatialReasoning/otbImageToImageRCC8Calculator.cxx b/Testing/Code/SpatialReasoning/otbImageToImageRCC8Calculator.cxx
index 2799803..6c3f52e 100644
--- a/Testing/Code/SpatialReasoning/otbImageToImageRCC8Calculator.cxx
+++ b/Testing/Code/SpatialReasoning/otbImageToImageRCC8Calculator.cxx
@@ -21,7 +21,7 @@
 #include "otbImageList.h"
 #include "otbImageFileReader.h"
 
-int otbImageToImageRCC8Calculator(int argc, char* argv[])
+int otbImageToImageRCC8Calculator(int itkNotUsed(argc), char* argv[])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/SpatialReasoning/otbImageToImageRCC8CalculatorNew.cxx b/Testing/Code/SpatialReasoning/otbImageToImageRCC8CalculatorNew.cxx
index dd0793d..1f3ff98 100644
--- a/Testing/Code/SpatialReasoning/otbImageToImageRCC8CalculatorNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbImageToImageRCC8CalculatorNew.cxx
@@ -19,7 +19,7 @@
 #include "otbImageToImageRCC8Calculator.h"
 #include "otbImage.h"
 
-int otbImageToImageRCC8CalculatorNew(int argc, char* argv[])
+int otbImageToImageRCC8CalculatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   //    const unsigned int Dimension = 2;
   //     typedef unsigned char PixelType;
diff --git a/Testing/Code/SpatialReasoning/otbPolygonListToRCC8GraphFilter.cxx b/Testing/Code/SpatialReasoning/otbPolygonListToRCC8GraphFilter.cxx
index 1a7d728..154d624 100644
--- a/Testing/Code/SpatialReasoning/otbPolygonListToRCC8GraphFilter.cxx
+++ b/Testing/Code/SpatialReasoning/otbPolygonListToRCC8GraphFilter.cxx
@@ -42,10 +42,8 @@ PolygonType::VertexType Vertex(double i,double j)
 }
 
 
-int otbPolygonListToRCC8GraphFilter(int argc, char* argv[])
+int otbPolygonListToRCC8GraphFilter(int itkNotUsed(argc), char* argv[])
 {
-  const unsigned int Dimension = 2;
-
   char * outfile = argv[1];
 
   PolygonListType::Pointer regions = PolygonListType::New();
diff --git a/Testing/Code/SpatialReasoning/otbPolygonListToRCC8GraphFilterNew.cxx b/Testing/Code/SpatialReasoning/otbPolygonListToRCC8GraphFilterNew.cxx
index cd0813a..12546aa 100644
--- a/Testing/Code/SpatialReasoning/otbPolygonListToRCC8GraphFilterNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbPolygonListToRCC8GraphFilterNew.cxx
@@ -22,7 +22,7 @@
 #include "otbRCC8VertexBase.h"
 #include "otbPolygonListToRCC8GraphFilter.h"
 
-int otbPolygonListToRCC8GraphFilterNew(int argc, char* argv[])
+int otbPolygonListToRCC8GraphFilterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   // typedefs
   typedef otb::Polygon<>                   PolygonType;
diff --git a/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.cxx b/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.cxx
index a0d37ff..ca74107 100644
--- a/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.cxx
+++ b/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.cxx
@@ -24,7 +24,7 @@
 #include "otbImageToEdgePathFilter.h"
 #include "otbSimplifyPathListFilter.h"
 
-int otbPolygonToPolygonRCC8Calculator(int argc, char* argv[])
+int otbPolygonToPolygonRCC8Calculator(int itkNotUsed(argc), char* argv[])
 {
   const unsigned int Dimension = 2;
 
diff --git a/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8CalculatorNew.cxx b/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8CalculatorNew.cxx
index 6133c0f..01b260a 100644
--- a/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8CalculatorNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8CalculatorNew.cxx
@@ -19,7 +19,7 @@
 #include "otbPolygonToPolygonRCC8Calculator.h"
 #include "otbPolygon.h"
 
-int otbPolygonToPolygonRCC8CalculatorNew(int argc, char* argv[])
+int otbPolygonToPolygonRCC8CalculatorNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Polygon<>                                   PolygonType;
   typedef otb::PolygonToPolygonRCC8Calculator<PolygonType> CalculatorType;
diff --git a/Testing/Code/SpatialReasoning/otbRCC8Edge.cxx b/Testing/Code/SpatialReasoning/otbRCC8Edge.cxx
index 1d1bfa8..19acd7c 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8Edge.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8Edge.cxx
@@ -19,7 +19,7 @@
 #include "otbRCC8Edge.h"
 #include <cstdlib>
 
-int otbRCC8Edge(int argc, char* argv[])
+int otbRCC8Edge(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::RCC8Edge               RCC8EdgeType;
   typedef RCC8EdgeType::RCC8ValueType RCC8ValueType;
diff --git a/Testing/Code/SpatialReasoning/otbRCC8EdgeNew.cxx b/Testing/Code/SpatialReasoning/otbRCC8EdgeNew.cxx
index 0261d1f..57559b9 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8EdgeNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8EdgeNew.cxx
@@ -19,7 +19,7 @@
 #include "otbRCC8Edge.h"
 #include <cstdlib>
 
-int otbRCC8EdgeNew(int argc, char* argv[])
+int otbRCC8EdgeNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::RCC8Edge RCC8EdgeType;
 
diff --git a/Testing/Code/SpatialReasoning/otbRCC8Graph.cxx b/Testing/Code/SpatialReasoning/otbRCC8Graph.cxx
index decc72b..a257101 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8Graph.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8Graph.cxx
@@ -25,18 +25,15 @@
 #include "otbMacro.h"
 #include "otbPolygon.h"
 
-int otbRCC8Graph(int argc, char* argv[])
+int otbRCC8Graph(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   const unsigned int nbVertices = 2;
   typedef otb::Polygon<>                          PathType;
   typedef PathType::VertexType                    PointType;
   typedef otb::RCC8VertexBase<PathType>           VertexType;
   typedef otb::RCC8Graph<VertexType>              RCC8GraphType;
-  typedef RCC8GraphType::EdgeType                 EdgeType;
   typedef otb::RCC8VertexIterator<RCC8GraphType>  VertexIteratorType;
   typedef otb::RCC8EdgeIterator<RCC8GraphType>    EdgeIteratorType;
-  typedef otb::RCC8InEdgeIterator<RCC8GraphType>  InEdgeIteratorType;
-  typedef otb::RCC8OutEdgeIterator<RCC8GraphType> OutEdgeIteratorType;
 
   // Instantiation
   RCC8GraphType::Pointer rcc8Graph = RCC8GraphType::New();
diff --git a/Testing/Code/SpatialReasoning/otbRCC8GraphFileReader.cxx b/Testing/Code/SpatialReasoning/otbRCC8GraphFileReader.cxx
index 75d8678..d466954 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8GraphFileReader.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8GraphFileReader.cxx
@@ -24,7 +24,7 @@
 #include "otbMacro.h"
 #include "otbPolygon.h"
 
-int otbRCC8GraphFileReader(int argc, char* argv[])
+int otbRCC8GraphFileReader(int itkNotUsed(argc), char* argv[])
 {
   char * inputFilename = argv[1];
   typedef otb::Polygon<>                          PathType;
diff --git a/Testing/Code/SpatialReasoning/otbRCC8GraphFileReaderNew.cxx b/Testing/Code/SpatialReasoning/otbRCC8GraphFileReaderNew.cxx
index 170e26d..ae788dc 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8GraphFileReaderNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8GraphFileReaderNew.cxx
@@ -21,7 +21,7 @@
 #include "otbRCC8GraphFileReader.h"
 #include "otbPolygon.h"
 
-int otbRCC8GraphFileReaderNew(int argc, char* argv[])
+int otbRCC8GraphFileReaderNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Polygon<>                          PathType;
   typedef otb::RCC8VertexBase<PathType>           VertexType;
diff --git a/Testing/Code/SpatialReasoning/otbRCC8GraphFileWriter.cxx b/Testing/Code/SpatialReasoning/otbRCC8GraphFileWriter.cxx
index 1c9ad38..c22cf12 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8GraphFileWriter.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8GraphFileWriter.cxx
@@ -21,7 +21,7 @@
 #include "otbRCC8GraphFileWriter.h"
 #include "otbPolygon.h"
 
-int otbRCC8GraphFileWriter(int argc, char* argv[])
+int otbRCC8GraphFileWriter(int itkNotUsed(argc), char* argv[])
 {
   const char * outputFile = argv[1];
 
diff --git a/Testing/Code/SpatialReasoning/otbRCC8GraphFileWriterNew.cxx b/Testing/Code/SpatialReasoning/otbRCC8GraphFileWriterNew.cxx
index d4c9795..3be4507 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8GraphFileWriterNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8GraphFileWriterNew.cxx
@@ -21,7 +21,7 @@
 #include "otbRCC8GraphFileWriter.h"
 #include "otbPolygon.h"
 
-int otbRCC8GraphFileWriterNew(int argc, char* argv[])
+int otbRCC8GraphFileWriterNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Polygon<>                          PathType;
   typedef otb::RCC8VertexBase<PathType>           VertexType;
diff --git a/Testing/Code/SpatialReasoning/otbRCC8GraphIOEndToEnd.cxx b/Testing/Code/SpatialReasoning/otbRCC8GraphIOEndToEnd.cxx
index 4258d9c..197c541 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8GraphIOEndToEnd.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8GraphIOEndToEnd.cxx
@@ -22,7 +22,7 @@
 #include "otbRCC8GraphFileWriter.h"
 #include "otbPolygon.h"
 
-int otbRCC8GraphIOEndToEnd(int argc, char* argv[])
+int otbRCC8GraphIOEndToEnd(int itkNotUsed(argc), char* argv[])
 {
   char * inputFilename = argv[1];
   char * outputFilename = argv[2];
diff --git a/Testing/Code/SpatialReasoning/otbRCC8GraphNew.cxx b/Testing/Code/SpatialReasoning/otbRCC8GraphNew.cxx
index 0b35e6e..783767b 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8GraphNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8GraphNew.cxx
@@ -20,7 +20,7 @@
 #include "otbRCC8VertexBase.h"
 #include "otbPolygon.h"
 
-int otbRCC8GraphNew(int argc, char* argv[])
+int otbRCC8GraphNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Polygon<>                PathType;
   typedef otb::RCC8VertexBase<PathType> VertexType;
diff --git a/Testing/Code/SpatialReasoning/otbRCC8GraphSourceNew.cxx b/Testing/Code/SpatialReasoning/otbRCC8GraphSourceNew.cxx
index 9e183e1..8ba34a4 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8GraphSourceNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8GraphSourceNew.cxx
@@ -21,7 +21,7 @@
 #include "otbRCC8VertexBase.h"
 #include "otbPolygon.h"
 
-int otbRCC8GraphSourceNew(int argc, char* argv[])
+int otbRCC8GraphSourceNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Polygon<>                      PathType;
   typedef otb::RCC8VertexBase<PathType>       VertexType;
diff --git a/Testing/Code/SpatialReasoning/otbRCC8VertexBase.cxx b/Testing/Code/SpatialReasoning/otbRCC8VertexBase.cxx
index 11d01a0..7bf0423 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8VertexBase.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8VertexBase.cxx
@@ -20,7 +20,7 @@
 #include "otbPolygon.h"
 #include "otbMacro.h"
 
-int otbRCC8VertexBase(int argc, char* argv[])
+int otbRCC8VertexBase(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::Polygon<> PathType;
   unsigned int imageLevel = atoi(argv[1]);
diff --git a/Testing/Code/SpatialReasoning/otbRCC8VertexBaseNew.cxx b/Testing/Code/SpatialReasoning/otbRCC8VertexBaseNew.cxx
index d94a906..b8604c2 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8VertexBaseNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8VertexBaseNew.cxx
@@ -19,7 +19,7 @@
 #include "otbRCC8VertexBase.h"
 #include "otbPolygon.h"
 
-int otbRCC8VertexBaseNew(int argc, char* argv[])
+int otbRCC8VertexBaseNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Polygon<>                PathType;
   typedef otb::RCC8VertexBase<PathType> RCC8VertexType;
diff --git a/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacity.cxx b/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacity.cxx
index e653681..8466fc9 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacity.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacity.cxx
@@ -20,7 +20,7 @@
 #include "otbMacro.h"
 #include "otbPolygon.h"
 
-int otbRCC8VertexWithCompacity(int argc, char* argv[])
+int otbRCC8VertexWithCompacity(int itkNotUsed(argc), char* argv[])
 {
   typedef otb::Polygon<> PathType;
   typedef double         PrecisionType;
diff --git a/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacityNew.cxx b/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacityNew.cxx
index a56c0cc..6326dec 100644
--- a/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacityNew.cxx
+++ b/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacityNew.cxx
@@ -19,7 +19,7 @@
 #include "otbRCC8VertexWithCompacity.h"
 #include "otbPolygon.h"
 
-int otbRCC8VertexWithCompacityNew(int argc, char* argv[])
+int otbRCC8VertexWithCompacityNew(int itkNotUsed(argc), char * itkNotUsed(argv) [])
 {
   typedef otb::Polygon<>                                        PathType;
   typedef float                                                 PrecisionType;
diff --git a/Testing/Code/TestSystem/otbCompareAsciiTestsEpsilon3_WhiteSpace.cxx b/Testing/Code/TestSystem/otbCompareAsciiTestsEpsilon3_WhiteSpace.cxx
index ea18e66..5fe3450 100644
--- a/Testing/Code/TestSystem/otbCompareAsciiTestsEpsilon3_WhiteSpace.cxx
+++ b/Testing/Code/TestSystem/otbCompareAsciiTestsEpsilon3_WhiteSpace.cxx
@@ -22,7 +22,7 @@
 
 #include "otbMacro.h"
 
-int otbCompareAsciiTestsEpsilon3_WhiteSpace(int argc, char * argv[])
+int otbCompareAsciiTestsEpsilon3_WhiteSpace(int itkNotUsed(argc), char * argv[])
 {
   std::cout << "ASCII COMPARISON TEST: it will use directly the baseline and input files in OTB-Data "
       "to avoid problem with otb-bot." << std::endl;
@@ -34,7 +34,7 @@ int otbCompareAsciiTestsEpsilon3_WhiteSpace(int argc, char * argv[])
   // Transfer to temporary object
   std::string strFileTest;
   std::vector<std::string> listLineFileTest;
-  while (std::getline(fileTestInput, strFileTest) != 0)
+  while (std::getline(fileTestInput, strFileTest))
     {
     listLineFileTest.push_back(strFileTest);
     }
diff --git a/Testing/Code/UtilitiesAdapters/OGRAdapters/otbOGRDataSourceWrapperNew.cxx b/Testing/Code/UtilitiesAdapters/OGRAdapters/otbOGRDataSourceWrapperNew.cxx
index 60492c0..c9b05b2 100644
--- a/Testing/Code/UtilitiesAdapters/OGRAdapters/otbOGRDataSourceWrapperNew.cxx
+++ b/Testing/Code/UtilitiesAdapters/OGRAdapters/otbOGRDataSourceWrapperNew.cxx
@@ -603,7 +603,7 @@ BOOST_AUTO_TEST_CASE(OGRDataSource_sqlite_overwrite)
   ogr::Layer l = ds -> CreateLayer(layer1, 0, wkbPoint);
   BOOST_CHECK_EQUAL(l.GetFeatureCount(true), 0);
 
-  OGRFeatureDefn & defn = l.GetLayerDefn();
+//  OGRFeatureDefn & defn = l.GetLayerDefn();
   l.CreateField(k_f0);
   l.CreateField(k_f1);
 
diff --git a/Testing/Code/UtilitiesAdapters/otbGeometricSarSensorModelAdapter.cxx b/Testing/Code/UtilitiesAdapters/otbGeometricSarSensorModelAdapter.cxx
index c484da6..84f0dc9 100644
--- a/Testing/Code/UtilitiesAdapters/otbGeometricSarSensorModelAdapter.cxx
+++ b/Testing/Code/UtilitiesAdapters/otbGeometricSarSensorModelAdapter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbGeometricSarSensorModelAdapter.h"
 
-int otbGeometricSarSensorModelAdapterNewTest(int argc, char* argv[])
+int otbGeometricSarSensorModelAdapterNewTest(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   typedef otb::GeometricSarSensorModelAdapter SarSensorModelType;
   SarSensorModelType::Pointer masterPlatform = SarSensorModelType::New();
diff --git a/Testing/Code/UtilitiesAdapters/otbPlatformPositionAdapter.cxx b/Testing/Code/UtilitiesAdapters/otbPlatformPositionAdapter.cxx
index 8597a7e..b939848 100644
--- a/Testing/Code/UtilitiesAdapters/otbPlatformPositionAdapter.cxx
+++ b/Testing/Code/UtilitiesAdapters/otbPlatformPositionAdapter.cxx
@@ -22,7 +22,7 @@
 #include "otbImageFileReader.h"
 #include "otbPlatformPositionAdapter.h"
 
-int otbPlatformPositionComputeBaselineNewTest(int argc, char* argv[])
+int otbPlatformPositionComputeBaselineNewTest(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   typedef otb::PlatformPositionAdapter PlatformType;
   PlatformType::Pointer masterPlatform = PlatformType::New();
diff --git a/Testing/Code/Wrappers/CommandLine/CMakeLists.txt b/Testing/Code/Wrappers/CommandLine/CMakeLists.txt
index 94f236a..71f4c5b 100644
--- a/Testing/Code/Wrappers/CommandLine/CMakeLists.txt
+++ b/Testing/Code/Wrappers/CommandLine/CMakeLists.txt
@@ -14,28 +14,28 @@ add_test(NAME clTuWrapperCommandLineParserNew
 add_test(NAME clTvWrapperCommandLineParserTest_GetAtt
          COMMAND ${OTB_WRAPPER_COMMAND_LINE_TESTS} otbWrapperCommandLineParserTest1
                  "-key"
-                 "this is a line test to extract -key name1 name2" )
+                 "this" "is" "a" "line" "test" "to" "extract" "-key" "name1" "name2" )
 
 add_test(NAME clTvWrapperCommandLineParserTest_IsAttExists_Wrong
          COMMAND ${OTB_WRAPPER_COMMAND_LINE_TESTS} otbWrapperCommandLineParserTest3
                     "-m"
-                    " TrainImagesClassifier test -il QB_1_ortho.tif -vd vd .shape " )
+                    "TrainImagesClassifier" "test" "-il" "QB_1_ortho.tif" "-vd" "vd" ".shape" )
 
 
 add_test(NAME clTvWrapperCommandLineParserTest_IsAttExists
          COMMAND ${OTB_WRAPPER_COMMAND_LINE_TESTS} otbWrapperCommandLineParserTest4
                  "-m"
-                 " TrainImagesClassifier test -il QB_1_ortho.tif -vd vd .shape -m name")
+                 "TrainImagesClassifier" "test" "-il" "QB_1_ortho.tif" "-vd" "vd" ".shape" "-m" "name")
 
 add_test(NAME clTvWrapperCommandLineParserTest_IsAttExistsEnd
          COMMAND ${OTB_WRAPPER_COMMAND_LINE_TESTS} otbWrapperCommandLineParserTest4
                  "-m"
-                 " TrainImagesClassifier test -il QB_1_ortho.tif -vd vd .shape -m name")
+                 "TrainImagesClassifier" "test" "-il" "QB_1_ortho.tif" "-vd" "vd" ".shape" "-m" "name")
 
 add_test(NAME clTvWrapperCommandLineParserTest_IsAttExistsEndNoParam
          COMMAND ${OTB_WRAPPER_COMMAND_LINE_TESTS} otbWrapperCommandLineParserTest4
                  "-m"
-                 " TrainImagesClassifier test -il QB_1_ortho.tif -vd vd .shape test -m")
+                 "TrainImagesClassifier" "test" "-il" "QB_1_ortho.tif" "-vd" "vd" ".shape" "test" "-m")
 
 add_test(NAME clTvWrapperCommandLineParserTest_GetAttWithoutValue
          COMMAND ${OTB_WRAPPER_COMMAND_LINE_TESTS} otbWrapperCommandLineParserTest1
diff --git a/Testing/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncherTests.cxx b/Testing/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncherTests.cxx
index d1a43ab..63967a9 100644
--- a/Testing/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncherTests.cxx
+++ b/Testing/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncherTests.cxx
@@ -22,7 +22,7 @@
 #include "otbWrapperCommandLineLauncher.h"
 
 
-int otbWrapperCommandLineLauncherNew(int argc, char* argv[])
+int otbWrapperCommandLineLauncherNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   typedef otb::Wrapper::CommandLineLauncher LauncherType;
   LauncherType::Pointer launcher = LauncherType::New();
@@ -38,17 +38,16 @@ int otbWrapperCommandLineLauncherTest(int argc, char* argv[])
   typedef otb::Wrapper::CommandLineLauncher LauncherType;
   LauncherType::Pointer launcher = LauncherType::New();
 
-  std::ostringstream input;
+  std::vector<std::string> cmdVector;
   if (argc > 2)
     {
-    input << argv[1];
-    for (int i = 2; i < argc; i++)
+    for (int i = 1; i < argc; i++)
       {
-      input << " " << argv[i];
+      cmdVector.push_back(std::string(argv[i]));
       }
     }
 
-  if (launcher->Load(input.str()) == true)
+  if (launcher->Load(cmdVector) == true)
     {
     if (launcher->ExecuteAndWriteOutput() == false)
       {
@@ -62,5 +61,3 @@ int otbWrapperCommandLineLauncherTest(int argc, char* argv[])
 
   return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Code/Wrappers/CommandLine/otbWrapperCommandLineParserTests.cxx b/Testing/Code/Wrappers/CommandLine/otbWrapperCommandLineParserTests.cxx
index aa445e8..526bd13 100644
--- a/Testing/Code/Wrappers/CommandLine/otbWrapperCommandLineParserTests.cxx
+++ b/Testing/Code/Wrappers/CommandLine/otbWrapperCommandLineParserTests.cxx
@@ -23,7 +23,7 @@
 
 typedef otb::Wrapper::CommandLineParser ParserType;
 
-int otbWrapperCommandLineParserNew(int argc, char* argv[])
+int otbWrapperCommandLineParserNew(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
   ParserType::Pointer parser = ParserType::New();
 
@@ -72,8 +72,13 @@ int CheckReturn(ParserType::ParseResultType res)
 int otbWrapperCommandLineParserTest1(int argc, char* argv[])
 {
   ParserType::Pointer parser = ParserType::New();
+  std::vector<std::string> cmdVector;
+  for (int i=2; i<argc; ++i)
+    {
+    cmdVector.push_back(std::string(argv[i]));
+    }
 
-  std::vector<std::string> res = parser->GetAttribut( argv[1], argv[2] );
+  std::vector<std::string> res = parser->GetAttribut( argv[1], cmdVector );
 
   if( res.size() == 0 )
     {
@@ -89,18 +94,17 @@ int otbWrapperCommandLineParserTest2(int argc, char* argv[])
 
   std::cout << "Search for paths..." << std::endl;
 
-  std::ostringstream input;
+  std::vector<std::string> cmdVector;
   if (argc > 2)
     {
-    input << argv[1];
-    for (int i = 2; i < argc; i++)
+    for (int i=1; i<argc; ++i)
       {
-      input << " " << argv[i];
+      cmdVector.push_back(std::string(argv[i]));
       }
     }
 
   std::vector<std::string> paths;
-  ParserType::ParseResultType res = parser->GetPaths(paths, input.str());
+  ParserType::ParseResultType res = parser->GetPaths(paths, cmdVector);
   if (CheckReturn(res) != ParserType::OK)
     {
     std::cout << "Can't find paths." << std::endl;
@@ -111,7 +115,7 @@ int otbWrapperCommandLineParserTest2(int argc, char* argv[])
   std::cout << "Search for module name..." << std::endl;
 
   std::string name;
-  res = parser->GetModuleName(name, argv[1]);
+  res = parser->GetModuleName(name, cmdVector);
 
   if (CheckReturn(res) != ParserType::OK)
     {
@@ -126,8 +130,16 @@ int otbWrapperCommandLineParserTest2(int argc, char* argv[])
 int otbWrapperCommandLineParserTest3(int argc, char* argv[])
 {
   ParserType::Pointer parser = ParserType::New();
+  std::vector<std::string> cmdVector;
+  if (argc > 2)
+    {
+    for (int i=2; i<argc; ++i)
+      {
+      cmdVector.push_back(std::string(argv[i]));
+      }
+    }
 
-  if (parser->IsAttributExists(argv[1], argv[2]))
+  if (parser->IsAttributExists(argv[1], cmdVector))
     {
     return EXIT_FAILURE;
     }
@@ -138,11 +150,18 @@ int otbWrapperCommandLineParserTest3(int argc, char* argv[])
 int otbWrapperCommandLineParserTest4(int argc, char* argv[])
 {
   ParserType::Pointer parser = ParserType::New();
+  std::vector<std::string> cmdVector;
+  if (argc > 2)
+    {
+    for (int i=2; i<argc; ++i)
+      {
+      cmdVector.push_back(std::string(argv[i]));
+      }
+    }
 
-  if (parser->IsAttributExists(argv[1], argv[2]))
+  if (parser->IsAttributExists(argv[1], cmdVector))
     {
     return EXIT_SUCCESS;
     }
   return EXIT_FAILURE;
 }
-
diff --git a/Testing/Fa/0000094-PolygonsVectorization.cxx b/Testing/Fa/0000094-PolygonsVectorization.cxx
index 184cb20..b837433 100644
--- a/Testing/Fa/0000094-PolygonsVectorization.cxx
+++ b/Testing/Fa/0000094-PolygonsVectorization.cxx
@@ -50,25 +50,19 @@
 int main(int argc, char * argv[])
 {
 
-  typedef unsigned char PixelType;
   typedef unsigned long LabelPixelType;
   typedef unsigned char PixelTypeOutput;
 
-  typedef otb::Image<PixelType, 2>       SingleImageType;
   typedef otb::Image<LabelPixelType, 2>  LabeledImageType;
   typedef otb::Image<PixelTypeOutput, 2> OutputImageType;
-
   typedef itk::ImageRegionIterator<LabeledImageType> IteratorType;
-
   typedef otb::Polygon<double>             PolygonType;
-  typedef PolygonType::Pointer             PolygonPointerType;
-  typedef PolygonType::ContinuousIndexType PolygonIndexType;
   typedef otb::ObjectList<PolygonType>     PolygonListType;
   typedef PolygonListType::Pointer         PolygonListPointerType;
   typedef itk::ImageRegion<2>              ImageRegionType;
 
   typedef otb::PersistentVectorizationImageFilter<LabeledImageType, PolygonType> PersistentVectorizationFilterType;
-  typedef itk::RelabelComponentImageFilter<LabeledImageType, LabeledImageType>   RelabelFilterType;
+
   typedef itk::ConnectedComponentImageFilter<LabeledImageType, LabeledImageType> ConnectedFilterType;
   typedef itk::RescaleIntensityImageFilter<LabeledImageType, OutputImageType>    RescalerType;
 /*
diff --git a/Testing/Fa/0000307-ExtractROICompareRegionsImplementations.cxx b/Testing/Fa/0000307-ExtractROICompareRegionsImplementations.cxx
index 10ac975..7a253cb 100644
--- a/Testing/Fa/0000307-ExtractROICompareRegionsImplementations.cxx
+++ b/Testing/Fa/0000307-ExtractROICompareRegionsImplementations.cxx
@@ -88,7 +88,7 @@ VectorImageType::Pointer makeVectorImage(IndexValueType startX, IndexValueType s
   return im;
 }
 
-int otbITKExtractImageFilterROITestRegion(int argc, char * argv[])
+int otbITKExtractImageFilterROITestRegion(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   ImageType::Pointer in;
   RegionType extractionRegion;
@@ -140,7 +140,7 @@ int otbITKExtractImageFilterROITestRegion(int argc, char * argv[])
 }
 
 
-int otbITKVectorIndexSelectionCastTestRegion(int argc, char * argv[])
+int otbITKVectorIndexSelectionCastTestRegion(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   VectorImageType::Pointer in;
   RegionType extractionRegion;
@@ -180,7 +180,7 @@ int otbITKVectorIndexSelectionCastTestRegion(int argc, char * argv[])
 }
 
 
-int otbMultiToMonoChannelExtractROITestRegion(int argc, char * argv[])
+int otbMultiToMonoChannelExtractROITestRegion(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   VectorImageType::Pointer in;
   RegionType extractionRegion;
@@ -233,7 +233,7 @@ int otbMultiToMonoChannelExtractROITestRegion(int argc, char * argv[])
 
 
 
-int otbMultiChannelExtractROITestRegion(int argc, char * argv[])
+int otbMultiChannelExtractROITestRegion(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   VectorImageType::Pointer in;
   RegionType extractionRegion;
@@ -285,7 +285,7 @@ int otbMultiChannelExtractROITestRegion(int argc, char * argv[])
 }
 
 
-int otbExtractROITestRegion(int argc, char * argv[])
+int otbExtractROITestRegion(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   ImageType::Pointer in;
   RegionType extractionRegion;
@@ -415,4 +415,3 @@ int main(int argc, char * argv[])
   return finalResult;
 
 }
-
diff --git a/Testing/Fa/0000433-LineSegmentDetector_8b_16b_compare.cxx b/Testing/Fa/0000433-LineSegmentDetector_8b_16b_compare.cxx
index b2f7411..3088a28 100644
--- a/Testing/Fa/0000433-LineSegmentDetector_8b_16b_compare.cxx
+++ b/Testing/Fa/0000433-LineSegmentDetector_8b_16b_compare.cxx
@@ -45,14 +45,10 @@ int main(int argc, char *argv[])
   typedef otb::Image<PixelType8>                                      ImageType8;
   typedef otb::ImageFileReader<ImageType8>                            ReaderType8;
   typedef otb::LineSegmentDetector<ImageType8, double>                LSDFilterType8;
-  typedef otb::ImageFileWriter<ImageType8>                            WriterType8;
-
   typedef unsigned short                                              PixelType16;
   typedef otb::Image<PixelType16>                                     ImageType16;
   typedef otb::ImageFileReader<ImageType16>                           ReaderType16;
   typedef otb::LineSegmentDetector<ImageType16, double>               LSDFilterType16;
-  typedef otb::ImageFileWriter<ImageType16>                           WriterType16;
-
   typedef LSDFilterType8::VectorDataType                              VectorDataType;
   typedef otb::VectorDataFileWriter<VectorDataType>                   VectorDataWriterType;
 
diff --git a/Testing/Fa/0000479-WriteInt8Image.cxx b/Testing/Fa/0000479-WriteInt8Image.cxx
index 0431c5b..332b2ab 100644
--- a/Testing/Fa/0000479-WriteInt8Image.cxx
+++ b/Testing/Fa/0000479-WriteInt8Image.cxx
@@ -25,7 +25,7 @@
 #include "itkImageRegionIterator.h"
 
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
   typedef char PixelType;
 
diff --git a/Testing/Fa/000295-MeanShiftVectorImageFilterWithStreamingShrink.cxx b/Testing/Fa/000295-MeanShiftVectorImageFilterWithStreamingShrink.cxx
index 58805b9..c04b322 100644
--- a/Testing/Fa/000295-MeanShiftVectorImageFilterWithStreamingShrink.cxx
+++ b/Testing/Fa/000295-MeanShiftVectorImageFilterWithStreamingShrink.cxx
@@ -23,7 +23,7 @@
 #include "otbStreamingShrinkImageFilter.h"
 
 
-int main(int argc, char * argv[])
+int main(int itkNotUsed(argc), char * argv[])
 {
   const char *       infname                = argv[1];
   const unsigned int spatialRadius          = atoi(argv[2]);
diff --git a/Testing/Fa/00134-feature_extraction.cxx b/Testing/Fa/00134-feature_extraction.cxx
index 5b2fd4f..23fe1a0 100644
--- a/Testing/Fa/00134-feature_extraction.cxx
+++ b/Testing/Fa/00134-feature_extraction.cxx
@@ -31,7 +31,7 @@
 #include "otbMultiChannelRAndNIRIndexImageFilter.h"
 #include "otbVegetationIndicesFunctor.h"
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
   const char *       inputName   = argv[1];
   const char *       outputName  = argv[2];
diff --git a/Testing/Fa/CMakeLists.txt b/Testing/Fa/CMakeLists.txt
index feedba3..6664faf 100644
--- a/Testing/Fa/CMakeLists.txt
+++ b/Testing/Fa/CMakeLists.txt
@@ -23,8 +23,10 @@ target_link_libraries(00134-feature_extraction OTBIO OTBCommon OTBBasicFilters O
 add_executable(0000094-PolygonsVectorization 0000094-PolygonsVectorization.cxx)
 target_link_libraries(0000094-PolygonsVectorization OTBIO OTBCommon)
 
+if(ITK_USE_FFTWD OR ITK_USE_FFTWF)
 add_executable(0000169-fftcomplextocomplex  0000169-fftcomplextocomplex.cxx)
 target_link_libraries(0000169-fftcomplextocomplex OTBIO OTBCommon)
+endif(ITK_USE_FFTWD OR ITK_USE_FFTWF)
 
 add_executable(000295-MeanShiftVectorImageFilterWithStreamingShrink 000295-MeanShiftVectorImageFilterWithStreamingShrink.cxx)
 target_link_libraries(000295-MeanShiftVectorImageFilterWithStreamingShrink OTBIO OTBCommon)
diff --git a/Testing/Fa/StreamingStat.cxx b/Testing/Fa/StreamingStat.cxx
index 68c8a5b..1ba59c4 100644
--- a/Testing/Fa/StreamingStat.cxx
+++ b/Testing/Fa/StreamingStat.cxx
@@ -4,10 +4,8 @@
 #include "otbStreamingStatisticsImageFilter.h"
 #include "otbVectorImageTo3DScalarImageFilter.h"
 
-int main(int argc, char ** argv)
+int main(int itkNotUsed(argc), char ** argv)
 {
-
-  typedef otb::Image<double, 2>                 ImageType;
   typedef otb::Image<double, 3>                 Image3DType;
   typedef otb::VectorImage<double, 2>           VectorImageType;
   typedef otb::ImageFileReader<VectorImageType> ReaderType;
diff --git a/Testing/Fa/WriteUnsignedLong.cxx b/Testing/Fa/WriteUnsignedLong.cxx
index b19e5c0..9bb626f 100644
--- a/Testing/Fa/WriteUnsignedLong.cxx
+++ b/Testing/Fa/WriteUnsignedLong.cxx
@@ -23,7 +23,7 @@
 //TODO change the bug tracker url
 //http://bugs.orfeo-toolbox.org/view.php?id=406
 
-int main(int argc, char *argv[])
+int main(int itkNotUsed(argc), char *argv[])
 {
   char * filename = argv[1];
 
diff --git a/Testing/Fa/otbVectorDataToLabelImageFilterWithoutReader.cxx b/Testing/Fa/otbVectorDataToLabelImageFilterWithoutReader.cxx
index cce6b72..3293dcd 100644
--- a/Testing/Fa/otbVectorDataToLabelImageFilterWithoutReader.cxx
+++ b/Testing/Fa/otbVectorDataToLabelImageFilterWithoutReader.cxx
@@ -40,7 +40,7 @@ typedef DataNodeType::LineType                    LineType;
 typedef DataNodeType::PolygonType                 PolygonType;
 typedef LineType::VertexType                      VertexType;
 
-int main(int argc, char* argv[])
+int main(int itkNotUsed(argc), char* argv[])
 {
 
   //OGRRegisterAll();
@@ -144,14 +144,10 @@ int main(int argc, char* argv[])
   spacing[0]=1;
   spacing[1]=1;
 
-
   rasterization->SetOutputSize(size);
   rasterization->SetOutputOrigin(origin);
   rasterization->SetOutputSpacing(spacing);
 
-  otb::StandardOneLineFilterWatcher * watch = new otb::StandardOneLineFilterWatcher(rasterization.GetPointer(),
-                                                                          "rasterization");
-
   WriterType::Pointer writer  = WriterType::New();
   writer->SetFileName(argv[1]);
   writer->SetInput(rasterization->GetOutput());
diff --git a/Testing/Utilities/6SFunctionMainTest.cxx b/Testing/Utilities/6SFunctionMainTest.cxx
index b2631b9..540ad2f 100644
--- a/Testing/Utilities/6SFunctionMainTest.cxx
+++ b/Testing/Utilities/6SFunctionMainTest.cxx
@@ -172,18 +172,3 @@ int SIXSFunctionMainOtbTest( int argc, char *argv[] )
 
   return EXIT_SUCCESS;
 };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Testing/Utilities/kmlcreatekml.cc b/Testing/Utilities/kmlcreatekml.cc
index 0a52697..3add453 100644
--- a/Testing/Utilities/kmlcreatekml.cc
+++ b/Testing/Utilities/kmlcreatekml.cc
@@ -41,7 +41,8 @@ using kmldom::PointPtr;
 int kmlcreatekml(int argc, char* argv[]) {
   // Get the factory singleton to create KML elements.
   KmlFactory* factory = KmlFactory::GetFactory();
-
+  if(argc > 0) //silence warning!
+    std::cerr << "Running " << argv[0] << std::endl;
   // Create <coordinates>.
   CoordinatesPtr coordinates = factory->CreateCoordinates();
   // Create <coordinates>-122.0816695,37.42052549<coordinates>
diff --git a/Testing/Utilities/kmlhelloattrs.cc b/Testing/Utilities/kmlhelloattrs.cc
index fbca3ca..d680449 100644
--- a/Testing/Utilities/kmlhelloattrs.cc
+++ b/Testing/Utilities/kmlhelloattrs.cc
@@ -1,9 +1,9 @@
 // Copyright 2008, Google Inc. All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without 
+// Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
 //
-//  1. Redistributions of source code must retain the above copyright notice, 
+//  1. Redistributions of source code must retain the above copyright notice,
 //     this list of conditions and the following disclaimer.
 //  2. Redistributions in binary form must reproduce the above copyright notice,
 //     this list of conditions and the following disclaimer in the documentation
@@ -13,14 +13,14 @@
 //     specific prior written permission.
 //
 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Sample of parse and DOM access of attributes.
@@ -84,6 +84,8 @@ void CheckId() {
 }
 
 int kmlhelloattrs(int argc, char* argv[]) {
+  if(argc > 0) //silence warning!
+    std::cerr << "Running " << argv[0] << std::endl;
   CheckId();
   CheckHotSpot();
   return 0;  // All is well if we got this far.
diff --git a/Testing/Utilities/kmlhelloenum.cc b/Testing/Utilities/kmlhelloenum.cc
index 7e1fb50..4dfab6f 100644
--- a/Testing/Utilities/kmlhelloenum.cc
+++ b/Testing/Utilities/kmlhelloenum.cc
@@ -1,9 +1,9 @@
 // Copyright 2008, Google Inc. All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without 
+// Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
 //
-//  1. Redistributions of source code must retain the above copyright notice, 
+//  1. Redistributions of source code must retain the above copyright notice,
 //     this list of conditions and the following disclaimer.
 //  2. Redistributions in binary form must reproduce the above copyright notice,
 //     this list of conditions and the following disclaimer in the documentation
@@ -13,14 +13,14 @@
 //     specific prior written permission.
 //
 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
@@ -140,6 +140,8 @@ void CheckLinkFactory() {
 }
 
 int kmlhelloenum(int argc, char* argv[]) {
+  if(argc > 0) //silence warning!
+    std::cerr << "Running " << argv[0] << std::endl;
   CheckParseLookAt();
   CheckParseLink();
   CheckSerializeLookAt();
diff --git a/Testing/Utilities/kmlhellofolder.cc b/Testing/Utilities/kmlhellofolder.cc
index 8d36cd7..a9357a6 100644
--- a/Testing/Utilities/kmlhellofolder.cc
+++ b/Testing/Utilities/kmlhellofolder.cc
@@ -1,9 +1,9 @@
 // Copyright 2008, Google Inc. All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without 
+// Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
 //
-//  1. Redistributions of source code must retain the above copyright notice, 
+//  1. Redistributions of source code must retain the above copyright notice,
 //     this list of conditions and the following disclaimer.
 //  2. Redistributions in binary form must reproduce the above copyright notice,
 //     this list of conditions and the following disclaimer in the documentation
@@ -13,14 +13,14 @@
 //     specific prior written permission.
 //
 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <assert.h>
@@ -60,6 +60,9 @@ static const unsigned int kHowManyPoints = 1001;
 int kmlhellofolder(int argc, char* argv[]) {
   KmlFactory* factory(KmlFactory::GetFactory());
 
+  if(argc > 0) //silence warning!
+    std::cerr << "Running " << argv[0] << std::endl;
+
   // Create a Folder, fill it with Placemarks.
   cout << "Creating " << kHowManyPoints << " Placemarks:" << endl;
   FolderPtr folder = factory->CreateFolder();
diff --git a/Testing/Utilities/kmlhelloregion.cc b/Testing/Utilities/kmlhelloregion.cc
index 8f24e42..8046098 100644
--- a/Testing/Utilities/kmlhelloregion.cc
+++ b/Testing/Utilities/kmlhelloregion.cc
@@ -1,9 +1,9 @@
 // Copyright 2008, Google Inc. All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without 
+// Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
 //
-//  1. Redistributions of source code must retain the above copyright notice, 
+//  1. Redistributions of source code must retain the above copyright notice,
 //     this list of conditions and the following disclaimer.
 //  2. Redistributions in binary form must reproduce the above copyright notice,
 //     this list of conditions and the following disclaimer in the documentation
@@ -13,14 +13,14 @@
 //     specific prior written permission.
 //
 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // This program generates GroundOverlays with Regions.  The two overlays have
@@ -125,6 +125,8 @@ void SwapOverlays() {
 
 
 int kmlhelloregion(int argc, char* argv[]) {
+  if(argc > 0) //silence warning!
+    std::cerr << "Running " << argv[0] << std::endl;
   SwapOverlays();
   return EXIT_SUCCESS;
 }
diff --git a/Testing/Utilities/kmlparsekml.cc b/Testing/Utilities/kmlparsekml.cc
index b9504c1..299ca99 100644
--- a/Testing/Utilities/kmlparsekml.cc
+++ b/Testing/Utilities/kmlparsekml.cc
@@ -32,6 +32,9 @@
 #include "kml/dom.h"  // The KML DOM header.
 
 int kmlparsekml(int argc, char* argv[]) {
+
+  if(argc > 0) //silence warning!
+    std::cerr << "Running " << argv[0] << std::endl;
   // Parse KML from a memory buffer.
   std::string errors;
   kmldom::ElementPtr element = kmldom::Parse(
diff --git a/Testing/Utilities/kmlprintgeometry.cc b/Testing/Utilities/kmlprintgeometry.cc
index 7ec8892..c3798df 100644
--- a/Testing/Utilities/kmlprintgeometry.cc
+++ b/Testing/Utilities/kmlprintgeometry.cc
@@ -1,9 +1,9 @@
 // Copyright 2008, Google Inc. All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without 
+// Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
 //
-//  1. Redistributions of source code must retain the above copyright notice, 
+//  1. Redistributions of source code must retain the above copyright notice,
 //     this list of conditions and the following disclaimer.
 //  2. Redistributions in binary form must reproduce the above copyright notice,
 //     this list of conditions and the following disclaimer in the documentation
@@ -13,14 +13,14 @@
 //     specific prior written permission.
 //
 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Walks a Feature hierarchy, looking for Placemarks with Geometry, printing
@@ -109,6 +109,8 @@ static const FeaturePtr GetRootFeature(const ElementPtr& root) {
 }
 
 int kmlprintgeometry(int argc, char* argv[]) {
+  if(argc > 0) //silence warning!
+    std::cerr << "Running " << argv[0] << std::endl;
   std::string kml;
   kmlbase::File::ReadFileToString(argv[1], &kml);
   std::string errors;
@@ -120,4 +122,3 @@ int kmlprintgeometry(int argc, char* argv[]) {
   }
   return 0;
 }
-
diff --git a/Testing/Utilities/kmlsharedstyles.cc b/Testing/Utilities/kmlsharedstyles.cc
index d03ab48..5a2b2bc 100644
--- a/Testing/Utilities/kmlsharedstyles.cc
+++ b/Testing/Utilities/kmlsharedstyles.cc
@@ -1,9 +1,9 @@
 // Copyright 2008, Google Inc. All rights reserved.
 //
-// Redistribution and use in source and binary forms, with or without 
+// Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
 //
-//  1. Redistributions of source code must retain the above copyright notice, 
+//  1. Redistributions of source code must retain the above copyright notice,
 //     this list of conditions and the following disclaimer.
 //  2. Redistributions in binary form must reproduce the above copyright notice,
 //     this list of conditions and the following disclaimer in the documentation
@@ -13,14 +13,14 @@
 //     specific prior written permission.
 //
 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // This sample program creates shared style selectors.
@@ -39,6 +39,10 @@ using kmldom::StylePtr;
 using kmldom::StyleMapPtr;
 
 int kmlsharedstyles(int argc, char* argv[]) {
+
+  if(argc > 0)
+    std::cerr << "Running " << argv[0] << std::endl;
+
   KmlFactory* kml_factory = KmlFactory::GetFactory();
 
   DocumentPtr document = kml_factory->CreateDocument();
diff --git a/Testing/Utilities/ossimElevManagerTest.cxx b/Testing/Utilities/ossimElevManagerTest.cxx
index 81252c8..f95eef1 100644
--- a/Testing/Utilities/ossimElevManagerTest.cxx
+++ b/Testing/Utilities/ossimElevManagerTest.cxx
@@ -14,13 +14,14 @@
 #include <fstream>
 #include <cstdlib>
 
+#include "itkMacro.h"
 #include "ossim/elevation/ossimElevManager.h"
 
 // this is the most important class and is called as the first line of all applications.
 // without this alll the important factories are not created.
 #include "ossim/init/ossimInit.h"
 
-int ossimElevManagerTest(int argc, char* argv[])
+int ossimElevManagerTest(int itkNotUsed(argc), char* itkNotUsed(argv)[])
 {
    ossimElevManager * ElevManager(NULL);
    ElevManager=ossimElevManager::instance();
@@ -35,6 +36,3 @@ int ossimElevManagerTest(int argc, char* argv[])
    }
 
 }
-
-
-
diff --git a/Testing/Utilities/ossimXmlDocumentTest.cxx b/Testing/Utilities/ossimXmlDocumentTest.cxx
index 205228c..98cc788 100644
--- a/Testing/Utilities/ossimXmlDocumentTest.cxx
+++ b/Testing/Utilities/ossimXmlDocumentTest.cxx
@@ -15,12 +15,12 @@
 #include <cstdlib>
 
 #include "ossim/base/ossimXmlDocument.h"
-
+#include "itkMacro.h"
 // this is the most important class and is called as the first line of all applications.
 // without this alll the important factories are not created.
 #include "ossim/init/ossimInit.h"
 
-int ossimXmlDocumentTest(int argc, char* argv[])
+int ossimXmlDocumentTest(int itkNotUsed(argc), char* argv[])
 {
    ossimXmlDocument* xdoc = new ossimXmlDocument();
    bool result = xdoc->openFile(argv[1]);
@@ -36,6 +36,3 @@ int ossimXmlDocumentTest(int argc, char* argv[])
    }
 
 }
-
-
-
diff --git a/Testing/Utilities/ossimpluginsHermiteInterpolation.cxx b/Testing/Utilities/ossimpluginsHermiteInterpolation.cxx
index c81fa35..e74f6d7 100644
--- a/Testing/Utilities/ossimpluginsHermiteInterpolation.cxx
+++ b/Testing/Utilities/ossimpluginsHermiteInterpolation.cxx
@@ -25,8 +25,7 @@
 #include "ossim/otb/HermiteInterpolator.h"
 #include "itkTimeProbe.h"
 
-
-int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
+int ossimpluginsHermiteInterpolationTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
 {
   double epsilon = 0.0000001;
 
diff --git a/Testing/Utilities/otbSVMComposedKernelFunctorTest.cxx b/Testing/Utilities/otbSVMComposedKernelFunctorTest.cxx
index b67badb..e227f16 100644
--- a/Testing/Utilities/otbSVMComposedKernelFunctorTest.cxx
+++ b/Testing/Utilities/otbSVMComposedKernelFunctorTest.cxx
@@ -29,7 +29,7 @@
 #define Malloc(type,n) new type[n]
 #endif
 
-int otbSVMComposedKernelFunctorTest( int argc, char* argv[] )
+int otbSVMComposedKernelFunctorTest( int itkNotUsed(argc), char* argv[] )
 {
   typedef unsigned char                                   InputPixelType;
   typedef unsigned char                                   LabelPixelType;
@@ -161,7 +161,3 @@ int otbSVMComposedKernelFunctorTest( int argc, char* argv[] )
 
   return EXIT_SUCCESS;
 }
-
-
-
-
diff --git a/Testing/Utilities/svmGenericKernelBasicOperationsTest.cxx b/Testing/Utilities/svmGenericKernelBasicOperationsTest.cxx
index cc8d0ad..be28812 100644
--- a/Testing/Utilities/svmGenericKernelBasicOperationsTest.cxx
+++ b/Testing/Utilities/svmGenericKernelBasicOperationsTest.cxx
@@ -6,8 +6,7 @@
 #include "svm.h"
 #include "otbSVMKernels.h"
 
-
-int svmGenericKernelBasicOperationsTest( int argc, char *argv[] )
+int svmGenericKernelBasicOperationsTest( int itkNotUsed(argc), char *argv[] )
 {
   const char * outputFileName = argv[1];
 
@@ -84,5 +83,3 @@ int svmGenericKernelBasicOperationsTest( int argc, char *argv[] )
 
   return EXIT_SUCCESS;
 }
-
-
diff --git a/Testing/Utilities/svmGenericKernelFunctor.cxx b/Testing/Utilities/svmGenericKernelFunctor.cxx
index 952468d..074c53f 100644
--- a/Testing/Utilities/svmGenericKernelFunctor.cxx
+++ b/Testing/Utilities/svmGenericKernelFunctor.cxx
@@ -52,7 +52,7 @@ protected:
  * image.  We write the output to an image for
  * comparison.
  */
-int svmGenericKernelFunctor( int argc, char *argv[] )
+int svmGenericKernelFunctor( int itkNotUsed(argc), char *itkNotUsed(argv)[] )
 {
 
   try
@@ -92,18 +92,3 @@ int svmGenericKernelFunctor( int argc, char *argv[] )
 
   return EXIT_SUCCESS;
 };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Testing/Utilities/svmGenericKernelTest.cxx b/Testing/Utilities/svmGenericKernelTest.cxx
index f032f36..a51a41c 100644
--- a/Testing/Utilities/svmGenericKernelTest.cxx
+++ b/Testing/Utilities/svmGenericKernelTest.cxx
@@ -52,12 +52,10 @@ protected:
  * image.  We write the output to an image for
  * comparison.
  */
-int svmGenericKernelTest( int argc, char *argv[] )
+int svmGenericKernelTest( int itkNotUsed(argc), char *argv[] )
 {
-
   try
     {
-
         const char * inputFilename  = argv[1];
         const char * outputFilename = argv[2];
         otb::LinearKernelFunctor lFunctor;
@@ -93,18 +91,3 @@ int svmGenericKernelTest( int argc, char *argv[] )
 
   return EXIT_SUCCESS;
 };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Testing/Utilities/svmTest.cxx b/Testing/Utilities/svmTest.cxx
index 3bb2074..ec18ad8 100644
--- a/Testing/Utilities/svmTest.cxx
+++ b/Testing/Utilities/svmTest.cxx
@@ -52,7 +52,7 @@ protected:
  * image.  We write the output to an image for
  * comparison.
  */
-int svmTest( int argc, char *argv[] )
+int svmTest( int itkNotUsed(argc), char *argv[] )
 {
 
   try
@@ -91,18 +91,3 @@ int svmTest( int argc, char *argv[] )
 
   return EXIT_SUCCESS;
 };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Testing/Utilities/tinyXMLlibTest.cxx b/Testing/Utilities/tinyXMLlibTest.cxx
index 55125fb..ab542e7 100644
--- a/Testing/Utilities/tinyXMLlibTest.cxx
+++ b/Testing/Utilities/tinyXMLlibTest.cxx
@@ -73,7 +73,7 @@ bool XmlTest( FILE* ptrfile, const char* testString, int expected, int found, bo
 // and show how to add and remove nodes.
 //
 
-int tinyXMLlibTest(int argc, char *argv[] )
+int tinyXMLlibTest(int itkNotUsed(argc), char *argv[] )
 {
         const char * inputUtf8TestFilename = argv[1];
         const char * inputUtf8TestVerifyFilename = argv[2];
@@ -910,8 +910,8 @@ int tinyXMLlibTest(int argc, char *argv[] )
 	// Long filenames crashing STL version
 	{
 		TiXmlDocument doc( "midsummerNightsDreamWithAVeryLongFilenameToConfuseTheStringHandlingRoutines.xml" );
-		bool loadOkay = doc.LoadFile();
-		loadOkay = true;	// get rid of compiler warning.
+//		bool loadOkay = doc.LoadFile();
+//		loadOkay = true;	// get rid of compiler warning.
 		// Won't pass on non-dev systems. Just a "no crash" check.
 		//XmlTest(file, "Long filename. ", true, loadOkay );
 	}
@@ -1316,5 +1316,3 @@ int tinyXMLlibTest(int argc, char *argv[] )
         if( gFail == 0 ) return EXIT_SUCCESS;
         else return EXIT_FAILURE;
 }
-
-
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
index dc5854f..0801c6d 100644
--- a/Utilities/CMakeLists.txt
+++ b/Utilities/CMakeLists.txt
@@ -101,10 +101,15 @@ if(NOT OTB_USE_EXTERNAL_ITK)
 
   # By default activate FFTW, but with an external fftw build
   # These variables are used in ITK to initialize the value of the ITK_USE_FFTW_XXX options
-  set(USE_FFTWF ON)
-  set(USE_FFTWD ON)
-  set(USE_SYSTEM_FFTW ON)
-
+  if (WIN32)
+    set(USE_FFTWF OFF)
+    set(USE_FFTWD OFF)
+    set(USE_SYSTEM_FFTW OFF)
+  else()
+    set(USE_FFTWF ON)
+    set(USE_FFTWD ON)
+    set(USE_SYSTEM_FFTW ON)  
+  endif()
   set(ITK_INSTALL_RUNTIME_DIR ${OTB_INSTALL_BIN_DIR})
   set(ITK_INSTALL_LIBRARY_DIR ${OTB_INSTALL_LIB_DIR})
   set(ITK_INSTALL_ARCHIVE_DIR ${OTB_INSTALL_LIB_DIR})
@@ -115,7 +120,7 @@ if(NOT OTB_USE_EXTERNAL_ITK)
   # set(ITK_INSTALL_PACKAGE_DIR "lib/cmake/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}")
 
   add_subdirectory(ITK)
-
+  
   # Load the ITKConfig generated at configuration time
   # Be sure to avoid loading an external ITK
   find_package(ITK
@@ -213,7 +218,7 @@ endif()
 message(STATUS "Configuring otbconfigfile...")
 add_subdirectory(otbconfigfile)
 
-if(WIN32)
+if(MSVC)
 message(STATUS "Configuring otbmsinttypes...")
 add_subdirectory(otbmsinttypes)
 endif()
diff --git a/Utilities/ITK/CMake/CTestCustom.cmake.in b/Utilities/ITK/CMake/CTestCustom.cmake.in
index 3b6e5af..fb439d3 100644
--- a/Utilities/ITK/CMake/CTestCustom.cmake.in
+++ b/Utilities/ITK/CMake/CTestCustom.cmake.in
@@ -90,8 +90,10 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
   ".*include.opencv2.*warning.*"
   ".*core.vidl.*warning.*"
   ".*core.vnl.vnl_matrix_fixed.h.*warning.*"
-  # DCMTK
+  # ExternalProject: Git writes status to stderr
+  "Cloning into.*"
   "Note: checking out.*"
+  "HEAD is now at.*"
   # FFTW ExternalProject
   ".*fftw[fd]/src/fftw[fd]./*"
   "libtool: install: warning: relinking .libfftw3f?_threads.la."
diff --git a/Utilities/ITK/CMake/FindKWStyle.cmake b/Utilities/ITK/CMake/FindKWStyle.cmake
index 9a4bc46..6f912cb 100644
--- a/Utilities/ITK/CMake/FindKWStyle.cmake
+++ b/Utilities/ITK/CMake/FindKWStyle.cmake
@@ -31,12 +31,19 @@ if(KWSTYLE_EXECUTABLE)
     ERROR_QUIET
     OUTPUT_STRIP_TRAILING_WHITESPACE
     )
-  string(REPLACE
-    "Version: "
-    ""
-    KWSTYLE_VERSION_STRING
-    ${KWSTYLE_VERSION_STRING}
-    )
+  if(KWSTYLE_VERSION_STRING)
+    # string(REPLACE ..) fails if the input is an empty string
+    string(REPLACE
+      "Version: "
+      ""
+      KWSTYLE_VERSION_STRING
+      ${KWSTYLE_VERSION_STRING}
+      )
+  else(KWSTYLE_VERSION_STRING)
+    # CMake's find_package_handle_standard_args has a bug where the
+    # version empty string ("") is always acceptable
+    set(KWSTYLE_VERSION_STRING "?")
+  endif(KWSTYLE_VERSION_STRING)
 endif(KWSTYLE_EXECUTABLE)
 
 include(FindPackageHandleStandardArgs)
diff --git a/Utilities/ITK/CMake/ITKExternalData.cmake b/Utilities/ITK/CMake/ITKExternalData.cmake
index 40d33ca..10efbca 100644
--- a/Utilities/ITK/CMake/ITKExternalData.cmake
+++ b/Utilities/ITK/CMake/ITKExternalData.cmake
@@ -27,16 +27,18 @@ set(ExternalData_URL_TEMPLATES "" CACHE STRING
   "Additional URL templates for the ExternalData CMake script to look for testing data. E.g.
 file:///var/bigharddrive/%(algo)/%(hash)")
 mark_as_advanced(ExternalData_URL_TEMPLATES)
-list(APPEND ExternalData_URL_TEMPLATES
-  # Data published by MIDAS
-  "http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
+if(NOT ITK_FORBID_DOWNLOADS)
+  list(APPEND ExternalData_URL_TEMPLATES
+    # Data published by MIDAS
+    "http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
 
-  # Data published by developers using git-gerrit-push.
-  "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"
+    # Data published by developers using git-gerrit-push.
+    "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"
 
-  # Mirror supported by the Slicer community.
-  "http://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
-  )
+    # Mirror supported by the Slicer community.
+    "http://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
+    )
+endif()
 
 # Tell ExternalData commands to transform raw files to content links.
 # TODO: Condition this feature on presence of our pre-commit hook.
diff --git a/Utilities/ITK/CMake/ITKGroups.cmake b/Utilities/ITK/CMake/ITKGroups.cmake
index 7b3d906..6e39124 100644
--- a/Utilities/ITK/CMake/ITKGroups.cmake
+++ b/Utilities/ITK/CMake/ITKGroups.cmake
@@ -1,5 +1,18 @@
 # Set a list of group names
-set(group_list Core IO Filtering Registration Segmentation Numerics Video ThirdParty Bridge Nonunit Compatibility)
+set(group_list
+  Core
+  IO
+  Filtering
+  Registration
+  Segmentation
+  Numerics
+  Video
+  ThirdParty
+  Bridge
+  Nonunit
+  Compatibility
+  Remote
+  )
 
 set(Core_documentation "This group of modules contain the toolkit framework used
 by other modules.  There are common base classes for data objects and process
@@ -44,22 +57,33 @@ used by other ITK modules.")
 set(Nonunit_documentation "This group of modules are intended to make use of an
 extensive set of the toolkit modules.")
 
-# Set a module name list for each group
+set(Remote_documentation "This group of modules is for ITK based code that have
+additional third-party dependencies not bundled with the toolkit,
+new algorithms or implementations seeking greater exposure and adoption,
+algorithms that hope to eventually be integrated into the toolkit,
+niche algorithms with limited application, and Modules in progress that do not
+yet have the test coverage and cross-platform standards required by the main toolkit.
+The modules are OFF by default in ITK's CMake configuration.
+Note that these modules do get the same level of support and backwards
+compatibility as other modules in the toolkit.")
+
+#------------------------------------------------
+# Find the modules in each group and the module name line in itk-module.cmake
 foreach( group ${group_list} )
-  set( ${group}_module_list )
-  file( GLOB_RECURSE _module_files ${ITK_SOURCE_DIR}/Modules/${group}/itk-module.cmake )
-  foreach( _module_f ${_module_files} )
-    get_filename_component (module_file_dir ${_module_f} PATH)
-    if (NOT EXISTS "${module_file_dir}/itk-module-init.cmake")
-      file( STRINGS ${_module_f} _module_line REGEX "itk_module[ \n]*\\([ \n]*ITK[A-Za-z0-9]*" )
-      string( REGEX MATCH "ITK[A-Za-z0-9]*" _module_name ${_module_line} )
-      list( APPEND ${group}_module_list ${_module_name} )
-    endif()
+  set( _${group}_module_list )
+  file( GLOB_RECURSE _${group}_module_files ${ITK_SOURCE_DIR}/Modules/${group}/itk-module.cmake )
+  foreach( _module_file ${_${group}_module_files} )
+    file( STRINGS ${_module_file} _module_line REGEX "itk_module[ \n]*\\([ \n]*[A-Za-z0-9]*" )
+    string( REGEX MATCH "(\\([ \n]*)([A-Za-z0-9]*)" _module_name ${_module_line} )
+    set( _module_name ${CMAKE_MATCH_2} )
+    set( _${_module_name}_module_line ${_module_line} )
+    list( APPEND _${group}_module_list ${_module_name} )
   endforeach()
 endforeach()
 
 #------------------------------------------------
-#------------------------------------------------
+# Set up Doxygen Group descriptions
+
 set( group_list_dox )
 foreach(group ${group_list} )
   set( group_list_dox
@@ -70,7 +94,7 @@ foreach(group ${group_list} )
 ${${group}_documentation} */\n"
     )
 
-  foreach(mod ${${group}_module_list} )
+  foreach(mod ${_${group}_module_list} )
     set( group_list_dox
 "${group_list_dox}
 /** \\defgroup ${mod} Module ${mod}
@@ -87,6 +111,22 @@ configure_file(
 
 #------------------------------------------------
 # Turn on the ITK_BUILD option for each group
+
+# Set a module name list for each group and exclude
+# Modules that should be OFF
+foreach( group ${group_list} )
+  set( _${group}_on_module_list )
+  list( LENGTH _${group}_module_list _num_modules )
+  set( _current_module 0 )
+  while( ${_current_module} LESS ${_num_modules} )
+    list( GET _${group}_module_list ${_current_module} _module_name )
+    if( NOT ITK_MODULE_${_module_name}_EXCLUDE_FROM_DEFAULT )
+      list( APPEND _${group}_on_module_list ${_module_name} )
+    endif()
+  math( EXPR _current_module "${_current_module} + 1" )
+  endwhile()
+endforeach()
+
 if("$ENV{DASHBOARD_TEST_FROM_CTEST}" STREQUAL "")
   # developer build
   option(ITKGroup_Core "Request building core modules" ON)
@@ -94,7 +134,7 @@ endif()
 foreach( group ${group_list})
     option(ITKGroup_${group} "Request building ${group} modules" OFF)
     if (ITKGroup_${group})
-      foreach (itk-module ${${group}_module_list} )
+      foreach (itk-module ${_${group}_on_module_list} )
          list(APPEND ITK_MODULE_${itk-module}_REQUEST_BY ITKGroup_${group})
       endforeach()
     endif()
diff --git a/Utilities/ITK/CMake/ITKModuleDoxygen.cmake b/Utilities/ITK/CMake/ITKModuleDoxygen.cmake
index 8399a8a..e429002 100644
--- a/Utilities/ITK/CMake/ITKModuleDoxygen.cmake
+++ b/Utilities/ITK/CMake/ITKModuleDoxygen.cmake
@@ -12,7 +12,7 @@ macro( itk_module_doxygen _name )
 
   # _content defines the content of the ${_name}.dox file
   set( _content "/**\n" )
-  set( _content "${_content} \\defgroup ${_name} ${_name} \n" )
+  set( _content "${_content} \\defgroup ${_name} Module ${_name} \n" )
   set( _content "${_content} ${ITK_MODULE_${_name}_DESCRIPTION} \n" )
 
   set( _content "${_content} \\par Dependencies:\n" )
diff --git a/Utilities/ITK/CMake/ITKModuleEnablement.cmake b/Utilities/ITK/CMake/ITKModuleEnablement.cmake
index 0ad6156..a615392 100644
--- a/Utilities/ITK/CMake/ITKModuleEnablement.cmake
+++ b/Utilities/ITK/CMake/ITKModuleEnablement.cmake
@@ -76,6 +76,12 @@ endforeach()
 # options or ITKGroup_* options.
 option(ITK_BUILD_DEFAULT_MODULES "Build the default ITK modules." ON)
 
+#----------------------------------------------------------------------
+# Provide an option to build the tests of dependencies of a module when
+# BUILD_TESTING is ON.
+option(ITK_BUILD_ALL_MODULES_FOR_TESTS "Build the tests of module dependencies." OFF)
+mark_as_advanced(ITK_BUILD_ALL_MODULES_FOR_TESTS)
+
 # To maintain backward compatibility
 if(DEFINED ITK_BUILD_ALL_MODULES)
   message(WARNING "ITK_BUILD_ALL_MODULES is deprecated, please remove this entry from the CMake "
@@ -112,7 +118,7 @@ macro(itk_module_enable itk-module _needed_by)
     foreach(dep IN LISTS ITK_MODULE_${itk-module}_DEPENDS)
       itk_module_enable(${dep} ${itk-module})
     endforeach()
-    if(${itk-module}_TESTED_BY)
+    if(${itk-module}_TESTED_BY AND (ITK_BUILD_DEFAULT_MODULES OR ITK_BUILD_ALL_MODULES_FOR_TESTS OR Module_${itk-module}))
       itk_module_enable(${${itk-module}_TESTED_BY} "")
     endif()
   endif()
diff --git a/Utilities/ITK/CMake/ITKModuleHeaderTest.cmake b/Utilities/ITK/CMake/ITKModuleHeaderTest.cmake
index 292289c..90c0d1c 100644
--- a/Utilities/ITK/CMake/ITKModuleHeaderTest.cmake
+++ b/Utilities/ITK/CMake/ITKModuleHeaderTest.cmake
@@ -23,6 +23,7 @@ macro( itk_module_headertest _name )
   if( NOT ${_name}_THIRD_PARTY AND
       EXISTS ${${_name}_SOURCE_DIR}/include
       AND PYTHON_EXECUTABLE
+      AND NOT (PYTHON_VERSION_STRING VERSION_LESS 2.6)
       AND NOT (${_name} STREQUAL ITKTestKernel)
       AND NOT (CMAKE_GENERATOR MATCHES "^Visual Studio 10.*"))
 
diff --git a/Utilities/ITK/CMake/ITKModuleMacros.cmake b/Utilities/ITK/CMake/ITKModuleMacros.cmake
index 510a7ec..c32a29e 100644
--- a/Utilities/ITK/CMake/ITKModuleMacros.cmake
+++ b/Utilities/ITK/CMake/ITKModuleMacros.cmake
@@ -6,6 +6,11 @@ include(${_ITKModuleMacros_DIR}/ITKModuleAPI.cmake)
 include(${_ITKModuleMacros_DIR}/ITKModuleDoxygen.cmake)
 include(${_ITKModuleMacros_DIR}/ITKModuleHeaderTest.cmake)
 
+# With Apple's GGC <=4.2 and LLVM-GCC <=4.2 visibility of template
+# don't work. Set the option to off and hide it.
+if(APPLE AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION  VERSION_LESS "4.3")
+  set( USE_COMPILER_HIDDEN_VISIBILITY OFF CACHE INTERNAL "" )
+endif()
 include(GenerateExportHeader)
 
 if(ITK_CPPCHECK_TEST)
diff --git a/Utilities/ITK/CMake/ITKModuleRemote.cmake b/Utilities/ITK/CMake/ITKModuleRemote.cmake
index 5241728..34b8a8e 100644
--- a/Utilities/ITK/CMake/ITKModuleRemote.cmake
+++ b/Utilities/ITK/CMake/ITKModuleRemote.cmake
@@ -67,7 +67,7 @@ function(_git_update git_executable git_repository git_tag module_dir)
   # Is the hash checkout out that we want?
   if(NOT ("${tag_hash}" STREQUAL "${head_hash}"))
     execute_process(
-      COMMAND "${git_executable}" fetch
+      COMMAND "${git_executable}" fetch "${git_repository}"
       WORKING_DIRECTORY "${module_dir}"
       RESULT_VARIABLE error_code
       )
@@ -133,6 +133,7 @@ function(itk_fetch_module _name _description)
   endif()
 
   if(Module_${_name})
+    itk_download_attempt_check(Module_${_name})
     include(CMakeParseArguments)
     cmake_parse_arguments(_fetch_options "" "GIT_REPOSITORY;GIT_TAG" "" ${ARGN})
     find_package(Git)
diff --git a/Utilities/ITK/CMake/ITKSetStandardCompilerFlags.cmake b/Utilities/ITK/CMake/ITKSetStandardCompilerFlags.cmake
index f7c410f..d449517 100644
--- a/Utilities/ITK/CMake/ITKSetStandardCompilerFlags.cmake
+++ b/Utilities/ITK/CMake/ITKSetStandardCompilerFlags.cmake
@@ -110,7 +110,6 @@ function(check_compiler_warning_flags c_warning_flags_var cxx_warning_flags_var)
     -Wwrite-strings
     -funit-at-a-time
     -Wno-strict-overflow
-    -Wno-unused-local-typedefs
   )
 
   # Check this list on C++ compiler only
@@ -190,8 +189,10 @@ macro(check_compiler_platform_flags)
   #-----------------------------------------------------------------------------
   #ITK requires special compiler flags on some platforms.
   if(CMAKE_COMPILER_IS_GNUCXX)
-    # GCC's -Warray-bounds has been shown to throw false positives with -O3 on 4.7 and 4.8.
-    if(UNIX AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.6" AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9")
+    # GCC's -Warray-bounds has been shown to throw false positives with -O3 on 4.8.
+    if(UNIX AND (
+      ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_EQUAL "4.8") OR
+      ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.8" AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9") ))
       set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} -Wno-array-bounds")
     endif()
 
diff --git a/Utilities/ITK/CMake/UseITK.cmake b/Utilities/ITK/CMake/UseITK.cmake
index 063dd9a..a674ea7 100644
--- a/Utilities/ITK/CMake/UseITK.cmake
+++ b/Utilities/ITK/CMake/UseITK.cmake
@@ -33,9 +33,9 @@ endmacro()
 
 # a list of image IOs to be registered when the corresponding modules are enabled
 set(LIST_OF_IMAGEIO_FORMATS
-    Nifti Nrrd Gipl HDF5 JPEG GDCM BMP LSM PNG TIFF VTK Stimulate BioRad Meta MRC
+    Nifti Nrrd Gipl HDF5 JPEG GDCM BMP LSM PNG TIFF VTK Stimulate BioRad Meta MRC GE4 GE5
     MINC
-    MGH SCIFIO
+    MGH SCIFIO FDF
     )
 
 # Set each IO format's module name and factory name
@@ -48,6 +48,12 @@ set(Gipl_module_name ITKIOGIPL)
 set(MGH_module_name MGHIO)
 set(MGH_factory_name MGHImageIO)
 
+set(GE4_module_name ITKIOGE)
+set(GE4_factory_name GE4ImageIO)
+set(GE5_module_name ITKIOGE)
+set(GE5_factory_name GE5ImageIO)
+
+
 set(SCIFIO_module_name SCIFIO)
 set(SCIFIO_factory_name SCIFIOImageIO)
 
diff --git a/Utilities/ITK/CMake/itkExternal_FFTW.cmake b/Utilities/ITK/CMake/itkExternal_FFTW.cmake
index d1e1e4b..798a782 100644
--- a/Utilities/ITK/CMake/itkExternal_FFTW.cmake
+++ b/Utilities/ITK/CMake/itkExternal_FFTW.cmake
@@ -53,11 +53,17 @@ else()
       set(FFTW_SHARED_FLAG --enable-shared)
     endif()
 
+    set(_fftw_target_version 3.3.3)
+    set(_fftw_url_md5 "0a05ca9c7b3bfddc8278e7c40791a1c2")
+    set(_fftw_url "http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=${_fftw_url_md5}&name=fftw-${_fftw_target_version}.tar.gz")
+
     if(ITK_USE_FFTWF)
+      itk_download_attempt_check(FFTW)
       ExternalProject_add(fftwf
         PREFIX fftwf
-        URL "http://www.fftw.org/fftw-3.3.2.tar.gz"
-        URL_MD5 6977ee770ed68c85698c7168ffa6e178
+        URL "${_fftw_url}"
+        URL_MD5 "${_fftw_url_md5}"
+        DOWNLOAD_NAME "fftw-${_fftw_target_version}.tar.gz"
         CONFIGURE_COMMAND
           env
             "CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}"
@@ -77,10 +83,12 @@ else()
     endif()
 
     if(ITK_USE_FFTWD)
+      itk_download_attempt_check(FFTW)
       ExternalProject_add(fftwd
         PREFIX fftwd
-        URL "http://www.fftw.org/fftw-3.3.2.tar.gz"
-        URL_MD5 6977ee770ed68c85698c7168ffa6e178
+        URL "${_fftw_url}"
+        URL_MD5 "${_fftw_url_md5}"
+        DOWNLOAD_NAME "fftw-${_fftw_target_version}.tar.gz"
         CONFIGURE_COMMAND
           env
            "CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}"
diff --git a/Utilities/ITK/CMake/itkOpenCL.cmake b/Utilities/ITK/CMake/itkOpenCL.cmake
index dafdd97..f1ce6c0 100644
--- a/Utilities/ITK/CMake/itkOpenCL.cmake
+++ b/Utilities/ITK/CMake/itkOpenCL.cmake
@@ -38,13 +38,14 @@ if (ITK_USE_GPU)
     file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}
          "${${GPUFILTER_KERNELNAME}_KernelString}")
 
-    add_custom_target(${GPUFILTER_KERNELNAME}_Target
-                      SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE})
-    add_dependencies(${GPUFILTER_KERNELNAME}_Target ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE})
-    add_dependencies(${GPUFILTER_KERNELNAME}_Target ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
     configure_file(${OPENCL_FILE}
-                   ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}.cl COPYONLY)
-    add_dependencies(${GPUFILTER_KERNELNAME}_Target ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}.cl)
+                     ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}.cl COPYONLY)
+    add_custom_target(${GPUFILTER_KERNELNAME}_Target
+                      DEPENDS
+                        ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}
+                        ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
+                        ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}.cl
+                      )
     set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}
                                 PROPERTIES GENERATED ON)
     set(${SRC_VAR} ${${SRC_VAR}} ${OUTPUT_FILE})
diff --git a/Utilities/ITK/CMake/itkSampleBuildTest.cmake.in b/Utilities/ITK/CMake/itkSampleBuildTest.cmake.in
deleted file mode 100644
index 5e82e70..0000000
--- a/Utilities/ITK/CMake/itkSampleBuildTest.cmake.in
+++ /dev/null
@@ -1,144 +0,0 @@
-#
-# This is a recommended file for ITK dashboard submissions
-# The generated file will use the current settings in the CMakeCache.txt file
-# The file should be copied, edited if necessary and moved to another location
-#
-# This file was generated from
-# @ITK_SOURCE_DIR@/CMake/itkSampleBuildTest.cmake
-#
-
-######################
-# Set the Dashboard to one of Nightly, Continuous or Experimental
-#
-set(DASHBOARD Nightly)
-set(DASHBOARD Continuous)
-set(DASHBOARD Experimental)
-
-######################
-# Set the Default Build Type to one of Release, Debug, RelWithDebInfo
-# or MinSizeRel
-#
-set(DEFAULT_BUILD_TYPE "Debug")
-set(DEFAULT_BUILD_TYPE "RelWithDebInfo")
-set(DEFAULT_BUILD_TYPE "MinSizeRel")
-set(DEFAULT_BUILD_TYPE "Release")
-
-if("@CMAKE_BUILD_TYPE@" STREQUAL "")
-  set(BUILD_TYPE ${DEFAULT_BUILD_TYPE})
-else()
-  set(BUILD_TYPE @CMAKE_BUILD_TYPE@)
-endif()
-
-
-# These are the the locations of the source and binary directory
-set(CTEST_SOURCE_DIRECTORY "@ITK_SOURCE_DIR@")
-set(CTEST_BINARY_DIRECTORY "@ITK_BINARY_DIR@")
-
-# The ctest command to use for running the dashboard
-set(CTEST_COMMAND
-   "@CMAKE_COMMAND@ -P \"${CTEST_BINARY_DIRECTORY}/CMake/RemoveTemporaryFiles.cmake\""
-   "@CMAKE_CTEST_COMMAND@ -D ${DASHBOARD} -A \"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}\""
-)
-
-# CMake/RemoveTemporaryFiles.cmake must exist before the CTEST_COMMAND runs
-if(NOT EXISTS ${CTEST_BINARY_DIRECTORY}/CMake/RemoveTemporaryFiles.cmake)
-  set(CTEST_CMAKE_COMMAND "@CMAKE_COMMAND@")
-endif()
-
-# CMakeCache.txt must exist before the CTEST_COMMAND runs
-if(NOT EXISTS ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt)
-  set(CTEST_CMAKE_COMMAND "@CMAKE_COMMAND@")
-endif()
-
-# Specify how long to run the continuous in minutes
-if(${DASHBOARD} STREQUAL "Continuous")
-  set(CTEST_CONTINUOUS_DURATION 1080)
-  set(CTEST_CONTINUOUS_MINIMUM_INTERVAL 15)
-endif()
-
-# Set defaults
-set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY FALSE)
-set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE FALSE)
-
-# For Nightly builds, this should be TRUE
-if(${DASHBOARD} STREQUAL "Nightly")
-  set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
-else()
-  set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY FALSE)
-endif()
-
-# For Continuous builds. this should be TRUE
-if(${DASHBOARD} STREQUAL "Continuous")
-  set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE TRUE)
-else()
-  set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE FALSE)
-endif()
-
-# For Experimental builds, these should be FALSE
-if(${DASHBOARD} STREQUAL "Experimental")
-  set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY FALSE)
-  set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE FALSE)
-endif()
-
-# This is the initial cache to use for the binary tree, be careful to escape
-# any quotes inside of this string if you use it
-set(CTEST_INITIAL_CACHE "
-SITE:STRING=@SITE@
-BUILDNAME:STRING=@BUILDNAME@
-CVSCOMMAND:FILEPATH=@CVSCOMMAND@
-CVS_UPDATE_OPTIONS:STRING=-d -A -P
-
-CMAKE_C_FLAGS_RELEASE:STRING=@CMAKE_C_FLAGS_RELEASE@
-CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=@CMAKE_C_FLAGS_RELWITHDEBINFO@
-CMAKE_CXX_FLAGS_RELEASE:STRING=@CMAKE_CXX_FLAGS_RELEASE@
-CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=@CMAKE_CXX_FLAGS_RELWITHDEBINFO@
-
-TCL_TCLSH:FILEPATH=@TCL_TCLSH@
-CMAKE_BUILD_TOOL:INTERNAL=@CMAKE_BUILD_TOOL@
-CMAKE_MAKE_PROGRAM:FILEPATH=@CMAKE_MAKE_PROGRAM@
-CMAKE_GENERATOR:INTERNAL=@CMAKE_GENERATOR@
-CMAKE_CXX_COMPILER:FILEPATH=@CMAKE_CXX_COMPILER@
-CMAKE_CXX_FLAGS:STRING=@CMAKE_CXX_FLAGS@
-CMAKE_C_COMPILER:FILEPATH=@CMAKE_C_COMPILER@
-CMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@
-CMAKE_CONFIGURATION_TYPES:STRING=${BUILD_TYPE}
-CMAKE_BUILD_TYPE:STRING=${BUILD_TYPE}
-
-BUILD_SHARED_LIBS:BOOL=@BUILD_SHARED_LIBS@
-BUILD_TESTING:BOOL=@BUILD_TESTING@
-BUILD_EXAMPLES:BOOL=@BUILD_EXAMPLES@
-
-ITK_USE_PATENTED:BOOL=@ITK_USE_PATENTED@
-ITK_USE_CONCEPT_CHECKING:BOOL=@ITK_USE_CONCEPT_CHECKING@
-
-ITK_USE_SYSTEM_GDCM:BOOL=@ITK_USE_SYSTEM_GDCM@
-ITK_USE_SYSTEM_JPEG:BOOL=@ITK_USE_SYSTEM_JPEG@
-ITK_USE_SYSTEM_PNG:BOOL=@ITK_USE_SYSTEM_PNG@
-ITK_USE_SYSTEM_TIFF:BOOL=@ITK_USE_SYSTEM_TIFF@
-ITK_USE_SYSTEM_VXL:BOOL=@ITK_USE_SYSTEM_VXL@
-ITK_USE_SYSTEM_ZLIB:BOOL=@ITK_USE_SYSTEM_ZLIB@
-
-ITK_LEGACY_REMOVE:BOOL=@ITK_LEGACY_REMOVE@
-ITK_LEGACY_SILENT:BOOL=@ITK_LEGACY_SILENT@
-ITK_FUTURE_LEGACY_REMOVE:BOOL=@ITK_FUTURE_LEGACY_REMOVE@
-GDCM_LEGACY_REMOVE:BOOL=@GDCM_LEGACY_REMOVE@
-GDCM_LEGACY_SILENT:BOOL=@GDCM_LEGACY_SILENT@
-
-ITK_USE_KWSTYLE:BOOL=@ITK_USE_KWSTYLE@
-KWSTYLE_EXECUTABLE:PATH=@KWSTYLE_EXECUTABLE@
-KWSTYLE_USE_VIM_FORMAT:BOOL=@KWSTYLE_USE_VIM_FORMAT@
-KWSTYLE_USE_GCC_FORMAT:BOOL=@KWSTYLE_USE_GCC_FORMAT@
-KWSTYLE_USE_MSVC_FORMAT:BOOL=@KWSTYLE_USE_MSVC_FORMAT@
-
-ITK_CSWIG_JAVA:BOOL=@ITK_CSWIG_JAVA@
-ITK_CSWIG_PYTHON:BOOL=@ITK_CSWIG_PYTHON@
-ITK_CSWIG_TCL:BOOL=@ITK_CSWIG_TCL@
-
-ITK_WRAPPING:BOOL=@ITK_WRAPPING@
-ITK_USE_FFTWD:BOOL=@USE_FFTWD@
-ITK_USE_FFTWF:BOOL=@USE_FFTWF@
-")
-
-# Set any extra envionment variables here
-set(CTEST_ENVIRONMENT
-  )
diff --git a/Utilities/ITK/CMakeLists.txt b/Utilities/ITK/CMakeLists.txt
index c8b0a46..253ec0b 100644
--- a/Utilities/ITK/CMakeLists.txt
+++ b/Utilities/ITK/CMakeLists.txt
@@ -1,15 +1,25 @@
-cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
-include(CMakeDependentOption)
-#
-# use ExternalProject
-include(ExternalProject)
-
 if(WIN32)
-  cmake_minimum_required(VERSION 2.8.8)
+  cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
+else()
+  cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
 endif()
 
+foreach(p
+    CMP0025 # CMake 3.0
+    CMP0042 # CMake 3.0
+    )
+  if(POLICY ${p})
+    cmake_policy(SET ${p} NEW)
+  endif()
+endforeach()
+
 project(ITK)
 
+include(CMakeDependentOption)
+#
+# use ExternalProject
+include(ExternalProject)
+
 if( CMAKE_HOST_WIN32 )
 
   string( LENGTH "${CMAKE_CURRENT_SOURCE_DIR}" n )
@@ -44,7 +54,7 @@ set(main_project_name ${_ITKModuleMacros_DEFAULT_LABEL})
 #-----------------------------------------------------------------------------
 # ITK version number.
 set(ITK_VERSION_MAJOR "4")
-set(ITK_VERSION_MINOR "5")
+set(ITK_VERSION_MINOR "6")
 set(ITK_VERSION_PATCH "0")
 
 if(NOT ITK_INSTALL_RUNTIME_DIR)
@@ -89,16 +99,33 @@ endif()
 
 
 #-----------------------------------------------------------------------------
-# Enable runinng cppcheck for each module on its source and test directories.
+# Enable running cppcheck for each module on its source and test directories.
 option(ITK_CPPCHECK_TEST "Run cppcheck for static code analysis" OFF)
 mark_as_advanced(ITK_CPPCHECK_TEST)
 
+#-----------------------------------------------------------------------------
+# Forbid downloading resources from the network during a build. This helps
+# when building on systems without network connectivity to determine which
+# resources much be obtained manually and made available to the build.
+option(ITK_FORBID_DOWNLOADS "Do not download source code or data from the network" OFF)
+mark_as_advanced(ITK_FORBID_DOWNLOADS)
+macro(itk_download_attempt_check _name)
+  if(ITK_FORBID_DOWNLOADS)
+    message(SEND_ERROR "Attempted to download ${_name} when ITK_FORBID_DOWNLOADS is ON")
+  endif()
+endmacro()
 
 #-----------------------------------------------------------------------------
 # Enable the download and use of BrainWeb datasets.
 # When this data is available, additional 3D tests are enabled.
 option(ITK_USE_BRAINWEB_DATA "Download and use BrainWeb data for advanced testing" OFF)
 mark_as_advanced(ITK_USE_BRAINWEB_DATA)
+if(ITK_BRAINWEB_DATA_ROOT)
+  message(WARNING
+    "ITK_BRAINWEB_DATA_ROOT is not longer supported!"
+    "Please update to ITK_USE_BRAINWEB_DATA."
+    )
+endif()
 
 #-----------------------------------------------------------------------------
 # ITK wrapper for add_test that automatically sets the test's LABELS property
@@ -134,8 +161,16 @@ macro(itk_memcheck_ignore)
 endmacro()
 
 #-----------------------------------------------------------------------------
+# Python Wrapping
+option(ITK_WRAP_PYTHON "Build python support" OFF)
+
+#-----------------------------------------------------------------------------
 # ITK build configuration options.
-option(BUILD_SHARED_LIBS "Build ITK with shared libraries." OFF)
+if(ITK_WRAP_PYTHON)
+  option(BUILD_SHARED_LIBS "Build ITK with shared libraries." ON)
+else()
+  option(BUILD_SHARED_LIBS "Build ITK with shared libraries." OFF)
+endif()
 set(ITK_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
 
 include(ITKSetStandardCompilerFlags)
@@ -170,7 +205,11 @@ set(ITK_MODULES_DIR "${ITK_BINARY_DIR}/${ITK_INSTALL_PACKAGE_DIR}/Modules")
 # Provide compatibility options.
 option(ITKV3_COMPATIBILITY "Enable compatibility with ITK3.x when possible." OFF)
 option(ITK_LEGACY_REMOVE "Remove all legacy code completely." OFF)
-option(ITK_LEGACY_SILENT "Silence all legacy code messages." OFF)
+if(ITK_WRAP_PYTHON)
+  option(ITK_LEGACY_SILENT "Silence all legacy code messages." ON)
+else()
+  option(ITK_LEGACY_SILENT "Silence all legacy code messages." OFF)
+endif()
 # The ITK_FUTURE_LEGACY_REMOVE is a very advanced feature only
 # available to developers at configuration time by manually
 # adding this to the CMakeCache.txt -DITK_FUTURE_LEGACY_REMOVE:BOOL=ON
@@ -178,7 +217,7 @@ set( ITK_FUTURE_LEGACY_REMOVE 0 CACHE INTERNAL "Remove code that will become leg
 mark_as_advanced(ITK_LEGACY_SILENT ITK_LEGACY_REMOVE ITK_V3_COMPATIBILITY)
 
 # The disabling of legacy code, and the ITKv3 compatibility option can not both be
-# requested.  If removal of legacy code is requested, then ITKV3_COMPATIBILITY must
+# requested. If removal of legacy code is requested, then ITKV3_COMPATIBILITY must
 # be off.
 if(ITKV3_COMPATIBILITY AND ITK_LEGACY_REMOVE)
   message(FATAL_ERROR "Invlaid configuration: ITKV3_COMPATIBILITY AND ITK_LEGACY_REMOVE can not both be ON")
@@ -354,15 +393,11 @@ endif()
 
 #-----------------------------------------------------------------------------
 # The subdirectories added below this line should use only the public
-# interface with find_package(ITK).  Set ITK_DIR to use this ITK build.
+# interface with find_package(ITK). Set ITK_DIR to use this ITK build.
 set(ITK_DIR "${ITK_BINARY_DIR}")
 
 include(Wrapping/itkWrapSetup.cmake)
 if(ITK_WRAPPING)
-  if(ITK_USE_64BITS_IDS AND WIN32)
-    message(FATAL_ERROR "WRAPPING with ITK_USE_64BITS_IDS is not supported on Windows.
-Please turn of ITK_USE_64BITS_IDS.")
-  endif()
   add_subdirectory(Wrapping)
 endif()
 
@@ -374,6 +409,6 @@ endif()
 # Provide an option for generating documentation.
 add_subdirectory(Utilities/Doxygen)
 
-# Create target to download data from the ITKData group.  This must come after
+# Create target to download data from the ITKData group. This must come after
 # all tests have been added that reference the group, so we put it last.
 ExternalData_Add_Target(ITKData)
diff --git a/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkExponentialDeformationFieldImageFilter.hxx b/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkExponentialDeformationFieldImageFilter.hxx
index 833e32e..14f8b45 100644
--- a/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkExponentialDeformationFieldImageFilter.hxx
+++ b/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkExponentialDeformationFieldImageFilter.hxx
@@ -114,7 +114,7 @@ ExponentialDeformationFieldImageFilter< TInputImage, TOutputImage >
     maxnorm2 /= vnl_math_sqr(minpixelspacing);
 
     InputPixelRealValueType numiterfloat = 2.0
-                                           + 0.5 * vcl_log(maxnorm2) / vnl_math::ln2;
+                                           + 0.5 * std::log(maxnorm2) / vnl_math::ln2;
 
     if ( numiterfloat >= 0.0 )
       {
diff --git a/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkInverseDeformationFieldImageFilter.hxx b/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkInverseDeformationFieldImageFilter.hxx
index 965a6b0..237bec5 100644
--- a/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkInverseDeformationFieldImageFilter.hxx
+++ b/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkInverseDeformationFieldImageFilter.hxx
@@ -133,7 +133,6 @@ InverseDeformationFieldImageFilter< TInputImage, TOutputImage >
 
   typedef typename InputImageType::RegionType InputRegionType;
   typedef typename InputImageType::SizeType   InputSizeType;
-  typedef typename InputImageType::IndexType  InputIndexType;
 
   InputRegionType region;
 
diff --git a/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkIterativeInverseDeformationFieldImageFilter.hxx b/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkIterativeInverseDeformationFieldImageFilter.hxx
index f8d7fdf..1bd7c49 100644
--- a/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkIterativeInverseDeformationFieldImageFilter.hxx
+++ b/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkIterativeInverseDeformationFieldImageFilter.hxx
@@ -51,7 +51,7 @@ void IterativeInverseDeformationFieldImageFilter< TInputImage, TOutputImage >
     {
     itkExceptionMacro("\n Input is missing.");
     }
-  if ( !TInputImage::ImageDimension == TOutputImage::ImageDimension )
+  if ( ! ( TInputImage::ImageDimension == TOutputImage::ImageDimension ) )
     {
     itkExceptionMacro("\n Image Dimensions must be the same.");
     }
@@ -150,9 +150,9 @@ void IterativeInverseDeformationFieldImageFilter< TInputImage, TOutputImage >
         smallestError = 0;
         for ( unsigned int j = 0; j < ImageDimension; j++ )
           {
-          smallestError += vcl_pow(mappedPoint[j] + forwardVector[j] - originalPoint[j], 2);
+          smallestError += std::pow(mappedPoint[j] + forwardVector[j] - originalPoint[j], 2);
           }
-        smallestError = vcl_sqrt(smallestError);
+        smallestError = std::sqrt(smallestError);
         }
 
       // iteration loop
@@ -174,9 +174,9 @@ void IterativeInverseDeformationFieldImageFilter< TInputImage, TOutputImage >
             tmp = 0;
             for ( unsigned int l = 0; l < ImageDimension; l++ )
               {
-              tmp += vcl_pow(mappedPoint[l] + forwardVector[l] - originalPoint[l], 2);
+              tmp += std::pow(mappedPoint[l] + forwardVector[l] - originalPoint[l], 2);
               }
-            tmp = vcl_sqrt(tmp);
+            tmp = std::sqrt(tmp);
             if ( tmp < smallestError )
               {
               smallestError = tmp;
@@ -194,9 +194,9 @@ void IterativeInverseDeformationFieldImageFilter< TInputImage, TOutputImage >
             tmp = 0;
             for ( unsigned int l = 0; l < ImageDimension; l++ )
               {
-              tmp += vcl_pow(mappedPoint[l] + forwardVector[l] - originalPoint[l], 2);
+              tmp += std::pow(mappedPoint[l] + forwardVector[l] - originalPoint[l], 2);
               }
-            tmp = vcl_sqrt(tmp);
+            tmp = std::sqrt(tmp);
             if ( tmp < smallestError )
               {
               smallestError = tmp;
diff --git a/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkOtsuThresholdImageCalculator.h b/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkOtsuThresholdImageCalculator.h
index f292cd9..58927ee 100644
--- a/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkOtsuThresholdImageCalculator.h
+++ b/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkOtsuThresholdImageCalculator.h
@@ -99,7 +99,7 @@ public:
 protected:
   OtsuThresholdImageCalculator();
   virtual ~OtsuThresholdImageCalculator() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   OtsuThresholdImageCalculator(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkOtsuThresholdImageCalculator.hxx b/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkOtsuThresholdImageCalculator.hxx
index 288fda5..971050e 100644
--- a/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkOtsuThresholdImageCalculator.hxx
+++ b/Utilities/ITK/Modules/Compatibility/V3Compatibility/include/itkOtsuThresholdImageCalculator.hxx
@@ -33,7 +33,7 @@ template< typename TInputImage >
 OtsuThresholdImageCalculator< TInputImage >
 ::OtsuThresholdImageCalculator()
 {
-  m_Image = NULL;
+  m_Image = ITK_NULLPTR;
   m_Threshold = NumericTraits< PixelType >::Zero;
   m_NumberOfHistogramBins = 128;
   m_RegionSetByUser = false;
@@ -98,7 +98,7 @@ OtsuThresholdImageCalculator< TInputImage >
       }
     else
       {
-      binNumber = (unsigned int)vcl_ceil( ( value - imageMin ) * binMultiplier ) - 1;
+      binNumber = (unsigned int)std::ceil( ( value - imageMin ) * binMultiplier ) - 1;
       if ( binNumber == m_NumberOfHistogramBins ) // in case of rounding errors
         {
         binNumber -= 1;
diff --git a/Utilities/ITK/Modules/Core/Common/include/VNLSparseLUSolverTraits.h b/Utilities/ITK/Modules/Core/Common/include/VNLSparseLUSolverTraits.h
index c467103..eb6e35d 100644
--- a/Utilities/ITK/Modules/Core/Common/include/VNLSparseLUSolverTraits.h
+++ b/Utilities/ITK/Modules/Core/Common/include/VNLSparseLUSolverTraits.h
@@ -87,7 +87,7 @@ public:
   static bool Solve(const MatrixType & iA, const VectorType & iB, VectorType & oX)
   {
     SolverType solver( iA );
-    oX = solver.solve( iB );
+    Solve( solver, iB, oX );
 
     return true;
   }
@@ -98,9 +98,7 @@ public:
              VectorType & oX, VectorType & oY, VectorType & oZ )
   {
     SolverType solver( iA );
-    oX = solver.solve( iBx );
-    oY = solver.solve( iBy );
-    oZ = solver.solve( iBz );
+    Solve( solver, iBx, iBy, iBz, oX, oY, oZ );
 
     return true;
   }
@@ -111,12 +109,35 @@ public:
              VectorType & oX, VectorType & oY)
   {
     SolverType solver( iA );
-    oX = solver.solve( iBx );
-    oY = solver.solve( iBy );
+    Solve( solver, iBx, iBy, oX, oY );
 
     return true;
   }
 
+  /** \brief Solve the linear system \f$ iA \cdot oX = iB \f$ factoring the internal matrix if needed */
+  static void Solve( SolverType & solver, const VectorType & iB, VectorType & oX )
+  {
+    oX = solver.solve( iB );
+  }
+
+  /** \brief Solve the linear systems: \f$ iA \cdot oX = iBx \f$, \f$ iA \cdot oY = iBy \f$, \f$ iA \cdot oZ = iBz \f$ factoring the internal matrix if needed */
+  static void Solve( SolverType & solver,
+             const VectorType & iBx, const VectorType & iBy, const VectorType & iBz,
+             VectorType & oX, VectorType & oY, VectorType & oZ )
+  {
+    oX = solver.solve( iBx );
+    oY = solver.solve( iBy );
+    oZ = solver.solve( iBz );
+  }
+
+  /** \brief Solve the linear systems: \f$ iA \cdot oX = iBx \f$, \f$ iA \cdot oY = iBy \f$ factoring the internal matrix if needed */
+  static void Solve( SolverType & solver,
+             const VectorType & iBx, const VectorType & iBy,
+             VectorType & oX, VectorType & oY )
+  {
+    oX = solver.solve( iBx );
+    oY = solver.solve( iBy );
+  }
 };
 
 #endif
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkAnnulusOperator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkAnnulusOperator.hxx
index b410982..fbdf6d8 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkAnnulusOperator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkAnnulusOperator.hxx
@@ -166,13 +166,13 @@ AnnulusOperator< TPixel, TDimension, TAllocator >
     double mean = sumNotExterior / num;
     double var = ( sumNotExteriorSq - ( sumNotExterior * sumNotExterior / num ) )
       / ( num - 1.0 );
-    double std = vcl_sqrt(var);
+    double std = std::sqrt(var);
 
     // convert std to a scaling factor k such that
     //
     //        || (coeffP - mean) / k || = 1.0
     //
-    double k = std * vcl_sqrt(num - 1.0);
+    double k = std * std::sqrt(num - 1.0);
 
     // Run through the kernel again, shifting and normalizing the
     // elements that are not exterior to the annulus.  This forces the
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkArray.h b/Utilities/ITK/Modules/Core/Common/include/itkArray.h
index af25a65..b66c636 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkArray.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkArray.h
@@ -41,21 +41,21 @@ namespace itk
  *
  * Template parameters for class Array:
  *
- * - TValueType = Element type stored at each location in the array.
+ * - TValue = Element type stored at each location in the array.
  *
  * \ingroup DataRepresentation
  * \ingroup ITKCommon
  */
-template< typename TValueType >
-class Array : public vnl_vector< TValueType >
+template< typename TValue >
+class Array : public vnl_vector< TValue >
 {
 public:
 
   /** The element type stored at each location in the Array. */
-  typedef TValueType                                  ValueType;
-  typedef Array                                       Self;
-  typedef vnl_vector< TValueType >                    VnlVectorType;
-  typedef typename vnl_vector< TValueType>::size_type SizeValueType;
+  typedef TValue                                  ValueType;
+  typedef Array                                   Self;
+  typedef vnl_vector< TValue >                    VnlVectorType;
+  typedef typename vnl_vector< TValue>::size_type SizeValueType;
 
 public:
 
@@ -78,6 +78,14 @@ public:
    * memory when this object is destroyed. */
   Array(ValueType *data, SizeValueType sz, bool LetArrayManageMemory = false);
 
+#if defined ( ITK_FUTURE_LEGACY_REMOVE )
+  /** Constructor that initializes array with contents from a user supplied
+   * const buffer. The pointer to the buffer and the length is specified. By default,
+   * the array does a deep copy of the const pointer data, so the array class also
+   * manages memory. */
+  Array(const ValueType *datain, SizeValueType sz);
+
+#else // defined ( ITK_FUTURE_LEGACY_REMOVE )
   /** Constructor that initializes array with contents from a user supplied
    * buffer. The pointer to the buffer and the length is specified. By default,
    * the array does not manage the memory of the buffer. It merely points to
@@ -86,6 +94,7 @@ public:
    * memory when this object is destroyed. */
   Array(const ValueType *data, SizeValueType sz,
         bool LetArrayManageMemory = false);
+#endif
 
   /** Constructor to initialize an array from another of any data type */
   template< typename TArrayValue >
@@ -95,12 +104,12 @@ public:
     this->SetSize( r.GetSize() );
     for( SizeValueType i=0; i<r.GetSize(); i++ )
       {
-      this->operator[](i) = static_cast< TValueType >( r[i] );
+      this->operator[](i) = static_cast< TValue >( r[i] );
       }
   }
 
   /** Set the all the elements of the array to the specified value */
-  void Fill(TValueType const & v)
+  void Fill(TValue const & v)
     {
     this->fill(v);
     }
@@ -117,11 +126,11 @@ public:
   { return static_cast<SizeValueType >( this->size() ); }
 
   /** Get one element */
-  const TValueType & GetElement(SizeValueType i) const
+  const TValue & GetElement(SizeValueType i) const
   { return this->operator[](i); }
 
   /** Set one element */
-  void SetElement(SizeValueType i, const TValueType & value)
+  void SetElement(SizeValueType i, const TValue & value)
   { this->operator[](i) = value; }
 
   /** Destructively set the size to that given.  Will lose data.  */
@@ -135,7 +144,7 @@ public:
    * the responsibility of freeing the memory for this data.  If
    * "LetArrayManageMemory" is true, then this class will free the
    * memory when this object is destroyed. */
-  void SetData(TValueType *data, bool LetArrayManageMemory = false);
+  void SetData(TValue *data, bool LetArrayManageMemory = false);
 
   /** Similar to the previous method. In the above method, the size must be
    * separately set prior to using user-supplied data. This introduces an
@@ -146,7 +155,7 @@ public:
    * the responsibility of freeing the memory for this data.  If
    * "LetArrayManageMemory" is true, then this class will free the
    * memory when this object is destroyed. */
-  void SetData(TValueType *data, SizeValueType sz,
+  void SetData(TValue *data, SizeValueType sz,
                bool LetArrayManageMemory = false);
 
 
@@ -157,13 +166,20 @@ public:
    * means that subclasses cannot allocate memory. */
   ~Array();
 
+  void swap(Array &other)
+    {
+      using std::swap;
+      this->VnlVectorType::swap(other);
+      swap(this->m_LetArrayManageMemory, other.m_LetArrayManageMemory);
+    }
+
 private:
 
   bool m_LetArrayManageMemory;
 };
 
-template< typename TValueType >
-std::ostream & operator<<(std::ostream & os, const Array< TValueType > & arr)
+template< typename TValue >
+std::ostream & operator<<(std::ostream & os, const Array< TValue > & arr)
 {
   os << "[";
   const unsigned int length = arr.size();
@@ -184,6 +200,13 @@ std::ostream & operator<<(std::ostream & os, const Array< TValueType > & arr)
 template<> ITKCommon_EXPORT std::ostream & operator<< <double> (std::ostream & os, const Array< double > & arr);
 template<> ITKCommon_EXPORT std::ostream & operator<< <float> (std::ostream & os, const Array< float > & arr);
 
+
+template<typename T>
+inline void swap( Array<T> &a, Array<T> &b )
+{
+  a.swap(b);
+}
+
 } // namespace itk
 
 #ifndef ITK_MANUAL_INSTANTIATION
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkArray.hxx b/Utilities/ITK/Modules/Core/Common/include/itkArray.hxx
index 47cf6be..654fa5d 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkArray.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkArray.hxx
@@ -24,18 +24,18 @@
 namespace itk
 {
 /** Default constructor */
-template< typename TValueType >
-Array< TValueType >
-::Array():vnl_vector< TValueType >()
+template< typename TValue >
+Array< TValue >
+::Array():vnl_vector< TValue >()
 {
   m_LetArrayManageMemory = true;
 }
 
 /** Copy constructor */
-template < typename TValueType >
-Array<TValueType>
+template < typename TValue >
+Array<TValue>
 ::Array(const Self & rhs)
-  : vnl_vector<TValueType>(rhs),
+  : vnl_vector<TValue>(rhs),
     // The vnl vector copy constructor creates new memory
     // no matter the setting of let array manage memory of rhs
     m_LetArrayManageMemory(true)
@@ -43,42 +43,62 @@ Array<TValueType>
 }
 
 /** Constructor with size */
-template< typename TValueType >
-Array< TValueType >
-::Array(SizeValueType dimension):vnl_vector< TValueType >(dimension)
+template< typename TValue >
+Array< TValue >
+::Array(SizeValueType dimension)
+  : vnl_vector< TValue >(dimension),
+    // The vnl vector copy constructor creates new memory
+    // no matter the setting of let array manage memory of rhs
+    m_LetArrayManageMemory(true)
 {
-  m_LetArrayManageMemory = true;
 }
 
 /** Constructor with user specified data */
-template< typename TValueType >
-Array< TValueType >
-::Array(ValueType *datain, SizeValueType sz, bool LetArrayManageMemory)
+template< typename TValue >
+Array< TValue >
+::Array(ValueType *datain, SizeValueType sz, bool LetArrayManageMemory):
+  m_LetArrayManageMemory(LetArrayManageMemory)
 {
-  vnl_vector< TValueType >::data = datain;
-  vnl_vector< TValueType >::num_elmts = sz;
-  m_LetArrayManageMemory = LetArrayManageMemory;
+  vnl_vector< TValue >::data = datain;
+  vnl_vector< TValue >::num_elmts = sz;
 }
 
-/** Constructor with user specified data */
-template< typename TValueType >
-Array< TValueType >
-::Array(const ValueType *datain, SizeValueType sz, bool LetArrayManageMemory)
+#if defined ( ITK_FUTURE_LEGACY_REMOVE )
+/** Constructor with user specified const data */
+template< typename TValue >
+Array< TValue >
+::Array(const ValueType *datain, SizeValueType sz):
+  vnl_vector< TValue >( datain, sz),
+  // The vnl vector copy constructor creates new memory
+  // no matter the setting of let array manage memory of rhs
+  m_LetArrayManageMemory(true)
+{
+}
+
+#else // defined ( ITK_FUTURE_LEGACY_REMOVE )
+/** Constructor with user specified const data */
+template< typename TValue >
+Array< TValue >
+::Array(const ValueType *datain, SizeValueType sz, bool /* LetArrayManageMemory */):
+  /* NOTE: The 3rd argument "LetArrayManageMemory, was never valid to use, but is
+   * preserved to maintain backwards compatibility*/
+  vnl_vector< TValue >( datain, sz),
+  // The vnl vector copy constructor creates new memory
+  // no matter the setting of let array manage memory of rhs
+  m_LetArrayManageMemory(true)
 {
-  vnl_vector< TValueType >::data = const_cast< TValueType * >( datain );
-  // Argh!! Discard constness WRONG.!!
-  vnl_vector< TValueType >::num_elmts = sz;
-  m_LetArrayManageMemory = LetArrayManageMemory;
 }
+#endif
+
 
 /** Destructor */
-template< typename TValueType >
-Array< TValueType >
+template< typename TValue >
+Array< TValue >
 ::~Array()
 {
   if ( !m_LetArrayManageMemory )
     {
-    vnl_vector< TValueType >::data = 0;
+    vnl_vector< TValue >::data = ITK_NULLPTR;
     }
 }
 
@@ -87,16 +107,16 @@ Array< TValueType >
  * the responsibility of freeing the memory for this data.  If
  * "LetArrayManageMemory" is true, then this class will free the
  * memory when this object is destroyed. */
-template< typename TValueType >
+template< typename TValue >
 void
-Array< TValueType >
-::SetData(TValueType *datain, bool LetArrayManageMemory)
+Array< TValue >
+::SetData(TValue *datain, bool LetArrayManageMemory)
 {
   if ( m_LetArrayManageMemory )
     {
-    vnl_vector< TValueType >::destroy();
+    vnl_vector< TValue >::destroy();
     }
-  vnl_vector< TValueType >::data = datain;
+  vnl_vector< TValue >::data = datain;
   m_LetArrayManageMemory = LetArrayManageMemory;
 }
 
@@ -109,22 +129,22 @@ Array< TValueType >
  * the responsibility of freeing the memory for this data.  If
  * "LetArrayManageMemory" is true, then this class will free the
  * memory when this object is destroyed. */
-template< typename TValueType >
+template< typename TValue >
 void
-Array< TValueType >
-::SetData(TValueType *datain, SizeValueType sz, bool LetArrayManageMemory)
+Array< TValue >
+::SetData(TValue *datain, SizeValueType sz, bool LetArrayManageMemory)
 {
   if ( m_LetArrayManageMemory )
     {
-    vnl_vector< TValueType >::destroy();
+    vnl_vector< TValue >::destroy();
     }
-  vnl_vector< TValueType >::data = datain;
-  vnl_vector< TValueType >::num_elmts = sz;
+  vnl_vector< TValue >::data = datain;
+  vnl_vector< TValue >::num_elmts = sz;
   m_LetArrayManageMemory = LetArrayManageMemory;
 }
 
-template< typename TValueType >
-void Array< TValueType >
+template< typename TValue >
+void Array< TValue >
 ::SetSize(SizeValueType sz)
 {
   if ( this->size() != sz )
@@ -133,7 +153,7 @@ void Array< TValueType >
     // on a resize
     if ( !m_LetArrayManageMemory )
       {
-      vnl_vector< TValueType >::data = 0;
+      vnl_vector< TValue >::data = ITK_NULLPTR;
       }
 
     // Call the superclass's set_size
@@ -145,10 +165,10 @@ void Array< TValueType >
     }
 }
 
-template< typename TValueType >
-const typename Array< TValueType >
+template< typename TValue >
+const typename Array< TValue >
 ::Self &
-Array< TValueType >
+Array< TValue >
 ::operator=(const Self & rhs)
 {
   if ( this != &rhs )
@@ -166,10 +186,10 @@ Array< TValueType >
   return *this;
 }
 
-template< typename TValueType >
-const typename Array< TValueType >
+template< typename TValue >
+const typename Array< TValue >
 ::Self &
-Array< TValueType >
+Array< TValue >
 ::operator=(const VnlVectorType & rhs)
 {
   if ( this != &rhs )
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkArray2D.h b/Utilities/ITK/Modules/Core/Common/include/itkArray2D.h
index dbe36ad..52f87fb 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkArray2D.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkArray2D.h
@@ -35,20 +35,20 @@ namespace itk
  *
  * Template parameters for class Array2D:
  *
- * - TValueType = Element type stored at each location in the array.
+ * - TValue = Element type stored at each location in the array.
  *
  * \ingroup DataRepresentation
  * \ingroup ITKCommon
  */
-template< typename TValueType >
-class Array2D: public vnl_matrix< TValueType >
+template< typename TValue >
+class Array2D: public vnl_matrix< TValue >
 {
 public:
 
   /** The element type stored at each location in the Array2D. */
-  typedef TValueType               ValueType;
-  typedef Array2D                  Self;
-  typedef vnl_matrix< TValueType > VnlMatrixType;
+  typedef TValue               ValueType;
+  typedef Array2D              Self;
+  typedef vnl_matrix< TValue > VnlMatrixType;
 
   Array2D();
   Array2D(unsigned int rows, unsigned int cols);
@@ -59,7 +59,7 @@ public:
 
   const Self & operator=(const VnlMatrixType & matrix);
 
-  void Fill(TValueType const & v) { this->fill(v); }
+  void Fill(TValue const & v) { this->fill(v); }
 
   /** Destructively set the size to that given.  Will lose data.  */
   void SetSize(unsigned int m, unsigned int n);
@@ -69,8 +69,8 @@ public:
   ~Array2D() {}
 };
 
-template< typename TValueType >
-std::ostream & operator<<(std::ostream & os, const Array2D< TValueType > & arr)
+template< typename TValue >
+std::ostream & operator<<(std::ostream & os, const Array2D< TValue > & arr)
 {
   const unsigned int numberOfRows    = arr.rows();
   const unsigned int numberOfColumns = arr.cols();
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkArray2D.hxx b/Utilities/ITK/Modules/Core/Common/include/itkArray2D.hxx
index dde69c9..3219471 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkArray2D.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkArray2D.hxx
@@ -23,34 +23,34 @@
 namespace itk
 {
 /** Default constructor  */
-template< typename TValueType >
-Array2D< TValueType >
-::Array2D():vnl_matrix< TValueType >()
+template< typename TValue >
+Array2D< TValue >
+::Array2D():vnl_matrix< TValue >()
 {}
 
 /** Constructor with number of rows and columns as arguments */
-template< typename TValueType >
-Array2D< TValueType >
+template< typename TValue >
+Array2D< TValue >
 ::Array2D(unsigned int numberOfRows, unsigned int numberOfCols):
-  vnl_matrix< TValueType >(numberOfRows, numberOfCols)
+  vnl_matrix< TValue >(numberOfRows, numberOfCols)
 {}
 
 /** Constructor from a vnl_matrix */
-template< typename TValueType >
-Array2D< TValueType >
-::Array2D(const VnlMatrixType & matrix):vnl_matrix< TValueType >(matrix)
+template< typename TValue >
+Array2D< TValue >
+::Array2D(const VnlMatrixType & matrix):vnl_matrix< TValue >(matrix)
 {}
 
 /** Copy Constructor  */
-template< typename TValueType >
-Array2D< TValueType >
-::Array2D(const Self & array):vnl_matrix< TValueType >(array)
+template< typename TValue >
+Array2D< TValue >
+::Array2D(const Self & array):vnl_matrix< TValue >(array)
 {}
 
 /** Assignment Operator from Array */
-template< typename TValueType >
-const Array2D< TValueType > &
-Array2D< TValueType >
+template< typename TValue >
+const Array2D< TValue > &
+Array2D< TValue >
 ::operator=(const Self & array)
 {
   this->VnlMatrixType::operator=(array);
@@ -58,9 +58,9 @@ Array2D< TValueType >
 }
 
 /** Assignment Operator from vnl_matrix */
-template< typename TValueType >
-const Array2D< TValueType > &
-Array2D< TValueType >
+template< typename TValue >
+const Array2D< TValue > &
+Array2D< TValue >
 ::operator=(const VnlMatrixType & matrix)
 {
   this->VnlMatrixType::operator=(matrix);
@@ -68,8 +68,8 @@ Array2D< TValueType >
 }
 
 /** Set the size of the array */
-template< typename TValueType >
-void Array2D< TValueType >
+template< typename TValue >
+void Array2D< TValue >
 ::SetSize(unsigned int m, unsigned int n)
 {
   this->set_size(m, n);
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.hxx b/Utilities/ITK/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.hxx
index cfcc1cd..7901f59 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.hxx
@@ -39,7 +39,7 @@ AtanRegularizedHeavisideStepFunction< TInput, TOutput >
 ::Evaluate(const InputType & input) const
 {
   const RealType t = static_cast< RealType >( input ) * this->GetOneOverEpsilon();
-  return 0.5 + static_cast< OutputType >( vnl_math::one_over_pi * vcl_atan( t ) );
+  return 0.5 + static_cast< OutputType >( vnl_math::one_over_pi * std::atan( t ) );
 }
 
 /** Evaluate the derivative at the specified input position */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkAutoPointer.h b/Utilities/ITK/Modules/Core/Common/include/itkAutoPointer.h
index b578f43..6b627a4 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkAutoPointer.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkAutoPointer.h
@@ -51,7 +51,7 @@ public:
   typedef AutoPointer Self;
 
   /** Constructor.  */
-  AutoPointer ():m_Pointer(0), m_IsOwner(false)
+  AutoPointer ():m_Pointer(ITK_NULLPTR), m_IsOwner(false)
   {}
 
   /** Copy constructor.  */
@@ -85,7 +85,7 @@ public:
       {
       delete m_Pointer;
       }
-    m_Pointer = 0;
+    m_Pointer = ITK_NULLPTR;
     m_IsOwner = false;
   }
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h b/Utilities/ITK/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h
index f292c6e..8af6bdf 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h
@@ -87,7 +87,7 @@ public:
 protected:
   AutoPointerDataObjectDecorator();
   ~AutoPointerDataObjectDecorator();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 protected:
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.hxx b/Utilities/ITK/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.hxx
index 91234a3..691386a 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkBSplineInterpolationWeightFunction.hxx
@@ -34,7 +34,7 @@ BSplineInterpolationWeightFunction< TCoordRep, VSpaceDimension, VSplineOrder >
 {
   // Initialize the number of weights;
   m_NumberOfWeights =
-    static_cast< unsigned int >( vcl_pow( static_cast< double >( SplineOrder + 1 ),
+    static_cast< unsigned int >( std::pow( static_cast< double >( SplineOrder + 1 ),
                                           static_cast< double >( SpaceDimension ) ) );
 
   // Initialize support region is a hypercube of length SplineOrder + 1
@@ -46,8 +46,7 @@ BSplineInterpolationWeightFunction< TCoordRep, VSpaceDimension, VSplineOrder >
   typedef Image< char, SpaceDimension > CharImageType;
   typename CharImageType::Pointer tempImage = CharImageType::New();
   tempImage->SetRegions(m_SupportSize);
-  tempImage->Allocate();
-  tempImage->FillBuffer(0);
+  tempImage->Allocate(true); // initialize buffer to zero
 
   typedef ImageRegionConstIteratorWithIndex< CharImageType > IteratorType;
   IteratorType iterator( tempImage, tempImage->GetBufferedRegion() );
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx b/Utilities/ITK/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx
index 57774e4..07cf524 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx
@@ -28,7 +28,7 @@ BinaryThresholdSpatialFunction< TFunction >
 {
   m_LowerThreshold = NumericTraits< FunctionOutputType >::NonpositiveMin();
   m_UpperThreshold = NumericTraits< FunctionOutputType >::max();
-  m_Function = NULL;
+  m_Function = ITK_NULLPTR;
 }
 
 template< typename TFunction >
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkBoundingBox.h b/Utilities/ITK/Modules/Core/Common/include/itkBoundingBox.h
index 543b4ef..16fc7fa 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkBoundingBox.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkBoundingBox.h
@@ -164,7 +164,7 @@ public:
   bool IsInside(const PointType &) const;
 
   /** Method Compute the Modified Time based on changed to the components. */
-  ModifiedTimeType GetMTime(void) const;
+  virtual ModifiedTimeType GetMTime(void) const ITK_OVERRIDE;
 
   /** Duplicates this bounding box */
   Pointer DeepCopy() const;
@@ -172,7 +172,7 @@ public:
 protected:
   BoundingBox();
   virtual ~BoundingBox();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   typedef typename PointsContainer::ConstIterator ConstIterator;
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkBoundingBox.hxx b/Utilities/ITK/Modules/Core/Common/include/itkBoundingBox.hxx
index 71f5ebd..a818c40 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkBoundingBox.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkBoundingBox.hxx
@@ -98,12 +98,12 @@ BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer >
     radius[i] = m_Bounds[2 * i + 1] - center[i];
     }
 
-  for ( unsigned int j = 0; j < vcl_pow(2.0, (double)VPointDimension); j++ )
+  for ( unsigned int j = 0; j < std::pow(2.0, (double)VPointDimension); j++ )
     {
     PointType pnt;
     for ( unsigned int i = 0; i < VPointDimension; i++ )
       {
-      pnt[i] = center[i] + vcl_pow( -1.0, ( (double)( j / ( int( vcl_pow(2.0, (double)i) ) ) ) ) )
+      pnt[i] = center[i] + std::pow( -1.0, ( (double)( j / ( int( std::pow(2.0, (double)i) ) ) ) ) )
                * radius[i];
       }
 
@@ -118,7 +118,7 @@ BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer >
 template< typename TPointIdentifier, int VPointDimension,
           typename TCoordRep, typename TPointsContainer >
 BoundingBox< TPointIdentifier, VPointDimension, TCoordRep, TPointsContainer >
-::BoundingBox():m_PointsContainer(NULL)
+::BoundingBox():m_PointsContainer(ITK_NULLPTR)
 {
   m_Bounds.Fill(NumericTraits< CoordRepType >::Zero);
   m_CornersContainer = PointsContainer::New();
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkCellInterface.h b/Utilities/ITK/Modules/Core/Common/include/itkCellInterface.h
index a668aa4..50a4d5d 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkCellInterface.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkCellInterface.h
@@ -204,7 +204,7 @@ public:
           return ( *pos ).second;
           }
         }
-      return 0;
+      return ITK_NULLPTR;
     }
 
     void AddVisitor(VisitorType *v)
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkChildTreeIterator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkChildTreeIterator.hxx
index 116f23b..fd25efa 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkChildTreeIterator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkChildTreeIterator.hxx
@@ -50,7 +50,7 @@ template< typename TTreeType >
 bool
 ChildTreeIterator< TTreeType >::GoToChild(ChildIdentifier number)
 {
-  if ( m_ParentNode->GetChild(number) == NULL )
+  if ( m_ParentNode->GetChild(number) == ITK_NULLPTR )
     {
     return false;
     }
@@ -69,7 +69,7 @@ ChildTreeIterator< TTreeType >::GoToParent()
 {
   TreeNodeType *parent =  m_ParentNode->GetParent();
 
-  if ( parent == NULL )
+  if ( parent == ITK_NULLPTR )
     {
     return false;
     }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkColorTable.h b/Utilities/ITK/Modules/Core/Common/include/itkColorTable.h
index 9c735a4..b30b7e0 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkColorTable.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkColorTable.h
@@ -108,7 +108,7 @@ public:
 
 protected:
   ColorTable();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   unsigned int m_NumberOfColors;
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkColorTable.hxx b/Utilities/ITK/Modules/Core/Common/include/itkColorTable.hxx
index e0ef0d6..7b2ade8 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkColorTable.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkColorTable.hxx
@@ -386,7 +386,7 @@ ColorTable< TPixel >
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkCommand.h b/Utilities/ITK/Modules/Core/Common/include/itkCommand.h
index d7dd1af..c9032fb 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkCommand.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkCommand.h
@@ -117,7 +117,7 @@ public:
   }
 
   /**  Invoke the member function. */
-  virtual void Execute(Object *caller, const EventObject & event)
+  virtual void Execute(Object *caller, const EventObject & event) ITK_OVERRIDE
   {
     if ( m_MemberFunction )
       {
@@ -126,7 +126,7 @@ public:
   }
 
   /**  Invoke the member function with a const object. */
-  virtual void Execute(const Object *caller, const EventObject & event)
+  virtual void Execute(const Object *caller, const EventObject & event) ITK_OVERRIDE
   {
     if ( m_ConstMemberFunction )
       {
@@ -135,15 +135,16 @@ public:
   }
 
 protected:
-
   T *                         m_This;
   TMemberFunctionPointer      m_MemberFunction;
   TConstMemberFunctionPointer m_ConstMemberFunction;
-  MemberCommand():
-    m_This( NULL ),
-    m_MemberFunction( NULL ),
-    m_ConstMemberFunction( NULL )
+
+  MemberCommand() :
+    m_This( ITK_NULLPTR ),
+    m_MemberFunction( ITK_NULLPTR ),
+    m_ConstMemberFunction( ITK_NULLPTR )
   {}
+
   virtual ~MemberCommand(){}
 
 private:
@@ -187,7 +188,7 @@ public:
   }
 
   /**  Invoke the member function. */
-  virtual void Execute(Object *, const EventObject & event)
+  virtual void Execute(Object *, const EventObject & event) ITK_OVERRIDE
   {
     if ( m_MemberFunction )
       {
@@ -196,7 +197,7 @@ public:
   }
 
   /**  Invoke the member function with a const object */
-  virtual void Execute(const Object *, const EventObject & event)
+  virtual void Execute(const Object *, const EventObject & event) ITK_OVERRIDE
   {
     if ( m_MemberFunction )
       {
@@ -207,7 +208,12 @@ public:
 protected:
   T *                    m_This;
   TMemberFunctionPointer m_MemberFunction;
-  ReceptorMemberCommand():m_MemberFunction(0) {}
+
+  ReceptorMemberCommand() :
+    m_This( ITK_NULLPTR ),
+    m_MemberFunction( ITK_NULLPTR )
+  {}
+
   virtual ~ReceptorMemberCommand() {}
 
 private:
@@ -250,7 +256,7 @@ public:
   }
 
   /** Invoke the callback function. */
-  virtual void Execute(Object *, const EventObject &)
+  virtual void Execute(Object *, const EventObject &) ITK_OVERRIDE
   {
     if ( m_MemberFunction )
       {
@@ -258,7 +264,7 @@ public:
       }
   }
 
-  virtual void Execute(const Object *, const EventObject &)
+  virtual void Execute(const Object *, const EventObject &) ITK_OVERRIDE
   {
     if ( m_MemberFunction )
       {
@@ -269,10 +275,12 @@ public:
 protected:
   T *                    m_This;
   TMemberFunctionPointer m_MemberFunction;
-  SimpleMemberCommand():
-    m_This( NULL ),
-    m_MemberFunction( NULL )
+
+  SimpleMemberCommand() :
+    m_This( ITK_NULLPTR ),
+    m_MemberFunction( ITK_NULLPTR )
   {}
+
   virtual ~SimpleMemberCommand() {}
 
 private:
@@ -315,7 +323,7 @@ public:
   }
 
   /** Invoke the const member method callback. */
-  virtual void Execute(Object *, const EventObject &)
+  virtual void Execute(Object *, const EventObject &) ITK_OVERRIDE
   {
     if ( m_MemberFunction )
       {
@@ -323,7 +331,7 @@ public:
       }
   }
 
-  virtual void Execute(const Object *, const EventObject &)
+  virtual void Execute(const Object *, const EventObject &) ITK_OVERRIDE
   {
     if ( m_MemberFunction )
       {
@@ -334,10 +342,12 @@ public:
 protected:
   const T *              m_This;
   TMemberFunctionPointer m_MemberFunction;
-  SimpleConstMemberCommand():
+
+  SimpleConstMemberCommand() :
     m_This( NULL ),
     m_MemberFunction( NULL )
   {}
+
   virtual ~SimpleConstMemberCommand() {}
 
 private:
@@ -391,7 +401,7 @@ public:
   { m_ClientDataDeleteCallback = f; }
 
   /** Execute the callback function. */
-  void Execute(Object *caller, const EventObject & event)
+  virtual void Execute(Object *caller, const EventObject & event) ITK_OVERRIDE
   {
     if ( m_Callback )
       {
@@ -400,7 +410,7 @@ public:
   }
 
   /** Execute the callback function with a const Object */
-  void Execute(const Object *caller, const EventObject & event)
+  virtual void Execute(const Object *caller, const EventObject & event) ITK_OVERRIDE
   {
     if ( m_ConstCallback )
       {
@@ -409,11 +419,12 @@ public:
   }
 
 protected:
-  CStyleCommand():m_ClientData(0), m_Callback(0), m_ConstCallback(0),
-    m_ClientDataDeleteCallback(0)
-  {
-    // not implemented
-  }
+  CStyleCommand() :
+    m_ClientData( ITK_NULLPTR ),
+    m_Callback( ITK_NULLPTR ),
+    m_ConstCallback( ITK_NULLPTR ),
+    m_ClientDataDeleteCallback( ITK_NULLPTR )
+  {}
 
   ~CStyleCommand()
   {
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkConceptChecking.h b/Utilities/ITK/Modules/Core/Common/include/itkConceptChecking.h
index 7ae9319..c73c754 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkConceptChecking.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkConceptChecking.h
@@ -591,13 +591,13 @@ struct HasNumericTraits {
   struct Constraints {
     void constraints()
     {
-      typedef typename NumericTraits< T >::ValueType      ValueType;
-      typedef typename NumericTraits< T >::PrintType      PrintType;
-      typedef typename NumericTraits< T >::AbsType        AbsType;
-      typedef typename NumericTraits< T >::AccumulateType AccumulateType;
-      typedef typename NumericTraits< T >::RealType       RealType;
-      typedef typename NumericTraits< T >::ScalarRealType ScalarRealType;
-      typedef typename NumericTraits< T >::FloatType      FloatType;
+      Detail::UniqueType< typename NumericTraits< T >::ValueType >();
+      Detail::UniqueType< typename NumericTraits< T >::PrintType >();
+      Detail::UniqueType< typename NumericTraits< T >::AbsType >();
+      Detail::UniqueType< typename NumericTraits< T >::AccumulateType >();
+      Detail::UniqueType< typename NumericTraits< T >::RealType >();
+      Detail::UniqueType< typename NumericTraits< T >::ScalarRealType >();
+      Detail::UniqueType< typename NumericTraits< T >::FloatType >();
       T    a;
       bool b;
 
@@ -625,7 +625,7 @@ struct HasPixelTraits {
   struct Constraints {
     void constraints()
     {
-      typedef typename PixelTraits< T >::ValueType ValueType;
+      Detail::UniqueType< typename PixelTraits< T >::ValueType >();
       unsigned int a = PixelTraits< T >::Dimension;
       Detail::IgnoreUnusedVariable(a);
     }
@@ -640,7 +640,7 @@ struct HasValueType {
   struct Constraints {
     void constraints()
     {
-      typedef typename T::ValueType ValueType;
+      Detail::UniqueType< typename T::ValueType >();
     }
   };
 
@@ -669,7 +669,7 @@ struct HasJoinTraits {
   struct Constraints {
     void constraints()
     {
-      typedef typename JoinTraits< T1, T2 >::ValueType ValueType;
+      Detail::UniqueType< typename JoinTraits< T1, T2 >::ValueType >();
     }
   };
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkConditionalConstIterator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkConditionalConstIterator.hxx
index dcc85fe..57d91f9 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkConditionalConstIterator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkConditionalConstIterator.hxx
@@ -24,7 +24,7 @@ namespace itk
 {
 template< typename TImageType >
 ConditionalConstIterator< TImageType >
-::ConditionalConstIterator()
+::ConditionalConstIterator() : m_IsAtEnd(false)
 {}
 
 template< typename TImageType >
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIterator.h b/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIterator.h
index 7dafc77..f92c65a 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIterator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIterator.h
@@ -57,12 +57,12 @@ public:
   typedef typename TImage::InternalPixelType InternalPixelType;
   typedef typename TImage::PixelType         PixelType;
 
-  /** Save the image dimension. */
-  itkStaticConstMacro(Dimension, unsigned int, TImage::ImageDimension);
-
   /** Type used to refer to space dimensions */
   typedef unsigned int                  DimensionValueType;
 
+  /** Save the image dimension. */
+  itkStaticConstMacro(Dimension, DimensionValueType, TImage::ImageDimension);
+
   /** Standard class typedefs. */
   typedef ConstNeighborhoodIterator Self;
   typedef Neighborhood< InternalPixelType *,
@@ -115,7 +115,7 @@ public:
                             const RegionType & region)
   {
     this->Initialize(radius, ptr, region);
-    for ( unsigned int i = 0; i < Dimension; i++ )
+    for ( DimensionValueType i = 0; i < Dimension; i++ )
               { m_InBounds[i] = false; }
     this->ResetBoundaryCondition();
     m_NeighborhoodAccessorFunctor = ptr->GetNeighborhoodAccessor();
@@ -130,7 +130,7 @@ public:
 
   /** Computes the internal, N-d offset of a pixel array position n from
    * (0,0, ..., 0) in the "upper-left" corner of the neighborhood. */
-  OffsetType ComputeInternalIndex(NeighborIndexType n) const;
+  OffsetType ComputeInternalIndex(const NeighborIndexType n) const;
 
   /** Returns the array of upper loop bounds used during iteration. */
   IndexType GetBound() const
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx
index a89a84b..3d63f26 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx
@@ -146,7 +146,7 @@ ConstNeighborhoodIterator< TImage, TBoundaryCondition >
 template< typename TImage, typename TBoundaryCondition >
 typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::OffsetType
 ConstNeighborhoodIterator< TImage, TBoundaryCondition >
-::ComputeInternalIndex(NeighborIndexType n) const
+::ComputeInternalIndex(const NeighborIndexType n) const
 {
   OffsetType    ans;
   long          D = (long)Dimension;
@@ -166,9 +166,9 @@ typename ConstNeighborhoodIterator< TImage, TBoundaryCondition >::RegionType
 ConstNeighborhoodIterator< TImage, TBoundaryCondition >
 ::GetBoundingBoxAsImageRegion() const
 {
+  const IndexValueType zero = NumericTraits< IndexValueType >::Zero;
   RegionType ans;
 
-  IndexValueType zero = NumericTraits< IndexValueType >::Zero;
   ans.SetIndex( this->GetIndex(zero) );
   ans.SetSize( this->GetSize() );
 
@@ -177,17 +177,19 @@ ConstNeighborhoodIterator< TImage, TBoundaryCondition >
 
 template< typename TImage, typename TBoundaryCondition >
 ConstNeighborhoodIterator< TImage, TBoundaryCondition >
-::ConstNeighborhoodIterator()
+::ConstNeighborhoodIterator() :
+  m_IsInBounds(false),
+  m_IsInBoundsValid(false),
+  m_NeedToUseBoundaryCondition(false)
 {
   IndexType zeroIndex; zeroIndex.Fill(0);
-
   SizeType zeroSize; zeroSize.Fill(0);
 
   m_Bound.Fill(0);
-  m_Begin = 0;
+  m_Begin = ITK_NULLPTR;
   m_BeginIndex.Fill(0);
-  // m_ConstImage
-  m_End   = 0;
+
+  m_End   = ITK_NULLPTR;
   m_EndIndex.Fill(0);
   m_Loop.Fill(0);
   m_Region.SetIndex(zeroIndex);
@@ -202,9 +204,6 @@ ConstNeighborhoodIterator< TImage, TBoundaryCondition >
 
   this->ResetBoundaryCondition();
 
-  m_IsInBounds = false;
-  m_IsInBoundsValid = false;
-
   m_BoundaryCondition = &m_InternalBoundaryCondition;
 }
 
@@ -411,8 +410,9 @@ ConstNeighborhoodIterator< TImage, TBoundaryCondition >
   m_NeedToUseBoundaryCondition = false;
   for ( DimensionValueType i = 0; i < Dimension; ++i )
     {
-    OffsetValueType overlapLow = static_cast< OffsetValueType >( ( rStart[i] - static_cast<OffsetValueType>( this->GetRadius(i) ) ) - bStart[i] );
-    OffsetValueType overlapHigh = static_cast< OffsetValueType >( ( bStart[i] + bSize[i] )
+    const OffsetValueType overlapLow = static_cast< OffsetValueType >( ( rStart[i]
+                                       - static_cast<OffsetValueType>( this->GetRadius(i) ) ) - bStart[i] );
+    const OffsetValueType overlapHigh = static_cast< OffsetValueType >( ( bStart[i] + bSize[i] )
                                        - ( rStart[i] + rSize[i] + static_cast<OffsetValueType>( this->GetRadius(i) ) ) );
 
     if ( overlapLow < 0 ) // out of bounds condition, define a region of
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx b/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx
index 54dbd1a..05beba9 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx
@@ -162,6 +162,7 @@ ConstNeighborhoodIteratorWithOnlyIndex< TImage >
 
   m_IsInBounds = false;
   m_IsInBoundsValid = false;
+  m_NeedToUseBoundaryCondition = false;
 }
 
 template< typename TImage >
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h b/Utilities/ITK/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h
index 2633872..b510022 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h
@@ -117,7 +117,7 @@ public:
 
   /** Const Interator */
   struct ConstIterator {
-    ConstIterator() { m_NeighborhoodIterator = 0; }
+    ConstIterator() { m_NeighborhoodIterator = ITK_NULLPTR; }
     ConstIterator(Self *s)
     {
       m_NeighborhoodIterator = s;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkCovariantVector.h b/Utilities/ITK/Modules/Core/Common/include/itkCovariantVector.h
index 5aac44b..ee34075 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkCovariantVector.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkCovariantVector.h
@@ -243,7 +243,7 @@ inline
 CovariantVector< T, NVectorDimension >
 operator*(const T & scalar, const CovariantVector< T, NVectorDimension > & v)
 {
-  return v * scalar;
+  return v.operator*(scalar);
 }
 
 /** Performs the scalar product of a covariant with a contravariant.
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkCovariantVector.hxx b/Utilities/ITK/Modules/Core/Common/include/itkCovariantVector.hxx
index 7e8ee48..3d143ed 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkCovariantVector.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkCovariantVector.hxx
@@ -194,7 +194,7 @@ typename CovariantVector< T, NVectorDimension >::RealValueType
 CovariantVector< T, NVectorDimension >
 ::GetNorm(void) const
 {
-  return vcl_sqrt( this->GetSquaredNorm() );
+  return std::sqrt( this->GetSquaredNorm() );
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkCreateObjectFunction.h b/Utilities/ITK/Modules/Core/Common/include/itkCreateObjectFunction.h
index a5d8c91..ca4c2fb 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkCreateObjectFunction.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkCreateObjectFunction.h
@@ -67,7 +67,7 @@ public:
 
   /** Methods from itk:LightObject. */
   itkFactorylessNewMacro(Self);
-  LightObject::Pointer CreateObject() { return T::New().GetPointer(); }
+  virtual LightObject::Pointer CreateObject() ITK_OVERRIDE { return T::New().GetPointer(); }
 
 protected:
   CreateObjectFunction() {}
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkDataObject.h b/Utilities/ITK/Modules/Core/Common/include/itkDataObject.h
index 5ec0b55..bbed8ff 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkDataObject.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkDataObject.h
@@ -124,7 +124,7 @@ protected:
    * specific exception subtypes.  The default is to print out the
    * location where the exception was first thrown and any description
    * provided by the ``thrower''.   */
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 };
 
 /*----------------------------Data Object--------------------------------*/
@@ -481,7 +481,7 @@ public:
 protected:
   DataObject();
   ~DataObject();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Propagate a call to ResetPipeline(). Called only from ProcessObject. */
   virtual void PropagateResetPipeline();
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkDataObjectDecorator.h b/Utilities/ITK/Modules/Core/Common/include/itkDataObjectDecorator.h
index 779154f..f75b7af 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkDataObjectDecorator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkDataObjectDecorator.h
@@ -74,6 +74,7 @@ public:
 
   /** Typedef for the component type (object being decorated) */
   typedef T                        ComponentType;
+  typedef typename T::Pointer      ComponentPointer;
   typedef typename T::ConstPointer ComponentConstPointer;
 
   /** Method for creation through the object factory. */
@@ -83,15 +84,49 @@ public:
   itkTypeMacro(DataObjectDecorator, DataObject);
 
   /** Set the contained object */
-  virtual void Set(const T *val);
+  virtual void Set( const ComponentType *val);
 
   /** Get the contained object */
-  virtual const T * Get() const;
+  virtual const ComponentType * Get() const;
+  virtual ComponentType * GetModifiable();
+
+  /** The most recent MTime of this object and the held component */
+  virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE;
+
+  /** Restore the data object to its initial state. This means
+   *  releasing the help component.
+   */
+  virtual void Initialize() ITK_OVERRIDE;
+
+  /** \brief Graft the content of one decorator onto another
+   *
+   * The DataObject is dynamically_cast to this type, if successful
+   * then the component pointer is copies to that both decorators
+   * refer to the same object.
+   */
+  virtual void Graft( const DataObject * ) ITK_OVERRIDE;
+  void Graft( const Self * decorator );
+
+  /** Method to aid in dynamic Graft of polymorphic types.
+   *
+   * To this method by default a raw pointer must be used or explicit
+   * template parameter must be provided.
+   */
+  template <typename TOther>
+  void Graft( const DataObjectDecorator<TOther> * decorator )
+    {
+      ComponentType *component = const_cast< ComponentType * >( dynamic_cast< const ComponentType * >( decorator->Get() ) );
+      if ( !component  )
+        {
+        return;
+        }
+      this->Set( component );
+    }
 
 protected:
   DataObjectDecorator();
   ~DataObjectDecorator();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 protected:
 
@@ -99,7 +134,7 @@ private:
   DataObjectDecorator(const Self &); //purposely not implemented
   void operator=(const Self &);      //purposely not implemented
 
-  ComponentConstPointer m_Component;
+  ComponentPointer m_Component;
 };
 } // end namespace itk
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkDataObjectDecorator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkDataObjectDecorator.hxx
index d947bf9..bd78613 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkDataObjectDecorator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkDataObjectDecorator.hxx
@@ -29,6 +29,7 @@
 #define __itkDataObjectDecorator_hxx
 
 #include "itkDataObjectDecorator.h"
+#include <algorithm>
 
 namespace itk
 {
@@ -37,7 +38,7 @@ namespace itk
  */
 template< typename T >
 DataObjectDecorator< T >
-::DataObjectDecorator():m_Component()
+::DataObjectDecorator()
 {}
 
 /**
@@ -54,11 +55,11 @@ DataObjectDecorator< T >
 template< typename T >
 void
 DataObjectDecorator< T >
-::Set(const T *val)
+::Set( const ComponentType *val)
 {
   if ( m_Component != val )
     {
-    m_Component = val;
+    m_Component = const_cast<ComponentType*>(val);
     this->Modified();
     }
 }
@@ -71,7 +72,84 @@ const T *
 DataObjectDecorator< T >
 ::Get() const
 {
-  return m_Component;
+  return m_Component.GetPointer();
+}
+
+/**
+ *
+ */
+template< typename T >
+T *
+DataObjectDecorator< T >
+::GetModifiable()
+{
+  return m_Component.GetPointer();
+}
+
+/**
+ *
+ */
+template< typename T >
+ModifiedTimeType
+DataObjectDecorator< T >
+::GetMTime() const
+{
+  const ModifiedTimeType t = Superclass::GetMTime();
+  if (m_Component.IsNotNull())
+    {
+    return std::max(t, m_Component->GetMTime());
+    }
+  return t;
+}
+
+/**
+ *
+ */
+template< typename T >
+void
+DataObjectDecorator< T >
+::Initialize()
+{
+  Superclass::Initialize();
+
+  // make sure the MTime does not change
+  if ( m_Component.IsNull())
+    {
+    return;
+    }
+  if ( m_Component->GetMTime() > Superclass::GetMTime() )
+    {
+    this->SetTimeStamp(m_Component->GetTimeStamp());
+    }
+  m_Component = ITK_NULLPTR;
+}
+
+/**
+ *
+ */
+template< typename T >
+void
+DataObjectDecorator< T >
+::Graft( const DataObject *data )
+{
+  const Self *decorator = dynamic_cast< const Self * >( data );
+  this->Graft(decorator);
+}
+
+/**
+ *
+ */
+template< typename T >
+void
+DataObjectDecorator< T >
+::Graft( const Self *data )
+{
+  if ( !data )
+    {
+    return;
+    }
+
+  this->Set(data->m_Component);
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h b/Utilities/ITK/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h
index ecc85c4..d3c37c8 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkDefaultVectorPixelAccessorFunctor.h
@@ -76,6 +76,9 @@ public:
     return image->GetVectorLength();
   }
 
+
+  DefaultVectorPixelAccessorFunctor () : m_Begin(ITK_NULLPTR) {}
+
   /** Set the PixelAccessor. This is set at construction time by the image iterators.
    * The type PixelAccessorType is obtained from the ImageType over which the iterators
    * are templated.
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkDiffusionTensor3D.hxx b/Utilities/ITK/Modules/Core/Common/include/itkDiffusionTensor3D.hxx
index 5dabb61..65bd6b9 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkDiffusionTensor3D.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkDiffusionTensor3D.hxx
@@ -127,7 +127,7 @@ DiffusionTensor3D< T >
 ::GetFractionalAnisotropy() const
 {
   // Computed as
-  // FA = vcl_sqrt(1.5*sum(sum(N.*N))/sum((sum(D.*D))))
+  // FA = std::sqrt(1.5*sum(sum(N.*N))/sum((sum(D.*D))))
   // where N = D - ((1/3)*trace(D)*eye(3,3))
   // equation (28) in
   // http://lmi.bwh.harvard.edu/papers/pdfs/2002/westinMEDIA02.pdf
@@ -138,7 +138,7 @@ DiffusionTensor3D< T >
     const RealValueType trace = this->GetTrace();
     const RealValueType anisotropy = 3.0 * isp - trace * trace;
     // sometimes anisotropy has been reported to be a small negative
-    // number, and then vcl_sqrt returns NaN.  If it is a small
+    // number, and then std::sqrt returns NaN.  If it is a small
     // negative number, the obvious thing is to round to zero. If
     // it is a larger negative number, I'm not sure what the proper
     // result would be.  In either case, returning zero makes as much
@@ -146,7 +146,7 @@ DiffusionTensor3D< T >
     if(anisotropy > 0.0)
       {
       const RealValueType fractionalAnisotropy =
-        static_cast< RealValueType >( vcl_sqrt( anisotropy / ( 2.0 * isp ) ) );
+        static_cast< RealValueType >( std::sqrt( anisotropy / ( 2.0 * isp ) ) );
       return fractionalAnisotropy;
       }
     }
@@ -180,10 +180,10 @@ DiffusionTensor3D< T >
     }
 
   const RealValueType relativeAnisotropySquared =
-    static_cast< RealValueType >( anisotropy / ( vcl_sqrt(3.0) * trace ) );
+    static_cast< RealValueType >( anisotropy / ( std::sqrt(3.0) * trace ) );
 
   const RealValueType relativeAnisotropy =
-    static_cast< RealValueType >( vcl_sqrt(relativeAnisotropySquared) );
+    static_cast< RealValueType >( std::sqrt(relativeAnisotropySquared) );
 
   return relativeAnisotropy;
 }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkDirectory.h b/Utilities/ITK/Modules/Core/Common/include/itkDirectory.h
index ec463de..f47f602 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkDirectory.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkDirectory.h
@@ -66,7 +66,7 @@ public:
 protected:
   Directory();
   ~Directory();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   Directory(const Self &);      //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkDomainThreader.hxx b/Utilities/ITK/Modules/Core/Common/include/itkDomainThreader.hxx
index ab35315..fef3af8 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkDomainThreader.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkDomainThreader.hxx
@@ -30,7 +30,7 @@ DomainThreader< TDomainPartitioner, TAssociate >
   this->m_DomainPartitioner   = DomainPartitionerType::New();
   this->m_MultiThreader       = MultiThreader::New();
   this->m_NumberOfThreadsUsed = 0;
-  this->m_Associate           = NULL;
+  this->m_Associate           = ITK_NULLPTR;
 }
 
 template< typename TDomainPartitioner, typename TAssociate >
@@ -149,7 +149,7 @@ DomainThreader< TDomainPartitioner, TAssociate >
                                             subdomain);
 
   // Execute the actual method with appropriate sub-domain.
-  // If the threadID is greater than the total number of regions
+  // If the threadId is greater than the total number of regions
   // that PartitionDomain will create, don't use this thread.
   // Sometimes the threads dont break up very well and it is just
   // as efficient to leave a few threads idle.
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx b/Utilities/ITK/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx
index dde7903..778e407 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx
@@ -27,7 +27,7 @@ template< unsigned int VDimension, typename TInput >
 EllipsoidInteriorExteriorSpatialFunction< VDimension, TInput >
 ::EllipsoidInteriorExteriorSpatialFunction()
 {
-  m_Orientations = NULL;
+  m_Orientations = ITK_NULLPTR;
   m_Axes.Fill(1.0f);   // Lengths of ellipsoid axes.
   m_Center.Fill(0.0f); // Origin of ellipsoid
 }
@@ -72,7 +72,7 @@ EllipsoidInteriorExteriorSpatialFunction< VDimension, TInput >
       {
       orientationVector[j] = m_Orientations[i][j];
       }
-    distanceSquared += vcl_pow( static_cast< double >( ( orientationVector * pointVector ) / ( .5 * m_Axes[i] ) ),
+    distanceSquared += std::pow( static_cast< double >( ( orientationVector * pointVector ) / ( .5 * m_Axes[i] ) ),
                                 static_cast< double >( 2 ) );
     }
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkEquivalencyTable.h b/Utilities/ITK/Modules/Core/Common/include/itkEquivalencyTable.h
index 083498c..86cddbb 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkEquivalencyTable.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkEquivalencyTable.h
@@ -140,7 +140,7 @@ protected:
   EquivalencyTable(const Self &); // purposely not implemented
   void operator=(const Self &);   // purposely not implemented
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   HashTableType m_HashMap;
 };
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkEventObject.h b/Utilities/ITK/Modules/Core/Common/include/itkEventObject.h
index 0a57d23..f448857 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkEventObject.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkEventObject.h
@@ -143,6 +143,7 @@ itkEventMacro(AbortEvent, AnyEvent)
 itkEventMacro(ModifiedEvent, AnyEvent)
 itkEventMacro(InitializeEvent, AnyEvent)
 itkEventMacro(IterationEvent, AnyEvent)
+itkEventMacro(MultiResolutionIterationEvent,IterationEvent)
 itkEventMacro(PickEvent, AnyEvent)
 itkEventMacro(StartPickEvent, PickEvent)
 itkEventMacro(EndPickEvent, PickEvent)
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkExceptionObject.h b/Utilities/ITK/Modules/Core/Common/include/itkExceptionObject.h
index abae28f..2765bee 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkExceptionObject.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkExceptionObject.h
@@ -104,8 +104,7 @@ public:
   virtual unsigned int GetLine() const;
 
   /** Provide std::exception::what() implementation. */
-  virtual const char * what() const
-  throw( );
+  virtual const char * what() const throw( ) ITK_OVERRIDE;
 
 private:
   /** \class ReferenceCounterInterface
@@ -165,7 +164,7 @@ inline std::ostream & operator<<(std::ostream & os, ExceptionObject & e)
  * \ingroup ITKSystemObjects
  * \ingroup ITKCommon
  */
-class MemoryAllocationError:public ExceptionObject
+class ITKCommon_EXPORT MemoryAllocationError:public ExceptionObject
 {
 public:
   /** Default constructor.  Needed to ensure the exception object can be
@@ -185,10 +184,9 @@ public:
                         const std::string & loc):ExceptionObject(file, lineNumber, desc, loc) {}
 
   /** Virtual destructor needed for subclasses. Has to have empty throw(). */
-  virtual ~MemoryAllocationError()
-  throw( ) {}
+  virtual ~MemoryAllocationError() throw( );
 
-  virtual const char * GetNameOfClass() const
+  virtual const char * GetNameOfClass() const ITK_OVERRIDE
   { return "MemoryAllocationError"; }
 };
 
@@ -197,7 +195,7 @@ public:
  * \ingroup ITKSystemObjects
  * \ingroup ITKCommon
  */
-class RangeError:public ExceptionObject
+class ITKCommon_EXPORT RangeError:public ExceptionObject
 {
 public:
   /** Default constructor.  Needed to ensure the exception object can be
@@ -211,10 +209,9 @@ public:
   RangeError(const std::string & file, unsigned int lineNumber):ExceptionObject(file, lineNumber) {}
 
   /** Virtual destructor needed for subclasses. Has to have empty throw(). */
-  virtual ~RangeError()
-  throw( ) {}
+  virtual ~RangeError() throw( );
 
-  virtual const char * GetNameOfClass() const
+  virtual const char * GetNameOfClass() const ITK_OVERRIDE
   { return "RangeError"; }
 };
 
@@ -224,7 +221,7 @@ public:
  * \ingroup ITKSystemObjects
  * \ingroup ITKCommon
  */
-class InvalidArgumentError:public ExceptionObject
+class ITKCommon_EXPORT InvalidArgumentError:public ExceptionObject
 {
 public:
   /**
@@ -244,10 +241,9 @@ public:
   InvalidArgumentError(const std::string & file, unsigned int lineNumber):ExceptionObject(file, lineNumber) {}
 
   /** Virtual destructor needed for subclasses. Has to have empty throw(). */
-  virtual ~InvalidArgumentError()
-  throw( ) {}
+  virtual ~InvalidArgumentError() throw( );
 
-  virtual const char * GetNameOfClass() const
+  virtual const char * GetNameOfClass() const ITK_OVERRIDE
   { return "InvalidArgumentError"; }
 };
 
@@ -256,7 +252,7 @@ public:
  * \ingroup ITKSystemObjects
  * \ingroup ITKCommon
  */
-class IncompatibleOperandsError:public ExceptionObject
+class ITKCommon_EXPORT IncompatibleOperandsError:public ExceptionObject
 {
 public:
   /** Default constructor.  Needed to ensure the exception object can be
@@ -270,10 +266,9 @@ public:
   IncompatibleOperandsError(const std::string & file, unsigned int lineNumber):ExceptionObject(file, lineNumber) {}
 
   /** Virtual destructor needed for subclasses. Has to have empty throw(). */
-  virtual ~IncompatibleOperandsError()
-  throw( ) {}
+  virtual ~IncompatibleOperandsError() throw( );
 
-  virtual const char * GetNameOfClass() const
+  virtual const char * GetNameOfClass() const ITK_OVERRIDE
   { return "IncompatibleOperandsError"; }
 };
 
@@ -282,7 +277,7 @@ public:
  * \ingroup ITKSystemObjects
  * \ingroup ITKCommon
  */
-class ProcessAborted:public ExceptionObject
+class ITKCommon_EXPORT ProcessAborted:public ExceptionObject
 {
 public:
   /** Default constructor.  Needed to ensure the exception object can be
@@ -305,10 +300,9 @@ public:
   }
 
   /** Virtual destructor needed for subclasses. Has to have empty throw(). */
-  virtual ~ProcessAborted()
-  throw( ) {}
+  virtual ~ProcessAborted()  throw( );
 
-  virtual const char * GetNameOfClass() const
+  virtual const char * GetNameOfClass() const ITK_OVERRIDE
   { return "ProcessAborted"; }
 };
 } // end namespace itk
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkFastMutexLock.h b/Utilities/ITK/Modules/Core/Common/include/itkFastMutexLock.h
index 14a623b..cf3c8c2 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkFastMutexLock.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkFastMutexLock.h
@@ -82,7 +82,7 @@ protected:
   ~FastMutexLock() {}
 
   SimpleFastMutexLock m_SimpleFastMutexLock;
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   FastMutexLock(const Self &);  //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkFileOutputWindow.h b/Utilities/ITK/Modules/Core/Common/include/itkFileOutputWindow.h
index e033d0b..8d6c278 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkFileOutputWindow.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkFileOutputWindow.h
@@ -51,7 +51,7 @@ public:
   itkTypeMacro(FileOutputWindow, OutputWindow);
 
   /** Send a string to display. */
-  virtual void DisplayText(const char *);
+  virtual void DisplayText(const char *) ITK_OVERRIDE;
 
   /** Set the filename for the log file */
   itkSetStringMacro(FileName);
@@ -75,7 +75,7 @@ public:
 protected:
   FileOutputWindow();
   virtual ~FileOutputWindow();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   void Initialize();
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx b/Utilities/ITK/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx
index 33339f6..8db72b6 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx
@@ -29,7 +29,7 @@ FiniteCylinderSpatialFunction< VDimension, TInput >
 {
   // a normalized {1,1,...1} vector is
   // { 1.0 / sqrt( VDmim ), ... }
-  const double orientationVal = 1.0 / vcl_sqrt(static_cast<double>(VDimension));
+  const double orientationVal = 1.0 / std::sqrt(static_cast<double>(VDimension));
   m_Orientation.Fill(orientationVal);
   m_NormalizedOrientation.Fill(orientationVal);
   m_AxisLength = 1.0f; // Length of cylinder axis.
@@ -59,7 +59,7 @@ FiniteCylinderSpatialFunction< VDimension, TInput >
       {
       norm += this->m_Orientation[i] * this->m_Orientation[i];
       }
-    norm = vcl_sqrt(norm);
+    norm = std::sqrt(norm);
     if(norm == 0.0) // avoid divide by zero
       {
       itkExceptionMacro(<< "Degenerate orientation vector " << this->m_Orientation);
@@ -97,8 +97,8 @@ FiniteCylinderSpatialFunction< VDimension, TInput >
   //the point is within the length of the cylinder along the medial axis
   const double distanceFromCenter = dot_product( medialAxisVector.GetVnlVector(), pointVector.GetVnlVector() );
 
-  if ( vcl_fabs(distanceFromCenter) <= ( halfAxisLength )
-       && m_Radius >= vcl_sqrt( vcl_pow(pointVector.GetVnlVector().magnitude(), 2.0) - vcl_pow(distanceFromCenter, 2.0) ) )
+  if ( std::fabs(distanceFromCenter) <= ( halfAxisLength )
+       && m_Radius >= std::sqrt( std::pow(pointVector.GetVnlVector().magnitude(), 2.0) - std::pow(distanceFromCenter, 2.0) ) )
     {
     return 1;
     }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkFixedArray.h b/Utilities/ITK/Modules/Core/Common/include/itkFixedArray.h
index e11a2d7..5b32543 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkFixedArray.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkFixedArray.h
@@ -31,7 +31,7 @@ namespace itk
  * assigned to one another, and size information is known for function
  * returns.
  *
- * \tparam TValueType Element type stored at each location in the array.
+ * \tparam TValue Element type stored at each location in the array.
  * \tparam VLength    = Length of the array.
  *
  * The length of the array is fixed at compile time. If you wish to
@@ -46,7 +46,7 @@ namespace itk
  * \wikiexample{Utilities/FixedArray,C-style array}
  * \endwiki
  */
-template< typename TValueType, unsigned int VLength = 3 >
+template< typename TValue, unsigned int VLength = 3 >
 class FixedArray
 {
 public:
@@ -57,7 +57,7 @@ public:
   itkStaticConstMacro(Dimension, unsigned int, VLength);
 
   /** The element type stored at each location in the FixedArray. */
-  typedef TValueType ValueType;
+  typedef TValue ValueType;
 
   /** A type representing the C-array version of this FixedArray. */
   typedef ValueType CArray[VLength];
@@ -142,7 +142,7 @@ public:
     Iterator i = this->Begin();
     while ( i != this->End() )
       {
-      *i++ = static_cast< TValueType >( *input++ );
+      *i++ = static_cast< TValue >( *input++ );
       }
   }
 
@@ -169,13 +169,13 @@ public:
   template< typename TFixedArrayValueType >
   FixedArray & operator=(const FixedArray< TFixedArrayValueType, VLength > & r)
   {
-    if ( (void *)r.Begin() != (void *)m_InternalArray )
+    if ( (const void *)r.Begin() != (const void *)m_InternalArray )
       {
       typename FixedArray< TFixedArrayValueType, VLength >::ConstIterator input = r.Begin();
       Iterator i = this->Begin();
       while ( i != this->End() )
         {
-        *i++ = static_cast< TValueType >( *input++ );
+        *i++ = static_cast< TValue >( *input++ );
         }
       }
     return *this;
@@ -200,8 +200,20 @@ public:
   const_reference operator[](unsigned short index) const { return m_InternalArray[index]; }
   reference operator[](int index)                  { return m_InternalArray[index]; }
   const_reference operator[](int index) const { return m_InternalArray[index]; }
+// false positive warnings with GCC 4.9
+#if defined( __GNUC__ )
+#if ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ == 9 )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+#endif
   reference operator[](unsigned int index)         { return m_InternalArray[index]; }
   const_reference operator[](unsigned int index) const { return m_InternalArray[index]; }
+#if defined( __GNUC__ )
+#if ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ == 9 )
+#pragma GCC diagnostic pop
+#endif
+#endif
   reference operator[](long index)                 { return m_InternalArray[index]; }
   const_reference operator[](long index) const { return m_InternalArray[index]; }
   reference operator[](unsigned long index)        { return m_InternalArray[index]; }
@@ -257,8 +269,8 @@ public:
   static FixedArray Filled(const ValueType &);
 };
 
-template< typename TValueType, unsigned int VLength >
-std::ostream & operator<<(std::ostream & os, const FixedArray< TValueType, VLength > & arr);
+template< typename TValue, unsigned int VLength >
+std::ostream & operator<<(std::ostream & os, const FixedArray< TValue, VLength > & arr);
 } // namespace itk
 
 #ifndef ITK_MANUAL_INSTANTIATION
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkFixedArray.hxx b/Utilities/ITK/Modules/Core/Common/include/itkFixedArray.hxx
index 0af8d54..764ca94 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkFixedArray.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkFixedArray.hxx
@@ -26,16 +26,16 @@ namespace itk
  * Default constructor uses compiler's default initialization of memory.
  * For efficiency, no initialization to zero is done.
  */
-template< typename TValueType, unsigned int VLength >
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+FixedArray< TValue, VLength >
 ::FixedArray()
 {}
 
 /**
  * Constructor to initialize entire array to one value.
  */
-template< typename TValueType, unsigned int VLength >
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+FixedArray< TValue, VLength >
 ::FixedArray(const ValueType & r)
 {
   for ( Iterator i = Begin(); i != End(); ++i )
@@ -49,8 +49,8 @@ FixedArray< TValueType, VLength >
  * Values are copied individually instead of with a binary copy.  This
  * allows the ValueType's assignment operator to be executed.
  */
-template< typename TValueType, unsigned int VLength >
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+FixedArray< TValue, VLength >
 ::FixedArray(const ValueType r[VLength])
 {
   ConstIterator input = r;
@@ -67,9 +67,9 @@ FixedArray< TValueType, VLength >
  * Values are copied individually instead of with a binary copy.  This
  * allows the ValueType's assignment operator to be executed.
  */
-template< typename TValueType, unsigned int VLength >
-FixedArray< TValueType, VLength > &
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+FixedArray< TValue, VLength > &
+FixedArray< TValue, VLength >
 ::operator=(const ValueType r[VLength])
 {
   if ( r != m_InternalArray )
@@ -87,9 +87,9 @@ FixedArray< TValueType, VLength >
 /**
  * Operator != compares different types of arrays.
  */
-template< typename TValueType, unsigned int VLength >
+template< typename TValue, unsigned int VLength >
 bool
-FixedArray< TValueType, VLength >
+FixedArray< TValue, VLength >
 ::operator==(const FixedArray & r) const
 {
   ConstIterator i = this->Begin();
@@ -111,9 +111,9 @@ FixedArray< TValueType, VLength >
 /**
  * Get an Iterator for the beginning of the FixedArray.
  */
-template< typename TValueType, unsigned int VLength >
-typename FixedArray< TValueType, VLength >::Iterator
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+typename FixedArray< TValue, VLength >::Iterator
+FixedArray< TValue, VLength >
 ::Begin()
 {
   return Iterator(m_InternalArray);
@@ -122,9 +122,9 @@ FixedArray< TValueType, VLength >
 /**
  * Get a ConstIterator for the beginning of the FixedArray.
  */
-template< typename TValueType, unsigned int VLength >
-typename FixedArray< TValueType, VLength >::ConstIterator
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+typename FixedArray< TValue, VLength >::ConstIterator
+FixedArray< TValue, VLength >
 ::Begin() const
 {
   return ConstIterator(m_InternalArray);
@@ -133,9 +133,9 @@ FixedArray< TValueType, VLength >
 /**
  * Get an Iterator for the end of the FixedArray.
  */
-template< typename TValueType, unsigned int VLength >
-typename FixedArray< TValueType, VLength >::Iterator
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+typename FixedArray< TValue, VLength >::Iterator
+FixedArray< TValue, VLength >
 ::End()
 {
   return Iterator(m_InternalArray + VLength);
@@ -144,9 +144,9 @@ FixedArray< TValueType, VLength >
 /**
  * Get a ConstIterator for the end of the FixedArray.
  */
-template< typename TValueType, unsigned int VLength >
-typename FixedArray< TValueType, VLength >::ConstIterator
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+typename FixedArray< TValue, VLength >::ConstIterator
+FixedArray< TValue, VLength >
 ::End() const
 {
   return ConstIterator(m_InternalArray + VLength);
@@ -155,9 +155,9 @@ FixedArray< TValueType, VLength >
 /**
  * Get a begin ReverseIterator.
  */
-template< typename TValueType, unsigned int VLength >
-typename FixedArray< TValueType, VLength >::ReverseIterator
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+typename FixedArray< TValue, VLength >::ReverseIterator
+FixedArray< TValue, VLength >
 ::rBegin()
 {
   return ReverseIterator(m_InternalArray + VLength);
@@ -166,9 +166,9 @@ FixedArray< TValueType, VLength >
 /**
  * Get a begin ConstReverseIterator.
  */
-template< typename TValueType, unsigned int VLength >
-typename FixedArray< TValueType, VLength >::ConstReverseIterator
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+typename FixedArray< TValue, VLength >::ConstReverseIterator
+FixedArray< TValue, VLength >
 ::rBegin() const
 {
   return ConstReverseIterator(m_InternalArray + VLength);
@@ -177,9 +177,9 @@ FixedArray< TValueType, VLength >
 /**
  * Get an end ReverseIterator.
  */
-template< typename TValueType, unsigned int VLength >
-typename FixedArray< TValueType, VLength >::ReverseIterator
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+typename FixedArray< TValue, VLength >::ReverseIterator
+FixedArray< TValue, VLength >
 ::rEnd()
 {
   return ReverseIterator(m_InternalArray);
@@ -188,9 +188,9 @@ FixedArray< TValueType, VLength >
 /**
  * Get an end ConstReverseIterator.
  */
-template< typename TValueType, unsigned int VLength >
-typename FixedArray< TValueType, VLength >::ConstReverseIterator
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+typename FixedArray< TValue, VLength >::ConstReverseIterator
+FixedArray< TValue, VLength >
 ::rEnd() const
 {
   return ConstReverseIterator(m_InternalArray);
@@ -199,9 +199,9 @@ FixedArray< TValueType, VLength >
 /**
  * Get the size of the FixedArray.
  */
-template< typename TValueType, unsigned int VLength >
-typename FixedArray< TValueType, VLength >::SizeType
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+typename FixedArray< TValue, VLength >::SizeType
+FixedArray< TValue, VLength >
 ::Size() const
 {
   return VLength;
@@ -210,9 +210,9 @@ FixedArray< TValueType, VLength >
 /**
  * Fill all elements of the array with the given value.
  */
-template< typename TValueType, unsigned int VLength >
+template< typename TValue, unsigned int VLength >
 void
-FixedArray< TValueType, VLength >
+FixedArray< TValue, VLength >
 ::Fill(const ValueType & value)
 {
   Iterator i = this->Begin();
@@ -226,9 +226,9 @@ FixedArray< TValueType, VLength >
 /**
  * Return an FixedArray with all elements assigned to the given value.
  */
-template< typename TValueType, unsigned int VLength >
-FixedArray< TValueType, VLength >
-FixedArray< TValueType, VLength >
+template< typename TValue, unsigned int VLength >
+FixedArray< TValue, VLength >
+FixedArray< TValue, VLength >
 ::Filled(const ValueType & value)
 {
   FixedArray< ValueType, VLength > array;
@@ -236,8 +236,8 @@ FixedArray< TValueType, VLength >
   return array;
 }
 
-template< typename TValueType, unsigned int VLength >
-std::ostream & operator<<(std::ostream & os, const FixedArray< TValueType, VLength > & arr)
+template< typename TValue, unsigned int VLength >
+std::ostream & operator<<(std::ostream & os, const FixedArray< TValue, VLength > & arr)
 {
   os << "[";
   if ( VLength == 1 )
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx
index c7d7910..3235740 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx
@@ -65,6 +65,7 @@ FloodFilledFunctionConditionalConstIterator< TImage, TFunction >
 
   // Set up the temporary image
   this->InitializeIterator();
+
 }
 
 template< typename TImage, typename TFunction >
@@ -72,6 +73,9 @@ void
 FloodFilledFunctionConditionalConstIterator< TImage, TFunction >
 ::InitializeIterator()
 {
+  m_FoundUncheckedNeighbor = false;
+  m_IsValidIndex = false;
+
   // Get the origin and spacing from the image in simple arrays
   m_ImageOrigin  = this->m_Image->GetOrigin();
   m_ImageSpacing = this->m_Image->GetSpacing();
@@ -84,8 +88,7 @@ FloodFilledFunctionConditionalConstIterator< TImage, TFunction >
   m_TemporaryPointer->SetLargestPossibleRegion(tempRegion);
   m_TemporaryPointer->SetBufferedRegion(tempRegion);
   m_TemporaryPointer->SetRequestedRegion(tempRegion);
-  m_TemporaryPointer->Allocate();
-  m_TemporaryPointer->FillBuffer(NumericTraits< typename TTempImage::PixelType >::Zero);
+  m_TemporaryPointer->Allocate(true); // initialize buffer to zero
 
   // Initialize the queue by adding the start index assuming one of
   // the m_Seeds is "inside" This might not be true, in which
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.hxx
index 6476719..91c3e7b 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkFloodFilledSpatialFunctionConditionalConstIterator.hxx
@@ -113,7 +113,7 @@ FloodFilledSpatialFunctionConditionalConstIterator< TImage, TFunction >
       unsigned int counter;
       unsigned int counterCopy;
       unsigned int dim = TImage::ImageDimension;
-      unsigned int numReps = static_cast< unsigned int >( vcl_pow(
+      unsigned int numReps = static_cast< unsigned int >( std::pow(
                                                             static_cast< double >( 2.0 ),
                                                             static_cast< double >( dim ) ) );
 
@@ -160,7 +160,7 @@ FloodFilledSpatialFunctionConditionalConstIterator< TImage, TFunction >
       unsigned int counter;
       unsigned int counterCopy;
       unsigned int dim = TImage::ImageDimension;
-      unsigned int numReps = static_cast< unsigned int >( vcl_pow(
+      unsigned int numReps = static_cast< unsigned int >( std::pow(
                                                             static_cast< double >( 2.0 ),
                                                             static_cast< double >( dim ) ) );
       IndexType tempIndex;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx b/Utilities/ITK/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx
index f2552f5..2f0eba5 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx
@@ -77,22 +77,22 @@ FrustumSpatialFunction< VImageDimension, TInput >
     const double dy = relativePosition[1];
     const double dz = relativePosition[2];
 
-    const double distanceXZ = vcl_sqrt(dx * dx + dz * dz);
+    const double distanceXZ = std::sqrt(dx * dx + dz * dz);
 
-    const double deg2rad = vcl_atan(1.0f) / 45.0;
+    const double deg2rad = std::atan(1.0f) / 45.0;
 
     //  Check planes along Y
-    const double angleY = vcl_atan2(dy, distanceXZ);
-    if ( vcl_fabs(angleY) > m_ApertureAngleY * deg2rad )
+    const double angleY = std::atan2(dy, distanceXZ);
+    if ( std::fabs(angleY) > m_ApertureAngleY * deg2rad )
       {
       return 0;
       }
 
     //  Check planes along X
-    const double angleX = vcl_atan2(dx, dz);
+    const double angleX = std::atan2(dx, dz);
 
-    if ( vcl_cos(angleX  + ( 180.0 + m_AngleZ ) * deg2rad)  <
-         vcl_cos(deg2rad * m_ApertureAngleX) )
+    if ( std::cos(angleX  + ( 180.0 + m_AngleZ ) * deg2rad)  <
+         std::cos(deg2rad * m_ApertureAngleX) )
       {
       return 0;
       }
@@ -105,22 +105,22 @@ FrustumSpatialFunction< VImageDimension, TInput >
     const double dy = relativePosition[1];
     const double dz = relativePosition[2];
 
-    const double distanceYZ = vcl_sqrt(dy * dy + dz * dz);
+    const double distanceYZ = std::sqrt(dy * dy + dz * dz);
 
-    const double deg2rad = vcl_atan(1.0f) / 45.0;
+    const double deg2rad = std::atan(1.0f) / 45.0;
 
     //  Check planes along X
-    const double angleX = vcl_atan2(dx, distanceYZ);
-    if ( vcl_fabs(angleX) > m_ApertureAngleX * deg2rad )
+    const double angleX = std::atan2(dx, distanceYZ);
+    if ( std::fabs(angleX) > m_ApertureAngleX * deg2rad )
       {
       return 0;
       }
 
     //  Check planes along Y
-    const double angleY = vcl_atan2(dy, dz);
+    const double angleY = std::atan2(dy, dz);
 
-    if ( vcl_cos(angleY  + ( 180.0 + m_AngleZ ) * deg2rad)  <
-         vcl_cos(deg2rad * m_ApertureAngleY) )
+    if ( std::cos(angleY  + ( 180.0 + m_AngleZ ) * deg2rad)  <
+         std::cos(deg2rad * m_ApertureAngleY) )
       {
       return 0;
       }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.hxx b/Utilities/ITK/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.hxx
index 4965d08..70d2e81 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.hxx
@@ -59,7 +59,7 @@ GaussianDerivativeSpatialFunction< TOutput, VImageDimension, TInput >
       prefixDenom *= m_Sigma[i];
       }
 
-    prefixDenom *= 2 * vcl_pow(2 * vnl_math::pi, VImageDimension / 2.0);
+    prefixDenom *= 2 * std::pow(2 * vnl_math::pi, VImageDimension / 2.0);
     }
   else
     {
@@ -75,7 +75,7 @@ GaussianDerivativeSpatialFunction< TOutput, VImageDimension, TInput >
                  / ( 2 * m_Sigma[m_Direction] * m_Sigma[m_Direction] );
     }
 
-  double value = -2 * ( position[m_Direction] - m_Mean[m_Direction] ) * m_Scale * ( 1 / prefixDenom ) * vcl_exp(
+  double value = -2 * ( position[m_Direction] - m_Mean[m_Direction] ) * m_Scale * ( 1 / prefixDenom ) * std::exp(
     -1 * suffixExp);
 
   return (TOutput)value;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkGaussianKernelFunction.h b/Utilities/ITK/Modules/Core/Common/include/itkGaussianKernelFunction.h
index cb1728f..a53fcd6 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkGaussianKernelFunction.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkGaussianKernelFunction.h
@@ -55,10 +55,10 @@ public:
 
   /** Evaluate the function. */
   inline TRealValueType Evaluate(const TRealValueType & u) const
-  { return ( vcl_exp( static_cast< TRealValueType >(-0.5) * vnl_math_sqr(u) ) * m_Factor ); }
+  { return ( std::exp( static_cast< TRealValueType >(-0.5) * vnl_math_sqr(u) ) * m_Factor ); }
 
 protected:
-  GaussianKernelFunction(): m_Factor(  NumericTraits< TRealValueType >::One / vcl_sqrt(static_cast< TRealValueType >(2.0 * vnl_math::pi )) ) {};
+  GaussianKernelFunction(): m_Factor(  NumericTraits< TRealValueType >::One / std::sqrt(static_cast< TRealValueType >(2.0 * vnl_math::pi )) ) {};
   virtual ~GaussianKernelFunction() {};
   void PrintSelf(std::ostream & os, Indent indent) const
   { Superclass::PrintSelf(os, indent); }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkGaussianOperator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkGaussianOperator.hxx
index f5a61cb..0339bc7 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkGaussianOperator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkGaussianOperator.hxx
@@ -35,7 +35,7 @@ GaussianOperator< TPixel, VDimension, TAllocator >
 
   typename CoefficientVector::iterator it;
 
-  const double et           = vcl_exp(-m_Variance);
+  const double et           = std::exp(-m_Variance);
   const double cap          = 1.0 - m_MaximumError;
 
   // Create the kernel coefficients as a std::vector
@@ -84,7 +84,7 @@ double
 GaussianOperator< TPixel, VDimension, TAllocator >
 ::ModifiedBesselI0(double y)
 {
-  const double d = vcl_fabs(y);
+  const double d = std::fabs(y);
   double       accumulator;
 
   if ( d < 3.75 )
@@ -98,7 +98,7 @@ GaussianOperator< TPixel, VDimension, TAllocator >
   else
     {
     const double m = 3.75 / d;
-    accumulator = ( vcl_exp(d) / vcl_sqrt(d) ) * ( 0.39894228 + m * ( 0.1328592e-1
+    accumulator = ( std::exp(d) / std::sqrt(d) ) * ( 0.39894228 + m * ( 0.1328592e-1
                                                                       + m
                                                                       * ( 0.225319e-2 + m
                                                                           * ( -0.157565e-2 + m * ( 0.916281e-2
@@ -123,7 +123,7 @@ double
 GaussianOperator< TPixel, VDimension, TAllocator >
 ::ModifiedBesselI1(double y)
 {
-  const double d = vcl_fabs(y);
+  const double d = std::fabs(y);
   double       accumulator;
 
   if ( d < 3.75 )
@@ -143,7 +143,7 @@ GaussianOperator< TPixel, VDimension, TAllocator >
     accumulator = 0.39894228 + m * ( -0.3988024e-1 + m * ( -0.362018e-2
                                                            + m * ( 0.163801e-2 + m * ( -0.1031555e-1 + m * accumulator ) ) ) );
 
-    accumulator *= ( vcl_exp(d) / vcl_sqrt(d) );
+    accumulator *= ( std::exp(d) / std::sqrt(d) );
     }
 
   if ( y < 0.0 )
@@ -179,16 +179,16 @@ GaussianOperator< TPixel, VDimension, TAllocator >
     }
   else
     {
-    toy = 2.0 / vcl_fabs(y);
+    toy = 2.0 / std::fabs(y);
     qip = accumulator = 0.0;
     qi = 1.0;
 
-    for ( j = 2 * ( n + (int)vcl_sqrt(ACCURACY * n) ); j > 0; j-- )
+    for ( j = 2 * ( n + (int)std::sqrt(ACCURACY * n) ); j > 0; j-- )
       {
       qim = qip + j * toy * qi;
       qip = qi;
       qi  = qim;
-      if ( vcl_fabs(qi) > 1.0e10 )
+      if ( std::fabs(qi) > 1.0e10 )
         {
         accumulator *= 1.0e-10;
         qi *= 1.0e-10;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkGaussianSpatialFunction.hxx b/Utilities/ITK/Modules/Core/Common/include/itkGaussianSpatialFunction.hxx
index 4f8e903..2abd853 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkGaussianSpatialFunction.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkGaussianSpatialFunction.hxx
@@ -54,7 +54,7 @@ GaussianSpatialFunction< TOutput, VImageDimension, TInput >
 
   if ( m_Normalized )
     {
-    const double squareRootOfTwoPi = vcl_sqrt(2.0 * vnl_math::pi);
+    const double squareRootOfTwoPi = std::sqrt(2.0 * vnl_math::pi);
 
     for ( unsigned int i = 0; i < VImageDimension; i++ )
       {
@@ -70,7 +70,7 @@ GaussianSpatialFunction< TOutput, VImageDimension, TInput >
                  / ( 2 * m_Sigma[i] * m_Sigma[i] );
     }
 
-  double value = m_Scale * ( 1 / prefixDenom ) * vcl_exp(-1 * suffixExp);
+  double value = m_Scale * ( 1 / prefixDenom ) * std::exp(-1 * suffixExp);
 
   return (TOutput)value;
 }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkHexahedronCell.hxx b/Utilities/ITK/Modules/Core/Common/include/itkHexahedronCell.hxx
index a0c162c..910db0f 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkHexahedronCell.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkHexahedronCell.hxx
@@ -397,7 +397,7 @@ HexahedronCell< TCellInterface >
 
     d = vnl_determinant(mat);
     //d=vtkMath::Determinant3x3(rcol,scol,tcol);
-    if ( vcl_abs(d) < 1.e-20 )
+    if ( std::abs(d) < 1.e-20 )
       {
       return false;
       }
@@ -438,17 +438,17 @@ HexahedronCell< TCellInterface >
       }
 
     //  check for convergence
-    if ( ( ( vcl_abs(pcoords[0] - params[0]) ) < ITK_HEX_CONVERGED )
-         && ( ( vcl_abs(pcoords[1] - params[1]) ) < ITK_HEX_CONVERGED )
-         && ( ( vcl_abs(pcoords[2] - params[2]) ) < ITK_HEX_CONVERGED ) )
+    if ( ( ( std::abs(pcoords[0] - params[0]) ) < ITK_HEX_CONVERGED )
+         && ( ( std::abs(pcoords[1] - params[1]) ) < ITK_HEX_CONVERGED )
+         && ( ( std::abs(pcoords[2] - params[2]) ) < ITK_HEX_CONVERGED ) )
       {
       converged = 1;
       }
 
     // Test for bad divergence (S.Hirschberg 11.12.2001)
-    else if ( ( vcl_abs(pcoords[0]) > ITK_DIVERGED )
-              || ( vcl_abs(pcoords[1]) > ITK_DIVERGED )
-              || ( vcl_abs(pcoords[2]) > ITK_DIVERGED ) )
+    else if ( ( std::abs(pcoords[0]) > ITK_DIVERGED )
+              || ( std::abs(pcoords[1]) > ITK_DIVERGED )
+              || ( std::abs(pcoords[2]) > ITK_DIVERGED ) )
       {
       return -1;
       }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImage.h b/Utilities/ITK/Modules/Core/Common/include/itkImage.h
index 071c29c..ead1380 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImage.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImage.h
@@ -169,7 +169,7 @@ public:
 
   /** Allocate the image memory. The size of the image must
    * already be set, e.g. by calling SetRegions(). */
-  void Allocate();
+  virtual void Allocate(bool initializePixels = false) ITK_OVERRIDE;
 
   /** Restore the data object to its initial state. This means releasing
    * memory. */
@@ -227,9 +227,9 @@ public:
   /** Return a pointer to the beginning of the buffer.  This is used by
    * the image iterator class. */
   virtual TPixel * GetBufferPointer()
-  { return m_Buffer ? m_Buffer->GetBufferPointer() : 0; }
+  { return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR; }
   virtual const TPixel * GetBufferPointer() const
-  { return m_Buffer ? m_Buffer->GetBufferPointer() : 0; }
+  { return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR; }
 
   /** Return a pointer to the container. */
   PixelContainer * GetPixelContainer()
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImage.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImage.hxx
index e763c18..b810444 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImage.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImage.hxx
@@ -44,18 +44,17 @@ Image< TPixel, VImageDimension >
   m_Buffer = PixelContainer::New();
 }
 
-//----------------------------------------------------------------------------
 template< typename TPixel, unsigned int VImageDimension >
 void
 Image< TPixel, VImageDimension >
-::Allocate()
+::Allocate(bool initializePixels)
 {
   SizeValueType num;
 
   this->ComputeOffsetTable();
   num = static_cast<SizeValueType>(this->GetOffsetTable()[VImageDimension]);
 
-  m_Buffer->Reserve(num);
+  m_Buffer->Reserve(num, initializePixels);
 }
 
 template< typename TPixel, unsigned int VImageDimension >
@@ -113,16 +112,7 @@ Image< TPixel, VImageDimension >
   if ( data )
     {
     // Attempt to cast data to an Image
-    const Self *imgData;
-
-    try
-      {
-      imgData = dynamic_cast< const Self * >( data );
-      }
-    catch ( ... )
-      {
-      return;
-      }
+    const Self * const imgData = dynamic_cast< const Self * >( data );
 
     if ( imgData )
       {
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageAlgorithm.h b/Utilities/ITK/Modules/Core/Common/include/itkImageAlgorithm.h
index ab2929a..434ba2b 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageAlgorithm.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageAlgorithm.h
@@ -175,6 +175,34 @@ private:
   };
 /** \endcond */
 
+  /** Unary functor just for static_cast operator */
+  template<typename TInputType, typename TOutputType>
+  struct StaticCast
+    : public std::unary_function<TInputType,TOutputType>
+  {
+    TOutputType operator() (const TInputType i) { return static_cast<TOutputType>(i); }
+  };
+
+
+  /** Function to dispatch to std::copy or std::transform. */
+  template<typename TType>
+  static TType* CopyHelper(const TType *first, const TType *last, TType *result)
+    {
+      // Note: On some MS compilers the following may generate a
+      // warning. Please include itkMacro.h before <algorithm> or
+      // another stl header to avoid.
+      return std::copy(first, last, result);
+    }
+
+/** \cond HIDE_SPECIALIZATION_DOCUMENTATION */
+  template<typename TInputType, typename TOutputType>
+  static TOutputType* CopyHelper(const TInputType *first, const TInputType *last, TOutputType *result)
+    {
+      return std::transform(first, last, result, StaticCast<TInputType,TOutputType>());
+    }
+/** \endcond */
+
+
 };
 } // end namespace itk
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageAlgorithm.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImageAlgorithm.hxx
index 3ad765c..0bb8606 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageAlgorithm.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageAlgorithm.hxx
@@ -131,10 +131,7 @@ void ImageAlgorithm::DispatchedCopy( const InputImageType *inImage,
     const typename InputImageType::InternalPixelType* inBuffer = in + inOffset*NumberOfInternalComponents;
     typename OutputImageType::InternalPixelType* outBuffer = out + outOffset*NumberOfInternalComponents;
 
-    // Note: On some MS compilers the following may generate a
-    // warning. Please include itkMacro.h before <algorithm> or
-    // another stl header to avoid.
-    std::copy(inBuffer,
+    CopyHelper(inBuffer,
               inBuffer+sizeOfChunkInInternalComponents ,
               outBuffer);
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageBase.h b/Utilities/ITK/Modules/Core/Common/include/itkImageBase.h
index 37a8782..8c3e1d4 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageBase.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageBase.h
@@ -164,7 +164,7 @@ public:
   typedef Matrix< SpacePrecisionType, VImageDimension, VImageDimension > DirectionType;
 
   /** Restore object to initialized state. */
-  void Initialize();
+  virtual void Initialize() ITK_OVERRIDE;
 
   /** Image dimension. The dimension of an image is fixed at construction. */
   static unsigned int GetImageDimension()
@@ -232,8 +232,9 @@ public:
    *
    * This method should be pure virtual, if backwards compatibility
    * was not required.
+   *
    */
-  virtual void Allocate() {}
+  virtual void Allocate(bool initialize=false);
 
   /** Set the region object that defines the size and starting index
    * for the largest possible region this image could represent.  This
@@ -279,7 +280,7 @@ public:
    * the object to be modified. This method is called internally by
    * the pipeline and therefore bypasses the modified time
    * calculation. */
-  virtual void SetRequestedRegion( const DataObject *data );
+  virtual void SetRequestedRegion( const DataObject *data ) ITK_OVERRIDE;
 
   /** Get the region object that defines the size and starting index
    * for the region of the image requested (i.e., the region of the
@@ -589,7 +590,7 @@ public:
    * ImageBase has more meta-data than its DataObject.  Thus, it must
    * provide its own version of CopyInformation() in order to copy the
    * LargestPossibleRegion from the input parameter. */
-  virtual void CopyInformation(const DataObject *data);
+  virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE;
 
   /** Graft the data and information from one image to another. This
    * is a convenience method to setup a second image with all the meta
@@ -601,7 +602,7 @@ public:
    * simply calls CopyInformation() and copies the region ivars.
    * Subclasses of ImageBase are responsible for copying the pixel
    * container. */
-  virtual void Graft(const DataObject *data);
+  virtual void Graft(const DataObject *data) ITK_OVERRIDE;
 
   /** Update the information for this DataObject so that it can be used
    * as an output of a ProcessObject.  This method is used the pipeline
@@ -610,7 +611,7 @@ public:
    * ProcessObject::UpdateOutputInformation() which determines modified
    * times, LargestPossibleRegions, and any extra meta data like spacing,
    * origin, etc. */
-  virtual void UpdateOutputInformation();
+  virtual void UpdateOutputInformation() ITK_OVERRIDE;
 
   /** UpdateOutputData() is part of the pipeline infrastructure to
    * communicate between ProcessObjects and DataObjects. The method of
@@ -619,12 +620,12 @@ public:
    * input's requested region to zero, to indicate that it does not
    * need to be updated or executed.
    */
-  virtual void UpdateOutputData();
+  virtual void UpdateOutputData() ITK_OVERRIDE;
 
   /** Set the RequestedRegion to the LargestPossibleRegion.  This
    * forces a filter to produce all of the output in one execution
    * (i.e. not streaming) on the next call to Update(). */
-  virtual void SetRequestedRegionToLargestPossibleRegion();
+  virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE;
 
   /** Determine whether the RequestedRegion is outside of the
    * BufferedRegion. This method returns true if the RequestedRegion
@@ -635,7 +636,7 @@ public:
    * inside the BufferedRegion from the previous execution (and the
    * current filter is up to date), then a given filter does not need
    * to re-execute */
-  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion();
+  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE;
 
   /** Verify that the RequestedRegion is within the
    * LargestPossibleRegion.  If the RequestedRegion is not within the
@@ -645,7 +646,7 @@ public:
    * used by PropagateRequestedRegion().  PropagateRequestedRegion()
    * throws a InvalidRequestedRegionError exception is the requested
    * region is not within the LargestPossibleRegion. */
-  virtual bool VerifyRequestedRegion();
+  virtual bool VerifyRequestedRegion() ITK_OVERRIDE;
 
   /** INTERNAL This method is used internally by filters to copy meta-data from
    * the output to the input. Users should not have a need to use this method.
@@ -671,7 +672,7 @@ public:
 protected:
   ImageBase();
   ~ImageBase();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Calculate the offsets needed to move from one pixel to the next
    * along a row, column, slice, volume, etc. These offsets are based
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageBase.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImageBase.hxx
index ed5d9e0..5a58598 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageBase.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageBase.hxx
@@ -53,6 +53,13 @@ ImageBase< VImageDimension >
   m_PhysicalPointToIndex.SetIdentity();
 }
 
+template< unsigned int VImageDimension >
+void
+ImageBase< VImageDimension >
+::Allocate(bool)
+{
+}
+
 /**
  *
  */
@@ -302,16 +309,7 @@ ImageBase< VImageDimension >
   if ( data )
     {
     // Attempt to cast data to an ImageBase
-    const ImageBase< VImageDimension > *imgData;
-
-    try
-      {
-      imgData = dynamic_cast< const ImageBase< VImageDimension > * >( data );
-      }
-    catch ( ... )
-      {
-      return;
-      }
+    const ImageBase< VImageDimension > * const imgData = dynamic_cast< const ImageBase< VImageDimension > * >( data );
 
     if ( imgData )
       {
@@ -341,16 +339,7 @@ ImageBase< VImageDimension >
 {
   typedef ImageBase< VImageDimension > ImageBaseType;
 
-  const ImageBaseType *image;
-
-  try
-    {
-    image = dynamic_cast< const ImageBaseType * >( data );
-    }
-  catch ( ... )
-    {
-    return;
-    }
+  const ImageBaseType *image = dynamic_cast< const ImageBaseType * >( data );
 
   if ( !image )
     {
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageConstIterator.h b/Utilities/ITK/Modules/Core/Common/include/itkImageConstIterator.h
index 45cc30c..2d064a6 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageConstIterator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageConstIterator.h
@@ -133,8 +133,8 @@ public:
     m_PixelAccessor(),
     m_PixelAccessorFunctor()
   {
-    m_Image = 0;
-    m_Buffer = 0;
+    m_Image = ITK_NULLPTR;
+    m_Buffer = ITK_NULLPTR;
     m_Offset = 0;
     m_BeginOffset = 0;
     m_EndOffset = 0;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx
index 3007e3f..3b3160a 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageConstIteratorWithIndex.hxx
@@ -29,9 +29,9 @@ template< typename TImage >
 ImageConstIteratorWithIndex< TImage >
 ::ImageConstIteratorWithIndex()
 {
-  m_Position  = 0;
-  m_Begin     = 0;
-  m_End       = 0;
+  m_Position  = ITK_NULLPTR;
+  m_Begin     = ITK_NULLPTR;
+  m_End       = ITK_NULLPTR;
   m_Remaining = false;
 }
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageDuplicator.h b/Utilities/ITK/Modules/Core/Common/include/itkImageDuplicator.h
index 0a7af14..04e5272 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageDuplicator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageDuplicator.h
@@ -86,7 +86,7 @@ public:
 protected:
   ImageDuplicator();
   virtual ~ImageDuplicator() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   ImageDuplicator(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageDuplicator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImageDuplicator.hxx
index 0e4fb75..25f5021 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageDuplicator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageDuplicator.hxx
@@ -28,8 +28,8 @@ template< typename TInputImage >
 ImageDuplicator< TInputImage >
 ::ImageDuplicator()
 {
-  m_InputImage = NULL;
-  m_Output = NULL;
+  m_InputImage = ITK_NULLPTR;
+  m_Output = ITK_NULLPTR;
   m_InternalImageTime = 0;
 }
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageIORegion.h b/Utilities/ITK/Modules/Core/Common/include/itkImageIORegion.h
index 0c3e359..fba7c86 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageIORegion.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageIORegion.h
@@ -83,7 +83,7 @@ public:
   unsigned int GetRegionDimension() const;
 
   /** Return the region type. Images are described with structured regions. */
-  virtual RegionType GetRegionType() const;
+  virtual RegionType GetRegionType() const ITK_OVERRIDE;
 
   /** Constructor. ImageIORegion is a lightweight object that is not reference
    * counted, so the constructor is public. */
@@ -152,7 +152,7 @@ protected:
    * including superclasses. Typically not called by the user (use Print()
    * instead) but used in the hierarchical print process to combine the
    * output of several classes.  */
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   unsigned int m_ImageDimension;
@@ -160,13 +160,14 @@ private:
   SizeType     m_Size;
 };
 
+
 // Declare operator<<
 extern ITKCommon_EXPORT std::ostream & operator<<(std::ostream & os, const ImageIORegion & region);
 
+
 /** \class ImageIORegionAdaptor
  * \brief Helper class for converting ImageRegions into ImageIORegions and back.
  *
- *
  * \ingroup ITKCommon
  */
 template< unsigned int VDimension >
@@ -197,12 +198,12 @@ public:
     const unsigned int ioDimension = outIORegion.GetImageDimension();
     const unsigned int imageDimension = VDimension;
 
-    unsigned int minDimension = ( ioDimension > imageDimension ) ? imageDimension : ioDimension;
+    const unsigned int minDimension = std::min( ioDimension, imageDimension );
 
-    ImageSizeType  size  = inImageRegion.GetSize();
-    ImageIndexType index = inImageRegion.GetIndex();
+    const ImageSizeType & size = inImageRegion.GetSize();
+    const ImageIndexType & index = inImageRegion.GetIndex();
 
-    for ( unsigned int i = 0; i < minDimension; i++ )
+    for( unsigned int i = 0; i < minDimension; ++i )
       {
       outIORegion.SetSize(i, size[i]);
       outIORegion.SetIndex(i, index[i] - largestRegionIndex[i]);
@@ -211,7 +212,7 @@ public:
     //
     // Fill in the remaining codimension (if any) with default values
     //
-    for ( unsigned int k = minDimension; k < ioDimension; k++ )
+    for( unsigned int k = minDimension; k < ioDimension; ++k )
       {
       outIORegion.SetSize(k, 1);    // Note that default size in IO is 1 not 0
       outIORegion.SetIndex(k, 0);
@@ -242,9 +243,9 @@ public:
     const unsigned int ioDimension = inIORegion.GetImageDimension();
     const unsigned int imageDimension = VDimension;
 
-    unsigned int minDimension = ( ioDimension > imageDimension ) ? imageDimension : ioDimension;
+    const unsigned int minDimension = std::min( ioDimension, imageDimension );
 
-    for ( unsigned int i = 0; i < minDimension; i++ )
+    for( unsigned int i = 0; i < minDimension; ++i )
       {
       size[i]  = inIORegion.GetSize(i);
       index[i] = inIORegion.GetIndex(i) + largestRegionIndex[i];
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h b/Utilities/ITK/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h
index 1d5f987..8a22f45 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageLinearConstIteratorWithIndex.h
@@ -130,7 +130,11 @@ public:
   typedef typename PixelContainer::Pointer PixelContainerPointer;
 
   /** Default constructor. Needed since we provide a cast constructor. */
-  ImageLinearConstIteratorWithIndex():ImageConstIteratorWithIndex< TImage >(), m_Direction(0) {}
+  ImageLinearConstIteratorWithIndex() :
+    ImageConstIteratorWithIndex< TImage >(),
+    m_Jump(0),
+    m_Direction(0)
+  {}
 
   /** Constructor establishes an iterator to walk a particular image and a
    * particular region of that image. */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx
index 7d788f1..c7f7373 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx
@@ -30,7 +30,7 @@ ImageRandomNonRepeatingConstIteratorWithIndex< TImage >
   m_NumberOfPixelsInRegion    = 0L;
   m_NumberOfSamplesRequested  = 0L;
   m_NumberOfSamplesDone       = 0L;
-  m_Permutation = NULL;
+  m_Permutation = ITK_NULLPTR;
 }
 
 /** Constructor establishes an iterator to walk a particular image and a
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageRegion.h b/Utilities/ITK/Modules/Core/Common/include/itkImageRegion.h
index 4b0d200..5fb2612 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageRegion.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageRegion.h
@@ -104,7 +104,7 @@ public:
   typedef ImageRegion< itkGetStaticConstMacro(SliceDimension) > SliceRegion;
 
   /** Return the region type. Images are described with structured regions. */
-  virtual typename Superclass::RegionType GetRegionType() const
+  virtual typename Superclass::RegionType GetRegionType() const ITK_OVERRIDE
   { return Superclass::ITK_STRUCTURED_REGION; }
 
   /** Constructor. ImageRegion is a lightweight object that is not reference
@@ -308,7 +308,7 @@ protected:
    * including superclasses. Typically not called by the user (use Print()
    * instead) but used in the hierarchical print process to combine the
    * output of several classes.  */
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   IndexType m_Index;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterBase.h b/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterBase.h
index 097030f..663b605 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterBase.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterBase.h
@@ -143,7 +143,7 @@ protected:
                                          IndexValueType regionIndex[],
                                          SizeValueType regionSize[] ) const = 0;
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   ImageRegionSplitterBase(const ImageRegionSplitterBase &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterDirection.h b/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterDirection.h
index 0122605..9ffba72 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterDirection.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterDirection.h
@@ -63,15 +63,15 @@ protected:
   virtual unsigned int GetNumberOfSplitsInternal(unsigned int dim,
                                                  const IndexValueType regionIndex[],
                                                  const SizeValueType regionSize[],
-                                                 unsigned int requestedNumber) const;
+                                                 unsigned int requestedNumber) const ITK_OVERRIDE;
 
   virtual unsigned int GetSplitInternal(unsigned int dim,
                                         unsigned int i,
                                         unsigned int numberOfPieces,
                                         IndexValueType regionIndex[],
-                                        SizeValueType regionSize[]) const;
+                                        SizeValueType regionSize[]) const ITK_OVERRIDE;
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   ImageRegionSplitterDirection(const ImageRegionSplitterDirection &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h b/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h
index 1e3a41c..86c168a 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterMultidimensional.h
@@ -78,15 +78,15 @@ protected:
   virtual unsigned int GetNumberOfSplitsInternal(unsigned int dim,
                                                  const IndexValueType regionIndex[],
                                                  const SizeValueType regionSize[],
-                                                 unsigned int requestedNumber) const;
+                                                 unsigned int requestedNumber) const ITK_OVERRIDE;
 
   virtual unsigned int GetSplitInternal(unsigned int dim,
                                         unsigned int i,
                                         unsigned int numberOfPieces,
                                         IndexValueType regionIndex[],
-                                        SizeValueType regionSize[]) const;
+                                        SizeValueType regionSize[]) const ITK_OVERRIDE;
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   ImageRegionSplitterMultidimensional(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h b/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h
index 4d8ec86..a4327f3 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageRegionSplitterSlowDimension.h
@@ -66,13 +66,13 @@ protected:
   virtual unsigned int GetNumberOfSplitsInternal( unsigned int dim,
                                                   const IndexValueType regionIndex[],
                                                   const SizeValueType regionSize[],
-                                                  unsigned int requestedNumber ) const;
+                                                  unsigned int requestedNumber ) const ITK_OVERRIDE;
 
   virtual unsigned int GetSplitInternal( unsigned int dim,
                                          unsigned int i,
                                          unsigned int numberOfPieces,
                                          IndexValueType regionIndex[],
-                                         SizeValueType regionSize[] ) const;
+                                         SizeValueType regionSize[] ) const ITK_OVERRIDE;
 
 private:
   ImageRegionSplitterSlowDimension(const ImageRegionSplitterSlowDimension &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h b/Utilities/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h
index 18e7a3a..e6922a6 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageScanlineConstIterator.h
@@ -174,7 +174,7 @@ public:
    */
   void GoToBeginOfLine(void)
   {
-    this->Offset = m_SpanBeginOffset;
+    this->m_Offset = m_SpanBeginOffset;
   }
 
   /** Go to the past end pixel of the current line.
@@ -187,7 +187,7 @@ public:
    */
   void GoToEndOfLine(void)
   {
-    this->Offset = m_SpanEndOffset;
+    this->m_Offset = m_SpanEndOffset;
   }
 
   /** Test if the index is at the end of line
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.h b/Utilities/ITK/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.h
index bdfc801..bbd6105 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageSliceConstIteratorWithIndex.h
@@ -136,10 +136,12 @@ public:
    * particular region of that image. */
   ImageSliceConstIteratorWithIndex(const ImageType *ptr,
                                    const RegionType & region):
-    ImageConstIteratorWithIndex< TImage >(ptr, region)
+    ImageConstIteratorWithIndex< TImage >(ptr, region),
+    m_PixelJump(0),
+    m_LineJump(0),
+    m_Direction_A(0),
+    m_Direction_B(1)
   {
-    m_Direction_A = 0;
-    m_Direction_B = 1;
   }
 
   /** Constructor that can be used to cast from an ImageIterator to an
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageSource.h b/Utilities/ITK/Modules/Core/Common/include/itkImageSource.h
index 848c5d6..a695f27 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageSource.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageSource.h
@@ -230,7 +230,7 @@ public:
    * multiple outputs of different types, then that class must provide
    * an implementation of MakeOutput(). */
   using Superclass::MakeOutput;
-  virtual ProcessObject::DataObjectPointer MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx);
+  virtual ProcessObject::DataObjectPointer MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
 protected:
   ImageSource();
@@ -251,7 +251,7 @@ protected:
    * instead.
    *
    * \sa ThreadedGenerateData() */
-  virtual void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** If an imaging filter can be implemented as a multithreaded
    * algorithm, the filter will provide an implementation of
@@ -332,22 +332,22 @@ protected:
    */
   virtual const ImageRegionSplitterBase* GetImageRegionSplitter(void) const;
 
-  /** Split the output's RequestedRegion into "num" pieces, returning
+  /** Split the output's RequestedRegion into "pieces" pieces, returning
    * region "i" as "splitRegion". This method is called concurrently
-   * "num" times. The  regions must not overlap. The method returns the number of pieces that
-   * the routine is capable of splitting the output RequestedRegion,
-   * i.e. return value is less than or equal to "num".
+   * "pieces" times. The  regions must not overlap. The method returns the number
+   * of pieces that the routine is capable of splitting the output RequestedRegion,
+   * i.e. return value is less than or equal to "pieces".
    *
    * To override the algorithm used split the image this method should
-   * no longer be overridden. It stead the algorithm should be
-   * implemented in a ImageRegionSplitter class, and the
+   * no longer be overridden. Instead, the algorithm should be
+   * implemented in a ImageRegionSplitterBase class, and the
    * GetImageRegionSplitter should overridden to return the splitter
    * object with the desired algorithm.
    *
    * \sa GetImageRegionSplitter
    **/
   virtual
-  unsigned int SplitRequestedRegion(unsigned int i, unsigned int num, OutputImageRegionType & splitRegion);
+  unsigned int SplitRequestedRegion(unsigned int i, unsigned int pieces, OutputImageRegionType & splitRegion);
 
   /** Static function used as a "callback" by the MultiThreader.  The threading
    * library will call this routine for each thread, which will delegate the
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageSource.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImageSource.hxx
index 74f5cba..595bbea 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageSource.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageSource.hxx
@@ -103,7 +103,7 @@ ImageSource< TOutputImage >
   TOutputImage *out = dynamic_cast< TOutputImage * >
                       ( this->ProcessObject::GetOutput(idx) );
 
-  if ( out == NULL && this->ProcessObject::GetOutput(idx) != NULL )
+  if ( out == ITK_NULLPTR && this->ProcessObject::GetOutput(idx) != ITK_NULLPTR )
     {
     itkWarningMacro (<< "Unable to convert output number " << idx << " to type " <<  typeid( OutputImageType ).name () );
     }
@@ -172,7 +172,7 @@ ImageSource< TOutputImage >
 template< typename TOutputImage >
 unsigned int
 ImageSource< TOutputImage >
-::SplitRequestedRegion(unsigned int i, unsigned int num, OutputImageRegionType & splitRegion)
+::SplitRequestedRegion(unsigned int i, unsigned int pieces, OutputImageRegionType & splitRegion)
 {
   const ImageRegionSplitterBase * splitter = this->GetImageRegionSplitter();
 
@@ -180,7 +180,7 @@ ImageSource< TOutputImage >
   OutputImageType *outputPtr = this->GetOutput();
 
   splitRegion = outputPtr->GetRequestedRegion();
-  return splitter->GetSplit( i, num, splitRegion );
+  return splitter->GetSplit( i, pieces, splitRegion );
 
 }
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageToImageFilter.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImageToImageFilter.hxx
index 59f44fa..76492bb 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageToImageFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageToImageFilter.hxx
@@ -100,7 +100,7 @@ ImageToImageFilter< TInputImage, TOutputImage >
   const TInputImage *in = dynamic_cast< const TInputImage * >
     ( this->ProcessObject::GetInput(idx) );
 
-  if ( in == NULL && this->ProcessObject::GetInput(idx) != NULL )
+  if ( in == ITK_NULLPTR && this->ProcessObject::GetInput(idx) != ITK_NULLPTR )
     {
     itkWarningMacro (<< "Unable to convert input number " << idx << " to type " <<  typeid( InputImageType ).name () );
     }
@@ -177,7 +177,7 @@ ImageToImageFilter< TInputImage, TOutputImage >
 
   typedef ImageBase< InputImageDimension > ImageBaseType;
 
-  ImageBaseType *inputPtr1 = 0;
+  ImageBaseType *inputPtr1 = ITK_NULLPTR;
   InputDataObjectIterator it(this);
 
   for(; !it.IsAtEnd(); ++it )
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageTransformer.h b/Utilities/ITK/Modules/Core/Common/include/itkImageTransformer.h
index 168b43a..6a7b48b 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageTransformer.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageTransformer.h
@@ -109,9 +109,9 @@ public:
    * an input to a filter.
    */
   virtual void PushBackInput(const InputImageType *image);
-  virtual void PopBackInput();
+  virtual void PopBackInput() ITK_OVERRIDE;
   virtual void PushFrontInput(const InputImageType *image);
-  virtual void PopFrontInput();
+  virtual void PopFrontInput() ITK_OVERRIDE;
 
 protected:
   ImageTransformer();
@@ -130,7 +130,7 @@ protected:
    *
    * \sa ProcessObject::GenerateInputRequestedRegion(),
    *     ImageSource::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion();
+  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
 
   /** A version of GenerateData() specific for image processing
    * filters.  This implementation will split the processing across
@@ -147,7 +147,7 @@ protected:
    * instead.
    *
    * \sa ThreadedGenerateData() */
-  virtual void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** If an imaging filter can be implemented as a multithreaded
    * algorithm, the filter will provide an implementation of
@@ -228,9 +228,9 @@ protected:
    * methods from the superclass.
    * NOTE: The same code resides in ImageToImageFilter
    */
-  void PushBackInput(const DataObject *input)
+  virtual void PushBackInput(const DataObject *input) ITK_OVERRIDE
   { Superclass::PushBackInput(input); }
-  void PushFrontInput(const DataObject *input)
+  virtual void PushFrontInput(const DataObject *input) ITK_OVERRIDE
   { Superclass::PushFrontInput(input); }
 
   /** Internal structure used for passing image data into the threading library
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageTransformer.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImageTransformer.hxx
index d4ab10c..d6174f1 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageTransformer.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageTransformer.hxx
@@ -99,7 +99,7 @@ ImageTransformer< TInputImage >
 {
   if ( this->GetNumberOfInputs() < 1 )
     {
-    return 0;
+    return ITK_NULLPTR;
     }
 
   return itkDynamicCastInDebugMode< TInputImage * >
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.h b/Utilities/ITK/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.h
index 5fd867b..7aea58c 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.h
@@ -32,22 +32,22 @@ namespace itk
  */
 
 /* Can we template of Image type instead, but require that Image be of type
- * Image< Vector< TValueType, NVectorDimension >, VImageDimension > ? */
-template< typename TValueType,
+ * Image< Vector< TValue, NVectorDimension >, VImageDimension > ? */
+template< typename TValue,
           unsigned int NVectorDimension,
           unsigned int VImageDimension >
 class ImageVectorOptimizerParametersHelper
-  : public OptimizerParametersHelper< TValueType >
+  : public OptimizerParametersHelper< TValue >
 {
 public:
 
   /** The element type stored at each location in the Array. */
-  typedef TValueType                                ValueType;
-  typedef ImageVectorOptimizerParametersHelper      Self;
-  typedef OptimizerParametersHelper< TValueType >   Superclass;
+  typedef TValue                                ValueType;
+  typedef ImageVectorOptimizerParametersHelper  Self;
+  typedef OptimizerParametersHelper< TValue >   Superclass;
 
   /** Image type that this class expects. */
-  typedef Image< Vector<TValueType, NVectorDimension>,
+  typedef Image< Vector<TValue, NVectorDimension>,
                  VImageDimension >
                                                 ParameterImageType;
   typedef typename ParameterImageType::Pointer  ParameterImagePointer;
@@ -61,10 +61,10 @@ public:
   /** Set a new data pointer for *both* the Array and parameter image,
    * pointing both to a different memory block.
    * The size of the new memroy block must be the same as current size of
-   * Array and the parameter image's buffer, in elements of TValueType.
+   * Array and the parameter image's buffer, in elements of TValue.
    * Memory must be managed by caller afterwards. */
   virtual void MoveDataPointer(CommonContainerType* container,
-                               TValueType * pointer );
+                               TValue * pointer );
 
   /** Set an image that holds the parameter data. \c container is a pointer
    * of type itkArray to the object to which this helper is assigned.
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx
index f69ecaa..ffbb1fa 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImageVectorOptimizerParametersHelper.hxx
@@ -24,29 +24,29 @@
 namespace itk
 {
 /** Default contstructor */
-template< typename TValueType,
+template< typename TValue,
           unsigned int NVectorDimension,
           unsigned int VImageDimension >
-ImageVectorOptimizerParametersHelper< TValueType, NVectorDimension, VImageDimension >
+ImageVectorOptimizerParametersHelper< TValue, NVectorDimension, VImageDimension >
 ::ImageVectorOptimizerParametersHelper()
 {
-  m_ParameterImage = NULL;
+  m_ParameterImage = ITK_NULLPTR;
 }
 
 /** Move the data pointer */
-template< typename TValueType,
+template< typename TValue,
           unsigned int NVectorDimension,
           unsigned int VImageDimension >
 void
-ImageVectorOptimizerParametersHelper< TValueType, NVectorDimension, VImageDimension >
-::MoveDataPointer( CommonContainerType* container, TValueType * pointer )
+ImageVectorOptimizerParametersHelper< TValue, NVectorDimension, VImageDimension >
+::MoveDataPointer( CommonContainerType* container, TValue * pointer )
 {
   if( m_ParameterImage.IsNull() )
     {
     itkGenericExceptionMacro("ImageVectorOptimizerParametersHelper::"
       "MoveDataPointer: m_ParameterImage must be defined.");
     }
-  // The buffer for Image<Vector> points to Vector type, not TValueType, so
+  // The buffer for Image<Vector> points to Vector type, not TValue, so
   // have to cast.
   typedef typename ParameterImageType::PixelContainer::Element vectorElement;
   vectorElement* vectorPointer = reinterpret_cast<vectorElement *>(pointer);
@@ -59,23 +59,23 @@ ImageVectorOptimizerParametersHelper< TValueType, NVectorDimension, VImageDimens
 }
 
 /** Set parameter image */
-template< typename TValueType,
+template< typename TValue,
           unsigned int NVectorDimension,
           unsigned int VImageDimension >
 void
-ImageVectorOptimizerParametersHelper< TValueType, NVectorDimension, VImageDimension >
+ImageVectorOptimizerParametersHelper< TValue, NVectorDimension, VImageDimension >
 ::SetParametersObject(CommonContainerType * container, LightObject * object)
 {
-  if( object == NULL )
+  if( object == ITK_NULLPTR )
     {
-    m_ParameterImage = NULL;
+    m_ParameterImage = ITK_NULLPTR;
     return;
     }
   else
     {
     ParameterImageType* image =
       dynamic_cast<ParameterImageType *>( object );
-    if( image == NULL )
+    if( image == ITK_NULLPTR )
       {
       itkGenericExceptionMacro(
         "ImageVectorOptimizerParametersHelper::SetParametersObject: object is "
@@ -84,10 +84,10 @@ ImageVectorOptimizerParametersHelper< TValueType, NVectorDimension, VImageDimens
       }
     m_ParameterImage = image;
     //The PixelContainer for Image<Vector> points to type Vector, so we have
-    // to determine the number of raw elements of type TValueType in the buffer
+    // to determine the number of raw elements of type TValue in the buffer
     // and cast a pointer to it for assignment to the Array data pointer.
     unsigned int sz = image->GetPixelContainer()->Size() * NVectorDimension;
-    TValueType* valuePointer = reinterpret_cast<TValueType *>
+    TValue* valuePointer = reinterpret_cast<TValue *>
                               ( image->GetPixelContainer()->GetBufferPointer() );
     //Set the Array's pointer to the image data buffer. By default it will
     // not manage the memory.
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImportImageContainer.h b/Utilities/ITK/Modules/Core/Common/include/itkImportImageContainer.h
index b6eaafc..ed33e04 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImportImageContainer.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImportImageContainer.h
@@ -105,8 +105,11 @@ public:
    * container. However, in this particular case, Reserve as a Resize
    * semantics that is kept for backward compatibility reasons.
    *
+   * If UseDefaultConstructor is true, then * the default constructor is used
+   * to initialize each element.  POD date types initialize to zero.
+   *
    * \sa SetImportPointer() */
-  void Reserve(ElementIdentifier num);
+  void Reserve(ElementIdentifier num, const bool UseDefaultConstructor = false);
 
   /** Tell the container to try to minimize its memory usage for
    * storage of the current number of elements.  If new memory is
@@ -139,9 +142,14 @@ protected:
   /** PrintSelf routine. Normally this is a protected internal method. It is
    * made public here so that Image can call this method.  Users should not
    * call this method but should call Print() instead. */
-  void PrintSelf(std::ostream & os, Indent indent) const;
-
-  virtual TElement * AllocateElements(ElementIdentifier size) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
+
+  /**
+   * Allocates elements of the array.  If UseDefaultConstructor is true, then
+   * the default constructor is used to initialize each element.  POD date types
+   * initialize to zero.
+   */
+  virtual TElement * AllocateElements(ElementIdentifier size, bool UseDefaultConstructor = false) const;
 
   virtual void DeallocateManagedMemory();
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImportImageContainer.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImportImageContainer.hxx
index d22c90a..cf29eb3 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImportImageContainer.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImportImageContainer.hxx
@@ -36,7 +36,7 @@ template< typename TElementIdentifier, typename TElement >
 ImportImageContainer< TElementIdentifier, TElement >
 ::ImportImageContainer()
 {
-  m_ImportPointer = 0;
+  m_ImportPointer = ITK_NULLPTR;
   m_ContainerManageMemory = true;
   m_Capacity = 0;
   m_Size = 0;
@@ -56,7 +56,7 @@ ImportImageContainer< TElementIdentifier, TElement >
 template< typename TElementIdentifier, typename TElement >
 void
 ImportImageContainer< TElementIdentifier, TElement >
-::Reserve(ElementIdentifier size)
+::Reserve(ElementIdentifier size, const bool UseDefaultConstructor )
 {
   // Reserve has a Resize semantics. We keep it that way for
   // backwards compatibility .
@@ -65,7 +65,7 @@ ImportImageContainer< TElementIdentifier, TElement >
     {
     if ( size > m_Capacity )
       {
-      TElement *temp = this->AllocateElements(size);
+      TElement *temp = this->AllocateElements(size, UseDefaultConstructor);
       // only copy the portion of the data used in the old buffer
       std::copy(m_ImportPointer,
                 m_ImportPointer+m_Size,
@@ -87,7 +87,7 @@ ImportImageContainer< TElementIdentifier, TElement >
     }
   else
     {
-    m_ImportPointer = this->AllocateElements(size);
+    m_ImportPointer = this->AllocateElements(size, UseDefaultConstructor);
     m_Capacity = size;
     m_Size = size;
     m_ContainerManageMemory = true;
@@ -109,7 +109,7 @@ ImportImageContainer< TElementIdentifier, TElement >
     if ( m_Size < m_Capacity )
       {
       const TElementIdentifier size = m_Size;
-      TElement *               temp = this->AllocateElements(size);
+      TElement *               temp = this->AllocateElements(size, false);
       std::copy(m_ImportPointer,
                 m_ImportPointer+m_Size,
                 temp);
@@ -170,7 +170,7 @@ ImportImageContainer< TElementIdentifier, TElement >
 
 template< typename TElementIdentifier, typename TElement >
 TElement *ImportImageContainer< TElementIdentifier, TElement >
-::AllocateElements(ElementIdentifier size) const
+::AllocateElements(ElementIdentifier size, bool UseDefaultConstructor ) const
 {
   // Encapsulate all image memory allocation here to throw an
   // exception when memory allocation fails even when the compiler
@@ -179,11 +179,18 @@ TElement *ImportImageContainer< TElementIdentifier, TElement >
 
   try
     {
-    data = new TElement[size];
+    if ( UseDefaultConstructor )
+      {
+      data = new TElement[size](); //POD types initialized to 0, others use default constructor.
+      }
+    else
+      {
+      data = new TElement[size]; //Faster but uninitialized
+      }
     }
   catch ( ... )
     {
-    data = 0;
+    data = ITK_NULLPTR;
     }
   if ( !data )
     {
@@ -205,7 +212,7 @@ void ImportImageContainer< TElementIdentifier, TElement >
     {
     delete[] m_ImportPointer;
     }
-  m_ImportPointer = 0;
+  m_ImportPointer = ITK_NULLPTR;
   m_Capacity = 0;
   m_Size = 0;
 }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkImportImageFilter.hxx b/Utilities/ITK/Modules/Core/Common/include/itkImportImageFilter.hxx
index 3b32dee..5d44445 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkImportImageFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkImportImageFilter.hxx
@@ -39,7 +39,7 @@ ImportImageFilter< TPixel, VImageDimension >
     }
   m_Direction.SetIdentity();
 
-  m_ImportPointer = 0;
+  m_ImportPointer = ITK_NULLPTR;
   m_FilterManageMemory = false;
   m_Size = 0;
 }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkInOrderTreeIterator.h b/Utilities/ITK/Modules/Core/Common/include/itkInOrderTreeIterator.h
index 92a56ec..8983316 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkInOrderTreeIterator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkInOrderTreeIterator.h
@@ -83,7 +83,7 @@ InOrderTreeIterator< TTreeType >::GetType() const
 template< typename TTreeType >
 bool InOrderTreeIterator< TTreeType >::HasNext() const
 {
-  if ( const_cast< TreeNodeType * >( FindNextNode() ) != NULL )
+  if ( const_cast< TreeNodeType * >( FindNextNode() ) != ITK_NULLPTR )
     {
     return true;
     }
@@ -104,9 +104,9 @@ template< typename TTreeType >
 const typename InOrderTreeIterator< TTreeType >::TreeNodeType *
 InOrderTreeIterator< TTreeType >::FindNextNode() const
 {
-  if ( this->m_Position == NULL )
+  if ( this->m_Position == ITK_NULLPTR )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   if ( this->m_Position->HasChildren() )
@@ -116,7 +116,7 @@ InOrderTreeIterator< TTreeType >::FindNextNode() const
 
   if ( !this->m_Position->HasParent() )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   TreeNodeType *child = this->m_Position;
@@ -128,7 +128,7 @@ InOrderTreeIterator< TTreeType >::FindNextNode() const
   while ( childPosition < lastChildPosition )
     {
     TreeNodeType *help = parent->GetChild(childPosition + 1);
-    if ( help != NULL )
+    if ( help != ITK_NULLPTR )
       {
       return help;
       }
@@ -143,7 +143,7 @@ InOrderTreeIterator< TTreeType >::FindNextNode() const
     // Subtree
     if ( parent->ChildPosition(this->m_Root) >= 0 )
       {
-      return NULL;
+      return ITK_NULLPTR;
       }
     childPosition = parent->ChildPosition(child);
     lastChildPosition = parent->CountChildren() - 1;
@@ -151,13 +151,13 @@ InOrderTreeIterator< TTreeType >::FindNextNode() const
     while ( childPosition < lastChildPosition )
       {
       TreeNodeType *help = parent->GetChild(childPosition + 1);
-      if ( help != NULL )
+      if ( help != ITK_NULLPTR )
         {
         return help;
         }
       }
     }
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 /** Clone function */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkInPlaceImageFilter.hxx b/Utilities/ITK/Modules/Core/Common/include/itkInPlaceImageFilter.hxx
index 7ee5267..3763391 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkInPlaceImageFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkInPlaceImageFilter.hxx
@@ -85,7 +85,7 @@ InPlaceImageFilter< TInputImage, TOutputImage >
   // additionally the buffered and requested regions of the input and
   // output must match.
   bool rMatch = true;
-  if( inputPtr != NULL && (unsigned int)InputImageDimension == (unsigned int)OutputImageDimension )
+  if( inputPtr != ITK_NULLPTR && (unsigned int)InputImageDimension == (unsigned int)OutputImageDimension )
     {
     for( unsigned int i=0; i<(unsigned int)InputImageDimension; i++ )
       {
@@ -103,7 +103,7 @@ InPlaceImageFilter< TInputImage, TOutputImage >
     {
     rMatch = false;
     }
-  if ( inputPtr != NULL &&
+  if ( inputPtr != ITK_NULLPTR &&
        this->GetInPlace() &&
        this->CanRunInPlace() &&
        rMatch )
@@ -111,7 +111,7 @@ InPlaceImageFilter< TInputImage, TOutputImage >
     // Graft this first input to the output.  Later, we'll need to
     // remove the input's hold on the bulk data.
     //
-    OutputImagePointer inputAsOutput = NULL;
+    OutputImagePointer inputAsOutput = ITK_NULLPTR;
     if ( IsSame<TInputImage, TOutputImage>() )
       {
       inputAsOutput = reinterpret_cast<TOutputImage *>( const_cast< TInputImage * >( inputPtr ) );
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkIndex.h b/Utilities/ITK/Modules/Core/Common/include/itkIndex.h
index d151d14..d4f1e86 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkIndex.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkIndex.h
@@ -220,10 +220,24 @@ public:
     return !same;
   }
 
+// false positive warnings with GCC 4.9
+#if defined( __GNUC__ )
+#if ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ == 9 )
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+#endif
   /** Access an element of the index. Elements are numbered
    * 0, ..., VIndexDimension-1. No bounds checking is performed. */
   IndexValueType & operator[](unsigned int dim)
-  { return m_Index[dim]; }
+  {
+    return m_Index[dim];
+  }
+#if defined( __GNUC__ )
+#if ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ == 9 )
+#pragma GCC diagnostic pop
+#endif
+#endif
 
   /** Access an element of the index. Elements are numbered
    * 0, ..., VIndexDimension-1. This version can only be an rvalue.
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkLeafTreeIterator.h b/Utilities/ITK/Modules/Core/Common/include/itkLeafTreeIterator.h
index 2aef92d..b76d057 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkLeafTreeIterator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkLeafTreeIterator.h
@@ -84,7 +84,7 @@ LeafTreeIterator< TTreeType >::LeafTreeIterator(const TTreeType *tree):
 /** Constructor */
 template< typename TTreeType >
 LeafTreeIterator< TTreeType >::LeafTreeIterator(TTreeType *tree):
-  TreeIteratorBase< TTreeType >(tree, NULL)
+  TreeIteratorBase< TTreeType >(tree, ITK_NULLPTR)
 {
   this->m_Begin = const_cast< TreeNodeType * >( this->FindNextNode() ); //
                                                                         //
@@ -115,11 +115,11 @@ LeafTreeIterator< TTreeType >::GetType() const
 template< typename TTreeType >
 bool LeafTreeIterator< TTreeType >::HasNext() const
 {
-  if ( this->m_Position == NULL )
+  if ( this->m_Position == ITK_NULLPTR )
     {
     return false;
     }
-  if ( const_cast< TreeNodeType * >( FindNextNode() ) != NULL )
+  if ( const_cast< TreeNodeType * >( FindNextNode() ) != ITK_NULLPTR )
     {
     return true;
     }
@@ -145,7 +145,7 @@ LeafTreeIterator< TTreeType >::FindNextNode() const
   ++it; // go next
   if ( it.IsAtEnd() )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   if ( !it.HasChild() )
@@ -162,7 +162,7 @@ LeafTreeIterator< TTreeType >::FindNextNode() const
     ++it;
     }
 
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 /** Clone function */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx
index 1c54fe2..1f4f3bf 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkLevelOrderTreeIterator.hxx
@@ -30,7 +30,7 @@ LevelOrderTreeIterator< TTreeType >
 {
   m_StartLevel =  -1;
   m_EndLevel = endLevel;
-  if ( start != NULL )
+  if ( start != ITK_NULLPTR )
     {
     m_Queue.push(start);
     this->m_Position = const_cast< TreeNodeType * >( start );
@@ -54,7 +54,7 @@ LevelOrderTreeIterator< TTreeType >
 {
   m_StartLevel = startLevel;
   m_EndLevel = endLevel;
-  if ( start != NULL )
+  if ( start != ITK_NULLPTR )
     {
     m_Queue.push(start);
     this->m_Position = const_cast< TreeNodeType * >( start );
@@ -125,14 +125,14 @@ LevelOrderTreeIterator< TTreeType >::FindNextNode() const
   do
     {
     node = FindNextNodeHelp();
-    if ( node == NULL )
+    if ( node == ITK_NULLPTR )
       {
-      return NULL;
+      return ITK_NULLPTR;
       }
     level = GetLevel(node);
     if ( level > m_EndLevel )
       {
-      return NULL;
+      return ITK_NULLPTR;
       }
     }
   while ( level < m_StartLevel );
@@ -145,7 +145,7 @@ template< typename TTreeType >
 int
 LevelOrderTreeIterator< TTreeType >::GetLevel() const
 {
-  if ( this->m_Position == NULL )
+  if ( this->m_Position == ITK_NULLPTR )
     {
     return -1;
     }
@@ -165,7 +165,7 @@ template< typename TTreeType >
 int
 LevelOrderTreeIterator< TTreeType >::GetLevel(const TreeNodeType *node) const
 {
-  if ( node == NULL )
+  if ( node == ITK_NULLPTR )
     {
     return -1;
     }
@@ -186,15 +186,15 @@ LevelOrderTreeIterator< TTreeType >::FindNextNodeHelp() const
 {
   if ( m_Queue.empty() )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   const TreeNodeType *currentNode = m_Queue.front();
   m_Queue.pop();
 
-  if ( currentNode == NULL )
+  if ( currentNode == ITK_NULLPTR )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   int size = currentNode->CountChildren();
@@ -202,7 +202,7 @@ LevelOrderTreeIterator< TTreeType >::FindNextNodeHelp() const
   for ( int i = 0; i < size; i++ )
     {
     TreeNodeType *child = dynamic_cast< TreeNodeType * >( currentNode->GetChild(i) );
-    if ( child != NULL )
+    if ( child != ITK_NULLPTR )
       {
       m_Queue.push(child);
       }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkLightObject.h b/Utilities/ITK/Modules/Core/Common/include/itkLightObject.h
index 37b33d9..1f9e3f4 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkLightObject.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkLightObject.h
@@ -162,6 +162,16 @@ private:
   LightObject(const Self &);    //purposely not implemented
   void operator=(const Self &); //purposely not implemented
 };
+
+/**
+ * This operator allows all subclasses of LightObject to be printed via <<.
+ * It in turn invokes the Print method, which in turn will invoke the
+ * PrintSelf method that all objects should define, if they have anything
+ * interesting to print out.
+ */
+std::ostream &
+operator<<(std::ostream & os, const LightObject & o);
+
 } // end namespace itk
 
 #endif
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkLightProcessObject.h b/Utilities/ITK/Modules/Core/Common/include/itkLightProcessObject.h
index 911489e..5a78173 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkLightProcessObject.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkLightProcessObject.h
@@ -116,7 +116,7 @@ public:
 protected:
   LightProcessObject();
   ~LightProcessObject();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** This method causes the filter to generate its output. */
   virtual void GenerateData() {}
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkLoggerBase.h b/Utilities/ITK/Modules/Core/Common/include/itkLoggerBase.h
index 26b7b83..a799345 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkLoggerBase.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkLoggerBase.h
@@ -169,7 +169,7 @@ protected:
   virtual ~LoggerBase();
 
   /** Print contents of a LoggerBase */
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 protected:
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkLoggerManager.h b/Utilities/ITK/Modules/Core/Common/include/itkLoggerManager.h
index 547e273..9b75fe1 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkLoggerManager.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkLoggerManager.h
@@ -99,7 +99,7 @@ protected:
   virtual ~LoggerManager() {}
 
   /** Print contents of a LoggerManager */
-  void PrintSelf(std::ostream & s, Indent indent) const;
+  virtual void PrintSelf(std::ostream & s, Indent indent) const ITK_OVERRIDE;
 
 private:
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkLoggerOutput.h b/Utilities/ITK/Modules/Core/Common/include/itkLoggerOutput.h
index 57af276..cbd4856 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkLoggerOutput.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkLoggerOutput.h
@@ -64,27 +64,27 @@ public:
   typedef Logger *LoggerType;
 
   /** Send a string to display. */
-  virtual void DisplayText(const char *t);
+  virtual void DisplayText(const char *t) ITK_OVERRIDE;
 
   /** Send a string as an error message to display.
    * The default implementation calls DisplayText() but subclasses
    * could present this message differently. */
-  virtual void DisplayErrorText(const char *t);
+  virtual void DisplayErrorText(const char *t) ITK_OVERRIDE;
 
   /** Send a string as a warningmessage to display.
    * The default implementation calls DisplayText() but subclasses
    * could present this message differently. */
-  virtual void DisplayWarningText(const char *t);
+  virtual void DisplayWarningText(const char *t) ITK_OVERRIDE;
 
   /** Send a string as a message to display.
    * The default implementation calls DisplayText() but subclasses
    * could present this message differently. */
-  virtual void DisplayGenericOutputText(const char *t);
+  virtual void DisplayGenericOutputText(const char *t) ITK_OVERRIDE;
 
   /** Send a string as a debug message to display.
    * The default implementation calls DisplayText() but subclasses
    * could present this message differently. */
-  virtual void DisplayDebugText(const char *t);
+  virtual void DisplayDebugText(const char *t) ITK_OVERRIDE;
 
   itkSetMacro(Logger, LoggerType);
 
@@ -96,9 +96,9 @@ public:
   }
 
 protected:
-  LoggerOutput():m_Logger(0) {}
+  LoggerOutput():m_Logger(ITK_NULLPTR) {}
   virtual ~LoggerOutput() {}
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   Logger *m_Logger;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkLoggerThreadWrapper.h b/Utilities/ITK/Modules/Core/Common/include/itkLoggerThreadWrapper.h
index ba9e336..7b36bcc 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkLoggerThreadWrapper.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkLoggerThreadWrapper.h
@@ -61,8 +61,7 @@ public:
     SET_PRIORITY_LEVEL,
     SET_LEVEL_FOR_FLUSHING,
     ADD_LOG_OUTPUT,
-    WRITE,
-    FLUSH
+    WRITE
     } OperationType;
 
   /** Set the priority level for the current logger. Only messages that have
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx b/Utilities/ITK/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx
index 16f617d..7f387df 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx
@@ -139,12 +139,10 @@ void LoggerThreadWrapper< SimpleLoggerType >::Flush()
         this->m_LevelQ.pop();
         this->m_MessageQ.pop();
         break;
-      case Self::FLUSH:
-        this->SimpleLoggerType::Flush();
-        break;
       }
     this->m_OperationQ.pop();
     }
+  this->SimpleLoggerType::Flush();
   this->m_Output->Flush();
   this->m_Mutex.Unlock();
 }
@@ -174,62 +172,54 @@ ITK_THREAD_RETURN_TYPE LoggerThreadWrapper< SimpleLoggerType >::ThreadFunction(v
 {
   struct MultiThreader:: ThreadInfoStruct *pInfo = (struct MultiThreader::ThreadInfoStruct *)pInfoStruct;
 
-  if ( pInfo == NULL )
+  if ( ( pInfo != ITK_NULLPTR ) && ( pInfo->UserData != ITK_NULLPTR ) )
     {
-    return ITK_THREAD_RETURN_VALUE;
-    }
 
-  if ( pInfo->UserData == NULL )
-    {
-    return ITK_THREAD_RETURN_VALUE;
-    }
-
-  LoggerThreadWrapper *pLogger = (LoggerThreadWrapper *)pInfo->UserData;
-
-  while ( 1 )
-    {
+    LoggerThreadWrapper *pLogger = (LoggerThreadWrapper *)pInfo->UserData;
 
-    pInfo->ActiveFlagLock->Lock();
-    int activeFlag = *pInfo->ActiveFlag;
-    pInfo->ActiveFlagLock->Unlock();
-    if ( !activeFlag )
+    while ( 1 )
       {
-      break;
-      }
 
-    pLogger->m_Mutex.Lock();
-    while ( !pLogger->m_OperationQ.empty() )
-      {
-      switch ( pLogger->m_OperationQ.front() )
+      pInfo->ActiveFlagLock->Lock();
+      int activeFlag = *pInfo->ActiveFlag;
+      pInfo->ActiveFlagLock->Unlock();
+      if ( !activeFlag )
+        {
+        break;
+        }
+
+      pLogger->m_Mutex.Lock();
+      while ( !pLogger->m_OperationQ.empty() )
         {
-        case Self::SET_PRIORITY_LEVEL:
-          pLogger->m_PriorityLevel = pLogger->m_LevelQ.front();
-          pLogger->m_LevelQ.pop();
-          break;
-
-        case Self::SET_LEVEL_FOR_FLUSHING:
-          pLogger->m_LevelForFlushing = pLogger->m_LevelQ.front();
-          pLogger->m_LevelQ.pop();
-          break;
-
-        case Self::ADD_LOG_OUTPUT:
-          pLogger->m_Output->AddLogOutput( pLogger->m_OutputQ.front() );
-          pLogger->m_OutputQ.pop();
-          break;
-
-        case Self::WRITE:
-          pLogger->SimpleLoggerType::Write( pLogger->m_LevelQ.front(), pLogger->m_MessageQ.front() );
-          pLogger->m_LevelQ.pop();
-          pLogger->m_MessageQ.pop();
-          break;
-        case Self::FLUSH:
-          pLogger->SimpleLoggerType::Flush();
-          break;
+        switch ( pLogger->m_OperationQ.front() )
+          {
+          case Self::SET_PRIORITY_LEVEL:
+            pLogger->m_PriorityLevel = pLogger->m_LevelQ.front();
+            pLogger->m_LevelQ.pop();
+            break;
+
+          case Self::SET_LEVEL_FOR_FLUSHING:
+            pLogger->m_LevelForFlushing = pLogger->m_LevelQ.front();
+            pLogger->m_LevelQ.pop();
+            break;
+
+          case Self::ADD_LOG_OUTPUT:
+            pLogger->m_Output->AddLogOutput( pLogger->m_OutputQ.front() );
+            pLogger->m_OutputQ.pop();
+            break;
+
+          case Self::WRITE:
+            pLogger->SimpleLoggerType::Write( pLogger->m_LevelQ.front(), pLogger->m_MessageQ.front() );
+            pLogger->m_LevelQ.pop();
+            pLogger->m_MessageQ.pop();
+            break;
+          }
+        pLogger->m_OperationQ.pop();
         }
-      pLogger->m_OperationQ.pop();
+      pLogger->m_Mutex.Unlock();
+      pLogger->SimpleLoggerType::Flush();
+      itksys::SystemTools::Delay(pLogger->GetDelay());
       }
-    pLogger->m_Mutex.Unlock();
-    itksys::SystemTools::Delay(pLogger->GetDelay());
     }
   return ITK_THREAD_RETURN_VALUE;
 }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMacro.h b/Utilities/ITK/Modules/Core/Common/include/itkMacro.h
index 0d8ef3b..61d601c 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMacro.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMacro.h
@@ -118,6 +118,23 @@ namespace itk
   #endif
 #endif
 
+#if __cplusplus >= 201103L
+// In c++11 the override keyword allows you to explicity define that a function
+// is intended to override the base-class version.  This makes the code more
+// managable and fixes a set of common hard-to-find bugs.
+#define ITK_OVERRIDE override
+// In c++11 there is an explicit nullptr type that introduces a new keyword to
+// serve as a distinguished null pointer constant: nullptr. It is of type
+// nullptr_t, which is implicitly convertible and comparable to any pointer type
+// or pointer-to-member type. It is not implicitly convertible or comparable to
+// integral types, except for bool.
+#define ITK_NULLPTR  nullptr
+#else
+#define ITK_OVERRIDE
+#define ITK_NULLPTR  NULL
+#endif
+
+
 /** Define two object creation methods.  The first method, New(),
  * creates an object from a class, potentially deferring to a factory.
  * The second method, CreateAnother(), creates an object from an
@@ -147,7 +164,7 @@ namespace itk
   static Pointer New(void)                                     \
     {                                                          \
     Pointer smartPtr = ::itk::ObjectFactory< x >::Create();    \
-    if ( smartPtr.GetPointer() == NULL )                       \
+    if ( smartPtr.GetPointer() == ITK_NULLPTR )                \
       {                                                        \
       smartPtr = new x;                                        \
       }                                                        \
@@ -156,7 +173,7 @@ namespace itk
     }
 
 #define itkCreateAnotherMacro(x)                               \
-  virtual::itk::LightObject::Pointer CreateAnother(void) const \
+  virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE \
     {                                                          \
     ::itk::LightObject::Pointer smartPtr;                      \
     smartPtr = x::New().GetPointer();                          \
@@ -196,7 +213,7 @@ namespace itk
     rawPtr->UnRegister();                                      \
     return smartPtr;                                           \
     }                                                          \
-  virtual::itk::LightObject::Pointer CreateAnother(void) const \
+  virtual::itk::LightObject::Pointer CreateAnother(void) const ITK_OVERRIDE \
     {                                                          \
     ::itk::LightObject::Pointer smartPtr;                      \
     smartPtr = x::New().GetPointer();                          \
@@ -275,7 +292,7 @@ extern ITKCommon_EXPORT void OutputWindowDisplayDebugText(const char *);
 
 #if defined( ITK_CPP_FUNCTION )
   #if defined( _WIN32 ) && !defined( __MINGW32__ ) && !defined( CABLE_CONFIGURATION ) \
-  && !defined( CSWIG )
+  && !defined( __GCCXML__ )
     #define ITK_LOCATION __FUNCSIG__
   #elif defined( __GNUC__ )
     #define ITK_LOCATION __PRETTY_FUNCTION__
@@ -399,7 +416,7 @@ itkTypeMacro(newexcp, parentexcp);
 //   itkLegacyMacro(void MyMethod());
 #if defined( ITK_LEGACY_REMOVE )
 #define itkLegacyMacro(method) /* no ';' */
-#elif defined( ITK_LEGACY_SILENT ) || defined( ITK_LEGACY_TEST ) || defined( CSWIG )
+#elif defined( ITK_LEGACY_SILENT ) || defined( ITK_LEGACY_TEST ) || defined( __GCCXML__ )
 // Provide legacy methods with no warnings.
 #define itkLegacyMacro(method) method
 #else
@@ -539,68 +556,6 @@ itkTypeMacro(newexcp, parentexcp);
 #define ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT(T)
 #endif
 
-//=============================================================================
-/* Choose a way to prevent template instantiation on this platform.
-  - ITK_TEMPLATE_DO_NOT_INSTANTIATE = use #pragma do_not_instantiate to
-                                      prevent instantiation
-  - ITK_TEMPLATE_EXTERN = use extern template to prevent instantiation
-*/
-#if defined( __INTEL_COMPILER ) && __INTEL_COMPILER >= 700
-#define ITK_TEMPLATE_EXTERN 1
-#elif defined( __GNUC__ ) && __GNUC__ >= 3
-#define ITK_TEMPLATE_EXTERN 1
-#elif defined( _MSC_VER )
-#define ITK_TEMPLATE_EXTERN 1
-#endif
-#if !defined( ITK_TEMPLATE_DO_NOT_INSTANTIATE )
-#define ITK_TEMPLATE_DO_NOT_INSTANTIATE 0
-#endif
-#if !defined( ITK_TEMPLATE_EXTERN )
-#define ITK_TEMPLATE_EXTERN 0
-#endif
-
-/* Define a macro to explicitly instantiate a template.
-  - ITK_TEMPLATE_EXPORT(X) =
-      Explicitly instantiate X, where X is of the form N(a1[,a2...,aN]).
-      examples: ITK_TEMPLATE_EXPORT(1(class Foo<int>))
-                ITK_TEMPLATE_EXPORT(2(class Bar<int, char>))
-      Use one level of expansion delay to allow user code to have
-      a macro determining the number of arguments. */
-#define ITK_TEMPLATE_EXPORT(x) ITK_TEMPLATE_EXPORT_DELAY(x)
-#define ITK_TEMPLATE_EXPORT_DELAY(x) template ITK_TEMPLATE_##x;
-
-/* Define a macro to prevent template instantiations.
-  - ITK_TEMPLATE_IMPORT(X) =
-      Prevent instantiation of X, where X is of the form N(a1[,a2...,aN]).
-      examples: ITK_TEMPLATE_IMPORT(1(class Foo<int>))
-                ITK_TEMPLATE_IMPORT(2(class Bar<int, char>))
-      Use one level of expansion delay to allow user code to have
-      a macro determining the number of arguments.
-*/
-#if ITK_TEMPLATE_EXTERN
-#define ITK_TEMPLATE_IMPORT_DELAY(x) extern template ITK_TEMPLATE_##x;
-#elif ITK_TEMPLATE_DO_NOT_INSTANTIATE
-#define ITK_TEMPLATE_IMPORT_DELAY(x) \
-  ITK_TEMPLATE_IMPORT_IMPL(do_not_instantiate ITK_TEMPLATE_##x)
-#define ITK_TEMPLATE_IMPORT_IMPL(x) _Pragma(#x)
-#endif
-#if defined( ITK_TEMPLATE_IMPORT_DELAY )
-#define ITK_TEMPLATE_IMPORT(x) ITK_TEMPLATE_IMPORT_DELAY(x)
-#define ITK_TEMPLATE_IMPORT_WORKS 1
-#else
-#define ITK_TEMPLATE_IMPORT(x)
-#define ITK_TEMPLATE_IMPORT_WORKS 0
-#endif
-
-//=============================================================================
-
-/* Define macros to export and import template instantiations for each
-   library in ITK.  */
-#define ITK_EXPORT_ITKCommon(c, x, n) \
-  ITK_EXPORT_TEMPLATE(ITKCommon_EXPORT, c, x, n)
-#define ITK_IMPORT_ITKCommon(c, x, n) \
-  ITK_IMPORT_TEMPLATE(ITKCommon_EXPORT, c, x, n)
-
 //--------------------------------------------------------------------------------
 //  Helper macros for Template Meta-Programming techniques of for-loops
 // unrolling
@@ -703,6 +658,7 @@ TTarget itkDynamicCastInDebugMode(TSource x)
 #else
   return static_cast<TTarget>(x);
 #endif
+}
 
 //  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 //  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -721,7 +677,7 @@ TTarget itkDynamicCastInDebugMode(TSource x)
   virtual void Set##name(const type *_arg)                                        \
     {                                                                             \
     itkDebugMacro("setting input " #name " to " << _arg);                         \
-    if ( _arg != static_cast< type * >( this->ProcessObject::GetInput(#name) ) )  \
+    if ( _arg != itkDynamicCastInDebugMode< type * >( this->ProcessObject::GetInput(#name) ) )  \
       {                                                                           \
       this->ProcessObject::SetInput( #name, const_cast< type * >( _arg ) );       \
       this->Modified();                                                           \
@@ -732,9 +688,8 @@ TTarget itkDynamicCastInDebugMode(TSource x)
 #define itkGetInputMacro(name, type)                                                                            \
   virtual const type * Get##name() const                                                                        \
     {                                                                                                           \
-    itkDebugMacro( "returning input " << #name " of "                                                           \
-                                      << static_cast< const type * >( this->ProcessObject::GetInput(#name) ) ); \
-    return static_cast< const type * >( this->ProcessObject::GetInput(#name) );                                 \
+    itkDebugMacro( "returning input " << #name " of " <<  this->ProcessObject::GetInput(#name) );               \
+    return itkDynamicCastInDebugMode< const type * >( this->ProcessObject::GetInput(#name) );                   \
     }
 
 /** Set a decorated input. This defines the Set"name"() and a Set"name"Input() method */
@@ -742,7 +697,7 @@ TTarget itkDynamicCastInDebugMode(TSource x)
   virtual void Set##name##Input(const SimpleDataObjectDecorator< type > *_arg)                                \
     {                                                                                                         \
     itkDebugMacro("setting input " #name " to " << _arg);                                                     \
-    if ( _arg != static_cast< SimpleDataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) ) ) \
+    if ( _arg != itkDynamicCastInDebugMode< SimpleDataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) ) ) \
       {                                                                                                       \
       this->ProcessObject::SetInput( #name, const_cast< SimpleDataObjectDecorator< type > * >( _arg ) );      \
       this->Modified();                                                                                       \
@@ -753,7 +708,7 @@ TTarget itkDynamicCastInDebugMode(TSource x)
     typedef SimpleDataObjectDecorator< type > DecoratorType;         \
     itkDebugMacro("setting input " #name " to " << _arg);            \
     const DecoratorType *oldInput =                                  \
-      static_cast< const DecoratorType * >(                          \
+      itkDynamicCastInDebugMode< const DecoratorType * >(            \
         this->ProcessObject::GetInput(#name) );                      \
     if ( oldInput && oldInput->Get() == _arg )                       \
       {                                                              \
@@ -768,18 +723,17 @@ TTarget itkDynamicCastInDebugMode(TSource x)
 #define itkGetDecoratedInputMacro(name, type)                                                                 \
   virtual const SimpleDataObjectDecorator< type > * Get##name##Input() const                                                                 \
     {                                                                                                                                        \
-    itkDebugMacro( "returning input " << #name " of "                                                                                        \
-                                      << static_cast< const SimpleDataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) ) ); \
-    return static_cast< const SimpleDataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) );                                 \
+    itkDebugMacro( "returning input " << #name " of " << this->ProcessObject::GetInput(#name) );                                             \
+    return itkDynamicCastInDebugMode< const SimpleDataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) );                   \
     }                                                                \
   virtual const type & Get##name() const                             \
     {                                                                \
     itkDebugMacro("Getting input " #name);                           \
     typedef SimpleDataObjectDecorator< type > DecoratorType;         \
     const DecoratorType *input =                                     \
-      static_cast< const DecoratorType * >(                          \
+      itkDynamicCastInDebugMode< const DecoratorType * >(            \
         this->ProcessObject::GetInput(#name) );                      \
-    if( input == NULL )                                              \
+    if( input == ITK_NULLPTR )                                       \
       {                                                              \
       itkExceptionMacro(<<"input" #name " is not set");              \
       }                                                              \
@@ -800,7 +754,7 @@ TTarget itkDynamicCastInDebugMode(TSource x)
   virtual void Set##name##Input(const DataObjectDecorator< type > *_arg)                                \
     {                                                                                                   \
     itkDebugMacro("setting input " #name " to " << _arg);                                               \
-    if ( _arg != static_cast< DataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) ) ) \
+    if ( _arg != itkDynamicCastInDebugMode< DataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) ) ) \
       {                                                                                                 \
       this->ProcessObject::SetInput( #name, const_cast< DataObjectDecorator< type > * >( _arg ) );      \
       this->Modified();                                                                                 \
@@ -811,7 +765,7 @@ TTarget itkDynamicCastInDebugMode(TSource x)
     typedef DataObjectDecorator< type > DecoratorType;               \
     itkDebugMacro("setting input " #name " to " << _arg);            \
     const DecoratorType *oldInput =                                  \
-      static_cast< const DecoratorType * >(                          \
+      itkDynamicCastInDebugMode< const DecoratorType * >(            \
         this->ProcessObject::GetInput(#name) );                      \
     if ( oldInput && oldInput->Get() == _arg )                       \
       {                                                              \
@@ -829,20 +783,19 @@ TTarget itkDynamicCastInDebugMode(TSource x)
 #define itkGetDecoratedObjectInputMacro(name, type)          \
   virtual const DataObjectDecorator< type > * Get##name##Input() const                                                                 \
     {                                                                                                                                  \
-    itkDebugMacro( "returning input " << #name " of "                                                                                  \
-                                      << static_cast< const DataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) ) ); \
-    return static_cast< const DataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) );                                 \
+      itkDebugMacro( "returning input " << #name " of "<< this->ProcessObject::GetInput(#name) );                                      \
+    return itkDynamicCastInDebugMode< const DataObjectDecorator< type > * >( this->ProcessObject::GetInput(#name) );                   \
     }                                                                \
   virtual const type * Get##name() const                             \
     {                                                                \
     itkDebugMacro("Getting input " #name);                           \
     typedef DataObjectDecorator< type > DecoratorType;               \
     const DecoratorType *input =                                     \
-      static_cast< const DecoratorType * >(                          \
+      itkDynamicCastInDebugMode< const DecoratorType * >(            \
         this->ProcessObject::GetInput(#name) );                      \
-    if( input == NULL )                                              \
+    if( input == ITK_NULLPTR )                                       \
       {                                                              \
-      itkExceptionMacro(<<"input" #name " is not set");              \
+      return ITK_NULLPTR;                                            \
       }                                                              \
     return input->Get();                                             \
     }
@@ -1137,6 +1090,17 @@ class kernel                  \
     return kernel::GetOpenCLSource();  \
   }
 
-}
+// A useful macro in the PrintSelf method for printing member variables
+// which are pointers to object based on the LightObject class.
+#define itkPrintSelfObjectMacro(name)                                 \
+  if (static_cast<const LightObject*>(this->m_##name) == ITK_NULLPTR) \
+    {                                                                 \
+    os << indent << #name << ": (null)" << std::endl;                 \
+    }                                                                 \
+  else                                                                \
+    {                                                                 \
+    os << indent << #name << ": " << std::endl;                       \
+    this->m_##name->Print(os,indent.GetNextIndent());                 \
+    }
 
 #endif //end of itkMacro.h
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMath.h b/Utilities/ITK/Modules/Core/Common/include/itkMath.h
index 5727098..6e3372d 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMath.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMath.h
@@ -261,7 +261,7 @@ FloatAlmostEqual( T x1, T x2,
 {
   // Check if the numbers are really close -- needed
   // when comparing numbers near zero.
-  const T absDifference = vcl_abs(x1 - x2);
+  const T absDifference = std::abs(x1 - x2);
   if ( absDifference <= maxAbsoluteDifference )
     {
     return true;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMemoryProbe.h b/Utilities/ITK/Modules/Core/Common/include/itkMemoryProbe.h
index 5f30c4b..a1940c9 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMemoryProbe.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMemoryProbe.h
@@ -51,7 +51,7 @@ public:
   typedef double MeanMemoryLoadType;
 
 protected:
-  virtual MemoryLoadType GetInstantValue(void) const;
+  virtual MemoryLoadType GetInstantValue(void) const ITK_OVERRIDE;
 
 private:
   mutable MemoryUsageObserver m_MemoryObserver;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMemoryUsageObserver.h b/Utilities/ITK/Modules/Core/Common/include/itkMemoryUsageObserver.h
index 14abe98..2356acf 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMemoryUsageObserver.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMemoryUsageObserver.h
@@ -95,7 +95,7 @@ class ITKCommon_EXPORT MacOSXMemoryUsageObserver:public MemoryUsageObserverBase
 public:
   /** destructor */
   virtual ~MacOSXMemoryUsageObserver();
-  virtual MemoryLoadType GetMemoryUsage();
+  virtual MemoryLoadType GetMemoryUsage() ITK_OVERRIDE;
 };
 #endif // Mac OS X
 
@@ -115,7 +115,7 @@ class ITKCommon_EXPORT SysResourceMemoryUsageObserver:public MemoryUsageObserver
 public:
   /** destructor */
   virtual ~SysResourceMemoryUsageObserver();
-  virtual MemoryLoadType GetMemoryUsage();
+  virtual MemoryLoadType GetMemoryUsage() ITK_OVERRIDE;
 };
 #if !defined( __APPLE__ ) && !defined( __SUNPRO_CC ) && !defined ( __sun__ ) && !defined( __FreeBSD__ ) \
   && !defined( __OpenBSD__ )
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h b/Utilities/ITK/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h
index 7007e67..6d441ff 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMersenneTwisterRandomVariateGenerator.h
@@ -22,9 +22,9 @@
 #include "itkObjectFactory.h"
 #include "itkRandomVariateGeneratorBase.h"
 #include "itkIntTypes.h"
-#include "vcl_ctime.h"
 #include "vnl/vnl_math.h"
 #include <climits>
+#include <ctime>
 
 namespace itk
 {
@@ -33,7 +33,9 @@ namespace Statistics
 /** \class MersenneTwisterRandomVariateGenerator
  * \brief MersenneTwisterRandom random variate generator
  *
- * \warning This class is NOT reentrant.
+ * \warning This class's instance methods are NOT neither reentrant
+ * nor thread-safe, but static methods are both. That is to say you
+ * can use separate objects concurrently.
  *
  * This notice was included with the original implementation.
  * The only changes made were to obfuscate the author's email addresses.
@@ -119,16 +121,19 @@ public:
   itkTypeMacro(MersenneTwisterRandomVariateGenerator,
                RandomVariateGeneratorBase);
 
-  /** Method for creation through the object factory.
-      This method allocates a new instance of a Mersenne Twister,
-      and initializes it with the seed from the global instance. */
+  /** \brief Method for creation through the object factory.
+   *
+   *  This method allocates a new instance of a Mersenne Twister,
+   *  and initializes it with the seed from the global instance.
+   */
   static Pointer New();
 
   /** returns the global Merseene Twister instance
-      This method returns a Singleton of the Mersenne Twister.
-      The seed is initialized from the wall clock, but can be
-      set using SetSeed().
-  */
+   *
+   *   This method returns a Singleton of the Mersenne Twister.
+   *   The seed is initialized from the wall clock, but can be
+   *   set using SetSeed().
+   */
   static Pointer GetInstance();
 
   /** Length of state vector */
@@ -137,7 +142,7 @@ public:
   /** initialize with a simple IntegerType */
   void Initialize(const IntegerType oneSeed);
 
-  /* Initialize with vcl_clock time */
+  /* Initialize with clock time */
   void Initialize();
 
   /** Get a random variate in the range [0, 1] */
@@ -182,16 +187,16 @@ public:
    * values together, otherwise the generator state can be learned after
    * reading 624 consecutive values.
    */
-  virtual double GetVariate();
+  virtual double GetVariate() ITK_OVERRIDE;
 
   /** Same as GetVariate() */
   double operator()();
 
-  // Re-seeding functions with same behavior as initializers
+  /** Re-seeding functions with same behavior as initializers */
   inline void SetSeed(const IntegerType oneSeed);
-  // inline void SetSeed(IntegerType *bigSeed, const IntegerType seedLength = StateVectorLength);
   inline void SetSeed();
-  // Return the current seed
+
+  /** Return the current seed */
   IntegerType GetSeed() { return this->m_Seed; };
 
   /*
@@ -203,24 +208,7 @@ public:
 protected:
   inline MersenneTwisterRandomVariateGenerator();
   virtual ~MersenneTwisterRandomVariateGenerator() {}
-  virtual void PrintSelf(std::ostream & os, Indent indent) const
-  {
-    Superclass::PrintSelf(os, indent);
-
-    // Print state vector contents
-    os << indent << "State vector: " << state << std::endl;
-    os << indent;
-    register const IntegerType *s = state;
-    register int                i = StateVectorLength;
-    for (; i--; os << *s++ << "\t" ) {}
-    os << std::endl;
-
-    //Print next value to be gotten from state
-    os << indent << "Next value to be gotten from state: " << pNext << std::endl;
-
-    //Number of values left before reload
-    os << indent << "Values left before next reload: " << left << std::endl;
-  }
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   // period parameter
   itkStaticConstMacro (M, unsigned int, 397);
@@ -247,42 +235,21 @@ protected:
     return m ^ ( mixBits(s0, s1) >> 1 ) ^ ( -static_cast<int32_t>(loBit(s1)) & 0x9908b0df );
   }
 
-  static IntegerType hash(vcl_time_t t, vcl_clock_t c);
-
-  static Pointer m_Instance;
-};  // end of class
-
-// Declare inlined functions.... (must be declared in the header)
+  static IntegerType hash(time_t t, clock_t c);
 
-inline MersenneTwisterRandomVariateGenerator::IntegerType
-MersenneTwisterRandomVariateGenerator::hash(vcl_time_t t, vcl_clock_t c)
-{
-  // Get a IntegerType from t and c
-  // Better than IntegerType(x) in case x is floating point in [0,1]
-  // Based on code by Lawrence Kirby: fred at genesis dot demon dot co dot uk
+private:
 
-  static IntegerType differ = 0;  // guarantee time-based seeds will change
+  /** Internal method to actually create a new object. */
+  static Pointer CreateInstance();
 
-  IntegerType    h1 = 0;
-  unsigned char *p = (unsigned char *)&t;
+  // Static/Global Variable need to be thread-safely accessed
+  static Pointer             m_StaticInstance;
+  static SimpleFastMutexLock m_StaticInstanceLock;
+  static IntegerType         m_StaticDiffer;
 
-  const unsigned int sizeOfT = static_cast< unsigned int >( sizeof(t) );
-  for ( unsigned int i = 0; i < sizeOfT; ++i )
-    {
-    h1 *= UCHAR_MAX + 2U;
-    h1 += p[i];
-    }
-  IntegerType h2 = 0;
-  p = (unsigned char *)&c;
+};  // end of class
 
-  const unsigned int sizeOfC = static_cast< unsigned int >( sizeof(c) );
-  for ( unsigned int j = 0; j < sizeOfC; ++j )
-    {
-    h2 *= UCHAR_MAX + 2U;
-    h2 += p[j];
-    }
-  return ( h1 + differ++ ) ^ h2;
-}
+// Declare inlined functions.... (must be declared in the header)
 
 inline void
 MersenneTwisterRandomVariateGenerator::Initialize(const IntegerType seed)
@@ -292,9 +259,9 @@ MersenneTwisterRandomVariateGenerator::Initialize(const IntegerType seed)
   // See Knuth TAOCP Vol 2, 3rd Ed, p.106 for multiplier.
   // In previous versions, most significant bits (MSBs) of the seed affect
   // only MSBs of the state array.  Modified 9 Jan 2002 by Makoto Matsumoto.
-  register IntegerType *s = state;
-  register IntegerType *r = state;
-  register IntegerType  i = 1;
+  IntegerType *s = state;
+  IntegerType *r = state;
+  IntegerType  i = 1;
 
   *s++ = seed & 0xffffffffUL;
   for ( i = 1; i < MersenneTwisterRandomVariateGenerator::StateVectorLength; ++i )
@@ -312,11 +279,11 @@ MersenneTwisterRandomVariateGenerator::reload()
   // matthew dot bellew at home dot com
 
   // get rid of VS warning
-  register int index = static_cast< int >(
+  int index = static_cast< int >(
     M - MersenneTwisterRandomVariateGenerator::StateVectorLength );
 
-  register IntegerType *p = state;
-  register int          i;
+  IntegerType *p = state;
+  int          i;
 
   for ( i = MersenneTwisterRandomVariateGenerator::StateVectorLength - M; i--; ++p )
     {
@@ -331,58 +298,6 @@ MersenneTwisterRandomVariateGenerator::reload()
   left = MersenneTwisterRandomVariateGenerator::StateVectorLength, pNext = state;
 }
 
-  /*
-#define SVL 624
-inline void
-MersenneTwisterRandomVariateGenerator::SetSeed(
-  IntegerType *const bigSeed, const IntegerType seedLength)
-{
-  // Seed the generator with an array of IntegerType's
-  // There are 2^19937-1 possible initial states.  This function allows
-  // all of those to be accessed by providing at least 19937 bits (with a
-  // default seed length of StateVectorLength = 624 IntegerType's).
-  // Any bits above the lower 32
-  // in each element are discarded.
-  // Just call seed() if you want to get array from /dev/urandom
-  Initialize(19650218UL);
-  register IntegerType i = 1;
-  register IntegerType j = 0;
-  register int         k;
-  if ( StateVectorLength > seedLength )
-    {
-    k = StateVectorLength;
-    }
-  else
-    {
-    k = seedLength;
-    }
-  for (; k; --k )
-    {
-    state[i] =
-      state[i] ^ ( ( state[i - 1] ^ ( state[i - 1] >> 30 ) ) * 1664525UL );
-    state[i] += ( bigSeed[j] & 0xffffffffUL ) + j;
-    state[i] &= 0xffffffffUL;
-    ++i;  ++j;
-    if ( i >= StateVectorLength ) { state[0] = state[StateVectorLength - 1];  i = 1; }
-    if ( j >= seedLength ) { j = 0; }
-    }
-  for ( k = StateVectorLength - 1; k; --k )
-    {
-    state[i] =
-      state[i] ^ ( ( state[i - 1] ^ ( state[i - 1] >> 30 ) ) * 1566083941UL );
-    state[i] -= i;
-    state[i] &= 0xffffffffUL;
-    ++i;
-    if ( i >= SVL )
-      {
-      state[0] = state[StateVectorLength - 1];  i = 1;
-      }
-    }
-  state[0] = 0x80000000UL;  // MSB is 1, assuring non-zero initial array
-  reload();
-}
-  */
-
 inline void
 MersenneTwisterRandomVariateGenerator::Initialize()
 {
@@ -401,7 +316,7 @@ inline void
 MersenneTwisterRandomVariateGenerator::SetSeed()
 {
   // use time() and clock() to generate a unlikely-to-repeat seed.
-  SetSeed( hash( vcl_time(0), vcl_clock() ) );
+  SetSeed( hash( time(ITK_NULLPTR), clock() ) );
 }
 
 /** Get an integer variate in [0, 2^32-1] */
@@ -411,8 +326,7 @@ MersenneTwisterRandomVariateGenerator::GetIntegerVariate()
   if ( left == 0 ) { reload(); }
   --left;
 
-  register IntegerType s1;
-  s1 = *pNext++;
+  IntegerType s1 = *pNext++;
   s1 ^= ( s1 >> 11 );
   s1 ^= ( s1 <<  7 ) & 0x9d2c5680;
   s1 ^= ( s1 << 15 ) & 0xefc60000;
@@ -507,11 +421,11 @@ MersenneTwisterRandomVariateGenerator::GetNormalVariate(
 {
   // Return a real number from a normal (Gaussian) distribution with given
   // mean and variance by Box-Muller method
-  double r = vcl_sqrt(-2.0 * vcl_log( 1.0 - GetVariateWithOpenRange() ) * variance);
+  double r = std::sqrt(-2.0 * std::log( 1.0 - GetVariateWithOpenRange() ) * variance);
   double phi = 2.0 * vnl_math::pi
                * GetVariateWithOpenUpperRange();
 
-  return mean + r *vcl_cos(phi);
+  return mean + r *std::cos(phi);
 }
 
 /* Access to a uniform random number distribution */
@@ -537,12 +451,6 @@ MersenneTwisterRandomVariateGenerator::operator()()
   return GetVariate();
 }
 
-inline
-MersenneTwisterRandomVariateGenerator::MersenneTwisterRandomVariateGenerator()
-{
-  SetSeed (121212);
-}
-
 /* Change log from MTRand.h */
 // Change log:
 //
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObject.h b/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObject.h
index f1d5499..8e3040c 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObject.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObject.h
@@ -30,8 +30,8 @@
 
 #include "itkMetaDataDictionary.h"
 #include "itkMacro.h"
-#include "itkCommand.h"
-#include "itkFastMutexLock.h"
+#include "itkArray.h"
+#include "itkMatrix.h"
 
 #include <cstring>
 
@@ -86,32 +86,12 @@ public:
   itkTypeMacro(MetaDataObject, MetaDataObjectBase);
 
   /**
-   * Default constructor with no initialization.
-   * \author Hans J. Johnson
-   */
-  MetaDataObject(void);
-  /**
-   * Default virtual Destructor
-   * \author Hans J. Johnson
-   */
-  virtual ~MetaDataObject(void);
-  /**
-   * Initializer constructor that sets m_MetaDataObjectValue to InitializerValue
-   * \author Hans J. Johnson
-   */
-  MetaDataObject(const MetaDataObjectType InitializerValue);
-  /**
-   * Copy constructor that sets m_MetaDataObjectValue to TemplateObject.m_MetaDataObjectValue
-   * \author Hans J. Johnson
-   */
-  MetaDataObject(const MetaDataObject< MetaDataObjectType > & TemplateObject);
-  /**
    * The definition of this function is necessary to fulfill
    * the interface of the MetaDataObjectBase
    * \author Hans J. Johnson
    * \return A pointer to a const char array containing the unique type name.
    */
-  virtual const char * GetMetaDataObjectTypeName(void) const;
+  virtual const char * GetMetaDataObjectTypeName() const ITK_OVERRIDE;
 
   /**
    * The definition of this function is necessary to fulfill
@@ -119,32 +99,35 @@ public:
    * \author Hans J. Johnson
    * \return A constant reference to a std::type_info object
    */
-  virtual const std::type_info & GetMetaDataObjectTypeInfo(void) const;
+  virtual const std::type_info & GetMetaDataObjectTypeInfo() const ITK_OVERRIDE;
 
   /**
    * Function to return the stored value of type MetaDataObjectType.
    * \author Hans J. Johnson
    * \return a constant reference to a MetaDataObjectType
    */
-  const MetaDataObjectType & GetMetaDataObjectValue(void) const;
+  const MetaDataObjectType & GetMetaDataObjectValue() const;
 
   /**
    * Function to set the stored value of type MetaDataObjectType.
    * \author Hans J. Johnson
-   * \param NewValue A constant reference to at MetaDataObjectType.
+   * \param newValue A constant reference to at MetaDataObjectType.
    */
-  void SetMetaDataObjectValue(const MetaDataObjectType & NewValue);
+  void SetMetaDataObjectValue(const MetaDataObjectType & newValue);
 
   /**
    * Defines the default behavior for printing out this element
    * \param os An output stream
    */
-  virtual void Print(std::ostream & os) const;
+  virtual void Print(std::ostream & os) const ITK_OVERRIDE;
+
+protected:
+  MetaDataObject();
+  virtual ~MetaDataObject();
 
 private:
-  // This is made private to force the use of the
-  // MetaDataObject<MetaDataObjectType>::New() operator!
-  //void * operator new(SizeValueType nothing) {};//purposefully not implemented
+  MetaDataObject(const Self &); // purposely not implemented
+  void operator=(const Self &); // purposely not implemented
 
   /**
    * A variable to store this derived type.
@@ -195,47 +178,68 @@ inline bool ExposeMetaData(const MetaDataDictionary & Dictionary, const std::str
 
   const MetaDataObjectBase::ConstPointer baseObjectSmartPointer = Dictionary[key];
 
-  if ( baseObjectSmartPointer.IsNull() || strcmp( typeid( T ).name(), baseObjectSmartPointer->GetMetaDataObjectTypeName() ) != 0 )
+  MetaDataObject< T > const * const TempMetaDataObject = dynamic_cast< MetaDataObject< T > const * >( baseObjectSmartPointer.GetPointer() );
+  if ( TempMetaDataObject == ITK_NULLPTR )
     {
     return false;
     }
-    {
-    MetaDataObject< T > const * const TempMetaDataObject = dynamic_cast< MetaDataObject< T > const * >( baseObjectSmartPointer.GetPointer() );
-    if ( TempMetaDataObject != NULL )
-      {
-      outval = TempMetaDataObject->GetMetaDataObjectValue();
-      }
-    else
-      {
-      return false;
-      }
-    }
+
+  outval = TempMetaDataObject->GetMetaDataObjectValue();
   return true;
 }
+
+#ifndef ITK_TEMPLATE_EXPLICIT_MetaDataObject
+// Explicit instantiation is required to ensure correct dynamic_cast
+// behavior across shared libraries.
+#if defined( ITKCommon_EXPORTS )
+// don't use export
+#define ITKCommon_EXPORT_EXPLICIT
+#else
+// only import/hidden
+#define ITKCommon_EXPORT_EXPLICIT ITKCommon_EXPORT
+#endif
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< bool >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< unsigned char >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< char >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< signed char >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< unsigned short >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< short >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< unsigned int >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< int >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< unsigned long >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< long >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< float >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< double >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< std::string >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< std::vector<float> >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< std::vector<double> >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< std::vector<std::vector<float> > >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< std::vector<std::vector<double> > >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< Array<char> >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< Array<int> >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< Array<float> >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< Array<double> >;
+extern template class ITKCommon_EXPORT_EXPLICIT MetaDataObject< Matrix<double> >;
+#undef ITKCommon_EXPORT_EXPLICIT
+#endif
+
 } // end namespace itk
 
 /**
- * \def NATIVE_TYPE_METADATAPRINT( TYPE_NAME )
+ * \def ITK_NATIVE_TYPE_METADATAPRINT( TYPE_NAME )
  * \brief An ugly macro to facilitate creating a simple implementation of
  * the MetaDataObject<Type>::Print() function for types that
  * have operator<< defined.
  * \param TYPE_NAME the native type parameter type
  */
-#define NATIVE_TYPE_METADATAPRINT(TYPE_NAME)        \
+#define ITK_NATIVE_TYPE_METADATAPRINT(TYPE_NAME)        \
   template< >                                       \
   void                                              \
-  itk::MetaDataObject< TYPE_NAME >                  \
+  ::itk::MetaDataObject< TYPE_NAME >                  \
   ::Print(std::ostream & os) const                  \
     {                                               \
     os << this->m_MetaDataObjectValue << std::endl; \
     }                                               \
-  template< >                                       \
-  void                                              \
-  itk::MetaDataObject< const TYPE_NAME >            \
-  ::Print(std::ostream & os) const                  \
-    {                                               \
-    os << this->m_MetaDataObjectValue << std::endl; \
-    }
 
 /**
  * \def ITK_OBJECT_TYPE_METADATAPRINT_1COMMA( TYPE_NAME_PART1, TYPE_NAME_PART2 )
@@ -253,13 +257,6 @@ inline bool ExposeMetaData(const MetaDataDictionary & Dictionary, const std::str
     {                                                                          \
     this->m_MetaDataObjectValue->Print(os);                                    \
     }                                                                          \
-  template< >                                                                  \
-  void                                                                         \
-  itk::MetaDataObject< const TYPE_NAME_PART1, TYPE_NAME_PART2 >                \
-  ::Print(std::ostream & os) const                                             \
-    {                                                                          \
-    this->m_MetaDataObjectValue->Print(os);                                    \
-    }
 
 /**
  * \def ITK_IMAGE_TYPE_METADATAPRINT( STORAGE_TYPE )
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObject.hxx b/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObject.hxx
index 9554055..1290b8e 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObject.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObject.hxx
@@ -32,40 +32,24 @@
 
 namespace itk
 {
-template< typename MetaDataObjectType >
-MetaDataObject< MetaDataObjectType >
-::MetaDataObject(void)
-{
-  //Nothing to do, m_MetaDataObjectValue takes this types default value.
-}
-
-template< typename MetaDataObjectType >
-MetaDataObject< MetaDataObjectType >
-::~MetaDataObject(void)
-{
-  //Nothing to do here.
-}
 
 template< typename MetaDataObjectType >
 MetaDataObject< MetaDataObjectType >
-::MetaDataObject(const MetaDataObjectType InitializerValue):
-  m_MetaDataObjectValue(InitializerValue)
+::MetaDataObject()
 {
-  //Nothing to be done here
+  // m_MetaDataObjectValue takes this types default value.
 }
 
 template< typename MetaDataObjectType >
 MetaDataObject< MetaDataObjectType >
-::MetaDataObject(const MetaDataObject< MetaDataObjectType > & TemplateObject):
-  Superclass(), m_MetaDataObjectValue(TemplateObject.m_MetaDataObjectValue)
+::~MetaDataObject()
 {
-  //Nothing to be done here
 }
 
 template< typename MetaDataObjectType >
 const char *
 MetaDataObject< MetaDataObjectType >
-::GetMetaDataObjectTypeName(void) const
+::GetMetaDataObjectTypeName() const
 {
   return typeid( MetaDataObjectType ).name();
 }
@@ -73,7 +57,7 @@ MetaDataObject< MetaDataObjectType >
 template< typename MetaDataObjectType >
 const std::type_info &
 MetaDataObject< MetaDataObjectType >
-::GetMetaDataObjectTypeInfo(void) const
+::GetMetaDataObjectTypeInfo() const
 {
   return typeid( MetaDataObjectType );
 }
@@ -81,7 +65,7 @@ MetaDataObject< MetaDataObjectType >
 template< typename MetaDataObjectType >
 const MetaDataObjectType &
 MetaDataObject< MetaDataObjectType >
-::GetMetaDataObjectValue(void) const
+::GetMetaDataObjectValue() const
 {
   return m_MetaDataObjectValue;
 }
@@ -89,9 +73,9 @@ MetaDataObject< MetaDataObjectType >
 template< typename MetaDataObjectType >
 void
 MetaDataObject< MetaDataObjectType >
-::SetMetaDataObjectValue(const MetaDataObjectType & NewValue)
+::SetMetaDataObjectValue(const MetaDataObjectType & newValue)
 {
-  m_MetaDataObjectValue = NewValue;
+  m_MetaDataObjectValue = newValue;
 }
 
 template< typename MetaDataObjectType >
@@ -101,6 +85,7 @@ MetaDataObject< MetaDataObjectType >
 {
   Superclass::Print(os);
 }
+
 } // end namespace itk
 
 #endif
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObjectBase.h b/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObjectBase.h
index da4476a..0ab5995 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObjectBase.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMetaDataObjectBase.h
@@ -44,7 +44,7 @@ namespace itk
  * \author Hans J. Johnson
  * \ingroup ITKCommon
  */
-class ITKCommon_EXPORT MetaDataObjectBase:public LightObject
+class ITKCommon_EXPORT MetaDataObjectBase: public LightObject
 {
 public:
   /** Smart pointer typedef support. */
@@ -60,32 +60,25 @@ public:
    * \author Hans J. Johnson
    * \return A pointer to a const char array containing the unique type name.
    */
-  virtual const char * GetMetaDataObjectTypeName(void) const;
+  virtual const char * GetMetaDataObjectTypeName() const;
 
   /**
    * \author Hans J. Johnson
    * \return A constant reference to a std::type_info object
    */
-  virtual const std::type_info & GetMetaDataObjectTypeInfo(void) const;
+  virtual const std::type_info & GetMetaDataObjectTypeInfo() const;
 
   /**
    * Defines the default behavior for printing out this element
    * \param os An output stream
    */
-  virtual void Print(std::ostream & os) const;
+  virtual void Print( std::ostream & os ) const;
 
 protected:
-  /** Method for creation through the object factory.   */
-  // Should not be able to construct a new MetaDataObjectBase
-//       static  Pointer New(void);
-/**
- * Default destructor
- */
-  virtual ~MetaDataObjectBase();
   MetaDataObjectBase();
+  virtual ~MetaDataObjectBase();
 
 private:
-  //void * operator new(size_t nothing) {};//purposefully not implemented
   MetaDataObjectBase(const Self &); //purposely not implemented
   void operator=(const Self &);     //purposely not implemented
 };
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h b/Utilities/ITK/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h
index 45d5ea4..64c594a 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.h
@@ -104,7 +104,7 @@ public:
 protected:
   MinimumMaximumImageCalculator();
   virtual ~MinimumMaximumImageCalculator() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   MinimumMaximumImageCalculator(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.hxx
index fae3dcb..8978b27 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMinimumMaximumImageCalculator.hxx
@@ -151,8 +151,7 @@ MinimumMaximumImageCalculator< TInputImage >
      << std::endl;
   os << indent << "Index of Minimum: " << m_IndexOfMinimum << std::endl;
   os << indent << "Index of Maximum: " << m_IndexOfMaximum << std::endl;
-  os << indent << "Image: " << std::endl;
-  m_Image->Print( os, indent.GetNextIndent() );
+  itkPrintSelfObjectMacro( Image );
   os << indent << "Region: " << std::endl;
   m_Region.Print( os, indent.GetNextIndent() );
   os << indent << "Region set by User: " << m_RegionSetByUser << std::endl;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMultiThreader.h b/Utilities/ITK/Modules/Core/Common/include/itkMultiThreader.h
index abdec58..e5589fb 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMultiThreader.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMultiThreader.h
@@ -147,7 +147,7 @@ public:
 protected:
   MultiThreader();
   ~MultiThreader();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   MultiThreader(const Self &);  //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMultipleLogOutput.h b/Utilities/ITK/Modules/Core/Common/include/itkMultipleLogOutput.h
index 7db2e55..b49e277 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMultipleLogOutput.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMultipleLogOutput.h
@@ -59,16 +59,16 @@ public:
   void AddLogOutput(OutputType *output);
 
   /** Broadcast a flush operation to all the output streams */
-  virtual void Flush();
+  virtual void Flush() ITK_OVERRIDE;
 
   /** Write to multiple outputs */
-  virtual void Write(double timestamp);
+  virtual void Write(double timestamp) ITK_OVERRIDE;
 
   /** Write to multiple outputs */
-  virtual void Write(const std::string & content);
+  virtual void Write(const std::string & content) ITK_OVERRIDE;
 
   /** Write to a buffer */
-  virtual void Write(const std::string & content, double timestamp);
+  virtual void Write(const std::string & content, double timestamp) ITK_OVERRIDE;
 
 protected:
   /** Constructor */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkMutexLock.h b/Utilities/ITK/Modules/Core/Common/include/itkMutexLock.h
index ba5d4fa..1c41242 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkMutexLock.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkMutexLock.h
@@ -120,7 +120,7 @@ protected:
   ~MutexLock() {}
 
   SimpleMutexLock m_SimpleMutexLock;
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   MutexLock(const Self &);      //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkNeighborhoodAllocator.h b/Utilities/ITK/Modules/Core/Common/include/itkNeighborhoodAllocator.h
index 6bf63b2..808d889 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkNeighborhoodAllocator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkNeighborhoodAllocator.h
@@ -18,6 +18,7 @@
 #ifndef __itkNeighborhoodAllocator_h
 #define __itkNeighborhoodAllocator_h
 #include <iostream>
+#include "itkMacro.h"
 
 namespace itk
 {
@@ -51,7 +52,7 @@ public:
   typedef const TPixel * const_iterator;
 
   /** Default constructor */
-  NeighborhoodAllocator():m_ElementCount(0), m_Data(0)  {}
+  NeighborhoodAllocator():m_ElementCount(0), m_Data(ITK_NULLPTR)  {}
 
   /** Default destructor */
   ~NeighborhoodAllocator()
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkNeighborhoodIterator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkNeighborhoodIterator.hxx
index 893d911..e2c7c1c 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkNeighborhoodIterator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkNeighborhoodIterator.hxx
@@ -99,8 +99,8 @@ void
 NeighborhoodIterator< TImage, TBoundaryCondition >
 ::SetPixel(const unsigned n, const PixelType & v, bool & status)
 {
-  register unsigned int i;
-  OffsetType            temp;
+  unsigned int i;
+  OffsetType   temp;
 
   typename OffsetType::OffsetValueType OverlapLow, OverlapHigh;
 
@@ -161,9 +161,9 @@ void
 NeighborhoodIterator< TImage, TBoundaryCondition >
 ::SetNeighborhood(const NeighborhoodType & N)
 {
-  register unsigned int i;
-  OffsetType            OverlapLow, OverlapHigh, temp;
-  bool                  flag;
+  unsigned int i;
+  OffsetType   OverlapLow, OverlapHigh, temp;
+  bool         flag;
 
   const Iterator _end = this->End();
   Iterator       this_it;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkNumberToString.h b/Utilities/ITK/Modules/Core/Common/include/itkNumberToString.h
index e95e939..9d00b28 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkNumberToString.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkNumberToString.h
@@ -39,7 +39,7 @@ namespace itk
  *
  * \ingroup ITKCommon
  */
-template< typename TValueType>
+template< typename TValue>
 class NumberToString
 {
 public:
@@ -47,7 +47,7 @@ public:
     m_DoubleToStringConverter(double_conversion::DoubleToStringConverter::EcmaScriptConverter())
     {
     }
-  std::string operator() (TValueType val);
+  std::string operator() (TValue val);
 
 private:
   NumberToString & operator=(const NumberToString &); // not defined
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkNumberToString.hxx b/Utilities/ITK/Modules/Core/Common/include/itkNumberToString.hxx
index 9a35941..337e0a4 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkNumberToString.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkNumberToString.hxx
@@ -26,11 +26,11 @@
 namespace itk
 {
 
-template<typename TValueType>
-std::string NumberToString<TValueType>::operator() (TValueType val)
+template<typename TValue>
+std::string NumberToString<TValue>::operator() (TValue val)
 {
   std::ostringstream output;
-  output << static_cast<typename NumericTraits<TValueType>::PrintType>(val);
+  output << static_cast<typename NumericTraits<TValue>::PrintType>(val);
 
   return output.str();
 }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkNumericTraits.h b/Utilities/ITK/Modules/Core/Common/include/itkNumericTraits.h
index c20d3e6..64bea4b 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkNumericTraits.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkNumericTraits.h
@@ -26,30 +26,30 @@
 #define itkNUMERIC_TRAITS_MIN_MAX_MACRO()          \
   static ValueType min()                           \
     {                                              \
-    return vcl_numeric_limits< ValueType >::min(); \
+    return std::numeric_limits< ValueType >::min(); \
     }                                              \
   static ValueType max()                           \
     {                                              \
-    return vcl_numeric_limits< ValueType >::max(); \
+    return std::numeric_limits< ValueType >::max(); \
     }                                              \
   static ValueType min(ValueType)                  \
     {                                              \
-    return vcl_numeric_limits< ValueType >::min(); \
+    return std::numeric_limits< ValueType >::min(); \
     }                                              \
   static ValueType max(ValueType)                  \
     {                                              \
-    return vcl_numeric_limits< ValueType >::max(); \
+    return std::numeric_limits< ValueType >::max(); \
     }                                              \
 
 
-#include "vcl_limits.h" // for vcl_numeric_limits
+#include "vcl_limits.h" // for std::numeric_limits
 #include <complex>
 
 namespace itk
 {
 
 // forward decare to avoid circular dependencies
-template< typename TValueType, unsigned int VLength>  class FixedArray;
+template< typename TValue, unsigned int VLength>  class FixedArray;
 
 /** \class NumericTraits
  * \brief Define additional traits for native types such as int or float.
@@ -67,11 +67,11 @@ template< typename TValueType, unsigned int VLength>  class FixedArray;
  * \endwiki
  */
 template< typename T >
-class NumericTraits:public vcl_numeric_limits< T >
+class NumericTraits:public std::numeric_limits< T >
 {
 public:
   /** The type of this limits trait object. */
-  typedef vcl_numeric_limits< T > TraitsType;
+  typedef std::numeric_limits< T > TraitsType;
 
   /** Return the type of this native type. */
   typedef T ValueType;
@@ -79,7 +79,7 @@ public:
   /** Return the type that can be printed. */
   typedef T PrintType;
 
-  /** Return value of vcl_abs(). */
+  /** Return value of std::abs(). */
   typedef T AbsType;
 
   /** Accumulation of addition and multiplication. */
@@ -142,12 +142,13 @@ public:
    * VariableLengthVector will provide a different implementation
    * where a vector of the correct size is built.
    */
-  static void SetLength(T &, const unsigned int s)
+  static void SetLength(T & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
   /** Return the length of the scalar. This API is needed for
    * VariableLengthVector because
@@ -209,7 +210,7 @@ public:
  */
 
 template< >
-class NumericTraits< bool > :public vcl_numeric_limits< bool >
+class NumericTraits< bool > :public std::numeric_limits< bool >
 {
 public:
   typedef bool                     ValueType;
@@ -246,12 +247,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 
 };
@@ -262,7 +264,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< char > :public vcl_numeric_limits< char >
+class NumericTraits< char > :public std::numeric_limits< char >
 {
 public:
   typedef char                     ValueType;
@@ -300,12 +302,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -315,7 +318,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< signed char > :public vcl_numeric_limits< signed char >
+class NumericTraits< signed char > :public std::numeric_limits< signed char >
 {
 public:
   typedef signed char              ValueType;
@@ -352,12 +355,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -367,7 +371,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< unsigned char > :public vcl_numeric_limits< unsigned char >
+class NumericTraits< unsigned char > :public std::numeric_limits< unsigned char >
 {
 public:
   typedef unsigned char            ValueType;
@@ -384,7 +388,7 @@ public:
 
   itkNUMERIC_TRAITS_MIN_MAX_MACRO();
 
-  static unsigned char NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); }
+  static unsigned char NonpositiveMin() { return std::numeric_limits< ValueType >::min(); }
   static bool IsPositive(unsigned char val) { return val != Zero; }
   static bool IsNonpositive(unsigned char val) { return val == Zero; }
   static bool IsNegative(unsigned char val) { return val ? false : false; }
@@ -402,12 +406,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -416,7 +421,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< short > :public vcl_numeric_limits< short >
+class NumericTraits< short > :public std::numeric_limits< short >
 {
 public:
   typedef short                    ValueType;
@@ -432,7 +437,7 @@ public:
   static const short ITKCommon_EXPORT One;
 
   itkNUMERIC_TRAITS_MIN_MAX_MACRO();
-  static short NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); }
+  static short NonpositiveMin() { return std::numeric_limits< ValueType >::min(); }
   static bool IsPositive(short val) { return val > Zero; }
   static bool IsNonpositive(short val) { return val <= Zero; }
   static bool IsNegative(short val) { return val < Zero; }
@@ -450,12 +455,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -465,7 +471,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< unsigned short > :public vcl_numeric_limits< unsigned short >
+class NumericTraits< unsigned short > :public std::numeric_limits< unsigned short >
 {
 public:
   typedef unsigned short           ValueType;
@@ -481,7 +487,7 @@ public:
   static const unsigned short ITKCommon_EXPORT One;
 
   itkNUMERIC_TRAITS_MIN_MAX_MACRO();
-  static unsigned short NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); }
+  static unsigned short NonpositiveMin() { return std::numeric_limits< ValueType >::min(); }
   static bool IsPositive(unsigned short val) { return val != Zero; }
   static bool IsNonpositive(unsigned short val) { return val == Zero; }
   static bool IsNegative(unsigned short val) { return val ? false : false; }
@@ -499,12 +505,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -513,7 +520,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< int > :public vcl_numeric_limits< int >
+class NumericTraits< int > :public std::numeric_limits< int >
 {
 public:
   typedef int                      ValueType;
@@ -529,7 +536,7 @@ public:
   static const int ITKCommon_EXPORT One;
 
   itkNUMERIC_TRAITS_MIN_MAX_MACRO();
-  static int NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); }
+  static int NonpositiveMin() { return std::numeric_limits< ValueType >::min(); }
   static bool IsPositive(int val) { return val > Zero; }
   static bool IsNonpositive(int val) { return val <= Zero; }
   static bool IsNegative(int val) { return val < Zero; }
@@ -547,12 +554,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -562,7 +570,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< unsigned int > :public vcl_numeric_limits< unsigned int >
+class NumericTraits< unsigned int > :public std::numeric_limits< unsigned int >
 {
 public:
   typedef unsigned int             ValueType;
@@ -579,8 +587,8 @@ public:
 
   static unsigned int min(void) { return 0; }
   static unsigned int max(void) { return static_cast< unsigned int >( -1 ); }
-  static unsigned int min(unsigned int) { return vcl_numeric_limits< ValueType >::min(); }
-  static unsigned int max(unsigned int) { return vcl_numeric_limits< ValueType >::max(); }
+  static unsigned int min(unsigned int) { return std::numeric_limits< ValueType >::min(); }
+  static unsigned int max(unsigned int) { return std::numeric_limits< ValueType >::max(); }
   static unsigned int NonpositiveMin() { return 0; }
   static bool IsPositive(unsigned int val) { return val != Zero; }
   static bool IsNonpositive(unsigned int val) { return val == Zero; }
@@ -599,12 +607,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -614,7 +623,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< long > :public vcl_numeric_limits< long >
+class NumericTraits< long > :public std::numeric_limits< long >
 {
 public:
   typedef long                     ValueType;
@@ -630,7 +639,7 @@ public:
   static const long ITKCommon_EXPORT One;
 
   itkNUMERIC_TRAITS_MIN_MAX_MACRO();
-  static long NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); }
+  static long NonpositiveMin() { return std::numeric_limits< ValueType >::min(); }
   static bool IsPositive(long val) { return val > Zero; }
   static bool IsNonpositive(long val) { return val <= Zero; }
   static bool IsNegative(long val) { return val < Zero; }
@@ -648,12 +657,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -663,7 +673,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< unsigned long > :public vcl_numeric_limits< unsigned long >
+class NumericTraits< unsigned long > :public std::numeric_limits< unsigned long >
 {
 public:
   typedef unsigned long            ValueType;
@@ -679,7 +689,7 @@ public:
   static const unsigned long ITKCommon_EXPORT One;
 
   itkNUMERIC_TRAITS_MIN_MAX_MACRO();
-  static unsigned long NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); }
+  static unsigned long NonpositiveMin() { return std::numeric_limits< ValueType >::min(); }
   static bool IsPositive(unsigned long val) { return val != Zero; }
   static bool IsNonpositive(unsigned long val) { return val == Zero; }
   static bool IsNegative(unsigned long) { return false; }
@@ -697,12 +707,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -712,7 +723,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< float > :public vcl_numeric_limits< float >
+class NumericTraits< float > :public std::numeric_limits< float >
 {
 public:
   typedef float                    ValueType;
@@ -728,7 +739,7 @@ public:
   static const float ITKCommon_EXPORT One;
 
   itkNUMERIC_TRAITS_MIN_MAX_MACRO();
-  static float NonpositiveMin() { return -vcl_numeric_limits< ValueType >::max(); }
+  static float NonpositiveMin() { return -std::numeric_limits< ValueType >::max(); }
   static bool IsPositive(float val) { return val > Zero; }
   static bool IsNonpositive(float val) { return val <= Zero; }
   static bool IsNegative(float val) { return val < Zero; }
@@ -746,12 +757,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -761,7 +773,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< double > :public vcl_numeric_limits< double >
+class NumericTraits< double > :public std::numeric_limits< double >
 {
 public:
   typedef double                   ValueType;
@@ -777,7 +789,7 @@ public:
   static const double ITKCommon_EXPORT One;
 
   itkNUMERIC_TRAITS_MIN_MAX_MACRO();
-  static double NonpositiveMin() { return -vcl_numeric_limits< ValueType >::max(); }
+  static double NonpositiveMin() { return -std::numeric_limits< ValueType >::max(); }
   static bool IsPositive(double val) { return val > Zero; }
   static bool IsNonpositive(double val) { return val <= Zero; }
   static bool IsNegative(double val) { return val < Zero; }
@@ -795,12 +807,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -810,7 +823,7 @@ public:
  * \ingroup ITKCommon
  */
 template< >
-class NumericTraits< long double > :public vcl_numeric_limits< long double >
+class NumericTraits< long double > :public std::numeric_limits< long double >
 {
 public:
   typedef long double ValueType;
@@ -834,7 +847,7 @@ public:
   static const long double ITKCommon_EXPORT One;
 
   itkNUMERIC_TRAITS_MIN_MAX_MACRO();
-  static long double NonpositiveMin() { return -vcl_numeric_limits< ValueType >::max(); }
+  static long double NonpositiveMin() { return -std::numeric_limits< ValueType >::max(); }
   static bool IsPositive(long double val) { return val > Zero; }
   static bool IsNonpositive(long double val) { return val <= Zero; }
   static bool IsNegative(long double val) { return val < Zero; }
@@ -852,12 +865,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -885,8 +899,8 @@ public:
   static const Self ITKCommon_EXPORT Zero;
   static const Self ITKCommon_EXPORT One;
 
-  static Self min() { return vcl_numeric_limits< Self >::min(); }
-  static Self max() { return vcl_numeric_limits< Self >::max(); }
+  static Self min() { return std::numeric_limits< Self >::min(); }
+  static Self max() { return std::numeric_limits< Self >::max(); }
   static Self min(Self) { return min(); }
   static Self max(Self) { return max(); }
   static Self NonpositiveMin()
@@ -911,12 +925,13 @@ public:
     mv[0] = v.real();
     mv[1] = v.imag();
   }
-  static void SetLength(Self &, const unsigned int s)
+  static void SetLength(Self & m, const unsigned int s)
   {
     if ( s != 2 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -944,8 +959,8 @@ public:
   static const Self ITKCommon_EXPORT Zero;
   static const Self ITKCommon_EXPORT One;
 
-  static Self min() { return vcl_numeric_limits< Self >::min(); }
-  static Self max() { return vcl_numeric_limits< Self >::max(); }
+  static Self min() { return std::numeric_limits< Self >::min(); }
+  static Self max() { return std::numeric_limits< Self >::max(); }
   static Self min(Self) { return min(); }
   static Self max(Self) { return max(); }
   static Self NonpositiveMin()
@@ -970,12 +985,13 @@ public:
     mv[0] = v.real();
     mv[1] = v.imag();
   }
-  static void SetLength(Self &, const unsigned int s)
+  static void SetLength(Self & m, const unsigned int s)
   {
     if ( s != 2 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -1003,8 +1019,8 @@ public:
   static const Self ITKCommon_EXPORT Zero;
   static const Self ITKCommon_EXPORT One;
 
-  static Self min() { return vcl_numeric_limits< Self >::min(); }
-  static Self max() { return vcl_numeric_limits< Self >::max(); }
+  static Self min() { return std::numeric_limits< Self >::min(); }
+  static Self max() { return std::numeric_limits< Self >::max(); }
   static Self min(Self) { return min(); }
   static Self max(Self) { return max(); }
   static Self NonpositiveMin()
@@ -1029,12 +1045,13 @@ public:
     mv[0] = v.real();
     mv[1] = v.imag();
   }
-  static void SetLength(Self &, const unsigned int s)
+  static void SetLength(Self & m, const unsigned int s)
   {
     if ( s != 2 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -1062,8 +1079,8 @@ public:
   static const Self ITKCommon_EXPORT Zero;
   static const Self ITKCommon_EXPORT One;
 
-  static Self min() { return vcl_numeric_limits< Self >::min(); }
-  static Self max() { return vcl_numeric_limits< Self >::max(); }
+  static Self min() { return std::numeric_limits< Self >::min(); }
+  static Self max() { return std::numeric_limits< Self >::max(); }
   static Self min(Self) { return min(); }
   static Self max(Self) { return max(); }
   static Self NonpositiveMin()
@@ -1088,12 +1105,13 @@ public:
     mv[0] = v.real();
     mv[1] = v.imag();
   }
-  static void SetLength(Self &, const unsigned int s)
+  static void SetLength(Self & m, const unsigned int s)
   {
     if ( s != 2 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -1121,8 +1139,8 @@ public:
   static const Self ITKCommon_EXPORT Zero;
   static const Self ITKCommon_EXPORT One;
 
-  static Self min() { return vcl_numeric_limits< Self >::min(); }
-  static Self max() { return vcl_numeric_limits< Self >::max(); }
+  static Self min() { return std::numeric_limits< Self >::min(); }
+  static Self max() { return std::numeric_limits< Self >::max(); }
   static Self min(Self) { return min(); }
   static Self max(Self) { return max(); }
   static Self NonpositiveMin()
@@ -1147,12 +1165,13 @@ public:
     mv[0] = v.real();
     mv[1] = v.imag();
   }
-  static void SetLength(Self &, const unsigned int s)
+  static void SetLength(Self & m, const unsigned int s)
   {
     if ( s != 2 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -1180,8 +1199,8 @@ public:
   static const Self ITKCommon_EXPORT Zero;
   static const Self ITKCommon_EXPORT One;
 
-  static Self min() { return vcl_numeric_limits< Self >::min(); }
-  static Self max() { return vcl_numeric_limits< Self >::max(); }
+  static Self min() { return std::numeric_limits< Self >::min(); }
+  static Self max() { return std::numeric_limits< Self >::max(); }
   static Self min(Self) { return min(); }
   static Self max(Self) { return max(); }
   static Self NonpositiveMin()
@@ -1206,12 +1225,13 @@ public:
     mv[0] = v.real();
     mv[1] = v.imag();
   }
-  static void SetLength(Self &, const unsigned int s)
+  static void SetLength(Self & m, const unsigned int s)
   {
     if ( s != 2 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -1239,8 +1259,8 @@ public:
   static const Self ITKCommon_EXPORT Zero;
   static const Self ITKCommon_EXPORT One;
 
-  static Self min() { return vcl_numeric_limits< Self >::min(); }
-  static Self max() { return vcl_numeric_limits< Self >::max(); }
+  static Self min() { return std::numeric_limits< Self >::min(); }
+  static Self max() { return std::numeric_limits< Self >::max(); }
   static Self min(Self) { return min(); }
   static Self max(Self) { return max(); }
   static Self NonpositiveMin()
@@ -1265,12 +1285,13 @@ public:
     mv[0] = v.real();
     mv[1] = v.imag();
   }
-  static void SetLength(Self &, const unsigned int s)
+  static void SetLength(Self & m, const unsigned int s)
   {
     if ( s != 2 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -1298,8 +1319,8 @@ public:
   static const Self ITKCommon_EXPORT Zero;
   static const Self ITKCommon_EXPORT One;
 
-  static Self min() { return vcl_numeric_limits< Self >::min(); }
-  static Self max() { return vcl_numeric_limits< Self >::max(); }
+  static Self min() { return std::numeric_limits< Self >::min(); }
+  static Self max() { return std::numeric_limits< Self >::max(); }
   static Self min(Self) { return min(); }
   static Self max(Self) { return max(); }
   static Self NonpositiveMin()
@@ -1324,12 +1345,13 @@ public:
     mv[0] = v.real();
     mv[1] = v.imag();
   }
-  static void SetLength(Self &, const unsigned int s)
+  static void SetLength(Self & m, const unsigned int s)
   {
     if ( s != 2 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -1357,8 +1379,8 @@ public:
   static const Self ITKCommon_EXPORT Zero;
   static const Self ITKCommon_EXPORT One;
 
-  static Self min() { return vcl_numeric_limits< Self >::min(); }
-  static Self max() { return vcl_numeric_limits< Self >::max(); }
+  static Self min() { return std::numeric_limits< Self >::min(); }
+  static Self max() { return std::numeric_limits< Self >::max(); }
   static Self min(Self) { return min(); }
   static Self max(Self) { return max(); }
   static Self NonpositiveMin()
@@ -1383,12 +1405,13 @@ public:
     mv[0] = v.real();
     mv[1] = v.imag();
   }
-  static void SetLength(Self &, const unsigned int s)
+  static void SetLength(Self & m, const unsigned int s)
   {
     if ( s != 2 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -1416,8 +1439,8 @@ public:
   static const Self ITKCommon_EXPORT Zero;
   static const Self ITKCommon_EXPORT One;
 
-  static Self min() { return vcl_numeric_limits< ValueType >::min(); }
-  static Self max() { return vcl_numeric_limits< ValueType >::max(); }
+  static Self min() { return std::numeric_limits< ValueType >::min(); }
+  static Self max() { return std::numeric_limits< ValueType >::max(); }
   static Self min(Self) { return min(); }
   static Self max(Self) { return max(); }
   static Self NonpositiveMin()
@@ -1442,12 +1465,13 @@ public:
     mv[0] = v.real();
     mv[1] = v.imag();
   }
-  static void SetLength(Self &, const unsigned int s)
+  static void SetLength(Self & m, const unsigned int s)
   {
     if ( s != 2 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -1475,8 +1499,8 @@ public:
   static const Self ITKCommon_EXPORT Zero;
   static const Self ITKCommon_EXPORT One;
 
-  static Self min() { return vcl_numeric_limits< ValueType >::min(); }
-  static Self max() { return vcl_numeric_limits< ValueType >::max(); }
+  static Self min() { return std::numeric_limits< ValueType >::min(); }
+  static Self max() { return std::numeric_limits< ValueType >::max(); }
   static Self min(Self) { return min(); }
   static Self max(Self) { return max(); }
   static Self NonpositiveMin()
@@ -1501,12 +1525,13 @@ public:
     mv[0] = v.real();
     mv[1] = v.imag();
   }
-  static void SetLength(Self &, const unsigned int s)
+  static void SetLength(Self & m, const unsigned int s)
   {
     if ( s != 2 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a complex to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -1517,7 +1542,7 @@ public:
  */
 template< >
 class NumericTraits< long long > :
-  public vcl_numeric_limits< long long >
+  public std::numeric_limits< long long >
 {
 public:
   typedef long long                ValueType;
@@ -1533,7 +1558,7 @@ public:
   static const ValueType ITKCommon_EXPORT One;
 
   itkNUMERIC_TRAITS_MIN_MAX_MACRO();
-  static ValueType NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); }
+  static ValueType NonpositiveMin() { return std::numeric_limits< ValueType >::min(); }
   static bool IsPositive(ValueType val) { return val > Zero; }
   static bool IsNonpositive(ValueType val) { return val <= Zero; }
   static bool IsNegative(ValueType val) { return val < Zero; }
@@ -1551,12 +1576,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
@@ -1567,7 +1593,7 @@ public:
  */
 template< >
 class NumericTraits< unsigned long long > :
-  public vcl_numeric_limits< unsigned long long >
+  public std::numeric_limits< unsigned long long >
 {
 public:
   typedef unsigned long long       ValueType;
@@ -1583,7 +1609,7 @@ public:
   static const ValueType ITKCommon_EXPORT One;
 
   itkNUMERIC_TRAITS_MIN_MAX_MACRO();
-  static ValueType NonpositiveMin() { return vcl_numeric_limits< ValueType >::min(); }
+  static ValueType NonpositiveMin() { return std::numeric_limits< ValueType >::min(); }
   static bool IsPositive(ValueType val) { return val != Zero; }
   static bool IsNonpositive(ValueType val) { return val == Zero; }
   static bool IsNegative(ValueType) { return false; }
@@ -1601,12 +1627,13 @@ public:
   {
     mv[0] = v;
   }
-  static void SetLength(ValueType &, const unsigned int s)
+  static void SetLength(ValueType & m, const unsigned int s)
   {
     if ( s != 1 )
       {
       itkGenericExceptionMacro(<< "Cannot set the size of a scalar to " << s);
       }
+    m = NumericTraits< ValueType >::Zero;
   }
 };
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h b/Utilities/ITK/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h
index 7420968..1db158e 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h
@@ -184,10 +184,10 @@ public:
 // a macro to define and initialize static member variables
 #define itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, D)                                 \
   template< >                                                                                        \
-  const GENERIC_ARRAY< T, D >  NumericTraits< GENERIC_ARRAY< T, D > >::Zero = GENERIC_ARRAY< T, D >( \
+  ITKCommon_EXPORT const GENERIC_ARRAY< T, D >  NumericTraits< GENERIC_ARRAY< T, D > >::Zero = GENERIC_ARRAY< T, D >( \
     NumericTraits< T >::Zero);                                                                       \
   template< >                                                                                        \
-  const GENERIC_ARRAY< T, D >  NumericTraits< GENERIC_ARRAY< T, D > >::One = GENERIC_ARRAY< T, D >(  \
+  ITKCommon_EXPORT const GENERIC_ARRAY< T, D >  NumericTraits< GENERIC_ARRAY< T, D > >::One = GENERIC_ARRAY< T, D >( \
     NumericTraits< T >::One);
 
 //
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkNumericTraitsStdVector.h b/Utilities/ITK/Modules/Core/Common/include/itkNumericTraitsStdVector.h
index 8929379..682edf8 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkNumericTraitsStdVector.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkNumericTraitsStdVector.h
@@ -130,6 +130,9 @@ public:
   /** Resize the input vector to the specified size */
   static void SetLength(std::vector< T > & m, const unsigned int s)
   {
+    // since std::vector often holds types that have no NumericTraits::Zero,
+    // allow resize() to call the type's default constructor
+    m.clear();
     m.resize(s);
   }
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkObject.h b/Utilities/ITK/Modules/Core/Common/include/itkObject.h
index 5504526..fe0f158 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkObject.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkObject.h
@@ -71,7 +71,7 @@ public:
    * object that is exactly the same type as the referring object.
    * This is useful in cases where an object has been cast back to a
    * base class. */
-  virtual LightObject::Pointer CreateAnother() const;
+  virtual LightObject::Pointer CreateAnother() const ITK_OVERRIDE;
 
   /** Standard part of all itk objects. */
   itkTypeMacro(Object, LightObject);
@@ -99,13 +99,13 @@ public:
   virtual void Modified() const;
 
   /** Increase the reference count (mark as used by another object).  */
-  virtual void Register() const;
+  virtual void Register() const ITK_OVERRIDE;
 
   /** Decrease the reference count (release by another object).  */
-  virtual void UnRegister() const;
+  virtual void UnRegister() const ITK_OVERRIDE;
 
   /** Sets the reference count (use with care)  */
-  virtual void SetReferenceCount(int);
+  virtual void SetReferenceCount(int) ITK_OVERRIDE;
 
   /** This is a global flag that controls whether any debug, warning
    *  or error messages are displayed.  */
@@ -187,7 +187,7 @@ protected:
    * including superclasses. Typically not called by the user (use Print()
    * instead) but used in the hierarchical print process to combine the
    * output of several classes.  */
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   bool PrintObservers(std::ostream & os, Indent indent) const;
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkObjectFactoryBase.h b/Utilities/ITK/Modules/Core/Common/include/itkObjectFactoryBase.h
index 5151fa1..5e6936c 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkObjectFactoryBase.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkObjectFactoryBase.h
@@ -195,7 +195,7 @@ public:
   };
 
 protected:
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Register object creation information with the factory. */
   void RegisterOverride(const char *classOverride,
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkObjectStore.h b/Utilities/ITK/Modules/Core/Common/include/itkObjectStore.h
index 4f2bf1e..2e9d195 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkObjectStore.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkObjectStore.h
@@ -127,7 +127,7 @@ public:
 protected:
   ObjectStore();
   ~ObjectStore();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Returns a new size to grow. */
   SizeValueType GetGrowthSize();
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkOctree.h b/Utilities/ITK/Modules/Core/Common/include/itkOctree.h
index bc1e443..bdabce2 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkOctree.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkOctree.h
@@ -128,7 +128,7 @@ public:
 
   ImageTypePointer GetImage();
 
-  virtual void BuildFromBuffer(const void *buffer, const unsigned int xsize, const unsigned int ysize, const unsigned int zsize);
+  virtual void BuildFromBuffer(const void *buffer, const unsigned int xsize, const unsigned int ysize, const unsigned int zsize) ITK_OVERRIDE;
 
   void BuildFromImage(Image< TPixel, 3 > *fromImage);
 
@@ -142,19 +142,19 @@ public:
   int GetValue(const unsigned int Dim0, const unsigned int Dim1,
                         const unsigned int Dim2);
 
-  virtual void SetWidth(unsigned int width);
+  virtual void SetWidth(unsigned int width) ITK_OVERRIDE;
 
-  virtual void SetDepth(unsigned int depth);
+  virtual void SetDepth(unsigned int depth) ITK_OVERRIDE;
 
-  virtual unsigned int GetWidth();
+  virtual unsigned int GetWidth() ITK_OVERRIDE;
 
-  virtual unsigned int GetDepth();
+  virtual unsigned int GetDepth() ITK_OVERRIDE;
 
-  virtual OctreeNode * GetTree();
+  virtual OctreeNode * GetTree() ITK_OVERRIDE;
 
-  virtual const char * GetColorTable() const;
+  virtual const char * GetColorTable() const ITK_OVERRIDE;
 
-  virtual int GetColorTableSize() const;
+  virtual int GetColorTableSize() const ITK_OVERRIDE;
 
 private:
   Octree(const Self &);         // purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParameters.h b/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParameters.h
index 4ab9cb5..a54d11c 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParameters.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParameters.h
@@ -30,22 +30,22 @@ namespace itk
  * \ingroup ITKCommon
  */
 
-template< typename TValueType >
-class OptimizerParameters : public Array< TValueType >
+template< typename TValue >
+class OptimizerParameters : public Array< TValue >
 {
 public:
 
   /** The element type stored at each location in the Array. */
-  typedef TValueType                               ValueType;
-  typedef OptimizerParameters                      Self;
-  typedef Array< TValueType >                      Superclass;
-  typedef Superclass                               ArrayType;
-  typedef typename Superclass::VnlVectorType       VnlVectorType;
-  typedef typename Superclass::SizeValueType       SizeValueType;
+  typedef TValue                               ValueType;
+  typedef OptimizerParameters                  Self;
+  typedef Array< TValue >                      Superclass;
+  typedef Superclass                           ArrayType;
+  typedef typename Superclass::VnlVectorType   VnlVectorType;
+  typedef typename Superclass::SizeValueType   SizeValueType;
 
   /** Helper class for managing different types of parameter
    * data. */
-  typedef OptimizerParametersHelper< TValueType > OptimizerParametersHelperType;
+  typedef OptimizerParametersHelper< TValue > OptimizerParametersHelperType;
 
   /** Default constructor. It is created with an empty array
    *  it has to be allocated later by assignment              */
@@ -69,10 +69,10 @@ public:
 
   /** Set a new data pointer for the parameter data, pointing it to a different
    * memory block. The size of the new memory block must equal the current
-   * size, in elements of TValueType.
+   * size, in elements of TValue.
    * This call is passed to the assigned OptimizerParametersHelper.
    * \warning Memory must be managed by caller after this call. */
-  virtual void MoveDataPointer( TValueType * pointer );
+  virtual void MoveDataPointer( TValue * pointer );
 
   /** Set an object that holds the parameters. Used by the helper of
    * derived classes that use an object other than itkArray to hold parameter
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParameters.hxx b/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParameters.hxx
index ea92a9b..25ff6de 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParameters.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParameters.hxx
@@ -24,18 +24,18 @@
 namespace itk
 {
 /** Default contstructor */
-template< typename TValueType >
-OptimizerParameters< TValueType >
-::OptimizerParameters() : Array< TValueType >()
+template< typename TValue >
+OptimizerParameters< TValue >
+::OptimizerParameters() : Array< TValue >()
 {
   this->Initialize();
 }
 
 /** Copy constructor */
-template< typename TValueType >
-OptimizerParameters< TValueType >
+template< typename TValue >
+OptimizerParameters< TValue >
 ::OptimizerParameters(const OptimizerParameters& rhs)
-  : Array< TValueType >(rhs)
+  : Array< TValue >(rhs)
 {
   //Note: don't copy the OptimizerParametersHelper.
   //The Array copy constructor will allocate new memory
@@ -46,29 +46,29 @@ OptimizerParameters< TValueType >
 }
 
 /** Constructor with size */
-template< typename TValueType >
-OptimizerParameters< TValueType >
+template< typename TValue >
+OptimizerParameters< TValue >
 ::OptimizerParameters(SizeValueType dimension)
-  : Array< TValueType >(dimension)
+  : Array< TValue >(dimension)
 {
   this->Initialize();
 }
 
 /** Constructor with Array assignment */
-template< typename TValueType >
-OptimizerParameters< TValueType >
+template< typename TValue >
+OptimizerParameters< TValue >
 ::OptimizerParameters(const ArrayType& array)
-  : Array< TValueType >(array)
+  : Array< TValue >(array)
 {
   this->Initialize();
 }
 
-template< typename TValueType >
+template< typename TValue >
 void
-OptimizerParameters< TValueType >
+OptimizerParameters< TValue >
 ::Initialize()
 {
-  this->m_Helper = NULL;
+  this->m_Helper = ITK_NULLPTR;
   // Set the default OptimizerParametersHelper
   OptimizerParametersHelperType* helper = new OptimizerParametersHelperType;
   // OptimizerParameters will manage this memory.
@@ -76,16 +76,16 @@ OptimizerParameters< TValueType >
 }
 
 /** Destructor */
-template< typename TValueType >
-OptimizerParameters< TValueType >
+template< typename TValue >
+OptimizerParameters< TValue >
 ::~OptimizerParameters()
 {
   delete this->m_Helper;
 }
 
-template< typename TValueType >
+template< typename TValue >
 void
-OptimizerParameters< TValueType >
+OptimizerParameters< TValue >
 ::SetHelper( OptimizerParametersHelperType* helper )
 {
   delete this->m_Helper;
@@ -93,10 +93,10 @@ OptimizerParameters< TValueType >
 }
 
 /** Copy operator for self */
-template< typename TValueType >
-const typename OptimizerParameters< TValueType >
+template< typename TValue >
+const typename OptimizerParameters< TValue >
 ::Self &
-OptimizerParameters< TValueType >
+OptimizerParameters< TValue >
 ::operator=(const Self & rhs)
 {
   //Note: there's no need to copy the OptimizerParametersHelper.
@@ -105,10 +105,10 @@ OptimizerParameters< TValueType >
   return *this;
 }
 
-template< typename TValueType >
-const typename OptimizerParameters< TValueType >
+template< typename TValue >
+const typename OptimizerParameters< TValue >
 ::Self &
-OptimizerParameters< TValueType >
+OptimizerParameters< TValue >
 ::operator=(const ArrayType & rhs)
 {
   // Call the superclass implementation
@@ -116,10 +116,10 @@ OptimizerParameters< TValueType >
   return *this;
 }
 
-template< typename TValueType >
-const typename OptimizerParameters< TValueType >
+template< typename TValue >
+const typename OptimizerParameters< TValue >
 ::Self &
-OptimizerParameters< TValueType >
+OptimizerParameters< TValue >
 ::operator=(const VnlVectorType & rhs)
 {
   // Call the superclass implementation
@@ -127,12 +127,12 @@ OptimizerParameters< TValueType >
   return *this;
 }
 
-template< typename TValueType >
+template< typename TValue >
 void
-OptimizerParameters< TValueType >
-::MoveDataPointer( TValueType * pointer )
+OptimizerParameters< TValue >
+::MoveDataPointer( TValue * pointer )
 {
-  if( m_Helper == NULL )
+  if( m_Helper == ITK_NULLPTR )
     {
     itkGenericExceptionMacro("OptimizerParameters::MoveDataPointer: "
       "m_Helper must be set.");
@@ -140,12 +140,12 @@ OptimizerParameters< TValueType >
   this->m_Helper->MoveDataPointer( this, pointer );
 }
 
-template< typename TValueType >
+template< typename TValue >
 void
-OptimizerParameters< TValueType >
+OptimizerParameters< TValue >
 ::SetParametersObject( LightObject * object )
 {
-  if( m_Helper == NULL )
+  if( m_Helper == ITK_NULLPTR )
     {
     itkGenericExceptionMacro("OptimizerParameters::SetParameterObject: "
       "m_Helper must be set.");
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParametersHelper.h b/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParametersHelper.h
index f7939f0..79da61d 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParametersHelper.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkOptimizerParametersHelper.h
@@ -30,24 +30,24 @@ namespace itk
  * \ingroup ITKCommon
  */
 
-template< typename TValueType >
+template< typename TValue >
 class OptimizerParametersHelper
 {
 public:
 
   /** The element type stored at each location in the Array. */
-  typedef TValueType                          ValueType;
-  typedef OptimizerParametersHelper           Self;
+  typedef TValue                          ValueType;
+  typedef OptimizerParametersHelper       Self;
 
   /** Type of common data object used by OptimizerParameters. */
-  typedef Array< TValueType >                 CommonContainerType;
+  typedef Array< TValue >                 CommonContainerType;
 
   /** Default constructor. Nothing to do. */
   OptimizerParametersHelper(){}
 
   /** Set a new data pointer for the parameter data, pointing it to a different
    * memory block. The size of the new memory block must equal the current
-   * size, in elements of TValueType.
+   * size, in elements of TValue.
    * This call is passed to the assigned OptimizerParametersHelper.
    * \warning Memory must be managed by caller after this call.
    * \c container is the OptimizerParameters object to which this helper
@@ -56,7 +56,7 @@ public:
    * which this helper is assigned.
    */
   virtual void MoveDataPointer(CommonContainerType* container,
-                               TValueType * pointer )
+                               TValue * pointer )
     {
     container->SetData(
       pointer, container->GetSize(), false /*LetArrayManageMemory*/);
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkOutputWindow.h b/Utilities/ITK/Modules/Core/Common/include/itkOutputWindow.h
index 5d80c39..6813624 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkOutputWindow.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkOutputWindow.h
@@ -100,7 +100,7 @@ public:
 protected:
   OutputWindow();
   virtual ~OutputWindow();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   OutputWindow(const Self &);   //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h b/Utilities/ITK/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h
index 3ad6424..ae9d78d 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h
@@ -55,13 +55,13 @@ namespace itk
  *
  * azimuth = arctan(x/y)
  * elevation = arctan(y/z)
- * radius = vcl_sqrt(x^2 + y^2 + z^2)
+ * radius = std::sqrt(x^2 + y^2 + z^2)
  *
  * The reversed transforms are:
  *
- * z = radius / vcl_sqrt(1 + (tan(azimuth))^2 + (tan(elevation))^2 );
- * x = z * vcl_tan(azimuth)
- * y = z * vcl_tan(elevation)
+ * z = radius / std::sqrt(1 + (tan(azimuth))^2 + (tan(elevation))^2 );
+ * x = z * std::tan(azimuth)
+ * y = z * std::tan(elevation)
  *
  * PhasedArray3DSpecialCoordinatesImages are templated over a pixel
  * type and follow the SpecialCoordinatesImage interface.  The data in
@@ -188,9 +188,9 @@ public:
     double     maxElevation =  region.GetSize(1) - 1;
 
     // Convert Cartesian coordinates into angular coordinates
-    TCoordRep azimuth   = vcl_atan(point[0] / point[2]);
-    TCoordRep elevation = vcl_atan(point[1] / point[2]);
-    TCoordRep radius    = vcl_sqrt(point[0] * point[0]
+    TCoordRep azimuth   = std::atan(point[0] / point[2]);
+    TCoordRep elevation = std::atan(point[1] / point[2]);
+    TCoordRep radius    = std::sqrt(point[0] * point[0]
                                    + point[1] * point[1]
                                    + point[2] * point[2]);
 
@@ -222,9 +222,9 @@ public:
     double     maxElevation =  region.GetSize(1) - 1;
 
     // Convert Cartesian coordinates into angular coordinates
-    TCoordRep azimuth   = vcl_atan(point[0] / point[2]);
-    TCoordRep elevation = vcl_atan(point[1] / point[2]);
-    TCoordRep radius    = vcl_sqrt(point[0] * point[0]
+    TCoordRep azimuth   = std::atan(point[0] / point[2]);
+    TCoordRep elevation = std::atan(point[1] / point[2]);
+    TCoordRep radius    = std::sqrt(point[0] * point[0]
                                    + point[1] * point[1]
                                    + point[2] * point[2]);
 
@@ -266,11 +266,11 @@ public:
     TCoordRep radius    = ( index[2] * m_RadiusSampleSize ) + m_FirstSampleDistance;
 
     // Convert the angular coordinates into Cartesian coordinates
-    TCoordRep tanOfAzimuth    = vcl_tan(azimuth);
-    TCoordRep tanOfElevation  = vcl_tan(elevation);
+    TCoordRep tanOfAzimuth    = std::tan(azimuth);
+    TCoordRep tanOfElevation  = std::tan(elevation);
 
     point[2] = static_cast< TCoordRep >( radius
-                                         / vcl_sqrt(1
+                                         / std::sqrt(1
                                                     + tanOfAzimuth * tanOfAzimuth
                                                     + tanOfElevation * tanOfElevation) );
     point[1] = static_cast< TCoordRep >( point[2] * tanOfElevation );
@@ -303,11 +303,11 @@ public:
       + m_FirstSampleDistance;
 
     // Convert the angular coordinates into Cartesian coordinates
-    TCoordRep tanOfAzimuth    = vcl_tan(azimuth);
-    TCoordRep tanOfElevation  = vcl_tan(elevation);
+    TCoordRep tanOfAzimuth    = std::tan(azimuth);
+    TCoordRep tanOfElevation  = std::tan(elevation);
 
     point[2] = static_cast< TCoordRep >(
-      radius / vcl_sqrt(
+      radius / std::sqrt(
         1.0 + tanOfAzimuth * tanOfAzimuth + tanOfElevation * tanOfElevation) );
     point[1] = static_cast< TCoordRep >( point[2] * tanOfElevation );
     point[0] = static_cast< TCoordRep >( point[2] * tanOfAzimuth );
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkPixelTraits.h b/Utilities/ITK/Modules/Core/Common/include/itkPixelTraits.h
index ca12008..a70e3c3 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkPixelTraits.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkPixelTraits.h
@@ -191,11 +191,11 @@ public:
  * of the JoinTraits are specializations of the base template.
  * \ingroup ITKCommon
  */
-template< typename TValueType1, typename TValueType2 >
+template< typename TValue1, typename TValue2 >
 class JoinTraits
 {
 public:
-  typedef TValueType1 ValueType;
+  typedef TValue1 ValueType;
 };
 
 /** \cond HIDE_SPECIALIZATION_DOCUMENTATION */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkPoint.h b/Utilities/ITK/Modules/Core/Common/include/itkPoint.h
index b7641b7..547d6b2 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkPoint.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkPoint.h
@@ -257,7 +257,7 @@ public:
   template< typename TCoordRepB >
   RealType EuclideanDistanceTo(const Point< TCoordRepB, NPointDimension > & pa) const
   {
-    const double distance = vcl_sqrt(
+    const double distance = std::sqrt(
       static_cast< double >( this->SquaredEuclideanDistanceTo(pa) ) );
 
     return static_cast< RealType >( distance );
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkPointSet.h b/Utilities/ITK/Modules/Core/Common/include/itkPointSet.h
index e8a3c1c..eede450 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkPointSet.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkPointSet.h
@@ -144,7 +144,7 @@ public:
   /** PointSet-level operation interface. */
   void PassStructure(Self *inputPointSet);
 
-  virtual void Initialize(void);
+  virtual void Initialize(void) ITK_OVERRIDE;
 
   PointIdentifier GetNumberOfPoints(void) const;
 
@@ -175,23 +175,23 @@ public:
   bool GetPointData(PointIdentifier, PixelType *) const;
 
   /** Methods to manage streaming. */
-  virtual void UpdateOutputInformation();
+  virtual void UpdateOutputInformation() ITK_OVERRIDE;
 
-  virtual void SetRequestedRegionToLargestPossibleRegion();
+  virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE;
 
-  virtual void CopyInformation(const DataObject *data);
+  virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE;
 
-  virtual void Graft(const DataObject *data);
+  virtual void Graft(const DataObject *data) ITK_OVERRIDE;
 
-  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion();
+  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE;
 
-  virtual bool VerifyRequestedRegion();
+  virtual bool VerifyRequestedRegion() ITK_OVERRIDE;
 
   /** Set the requested region from this data object to match the requested
    * region of the data object passed in as a parameter.  This method
    * implements the API from DataObject. The data object parameter must be
    * castable to a PointSet. */
-  virtual void SetRequestedRegion(const DataObject *data);
+  virtual void SetRequestedRegion(const DataObject *data) ITK_OVERRIDE;
 
   /** Set/Get the Requested region */
   virtual void SetRequestedRegion(const RegionType & region);
@@ -207,7 +207,7 @@ protected:
   /** Constructor for use by New() method. */
   PointSet();
   ~PointSet() {}
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   // If the RegionType is ITK_UNSTRUCTURED_REGION, then the following
   // variables represent the maximum number of region that the data
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkPointSet.hxx b/Utilities/ITK/Modules/Core/Common/include/itkPointSet.hxx
index 44f0de4..08d1612 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkPointSet.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkPointSet.hxx
@@ -50,7 +50,7 @@ PointSet< TPixelType, VDimension, TMeshTraits >
   os << indent << "Maximum Number Of Regions: "
      << m_MaximumNumberOfRegions << std::endl;
   os << indent << "Point Data Container pointer: "
-     << ( ( this->m_PointDataContainer ) ?  this->m_PointDataContainer.GetPointer() : 0 ) << std::endl;
+     << ( ( this->m_PointDataContainer ) ?  this->m_PointDataContainer.GetPointer() : ITK_NULLPTR ) << std::endl;
   os << indent << "Size of Point Data Container: "
      << ( ( this->m_PointDataContainer ) ?  this->m_PointDataContainer->Size() : 0 ) << std::endl;
 }
@@ -308,8 +308,8 @@ PointSet< TPixelType, VDimension, TMeshTraits >
 {
   Superclass::Initialize();
 
-  m_PointsContainer = 0;
-  m_PointDataContainer = 0;
+  m_PointsContainer = ITK_NULLPTR;
+  m_PointDataContainer = ITK_NULLPTR;
 }
 
 /******************************************************************************
@@ -323,8 +323,8 @@ PointSet< TPixelType, VDimension, TMeshTraits >
 template< typename TPixelType, unsigned int VDimension, typename TMeshTraits >
 PointSet< TPixelType, VDimension, TMeshTraits >
 ::PointSet():
-  m_PointsContainer(0),
-  m_PointDataContainer(0)
+  m_PointsContainer(ITK_NULLPTR),
+  m_PointDataContainer(ITK_NULLPTR)
 {
 
   // If we used unstructured regions instead of structured regions, then
@@ -374,19 +374,7 @@ void
 PointSet< TPixelType, VDimension, TMeshTraits >
 ::CopyInformation(const DataObject *data)
 {
-  const PointSet *pointSet = NULL;
-
-  try
-    {
-    pointSet = dynamic_cast< const PointSet * >( data );
-    }
-  catch ( ... )
-    {
-    // pointer could not be cast back down
-    itkExceptionMacro( << "itk::PointSet::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( PointSet * ).name() );
-    }
+  const PointSet *pointSet = dynamic_cast< const PointSet * >( data );
 
   if ( !pointSet )
     {
@@ -413,19 +401,7 @@ PointSet< TPixelType, VDimension, TMeshTraits >
   // Copy Meta Data
   this->CopyInformation(data);
 
-  const Self *pointSet = NULL;
-
-  try
-    {
-    pointSet = dynamic_cast< const Self * >( data );
-    }
-  catch ( ... )
-    {
-    // pointer could not be cast back down
-    itkExceptionMacro( << "itk::PointSet::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( Self * ).name() );
-    }
+  const Self *pointSet = dynamic_cast< const Self * >( data );
 
   if ( !pointSet )
     {
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkPolygonCell.hxx b/Utilities/ITK/Modules/Core/Common/include/itkPolygonCell.hxx
index 0059d01..b03b407 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkPolygonCell.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkPolygonCell.hxx
@@ -298,7 +298,7 @@ PolygonCell< TCellInterface >
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
@@ -318,7 +318,7 @@ PolygonCell< TCellInterface >
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
@@ -337,7 +337,7 @@ PolygonCell< TCellInterface >
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
@@ -357,7 +357,7 @@ PolygonCell< TCellInterface >
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkPostOrderTreeIterator.h b/Utilities/ITK/Modules/Core/Common/include/itkPostOrderTreeIterator.h
index 511902c..68bbb2a 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkPostOrderTreeIterator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkPostOrderTreeIterator.h
@@ -63,16 +63,16 @@ protected:
 /** Constructor */
 template< typename TTreeType >
 PostOrderTreeIterator< TTreeType >::PostOrderTreeIterator(TTreeType *tree):
-  TreeIteratorBase< TTreeType >(tree, NULL)
+  TreeIteratorBase< TTreeType >(tree, ITK_NULLPTR)
 {
-  if ( tree->GetRoot() == 0 )
+  if ( tree->GetRoot() == ITK_NULLPTR )
     {
-    this->m_Begin = 0;
+    this->m_Begin = ITK_NULLPTR;
     }
   else
     {
     const TreeNodeType *root = dynamic_cast<const TreeNodeType *>(tree->GetRoot());
-    if(root == 0)
+    if(root == ITK_NULLPTR)
       {
       itkGenericExceptionMacro(<< "Can't downcast root node to TreeNodeType *");
       }
@@ -95,7 +95,7 @@ template< typename TTreeType >
 bool
 PostOrderTreeIterator< TTreeType >::HasNext() const
 {
-  if ( const_cast< TreeNodeType * >( FindNextNode() ) != NULL )
+  if ( const_cast< TreeNodeType * >( FindNextNode() ) != ITK_NULLPTR )
     {
     return true;
     }
@@ -116,22 +116,22 @@ template< typename TTreeType >
 const typename PostOrderTreeIterator< TTreeType >::TreeNodeType *
 PostOrderTreeIterator< TTreeType >::FindNextNode() const
 {
-  if ( this->m_Position == NULL || this->m_Position == this->m_Root )
+  if ( this->m_Position == ITK_NULLPTR || this->m_Position == this->m_Root )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
   TreeNodeType *sister = const_cast< TreeNodeType * >( FindSister(this->m_Position) );
 
-  if ( sister != NULL )
+  if ( sister != ITK_NULLPTR )
     {
     return FindMostRightLeaf(sister);
     }
-  if(this->m_Position->GetParent() == 0)
+  if(this->m_Position->GetParent() == ITK_NULLPTR)
     {
-    return 0;
+    return ITK_NULLPTR;
     }
   TreeNodeType *rval = dynamic_cast<TreeNodeType *>(this->m_Position->GetParent());
-  if(rval == 0)
+  if(rval == ITK_NULLPTR)
     {
       itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *");
     }
@@ -145,11 +145,11 @@ PostOrderTreeIterator< TTreeType >::FindSister(TreeNodeType *node) const
 {
   if ( !node->HasParent() )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   TreeNodeType *parent = dynamic_cast<TreeNodeType *>(node->GetParent());
-  if(parent == 0)
+  if(parent == ITK_NULLPTR)
     {
     itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *");
     }
@@ -159,21 +159,21 @@ PostOrderTreeIterator< TTreeType >::FindSister(TreeNodeType *node) const
 
   while ( childPosition < lastChildPosition )
     {
-    if(parent->GetChild(childPosition + 1) == 0)
+    if(parent->GetChild(childPosition + 1) == ITK_NULLPTR)
       {
       childPosition++;
       }
     else
       {
       TreeNodeType *sister = dynamic_cast<TreeNodeType *>(parent->GetChild(childPosition + 1));
-      if ( sister == 0)
+      if ( sister == ITK_NULLPTR)
       {
       itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *");
       }
       return sister;
       }
     }
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 /** Find the most right leaf */
@@ -189,23 +189,23 @@ PostOrderTreeIterator< TTreeType >::FindMostRightLeaf(TreeNodeType *node) const
 
     do
       {
-      if(node->GetChild(i) == 0)
+      if(node->GetChild(i) == ITK_NULLPTR)
         {
-        helpNode = 0;
+        helpNode = ITK_NULLPTR;
         }
       else
         {
         helpNode = dynamic_cast<TreeNodeType *>(node->GetChild(i));
-       if(helpNode == 0)
+       if(helpNode == ITK_NULLPTR)
           {
           itkGenericExceptionMacro(<< "Can't downcast to TreeNodeType *");
           }
         }
       i++;
       }
-    while ( helpNode == NULL && i < childCount );
+    while ( helpNode == ITK_NULLPTR && i < childCount );
 
-    if ( helpNode == NULL )
+    if ( helpNode == ITK_NULLPTR )
       {
       return node;
       }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkPreOrderTreeIterator.h b/Utilities/ITK/Modules/Core/Common/include/itkPreOrderTreeIterator.h
index 4bbb71b..c3b2c71 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkPreOrderTreeIterator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkPreOrderTreeIterator.h
@@ -83,7 +83,7 @@ template< typename TTreeType >
 bool
 PreOrderTreeIterator< TTreeType >::HasNext() const
 {
-  if ( const_cast< TreeNodeType * >( FindNextNode() ) != NULL )
+  if ( const_cast< TreeNodeType * >( FindNextNode() ) != ITK_NULLPTR )
     {
     return true;
     }
@@ -104,9 +104,9 @@ template< typename TTreeType >
 const typename PreOrderTreeIterator< TTreeType >::TreeNodeType *
 PreOrderTreeIterator< TTreeType >::FindNextNode() const
 {
-  if ( this->m_Position == NULL )
+  if ( this->m_Position == ITK_NULLPTR )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
   if ( this->m_Position->HasChildren() )
     {
@@ -115,7 +115,7 @@ PreOrderTreeIterator< TTreeType >::FindNextNode() const
 
   if ( !this->m_Position->HasParent() )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   TreeNodeType *child = this->m_Position;
@@ -124,7 +124,7 @@ PreOrderTreeIterator< TTreeType >::FindNextNode() const
   // Are we a subtree? Then we are done.
   if ( parent && parent->ChildPosition(this->m_Root) >= 0 )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   int childPosition = parent->ChildPosition(child);
@@ -134,7 +134,7 @@ PreOrderTreeIterator< TTreeType >::FindNextNode() const
     {
     TreeNodeType *help = dynamic_cast< TreeNodeType * >( parent->GetChild(childPosition + 1) );
 
-    if ( help != NULL )
+    if ( help != ITK_NULLPTR )
       {
       return help;
       }
@@ -149,7 +149,7 @@ PreOrderTreeIterator< TTreeType >::FindNextNode() const
     // Subtree
     if ( parent->ChildPosition(this->m_Root) >= 0 )
       {
-      return NULL;
+      return ITK_NULLPTR;
       }
 
     childPosition = parent->ChildPosition(child);
@@ -159,13 +159,13 @@ PreOrderTreeIterator< TTreeType >::FindNextNode() const
       {
       TreeNodeType *help = dynamic_cast< TreeNodeType * >( parent->GetChild(childPosition + 1) );
 
-      if ( help != NULL )
+      if ( help != ITK_NULLPTR )
         {
         return help;
         }
       }
     }
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 /** Clone function */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkPriorityQueueContainer.hxx b/Utilities/ITK/Modules/Core/Common/include/itkPriorityQueueContainer.hxx
index 3e1e3f1..fbd0ad4 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkPriorityQueueContainer.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkPriorityQueueContainer.hxx
@@ -133,7 +133,10 @@ ElementWrapperPointerInterface< TElement, TElementIdentifier >::m_ElementNotFoun
 // MinPriorityQueueElementWrapper
 // -----------------------------------------------------------------------------
 template<  typename TElement,  typename TElementPriority, typename TElementIdentifier > MinPriorityQueueElementWrapper< TElement, TElementPriority, TElementIdentifier >::
-MinPriorityQueueElementWrapper() : m_Priority(0), m_Location( Superclass::m_ElementNotFound )
+MinPriorityQueueElementWrapper() :
+  m_Element(0),
+  m_Priority(0),
+  m_Location( Superclass::m_ElementNotFound )
 {}
 // -----------------------------------------------------------------------------
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkProcessObject.h b/Utilities/ITK/Modules/Core/Common/include/itkProcessObject.h
index 02a2e3b..4e9f31e 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkProcessObject.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkProcessObject.h
@@ -436,7 +436,7 @@ protected:
     void operator=( const Self & ); // purposely not implemented
    };
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   //
   // Input Methods
@@ -449,9 +449,9 @@ protected:
   /** Method used internally for getting an indexed input.
    */
   DataObject * GetInput(DataObjectPointerArraySizeType idx)
-  { return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second : NULL; }
+  { return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second : ITK_NULLPTR; }
   const DataObject * GetInput(DataObjectPointerArraySizeType idx) const
-  { return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second : NULL; }
+  { return idx < m_IndexedInputs.size() ? m_IndexedInputs[idx]->second : ITK_NULLPTR; }
 
   /** Set an input */
   virtual void SetInput(const DataObjectIdentifierType & key, DataObject *input);
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkProgressAccumulator.h b/Utilities/ITK/Modules/Core/Common/include/itkProgressAccumulator.h
index 1450dfc..8a2a05f 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkProgressAccumulator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkProgressAccumulator.h
@@ -114,7 +114,7 @@ public:
 protected:
   ProgressAccumulator();
   virtual ~ProgressAccumulator();
-  void PrintSelf(std::ostream & s, Indent indent) const;
+  virtual void PrintSelf(std::ostream & s, Indent indent) const ITK_OVERRIDE;
 
 private:
   /**  Command for observing progress of pipeline filters */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkQuadrilateralCell.hxx b/Utilities/ITK/Modules/Core/Common/include/itkQuadrilateralCell.hxx
index e462a4a..720bea5 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkQuadrilateralCell.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkQuadrilateralCell.hxx
@@ -360,7 +360,7 @@ QuadrilateralCell< TCellInterface >
 
     d = vnl_determinant(mat);
     //d=vtkMath::Determinant2x2(rcol,scol);
-    if ( vcl_abs(d) < 1.e-20 )
+    if ( std::abs(d) < 1.e-20 )
       {
       return false;
       }
@@ -389,15 +389,15 @@ QuadrilateralCell< TCellInterface >
       }
 
     //  check for convergence
-    if ( ( ( vcl_abs(pcoords[0] - params[0]) ) < ITK_QUAD_CONVERGED )
-         && ( ( vcl_abs(pcoords[1] - params[1]) ) < ITK_QUAD_CONVERGED ) )
+    if ( ( ( std::abs(pcoords[0] - params[0]) ) < ITK_QUAD_CONVERGED )
+         && ( ( std::abs(pcoords[1] - params[1]) ) < ITK_QUAD_CONVERGED ) )
       {
       converged = 1;
       }
 
     // Test for bad divergence (S.Hirschberg 11.12.2001)
-    else if ( ( vcl_abs(pcoords[0]) > ITK_DIVERGED )
-              || ( vcl_abs(pcoords[1]) > ITK_DIVERGED ) )
+    else if ( ( std::abs(pcoords[0]) > ITK_DIVERGED )
+              || ( std::abs(pcoords[1]) > ITK_DIVERGED ) )
       {
       return -1;
       }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkRGBAPixel.h b/Utilities/ITK/Modules/Core/Common/include/itkRGBAPixel.h
index e27ac35..f3411e1 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkRGBAPixel.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkRGBAPixel.h
@@ -112,7 +112,7 @@ public:
   /** Return the value for the Nth component. */
   ComponentType GetScalarValue() const
   {
-    return static_cast< ComponentType >( vcl_sqrt(
+    return static_cast< ComponentType >( std::sqrt(
                                            static_cast< double >( this->operator[](0) )
                                            * static_cast< double >( this->operator[](0) )
                                            + static_cast< double >( this->operator[](1) )
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkRGBPixel.h b/Utilities/ITK/Modules/Core/Common/include/itkRGBPixel.h
index 67d5d78..081a0c6 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkRGBPixel.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkRGBPixel.h
@@ -119,7 +119,7 @@ public:
   /** Return the value for the Nth component. */
   ComponentType GetScalarValue() const
   {
-    return static_cast< ComponentType >( vcl_sqrt(
+    return static_cast< ComponentType >( std::sqrt(
                                            static_cast< double >( this->operator[](0) )
                                            * static_cast< double >( this->operator[](0) )
                                            + static_cast< double >( this->operator[](1) )
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkRealTimeClock.h b/Utilities/ITK/Modules/Core/Common/include/itkRealTimeClock.h
index a1424da..21b0d24 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkRealTimeClock.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkRealTimeClock.h
@@ -74,7 +74,7 @@ protected:
   virtual ~RealTimeClock();
 
   /** Print the object information in a stream. */
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   FrequencyType m_Frequency;
@@ -84,7 +84,7 @@ private:
   // We hide this method in the private section, because it returns the
   // modified time of the itk::Object.  That modified time is ambiguous with
   // the role of the RealTimeStamp.
-  virtual const TimeStamp & GetTimeStamp() const;
+  virtual const TimeStamp & GetTimeStamp() const ITK_OVERRIDE;
 };
 } // end of namespace itk
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkResourceProbe.h b/Utilities/ITK/Modules/Core/Common/include/itkResourceProbe.h
index 1618e3c..1175a79 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkResourceProbe.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkResourceProbe.h
@@ -61,7 +61,11 @@ public:
   /** Start counting the change of value */
   void        Start(void);
 
-  /** Stop counting the change of value */
+  /** Stop counting the change of value.
+   *
+   * If a matching Start() has not been called before, there is no
+   * effect.
+   **/
   void        Stop(void);
 
   /** Returns the number of times that the probe has been started */
@@ -83,6 +87,9 @@ public:
    */
   MeanType    GetMean(void) const;
 
+  /** Reset the probe */
+  void        Reset(void);
+
 private:
 
   ValueType m_StartValue;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkResourceProbe.hxx b/Utilities/ITK/Modules/Core/Common/include/itkResourceProbe.hxx
index 8e59ac0..47b6693 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkResourceProbe.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkResourceProbe.hxx
@@ -39,10 +39,7 @@ ResourceProbe< ValueType, MeanType >
 ::ResourceProbe(const std::string & type, const std::string & unit):
   m_TypeString(type), m_UnitString(unit)
 {
-  this->m_TotalValue      = NumericTraits< ValueType >::ZeroValue();
-  this->m_StartValue      = NumericTraits< ValueType >::ZeroValue();
-  this->m_NumberOfStarts  = NumericTraits< CountType >::ZeroValue();
-  this->m_NumberOfStops   = NumericTraits< CountType >::ZeroValue();
+  this->Reset();
 }
 
 /** Destructor */
@@ -51,6 +48,18 @@ ResourceProbe< ValueType, MeanType >
 ::~ResourceProbe()
 {}
 
+/** Reset */
+template< typename ValueType, typename MeanType >
+void
+ResourceProbe< ValueType, MeanType >
+::Reset(void)
+{
+  this->m_TotalValue      = NumericTraits< ValueType >::ZeroValue();
+  this->m_StartValue      = NumericTraits< ValueType >::ZeroValue();
+  this->m_NumberOfStarts  = NumericTraits< CountType >::ZeroValue();
+  this->m_NumberOfStops   = NumericTraits< CountType >::ZeroValue();
+}
+
 /** Returns the type probed value */
 template< typename ValueType, typename MeanType >
 std::string
@@ -87,7 +96,7 @@ ResourceProbe< ValueType, MeanType >
 {
   if ( this->m_NumberOfStops == this->m_NumberOfStarts )
     {
-    itkGenericExceptionMacro(<< "Can't stop a probe that has not been started.");
+    return;
     }
   this->m_TotalValue += this->GetInstantValue() - this->m_StartValue;
   this->m_NumberOfStops++;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkRootTreeIterator.h b/Utilities/ITK/Modules/Core/Common/include/itkRootTreeIterator.h
index d8412f4..0be5e60 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkRootTreeIterator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkRootTreeIterator.h
@@ -83,7 +83,7 @@ template< typename TTreeType >
 bool
 RootTreeIterator< TTreeType >::HasNext() const
 {
-  if ( const_cast< TreeNodeType * >( FindNextNode() ) != NULL )
+  if ( const_cast< TreeNodeType * >( FindNextNode() ) != ITK_NULLPTR )
     {
     return true;
     }
@@ -104,13 +104,13 @@ template< typename TTreeType >
 const typename RootTreeIterator< TTreeType >::TreeNodeType *
 RootTreeIterator< TTreeType >::FindNextNode() const
 {
-  if ( this->m_Position == NULL )
+  if ( this->m_Position == ITK_NULLPTR )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
   if ( this->m_Position == this->m_Root )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
   return this->m_Position->GetParent();
 }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx b/Utilities/ITK/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx
index 0bec08f..39fd4da 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx
@@ -96,8 +96,7 @@ ShapedFloodFilledFunctionConditionalConstIterator< TImage, TFunction >
   m_TempPtr->SetLargestPossibleRegion(tempRegion);
   m_TempPtr->SetBufferedRegion(tempRegion);
   m_TempPtr->SetRequestedRegion(tempRegion);
-  m_TempPtr->Allocate();
-  m_TempPtr->FillBuffer(NumericTraits< typename TTempImage::PixelType >::Zero);
+  m_TempPtr->Allocate(true); // initialize buffer to zero
 
   // Initialize the queue by adding the start index assuming one of
   // the m_Seeds is "inside" This might not be true, in which
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h b/Utilities/ITK/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h
index 570999b..e5c256f 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSimpleDataObjectDecorator.h
@@ -91,7 +91,7 @@ public:
 protected:
   SimpleDataObjectDecorator();
   ~SimpleDataObjectDecorator();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 protected:
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.hxx b/Utilities/ITK/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.hxx
index b3161b7..f6e282c 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.hxx
@@ -54,7 +54,7 @@ SinRegularizedHeavisideStepFunction< TInput, TOutput >
       const RealType angleFactor = 0.5 * vnl_math::pi * this->GetOneOverEpsilon();
       const RealType angle = input * angleFactor;
 
-      return static_cast< OutputType >( 0.5 * ( 1.0 + vcl_sin( angle ) ) );
+      return static_cast< OutputType >( 0.5 * ( 1.0 + std::sin( angle ) ) );
       }
     }
 }
@@ -73,7 +73,7 @@ SinRegularizedHeavisideStepFunction< TInput, TOutput >
     const RealType angleFactor = 0.5 * vnl_math::pi * this->GetOneOverEpsilon();
     const RealType angle = input * angleFactor;
 
-    return static_cast< OutputType >( 0.5 * angleFactor * vcl_cos(angle) );
+    return static_cast< OutputType >( 0.5 * angleFactor * std::cos(angle) );
     }
 }
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSmapsFileParser.h b/Utilities/ITK/Modules/Core/Common/include/itkSmapsFileParser.h
index 2a6493b..694e8b9 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSmapsFileParser.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSmapsFileParser.h
@@ -169,10 +169,10 @@ public:
   virtual ~SmapsData_2_6();
 
   /** Returns the heap usage in kB of the process */
-  virtual MemoryLoadType GetHeapUsage();
+  virtual MemoryLoadType GetHeapUsage() ITK_OVERRIDE;
 
   /** Returns the stack usage in kB of the process */
-  virtual MemoryLoadType GetStackUsage();
+  virtual MemoryLoadType GetStackUsage() ITK_OVERRIDE;
 
   /** fill the smaps data */
   friend ITKCommon_EXPORT std::istream &  operator>>(std::istream & smapsStream,
@@ -198,10 +198,10 @@ public:
   virtual ~VMMapData_10_2();
 
   /** Returns the heap usage in kB of the process */
-  virtual MemoryLoadType GetHeapUsage();
+  virtual MemoryLoadType GetHeapUsage() ITK_OVERRIDE;
 
   /** Returns the stack usage in kB of the process */
-  virtual MemoryLoadType GetStackUsage();
+  virtual MemoryLoadType GetStackUsage() ITK_OVERRIDE;
 
   /** fill the smaps data */
   friend ITKCommon_EXPORT std::istream & operator>>(std::istream & stream,
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSmapsFileParser.hxx b/Utilities/ITK/Modules/Core/Common/include/itkSmapsFileParser.hxx
index 534b658..6d3ec0d 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSmapsFileParser.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSmapsFileParser.hxx
@@ -178,8 +178,8 @@ void VMMapFileParser< TVMMapDataType >::ReadFile(const std::string & mapFileLoca
       std::stringstream vmmapCommand;
       vmmapCommand << "vmmap " << getpid();
 
-      FILE *vmmapCommandOutput = NULL;
-      if ( ( vmmapCommandOutput = popen(vmmapCommand.str().c_str(), "r") ) == NULL )
+      FILE *vmmapCommandOutput = ITK_NULLPTR;
+      if ( ( vmmapCommandOutput = popen(vmmapCommand.str().c_str(), "r") ) == ITK_NULLPTR )
         {
         itkGenericExceptionMacro(<< "Error using pmap. Can execute pmap command");
         }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSmartPointer.h b/Utilities/ITK/Modules/Core/Common/include/itkSmartPointer.h
index bbadd92..3ab7bde 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSmartPointer.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSmartPointer.h
@@ -39,6 +39,16 @@ namespace itk
  * \ingroup DataAccess
  * \ingroup ITKCommon
  */
+#if __cplusplus >= 201103L
+// In c++11 there is an explicit nullptr type that introduces a new keyword to
+// serve as a distinguished null pointer constant: nullptr. It is of type
+// nullptr_t, which is implicitly convertible and comparable to any pointer type
+// or pointer-to-member type. It is not implicitly convertible or comparable to
+// integral types, except for bool.
+#define SP_ITK_NULLPTR  nullptr
+#else
+#define SP_ITK_NULLPTR  NULL
+#endif
 template< typename TObjectType >
 class SmartPointer
 {
@@ -47,7 +57,7 @@ public:
 
   /** Constructor  */
   SmartPointer ()
-  { m_Pointer = 0; }
+  { m_Pointer = SP_ITK_NULLPTR; }
 
   /** Copy constructor  */
   SmartPointer (const SmartPointer< ObjectType > & p):
@@ -63,7 +73,7 @@ public:
   ~SmartPointer ()
   {
     this->UnRegister();
-    m_Pointer = 0;
+    m_Pointer = SP_ITK_NULLPTR;
   }
 
   /** Overload operator ->  */
@@ -76,9 +86,9 @@ public:
 
   /** Test if the pointer has been initialized */
   bool IsNotNull() const
-  { return m_Pointer != 0; }
+  { return m_Pointer != SP_ITK_NULLPTR; }
   bool IsNull() const
-  { return m_Pointer == 0; }
+  { return m_Pointer == SP_ITK_NULLPTR; }
 
   /** Template comparison operators. */
   template< typename TR >
@@ -117,14 +127,9 @@ public:
   /** Overload operator assignment.  */
   SmartPointer & operator=(ObjectType *r)
   {
-    if ( m_Pointer != r )
-      {
-      ObjectType *tmp = m_Pointer; //avoid recursive unregisters by retaining
-                                   // temporarily
-      m_Pointer = r;
-      this->Register();
-      if ( tmp ) { tmp->UnRegister(); }
-      }
+    SmartPointer temp(r);
+    temp.swap(*this);
+
     return *this;
   }
 
@@ -143,6 +148,13 @@ public:
     return m_Pointer;
   }
 
+  void swap(SmartPointer &other)
+    {
+      ObjectType *tmp = this->m_Pointer;
+      this->m_Pointer = other.m_Pointer;
+      other.m_Pointer = tmp;
+    }
+
 private:
   /** The pointer to the object referred to by this smart pointer. */
   ObjectType *m_Pointer;
@@ -164,6 +176,13 @@ std::ostream & operator<<(std::ostream & os, SmartPointer< T > p)
   p.Print(os);
   return os;
 }
+
+template<typename T>
+inline void swap( SmartPointer<T> &a, SmartPointer<T> &b )
+{
+  a.swap(b);
+}
+
 } // end namespace itk
 
 #endif
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSmartPointerForwardReference.h b/Utilities/ITK/Modules/Core/Common/include/itkSmartPointerForwardReference.h
index 6a82396..84e98e2 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSmartPointerForwardReference.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSmartPointerForwardReference.h
@@ -50,7 +50,7 @@ class SmartPointerForwardReference
 public:
   /** Constructor  */
   SmartPointerForwardReference ()
-  { m_Pointer = 0; }
+  { m_Pointer = ITK_NULLPTR; }
 
   /** Const constructor  */
   SmartPointerForwardReference (const SmartPointerForwardReference< T > & p);
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSparseFieldLayer.h b/Utilities/ITK/Modules/Core/Common/include/itkSparseFieldLayer.h
index 707c881..286072f 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSparseFieldLayer.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSparseFieldLayer.h
@@ -70,7 +70,7 @@ public:
   }
 
   ConstSparseFieldLayerIterator()
-  { m_Pointer = 0; }
+  { m_Pointer = ITK_NULLPTR; }
 
   ConstSparseFieldLayerIterator(TNodeType *p)
   { m_Pointer = p; }
@@ -257,7 +257,7 @@ public:
 protected:
   SparseFieldLayer();
   ~SparseFieldLayer();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   SparseFieldLayer(const Self &);    //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSparseFieldLayer.hxx b/Utilities/ITK/Modules/Core/Common/include/itkSparseFieldLayer.hxx
index a10ffe8..36676ae 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSparseFieldLayer.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSparseFieldLayer.hxx
@@ -19,7 +19,6 @@
 #define __itkSparseFieldLayer_hxx
 #include "itkSparseFieldLayer.h"
 #include <cmath>
-#include "vcl_cmath.h"
 
 namespace itk
 {
@@ -68,7 +67,7 @@ SparseFieldLayer< TNodeType >
   unsigned int              size, regionsize;
   size = Size();
   regionsize = static_cast< unsigned int >(
-    vcl_ceil( static_cast< float >( size ) / static_cast< float >( num ) ) );
+    std::ceil( static_cast< float >( size ) / static_cast< float >( num ) ) );
   ConstIterator position = Begin();
   ConstIterator last = End();
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSpatialOrientationAdapter.h b/Utilities/ITK/Modules/Core/Common/include/itkSpatialOrientationAdapter.h
index d8d3152..5c7a4bf 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSpatialOrientationAdapter.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSpatialOrientationAdapter.h
@@ -95,10 +95,10 @@ public:
   SpatialOrientationAdapter() {}
 
   /** convert from direction cosines. */
-  virtual OrientationType FromDirectionCosines(const DirectionType & Dir);
+  virtual OrientationType FromDirectionCosines(const DirectionType & Dir) ITK_OVERRIDE;
 
   /** convert to direction cosines. */
-  virtual DirectionType ToDirectionCosines(const OrientationType & Or);
+  virtual DirectionType ToDirectionCosines(const OrientationType & Or) ITK_OVERRIDE;
 };
 } // namespace itk
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSpecialCoordinatesImage.h b/Utilities/ITK/Modules/Core/Common/include/itkSpecialCoordinatesImage.h
index 41a6fdd..f1068db 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSpecialCoordinatesImage.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSpecialCoordinatesImage.h
@@ -170,7 +170,7 @@ public:
 
   /** Allocate the image memory. The size of the image must
    * already be set, e.g. by calling SetRegions(). */
-  void Allocate();
+  virtual void Allocate(bool initialize=false) ITK_OVERRIDE;
 
   /** Restore the data object to its initial state. This means releasing
    * memory. */
@@ -226,7 +226,7 @@ public:
   /** Return a pointer to the beginning of the buffer.  This is used by
    * the image iterator class. */
   TPixel * GetBufferPointer() { return m_Buffer ? m_Buffer->GetBufferPointer() : 0; }
-  const TPixel * GetBufferPointer() const { return m_Buffer ? m_Buffer->GetBufferPointer() : 0; }
+  const TPixel * GetBufferPointer() const { return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR; }
 
   /** Return a pointer to the container. */
   PixelContainer * GetPixelContainer() { return m_Buffer.GetPointer(); }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSpecialCoordinatesImage.hxx b/Utilities/ITK/Modules/Core/Common/include/itkSpecialCoordinatesImage.hxx
index e924231..a10d523 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSpecialCoordinatesImage.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSpecialCoordinatesImage.hxx
@@ -43,14 +43,14 @@ SpecialCoordinatesImage< TPixel, VImageDimension >
 template< typename TPixel, unsigned int VImageDimension >
 void
 SpecialCoordinatesImage< TPixel, VImageDimension >
-::Allocate()
+::Allocate(bool initialize)
 {
   SizeValueType num;
 
   this->ComputeOffsetTable();
   num = static_cast<SizeValueType>(this->GetOffsetTable()[VImageDimension]);
 
-  m_Buffer->Reserve(num);
+  m_Buffer->Reserve(num,initialize);
 }
 
 template< typename TPixel, unsigned int VImageDimension >
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkStdStreamLogOutput.h b/Utilities/ITK/Modules/Core/Common/include/itkStdStreamLogOutput.h
index b41143c..025bbdd 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkStdStreamLogOutput.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkStdStreamLogOutput.h
@@ -62,16 +62,16 @@ public:
   void SetStream(StreamType & Stream);
 
   /** flush a buffer */
-  virtual void Flush();
+  virtual void Flush() ITK_OVERRIDE;
 
   /** Write to multiple outputs */
-  virtual void Write(double timestamp);
+  virtual void Write(double timestamp) ITK_OVERRIDE;
 
   /** Write to a buffer */
-  virtual void Write(std::string const & content);
+  virtual void Write(std::string const & content) ITK_OVERRIDE;
 
   /** Write to a buffer */
-  virtual void Write(std::string const & content, double timestamp);
+  virtual void Write(std::string const & content, double timestamp) ITK_OVERRIDE;
 
 protected:
   /** Constructor */
@@ -80,7 +80,7 @@ protected:
   /** Destructor */
   virtual ~StdStreamLogOutput();
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkStdStreamStateSave.h b/Utilities/ITK/Modules/Core/Common/include/itkStdStreamStateSave.h
new file mode 100644
index 0000000..6f8be5c
--- /dev/null
+++ b/Utilities/ITK/Modules/Core/Common/include/itkStdStreamStateSave.h
@@ -0,0 +1,69 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkStdStreamStateSave_h
+#define __itkStdStreamStateSave_h
+
+#include <iostream>
+#include <string>
+
+namespace itk
+{
+/** \class StdStreamStateSave
+ *
+ * \brief Save a stream's format state and restore it upon destruction
+ *
+ * An RAII class to provide an exception safe mechanism to restore the
+ * format state of a stream. The class holds a resource (the stream's
+ * format state) and resets the resource to a default state upon destruction.
+ *
+ * Typical usage:
+ \code{.cpp}
+ itk::StdStreamStateSave coutState(std::cout);
+ std::cout.precision(20);
+ std::cout.hex();
+ ...
+ return;
+ \endcode
+ *
+ * \ingroup ITKCommon
+ */
+
+class StdStreamStateSave
+{
+public:
+  explicit StdStreamStateSave(std::ios& stream) :
+    m_Ios(stream),
+    m_State(NULL)
+  {
+    m_State.copyfmt(stream);
+  }
+  ~StdStreamStateSave()
+  {
+    m_Ios.copyfmt(m_State);
+  }
+
+private:
+  StdStreamStateSave(const StdStreamStateSave &);   //purposely not implemented
+  void operator=(const StdStreamStateSave &); //purposely not implemented
+
+  std::ios& m_Ios;
+  std::ios  m_State;
+};
+}
+
+#endif
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkStreamingImageFilter.hxx b/Utilities/ITK/Modules/Core/Common/include/itkStreamingImageFilter.hxx
index e356cb9..1c5784d 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkStreamingImageFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkStreamingImageFilter.hxx
@@ -143,15 +143,19 @@ StreamingImageFilter< TInputImage, TOutputImage >
       << " inputs are required but only " << ninputs << " are specified.");
     return;
     }
-  this->SetAbortGenerateData(0);
-  this->UpdateProgress(0.0);
-  this->m_Updating = true;
 
   /**
-   * Tell all Observers that the filter is starting
+   * Tell all Observers that the filter is starting, before emiting
+   * the 0.0 Progress event
    */
   this->InvokeEvent( StartEvent() );
 
+
+  this->SetAbortGenerateData(0);
+  this->UpdateProgress(0.0);
+  this->m_Updating = true;
+
+
   /**
    * Allocate the output buffer.
    */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSymmetricEigenAnalysis.hxx b/Utilities/ITK/Modules/Core/Common/include/itkSymmetricEigenAnalysis.hxx
index 5e9fe18..e540766 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSymmetricEigenAnalysis.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSymmetricEigenAnalysis.hxx
@@ -147,7 +147,7 @@ SymmetricEigenAnalysis< TMatrix, TVector, TEigenMatrix >::ReduceToTridiagonalMat
 
     e2[i] = scale * scale * h;
     f = d[l];
-    d__1 = vcl_sqrt(h);
+    d__1 = std::sqrt(h);
     g = ( -1.0 ) * vnl_math_sgn0(f) * vnl_math_abs(d__1);
     e[i] = scale * g;
     h -= f * g;
@@ -267,7 +267,7 @@ const
         }
 
       f = d[l];
-      d__1 = vcl_sqrt(h);
+      d__1 = std::sqrt(h);
       g = ( -1.0 ) * vnl_math_sgn0(f) * vnl_math_abs(d__1);
       e[i] = scale * g;
       h -= f * g;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx b/Utilities/ITK/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx
index 2529567..d463a0f 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx
@@ -25,12 +25,13 @@ namespace itk
 {
 template< unsigned int VDimension, typename TInput >
 SymmetricEllipsoidInteriorExteriorSpatialFunction< VDimension, TInput >
-::SymmetricEllipsoidInteriorExteriorSpatialFunction()
+::SymmetricEllipsoidInteriorExteriorSpatialFunction() :
+  m_UniqueAxis(10),       // Length of unique axis
+  m_SymmetricAxes(5),     // Length of symmetric axes
+  m_VectorRatio(0.0)      // Vector ratio
 {
   m_Center.Fill(0.0);      // Origin of ellipsoid
   m_Orientation.Fill(1.0); // Orientation of unique axis
-  m_UniqueAxis = 10;       // Length of unique axis
-  m_SymmetricAxes = 5;     // Length of symmetric axes
 }
 
 template< unsigned int VDimension, typename TInput >
@@ -56,10 +57,10 @@ SymmetricEllipsoidInteriorExteriorSpatialFunction< VDimension, TInput >
     pointVector[i] = position[i] - m_Center[i];
     }
 
-  uniqueTerm = vcl_pow( static_cast< double >( ( ( pointVector * m_Orientation ) / ( .5 * m_UniqueAxis ) ) ),
+  uniqueTerm = std::pow( static_cast< double >( ( ( pointVector * m_Orientation ) / ( .5 * m_UniqueAxis ) ) ),
                         static_cast< double >( 2 ) );
   symmetricVector = pointVector - ( m_Orientation * ( pointVector * m_Orientation ) );
-  symmetricTerm = vcl_pow(
+  symmetricTerm = std::pow(
     static_cast< double >( ( ( symmetricVector.GetNorm() ) / ( .5 * m_SymmetricAxes ) ) ), static_cast< double >( 2 ) );
 
   if ( ( uniqueTerm + symmetricTerm ) >= 0 && ( uniqueTerm + symmetricTerm ) <= 1 )
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTetrahedronCell.hxx b/Utilities/ITK/Modules/Core/Common/include/itkTetrahedronCell.hxx
index eeecc90..33ab4fe 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTetrahedronCell.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTetrahedronCell.hxx
@@ -208,7 +208,7 @@ TetrahedronCell< TCellInterface >
       for ( i = 0; i < 4; i++ )
         {
         this->GetFace (i, triangle);
-        triangle->EvaluatePosition(x, points, closest, pc, &dist2, NULL);
+        triangle->EvaluatePosition(x, points, closest, pc, &dist2, ITK_NULLPTR);
 
         if ( dist2 < *minDist2 )
           {
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTextOutput.h b/Utilities/ITK/Modules/Core/Common/include/itkTextOutput.h
index 8003386..3828b4c 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTextOutput.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTextOutput.h
@@ -37,7 +37,7 @@ public:
   /** New macro for creation of through a Smart Pointer   */
   itkNewMacro(TextOutput);
 
-  virtual void DisplayText(const char *s)
+  virtual void DisplayText(const char *s) ITK_OVERRIDE
   { std::cout << s << std::endl; }
 
 protected:
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkThreadLogger.h b/Utilities/ITK/Modules/Core/Common/include/itkThreadLogger.h
index 01c4946..96416f1 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkThreadLogger.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkThreadLogger.h
@@ -72,16 +72,16 @@ public:
   /** Set the priority level for the current logger. Only messages that have
    * priorities equal or greater than the one set here will be posted to the
    * current outputs. */
-  virtual void SetPriorityLevel(PriorityLevelType level);
+  virtual void SetPriorityLevel(PriorityLevelType level) ITK_OVERRIDE;
 
   /** Get the priority level for the current logger. Only messages that have
    * priorities equal or greater than the one set here will be posted to the
    * current outputs. */
-  virtual PriorityLevelType GetPriorityLevel() const;
+  virtual PriorityLevelType GetPriorityLevel() const ITK_OVERRIDE;
 
-  virtual void SetLevelForFlushing(PriorityLevelType level);
+  virtual void SetLevelForFlushing(PriorityLevelType level) ITK_OVERRIDE;
 
-  virtual PriorityLevelType GetLevelForFlushing() const;
+  virtual PriorityLevelType GetLevelForFlushing() const ITK_OVERRIDE;
 
 /** Set the delay in milliseconds between checks to see if there are any
  *  low priority messages to be processed.
@@ -94,11 +94,11 @@ public:
   virtual DelayType GetDelay() const;
 
   /** Registers another output stream with the multiple output. */
-  virtual void AddLogOutput(OutputType *output);
+  virtual void AddLogOutput(OutputType *output) ITK_OVERRIDE;
 
-  virtual void Write(PriorityLevelType level, std::string const & content);
+  virtual void Write(PriorityLevelType level, std::string const & content) ITK_OVERRIDE;
 
-  virtual void Flush();
+  virtual void Flush() ITK_OVERRIDE;
 
 protected:
 
@@ -109,7 +109,7 @@ protected:
   virtual ~ThreadLogger();
 
   /** Print contents of a ThreadLogger */
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   static ITK_THREAD_RETURN_TYPE ThreadFunction(void *);
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h b/Utilities/ITK/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h
index 557f847..360fe0f 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkThreadedIndexedContainerPartitioner.h
@@ -79,7 +79,7 @@ public:
   ThreadIdType PartitionDomain(const ThreadIdType threadId,
                            const ThreadIdType requestedTotal,
                            const DomainType& completeIndexRange,
-                           DomainType& subIndexRange) const;
+                           DomainType& subIndexRange) const ITK_OVERRIDE;
 
 protected:
   ThreadedIndexedContainerPartitioner();
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.hxx b/Utilities/ITK/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.hxx
index d5eeb57..efdff86 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkThreadedIteratorRangePartitioner.hxx
@@ -22,6 +22,8 @@
 #include "itkThreadedIteratorRangePartitioner.h"
 #include "itkMath.h"
 
+#include <iterator>
+
 namespace itk
 {
 
@@ -48,12 +50,8 @@ ThreadedIteratorRangePartitioner< TIterator >
   // overallIndexRange is expected to be inclusive
 
   // determine the actual number of pieces that will be generated
-  typename DomainType::IteratorType it;
-  ThreadIdType count = NumericTraits< ThreadIdType >::Zero;
-  for( it = completeDomain.Begin(); it != completeDomain.End(); ++it )
-    {
-    ++count;
-    }
+  ThreadIdType count = std::distance( completeDomain.Begin(), completeDomain.End() );
+
   ThreadIdType valuesPerThread =
     Math::Ceil<ThreadIdType>( static_cast< double >( count ) / static_cast< double >( requestedTotal ));
   ThreadIdType maxThreadIdUsed =
@@ -66,22 +64,14 @@ ThreadedIteratorRangePartitioner< TIterator >
     return maxThreadIdUsed + 1;
     }
 
-  // Split the domain range
-  it = completeDomain.Begin();
   const ThreadIdType startIndexCount = threadId * valuesPerThread;
-  for( ThreadIdType ii = 0; ii < startIndexCount; ++ii )
-    {
-    ++it;
-    }
-  subDomain.m_Begin = it;
+  subDomain.m_Begin = completeDomain.Begin();
+  std::advance(subDomain.m_Begin, startIndexCount );
+
   if (threadId < maxThreadIdUsed)
     {
-    const ThreadIdType endIndexCount = valuesPerThread;
-    for( ThreadIdType ii = 0; ii < endIndexCount; ++ii )
-      {
-      ++it;
-      }
-    subDomain.m_End = it;
+    subDomain.m_End = subDomain.m_Begin;
+    std::advance(subDomain.m_End, valuesPerThread );
     }
   if (threadId == maxThreadIdUsed)
     {
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTimeProbe.h b/Utilities/ITK/Modules/Core/Common/include/itkTimeProbe.h
index 276ae13..474fb9f 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTimeProbe.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTimeProbe.h
@@ -65,7 +65,7 @@ public:
   /** Get the current time.
    *  Warning: the returned value is not the elapsed time since the last Start() call.
    */
-  virtual RealTimeClock::TimeStampType GetInstantValue(void) const;
+  virtual TimeStampType GetInstantValue(void) const ITK_OVERRIDE;
 
   /** Returns the average times passed between the starts and stops of the
    *  probe. See the RealTimeClock for details on the precision and units of
@@ -75,6 +75,9 @@ public:
    */
   itkLegacyMacro(TimeStampType GetMeanTime(void) const);
 
+  /** Get a handle to m_RealTimeClock. */
+  itkGetConstObjectMacro( RealTimeClock, RealTimeClock );
+
 private:
   RealTimeClock::Pointer m_RealTimeClock;
 };
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.hxx b/Utilities/ITK/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.hxx
index 62f8057..bd5f26f 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.hxx
@@ -47,7 +47,7 @@ TorusInteriorExteriorSpatialFunction< VDimension, TInput >
   double y = position[1] - m_Origin[1];
   double z = position[2] - m_Origin[2];
 
-  double k = vcl_pow(m_MajorRadius - vcl_sqrt(x * x + y * y), 2.0) + z * z;
+  double k = std::pow(m_MajorRadius - std::sqrt(x * x + y * y), 2.0) + z * z;
 
   if ( k <= ( m_MinorRadius * m_MinorRadius ) )
     {
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTreeChangeEvent.h b/Utilities/ITK/Modules/Core/Common/include/itkTreeChangeEvent.h
index a20d007..c77d2e9 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTreeChangeEvent.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTreeChangeEvent.h
@@ -40,7 +40,7 @@ public:
 
   /** Constructor */
   TreeChangeEvent():
-    m_ChangePosition( NULL )
+    m_ChangePosition( ITK_NULLPTR )
     {}
 
   /** Copy constructor */
@@ -50,13 +50,13 @@ public:
   virtual ~TreeChangeEvent() {}
 
   /** Get the event name */
-  virtual const char * GetEventName() const { return "TreeChangeEvent"; }
+  virtual const char * GetEventName() const ITK_OVERRIDE { return "TreeChangeEvent"; }
 
   /** Check the event */
-  virtual bool CheckEvent(const::itk::EventObject *e) const { return (dynamic_cast< const Self * >( e ) != NULL); }
+  virtual bool CheckEvent(const::itk::EventObject *e) const ITK_OVERRIDE { return (dynamic_cast< const Self * >( e ) != ITK_NULLPTR); }
 
   /** Make the event object */
-  virtual::itk::EventObject * MakeObject() const { return new Self(*m_ChangePosition); }
+  virtual::itk::EventObject * MakeObject() const ITK_OVERRIDE { return new Self(*m_ChangePosition); }
 
   /** Get the change position */
   const TreeIteratorBase< TTreeType > & GetChangePosition() const { return *m_ChangePosition; }
@@ -125,7 +125,7 @@ public:
   virtual const char * GetEventName() const { return "TreeAddEvent"; }
 
   /** Check event function */
-  virtual bool CheckEvent(const::itk::EventObject *e) const { return (dynamic_cast< const Self * >( e ) != NULL); }
+  virtual bool CheckEvent(const::itk::EventObject *e) const { return (dynamic_cast< const Self * >( e ) != ITK_NULLPTR); }
 
   /** Make the event object */
   virtual::itk::EventObject * MakeObject() const { return new Self(*this->m_ChangePosition); }
@@ -160,7 +160,7 @@ public:
   virtual const char * GetEventName() const { return "TreeRemoveEvent"; }
 
   /** Check the event */
-  virtual bool CheckEvent(const::itk::EventObject *e) const { return (dynamic_cast< const Self * >( e ) != NULL); }
+  virtual bool CheckEvent(const::itk::EventObject *e) const { return (dynamic_cast< const Self * >( e ) != ITK_NULLPTR); }
 
   /** Make the event object */
   virtual::itk::EventObject * MakeObject() const { return new Self(*this->m_ChangePosition); }
@@ -190,7 +190,7 @@ public:
 
   virtual const char * GetEventName() const { return "TreePruneEvent"; }
 
-  virtual bool CheckEvent(const::itk::EventObject *e) const { return (dynamic_cast< const Self * >( e ) != NULL); }
+  virtual bool CheckEvent(const::itk::EventObject *e) const { return (dynamic_cast< const Self * >( e ) != ITK_NULLPTR); }
 
   virtual::itk::EventObject * MakeObject() const { return new Self(*this->m_ChangePosition); }
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTreeContainer.h b/Utilities/ITK/Modules/Core/Common/include/itkTreeContainer.h
index 309dd83..85ccd4b 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTreeContainer.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTreeContainer.h
@@ -29,23 +29,23 @@ namespace itk
  * This class derives from the TreeContainerBase class.
  * The class is templated over the type of the elements.
  *
- * \tparam TValueType Element type stored at each location in the Tree.
+ * \tparam TValue Element type stored at each location in the Tree.
  *
  * \ingroup DataRepresentation
  * \ingroup ITKCommon
  */
-template< typename TValueType >
-class TreeContainer:public TreeContainerBase< TValueType >
+template< typename TValue >
+class TreeContainer:public TreeContainerBase< TValue >
 {
 public:
 
   /** Standard typedefs */
-  typedef TreeContainerBase< TValueType > Superclass;
-  typedef TreeContainer< TValueType >     Self;
-  typedef SmartPointer< Self >            Pointer;
-  typedef SmartPointer< const Self >      ConstPointer;
-  typedef TValueType                      ValueType;
-  typedef TreeNode< ValueType >           TreeNodeType;
+  typedef TreeContainerBase< TValue > Superclass;
+  typedef TreeContainer< TValue >     Self;
+  typedef SmartPointer< Self >        Pointer;
+  typedef SmartPointer< const Self >  ConstPointer;
+  typedef TValue                      ValueType;
+  typedef TreeNode< ValueType >       TreeNodeType;
 
   /** Iterators typedef */
   typedef TreeIteratorBase< Self >     IteratorType;
@@ -61,34 +61,34 @@ public:
   TreeContainer(int defaultChildrenCount);
 
   /** Constructor */
-  TreeContainer(TreeContainer< TValueType > & tree);
+  TreeContainer(TreeContainer< TValue > & tree);
 
   /** Set the root as an element */
-  virtual bool SetRoot(const TValueType element);
+  virtual bool SetRoot(const TValue element);
 
   /** The the root as an iterator position */
   bool SetRoot(IteratorType & pos);
 
   /** Set the root as a tree node */
-  virtual bool SetRoot(TreeNode< TValueType > *node);
+  virtual bool SetRoot(TreeNode< TValue > *node);
 
   /** Return true if the element is in the tree */
-  bool Contains(const TValueType element);
+  bool Contains(const TValue element);
 
   /** Return the number of elements in the tree */
   int Count() const;
 
   /** Return true if the element is a leaf */
-  bool IsLeaf(const TValueType element);
+  bool IsLeaf(const TValue element);
 
   /** Return true if the element is a root */
-  bool IsRoot(const TValueType element);
+  bool IsRoot(const TValue element);
 
   /** Clear the tree */
   bool Clear();
 
   /** operator equal */
-  bool operator==(TreeContainer< TValueType > & tree);
+  bool operator==(TreeContainer< TValue > & tree);
 
   /** Swap the iterators */
   bool Swap(IteratorType & v, IteratorType & w);
@@ -97,10 +97,10 @@ public:
   const TreeNodeType * GetRoot() const { return m_Root.GetPointer(); }
 
   /** Add a child to a given parent using values */
-  bool Add(const TValueType child, const TValueType parent);
+  bool Add(const TValue child, const TValue parent);
 
   /** Get node given a value */
-  const TreeNodeType * GetNode(TValueType val) const;
+  const TreeNodeType * GetNode(TValue val) const;
 
 protected:
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTreeContainer.hxx b/Utilities/ITK/Modules/Core/Common/include/itkTreeContainer.hxx
index 9074eac..d9e0477 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTreeContainer.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTreeContainer.hxx
@@ -23,17 +23,17 @@
 namespace itk
 {
 /** Constructor */
-template< typename TValueType >
-TreeContainer< TValueType >::TreeContainer()
+template< typename TValue >
+TreeContainer< TValue >::TreeContainer()
 {
-  m_Root = NULL;
+  m_Root = ITK_NULLPTR;
   this->SetSubtree(false);
   m_DefaultChildrenCount = 2;
 }
 
 /** Constructor with default children count */
-template< typename TValueType >
-TreeContainer< TValueType >::TreeContainer(int dcc)
+template< typename TValue >
+TreeContainer< TValue >::TreeContainer(int dcc)
 {
   m_Root = NULL;
   this->SetSubtree(false);
@@ -41,8 +41,8 @@ TreeContainer< TValueType >::TreeContainer(int dcc)
 }
 
 /** Constructor by adding a tree */
-template< typename TValueType >
-TreeContainer< TValueType >::TreeContainer(TreeContainer< TValueType > & )
+template< typename TValue >
+TreeContainer< TValue >::TreeContainer(TreeContainer< TValue > & )
 {
   m_Root = NULL;
   this->SetSubtree(false);
@@ -50,34 +50,34 @@ TreeContainer< TValueType >::TreeContainer(TreeContainer< TValueType > & )
 }
 
 /** Destructor */
-template< typename TValueType >
-TreeContainer< TValueType >::~TreeContainer()
+template< typename TValue >
+TreeContainer< TValue >::~TreeContainer()
 {}
 
 /** Set the root of the tree */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeContainer< TValueType >::SetRoot(const TValueType element)
+TreeContainer< TValue >::SetRoot(const TValue element)
 {
   m_Root = TreeNodeType::New();
   m_Root->Set(element);
-  m_Root->SetParent(NULL);
+  m_Root->SetParent(ITK_NULLPTR);
   return true;
 }
 
 /** Set the root of the tree */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeContainer< TValueType >::SetRoot(TreeNode< TValueType > *node)
+TreeContainer< TValue >::SetRoot(TreeNode< TValue > *node)
 {
   m_Root = node;
   return true;
 }
 
 /** Count the number of nodes in the tree */
-template< typename TValueType >
+template< typename TValue >
 int
-TreeContainer< TValueType >::Count() const
+TreeContainer< TValue >::Count() const
 {
   if ( !m_Root )
     {
@@ -95,19 +95,19 @@ TreeContainer< TValueType >::Count() const
 }
 
 /** Swap the iterators */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeContainer< TValueType >::Swap(IteratorType & v, IteratorType & w)
+TreeContainer< TValue >::Swap(IteratorType & v, IteratorType & w)
 {
-  TreeNode< TValueType > *nv = v.GetNode();
-  TreeNode< TValueType > *nw = w.GetNode();
+  TreeNode< TValue > *nv = v.GetNode();
+  TreeNode< TValue > *nw = w.GetNode();
 
   if ( nv == NULL || nw == NULL )
     {
     return false;
     }
-  TreeNode< TValueType > *pv = nv->GetParent();
-  TreeNode< TValueType > *pw = nw->GetParent();
+  TreeNode< TValue > *pv = nv->GetParent();
+  TreeNode< TValue > *pw = nw->GetParent();
 
   if ( pv == NULL && pw == NULL )
     {
@@ -136,9 +136,9 @@ TreeContainer< TValueType >::Swap(IteratorType & v, IteratorType & w)
 }
 
 /** Return true if the tree contains this element */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeContainer< TValueType >::Contains(const TValueType element)
+TreeContainer< TValue >::Contains(const TValue element)
 {
   PreOrderTreeIterator< Self > it(this, m_Root);
   it.GoToBegin();
@@ -154,9 +154,9 @@ TreeContainer< TValueType >::Contains(const TValueType element)
 }
 
 /** Equal operator */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeContainer< TValueType >::operator==(TreeContainer< TValueType > & tree)
+TreeContainer< TValue >::operator==(TreeContainer< TValue > & tree)
 {
   PreOrderTreeIterator< Self > it(this, m_Root);
   it.GoToBegin();
@@ -177,9 +177,9 @@ TreeContainer< TValueType >::operator==(TreeContainer< TValueType > & tree)
 }
 
 /** Return true if the given element is a leaf of the tree */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeContainer< TValueType >::IsLeaf(TValueType element)
+TreeContainer< TValue >::IsLeaf(TValue element)
 {
   PreOrderTreeIterator< Self > it(this, m_Root);
   it.GoToBegin();
@@ -201,9 +201,9 @@ TreeContainer< TValueType >::IsLeaf(TValueType element)
 }
 
 /** Return true of the node containing the element is the root */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeContainer< TValueType >::IsRoot(TValueType element)
+TreeContainer< TValue >::IsRoot(TValue element)
 {
   PreOrderTreeIterator< Self > it(this, m_Root);
   it.GoToBegin();
@@ -226,19 +226,19 @@ TreeContainer< TValueType >::IsRoot(TValueType element)
 }
 
 /** Clear the tree */
-template< typename TValueType >
-bool TreeContainer< TValueType >::Clear()
+template< typename TValue >
+bool TreeContainer< TValue >::Clear()
 {
   PreOrderTreeIterator< Self > it(this, m_Root);
   bool                         success = it.Remove();
-  m_Root = NULL;
+  m_Root = ITK_NULLPTR;
   return success;
 }
 
 /** Get node given a value */
-template< typename TValueType >
-const TreeNode< TValueType > *
-TreeContainer< TValueType >::GetNode(TValueType val) const
+template< typename TValue >
+const TreeNode< TValue > *
+TreeContainer< TValue >::GetNode(TValue val) const
 {
   PreOrderTreeIterator< Self > it(this, m_Root);
   it.GoToBegin();
@@ -250,26 +250,26 @@ TreeContainer< TValueType >::GetNode(TValueType val) const
       }
     ++it;
     }
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 /** Set the root of the tree from the iterator position */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeContainer< TValueType >::SetRoot(IteratorType & pos)
+TreeContainer< TValue >::SetRoot(IteratorType & pos)
 {
   if ( this->m_SubTree )
     {
     return false;
     }
-  TreeNode< TValueType > *node = pos.GetNode();
+  TreeNode< TValue > *node = pos.GetNode();
   if ( node == NULL )
     {
     return false;
     }
 
-  TreeNode< TValueType > *parent = node->GetParent();
-  TreeNode< TValueType > *help = NULL;
+  TreeNode< TValue > *parent = node->GetParent();
+  TreeNode< TValue > *help = NULL;
 
   if ( parent == NULL )
     {
@@ -297,13 +297,13 @@ TreeContainer< TValueType >::SetRoot(IteratorType & pos)
 }
 
 /** Add a child to a given parent */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeContainer< TValueType >::Add(const TValueType child, const TValueType parent)
+TreeContainer< TValue >::Add(const TValue child, const TValue parent)
 {
   if ( !m_Root )
     {
-    std::cout << "TreeContainer<TValueType>::Add() : The tree is empty" << std::endl;
+    std::cout << "TreeContainer<TValue>::Add() : The tree is empty" << std::endl;
     return false;
     }
   // Find the first node in the tree that has the parent value
@@ -322,9 +322,9 @@ TreeContainer< TValueType >::Add(const TValueType child, const TValueType parent
 }
 
 /** Print self */
-template< typename TValueType >
+template< typename TValue >
 void
-TreeContainer< TValueType >::PrintSelf(std::ostream & os, Indent indent) const
+TreeContainer< TValue >::PrintSelf(std::ostream & os, Indent indent) const
 {
   Superclass::PrintSelf(os, indent);
   os << indent << "Number of objects = " << this->Count() << std::endl;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTreeContainerBase.h b/Utilities/ITK/Modules/Core/Common/include/itkTreeContainerBase.h
index 2c702c1..0aa2c39 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTreeContainerBase.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTreeContainerBase.h
@@ -30,7 +30,7 @@ namespace itk
  * \ingroup DataRepresentation
  * \ingroup ITKCommon
  */
-template< typename TValueType >
+template< typename TValue >
 class TreeContainerBase:public Object
 {
 public:
@@ -40,35 +40,35 @@ public:
   typedef SmartPointer< Self >       Pointer;
   typedef SmartPointer< const Self > ConstPointer;
 
-  typedef TValueType ValueType;
+  typedef TValue ValueType;
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(TreeContainerBase, Object);
 
   /** Set the root element.
    * A new node is created and the element is added to the node */
-  virtual bool SetRoot(const TValueType element) = 0;
+  virtual bool SetRoot(const TValue element) = 0;
 
   /** Set the root has a node */
-  virtual bool SetRoot(TreeNode< TValueType > *node) = 0;
+  virtual bool SetRoot(TreeNode< TValue > *node) = 0;
 
   /** Return true if the tree contains the element */
-  virtual bool Contains(const TValueType element) = 0;
+  virtual bool Contains(const TValue element) = 0;
 
   /** Return the number of nodes in the tree */
   virtual int Count() const = 0;
 
   /** Return if the element is a leaf */
-  virtual bool IsLeaf(const TValueType element) = 0;
+  virtual bool IsLeaf(const TValue element) = 0;
 
   /** Return if the element is root */
-  virtual bool IsRoot(const TValueType element) = 0;
+  virtual bool IsRoot(const TValue element) = 0;
 
   /** Clear the tree */
   virtual bool Clear() = 0;
 
   /** Get the root as a node */
-  virtual const TreeNode< TValueType > * GetRoot() const = 0;
+  virtual const TreeNode< TValue > * GetRoot() const = 0;
 
   /** Set if the tree is a subtree */
   void SetSubtree(bool val) { m_SubTree = val; }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTreeIteratorBase.hxx b/Utilities/ITK/Modules/Core/Common/include/itkTreeIteratorBase.hxx
index 6230331..931c63a 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTreeIteratorBase.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTreeIteratorBase.hxx
@@ -53,7 +53,7 @@ TreeIteratorBase< TTreeType >::TreeIteratorBase(TTreeType *tree, const TreeNodeT
   m_Position = const_cast< TreeNodeType * >( m_Root );
   m_Tree = tree;
   m_Begin = m_Position;
-  m_End = NULL;
+  m_End = ITK_NULLPTR;
 }
 
 /** Constructor */
@@ -71,7 +71,7 @@ TreeIteratorBase< TTreeType >::TreeIteratorBase(const TTreeType *tree, const Tre
   m_Position = const_cast< TreeNodeType * >( m_Root );
   m_Tree = const_cast< TTreeType * >( tree );
   m_Begin = m_Position;
-  m_End = NULL;
+  m_End = ITK_NULLPTR;
 }
 
 /** Return the current value of the node */
@@ -98,13 +98,9 @@ template< typename TTreeType >
 bool
 TreeIteratorBase< TTreeType >::Add(ValueType element)
 {
-  if ( m_Position == NULL && m_Root == NULL )
+  if ( m_Position == ITK_NULLPTR && m_Root == ITK_NULLPTR )
     {
-    bool returnValue = false;
-    if ( m_Tree )
-      {
-      returnValue = const_cast< TTreeType * >( m_Tree )->SetRoot(element);
-      }
+    bool returnValue = const_cast< TTreeType * >( m_Tree )->SetRoot(element);
     // signal AddEvent for self
     m_Root = dynamic_cast< const TreeNodeType * >( const_cast< TTreeType * >( m_Tree )->GetRoot() );
     m_Position =  const_cast< TreeNodeType * >( m_Root );
@@ -112,7 +108,7 @@ TreeIteratorBase< TTreeType >::Add(ValueType element)
     m_Tree->InvokeEvent( TreeAddEvent< TTreeType >(*this) );
     return returnValue;
     }
-  else if ( m_Position == NULL )
+  else if ( m_Position == ITK_NULLPTR )
     {
     return false;
     }
@@ -169,7 +165,7 @@ template< typename TTreeType >
 bool
 TreeIteratorBase< TTreeType >::IsRoot() const
 {
-  if ( m_Root == NULL )
+  if ( m_Root == ITK_NULLPTR )
     {
     return false;
     }
@@ -196,13 +192,13 @@ TreeIteratorBase< TTreeType >::Add(TTreeType & subTree)
     return false;
     }
 
-  if ( m_Root == NULL )
+  if ( m_Root == ITK_NULLPTR )
     {
     m_Root = static_cast< const TreeNodeType * >( subTree.GetRoot() );
     }
   else
     {
-    if ( m_Position == NULL )
+    if ( m_Position == ITK_NULLPTR )
       {
       return false;
       }
@@ -227,11 +223,11 @@ template< typename TTreeType >
 bool
 TreeIteratorBase< TTreeType >::HasChild(int number) const
 {
-  if ( m_Position == NULL )
+  if ( m_Position == ITK_NULLPTR )
     {
     return false;
     }
-  if ( m_Position->GetChild(number) != NULL )
+  if ( m_Position->GetChild(number) != ITK_NULLPTR )
     {
     return true;
     }
@@ -261,7 +257,7 @@ TreeIteratorBase< TTreeType >::RemoveChild(int number)
     }
   TreeNodeType *child = dynamic_cast< TreeNodeType * >( m_Position->GetChild(number) );
 
-  if ( child != NULL )
+  if ( child != ITK_NULLPTR )
     {
     // signal PruneEvent (node plus all children are removed)
     TreeIteratorBase< TTreeType > *childIterator = Clone();
@@ -283,7 +279,7 @@ template< typename TTreeType >
 int
 TreeIteratorBase< TTreeType >::CountChildren() const
 {
-  if ( m_Position == NULL )
+  if ( m_Position == ITK_NULLPTR )
     {
     return -1;
     }
@@ -295,7 +291,7 @@ template< typename TTreeType >
 bool
 TreeIteratorBase< TTreeType >::HasParent() const
 {
-  return ( m_Position != NULL && m_Position->GetParent() != NULL );
+  return ( m_Position != ITK_NULLPTR && m_Position->GetParent() != ITK_NULLPTR );
 }
 
 /** Disconnect the tree */
@@ -303,7 +299,7 @@ template< typename TTreeType >
 bool
 TreeIteratorBase< TTreeType >::Disconnect()
 {
-  if ( m_Position == NULL )
+  if ( m_Position == ITK_NULLPTR )
     {
     return false;
     }
@@ -331,7 +327,7 @@ TreeIteratorBase< TTreeType >::Disconnect()
 
   m_Tree->InvokeEvent( TreeRemoveEvent< TTreeType >(*this) );
 
-  m_Position = NULL;
+  m_Position = ITK_NULLPTR;
   return true;
 }
 
@@ -343,7 +339,7 @@ TreeIteratorBase< TTreeType >::Children()
   itkGenericOutputMacro("Not implemented yet");
   ::itk::ExceptionObject e_(__FILE__, __LINE__, "Not implemented yet", ITK_LOCATION);
   throw e_; /* Explicit naming to work around Intel compiler bug.  */
-  return 0;
+  return ITK_NULLPTR;
 }
 
 /** Return the first parent found */
@@ -351,9 +347,9 @@ template< typename TTreeType >
 const typename TreeIteratorBase< TTreeType >::TreeNodeType *
 TreeIteratorBase< TTreeType >::GetParent() const
 {
-  if ( m_Position == NULL )
+  if ( m_Position == ITK_NULLPTR )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   return m_Position->GetParent();
@@ -366,21 +362,21 @@ TreeIteratorBase< TTreeType > *TreeIteratorBase< TTreeType >::Parents()
   itkGenericOutputMacro("Not implemented yet");
   ::itk::ExceptionObject e_(__FILE__, __LINE__, "Not implemented yet", ITK_LOCATION);
   throw e_; /* Explicit naming to work around Intel compiler bug.  */
-  return 0;
+  return ITK_NULLPTR;
 }
 
 /** Go to a child */
 template< typename TTreeType >
 bool TreeIteratorBase< TTreeType >::GoToChild(ChildIdentifier number)
 {
-  if ( m_Position == NULL )
+  if ( m_Position == ITK_NULLPTR )
     {
     return false;
     }
 
   TreeNodeType *next = dynamic_cast< TreeNodeType * >( m_Position->GetChild(number) );
 
-  if ( next == NULL )
+  if ( next == ITK_NULLPTR )
     {
     return false;
     }
@@ -392,7 +388,7 @@ bool TreeIteratorBase< TTreeType >::GoToChild(ChildIdentifier number)
 template< typename TTreeType >
 bool TreeIteratorBase< TTreeType >::GoToParent()
 {
-  if ( m_Position == NULL )
+  if ( m_Position == ITK_NULLPTR )
     {
     return false;
     }
@@ -412,18 +408,18 @@ TreeIteratorBase< TTreeType > *TreeIteratorBase< TTreeType >::GetChild(int numbe
 {
   if ( !m_Position )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   TreeNodeType *child = dynamic_cast< TreeNodeType * >( m_Position->GetChild(number) );
 
   if ( !child )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 //    return new WalkTreeIterator<ValueType,P>( child, m_Root, m_Tree, getType()
 // );
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 /** Count the number of nodes from the beginning */
@@ -481,7 +477,7 @@ template< typename TTreeType >
 bool
 TreeIteratorBase< TTreeType >::Remove()
 {
-  if ( m_Position == NULL )
+  if ( m_Position == ITK_NULLPTR )
     {
     return false;
     }
@@ -497,13 +493,13 @@ TreeIteratorBase< TTreeType >::Remove()
     }
   else if ( m_Root == m_Position )
     {
-    m_Root = NULL;
-    m_Tree->SetRoot( (TreeNodeType *)NULL );
+    m_Root = ITK_NULLPTR;
+    m_Tree->SetRoot( (TreeNodeType *)ITK_NULLPTR );
     // this won't do anything if root is already != NULL  ==> root cannot be
     // removed
     }
 
-  m_Position->SetParent(NULL); // we don't have a parent anymore
+  m_Position->SetParent(ITK_NULLPTR); // we don't have a parent anymore
   m_Tree->InvokeEvent( TreePruneEvent< TTreeType >(*this) );
   while ( m_Position->CountChildren() > 0 )  // remove all children
     {
@@ -512,8 +508,8 @@ TreeIteratorBase< TTreeType >::Remove()
     m_Position->Remove(child);
     }
 
-  position = NULL;
-  m_Position = NULL;  // Smart pointer, deletes *m_Position
+  position = ITK_NULLPTR;
+  m_Position = ITK_NULLPTR;  // Smart pointer, deletes *m_Position
 
   m_Tree->Modified();
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTreeIteratorClone.h b/Utilities/ITK/Modules/Core/Common/include/itkTreeIteratorClone.h
index 0b4b2aa..8fdd8df 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTreeIteratorClone.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTreeIteratorClone.h
@@ -43,8 +43,8 @@ public:
   /** Copy constructor  */
   TreeIteratorClone (const TreeIteratorClone< ObjectType > & p)
   {
-    m_Pointer = 0;
-    if ( p.m_Pointer != NULL )
+    m_Pointer = ITK_NULLPTR;
+    if ( p.m_Pointer != ITK_NULLPTR )
       {
       m_Pointer = p.m_Pointer->Clone();
       }
@@ -63,7 +63,7 @@ public:
   /** Constructor to reference p  */
   TreeIteratorClone (const ObjectType & p)
   {
-    m_Pointer = 0;
+    m_Pointer = ITK_NULLPTR;
     m_Pointer = const_cast< ObjectType * >( &p )->Clone();
   }
 
@@ -71,7 +71,7 @@ public:
   ~TreeIteratorClone ()
   {
     delete m_Pointer;
-    m_Pointer = 0;
+    m_Pointer = ITK_NULLPTR;
   }
 
   /** Overload operator ->  */
@@ -112,8 +112,8 @@ public:
     if ( m_Pointer != r )
       {
       delete m_Pointer;
-      m_Pointer = 0;
-      if ( r != NULL )
+      m_Pointer = ITK_NULLPTR;
+      if ( r != ITK_NULLPTR )
         {
         m_Pointer = const_cast< ObjectType * >( r )->Clone();
         }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTreeNode.h b/Utilities/ITK/Modules/Core/Common/include/itkTreeNode.h
index 336217a..406080e 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTreeNode.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTreeNode.h
@@ -34,19 +34,19 @@ namespace itk
  *
  * The class is templated over the type of the elements.
  *
- * \tparam TValueType = Element type stored in the node
+ * \tparam TValue = Element type stored in the node
  *
  * \ingroup DataRepresentation
  * \ingroup ITKCommon
  */
-template< typename TValueType >
+template< typename TValue >
 class TreeNode:public Object
 {
 public:
 
   /** Standard typedefs */
   typedef Object                     Superclass;
-  typedef TreeNode< TValueType >     Self;
+  typedef TreeNode< TValue >         Self;
   typedef SmartPointer< Self >       Pointer;
   typedef SmartPointer< const Self > ConstPointer;
   typedef std::vector< Pointer >     ChildrenListType;
@@ -59,10 +59,10 @@ public:
   itkTypeMacro(TreeNode, Object);
 
   /** Get the value of the node */
-  const TValueType & Get() const;
+  const TValue & Get() const;
 
   /** Set the current value of the node */
-  TValueType Set(const TValueType data);
+  TValue Set(const TValue data);
 
   /** Get the child node */
   Self * GetChild(ChildIdentifier number) const;
@@ -86,7 +86,7 @@ public:
   bool Remove(Self *n);
 
   /** Get the number of children given a name and depth */
-  ChildIdentifier GetNumberOfChildren(unsigned int depth = 0, char *name = NULL) const;
+  ChildIdentifier GetNumberOfChildren(unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Replace a given child by a new one */
   bool ReplaceChild(Self *oldChild, Self *newChild);
@@ -95,7 +95,7 @@ public:
   ChildIdentifier ChildPosition(const Self *node) const;
 
   /** Return the child position given a value */
-  ChildIdentifier ChildPosition(TValueType node) const;
+  ChildIdentifier ChildPosition(TValue node) const;
 
   /** Add a child to the node */
   void AddChild(Self *node);
@@ -105,7 +105,7 @@ public:
 
   /** Get the children list */
 #if !defined( CABLE_CONFIGURATION )
-  virtual ChildrenListType * GetChildren(unsigned int depth = 0, char *name = NULL) const;
+  virtual ChildrenListType * GetChildren(unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
 #endif
 
@@ -115,13 +115,13 @@ public:
 #endif
 
   /** Set the data of the node */
-  //virtual void SetData(TValueType data) {m_Data = data;}
+  //virtual void SetData(TValue data) {m_Data = data;}
 
 protected:
 
   TreeNode();
   virtual ~TreeNode();
-  TValueType m_Data;
+  TValue m_Data;
 
   Self *m_Parent;
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTreeNode.hxx b/Utilities/ITK/Modules/Core/Common/include/itkTreeNode.hxx
index 8daa9f2..732db30 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTreeNode.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTreeNode.hxx
@@ -18,20 +18,21 @@
 #ifndef __itkTreeNode_hxx
 #define __itkTreeNode_hxx
 
+#include "itkMacro.h"
 #include "itkTreeNode.h"
 #include <cstring>
 
 namespace itk
 {
 /** Constructor */
-template< typename TValueType >
-TreeNode< TValueType >
-::TreeNode():m_Parent(NULL)
+template< typename TValue >
+TreeNode< TValue >
+::TreeNode():m_Parent(ITK_NULLPTR)
 {}
 
 /** Destructor */
-template< typename TValueType >
-TreeNode< TValueType >
+template< typename TValue >
+TreeNode< TValue >
 ::~TreeNode()
 {
   if ( m_Parent )
@@ -43,26 +44,26 @@ TreeNode< TValueType >
 
   for ( ChildIdentifier i = numberOfChildren; i > 0; i-- )
     {
-    m_Children[i - 1]->SetParent(NULL);
+    m_Children[i - 1]->SetParent(ITK_NULLPTR);
     }
   m_Children.clear();
-  m_Parent = NULL;
+  m_Parent = ITK_NULLPTR;
   m_Data = 0;
 }
 
 /** Return the parent node */
-template< typename TValueType >
-TreeNode< TValueType > *
-TreeNode< TValueType >
+template< typename TValue >
+TreeNode< TValue > *
+TreeNode< TValue >
 ::GetParent() const
 {
   return m_Parent;
 }
 
 /** Get a child */
-template< typename TValueType >
-TreeNode< TValueType > *
-TreeNode< TValueType >
+template< typename TValue >
+TreeNode< TValue > *
+TreeNode< TValue >
 ::GetChild(ChildIdentifier number) const
 {
   const ChildIdentifier numberOfChildren = static_cast< ChildIdentifier >( m_Children.size() );
@@ -73,50 +74,50 @@ TreeNode< TValueType >
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
 /** Set the value of a node */
-template< typename TValueType >
-TValueType
-TreeNode< TValueType >
-::Set(const TValueType data)
+template< typename TValue >
+TValue
+TreeNode< TValue >
+::Set(const TValue data)
 {
-  TValueType help = m_Data;
+  TValue help = m_Data;
 
   m_Data = data;
   return help;
 }
 
 /** Get the data of node */
-template< typename TValueType >
-const TValueType &
-TreeNode< TValueType >
+template< typename TValue >
+const TValue &
+TreeNode< TValue >
 ::Get() const
 {
   return m_Data;
 }
 
 /** Return true if has a parent */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeNode< TValueType >
+TreeNode< TValue >
 ::HasParent() const
 {
   return ( m_Parent ) ? true : false;
 }
 
 /** Set the parent node */
-template< typename TValueType >
+template< typename TValue >
 void
-TreeNode< TValueType >
-::SetParent(TreeNode< TValueType > *node)
+TreeNode< TValue >
+::SetParent(TreeNode< TValue > *node)
 {
   //keep ourself alive just a bit longer
   Pointer ourself = this;
 
-  if ( m_Parent != NULL )
+  if ( m_Parent != ITK_NULLPTR )
     {
     m_Parent->Remove(this);
     }
@@ -124,27 +125,27 @@ TreeNode< TValueType >
 }
 
 /** Return true if the node has children */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeNode< TValueType >
+TreeNode< TValue >
 ::HasChildren() const
 {
   return ( m_Children.size() > 0 ) ? true : false;
 }
 
 /** Return the number of children */
-template< typename TValueType >
-typename TreeNode< TValueType >::ChildIdentifier
-TreeNode< TValueType >
+template< typename TValue >
+typename TreeNode< TValue >::ChildIdentifier
+TreeNode< TValue >
 ::CountChildren() const
 {
   return static_cast< ChildIdentifier >( m_Children.size() );
 }
 
 /** Remove a child node from the current node */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeNode< TValueType >
+TreeNode< TValue >
 ::Remove(Self *n)
 {
   typename std::vector< Pointer >::iterator pos;
@@ -154,16 +155,16 @@ TreeNode< TValueType >
     //keep node alive just a bit longer
     Pointer position = n;
     m_Children.erase(pos);
-    n->SetParent(NULL);
+    n->SetParent(ITK_NULLPTR);
     return true;
     }
   return false;
 }
 
 /** Replace a child by a new one */
-template< typename TValueType >
+template< typename TValue >
 bool
-TreeNode< TValueType >
+TreeNode< TValue >
 ::ReplaceChild(Self *oldChild, Self *newChild)
 {
   const ChildIdentifier numberOfChildren = static_cast< ChildIdentifier >( m_Children.size() );
@@ -180,9 +181,9 @@ TreeNode< TValueType >
 }
 
 /** Return the child position given a node */
-template< typename TValueType >
+template< typename TValue >
 OffsetValueType
-TreeNode< TValueType >
+TreeNode< TValue >
 ::ChildPosition(const Self *node) const
 {
   const ChildIdentifier numberOfChildren = static_cast< ChildIdentifier >( m_Children.size() );
@@ -198,10 +199,10 @@ TreeNode< TValueType >
 }
 
 /** Return the child position given an element, the first child found. */
-template< typename TValueType >
-typename TreeNode< TValueType >::ChildIdentifier
-TreeNode< TValueType >
-::ChildPosition(TValueType element) const
+template< typename TValue >
+typename TreeNode< TValue >::ChildIdentifier
+TreeNode< TValue >
+::ChildPosition(TValue element) const
 {
   const ChildIdentifier numberOfChildren = static_cast< ChildIdentifier >( m_Children.size() );
 
@@ -216,9 +217,9 @@ TreeNode< TValueType >
 }
 
 /** Add a child node */
-template< typename TValueType >
+template< typename TValue >
 void
-TreeNode< TValueType >
+TreeNode< TValue >
 ::AddChild(Self *node)
 {
   Pointer nodeKeepAlive = node;
@@ -228,9 +229,9 @@ TreeNode< TValueType >
 }
 
 /** Add a child at a specific position in the children list */
-template< typename TValueType >
+template< typename TValue >
 void
-TreeNode< TValueType >
+TreeNode< TValue >
 ::AddChild(ChildIdentifier number, Self *node)
 {
   const ChildIdentifier numberOfChildren = static_cast< ChildIdentifier >( m_Children.size() );
@@ -241,7 +242,7 @@ TreeNode< TValueType >
     m_Children.resize(childId);
     for ( ChildIdentifier i = numberOfChildren; i <= childId; i++ )
       {
-      m_Children[i] = NULL;
+      m_Children[i] = ITK_NULLPTR;
       }
     m_Children[number] = node;
     return;
@@ -251,9 +252,9 @@ TreeNode< TValueType >
 }
 
 /** Get the number of children given a name and a depth */
-template< typename TValueType >
-typename TreeNode< TValueType >::ChildIdentifier
-TreeNode< TValueType >
+template< typename TValue >
+typename TreeNode< TValue >::ChildIdentifier
+TreeNode< TValue >
 ::GetNumberOfChildren(unsigned int depth, char *name) const
 {
   typename ChildrenListType::const_iterator it = m_Children.begin();
@@ -262,7 +263,7 @@ TreeNode< TValueType >
   ChildIdentifier cnt = 0;
   while ( it != itEnd )
     {
-    if ( name == NULL || strstr(typeid( **it ).name(), name) )
+    if ( name == ITK_NULLPTR || strstr(typeid( **it ).name(), name) )
       {
       ++cnt;
       }
@@ -285,9 +286,9 @@ TreeNode< TValueType >
 
 /** Get children given a name and a depth */
 #if !defined( CABLE_CONFIGURATION )
-template< typename TValueType >
-typename TreeNode< TValueType >::ChildrenListType *
-TreeNode< TValueType >
+template< typename TValue >
+typename TreeNode< TValue >::ChildrenListType *
+TreeNode< TValue >
 ::GetChildren(unsigned int depth, char *name) const
 {
   ChildrenListType *children = new ChildrenListType;
@@ -299,7 +300,7 @@ TreeNode< TValueType >
 
   while ( childrenListIt != childrenListEnd )
     {
-    if ( name == NULL || strstr(typeid( **childrenListIt ).name(), name) )
+    if ( name == ITK_NULLPTR || strstr(typeid( **childrenListIt ).name(), name) )
       {
       children->push_back(*childrenListIt);
       }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTriangleCell.hxx b/Utilities/ITK/Modules/Core/Common/include/itkTriangleCell.hxx
index 745beb0..52b280b 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTriangleCell.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTriangleCell.hxx
@@ -374,7 +374,7 @@ TriangleCell< TCellInterface >::ComputeArea(PointsContainer *iPoints)
   CoordRepType c = p[1].EuclideanDistanceTo(p[0]);
 
   CoordRepType s = 0.5 * ( a + b + c );
-  return vcl_sqrt( s * ( s - a ) * ( s - b ) * ( s - c ) );
+  return std::sqrt( s * ( s - a ) * ( s - b ) * ( s - c ) );
 }
 
 template< typename TCellInterface >
@@ -507,7 +507,6 @@ TriangleCell< TCellInterface >
   // u32 is orthogonal to v12
   //
   const double dotproduct =  v12 * v32;
-  typedef typename VectorType::ValueType VectorValueType;
   VectorType u12 = v12 - v32 * ( dotproduct / v32.GetSquaredNorm() );
   VectorType u32 = v32 - v12 * ( dotproduct / v12.GetSquaredNorm() );
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkTriangleHelper.hxx b/Utilities/ITK/Modules/Core/Common/include/itkTriangleHelper.hxx
index 20ef3b6..73946e8 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkTriangleHelper.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkTriangleHelper.hxx
@@ -65,7 +65,7 @@ TriangleHelper< TPoint >::ComputeNormal(const PointType & iA,
 
   if ( l2 != 0.0 )
     {
-    w /= vcl_sqrt(l2);
+    w /= std::sqrt(l2);
     }
 
   return w;
@@ -83,14 +83,14 @@ TriangleHelper< TPoint >::Cotangent(const PointType & iA,
 
   if ( v21_l2 != NumericTraits< CoordRepType >::Zero )
     {
-    v21 /= vcl_sqrt(v21_l2);
+    v21 /= std::sqrt(v21_l2);
     }
 
   VectorType   v23 = iC - iB;
   CoordRepType v23_l2 = v23.GetSquaredNorm();
   if ( v23_l2 != NumericTraits< CoordRepType >::Zero )
     {
-    v23 /= vcl_sqrt(v23_l2);
+    v23 /= std::sqrt(v23_l2);
     }
 
   CoordRepType bound(0.999999);
@@ -98,7 +98,7 @@ TriangleHelper< TPoint >::Cotangent(const PointType & iA,
   CoordRepType cos_theta = vnl_math_max( -bound,
                                          vnl_math_min(bound, v21 * v23) );
 
-  return 1.0 / vcl_tan( vcl_acos(cos_theta) );
+  return 1.0 / std::tan( std::acos(cos_theta) );
 }
 
 template< typename TPoint >
@@ -146,11 +146,11 @@ TriangleHelper< TPoint >::ComputeAngle(const PointType & iP1,
 
   if ( v21_l2 != 0.0 )
     {
-    v21 /= vcl_sqrt(v21_l2);
+    v21 /= std::sqrt(v21_l2);
     }
   if ( v23_l2 != 0.0 )
     {
-    v23 /= vcl_sqrt(v23_l2);
+    v23 /= std::sqrt(v23_l2);
     }
 
   CoordRepType bound(0.999999);
@@ -158,7 +158,7 @@ TriangleHelper< TPoint >::ComputeAngle(const PointType & iP1,
   CoordRepType cos_theta = vnl_math_max( -bound,
                                          vnl_math_min(bound, v21 * v23) );
 
-  return vcl_acos(cos_theta);
+  return std::acos(cos_theta);
 }
 
 template< typename TPoint >
@@ -233,7 +233,7 @@ TriangleHelper< TPoint >::ComputeArea(const PointType & iP1,
 
   CoordRepType s = 0.5 * ( a + b + c );
 
-  return static_cast< CoordRepType >( vcl_sqrt ( s * ( s - a ) * ( s - b ) * ( s - c ) ) );
+  return static_cast< CoordRepType >( std::sqrt ( s * ( s - a ) * ( s - b ) * ( s - c ) ) );
 }
 
 template< typename TPoint >
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkValarrayImageContainer.h b/Utilities/ITK/Modules/Core/Common/include/itkValarrayImageContainer.h
index a2d5ece..1ff33d1 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkValarrayImageContainer.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkValarrayImageContainer.h
@@ -106,7 +106,7 @@ public:
       }
     else
       {
-      return NULL;
+      return ITK_NULLPTR;
       }
   }
 
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkVariableLengthVector.h b/Utilities/ITK/Modules/Core/Common/include/itkVariableLengthVector.h
index 3b339e1..1cafed3 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkVariableLengthVector.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkVariableLengthVector.h
@@ -72,14 +72,14 @@ namespace itk
  * \wikiexample{SimpleOperations/VariableLengthVector,Variable length vector}
  * \endwiki
  */
-template< typename TValueType >
+template< typename TValue >
 class VariableLengthVector
 {
 public:
 
   /** The element type stored at each location in the Array. */
-  typedef TValueType                                    ValueType;
-  typedef TValueType                                    ComponentType;
+  typedef TValue                                        ValueType;
+  typedef TValue                                        ComponentType;
   typedef typename NumericTraits< ValueType >::RealType RealValueType;
   typedef VariableLengthVector                          Self;
 
@@ -134,14 +134,14 @@ public:
 
   /** Copy constructer.. Override the default non-templated copy constructor
    * that the compiler provides */
-  VariableLengthVector(const VariableLengthVector< TValueType > & v);
+  VariableLengthVector(const VariableLengthVector< TValue > & v);
 
   /** Set the all the elements of the array to the specified value */
-  void Fill(TValueType const & v);
+  void Fill(TValue const & v);
 
   /** Assignment operator  */
   template< typename T >
-  const VariableLengthVector< TValueType > & operator=
+  const VariableLengthVector< TValue > & operator=
     (const VariableLengthVector< T > & v)
   {
     if ( m_Data == static_cast< void * >( const_cast< T * >
@@ -160,22 +160,22 @@ public:
   /** Assignment operators  */
   const Self & operator=(const Self & v);
 
-  const Self & operator=(TValueType const & v);
+  const Self & operator=(TValue const & v);
 
   /** Return the number of elements in the Array  */
   inline unsigned int Size(void) const { return m_NumElements; }
   inline unsigned int GetNumberOfElements(void) const { return m_NumElements; }
 
   /** Return reference to the element at specified index. No range checking. */
-  TValueType       & operator[](unsigned int i) { return this->m_Data[i]; }
+  TValue       & operator[](unsigned int i) { return this->m_Data[i]; }
   /** Return reference to the element at specified index. No range checking. */
-  TValueType const & operator[](unsigned int i) const { return this->m_Data[i]; }
+  TValue const & operator[](unsigned int i) const { return this->m_Data[i]; }
 
   /** Get one element */
-  inline const TValueType & GetElement(unsigned int i) const { return m_Data[i]; }
+  inline const TValue & GetElement(unsigned int i) const { return m_Data[i]; }
 
   /** Set one element */
-  void SetElement(unsigned int i, const TValueType & value) { m_Data[i] = value; }
+  void SetElement(unsigned int i, const TValue & value) { m_Data[i] = value; }
 
   /** Set the size to that given.
    *
@@ -200,7 +200,7 @@ public:
    * the responsibility of freeing the memory for this data.  If
    * "LetArrayManageMemory" is true, then this class will free the
    * memory when this object is destroyed. */
-  void SetData(TValueType *data, bool LetArrayManageMemory = false);
+  void SetData(TValue *data, bool LetArrayManageMemory = false);
 
   /** Similar to the previous method. In the above method, the size must be
    * separately set prior to using user-supplied data. This introduces an
@@ -211,7 +211,7 @@ public:
    * the responsibility of freeing the memory for this data.  If
    * "LetArrayManageMemory" is true, then this class will free the
    * memory when this object is destroyed. */
-  void SetData(TValueType *data, unsigned int sz, bool LetArrayManageMemory = false);
+  void SetData(TValue *data, unsigned int sz, bool LetArrayManageMemory = false);
 
   /** This destructor is not virtual for performance reasons. However, this
    * means that subclasses cannot allocate memory. */
@@ -226,9 +226,9 @@ public:
   void Reserve(ElementIdentifier);
 
   /** Allocate memory of certain size and return it.  */
-  TValueType * AllocateElements(ElementIdentifier size) const;
+  TValue * AllocateElements(ElementIdentifier size) const;
 
-  const TValueType * GetDataPointer() const { return m_Data; }
+  const TValue * GetDataPointer() const { return m_Data; }
 
   /** Element-wise vector addition. The vectors do not have to have
    * the same element type. The input vector elements are cast to the
@@ -316,7 +316,7 @@ public:
   }
 
   /** Add scalar 's' to each element of the vector.*/
-  inline Self operator+(TValueType s) const
+  inline Self operator+(TValue s) const
   {
     Self result(m_NumElements);
 
@@ -328,7 +328,7 @@ public:
   }
 
   /** Subtract scalar 's' from each element of the vector.*/
-  inline Self operator-(TValueType s) const
+  inline Self operator-(TValue s) const
   {
     Self result(m_NumElements);
 
@@ -398,7 +398,7 @@ public:
   }
 
   /** Subtract scalar 's' from each element of the current vector. */
-  inline Self & operator-=(TValueType s)
+  inline Self & operator-=(TValue s)
   {
     for ( ElementIdentifier i = 0; i < m_NumElements; i++ )
       {
@@ -426,7 +426,7 @@ public:
   }
 
   /** Add scalar 's' to each element of the vector. */
-  inline Self & operator+=(TValueType s)
+  inline Self & operator+=(TValue s)
   {
     for ( ElementIdentifier i = 0; i < m_NumElements; i++ )
       {
@@ -481,23 +481,24 @@ private:
 
   bool              m_LetArrayManageMemory; // if true, the array is responsible
                                             // for memory of data
-  TValueType *      m_Data;                 // Array to hold data
+  TValue *          m_Data;                 // Array to hold data
   ElementIdentifier m_NumElements;
 };
 
 /** Premultiply Operator for product of a VariableLengthVector and a scalar.
- *  VariableLengthVector< TValueType >  =  T * VariableLengthVector< TValueType >
+ *  VariableLengthVector< TValue >  =  T * VariableLengthVector< TValue >
  */
-template< typename TValueType, typename T >
+template< typename TValue, typename T >
 inline
-VariableLengthVector< TValueType >
-operator*(const T & scalar, const VariableLengthVector< TValueType > & v)
+VariableLengthVector< TValue >
+operator*(const T & scalar, const VariableLengthVector< TValue > & v)
 {
-  return v * scalar;
+  return v.operator*(scalar);
 }
 
-template< typename TValueType >
-std::ostream & operator<<(std::ostream & os, const VariableLengthVector< TValueType > & arr)
+
+template< typename TValue >
+std::ostream & operator<<(std::ostream & os, const VariableLengthVector< TValue > & arr)
 {
   const unsigned int length = arr.Size();
   const signed int   last   = (unsigned int)length - 1;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkVariableLengthVector.hxx b/Utilities/ITK/Modules/Core/Common/include/itkVariableLengthVector.hxx
index 5013467..fbe93d1 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkVariableLengthVector.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkVariableLengthVector.hxx
@@ -26,26 +26,26 @@
 namespace itk
 {
 /** Default constructor  */
-template< typename TValueType >
-VariableLengthVector< TValueType >
+template< typename TValue >
+VariableLengthVector< TValue >
 ::VariableLengthVector():m_LetArrayManageMemory(true),
-  m_Data(0),
+  m_Data(ITK_NULLPTR),
   m_NumElements(0)
 {}
 
 /** Constructor with size */
-template< typename TValueType >
-VariableLengthVector< TValueType >
+template< typename TValue >
+VariableLengthVector< TValue >
 ::VariableLengthVector(unsigned int length):
   m_LetArrayManageMemory(true),
-  m_Data(0)
+  m_Data(ITK_NULLPTR)
 {
   Reserve(length);
 }
 
 /** Constructor with user specified data */
-template< typename TValueType >
-VariableLengthVector< TValueType >
+template< typename TValue >
+VariableLengthVector< TValue >
 ::VariableLengthVector(ValueType *datain, unsigned int sz, bool LetArrayManageMemory):
   m_LetArrayManageMemory(LetArrayManageMemory),
   m_Data(datain),
@@ -53,8 +53,8 @@ VariableLengthVector< TValueType >
 {}
 
 /** Constructor with user specified data */
-template< typename TValueType >
-VariableLengthVector< TValueType >
+template< typename TValue >
+VariableLengthVector< TValue >
 ::VariableLengthVector(const ValueType *datain, unsigned int sz, bool LetArrayManageMemory):
   m_LetArrayManageMemory(LetArrayManageMemory)
 {
@@ -64,9 +64,9 @@ VariableLengthVector< TValueType >
 
 /** Copy constructer.. Override the default non-templated copy constructor
  * that the compiler provides */
-template< typename TValueType >
-VariableLengthVector< TValueType >
-::VariableLengthVector(const VariableLengthVector< TValueType > & v)
+template< typename TValue >
+VariableLengthVector< TValue >
+::VariableLengthVector(const VariableLengthVector< TValue > & v)
 {
   m_NumElements = v.Size();
   m_Data = this->AllocateElements(m_NumElements);
@@ -78,8 +78,8 @@ VariableLengthVector< TValueType >
 }
 
 /** Destructor */
-template< typename TValueType >
-VariableLengthVector< TValueType >
+template< typename TValue >
+VariableLengthVector< TValue >
 ::~VariableLengthVector()
 {
   // if data exists and we are responsible for its memory, get rid of it..
@@ -90,15 +90,15 @@ VariableLengthVector< TValueType >
 }
 
 /** Reserve memory of certain size for m_Data */
-template< typename TValueType >
-void VariableLengthVector< TValueType >
+template< typename TValue >
+void VariableLengthVector< TValue >
 ::Reserve(ElementIdentifier size)
 {
   if ( m_Data )
     {
     if ( size > m_NumElements )
       {
-      TValueType *temp = this->AllocateElements(size);
+      TValue *temp = this->AllocateElements(size);
       // only copy the portion of the data used in the old buffer
       std::copy(m_Data,
                 m_Data+m_NumElements,
@@ -121,19 +121,19 @@ void VariableLengthVector< TValueType >
 }
 
 /** Allocate memory of certain size and return it */
-template< typename TValueType >
-TValueType *VariableLengthVector< TValueType >
+template< typename TValue >
+TValue *VariableLengthVector< TValue >
 ::AllocateElements(ElementIdentifier size) const
 {
-  TValueType *data;
+  TValue *data;
 
   try
     {
-    data = new TValueType[size];
+    data = new TValue[size];
     }
   catch ( ... )
     {
-    data = 0;
+    data = ITK_NULLPTR;
     }
   if ( !data )
     {
@@ -149,10 +149,10 @@ TValueType *VariableLengthVector< TValueType >
  * "LetArrayManageMemory" is true, then this class will free the
  * memory when this object is destroyed. Note that you need to explicitly
  * set the number of elements. */
-template< typename TValueType >
+template< typename TValue >
 void
-VariableLengthVector< TValueType >
-::SetData(TValueType *datain, bool LetArrayManageMemory)
+VariableLengthVector< TValue >
+::SetData(TValue *datain, bool LetArrayManageMemory)
 {
   // Free any existing data if we manage its memory
   if ( m_LetArrayManageMemory )
@@ -173,10 +173,10 @@ VariableLengthVector< TValueType >
  * the responsibility of freeing the memory for this data.  If
  * "LetArrayManageMemory" is true, then this class will free the
  * memory when this object is destroyed. */
-template< typename TValueType >
+template< typename TValue >
 void
-VariableLengthVector< TValueType >
-::SetData(TValueType *datain, unsigned int sz, bool LetArrayManageMemory)
+VariableLengthVector< TValue >
+::SetData(TValue *datain, unsigned int sz, bool LetArrayManageMemory)
 {
   // Free any existing data if we manage its memory
   if ( m_LetArrayManageMemory )
@@ -190,14 +190,14 @@ VariableLengthVector< TValueType >
 }
 
 
-template< typename TValueType >
-void VariableLengthVector< TValueType >
+template< typename TValue >
+void VariableLengthVector< TValue >
 ::DestroyExistingData()
 {
     // Free any existing data if we manage its memory.
   if ( !m_LetArrayManageMemory )
     {
-    m_Data = 0;
+    m_Data = ITK_NULLPTR;
     m_NumElements = 0;
     return;
     }
@@ -207,14 +207,14 @@ void VariableLengthVector< TValueType >
     if ( m_NumElements > 0 )
       {
       delete[] m_Data;
-      m_Data = 0;
+      m_Data = ITK_NULLPTR;
       m_NumElements = 0;
       }
     }
 }
 
-template< typename TValueType >
-void VariableLengthVector< TValueType >
+template< typename TValue >
+void VariableLengthVector< TValue >
 ::SetSize(unsigned int sz, bool destroyExistingData)
 {
   if ( destroyExistingData )
@@ -230,7 +230,7 @@ void VariableLengthVector< TValueType >
     return;
     }
 
-  TValueType *temp = this->AllocateElements(sz);
+  TValue *temp = this->AllocateElements(sz);
 
   if ( sz > m_NumElements )
     {
@@ -258,9 +258,9 @@ void VariableLengthVector< TValueType >
 }
 
 /** Set the all the elements of the array to the specified value */
-template< typename TValueType >
-void VariableLengthVector< TValueType >
-::Fill(TValueType const & v)
+template< typename TValue >
+void VariableLengthVector< TValue >
+::Fill(TValue const & v)
 {
   for ( ElementIdentifier i = 0; i < m_NumElements; i++ )
     {
@@ -269,9 +269,9 @@ void VariableLengthVector< TValueType >
 }
 
 /** Assignment operator */
-template< typename TValueType >
-const VariableLengthVector< TValueType > &
-VariableLengthVector< TValueType >
+template< typename TValue >
+const VariableLengthVector< TValue > &
+VariableLengthVector< TValue >
 ::operator=(const Self & v)
 {
   if ( this != &v )
@@ -286,18 +286,18 @@ VariableLengthVector< TValueType >
 }
 
 /** Assignment operator */
-template< typename TValueType >
-const VariableLengthVector< TValueType > &
-VariableLengthVector< TValueType >
-::operator=(TValueType const & v)
+template< typename TValue >
+const VariableLengthVector< TValue > &
+VariableLengthVector< TValue >
+::operator=(TValue const & v)
 {
   this->Fill(v);
   return *this;
 }
 
-template< typename TValueType >
-VariableLengthVector< TValueType > &
-VariableLengthVector< TValueType >
+template< typename TValue >
+VariableLengthVector< TValue > &
+VariableLengthVector< TValue >
 ::operator-()
 {
   for ( ElementIdentifier i = 0; i < m_NumElements; i++ )
@@ -307,9 +307,9 @@ VariableLengthVector< TValueType >
   return *this;
 }
 
-template< typename TValueType >
+template< typename TValue >
 bool
-VariableLengthVector< TValueType >
+VariableLengthVector< TValue >
 ::operator==(const Self & v) const
 {
   if ( m_NumElements != v.Size() )
@@ -326,9 +326,9 @@ VariableLengthVector< TValueType >
   return true;
 }
 
-template< typename TValueType >
+template< typename TValue >
 bool
-VariableLengthVector< TValueType >
+VariableLengthVector< TValue >
 ::operator!=(const Self & v) const
 {
   if ( m_NumElements != v.Size() )
@@ -348,20 +348,20 @@ VariableLengthVector< TValueType >
 /**
  * Returns vector's Euclidean Norm
  */
-template< typename TValueType >
-typename VariableLengthVector< TValueType >::RealValueType
-VariableLengthVector< TValueType >
+template< typename TValue >
+typename VariableLengthVector< TValue >::RealValueType
+VariableLengthVector< TValue >
 ::GetNorm(void) const
 {
-  return (RealValueType)( vcl_sqrt( double( this->GetSquaredNorm() ) ) );
+  return (RealValueType)( std::sqrt( double( this->GetSquaredNorm() ) ) );
 }
 
 /**
  * Returns vector's Squared Euclidean Norm
  */
-template< typename TValueType >
-typename VariableLengthVector< TValueType >::RealValueType
-VariableLengthVector< TValueType >
+template< typename TValue >
+typename VariableLengthVector< TValue >::RealValueType
+VariableLengthVector< TValue >
 ::GetSquaredNorm(void) const
 {
   RealValueType sum = 0.0;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkVector.h b/Utilities/ITK/Modules/Core/Common/include/itkVector.h
index 334bc78..0af2f4c 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkVector.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkVector.h
@@ -252,7 +252,7 @@ inline
 Vector< T, NVectorDimension >
 operator*(const T & scalar, const Vector< T, NVectorDimension > & v)
 {
-  return v * scalar;
+  return v.operator*( scalar);
 }
 
 /** Print content to an ostream */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkVector.hxx b/Utilities/ITK/Modules/Core/Common/include/itkVector.hxx
index 332aa44..7c953f7 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkVector.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkVector.hxx
@@ -129,7 +129,7 @@ typename Vector< T, TVectorDimension >::RealValueType
 Vector< T, TVectorDimension >
 ::GetNorm(void) const
 {
-  return RealValueType( vcl_sqrt( double( this->GetSquaredNorm() ) ) );
+  return RealValueType( std::sqrt( double( this->GetSquaredNorm() ) ) );
 }
 
 template< typename T, unsigned int TVectorDimension >
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkVectorContainer.h b/Utilities/ITK/Modules/Core/Common/include/itkVectorContainer.h
index f7c6f05..bc029c6 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkVectorContainer.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkVectorContainer.h
@@ -200,7 +200,7 @@ private:
   class ConstIterator
   {
 public:
-    ConstIterator() {}
+    ConstIterator():m_Pos(0) {}
     ConstIterator(size_type d, const VectorConstIterator & i):m_Pos(d), m_Iter(i) {}
     ConstIterator(const Iterator & r) { m_Pos = r.m_Pos; m_Iter = r.m_Iter; }
     ConstIterator & operator*()    { return *this; }
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkVectorImage.h b/Utilities/ITK/Modules/Core/Common/include/itkVectorImage.h
index 16efe49..fada3d6 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkVectorImage.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkVectorImage.h
@@ -198,7 +198,7 @@ public:
 
   /** Allocate the image memory. The size of the image must
    * already be set, e.g. by calling SetRegions(). */
-  void Allocate();
+  virtual void Allocate(bool UseDefaultConstructor = false) ITK_OVERRIDE;
 
   /** Restore the data object to its initial state. This means releasing
    * memory. */
@@ -276,11 +276,11 @@ public:
    * the image iterator class. */
   InternalPixelType * GetBufferPointer()
   {
-    return m_Buffer ? m_Buffer->GetBufferPointer() : 0;
+    return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR;
   }
   const InternalPixelType * GetBufferPointer() const
   {
-    return m_Buffer ? m_Buffer->GetBufferPointer() : 0;
+    return m_Buffer ? m_Buffer->GetBufferPointer() : ITK_NULLPTR;
   }
 
   /** Return a pointer to the container. */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkVectorImage.hxx b/Utilities/ITK/Modules/Core/Common/include/itkVectorImage.hxx
index 910cb11..e59629f 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkVectorImage.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkVectorImage.hxx
@@ -47,7 +47,7 @@ VectorImage< TPixel, VImageDimension >
 template< typename TPixel, unsigned int VImageDimension >
 void
 VectorImage< TPixel, VImageDimension >
-::Allocate()
+::Allocate(const bool UseDefaultConstructor)
 {
   if ( m_VectorLength == 0 )
     {
@@ -58,7 +58,7 @@ VectorImage< TPixel, VImageDimension >
   this->ComputeOffsetTable();
   num = this->GetOffsetTable()[VImageDimension];
 
-  m_Buffer->Reserve(num * m_VectorLength);
+  m_Buffer->Reserve(num * m_VectorLength,UseDefaultConstructor);
 }
 
 template< typename TPixel, unsigned int VImageDimension >
@@ -117,38 +117,27 @@ void
 VectorImage< TPixel, VImageDimension >
 ::Graft(const DataObject *data)
 {
+  if(data == ITK_NULLPTR)
+    {
+    return;
+    }
   // call the superclass' implementation
   Superclass::Graft(data);
 
-  if ( data )
-    {
-    // Attempt to cast data to an Image
-    const Self *imgData;
+  // Attempt to cast data to an Image
+  const Self *imgData = dynamic_cast< const Self * >( data );
 
-    try
-      {
-      imgData = dynamic_cast< const Self * >( data );
-      }
-    catch ( ... )
-      {
-      return;
-      }
-
-    // Copy from VectorImage< TPixel, dim >
-    if ( imgData )
-      {
-      // Now copy anything remaining that is needed
-      this->SetPixelContainer( const_cast< PixelContainer * >
-                               ( imgData->GetPixelContainer() ) );
-      }
-    else
-      {
-      // pointer could not be cast back down
-      itkExceptionMacro( << "itk::VectorImage::Graft() cannot cast "
-                         << typeid( data ).name() << " to "
-                         << typeid( const Self * ).name() );
-      }
+  if( imgData == ITK_NULLPTR )
+    {
+    // pointer could not be cast back down
+    itkExceptionMacro( << "itk::VectorImage::Graft() cannot cast "
+                       << typeid( data ).name() << " to "
+                       << typeid( const Self * ).name() );
     }
+  // Copy from VectorImage< TPixel, dim >
+  // Now copy anything remaining that is needed
+  this->SetPixelContainer( const_cast< PixelContainer * >
+                           ( imgData->GetPixelContainer() ) );
 }
 
 //----------------------------------------------------------------------------
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h b/Utilities/ITK/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h
index 81e6f09..42eb9d2 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkVectorImageNeighborhoodAccessorFunctor.h
@@ -54,9 +54,9 @@ public:
   *ImageBoundaryConditionConstPointerType;
 
   VectorImageNeighborhoodAccessorFunctor(VectorLengthType length):
-    m_VectorLength(length), m_OffsetMultiplier(length - 1), m_Begin(NULL) {}
+    m_VectorLength(length), m_OffsetMultiplier(length - 1), m_Begin(ITK_NULLPTR) {}
   VectorImageNeighborhoodAccessorFunctor():
-    m_VectorLength(0), m_OffsetMultiplier(0), m_Begin(NULL) {}
+    m_VectorLength(0), m_OffsetMultiplier(0), m_Begin(ITK_NULLPTR) {}
 
   /** Set the pointer index to the start of the buffer.
    * This must be set by the iterators to the starting location of the buffer.
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkVersor.h b/Utilities/ITK/Modules/Core/Common/include/itkVersor.h
index 3deab34..7f2b4d8 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkVersor.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkVersor.h
@@ -203,7 +203,7 @@ public:
 
   /** Set the versor using the right part.
    * the magnitude of the vector given is assumed to
-   * be equal to vcl_sin(angle/2).
+   * be equal to std::sin(angle/2).
    * This method will compute internally the scalar
    * part that preserve the Versor as a unit quaternion. */
   void Set(const VectorType & axis);
@@ -271,7 +271,7 @@ private:
     }
   static inline ValueType Epsilon()
     {
-      return Epsilon((ValueType *)0);
+      return Epsilon((ValueType *)ITK_NULLPTR);
     }
 
   /** Component parallel to x axis.  */
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkVersor.hxx b/Utilities/ITK/Modules/Core/Common/include/itkVersor.hxx
index e388e60..66d138c 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkVersor.hxx
+++ b/Utilities/ITK/Modules/Core/Common/include/itkVersor.hxx
@@ -174,7 +174,7 @@ Versor< T >
 
   const double epsilon = 1e-300;
 
-  if ( vcl_fabs(1.0f - square) < epsilon )
+  if ( std::fabs(1.0f - square) < epsilon )
     {
     return true;
     }
@@ -222,7 +222,7 @@ Versor< T >
 {
   const ValueType tensor =
     static_cast< ValueType >(
-      vcl_sqrt(m_X * m_X + m_Y * m_Y + m_Z * m_Z + m_W * m_W) );
+      std::sqrt(m_X * m_X + m_Y * m_Y + m_Z * m_Z + m_W * m_W) );
 
   return tensor;
 }
@@ -235,7 +235,7 @@ Versor< T >
 {
   const ValueType tensor = this->GetTensor();
 
-  if ( vcl_fabs(tensor) < 1e-20 )
+  if ( std::fabs(tensor) < 1e-20 )
     {
     ExceptionObject except;
     except.SetDescription("Attempt to normalize a \
@@ -261,7 +261,7 @@ Versor< T >
   const RealType ay = static_cast< RealType >( m_Y );
   const RealType az = static_cast< RealType >( m_Z );
 
-  const RealType vectorNorm = vcl_sqrt(ax * ax  +  ay * ay  +  az * az);
+  const RealType vectorNorm = std::sqrt(ax * ax  +  ay * ay  +  az * az);
 
   if ( vectorNorm == NumericTraits< RealType >::Zero )
     {
@@ -313,9 +313,9 @@ Versor< T >
   const RealType ay = static_cast< RealType >( m_Y );
   const RealType az = static_cast< RealType >( m_Z );
 
-  const RealType vectorNorm = vcl_sqrt(ax * ax  +  ay * ay  +  az * az);
+  const RealType vectorNorm = std::sqrt(ax * ax  +  ay * ay  +  az * az);
 
-  const ValueType angle = 2.0 * vcl_atan2( vectorNorm, static_cast< RealType >( m_W ) );
+  const ValueType angle = 2.0 * std::atan2( vectorNorm, static_cast< RealType >( m_W ) );
 
   return angle;
 }
@@ -326,8 +326,8 @@ Versor< T >
 Versor< T >
 ::SquareRoot(void) const
 {
-  const ValueType newScalar = vcl_sqrt( static_cast< double >( 1.0 + m_W ) );
-  const double    sqrtOfTwo    = vcl_sqrt(2.0f);
+  const ValueType newScalar = std::sqrt( static_cast< double >( 1.0 + m_W ) );
+  const double    sqrtOfTwo    = std::sqrt(2.0f);
 
   const double factor = 1.0f / ( newScalar * sqrtOfTwo );
 
@@ -363,8 +363,8 @@ Versor< T >
 {
   const RealType vectorNorm = axis.GetNorm();
 
-  const RealType cosangle2 = vcl_cos(angle / 2.0);
-  const RealType sinangle2 = vcl_sin(angle / 2.0);
+  const RealType cosangle2 = std::cos(angle / 2.0);
+  const RealType sinangle2 = std::sin(angle / 2.0);
 
   const RealType factor = sinangle2 / vectorNorm;
 
@@ -385,30 +385,30 @@ Versor< T >
   //Keep the epsilon value large enough so that the alternate routes of
   //computing the quaternion are used to within floating point precision of the
   //math to be used.  Using 1e-30 results in degenerate matries for rotations
-  //near vnl_math::pi due to imprecision of the math.  0.5/vcl_sqrt(trace) is
+  //near vnl_math::pi due to imprecision of the math.  0.5/std::sqrt(trace) is
   //not accurate to 1e-30, so the resulting matrices would have very large
   //errors.  By decreasing this epsilon value to a higher tolerance, the
   //alternate stable methods for conversion are used.
   //
-  //The use of vcl_numeric_limits< T >::epsilon() was not consistent with
+  //The use of std::numeric_limits< T >::epsilon() was not consistent with
   //the rest of the ITK toolkit with respect to epsilon values for
   //determining rotational orthogonality, and it occasionally
   //prevented the conversion between different rigid transform types.
 
-  const T epsilon = Self::Epsilon(); // vnl_sqrt( vcl_numeric_limits< T >::epsilon() );
+  const T epsilon = Self::Epsilon(); // vnl_sqrt( std::numeric_limits< T >::epsilon() );
   // Use a slightly less epsilon for detecting difference
-  const T epsilonDiff = Self::Epsilon(); //vcl_numeric_limits< T >::epsilon() * 10.0;
+  const T epsilonDiff = Self::Epsilon(); //std::numeric_limits< T >::epsilon() * 10.0;
 
   const vnl_matrix< T > m( mat.GetVnlMatrix() );
 
   //check for orthonormality and that it isn't a reflection
   const vnl_matrix_fixed< T, 3, 3 > & I = m*m.transpose();
-  if( vcl_abs( I[0][1] ) > epsilon || vcl_abs( I[0][2] ) > epsilon ||
-    vcl_abs( I[1][0] ) > epsilon || vcl_abs( I[1][2] ) > epsilon ||
-    vcl_abs( I[2][0] ) > epsilon || vcl_abs( I[2][1] ) > epsilon ||
-    vcl_abs( I[0][0] - itk::NumericTraits<T>::One ) > epsilonDiff ||
-    vcl_abs( I[1][1] - itk::NumericTraits<T>::One ) > epsilonDiff ||
-    vcl_abs( I[2][2] - itk::NumericTraits<T>::One ) > epsilonDiff ||
+  if( std::abs( I[0][1] ) > epsilon || std::abs( I[0][2] ) > epsilon ||
+    std::abs( I[1][0] ) > epsilon || std::abs( I[1][2] ) > epsilon ||
+    std::abs( I[2][0] ) > epsilon || std::abs( I[2][1] ) > epsilon ||
+    std::abs( I[0][0] - itk::NumericTraits<T>::One ) > epsilonDiff ||
+    std::abs( I[1][1] - itk::NumericTraits<T>::One ) > epsilonDiff ||
+    std::abs( I[2][2] - itk::NumericTraits<T>::One ) > epsilonDiff ||
     vnl_det( I ) < 0 )
     {
     itkGenericExceptionMacro(<< "The following matrix does not represent rotation to within an epsion of "
@@ -423,7 +423,7 @@ Versor< T >
 
   if ( trace > epsilon )
     {
-    const double s = 0.5 / vcl_sqrt(trace);
+    const double s = 0.5 / std::sqrt(trace);
     m_W = 0.25 / s;
     m_X = ( m(2, 1) - m(1, 2) ) * s;
     m_Y = ( m(0, 2) - m(2, 0) ) * s;
@@ -433,7 +433,7 @@ Versor< T >
     {
     if ( m(0, 0) > m(1, 1) && m(0, 0) > m(2, 2) )
       {
-      const double s = 2.0 * vcl_sqrt( 1.0 + m(0, 0) - m(1, 1) - m(2, 2) );
+      const double s = 2.0 * std::sqrt( 1.0 + m(0, 0) - m(1, 1) - m(2, 2) );
       m_X = 0.25 * s;
       m_Y = ( m(0, 1) + m(1, 0) ) / s;
       m_Z = ( m(0, 2) + m(2, 0) ) / s;
@@ -443,7 +443,7 @@ Versor< T >
       {
       if ( m(1, 1) > m(2, 2) )
         {
-        const double s = 2.0 * vcl_sqrt( 1.0 + m(1, 1) - m(0, 0) - m(2, 2) );
+        const double s = 2.0 * std::sqrt( 1.0 + m(1, 1) - m(0, 0) - m(2, 2) );
         m_X = ( m(0, 1) + m(1, 0) ) / s;
         m_Y = 0.25 * s;
         m_Z = ( m(1, 2) + m(2, 1) ) / s;
@@ -451,7 +451,7 @@ Versor< T >
         }
       else
         {
-        const double s = 2.0 * vcl_sqrt( 1.0 + m(2, 2) - m(0, 0) - m(1, 1) );
+        const double s = 2.0 * std::sqrt( 1.0 + m(2, 2) - m(0, 0) - m(1, 1) );
         m_X = ( m(0, 2) + m(2, 0) ) / s;
         m_Y = ( m(1, 2) + m(2, 1) ) / s;
         m_Z = 0.25 * s;
@@ -468,7 +468,6 @@ void
 Versor< T >
 ::Set(const VectorType & axis)
 {
-  typedef typename VectorType::RealValueType VectorRealValueType;
   const ValueType sinangle2 =  axis.GetNorm();
   if ( sinangle2 > NumericTraits< ValueType >::One )
     {
@@ -479,7 +478,7 @@ Versor< T >
     throw exception;
     }
 
-  const ValueType cosangle2 =  vcl_sqrt(NumericTraits< double >::One - sinangle2 * sinangle2);
+  const ValueType cosangle2 =  std::sqrt(NumericTraits< double >::One - sinangle2 * sinangle2);
 
   m_X = axis[0];
   m_Y = axis[1];
@@ -541,8 +540,8 @@ void
 Versor< T >
 ::SetRotationAroundX(ValueType angle)
 {
-  const ValueType sinangle2 = vcl_sin(angle / 2.0);
-  const ValueType cosangle2 = vcl_cos(angle / 2.0);
+  const ValueType sinangle2 = std::sin(angle / 2.0);
+  const ValueType cosangle2 = std::cos(angle / 2.0);
 
   m_X = sinangle2;
   m_Y = NumericTraits< T >::Zero;
@@ -556,8 +555,8 @@ void
 Versor< T >
 ::SetRotationAroundY(ValueType angle)
 {
-  const ValueType sinangle2 = vcl_sin(angle / 2.0);
-  const ValueType cosangle2 = vcl_cos(angle / 2.0);
+  const ValueType sinangle2 = std::sin(angle / 2.0);
+  const ValueType cosangle2 = std::cos(angle / 2.0);
 
   m_X = NumericTraits< T >::Zero;
   m_Y = sinangle2;
@@ -571,8 +570,8 @@ void
 Versor< T >
 ::SetRotationAroundZ(ValueType angle)
 {
-  const ValueType sinangle2 = vcl_sin(angle / 2.0);
-  const ValueType cosangle2 = vcl_cos(angle / 2.0);
+  const ValueType sinangle2 = std::sin(angle / 2.0);
+  const ValueType cosangle2 = std::cos(angle / 2.0);
 
   m_X = NumericTraits< T >::Zero;
   m_Y = NumericTraits< T >::Zero;
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkWeakPointer.h b/Utilities/ITK/Modules/Core/Common/include/itkWeakPointer.h
index 33fa7bd..2a4e481 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkWeakPointer.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkWeakPointer.h
@@ -49,7 +49,7 @@ public:
 
   /** Constructor.  */
   WeakPointer ()
-  { m_Pointer = 0; }
+  { m_Pointer = ITK_NULLPTR; }
 
   /** Copy constructor.  */
   WeakPointer (const WeakPointer< ObjectType > & p):m_Pointer(p.m_Pointer) {}
@@ -59,7 +59,7 @@ public:
 
   /** Destructor.  */
   ~WeakPointer ()
-  { m_Pointer = 0; }
+  { m_Pointer = ITK_NULLPTR; }
 
   /** Overload operator ->.  */
   ObjectType * operator->() const
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkWin32Header.h b/Utilities/ITK/Modules/Core/Common/include/itkWin32Header.h
index f4f209f..eca7f85 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkWin32Header.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkWin32Header.h
@@ -68,6 +68,9 @@
 
 // 'identifier' : identifier was truncated to 'number' characters in the debug information
 #pragma warning ( disable : 4786 )
+
+// nonstandard extension used : 'extern' before template explicit instantiation
+#pragma warning ( disable : 4231 )
 #endif // _MSC_VER
 
 #endif
diff --git a/Utilities/ITK/Modules/Core/Common/include/itkXMLFileOutputWindow.h b/Utilities/ITK/Modules/Core/Common/include/itkXMLFileOutputWindow.h
index 5096a11..1c7e02b 100644
--- a/Utilities/ITK/Modules/Core/Common/include/itkXMLFileOutputWindow.h
+++ b/Utilities/ITK/Modules/Core/Common/include/itkXMLFileOutputWindow.h
@@ -62,19 +62,19 @@ public:
   itkTypeMacro(XMLFileOutputWindow, FileOutputWindow);
 
   /** Send a string to the XML file. */
-  virtual void DisplayText(const char *);
+  virtual void DisplayText(const char *) ITK_OVERRIDE;
 
   /** Send an error string to the XML file. */
-  virtual void DisplayErrorText(const char *);
+  virtual void DisplayErrorText(const char *) ITK_OVERRIDE;
 
   /** Send a warning string to the XML file. */
-  virtual void DisplayWarningText(const char *);
+  virtual void DisplayWarningText(const char *) ITK_OVERRIDE;
 
   /** Send a generic output string to the XML file. */
-  virtual void DisplayGenericOutputText(const char *);
+  virtual void DisplayGenericOutputText(const char *) ITK_OVERRIDE;
 
   /** Send a debug string to the XML file. */
-  virtual void DisplayDebugText(const char *);
+  virtual void DisplayDebugText(const char *) ITK_OVERRIDE;
 
   /**  Put the text into the log file without processing it. */
   virtual void DisplayTag(const char *);
@@ -82,7 +82,7 @@ public:
 protected:
   XMLFileOutputWindow();
   virtual ~XMLFileOutputWindow();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   void Initialize();
 
diff --git a/Utilities/ITK/Modules/Core/Common/src/CMakeLists.txt b/Utilities/ITK/Modules/Core/Common/src/CMakeLists.txt
index 78fe780..e2630b3 100644
--- a/Utilities/ITK/Modules/Core/Common/src/CMakeLists.txt
+++ b/Utilities/ITK/Modules/Core/Common/src/CMakeLists.txt
@@ -25,6 +25,7 @@ itkRealTimeInterval.cxx
 itkOctreeNode.cxx
 itkNumericTraitsFixedArrayPixel.cxx
 itkMultiThreader.cxx
+itkMetaDataObject.cxx
 itkMetaDataDictionary.cxx
 itkDataObject.cxx
 itkThreadLogger.cxx
@@ -78,10 +79,11 @@ itkStoppingCriterionBase.cxx
 itkCompensatedSummation.cxx
 itkArrayOutputSpecialization.cxx
 itkNumberToString.cxx
+itkSmartPointerForwardReferenceProcessObject.cxx
 )
 
 if(WIN32)
-   set(ITKCommon_SRCS ${ITKCommon_SRCS};itkWin32OutputWindow.cxx;itkSmartPointerForwardReferenceProcessObject.cxx)
+   set(ITKCommon_SRCS ${ITKCommon_SRCS};itkWin32OutputWindow.cxx)
 endif()
 
 # Prevent optimization from affecting the floating point calculation.
@@ -104,6 +106,11 @@ elseif( MSVC )
   set_source_files_properties( itkCompensatedSummation.cxx PROPERTIES COMPILE_FLAGS -fp:precise )
 endif()
 
+if( CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.0" )
+  # this file contains explicitly instantiated template classes which are not correcly exported with the hidden visibility flag
+  set_source_files_properties( itkSmartPointerForwardReferenceProcessObject.cxx PROPERTIES COMPILE_FLAGS -fvisibility=default )
+endif()
+
 
 ### generating libraries
 add_library( ITKCommon ${ITK_LIBRARY_BUILD_TYPE} ${ITKCommon_SRCS})
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkConditionVariablePThreads.cxx b/Utilities/ITK/Modules/Core/Common/src/itkConditionVariablePThreads.cxx
index 1a7a078..de0bd7e 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkConditionVariablePThreads.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkConditionVariablePThreads.cxx
@@ -21,7 +21,7 @@ namespace itk
 {
 ConditionVariable::ConditionVariable()
 {
-  pthread_cond_init(&m_ConditionVariable.m_ConditionVariable, NULL);
+  pthread_cond_init(&m_ConditionVariable.m_ConditionVariable, ITK_NULLPTR);
 }
 
 ConditionVariable::~ConditionVariable()
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkDataObject.cxx b/Utilities/ITK/Modules/Core/Common/src/itkDataObject.cxx
index 33a27d4..95f2f87 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkDataObject.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkDataObject.cxx
@@ -26,24 +26,6 @@
  *
  *=========================================================================*/
 #include "itkProcessObject.h"
-/** The inclusion of itkSmartPointerForwardReference.hxx is needed here
- * because this is one of the very few cases where
- * itkSmartPointerForwardReference.h does not include
- * itkSmartPointerForwardReference.hxx
- *
- * Ensure that the implicitly instantiated methods and operators are
- * exported for the linker.
- */
-#if __GNUC__ >= 4
-#pragma GCC visibility push(default)
-#endif
-#include "itkSmartPointerForwardReference.hxx"
-#if __GNUC__ >= 4
-#pragma GCC visibility pop
-#endif
-
-// Manual instantiation is necessary to prevent link errors
-template class ITKCommon_EXPORT itk::SmartPointerForwardReference< itk::ProcessObject >;
 
 namespace itk
 {
@@ -52,17 +34,17 @@ bool DataObject:: m_GlobalReleaseDataFlag = false;
 
 DataObjectError
 ::DataObjectError():
-  ExceptionObject(), m_DataObject(0)
+  ExceptionObject(), m_DataObject(ITK_NULLPTR)
 {}
 
 DataObjectError
 ::DataObjectError(const char *file, unsigned int lineNumber):
-  ExceptionObject(file, lineNumber), m_DataObject(0)
+  ExceptionObject(file, lineNumber), m_DataObject(ITK_NULLPTR)
 {}
 
 DataObjectError
 ::DataObjectError(const std::string & file, unsigned int lineNumber):
-  ExceptionObject(file, lineNumber), m_DataObject(0)
+  ExceptionObject(file, lineNumber), m_DataObject(ITK_NULLPTR)
 {}
 
 DataObjectError
@@ -151,7 +133,7 @@ InvalidRequestedRegionError
 //----------------------------------------------------------------------------
 DataObject::DataObject():m_UpdateMTime()
 {
-  m_Source = 0;
+  m_Source = ITK_NULLPTR;
   m_SourceOutputName = "";
   m_ReleaseDataFlag = false;
 
@@ -226,7 +208,7 @@ DataObject
   // disconnect ourselves from the current process object
   if ( m_Source )
     {
-    m_Source->SetOutput(m_SourceOutputName, NULL);
+    m_Source->SetOutput(m_SourceOutputName, ITK_NULLPTR);
     }
 
   // set our release data flag to off by default (purposely done after
@@ -249,7 +231,7 @@ DataObject
     itkDebugMacro("disconnecting source  " << arg
                                            << ", source output name " << name);
 
-    m_Source = 0;
+    m_Source = ITK_NULLPTR;
     m_SourceOutputName = "";
     this->Modified();
     return true;
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkExceptionObject.cxx b/Utilities/ITK/Modules/Core/Common/src/itkExceptionObject.cxx
index f8d28aa..89e45a7 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkExceptionObject.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkExceptionObject.cxx
@@ -94,14 +94,14 @@ public:
 
   /** Increase the reference count (mark as used by another object).
     * Delegates the counting to its LightObject superclass  */
-  virtual void Register() const
+  virtual void Register() const ITK_OVERRIDE
   {
     this->LightObject::Register();
   }
 
   /** Decrease the reference count (release by another object).
     * Delegates the counting to its LightObject superclass  */
-  virtual void UnRegister() const
+  virtual void UnRegister() const ITK_OVERRIDE
   {
     this->LightObject::UnRegister();
   }
@@ -135,8 +135,8 @@ ExceptionObject::ExceptionObject(
   unsigned int lineNumber,
   const char *desc,
   const char *loc):
-  m_ExceptionData( ReferenceCountedExceptionData::ConstNew(file == 0 ? "":file, lineNumber, desc == 0 ? "":desc, loc ==
-                                                               0 ? "":loc) )
+  m_ExceptionData( ReferenceCountedExceptionData::ConstNew(file == ITK_NULLPTR ? "":file, lineNumber, desc == ITK_NULLPTR ? "":desc, loc ==
+                                                               ITK_NULLPTR ? "":loc) )
 {}
 
 ExceptionObject::ExceptionObject(
@@ -213,7 +213,7 @@ ExceptionObject::operator==(const ExceptionObject & orig)
     }
   else
     {
-    return ( thisData != 0 ) && ( origData != 0 )
+    return ( thisData != ITK_NULLPTR ) && ( origData != ITK_NULLPTR )
            && thisData->m_Location == origData->m_Location
            && thisData->m_Description == origData->m_Description
            && thisData->m_File == origData->m_File
@@ -343,4 +343,30 @@ ExceptionObject
   // Print trailer
   os << indent << std::endl;
 }
+
+MemoryAllocationError::~MemoryAllocationError()
+  throw( )
+{
+}
+
+RangeError::~RangeError()
+  throw( )
+{
+}
+
+InvalidArgumentError::~InvalidArgumentError()
+  throw( )
+{
+}
+
+IncompatibleOperandsError::~IncompatibleOperandsError()
+  throw( )
+{
+}
+
+ProcessAborted::~ProcessAborted() throw( )
+{
+}
+
+
 } // end namespace itk
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkFileOutputWindow.cxx b/Utilities/ITK/Modules/Core/Common/src/itkFileOutputWindow.cxx
index b71c6c8..9576d84 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkFileOutputWindow.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkFileOutputWindow.cxx
@@ -27,7 +27,7 @@ FileOutputWindow
 {
   m_Flush = false;
   m_Append = false;
-  m_Stream = 0;
+  m_Stream = ITK_NULLPTR;
   m_FileName = "";
 }
 
@@ -35,7 +35,7 @@ FileOutputWindow
 ::~FileOutputWindow()
 {
   delete m_Stream;
-  m_Stream = 0;
+  m_Stream = ITK_NULLPTR;
 }
 
 void
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkFloatingPointExceptions.cxx b/Utilities/ITK/Modules/Core/Common/src/itkFloatingPointExceptions.cxx
index 17cfc99..426c715 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkFloatingPointExceptions.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkFloatingPointExceptions.cxx
@@ -498,7 +498,7 @@ FloatingPointExceptions
   act.sa_sigaction = fhdl;
   sigemptyset(&act.sa_mask);
   act.sa_flags = SA_SIGINFO;
-  sigaction(SIGFPE,&act,0);
+  sigaction(SIGFPE,&act,ITK_NULLPTR);
   FloatingPointExceptions::m_Enabled = true;
 }
 void
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkLightObject.cxx b/Utilities/ITK/Modules/Core/Common/src/itkLightObject.cxx
index aa64a74..0204753 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkLightObject.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkLightObject.cxx
@@ -58,7 +58,7 @@ LightObject::New()
   Pointer      smartPtr;
   LightObject *rawPtr = ::itk::ObjectFactory< LightObject >::Create();
 
-  if ( rawPtr == NULL )
+  if ( rawPtr == ITK_NULLPTR )
     {
     rawPtr = new LightObject;
     }
@@ -286,7 +286,7 @@ LightObject
 #ifdef GCC_USEDEMANGLE
   char const *mangledName = typeid( *this ).name();
   int         status;
-  char *      unmangled = abi::__cxa_demangle(mangledName, 0, 0, &status);
+  char *      unmangled = abi::__cxa_demangle(mangledName, ITK_NULLPTR, ITK_NULLPTR, &status);
 
   os << indent << "RTTI typeinfo:   ";
 
@@ -325,12 +325,6 @@ LightObject
 ::PrintTrailer( std::ostream & itkNotUsed(os), Indent itkNotUsed(indent) ) const
 {}
 
-/**
- * This operator allows all subclasses of LightObject to be printed via <<.
- * It in turn invokes the Print method, which in turn will invoke the
- * PrintSelf method that all objects should define, if they have anything
- * interesting to print out.
- */
 std::ostream &
 operator<<(std::ostream & os, const LightObject & o)
 {
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkLoggerManager.cxx b/Utilities/ITK/Modules/Core/Common/src/itkLoggerManager.cxx
index 3892d67..a848c74 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkLoggerManager.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkLoggerManager.cxx
@@ -61,7 +61,7 @@ LoggerManager::GetLogger(const NameType & name)
 
   if ( loggerItr == this->m_LoggerSet.end() )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
   return loggerItr->second.GetPointer();
 }
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx b/Utilities/ITK/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx
index d679221..e1f647a 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx
@@ -16,15 +16,23 @@
  *
  *=========================================================================*/
 #include "itkMersenneTwisterRandomVariateGenerator.h"
+#include "itkSimpleFastMutexLock.h"
+#include "itkMutexLockHolder.h"
+
 
 namespace itk
 {
 namespace Statistics
 {
-MersenneTwisterRandomVariateGenerator::Pointer MersenneTwisterRandomVariateGenerator:: m_Instance = 0;
+
+// Static/Global variables
+MersenneTwisterRandomVariateGenerator::Pointer  MersenneTwisterRandomVariateGenerator::m_StaticInstance = ITK_NULLPTR;
+SimpleFastMutexLock MersenneTwisterRandomVariateGenerator::m_StaticInstanceLock;
+MersenneTwisterRandomVariateGenerator::IntegerType MersenneTwisterRandomVariateGenerator::m_StaticDiffer = 0;
 
 MersenneTwisterRandomVariateGenerator::Pointer
-MersenneTwisterRandomVariateGenerator::New()
+MersenneTwisterRandomVariateGenerator
+::CreateInstance()
 {
   // Try the factory first
   MersenneTwisterRandomVariateGenerator::Pointer obj  = ObjectFactory< Self >::Create();
@@ -34,11 +42,20 @@ MersenneTwisterRandomVariateGenerator::New()
       obj = new MersenneTwisterRandomVariateGenerator;
       // Remove extra reference from construction.
       obj->UnRegister();
-      obj->SetSeed ( GetInstance()->GetSeed() );
     }
   return obj;
 }
 
+
+MersenneTwisterRandomVariateGenerator::Pointer
+MersenneTwisterRandomVariateGenerator
+::New()
+{
+  MersenneTwisterRandomVariateGenerator::Pointer obj  = MersenneTwisterRandomVariateGenerator::CreateInstance();
+  obj->SetSeed ( GetInstance()->GetSeed() );
+  return obj;
+}
+
 /**
  * Return the single instance of the MersenneTwisterRandomVariateGenerator
  */
@@ -46,22 +63,73 @@ MersenneTwisterRandomVariateGenerator::Pointer
 MersenneTwisterRandomVariateGenerator
 ::GetInstance()
 {
-  if ( !MersenneTwisterRandomVariateGenerator::m_Instance )
+  MutexLockHolder<SimpleFastMutexLock> mutexHolder(m_StaticInstanceLock);
+
+  if ( !m_StaticInstance )
     {
-    // Try the factory first
-    MersenneTwisterRandomVariateGenerator::m_Instance  = ObjectFactory< Self >::Create();
-    // if the factory did not provide one, then create it here
-    if ( !MersenneTwisterRandomVariateGenerator::m_Instance )
-      {
-      MersenneTwisterRandomVariateGenerator::m_Instance = new MersenneTwisterRandomVariateGenerator;
-      // Remove extra reference from construction.
-      MersenneTwisterRandomVariateGenerator::m_Instance->UnRegister();
-      }
+    m_StaticInstance  = MersenneTwisterRandomVariateGenerator::CreateInstance();
     }
   /**
    * return the instance
    */
-  return MersenneTwisterRandomVariateGenerator::m_Instance;
+  return m_StaticInstance;
 }
+
+MersenneTwisterRandomVariateGenerator
+::MersenneTwisterRandomVariateGenerator()
+{
+  SetSeed (121212);
+}
+
+MersenneTwisterRandomVariateGenerator::IntegerType
+MersenneTwisterRandomVariateGenerator
+::hash(time_t t, clock_t c)
+{
+  // Get a IntegerType from t and c
+  // Better than IntegerType(x) in case x is floating point in [0,1]
+  // Based on code by Lawrence Kirby: fred at genesis dot demon dot co dot uk
+
+  IntegerType    h1 = 0;
+  unsigned char *p = (unsigned char *)&t;
+
+  const unsigned int sizeOfT = static_cast< unsigned int >( sizeof(t) );
+  for ( unsigned int i = 0; i < sizeOfT; ++i )
+    {
+    h1 *= UCHAR_MAX + 2U;
+    h1 += p[i];
+    }
+  IntegerType h2 = 0;
+  p = (unsigned char *)&c;
+
+  const unsigned int sizeOfC = static_cast< unsigned int >( sizeof(c) );
+  for ( unsigned int j = 0; j < sizeOfC; ++j )
+    {
+    h2 *= UCHAR_MAX + 2U;
+    h2 += p[j];
+    }
+  return ( h1 + m_StaticDiffer++ ) ^ h2;
+}
+
+void
+MersenneTwisterRandomVariateGenerator
+::PrintSelf(std::ostream & os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  // Print state vector contents
+  os << indent << "State vector: " << state << std::endl;
+  os << indent;
+  const IntegerType *s = state;
+  int                         i = StateVectorLength;
+  for (; i--; os << *s++ << "\t" ) {}
+  os << std::endl;
+
+  //Print next value to be gotten from state
+  os << indent << "Next value to be gotten from state: " << pNext << std::endl;
+
+  //Number of values left before reload
+  os << indent << "Values left before next reload: " << left << std::endl;
+}
+
 }
 }
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkMetaDataDictionary.cxx b/Utilities/ITK/Modules/Core/Common/src/itkMetaDataDictionary.cxx
index d9be43c..7079263 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkMetaDataDictionary.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkMetaDataDictionary.cxx
@@ -29,7 +29,7 @@ MetaDataDictionary
 ::~MetaDataDictionary()
 {
   delete m_Dictionary;
-  m_Dictionary = 0;
+  m_Dictionary = ITK_NULLPTR;
 }
 
 MetaDataDictionary
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkMetaDataObject.cxx b/Utilities/ITK/Modules/Core/Common/src/itkMetaDataObject.cxx
new file mode 100644
index 0000000..b972422
--- /dev/null
+++ b/Utilities/ITK/Modules/Core/Common/src/itkMetaDataObject.cxx
@@ -0,0 +1,47 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#define ITK_TEMPLATE_EXPLICIT_MetaDataObject
+#include "itkMetaDataObject.h"
+
+namespace itk
+{
+
+template class ITKCommon_EXPORT MetaDataObject< bool >;
+template class ITKCommon_EXPORT MetaDataObject< unsigned char >;
+template class ITKCommon_EXPORT MetaDataObject< char >;
+template class ITKCommon_EXPORT MetaDataObject< signed char >;
+template class ITKCommon_EXPORT MetaDataObject< unsigned short >;
+template class ITKCommon_EXPORT MetaDataObject< short >;
+template class ITKCommon_EXPORT MetaDataObject< unsigned int >;
+template class ITKCommon_EXPORT MetaDataObject< int >;
+template class ITKCommon_EXPORT MetaDataObject< unsigned long >;
+template class ITKCommon_EXPORT MetaDataObject< long >;
+template class ITKCommon_EXPORT MetaDataObject< float >;
+template class ITKCommon_EXPORT MetaDataObject< double >;
+template class ITKCommon_EXPORT MetaDataObject< std::string >;
+template class ITKCommon_EXPORT MetaDataObject< Array<char> >;
+template class ITKCommon_EXPORT MetaDataObject< Array<int> >;
+template class ITKCommon_EXPORT MetaDataObject< Array<float> >;
+template class ITKCommon_EXPORT MetaDataObject< Array<double> >;
+template class ITKCommon_EXPORT MetaDataObject< Matrix<double> >;
+template class ITKCommon_EXPORT MetaDataObject< std::vector<float> >;
+template class ITKCommon_EXPORT MetaDataObject< std::vector<double> >;
+template class ITKCommon_EXPORT MetaDataObject< std::vector<std::vector<double> > >;
+template class ITKCommon_EXPORT MetaDataObject< std::vector<std::vector<float> > >;
+
+} // end namespace itk
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkMetaDataObjectBase.cxx b/Utilities/ITK/Modules/Core/Common/src/itkMetaDataObjectBase.cxx
index 1c6d927..491c4a2 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkMetaDataObjectBase.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkMetaDataObjectBase.cxx
@@ -15,39 +15,44 @@
  *  limitations under the License.
  *
  *=========================================================================*/
-#include "itkFastMutexLock.h"
+#include "itkMetaDataObjectBase.h"
 
-void
-itk::MetaDataObjectBase
-::Print(std::ostream & os) const
+namespace itk
+{
+
+MetaDataObjectBase
+::MetaDataObjectBase()
+{
+}
+
+
+MetaDataObjectBase
+::~MetaDataObjectBase()
 {
-  os << "[UNKNOWN_PRINT_CHARACTERISTICS]" << std::endl;
 }
 
+
 const char *
-itk::MetaDataObjectBase
-::GetMetaDataObjectTypeName(void) const
+MetaDataObjectBase
+::GetMetaDataObjectTypeName() const
 {
   return typeid( itk::MetaDataObjectBase ).name();
 }
 
+
 const std::type_info &
-itk::MetaDataObjectBase
-::GetMetaDataObjectTypeInfo(void) const
+MetaDataObjectBase
+::GetMetaDataObjectTypeInfo() const
 {
   return typeid( itk::MetaDataObjectBase );
 }
 
-itk::MetaDataObjectBase
-::MetaDataObjectBase()
-{
-  //Nothing to do here
-}
 
-itk::MetaDataObjectBase
-::~MetaDataObjectBase()
+void
+MetaDataObjectBase
+::Print( std::ostream & os ) const
 {
-  //std::cout << "              MetaDataObjectBase Deleteing: " << this <<
-  // std::endl;
-  //Nothing to do here
+  os << "[UNKNOWN_PRINT_CHARACTERISTICS]" << std::endl;
 }
+
+} // end namespace itk
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkMultiThreader.cxx b/Utilities/ITK/Modules/Core/Common/src/itkMultiThreader.cxx
index 5ed730f..705471b 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkMultiThreader.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkMultiThreader.cxx
@@ -187,19 +187,19 @@ MultiThreader::MultiThreader()
   for ( ThreadIdType i = 0; i < ITK_MAX_THREADS; i++ )
     {
     m_ThreadInfoArray[i].ThreadID           = i;
-    m_ThreadInfoArray[i].ActiveFlag         = 0;
-    m_ThreadInfoArray[i].ActiveFlagLock     = 0;
+    m_ThreadInfoArray[i].ActiveFlag         = ITK_NULLPTR;
+    m_ThreadInfoArray[i].ActiveFlagLock     = ITK_NULLPTR;
 
-    m_MultipleMethod[i]                     = 0;
-    m_MultipleData[i]                       = 0;
+    m_MultipleMethod[i]                     = ITK_NULLPTR;
+    m_MultipleData[i]                       = ITK_NULLPTR;
 
     m_SpawnedThreadActiveFlag[i]            = 0;
-    m_SpawnedThreadActiveFlagLock[i]        = 0;
+    m_SpawnedThreadActiveFlagLock[i]        = ITK_NULLPTR;
     m_SpawnedThreadInfoArray[i].ThreadID    = i;
     }
 
-  m_SingleMethod = 0;
-  m_SingleData = 0;
+  m_SingleMethod = ITK_NULLPTR;
+  m_SingleData = ITK_NULLPTR;
   m_NumberOfThreads = this->GetGlobalDefaultNumberOfThreads();
 }
 
@@ -241,7 +241,6 @@ void MultiThreader::SingleMethodExecute()
   if ( !m_SingleMethod )
     {
     itkExceptionMacro(<< "No single method set!");
-    return;
     }
 
   // obey the global maximum number of threads limit
@@ -292,7 +291,7 @@ void MultiThreader::SingleMethodExecute()
     m_ThreadInfoArray[0].NumberOfThreads = m_NumberOfThreads;
     m_SingleMethod( (void *)( &m_ThreadInfoArray[0] ) );
     }
-  catch ( ProcessAborted & excp )
+  catch ( ProcessAborted & )
     {
     // Need cleanup and rethrow ProcessAborted
     // close down other threads
@@ -306,7 +305,7 @@ void MultiThreader::SingleMethodExecute()
               {}
       }
     // rethrow
-    throw &excp;
+    throw;
     }
   catch ( std::exception & e )
     {
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkMultiThreaderPThreads.cxx b/Utilities/ITK/Modules/Core/Common/src/itkMultiThreaderPThreads.cxx
index cb00794..64623fd 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkMultiThreaderPThreads.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkMultiThreaderPThreads.cxx
@@ -65,7 +65,7 @@ ThreadIdType MultiThreader::GetGlobalDefaultNumberOfThreadsByPlatform()
     // hw.logicalcpu takes into account cores/CPUs that are
     // disabled because of power management.
     size_t dataLen = sizeof( int ); // 'num' is an 'int'
-    int    result = sysctlbyname ("hw.logicalcpu", &num, &dataLen, NULL, 0);
+    int    result = sysctlbyname ("hw.logicalcpu", &num, &dataLen, ITK_NULLPTR, 0);
     if ( result == -1 )
       {
       num = 1;
@@ -88,7 +88,7 @@ void MultiThreader::MultipleMethodExecute()
 
   for ( thread_loop = 0; thread_loop < m_NumberOfThreads; thread_loop++ )
     {
-    if ( m_MultipleMethod[thread_loop] == (ThreadFunctionType)0 )
+    if ( m_MultipleMethod[thread_loop] == (ThreadFunctionType)ITK_NULLPTR )
       {
       itkExceptionMacro(<< "No multiple method set for: " << thread_loop);
       return;
@@ -138,7 +138,7 @@ void MultiThreader::MultipleMethodExecute()
   // waits for each of the other processes to exit
   for ( thread_loop = 1; thread_loop < m_NumberOfThreads; thread_loop++ )
     {
-    pthread_join(process_id[thread_loop], 0);
+    pthread_join(process_id[thread_loop], ITK_NULLPTR);
     }
 
 }
@@ -206,10 +206,10 @@ void MultiThreader::TerminateThread(ThreadIdType ThreadID)
   m_SpawnedThreadActiveFlag[ThreadID] = 0;
   m_SpawnedThreadActiveFlagLock[ThreadID]->Unlock();
 
-  pthread_join(m_SpawnedThreadProcessID[ThreadID], 0);
+  pthread_join(m_SpawnedThreadProcessID[ThreadID], ITK_NULLPTR);
 
-  m_SpawnedThreadActiveFlagLock[ThreadID] = 0;
-  m_SpawnedThreadActiveFlagLock[ThreadID] = 0;
+  m_SpawnedThreadActiveFlagLock[ThreadID] = ITK_NULLPTR;
+  m_SpawnedThreadActiveFlagLock[ThreadID] = ITK_NULLPTR;
 }
 
 void
@@ -217,7 +217,7 @@ MultiThreader
 ::WaitForSingleMethodThread(ThreadProcessIDType threadHandle)
 {
   // Using POSIX threads
-  if ( pthread_join(threadHandle, 0) )
+  if ( pthread_join(threadHandle, ITK_NULLPTR) )
     {
     itkExceptionMacro(<< "Unable to join thread.");
     }
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkMutexLockPThreads.cxx b/Utilities/ITK/Modules/Core/Common/src/itkMutexLockPThreads.cxx
index 05d4c4a..87f784f 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkMutexLockPThreads.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkMutexLockPThreads.cxx
@@ -32,7 +32,7 @@ namespace itk
 // Construct a new MutexLock
 SimpleMutexLock::SimpleMutexLock()
 {
-  pthread_mutex_init(&m_MutexLock, NULL);
+  pthread_mutex_init(&m_MutexLock, ITK_NULLPTR);
 }
 
 // Destruct the MutexVariable
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsDiffusionTensor3DPixel.cxx b/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsDiffusionTensor3DPixel.cxx
index 93ac566..46b67e6 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsDiffusionTensor3DPixel.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsDiffusionTensor3DPixel.cxx
@@ -28,10 +28,10 @@ namespace itk
 
 #define DIFFUSIONTENSOR3DPIXELSTATICTRAITSMACRO(T)                                                      \
   template< >                                                                                           \
-  const DiffusionTensor3D< T >  NumericTraits< DiffusionTensor3D< T > >::Zero = DiffusionTensor3D< T >( \
+  ITKCommon_EXPORT const DiffusionTensor3D< T >  NumericTraits< DiffusionTensor3D< T > >::Zero = DiffusionTensor3D< T >( \
     NumericTraits< T >::Zero);                                                                          \
   template< >                                                                                           \
-  const DiffusionTensor3D< T >  NumericTraits< DiffusionTensor3D< T > >::One = DiffusionTensor3D< T >(  \
+  ITKCommon_EXPORT const DiffusionTensor3D< T >  NumericTraits< DiffusionTensor3D< T > >::One = DiffusionTensor3D< T >( \
     NumericTraits< T >::One);
 
 //
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsRGBAPixel.cxx b/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsRGBAPixel.cxx
index eaa95b7..b2140b9 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsRGBAPixel.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsRGBAPixel.cxx
@@ -29,9 +29,9 @@ namespace itk
 //
 #define RGBAPIXELSTATICTRAITSMACRO(T)                                                                     \
   template< >                                                                                             \
-  const RGBAPixel< T >  NumericTraits< RGBAPixel< T > >::Zero = RGBAPixel< T >(NumericTraits< T >::Zero); \
+  ITKCommon_EXPORT const RGBAPixel< T >  NumericTraits< RGBAPixel< T > >::Zero = RGBAPixel< T >(NumericTraits< T >::Zero); \
   template< >                                                                                             \
-  const RGBAPixel< T >  NumericTraits< RGBAPixel< T > >::One = RGBAPixel< T >(NumericTraits< T >::One);
+  ITKCommon_EXPORT const RGBAPixel< T >  NumericTraits< RGBAPixel< T > >::One = RGBAPixel< T >(NumericTraits< T >::One);
 
 //
 // List here the specializations of the Traits:
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsRGBPixel.cxx b/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsRGBPixel.cxx
index c249f78..dce599d 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsRGBPixel.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkNumericTraitsRGBPixel.cxx
@@ -29,9 +29,9 @@ namespace itk
 //
 #define RGBPIXELSTATICTRAITSMACRO(T)                                                                   \
   template< >                                                                                          \
-  const RGBPixel< T >  NumericTraits< RGBPixel< T > >::Zero = RGBPixel< T >(NumericTraits< T >::Zero); \
+  ITKCommon_EXPORT const RGBPixel< T >  NumericTraits< RGBPixel< T > >::Zero = RGBPixel< T >(NumericTraits< T >::Zero); \
   template< >                                                                                          \
-  const RGBPixel< T >  NumericTraits< RGBPixel< T > >::One = RGBPixel< T >(NumericTraits< T >::One);
+  ITKCommon_EXPORT const RGBPixel< T >  NumericTraits< RGBPixel< T > >::One = RGBPixel< T >(NumericTraits< T >::One);
 
 //
 // List here the specializations of the Traits:
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkObject.cxx b/Utilities/ITK/Modules/Core/Common/src/itkObject.cxx
index 8c70c5f..016b00c 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkObject.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkObject.cxx
@@ -26,6 +26,7 @@
  *
  *=========================================================================*/
 #include "itkCommand.h"
+#include <algorithm>
 
 namespace itk
 {
@@ -34,7 +35,7 @@ namespace itk
  */
 bool Object:: m_GlobalWarningDisplay = true;
 
-class Observer
+class ITKCommon_HIDDEN Observer
 {
 public:
   Observer(Command *c,
@@ -50,11 +51,12 @@ public:
   unsigned long      m_Tag;
 };
 
-class SubjectImplementation
+class ITKCommon_HIDDEN SubjectImplementation
 {
 public:
-  SubjectImplementation() { m_Count = 0; }
+  SubjectImplementation() : m_ListModified(false) { m_Count = 0; }
   ~SubjectImplementation();
+
   unsigned long AddObserver(const EventObject & event, Command *cmd);
 
   unsigned long AddObserver(const EventObject & event, Command *cmd) const;
@@ -73,6 +75,35 @@ public:
 
   bool PrintObservers(std::ostream & os, Indent indent) const;
 
+  bool m_ListModified;
+
+protected:
+
+  // RAII of ListModified state to ensure exception safety
+  struct SaveRestoreListModified
+  {
+    // save the list modified flag, and reset to false
+    SaveRestoreListModified(SubjectImplementation *s)
+      : m_Subject(s), m_Save(s->m_ListModified)
+      {
+        m_Subject->m_ListModified = false;
+      }
+
+    // restore modify flag, and propagate if modified
+    ~SaveRestoreListModified()
+      {
+        m_Subject->m_ListModified = m_Save||m_Subject->m_ListModified;
+      }
+
+    SubjectImplementation *m_Subject;
+    bool m_Save;
+  };
+
+  template<typename TObject>
+    void InvokeEventRecursion(const EventObject & event,
+                              TObject *self,
+                              std::list< Observer * >::reverse_iterator &i);
+
 private:
   std::list< Observer * > m_Observers;
   unsigned long           m_Count;
@@ -121,6 +152,7 @@ SubjectImplementation::RemoveObserver(unsigned long tag)
       {
       delete ( *i );
       m_Observers.erase(i);
+      m_ListModified = true;
       return;
       }
     }
@@ -135,36 +167,73 @@ SubjectImplementation::RemoveAllObservers()
     delete ( *i );
     }
   m_Observers.clear();
+  m_ListModified = true;
 }
 
 void
 SubjectImplementation::InvokeEvent(const EventObject & event,
                                    Object *self)
 {
-  for ( std::list< Observer * >::iterator i = m_Observers.begin();
-        i != m_Observers.end(); ++i )
-    {
-    const EventObject *e =  ( *i )->m_Event;
-    if ( e->CheckEvent(&event) )
-      {
-      ( *i )->m_Command->Execute(self, event);
-      }
-    }
+  // While an event is being invoked, it's possible to remove
+  // observers, or another event to be invoked. All methods which
+  // remove observers mark the list as modified with the
+  // m_ListModified flag. The modified flag is save to the stack and
+  // marked false before recursively saving the current list.
+
+  SaveRestoreListModified save(this);
+
+  std::list< Observer * >::reverse_iterator i = m_Observers.rbegin();
+  InvokeEventRecursion( event, self, i );
 }
 
 void
 SubjectImplementation::InvokeEvent(const EventObject & event,
                                    const Object *self)
 {
-  for ( std::list< Observer * >::iterator i = m_Observers.begin();
-        i != m_Observers.end(); ++i )
+  SaveRestoreListModified save(this);
+
+  std::list< Observer * >::reverse_iterator i = m_Observers.rbegin();
+  InvokeEventRecursion( event, self, i );
+}
+
+template<typename TObject>
+void
+SubjectImplementation::InvokeEventRecursion( const EventObject & event,
+                                             TObject *self,
+                                             std::list< Observer * >::reverse_iterator &i)
+{
+  // This method recursively visits the list of observers in reverse
+  // order so that on the last recursion the first observer can be
+  // executed. Each iteration saves the list element on the
+  // stack. Each observer's execution could potentially modify the
+  // observer list, by placing the entire list on the stack we save the
+  // list when the event is first invoked. If observers are removed
+  // during execution, then the current list is search for the current
+  // observer save on the stack.
+
+  while (i != m_Observers.rend())
     {
-    const EventObject *e =  ( *i )->m_Event;
-    if ( e->CheckEvent(&event) )
+
+    // save observer
+    const Observer *o = *i;
+
+    if ( o->m_Event->CheckEvent(&event) )
       {
-      ( *i )->m_Command->Execute(self, event);
+      InvokeEventRecursion( event, self, ++i );
+
+      if ( !m_ListModified ||
+           std::find(m_Observers.begin(), m_Observers.end(), o) != m_Observers.end() )
+        {
+        o->m_Command->Execute(self, event);
+        }
+
+      return;
       }
+
+    ++i;
     }
+
+  return;
 }
 
 Command *
@@ -178,7 +247,7 @@ SubjectImplementation::GetCommand(unsigned long tag)
       return ( *i )->m_Command;
       }
     }
-  return 0;
+  return ITK_NULLPTR;
 }
 
 bool
@@ -209,7 +278,12 @@ SubjectImplementation::PrintObservers(std::ostream & os, Indent indent) const
     {
     const EventObject *e =  ( *i )->m_Event;
     const Command *    c = ( *i )->m_Command;
-    os << indent << e->GetEventName() << "(" << c->GetNameOfClass() << ")\n";
+    os << indent << e->GetEventName() << "(" << c->GetNameOfClass();
+    if (!c->GetObjectName().empty())
+      {
+      os << " \"" << c->GetObjectName() << "\"";
+      }
+    os << ")\n";
     }
   return true;
 }
@@ -220,7 +294,7 @@ Object::New()
   Pointer smartPtr;
   Object *rawPtr = ::itk::ObjectFactory< Object >::Create();
 
-  if ( rawPtr == NULL )
+  if ( rawPtr == ITK_NULLPTR )
     {
     rawPtr = new Object;
     }
@@ -345,7 +419,14 @@ Object
     /**
      * If there is a delete method, invoke it.
      */
-    this->InvokeEvent( DeleteEvent() );
+    try
+      {
+      this->InvokeEvent( DeleteEvent() );
+      }
+    catch(...)
+      {
+      itkWarningMacro("Exception occurred in DeleteEvent Observer!");
+      }
     }
 
   Superclass::UnRegister();
@@ -367,7 +448,14 @@ Object
     /**
      * If there is a delete method, invoke it.
      */
-    this->InvokeEvent( DeleteEvent() );
+    try
+      {
+      this->InvokeEvent( DeleteEvent() );
+      }
+    catch(...)
+      {
+      itkWarningMacro("Exception occurred in DeleteEvent Observer!");
+      }
     }
 
   Superclass::SetReferenceCount(ref);
@@ -424,7 +512,7 @@ Object
     {
     return this->m_SubjectImplementation->GetCommand(tag);
     }
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 void
@@ -497,8 +585,8 @@ Object
 ::Object():
   LightObject(),
   m_Debug(false),
-  m_SubjectImplementation(NULL),
-  m_MetaDataDictionary(NULL),
+  m_SubjectImplementation(ITK_NULLPTR),
+  m_MetaDataDictionary(ITK_NULLPTR),
   m_ObjectName()
 {
   this->Modified();
@@ -536,7 +624,7 @@ MetaDataDictionary &
 Object
 ::GetMetaDataDictionary(void)
 {
-  if ( m_MetaDataDictionary == NULL )
+  if ( m_MetaDataDictionary == ITK_NULLPTR )
     {
     m_MetaDataDictionary = new MetaDataDictionary;
     }
@@ -547,7 +635,7 @@ const MetaDataDictionary &
 Object
 ::GetMetaDataDictionary(void) const
 {
-  if ( m_MetaDataDictionary == NULL )
+  if ( m_MetaDataDictionary == ITK_NULLPTR )
     {
     m_MetaDataDictionary = new MetaDataDictionary;
     }
@@ -558,7 +646,7 @@ void
 Object
 ::SetMetaDataDictionary(const MetaDataDictionary & rhs)
 {
-  if ( m_MetaDataDictionary == NULL )
+  if ( m_MetaDataDictionary == ITK_NULLPTR )
     {
     m_MetaDataDictionary = new MetaDataDictionary;
     }
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkObjectFactoryBase.cxx b/Utilities/ITK/Modules/Core/Common/src/itkObjectFactoryBase.cxx
index 8843852..ffcf8e8 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkObjectFactoryBase.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkObjectFactoryBase.cxx
@@ -134,7 +134,7 @@ ObjectFactoryBase::GetStrictVersionChecking()
 
 
 /**
- * Create an instance of a named itk object using the loaded
+ * Create an instance of a named ITK object using the loaded
  * factories
  */
 LightObject::Pointer
@@ -154,7 +154,7 @@ ObjectFactoryBase
       return newobject;
       }
     }
-  return 0;
+  return ITK_NULLPTR;
 }
 
 std::list< LightObject::Pointer >
@@ -222,9 +222,9 @@ void
 ObjectFactoryBase
 ::RegisterInternal()
 {
-  // Guaranee that no internal factories have already been registered.
-  itkAssertOrThrowMacro( ObjectFactoryBasePrivate::m_RegisteredFactories->empty(),
-                         "Factories unexpectedlly already registered!"  );
+  // Guarantee that no internal factories have already been registered.
+  itkAssertInDebugAndIgnoreInReleaseMacro( ObjectFactoryBasePrivate::m_RegisteredFactories->empty() );
+  ObjectFactoryBasePrivate::m_RegisteredFactories->clear();
 
   // Register all factories registered by the
   // "RegisterFactoryInternal" method
@@ -413,6 +413,15 @@ ObjectFactoryBase
           newfactory->m_LibraryHandle = (void *)lib;
           newfactory->m_LibraryPath = fullpath;
           newfactory->m_LibraryDate = 0; // unused for now...
+
+          // ObjectFactoryBase::RegisterFactory may raise an exception if
+          // a user enables StrictVersionChecking and a library in "path"
+          // is a conflicting version; this exception should be propagated
+          // to the user and not caught by ITK
+          //
+          // Do not edit the next comment line! It is intended to be parsed
+          // by the Coverity analyzer.
+          // coverity[fun_call_w_exception]
           if (!ObjectFactoryBase::RegisterFactory(newfactory))
             {
             DynamicLoader::CloseLibrary(lib);
@@ -446,7 +455,7 @@ ObjectFactoryBase
  */
 ObjectFactoryBase::ObjectFactoryBase()
 {
-  m_LibraryHandle = 0;
+  m_LibraryHandle = ITK_NULLPTR;
   m_LibraryDate = 0;
   m_OverrideMap = new OverRideMap;
 }
@@ -470,7 +479,7 @@ void
 ObjectFactoryBase
 ::RegisterFactoryInternal(ObjectFactoryBase *factory)
 {
-  if ( factory->m_LibraryHandle != NULL )
+  if ( factory->m_LibraryHandle != ITK_NULLPTR )
     {
     itkGenericExceptionMacro( "A dynamic factory tried to be loaded internally!" );
     }
@@ -497,7 +506,7 @@ bool
 ObjectFactoryBase
 ::RegisterFactory(ObjectFactoryBase *factory, InsertionPositionType where, size_t position)
 {
-  if ( factory->m_LibraryHandle == 0 )
+  if ( factory->m_LibraryHandle == ITK_NULLPTR )
     {
     const char nonDynamicName[] = "Non-Dynamicaly loaded factory";
     factory->m_LibraryPath = nonDynamicName;
@@ -692,7 +701,7 @@ ObjectFactoryBase
         }
       }
     delete ObjectFactoryBasePrivate::m_RegisteredFactories;
-    ObjectFactoryBasePrivate::m_RegisteredFactories = 0;
+    ObjectFactoryBasePrivate::m_RegisteredFactories = ITK_NULLPTR;
     ObjectFactoryBasePrivate::m_Initialized = false;
     }
 }
@@ -733,7 +742,7 @@ ObjectFactoryBase
       return ( *i ).second.m_CreateObject->CreateObject();
       }
     }
-  return 0;
+  return ITK_NULLPTR;
 }
 
 std::list< LightObject::Pointer >
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkOctreeNode.cxx b/Utilities/ITK/Modules/Core/Common/src/itkOctreeNode.cxx
index 5f0a6c6..6752b64 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkOctreeNode.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkOctreeNode.cxx
@@ -27,8 +27,8 @@ namespace itk
      */
 OctreeNode::OctreeNode(void)
 {
-  m_Parent = 0;
-  m_Branch = 0;
+  m_Parent = ITK_NULLPTR;
+  m_Branch = ITK_NULLPTR;
 }
 
 OctreeNode::~OctreeNode(void)
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkOutputWindow.cxx b/Utilities/ITK/Modules/Core/Common/src/itkOutputWindow.cxx
index 4d1d37f..6e59fc8 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkOutputWindow.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkOutputWindow.cxx
@@ -34,7 +34,7 @@
 
 namespace itk
 {
-OutputWindow::Pointer OutputWindow:: m_Instance = 0;
+OutputWindow::Pointer OutputWindow:: m_Instance = ITK_NULLPTR;
 
 /**
  * Prompting off by default
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkProcessObject.cxx b/Utilities/ITK/Modules/Core/Common/src/itkProcessObject.cxx
index c8221e7..40af8eb 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkProcessObject.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkProcessObject.cxx
@@ -129,7 +129,7 @@ ProcessObject
       // let the output know we no longer want to associate with the object
       it->second->DisconnectSource(this, it->first);
       // let go of our reference to the data object
-      it->second = 0;
+      it->second = ITK_NULLPTR;
       }
     }
 }
@@ -159,7 +159,7 @@ ProcessObject
 
       if (num < 1 )
         {
-        m_IndexedInputs[0]->second = NULL;
+        m_IndexedInputs[0]->second = ITK_NULLPTR;
         }
       }
     else
@@ -224,7 +224,7 @@ ProcessObject
   // if primary or required set to null
   if ( key ==  m_IndexedInputs[0]->first || this->IsRequiredInputName(key) )
     {
-    this->SetInput(key, NULL);
+    this->SetInput(key, ITK_NULLPTR);
     return;
     }
 
@@ -233,7 +233,7 @@ ProcessObject
     {
     if ( m_IndexedInputs[i]->first == key )
       {
-      this->SetNthInput(i, NULL);
+      this->SetNthInput(i, ITK_NULLPTR);
       if ( i == m_IndexedInputs.size() - 1 )
         {
         // remove the last indexed input
@@ -385,7 +385,7 @@ ProcessObject
   // if primary or required set to null
   if ( key == m_IndexedOutputs[0]->first )
     {
-    this->SetOutput( key, NULL );
+    this->SetOutput( key, ITK_NULLPTR );
     return;
     }
 
@@ -394,7 +394,7 @@ ProcessObject
     {
     if ( m_IndexedOutputs[i]->first == key )
       {
-      this->SetNthOutput(i, NULL);
+      this->SetNthOutput(i, ITK_NULLPTR);
       if ( i == m_IndexedOutputs.size() - 1 )
         {
         // remove the last indexed input
@@ -560,7 +560,7 @@ ProcessObject
 
       if (num < 1 )
         {
-        m_IndexedOutputs[0]->second = NULL;
+        m_IndexedOutputs[0]->second = ITK_NULLPTR;
         }
       }
     else
@@ -588,7 +588,7 @@ ProcessObject
   DataObjectPointerMap::iterator it = m_Outputs.find(key);
   if ( it == m_Outputs.end() )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
   return it->second.GetPointer();
 }
@@ -600,7 +600,7 @@ ProcessObject
   DataObjectPointerMap::const_iterator it = m_Outputs.find(key);
   if ( it == m_Outputs.end() )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
   return it->second.GetPointer();
 }
@@ -734,7 +734,7 @@ ProcessObject
     {
     return m_IndexedOutputs.size();
     }
-  return this->GetPrimaryOutput() != NULL;
+  return this->GetPrimaryOutput() != ITK_NULLPTR;
 }
 
 // ProcessObject::ConstDataObjectPointerArray
@@ -771,7 +771,7 @@ ProcessObject
   DataObjectPointerMap::iterator it = m_Inputs.find(key);
   if ( it == m_Inputs.end() )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
   return it->second.GetPointer();
 }
@@ -783,7 +783,7 @@ ProcessObject
   DataObjectPointerMap::const_iterator it = m_Inputs.find(key);
   if ( it == m_Inputs.end() )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
   return it->second.GetPointer();
 }
@@ -1006,7 +1006,7 @@ ProcessObject
     {
     return m_IndexedInputs.size();
     }
-  return this->GetPrimaryInput() != NULL;
+  return this->GetPrimaryInput() != ITK_NULLPTR;
 }
 
 // ProcessObject::ConstDataObjectPointerArray
@@ -1365,7 +1365,7 @@ ProcessObject
    */
   for( NameSet::const_iterator it = this->m_RequiredInputNames.begin(); it != this->m_RequiredInputNames.end(); ++it )
     {
-    if ( this->GetInput( *it ) == NULL )
+    if ( this->GetInput( *it ) == ITK_NULLPTR )
       {
       itkExceptionMacro(<< "Input " << *it << " is required but not set.");
       }
@@ -1377,7 +1377,7 @@ ProcessObject
   NameSet::const_iterator i = m_RequiredInputNames.begin();
   while (i != m_RequiredInputNames.end())
     {
-    if ( this->GetInput(*i) == NULL )
+    if ( this->GetInput(*i) == ITK_NULLPTR )
       {
       itkExceptionMacro( << "Required Input " << *i << "is not specified!"
                          << " The required inputs are expected to be the first inputs.");
@@ -1732,12 +1732,12 @@ ProcessObject
     {
     this->GenerateData();
     }
-  catch ( ProcessAborted & excp )
+  catch ( ProcessAborted & )
     {
     this->InvokeEvent( AbortEvent() );
     this->ResetPipeline();
     this->RestoreInputReleaseDataFlags();
-    throw &excp;
+    throw;
     }
   catch (...)
     {
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkProgressAccumulator.cxx b/Utilities/ITK/Modules/Core/Common/src/itkProgressAccumulator.cxx
index 5bad343..77587f9 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkProgressAccumulator.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkProgressAccumulator.cxx
@@ -22,7 +22,7 @@ namespace itk
 ProgressAccumulator
 ::ProgressAccumulator()
 {
-  m_MiniPipelineFilter = 0;
+  m_MiniPipelineFilter = ITK_NULLPTR;
 
   // Initialize the progress values
   m_AccumulatedProgress     = 0.0f;
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkRealTimeClock.cxx b/Utilities/ITK/Modules/Core/Common/src/itkRealTimeClock.cxx
index 473be65..f65967a 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkRealTimeClock.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkRealTimeClock.cxx
@@ -81,6 +81,8 @@ RealTimeClock::RealTimeClock():m_Frequency(1)
   this->m_Origin -= this->m_Difference;
 #else
   this->m_Frequency = 1e6;
+  this->m_Difference = 0.0;
+  this->m_Origin = 0.0;
 #endif  // defined(WIN32) || defined(_WIN32)
 }
 
@@ -100,7 +102,7 @@ RealTimeClock::GetTimeInSeconds() const
   return value;
 #else
   struct timeval tval;
-  ::gettimeofday(&tval, 0);
+  ::gettimeofday(&tval, ITK_NULLPTR);
 
   TimeStampType value = static_cast< TimeStampType >( tval.tv_sec ) + static_cast< TimeStampType >( tval.tv_usec )
                         / this->m_Frequency;
@@ -129,14 +131,14 @@ RealTimeClock::GetRealTimeStamp() const
   typedef RealTimeStamp::SecondsCounterType       SecondsCounterType;
   typedef RealTimeStamp::MicroSecondsCounterType  MicroSecondsCounterType;
 
-  SecondsCounterType iseconds = vcl_floor( seconds );
-  MicroSecondsCounterType useconds = vcl_floor( ( seconds - iseconds ) * 1e6 );
+  SecondsCounterType iseconds = std::floor( seconds );
+  MicroSecondsCounterType useconds = std::floor( ( seconds - iseconds ) * 1e6 );
 
   RealTimeStamp value( iseconds, useconds );
   return value;
 #else
   struct timeval tval;
-  ::gettimeofday(&tval, 0);
+  ::gettimeofday(&tval, ITK_NULLPTR);
 
   RealTimeStamp value( static_cast<RealTimeStamp::SecondsCounterType>(tval.tv_sec), static_cast<RealTimeStamp::MicroSecondsCounterType>(tval.tv_usec) );
   return value;
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkSimpleFastMutexLockPThreads.cxx b/Utilities/ITK/Modules/Core/Common/src/itkSimpleFastMutexLockPThreads.cxx
index efebe8e..90f21bd 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkSimpleFastMutexLockPThreads.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkSimpleFastMutexLockPThreads.cxx
@@ -32,7 +32,10 @@ namespace itk
 // Construct a new SimpleMutexLock
 SimpleFastMutexLock::SimpleFastMutexLock()
 {
-  pthread_mutex_init(&( m_FastMutexLock ), NULL);
+  pthread_mutexattr_t mta;
+  pthread_mutexattr_init(&mta);
+  pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE);
+  pthread_mutex_init(&( m_FastMutexLock ), &mta);
 }
 
 // Destruct the SimpleMutexVariable
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx b/Utilities/ITK/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx
index 27a2902..1e56339 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx
@@ -75,20 +75,23 @@ SimpleFilterWatcher
 }
 
 SimpleFilterWatcher
-::SimpleFilterWatcher()
-{
-  // Initialize state
-  m_Steps = 0;
-  m_Comment = "Not watching an object";
-  m_TestAbort = false;
-  m_Iterations = 0;
+::SimpleFilterWatcher() :
+  m_Steps(0),
+  m_Iterations(0),
 #if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION == 730 )
-  m_Quiet = true;
+  m_Quiet(true),
 #else
-  m_Quiet = false;
+  m_Quiet(false),
 #endif
-
-  m_Process = 0;
+  m_TestAbort(false),
+  m_Comment("Not watching an object"),
+  m_Process(ITK_NULLPTR),
+  m_StartTag(0),
+  m_EndTag(0),
+  m_ProgressTag(0),
+  m_IterationTag(0),
+  m_AbortTag(0)
+{
 }
 
 SimpleFilterWatcher
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkSmapsFileParser.cxx b/Utilities/ITK/Modules/Core/Common/src/itkSmapsFileParser.cxx
index 8d63b03..08e532f 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkSmapsFileParser.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkSmapsFileParser.cxx
@@ -370,7 +370,7 @@ SmapsData_2_6::~SmapsData_2_6()
 
 std::istream & operator>>(std::istream & smapsStream, SmapsData_2_6 & data)
 {
-  SmapsRecord *record = NULL;
+  SmapsRecord *record = ITK_NULLPTR;
 
   // reset the records from a previous parsing
   data.Reset();
@@ -428,7 +428,7 @@ VMMapData_10_2
 
 std::istream & operator>>(std::istream & stream, VMMapData_10_2 & data)
 {
-  MapRecord *record = NULL;
+  MapRecord *record = ITK_NULLPTR;
 
   // reset the records from a previous parsing
   data.Reset();
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkSmartPointerForwardReferenceProcessObject.cxx b/Utilities/ITK/Modules/Core/Common/src/itkSmartPointerForwardReferenceProcessObject.cxx
index b6524cb..24d3dfc 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkSmartPointerForwardReferenceProcessObject.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkSmartPointerForwardReferenceProcessObject.cxx
@@ -16,7 +16,24 @@
  *
  *=========================================================================*/
 #include "itkSmartPointerForwardReference.h"
+/** The inclusion of itkSmartPointerForwardReference.hxx is needed here
+ * because this is one of the very few cases where
+ * itkSmartPointerForwardReference.h does not include
+ * itkSmartPointerForwardReference.hxx
+ *
+ * Ensure that the implicitly instantiated methods and operators are
+ * exported for the linker.
+ */
+#if __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
 #include "itkSmartPointerForwardReference.hxx"
+#if __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
+
+
 #include "itkProcessObject.h"
 
+// Manual instantiation is necessary to prevent link errors
 template class ITKCommon_EXPORT itk::SmartPointerForwardReference< itk::ProcessObject >;
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkStdStreamLogOutput.cxx b/Utilities/ITK/Modules/Core/Common/src/itkStdStreamLogOutput.cxx
index ee54da4..99f206b 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkStdStreamLogOutput.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkStdStreamLogOutput.cxx
@@ -23,7 +23,7 @@ namespace itk
 /** Constructor */
 StdStreamLogOutput::StdStreamLogOutput()
 {
-  this->m_Stream = 0;
+  this->m_Stream = ITK_NULLPTR;
 }
 
 /** Destructor */
diff --git a/Utilities/ITK/Modules/Core/Common/src/itkThreadLogger.cxx b/Utilities/ITK/Modules/Core/Common/src/itkThreadLogger.cxx
index c381dea..cfa1a71 100644
--- a/Utilities/ITK/Modules/Core/Common/src/itkThreadLogger.cxx
+++ b/Utilities/ITK/Modules/Core/Common/src/itkThreadLogger.cxx
@@ -180,12 +180,12 @@ ThreadLogger
 {
   struct MultiThreader:: ThreadInfoStruct *pInfo = (struct MultiThreader::ThreadInfoStruct *)pInfoStruct;
 
-  if ( pInfo == NULL )
+  if ( pInfo == ITK_NULLPTR )
     {
     return ITK_THREAD_RETURN_VALUE;
     }
 
-  if ( pInfo->UserData == NULL )
+  if ( pInfo->UserData == ITK_NULLPTR )
     {
     return ITK_THREAD_RETURN_VALUE;
     }
diff --git a/Utilities/ITK/Modules/Core/Common/wrapping/ITKCommonBase.wrap b/Utilities/ITK/Modules/Core/Common/wrapping/ITKCommonBase.wrap
index ff5c7b5..eff06f4 100644
--- a/Utilities/ITK/Modules/Core/Common/wrapping/ITKCommonBase.wrap
+++ b/Utilities/ITK/Modules/Core/Common/wrapping/ITKCommonBase.wrap
@@ -31,6 +31,7 @@ itk_wrap_simple_class("itk::DynamicLoader"      POINTER)
 itk_wrap_simple_class("itk::ObjectFactoryBase"  POINTER)
 itk_wrap_simple_class("itk::OutputWindow"       POINTER)
 itk_wrap_simple_class("itk::Version"            POINTER)
+itk_wrap_simple_class("itk::RealTimeClock"      POINTER)
 itk_wrap_simple_class("itk::RealTimeInterval")
 itk_wrap_simple_class("itk::RealTimeStamp")
 itk_wrap_simple_class("itk::TimeStamp")
diff --git a/Utilities/ITK/Modules/Core/Common/wrapping/itkArray2D.wrap b/Utilities/ITK/Modules/Core/Common/wrapping/itkArray2D.wrap
index 1c99e0c..0d0a2a8 100644
--- a/Utilities/ITK/Modules/Core/Common/wrapping/itkArray2D.wrap
+++ b/Utilities/ITK/Modules/Core/Common/wrapping/itkArray2D.wrap
@@ -1,5 +1,4 @@
 itk_wrap_class("itk::Array2D")
-  itk_wrap_template("${ITKM_D}" "${ITKT_D}")
   UNIQUE(types "D;${WRAP_ITK_REAL}")
   foreach(t ${types})
     itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
diff --git a/Utilities/ITK/Modules/Core/Common/wrapping/itkDiffusionTensor3D.wrap b/Utilities/ITK/Modules/Core/Common/wrapping/itkDiffusionTensor3D.wrap
index 2d01772..93070a2 100644
--- a/Utilities/ITK/Modules/Core/Common/wrapping/itkDiffusionTensor3D.wrap
+++ b/Utilities/ITK/Modules/Core/Common/wrapping/itkDiffusionTensor3D.wrap
@@ -1,7 +1,8 @@
-itk_wrap_class("itk::DiffusionTensor3D")
-  itk_wrap_filter_dims(d 3)
-  if(d)
+itk_wrap_filter_dims(has_d_3 3)
+
+if(has_d_3)
+  itk_wrap_class("itk::DiffusionTensor3D")
     itk_wrap_template("${ITKM_F}" "${ITKT_F}")
     itk_wrap_template("${ITKM_D}" "${ITKT_D}")
-  endif(d)
-itk_end_wrap_class()
+  itk_end_wrap_class()
+endif(has_d_3)
diff --git a/Utilities/ITK/Modules/Core/Common/wrapping/itkNumericTraits.wrap b/Utilities/ITK/Modules/Core/Common/wrapping/itkNumericTraits.wrap
index 741e397..1815498 100644
--- a/Utilities/ITK/Modules/Core/Common/wrapping/itkNumericTraits.wrap
+++ b/Utilities/ITK/Modules/Core/Common/wrapping/itkNumericTraits.wrap
@@ -16,7 +16,7 @@ if(WIN32)
 endif(WIN32)
 
 # the superclass
-itk_wrap_class(vcl_numeric_limits EXPLICIT_SPECIALIZATION)
+itk_wrap_class(std::numeric_limits EXPLICIT_SPECIALIZATION)
   # the basic types
   foreach(t UC US UI UL SC SS SI SL F D LD B)
     itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
diff --git a/Utilities/ITK/Modules/Core/Common/wrapping/itkVectorContainer.wrap b/Utilities/ITK/Modules/Core/Common/wrapping/itkVectorContainer.wrap
index 7ff5a18..f01e30e 100644
--- a/Utilities/ITK/Modules/Core/Common/wrapping/itkVectorContainer.wrap
+++ b/Utilities/ITK/Modules/Core/Common/wrapping/itkVectorContainer.wrap
@@ -1,15 +1,14 @@
 itk_wrap_include("set")
 
-# double is always needed by KernelTransform
-UNIQUE(real_types "${WRAP_ITK_REAL};D")
 itk_wrap_class("itk::VectorContainer" POINTER)
+  # double is always needed by KernelTransform
+  UNIQUE(real_types "${WRAP_ITK_REAL};D")
   foreach(t ${real_types})
     itk_wrap_template("${ITKM_UL}${ITKM_${t}}" "${ITKT_UL},${ITKT_${t}}")
     itk_wrap_template("${ITKM_UC}${ITKM_${t}}" "${ITKT_UC},${ITKT_${t}}")
   endforeach(t)
   foreach(d ${ITK_WRAP_DIMS})
     foreach(t ${real_types})
-      itk_wrap_template("${ITKM_UL}${ITKM_${t}}" "${ITKT_UL},${ITKT_${t}}")
       itk_wrap_template("${ITKM_UL}${ITKM_V${t}${d}}" "${ITKT_UL},${ITKT_V${t}${d}}")
       itk_wrap_template("${ITKM_UL}${ITKM_P${t}${d}}" "${ITKT_UL},${ITKT_P${t}${d}}")
       itk_wrap_template("${ITKM_UL}M${ITKM_${t}}${d}${d}" "${ITKT_UL}, itk::Matrix< ${ITKT_${t}}, ${d}, ${d} >")
@@ -19,10 +18,6 @@ itk_wrap_class("itk::VectorContainer" POINTER)
     itk_wrap_template("${ITKM_UC}${ITKM_O${d}}"  "${ITKT_UC},${ITKT_O${d}}")
     itk_wrap_template("${ITKM_UI}${ITKM_CID${d}}" "${ITKT_UI},${ITKT_CID${d}}")
   endforeach(d)
-  foreach(t ${WRAP_ITK_REAL})
-    itk_wrap_template("${ITKM_UL}${ITKM_${t}}"    "${ITKT_UL},${ITKT_${t}}")
-    itk_wrap_template("${ITKM_UC}${ITKM_${t}}"    "${ITKT_UC},${ITKT_${t}}")
-  endforeach(t)
   itk_wrap_template("${ITKM_UC}${ITKM_SS}"    "${ITKT_UC},${ITKT_SS}")
   # used in FastMarchingExtensionImageFilter
   itk_wrap_template("${ITKM_UI}${ITKM_VUC1}"    "${ITKT_UI},${ITKT_VUC1}")
diff --git a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx
index 950a8ee..4854015 100644
--- a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx
+++ b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx
@@ -230,9 +230,7 @@ DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >::TimeStepType
 DenseFiniteDifferenceImageFilter< TInputImage, TOutputImage >
 ::ThreadedCalculateChange(const ThreadRegionType & regionToProcess, ThreadIdType)
 {
-  typedef typename OutputImageType::RegionType                    RegionType;
   typedef typename OutputImageType::SizeType                      SizeType;
-  typedef typename OutputImageType::IndexType                     IndexType;
   typedef typename FiniteDifferenceFunctionType::NeighborhoodType NeighborhoodIteratorType;
 
   typedef ImageRegionIterator< UpdateBufferType > UpdateIteratorType;
diff --git a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h
index 3ab2046..b6121d3 100644
--- a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h
+++ b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.h
@@ -186,7 +186,7 @@ protected:
   FiniteDifferenceFunction();
   ~FiniteDifferenceFunction() {}
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   RadiusType m_Radius;
   PixelRealType m_ScaleCoefficients[ImageDimension];
diff --git a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.hxx b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.hxx
index ace8067..f7ad83e 100644
--- a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.hxx
+++ b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.hxx
@@ -86,7 +86,6 @@ FiniteDifferenceFunction< TImageType >::ComputeNeighborhoodScales() const
   NeighborhoodScalesType neighborhoodScales;
 
   neighborhoodScales.Fill(0.0);
-  typedef typename NeighborhoodScalesType::ComponentType NeighborhoodScaleType;
   for ( unsigned int i = 0; i < ImageDimension; i++ )
     {
     if ( this->m_Radius[i] > 0 )
diff --git a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx
index 20fc860..5ba6f80 100644
--- a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx
+++ b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceImageFilter.hxx
@@ -31,7 +31,7 @@ FiniteDifferenceImageFilter< TInputImage, TOutputImage >
 {
   m_UseImageSpacing    = true;
   m_ElapsedIterations  = 0;
-  m_DifferenceFunction = 0;
+  m_DifferenceFunction = ITK_NULLPTR;
   m_NumberOfIterations = NumericTraits< IdentifierType >::max();
   m_MaximumRMSError = 0.0;
   m_RMSChange = 0.0;
@@ -264,7 +264,7 @@ FiniteDifferenceImageFilter< TInputImage, TOutputImage >
   if ( this->m_UseImageSpacing )
     {
     const TOutputImage *outputImage =  this->GetOutput();
-    if ( outputImage == NULL )
+    if ( outputImage == ITK_NULLPTR )
       {
       itkExceptionMacro("Output image is NULL");
       }
diff --git a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx
index 30d6a0a..3ac48a8 100644
--- a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx
+++ b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx
@@ -26,7 +26,7 @@ template< typename TInputImageType, typename TSparseOutputImageType >
 FiniteDifferenceSparseImageFilter< TInputImageType, TSparseOutputImageType >
 ::FiniteDifferenceSparseImageFilter()
 {
-  m_SparseFunction = 0;
+  m_SparseFunction = ITK_NULLPTR;
   m_PrecomputeFlag = false;
 }
 
diff --git a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h
index 0eb74dc..cc4c7cc 100644
--- a/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h
+++ b/Utilities/ITK/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFunction.h
@@ -85,7 +85,7 @@ public:
                                   void *,
                                   const FloatOffsetType &)
   {
-    return static_cast< PixelType >( 0 );
+    return static_cast< PixelType >( ITK_NULLPTR );
   }
 
   /** The update called from the FiniteDifferenceSparseImageFilter. This
diff --git a/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUImage.h b/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUImage.h
index 672798b..bd3b9f7 100644
--- a/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUImage.h
+++ b/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUImage.h
@@ -76,7 +76,7 @@ public:
   //
   // Allocate CPU and GPU memory space
   //
-  void Allocate();
+  virtual void Allocate(bool initialize=false) ITK_OVERRIDE;
 
   virtual void Initialize();
 
diff --git a/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUImage.hxx b/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUImage.hxx
index d9fe78e..8b1e2b4 100644
--- a/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUImage.hxx
+++ b/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUImage.hxx
@@ -36,10 +36,10 @@ GPUImage< TPixel, VImageDimension >::~GPUImage()
 }
 
 template <typename TPixel, unsigned int VImageDimension>
-void GPUImage< TPixel, VImageDimension >::Allocate()
+void GPUImage< TPixel, VImageDimension >::Allocate(bool initialize)
 {
   // allocate CPU memory - calling Allocate() in superclass
-  Superclass::Allocate();
+  Superclass::Allocate(initialize);
 
   // allocate GPU memory
   this->ComputeOffsetTable();
diff --git a/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUInPlaceImageFilter.hxx b/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUInPlaceImageFilter.hxx
index 0f108ae..40c1877 100644
--- a/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUInPlaceImageFilter.hxx
+++ b/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUInPlaceImageFilter.hxx
@@ -74,7 +74,7 @@ GPUInPlaceImageFilter< TInputImage, TOutputImage, TParentImageFilter >
       // Graft this first input to the output.  Later, we'll need to
       // remove the input's hold on the bulk data.
       //
-        OutputImagePointer inputAsOutput =
+      OutputImagePointer inputAsOutput =
         dynamic_cast< TOutputImage * >( const_cast< TInputImage * >( this->GetInput() ) );
       if ( inputAsOutput )
         {
diff --git a/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUReduction.hxx b/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUReduction.hxx
index 5df0393..2032aa1 100644
--- a/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUReduction.hxx
+++ b/Utilities/ITK/Modules/Core/GPUCommon/include/itkGPUReduction.hxx
@@ -36,6 +36,12 @@ GPUReduction< TElement >
   m_GPUKernelManager = GPUKernelManager::New();
   m_GPUDataManager = NULL;
 
+  m_ReduceGPUKernelHandle = 0;
+  m_TestGPUKernelHandle = 0;
+
+  m_Size = 0;
+  m_SmallBlock = false;
+
 }
 template< typename TElement >
 GPUReduction< TElement >
diff --git a/Utilities/ITK/Modules/Core/GPUCommon/src/itkGPUDataManager.cxx b/Utilities/ITK/Modules/Core/GPUCommon/src/itkGPUDataManager.cxx
index c6c9da0..70ac2e1 100644
--- a/Utilities/ITK/Modules/Core/GPUCommon/src/itkGPUDataManager.cxx
+++ b/Utilities/ITK/Modules/Core/GPUCommon/src/itkGPUDataManager.cxx
@@ -147,7 +147,6 @@ bool GPUDataManager::Update()
   if( m_IsGPUBufferDirty && m_IsCPUBufferDirty )
     {
     itkExceptionMacro("Cannot make up-to-date buffer because both CPU and GPU buffers are dirty");
-    return false;
     }
 
   this->UpdateGPUBuffer();
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAbsImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAbsImageAdaptor.h
index 37de8a5..aefc645 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAbsImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAbsImageAdaptor.h
@@ -25,7 +25,7 @@ namespace itk
 namespace Accessor
 {
 /** \class AbsPixelAccessor
- * \brief Give access to the vcl_abs() function of a value
+ * \brief Give access to the std::abs() function of a value
  *
  * AbsPixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -62,7 +62,7 @@ public:
 } // end namespace Accessor
 
 /** \class AbsImageAdaptor
- * \brief Presents an image as being composed of the vcl_abs() of its pixels
+ * \brief Presents an image as being composed of the std::abs() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAcosImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAcosImageAdaptor.h
index c3cfc90..a57c206 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAcosImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAcosImageAdaptor.h
@@ -26,7 +26,7 @@ namespace itk
 namespace Accessor
 {
 /** \class AcosPixelAccessor
- * \brief Give access to the vcl_acos() function of a value
+ * \brief Give access to the std::acos() function of a value
  *
  * AcosPixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -51,15 +51,15 @@ public:
   typedef TInternalType InternalType;
 
   static inline void Set(TInternalType & output, const TExternalType & input)
-  { output = (TInternalType)vcl_acos( (double)input ); }
+  { output = (TInternalType)std::acos( (double)input ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return (TExternalType)vcl_acos( (double)input ); }
+  { return (TExternalType)std::acos( (double)input ); }
 };
 } // end namespace Accessor
 
 /** \class AcosImageAdaptor
- * \brief Presents an image as being composed of the vcl_acos() of its pixels
+ * \brief Presents an image as being composed of the std::acos() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAsinImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAsinImageAdaptor.h
index 856799b..8745635 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAsinImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAsinImageAdaptor.h
@@ -27,7 +27,7 @@ namespace Accessor
 {
 /**
  * \class AsinPixelAccessor
- * \brief Give access to the vcl_asin() function of a value
+ * \brief Give access to the std::asin() function of a value
  *
  * AsinPixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -51,16 +51,16 @@ public:
   typedef TInternalType InternalType;
 
   static inline void Set(TInternalType & output, const TExternalType & input)
-  { output = (TInternalType)vcl_asin( (double)input ); }
+  { output = (TInternalType)std::asin( (double)input ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return (TExternalType)vcl_asin( (double)input ); }
+  { return (TExternalType)std::asin( (double)input ); }
 };
 } // end namespace Accessor
 
 /**
  * \class AsinImageAdaptor
- * \brief Presents an image as being composed of the vcl_asin() of its pixels
+ * \brief Presents an image as being composed of the std::asin() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAtanImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAtanImageAdaptor.h
index e4759e9..a45842b 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAtanImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkAtanImageAdaptor.h
@@ -27,7 +27,7 @@ namespace Accessor
 {
 /**
  * \class AtanPixelAccessor
- * \brief Give access to the vcl_atan() function of a value
+ * \brief Give access to the std::atan() function of a value
  *
  * AtanPixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -52,16 +52,16 @@ public:
   typedef TInternalType InternalType;
 
   static inline void Set(TInternalType & output, const TExternalType & input)
-  { output = (TInternalType)vcl_atan( (double)input ); }
+  { output = (TInternalType)std::atan( (double)input ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return (TExternalType)vcl_atan( (double)input ); }
+  { return (TExternalType)std::atan( (double)input ); }
 };
 } // end namespace Accessor
 
 /**
  * \class AtanImageAdaptor
- * \brief Presents an image as being composed of the vcl_atan() of its pixels
+ * \brief Presents an image as being composed of the std::atan() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkComplexToModulusImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkComplexToModulusImageAdaptor.h
index adc8d6b..19849bc 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkComplexToModulusImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkComplexToModulusImageAdaptor.h
@@ -54,14 +54,14 @@ public:
 
   static inline TExternalType Get(const TInternalType & input)
   {
-    return (TExternalType)( vcl_sqrt( input.real() * input.real()
+    return (TExternalType)( std::sqrt( input.real() * input.real()
                                       + input.imag() * input.imag() ) );
   }
 };
 } // end namespace Accessor
 
 /** \class ComplexToModulusImageAdaptor
- * \brief Presents a complex image as being composed of vcl_abs() part
+ * \brief Presents a complex image as being composed of std::abs() part
  * of its pixels.
  *
  * Additional casting is performed according to the input and output image
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkComplexToPhaseImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkComplexToPhaseImageAdaptor.h
index d63315d..814a673 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkComplexToPhaseImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkComplexToPhaseImageAdaptor.h
@@ -53,7 +53,7 @@ public:
   { output = (TInternalType)( input ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return (TExternalType)( vcl_atan2( input.imag(), input.real() ) ); }
+  { return (TExternalType)( std::atan2( input.imag(), input.real() ) ); }
 };
 } // end namespace Accessor
 
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkCosImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkCosImageAdaptor.h
index 86da7f3..b710895 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkCosImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkCosImageAdaptor.h
@@ -26,7 +26,7 @@ namespace itk
 namespace Accessor
 {
 /** \class CosPixelAccessor
- * \brief Give access to the vcl_cos() function of a value
+ * \brief Give access to the std::cos() function of a value
  *
  * CosPixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -49,15 +49,15 @@ public:
   typedef TInternalType InternalType;
 
   static inline void Set(TInternalType & output, const TExternalType & input)
-  { output = (TInternalType)vcl_cos( (double)input ); }
+  { output = (TInternalType)std::cos( (double)input ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return (TExternalType)vcl_cos( (double)input ); }
+  { return (TExternalType)std::cos( (double)input ); }
 };
 } // end namespace Accessor
 
 /** \class CosImageAdaptor
- * \brief Presents an image as being composed of the vcl_cos() of its pixels
+ * \brief Presents an image as being composed of the std::cos() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkExpImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkExpImageAdaptor.h
index 033866f..e4f584b 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkExpImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkExpImageAdaptor.h
@@ -26,7 +26,7 @@ namespace itk
 namespace Accessor
 {
 /** \class ExpPixelAccessor
- * \brief Give access to the vcl_exp() function of a value
+ * \brief Give access to the std::exp() function of a value
  *
  * ExpPixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -49,15 +49,15 @@ public:
   typedef TInternalType InternalType;
 
   static inline void Set(TInternalType & output, const TExternalType & input)
-  { output = (TInternalType)vcl_exp( (double)input ); }
+  { output = (TInternalType)std::exp( (double)input ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return (TExternalType)vcl_exp( (double)input ); }
+  { return (TExternalType)std::exp( (double)input ); }
 };
 } // end namespace Accessor
 
 /** \class ExpImageAdaptor
- * \brief Presents an image as being composed of the vcl_exp() of its pixels
+ * \brief Presents an image as being composed of the std::exp() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkExpNegativeImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkExpNegativeImageAdaptor.h
index a75bce3..ac36228 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkExpNegativeImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkExpNegativeImageAdaptor.h
@@ -26,7 +26,7 @@ namespace itk
 namespace Accessor
 {
 /** \class ExpNegativePixelAccessor
- * \brief Give access to the vcl_exp() function of a value
+ * \brief Give access to the std::exp() function of a value
  *
  * ExpNegativePixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -49,15 +49,15 @@ public:
   typedef TInternalType InternalType;
 
   static inline void Set(TInternalType & output, const TExternalType & input)
-  { output = static_cast< TInternalType >( vcl_exp( -static_cast< double >( input ) ) ); }
+  { output = static_cast< TInternalType >( std::exp( -static_cast< double >( input ) ) ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return static_cast< TExternalType >( vcl_exp( -static_cast< double >( input ) ) ); }
+  { return static_cast< TExternalType >( std::exp( -static_cast< double >( input ) ) ); }
 };
 } // end namespace Accessor
 
 /** \class ExpNegativeImageAdaptor
- * \brief Presents an image as being composed of the vcl_exp() of its pixels
+ * \brief Presents an image as being composed of the std::exp() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h
index 720cfd0..98bc573 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h
@@ -187,10 +187,7 @@ public:
   virtual const RegionType & GetBufferedRegion() const;
 
   /** Allocate the image memory. Dimension and Size must be set a priori. */
-  inline void Allocate()
-  {
-    m_Image->Allocate();
-  }
+  virtual void Allocate(bool initialize = false) ITK_OVERRIDE;
 
   /** Restore the data object to its initial state. This means releasing
    * memory. */
@@ -316,8 +313,7 @@ public:
 
   virtual void SetRequestedRegionToLargestPossibleRegion();
 
-  virtual void PropagateRequestedRegion()
-  throw ( InvalidRequestedRegionError );
+  virtual void PropagateRequestedRegion();
 
   virtual void UpdateOutputData();
 
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx
index 48f48c4..b75c7b4 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx
@@ -45,6 +45,13 @@ ImageAdaptor< TImage, TAccessor >
 ::~ImageAdaptor()
 {}
 
+template< typename TImage, typename TAccessor >
+void
+ImageAdaptor< TImage, TAccessor >
+::Allocate(bool initialize)
+{
+  m_Image->Allocate(initialize);
+}
 //----------------------------------------------------------------------------
 template< typename TImage, typename TAccessor >
 void
@@ -185,7 +192,6 @@ template< typename TImage, typename TAccessor >
 void
 ImageAdaptor< TImage, TAccessor >
 ::PropagateRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' method first, then delegate
   Superclass::PropagateRequestedRegion();
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkLog10ImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkLog10ImageAdaptor.h
index f24702c..c39c02c 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkLog10ImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkLog10ImageAdaptor.h
@@ -26,7 +26,7 @@ namespace itk
 namespace Accessor
 {
 /** \class Log10PixelAccessor
- * \brief Give access to the vcl_log10() function of a value
+ * \brief Give access to the std::log10() function of a value
  *
  * Log10PixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -50,15 +50,15 @@ public:
   typedef TInternalType InternalType;
 
   static inline void Set(TInternalType & output, const TExternalType & input)
-  { output = (TInternalType)vcl_log10( (double)input ); }
+  { output = (TInternalType)std::log10( (double)input ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return (TExternalType)vcl_log10( (double)input ); }
+  { return (TExternalType)std::log10( (double)input ); }
 };
 } // end namespace Accessor
 
 /** \class Log10ImageAdaptor
- * \brief Presents an image as being composed of the vcl_log10() of its pixels
+ * \brief Presents an image as being composed of the std::log10() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkLogImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkLogImageAdaptor.h
index 65e9259..d2cd6a3 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkLogImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkLogImageAdaptor.h
@@ -26,7 +26,7 @@ namespace itk
 namespace Accessor
 {
 /** \class LogPixelAccessor
- * \brief Give access to the vcl_log() function of a value
+ * \brief Give access to the std::log() function of a value
  *
  * LogPixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -50,15 +50,15 @@ public:
   typedef TInternalType InternalType;
 
   static inline void Set(TInternalType & output, const TExternalType & input)
-  { output = (TInternalType)vcl_log( (double)input ); }
+  { output = (TInternalType)std::log( (double)input ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return (TExternalType)vcl_log( (double)input ); }
+  { return (TExternalType)std::log( (double)input ); }
 };
 } // end namespace Accessor
 
 /** \class LogImageAdaptor
- * \brief Presents an image as being composed of the vcl_log() of its pixels
+ * \brief Presents an image as being composed of the std::log() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkSinImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkSinImageAdaptor.h
index 2b6e86a..9265330 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkSinImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkSinImageAdaptor.h
@@ -26,7 +26,7 @@ namespace itk
 namespace Accessor
 {
 /** \class SinPixelAccessor
- * \brief Give access to the vcl_sin() function of a value
+ * \brief Give access to the std::sin() function of a value
  *
  * SinPixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -49,15 +49,15 @@ public:
   typedef TInternalType InternalType;
 
   static inline void Set(TInternalType & output, const TExternalType & input)
-  { output = (TInternalType)vcl_sin( (double)input ); }
+  { output = (TInternalType)std::sin( (double)input ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return (TExternalType)vcl_sin( (double)input ); }
+  { return (TExternalType)std::sin( (double)input ); }
 };
 } // end namespace Accessor
 
 /** \class SinImageAdaptor
- * \brief Presents an image as being composed of the vcl_sin() of its pixels
+ * \brief Presents an image as being composed of the std::sin() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkSqrtImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkSqrtImageAdaptor.h
index 6e8a5b2..41b137f 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkSqrtImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkSqrtImageAdaptor.h
@@ -26,7 +26,7 @@ namespace itk
 namespace Accessor
 {
 /** \class SqrtPixelAccessor
- * \brief Give access to the vcl_sqrt() function of a value
+ * \brief Give access to the std::sqrt() function of a value
  *
  * SqrtPixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -49,15 +49,15 @@ public:
   typedef TInternalType InternalType;
 
   static inline void Set(TInternalType & output, const TExternalType & input)
-  { output = (TInternalType)vcl_sqrt( (double)input ); }
+  { output = (TInternalType)std::sqrt( (double)input ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return (TExternalType)vcl_sqrt( (double)input ); }
+  { return (TExternalType)std::sqrt( (double)input ); }
 };
 } // end namespace Accessor
 
 /** \class SqrtImageAdaptor
- * \brief Presents an image as being composed of the vcl_sqrt() of its pixels
+ * \brief Presents an image as being composed of the std::sqrt() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkTanImageAdaptor.h b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkTanImageAdaptor.h
index 7770aeb..c7d994a 100644
--- a/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkTanImageAdaptor.h
+++ b/Utilities/ITK/Modules/Core/ImageAdaptors/include/itkTanImageAdaptor.h
@@ -26,7 +26,7 @@ namespace itk
 namespace Accessor
 {
 /** \class TanPixelAccessor
- * \brief Give access to the vcl_tan() function of a value
+ * \brief Give access to the std::tan() function of a value
  *
  * TanPixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
@@ -49,15 +49,15 @@ public:
   typedef TInternalType InternalType;
 
   static inline void Set(TInternalType & output, const TExternalType & input)
-  { output = (TInternalType)vcl_tan( (double)input ); }
+  { output = (TInternalType)std::tan( (double)input ); }
 
   static inline TExternalType Get(const TInternalType & input)
-  { return (TExternalType)vcl_tan( (double)input ); }
+  { return (TExternalType)std::tan( (double)input ); }
 };
 } // end namespace Accessor
 
 /** \class TanImageAdaptor
- * \brief Presents an image as being composed of the vcl_tan() of its pixels
+ * \brief Presents an image as being composed of the std::tan() of its pixels
  *
  * Additional casting is performed according to the input and output image
  * types following C++ default casting rules.
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx
index cbfc53a..e94ec20 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineDecompositionImageFilter.hxx
@@ -140,7 +140,7 @@ BSplineDecompositionImageFilter< TInputImage, TOutputImage >
     {
     case 3:
       m_NumberOfPoles = 1;
-      m_SplinePoles[0] = vcl_sqrt(3.0) - 2.0;
+      m_SplinePoles[0] = std::sqrt(3.0) - 2.0;
       break;
     case 0:
       m_NumberOfPoles = 0;
@@ -150,18 +150,18 @@ BSplineDecompositionImageFilter< TInputImage, TOutputImage >
       break;
     case 2:
       m_NumberOfPoles = 1;
-      m_SplinePoles[0] = vcl_sqrt(8.0) - 3.0;
+      m_SplinePoles[0] = std::sqrt(8.0) - 3.0;
       break;
     case 4:
       m_NumberOfPoles = 2;
-      m_SplinePoles[0] = vcl_sqrt( 664.0 - vcl_sqrt(438976.0) ) + vcl_sqrt(304.0) - 19.0;
-      m_SplinePoles[1] = vcl_sqrt( 664.0 + vcl_sqrt(438976.0) ) - vcl_sqrt(304.0) - 19.0;
+      m_SplinePoles[0] = std::sqrt( 664.0 - std::sqrt(438976.0) ) + std::sqrt(304.0) - 19.0;
+      m_SplinePoles[1] = std::sqrt( 664.0 + std::sqrt(438976.0) ) - std::sqrt(304.0) - 19.0;
       break;
     case 5:
       m_NumberOfPoles = 2;
-      m_SplinePoles[0] = vcl_sqrt( 135.0 / 2.0 - vcl_sqrt(17745.0 / 4.0) ) + vcl_sqrt(105.0 / 4.0)
+      m_SplinePoles[0] = std::sqrt( 135.0 / 2.0 - std::sqrt(17745.0 / 4.0) ) + std::sqrt(105.0 / 4.0)
                          - 13.0 / 2.0;
-      m_SplinePoles[1] = vcl_sqrt( 135.0 / 2.0 + vcl_sqrt(17745.0 / 4.0) ) - vcl_sqrt(105.0 / 4.0)
+      m_SplinePoles[1] = std::sqrt( 135.0 / 2.0 + std::sqrt(17745.0 / 4.0) ) - std::sqrt(105.0 / 4.0)
                          - 13.0 / 2.0;
       break;
     default:
@@ -191,7 +191,7 @@ BSplineDecompositionImageFilter< TInputImage, TOutputImage >
   if ( m_Tolerance > 0.0 )
     {
     horizon = (typename TInputImage::SizeValueType)
-      vcl_ceil( vcl_log(m_Tolerance) / vcl_log( vcl_fabs(z) ) );
+      std::ceil( std::log(m_Tolerance) / std::log( std::fabs(z) ) );
     }
   if ( horizon < m_DataLength[m_IteratorDirection] )
     {
@@ -208,7 +208,7 @@ BSplineDecompositionImageFilter< TInputImage, TOutputImage >
     {
     /* full loop */
     iz = 1.0 / z;
-    z2n = vcl_pow( z, (double)( m_DataLength[m_IteratorDirection] - 1L ) );
+    z2n = std::pow( z, (double)( m_DataLength[m_IteratorDirection] - 1L ) );
     sum = m_Scratch[0] + z2n * m_Scratch[m_DataLength[m_IteratorDirection] - 1L];
     z2n *= z2n * iz;
     for ( unsigned int n = 1; n <= ( m_DataLength[m_IteratorDirection] - 2 ); n++ )
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h b/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h
index ebb8228..8253505 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h
@@ -152,13 +152,13 @@ public:
   }
 
   virtual OutputType Evaluate(const PointType & point,
-                              ThreadIdType threadID) const
+                              ThreadIdType threadId) const
   {
     ContinuousIndexType index;
 
     this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point,
                                                                    index);
-    return ( this->EvaluateAtContinuousIndex(index, threadID) );
+    return ( this->EvaluateAtContinuousIndex(index, threadId) );
   }
 
   virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &
@@ -178,7 +178,7 @@ public:
 
   virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &
                                                index,
-                                               ThreadIdType threadID) const;
+                                               ThreadIdType threadId) const;
 
   CovariantVectorType EvaluateDerivative(const PointType & point) const
   {
@@ -191,13 +191,13 @@ public:
   }
 
   CovariantVectorType EvaluateDerivative(const PointType & point,
-                                         ThreadIdType threadID) const
+                                         ThreadIdType threadId) const
   {
     ContinuousIndexType index;
 
     this->GetInputImage()->TransformPhysicalPointToContinuousIndex(point,
                                                                    index);
-    return ( this->EvaluateDerivativeAtContinuousIndex(index, threadID) );
+    return ( this->EvaluateDerivativeAtContinuousIndex(index, threadId) );
   }
 
   CovariantVectorType EvaluateDerivativeAtContinuousIndex(
@@ -222,7 +222,7 @@ public:
 
   CovariantVectorType EvaluateDerivativeAtContinuousIndex(
     const ContinuousIndexType & x,
-    ThreadIdType threadID) const;
+    ThreadIdType threadId) const;
 
   void EvaluateValueAndDerivative(const PointType & point,
                                   OutputType & value,
@@ -242,7 +242,7 @@ public:
   void EvaluateValueAndDerivative(const PointType & point,
                                   OutputType & value,
                                   CovariantVectorType & deriv,
-                                  ThreadIdType threadID) const
+                                  ThreadIdType threadId) const
   {
     ContinuousIndexType index;
 
@@ -251,7 +251,7 @@ public:
     this->EvaluateValueAndDerivativeAtContinuousIndex(index,
                                                       value,
                                                       deriv,
-                                                      threadID);
+                                                      threadId);
   }
 
   void EvaluateValueAndDerivativeAtContinuousIndex(
@@ -283,7 +283,7 @@ public:
     const ContinuousIndexType & x,
     OutputType & value,
     CovariantVectorType & deriv,
-    ThreadIdType threadID) const;
+    ThreadIdType threadId) const;
 
   /** Get/Sets the Spline Order, supports 0th - 5th order splines. The default
    *  is a 3rd order spline. */
@@ -315,19 +315,19 @@ public:
 protected:
 
   /** The following methods take working space (evaluateIndex, weights, weightsDerivative)
-   *  that is managed by the caller. If threadID is known, the working variables are looked
-   *  up in the thread indexed arrays. If threadID is not known, working variables are made
+   *  that is managed by the caller. If threadId is known, the working variables are looked
+   *  up in the thread indexed arrays. If threadId is not known, working variables are made
    *  on the stack and passed to these methods. The stack allocation should be ok since
    *  these methods do not store the working variables, i.e. they are not expected to
    *  be available beyond the scope of the function call.
    *
    *  This was done to allow for two types of re-entrancy. The first is when a threaded
    *  filter, e.g. InterpolateImagePointsFilter calls EvaluateAtContinuousIndex from multiple
-   *  threads without passing a threadID. So, EvaluateAtContinuousIndex must be thread safe.
+   *  threads without passing a threadId. So, EvaluateAtContinuousIndex must be thread safe.
    *  This is handled with the stack-based allocation of the working space.
    *
    *  The second form of re-entrancy involves methods that call EvaluateAtContinuousIndex
-   *  from multiple threads, but pass a threadID. In this case, we can gain a little efficiency
+   *  from multiple threads, but pass a threadId. In this case, we can gain a little efficiency
    *  (hopefully) by looking up pre-allocated working space in arrays that are indexed by thread.
    *  The efficiency gain is likely dependent on the size of the working variables, which are
    *  in-turn dependent on the dimensionality of the image and the order of the spline.
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx
index e07a750..cc4a416 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.hxx
@@ -47,9 +47,9 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
 ::BSplineInterpolateImageFunction()
 {
   m_NumberOfThreads = 1;
-  m_ThreadedEvaluateIndex = NULL;
-  m_ThreadedWeights = NULL;
-  m_ThreadedWeightsDerivative = NULL;
+  m_ThreadedEvaluateIndex = ITK_NULLPTR;
+  m_ThreadedWeights = ITK_NULLPTR;
+  m_ThreadedWeightsDerivative = ITK_NULLPTR;
 
   m_CoefficientFilter = CoefficientFilter::New();
   m_Coefficients = CoefficientImageType::New();
@@ -65,13 +65,13 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
 ::~BSplineInterpolateImageFunction()
 {
   delete[] m_ThreadedEvaluateIndex;
-  m_ThreadedEvaluateIndex = NULL;
+  m_ThreadedEvaluateIndex = ITK_NULLPTR;
 
   delete[] m_ThreadedWeights;
-  m_ThreadedWeights = NULL;
+  m_ThreadedWeights = ITK_NULLPTR;
 
   delete[] m_ThreadedWeightsDerivative;
-  m_ThreadedWeightsDerivative = NULL;
+  m_ThreadedWeightsDerivative = ITK_NULLPTR;
 }
 
 /**
@@ -111,7 +111,7 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
     }
   else
     {
-    m_Coefficients = NULL;
+    m_Coefficients = ITK_NULLPTR;
     }
 }
 
@@ -151,12 +151,12 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
 ::OutputType
 BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
 ::EvaluateAtContinuousIndex(const ContinuousIndexType & x,
-                            ThreadIdType threadID) const
+                            ThreadIdType threadId) const
 {
 // FIXME -- Review this "fix" and ensure it works.
 #if 1
-  vnl_matrix< long > *  evaluateIndex = &( m_ThreadedEvaluateIndex[threadID] );
-  vnl_matrix< double > *weights = &( m_ThreadedWeights[threadID] );
+  vnl_matrix< long > *  evaluateIndex = &( m_ThreadedEvaluateIndex[threadId] );
+  vnl_matrix< double > *weights = &( m_ThreadedWeights[threadId] );
   // Pass evaluateIndex, weights by reference. Different threadIDs get
   // different instances.
   return this->EvaluateAtContinuousIndexInternal(x, *evaluateIndex, *weights);
@@ -164,14 +164,14 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
   // FIXME - Should copy matrices to the stack for thread safety.
   // This method is being called by multiple threads through
   // EvaluateAtContinuousIndex( const ContinuousIndexType & x).
-  // When that method delegates here, it passes threadID = 0.
+  // When that method delegates here, it passes threadId = 0.
   // This causes problems because multiple threads end up writing
   // on the same matrices.
   // Other methods will probably be affected by the same issue. For
   // example EvaluateDerivativeAtContinuousIndex and
   // EvaluateValueAndDerivativeAtContinuousIndex.
-  vnl_matrix< long >   evaluateIndex = ( m_ThreadedEvaluateIndex[threadID] );
-  vnl_matrix< double > weights = ( m_ThreadedWeights[threadID] );
+  vnl_matrix< long >   evaluateIndex = ( m_ThreadedEvaluateIndex[threadId] );
+  vnl_matrix< double > weights = ( m_ThreadedWeights[threadId] );
 
   // compute the interpolation indexes
   this->DetermineRegionOfSupport( ( evaluateIndex ), x, m_SplineOrder );
@@ -208,14 +208,14 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
 ::CovariantVectorType
 BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
 ::EvaluateDerivativeAtContinuousIndex(const ContinuousIndexType & x,
-                                      ThreadIdType threadID) const
+                                      ThreadIdType threadId) const
 {
 // FIXME -- Review this "fix" and ensure it works.
 #if 1
-  vnl_matrix< long > *  evaluateIndex =   &( m_ThreadedEvaluateIndex[threadID] );
-  vnl_matrix< double > *weights =       &( m_ThreadedWeights[threadID] );
+  vnl_matrix< long > *  evaluateIndex =   &( m_ThreadedEvaluateIndex[threadId] );
+  vnl_matrix< double > *weights =       &( m_ThreadedWeights[threadId] );
   vnl_matrix< double > *weightsDerivative =
-    &( m_ThreadedWeightsDerivative[threadID] );
+    &( m_ThreadedWeightsDerivative[threadId] );
 
   return this->EvaluateDerivativeAtContinuousIndexInternal(x,
                                                            *evaluateIndex,
@@ -223,10 +223,10 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
                                                            *weightsDerivative);
 
 #else
-  vnl_matrix< long > *  evaluateIndex =   &( m_ThreadedEvaluateIndex[threadID] );
-  vnl_matrix< double > *weights =       &( m_ThreadedWeights[threadID] );
+  vnl_matrix< long > *  evaluateIndex =   &( m_ThreadedEvaluateIndex[threadId] );
+  vnl_matrix< double > *weights =       &( m_ThreadedWeights[threadId] );
   vnl_matrix< double > *weightsDerivative =
-    &( m_ThreadedWeightsDerivative[threadID] );
+    &( m_ThreadedWeightsDerivative[threadId] );
 
   this->DetermineRegionOfSupport( ( *evaluateIndex ), x, m_SplineOrder );
 
@@ -290,14 +290,14 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
 ::EvaluateValueAndDerivativeAtContinuousIndex(const ContinuousIndexType & x,
                                               OutputType & value,
                                               CovariantVectorType & derivativeValue,
-                                              ThreadIdType threadID) const
+                                              ThreadIdType threadId) const
 {
 // FIXME -- Review this "fix" and ensure it works.
 #if 1
-  vnl_matrix< long > *  evaluateIndex =   &( m_ThreadedEvaluateIndex[threadID] );
-  vnl_matrix< double > *weights =       &( m_ThreadedWeights[threadID] );
+  vnl_matrix< long > *  evaluateIndex =   &( m_ThreadedEvaluateIndex[threadId] );
+  vnl_matrix< double > *weights =       &( m_ThreadedWeights[threadId] );
   vnl_matrix< double > *weightsDerivative =
-    &( m_ThreadedWeightsDerivative[threadID] );
+    &( m_ThreadedWeightsDerivative[threadId] );
 
   this->EvaluateValueAndDerivativeAtContinuousIndexInternal(x,
                                                             value,
@@ -306,10 +306,10 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
                                                             *weights,
                                                             *weightsDerivative);
 #else
-  vnl_matrix< long > *  evaluateIndex =   &( m_ThreadedEvaluateIndex[threadID] );
-  vnl_matrix< double > *weights =       &( m_ThreadedWeights[threadID] );
+  vnl_matrix< long > *  evaluateIndex =   &( m_ThreadedEvaluateIndex[threadId] );
+  vnl_matrix< double > *weights =       &( m_ThreadedWeights[threadId] );
   vnl_matrix< double > *weightsDerivative =
-    &( m_ThreadedWeightsDerivative[threadID] );
+    &( m_ThreadedWeightsDerivative[threadId] );
 
   this->DetermineRegionOfSupport( ( *evaluateIndex ), x, m_SplineOrder );
 
@@ -667,7 +667,7 @@ BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >
   const float halfOffset = splineOrder & 1 ? 0.0 : 0.5;
   for ( unsigned int n = 0; n < ImageDimension; n++ )
     {
-    long indx = (long)vcl_floor( (float)x[n] + halfOffset ) - splineOrder / 2;
+    long indx = (long)std::floor( (float)x[n] + halfOffset ) - splineOrder / 2;
     for ( unsigned int k = 0; k <= splineOrder; k++ )
       {
       evaluateIndex[n][k] = indx++;
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx
index ad4b118..8ca0ead 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx
@@ -54,7 +54,7 @@ CentralDifferenceImageFunction< TInputImage, TCoordRep, TOutputType >
     // Verify the output vector is the right size.
     // OutputType of VariablelengthVector will have size 0 until allocated, so this
     // case can't be tested.
-    if( inputData != NULL )
+    if( inputData != ITK_NULLPTR )
     {
       SizeValueType nComponents = OutputConvertType::GetNumberOfComponents();
       if( nComponents > 0 )
@@ -81,7 +81,7 @@ CentralDifferenceImageFunction< TInputImage, TCoordRep, TOutputType >
   if ( interpolator != this->m_Interpolator )
     {
     this->m_Interpolator = interpolator;
-    if( this->GetInputImage() != NULL )
+    if( this->GetInputImage() != ITK_NULLPTR )
       {
       this->m_Interpolator->SetInputImage( this->GetInputImage() );
       }
@@ -286,7 +286,6 @@ CentralDifferenceImageFunction< TInputImage, TCoordRep, TOutputType >
 {
   typedef typename PointType::ValueType           PointValueType;
   typedef typename OutputType::ValueType          DerivativeValueType;
-  typedef typename ContinuousIndexType::ValueType ContinuousIndexValueType;
 
   PointType neighPoint1 = point;
   PointType neighPoint2 = point;
@@ -354,8 +353,6 @@ CentralDifferenceImageFunction< TInputImage, TCoordRep, TOutputType >
 ::EvaluateSpecialized(const PointType & point, OutputType & derivative, OutputTypeSpecializationStructType<Type>) const
 {
   typedef typename PointType::ValueType           PointValueType;
-  typedef typename OutputType::ValueType          DerivativeValueType;
-  typedef typename ContinuousIndexType::ValueType ContinuousIndexValueType;
 
   const InputImageType *inputImage = this->GetInputImage();
   const unsigned int numberComponents = inputImage->GetNumberOfComponentsPerPixel();
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.hxx
index cdc41f3..9daeedb 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.hxx
@@ -222,8 +222,7 @@ GaussianBlurImageFunction< TInputImage, TOutput >
   typename InternalImageType::RegionType region;
   region.SetSize(size);
   m_InternalImage->SetRegions(region);
-  m_InternalImage->Allocate();
-  m_InternalImage->FillBuffer(0);
+  m_InternalImage->Allocate(true); // initialize buffer to zero
 }
 
 /** Evaluate the function at the specifed point */
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx
index 96e3f50..424476d 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx
@@ -284,7 +284,8 @@ GaussianDerivativeImageFunction< TInputImage, TOutput >
   for ( unsigned int ii = 0; ii < itkGetStaticConstMacro(ImageDimension2); ++ii )
     {
     // Apply each gaussian kernel to a subset of the image
-    InputPixelType value = static_cast< double >( this->GetInputImage()->GetPixel(index) );
+    typedef typename OutputType::RealValueType OutputRealValueType;
+    OutputRealValueType value = static_cast< OutputRealValueType >( this->GetInputImage()->GetPixel(index) );
 
     // gaussian blurring first
     for ( unsigned int direction = 0; direction < itkGetStaticConstMacro(ImageDimension2); ++direction )
@@ -308,7 +309,7 @@ GaussianDerivativeImageFunction< TInputImage, TOutput >
     m_OperatorImageFunction->SetOperator(m_OperatorArray[idx]);
     value = m_OperatorImageFunction->EvaluateAtIndex(index) + centerval * value;
 
-    gradient[ii] = value;
+    gradient[ii] = static_cast< typename OutputType::ComponentType >( value );
     }
 
   return gradient;
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h b/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h
index e33cedc..1f95992 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.h
@@ -150,7 +150,7 @@ public:
   virtual OutputType EvaluateAtContinuousIndex(
     const ContinuousIndexType & cindex ) const
     {
-    return this->EvaluateAtContinuousIndex( cindex, NULL );
+    return this->EvaluateAtContinuousIndex( cindex, ITK_NULLPTR );
     }
 
 protected:
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx
index d4b9028..fc23341 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx
@@ -111,9 +111,9 @@ GaussianInterpolateImageFunction<TImageType, TCoordRep>
     {
     int boundingBoxSize = static_cast<int>(
       this->m_BoundingBoxEnd[d] - this->m_BoundingBoxStart[d] + 0.5 );
-    int begin = vnl_math_max( 0, static_cast<int>( vcl_floor( cindex[d] -
+    int begin = vnl_math_max( 0, static_cast<int>( std::floor( cindex[d] -
       this->m_BoundingBoxStart[d] - this->m_CutoffDistance[d] ) ) );
-    int end = vnl_math_min( boundingBoxSize, static_cast<int>( vcl_ceil(
+    int end = vnl_math_min( boundingBoxSize, static_cast<int>( std::ceil(
       cindex[d] - this->m_BoundingBoxStart[d] + this->m_CutoffDistance[d] ) ) );
     region.SetIndex( d, begin );
     region.SetSize( d, end - begin );
@@ -189,10 +189,10 @@ GaussianInterpolateImageFunction<TImageType, TCoordRep>
   int boundingBoxSize = static_cast<int>(
     this->m_BoundingBoxEnd[dimension] - this->m_BoundingBoxStart[dimension] +
     0.5 );
-  int begin = vnl_math_max( 0, static_cast<int>( vcl_floor( cindex -
+  int begin = vnl_math_max( 0, static_cast<int>( std::floor( cindex -
     this->m_BoundingBoxStart[dimension] -
     this->m_CutoffDistance[dimension] ) ) );
-  int end = vnl_math_min( boundingBoxSize, static_cast<int>( vcl_ceil( cindex -
+  int end = vnl_math_min( boundingBoxSize, static_cast<int>( std::ceil( cindex -
     this->m_BoundingBoxStart[dimension] +
     this->m_CutoffDistance[dimension] ) ) );
 
@@ -206,7 +206,7 @@ GaussianInterpolateImageFunction<TImageType, TCoordRep>
   RealType g_last = 0.0;
   if( evaluateGradient )
     {
-    g_last = vnl_math::two_over_sqrtpi * vcl_exp( -vnl_math_sqr( t ) );
+    g_last = vnl_math::two_over_sqrtpi * std::exp( -vnl_math_sqr( t ) );
     }
 
   for( int i = begin; i < end; i++ )
@@ -216,7 +216,7 @@ GaussianInterpolateImageFunction<TImageType, TCoordRep>
     erfArray[i] = e_now - e_last;
     if( evaluateGradient )
       {
-      RealType g_now = vnl_math::two_over_sqrtpi * vcl_exp( -vnl_math_sqr( t ) );
+      RealType g_now = vnl_math::two_over_sqrtpi * std::exp( -vnl_math_sqr( t ) );
       gerfArray[i] = g_now - g_last;
       g_last = g_now;
       }
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkImageFunction.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkImageFunction.hxx
index d00e5de..6ffe2ca 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkImageFunction.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkImageFunction.hxx
@@ -29,7 +29,7 @@ template< typename TInputImage, typename TOutput, typename TCoordRep >
 ImageFunction< TInputImage, TOutput, TCoordRep >
 ::ImageFunction()
 {
-  m_Image = NULL;
+  m_Image = ITK_NULLPTR;
   m_StartIndex.Fill(0);
   m_EndIndex.Fill(0);
   m_StartContinuousIndex.Fill(0.0f);
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.h b/Utilities/ITK/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.h
index 9694f2c..d38ea35 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.h
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.h
@@ -104,7 +104,7 @@ public:
   virtual OutputType EvaluateAtContinuousIndex(
     const ContinuousIndexType & cindex ) const
     {
-    return this->EvaluateAtContinuousIndex( cindex, NULL );
+    return this->EvaluateAtContinuousIndex( cindex, ITK_NULLPTR );
     }
 
 protected:
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.hxx
index 9cd3103..ff642a0 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkLabelImageGaussianInterpolateImageFunction.hxx
@@ -57,9 +57,9 @@ LabelImageGaussianInterpolateImageFunction<TInputImage, TCoordRep, TPixelCompare
     {
     const int boundingBoxSize = static_cast<int>(
       this->m_BoundingBoxEnd[d] - this->m_BoundingBoxStart[d] + 0.5 );
-    const int begin = vnl_math_max( 0, static_cast<int>( vcl_floor( cindex[d] -
+    const int begin = vnl_math_max( 0, static_cast<int>( std::floor( cindex[d] -
       this->m_BoundingBoxStart[d] - this->m_CutoffDistance[d] ) ) );
-    const int end = vnl_math_min( boundingBoxSize, static_cast<int>( vcl_ceil(
+    const int end = vnl_math_min( boundingBoxSize, static_cast<int>( std::ceil(
       cindex[d] - this->m_BoundingBoxStart[d] + this->m_CutoffDistance[d] ) ) );
     region.SetIndex( d, begin );
     region.SetSize( d, end - begin );
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h b/Utilities/ITK/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h
index 8f020fd..f7ce7e4 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.h
@@ -19,6 +19,7 @@
 #define __itkLinearInterpolateImageFunction_h
 
 #include "itkInterpolateImageFunction.h"
+#include "itkVariableLengthVector.h"
 
 namespace itk
 {
@@ -495,6 +496,32 @@ private:
 
   virtual inline OutputType EvaluateUnoptimized(
     const ContinuousIndexType & index) const;
+
+  /** \brief A method to generically set all components to zero
+   */
+  template<typename RealTypeScalarRealType>
+    void
+    MakeZeroInitializer(const TInputImage * const inputImagePtr,
+      VariableLengthVector<RealTypeScalarRealType> & tempZeros) const
+      {
+      // Variable length vector version to get the size of the pixel correct.
+      typename TInputImage::IndexType idx;
+      idx.Fill(0);
+      const typename TInputImage::PixelType & tempPixel = inputImagePtr->GetPixel(idx);
+      const unsigned int sizeOfVarLengthVector = tempPixel.GetSize();
+      tempZeros.SetSize(sizeOfVarLengthVector);
+      tempZeros.Fill(NumericTraits< RealTypeScalarRealType >::ZeroValue());
+      }
+
+  template<typename RealTypeScalarRealType>
+    void
+    MakeZeroInitializer(const TInputImage * const itkNotUsed( inputImagePtr ),
+      RealTypeScalarRealType & tempZeros) const
+      {
+      // All other cases
+      tempZeros = NumericTraits< RealTypeScalarRealType >::ZeroValue();
+      }
+
 };
 } // end namespace itk
 
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx
index d087a26..f15a8a3 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx
@@ -18,6 +18,7 @@
 #ifndef __itkLinearInterpolateImageFunction_hxx
 #define __itkLinearInterpolateImageFunction_hxx
 
+#include "itkConceptChecking.h"
 #include "itkLinearInterpolateImageFunction.h"
 
 #include "vnl/vnl_math.h"
@@ -56,6 +57,7 @@ LinearInterpolateImageFunction< TInputImage, TCoordRep >
   this->Superclass::PrintSelf(os, indent);
 }
 
+
 /**
  * Evaluate at image index position
  */
@@ -65,16 +67,16 @@ typename LinearInterpolateImageFunction< TInputImage, TCoordRep >
 LinearInterpolateImageFunction< TInputImage, TCoordRep >
 ::EvaluateUnoptimized(const ContinuousIndexType & index) const
 {
-  unsigned int dim;  // index over dimension
-
+  // Avoid the smartpointer de-reference in the loop for
+  // "return m_InputImage.GetPointer()"
+  const TInputImage * const inputImagePtr = this->GetInputImage();
   /**
    * Compute base index = closet index below point
    * Compute distance from point to base index
    */
   IndexType baseIndex;
   InternalComputationType    distance[ImageDimension];
-
-  for ( dim = 0; dim < ImageDimension; dim++ )
+  for ( unsigned int dim = 0; dim < ImageDimension; ++dim )
     {
     baseIndex[dim] = Math::Floor< IndexValueType >(index[dim]);
     distance[dim] = index[dim] - static_cast< InternalComputationType >( baseIndex[dim] );
@@ -87,26 +89,28 @@ LinearInterpolateImageFunction< TInputImage, TCoordRep >
    */
   // When RealType is VariableLengthVector, 'value' will be resized properly
   // below when it's assigned again.
-  typedef typename NumericTraits< RealType >::ScalarRealType RealTypeScalarRealType;
+  Concept::Detail::UniqueType< typename NumericTraits< RealType >::ScalarRealType >();
+
   RealType value;
-  value = NumericTraits< RealTypeScalarRealType >::Zero;
+  // Initialize variable "value" with overloaded function so that
+  // in the case of variable length vectors the "value" is initialized
+  // to all zeros of length equal to the InputImagePtr first pixel length.
+  this->MakeZeroInitializer( inputImagePtr, value );
 
-  typedef typename NumericTraits< InputPixelType >::ScalarRealType InputPixelScalarRealType;
-  InputPixelScalarRealType totalOverlap = NumericTraits< InputPixelScalarRealType >::Zero;
-  bool firstOverlap = true;
+  Concept::Detail::UniqueType< typename NumericTraits< InputPixelType >::ScalarRealType >();
 
   for ( unsigned int counter = 0; counter < m_Neighbors; ++counter )
     {
-    InternalComputationType       overlap = 1.0;    // fraction overlap
+    InternalComputationType overlap = 1.0;    // fraction overlap
     unsigned int upper = counter;  // each bit indicates upper/lower neighbour
-    IndexType    neighIndex;
+    IndexType    neighIndex( baseIndex );
 
     // get neighbor index and overlap fraction
-    for ( dim = 0; dim < ImageDimension; dim++ )
+    for ( unsigned int dim = 0; dim < ImageDimension; ++dim )
       {
       if ( upper & 1 )
         {
-        neighIndex[dim] = baseIndex[dim] + 1;
+        ++(neighIndex[dim]);
         // Take care of the case where the pixel is just
         // in the outer upper boundary of the image grid.
         if ( neighIndex[dim] > this->m_EndIndex[dim] )
@@ -117,7 +121,6 @@ LinearInterpolateImageFunction< TInputImage, TCoordRep >
         }
       else
         {
-        neighIndex[dim] = baseIndex[dim];
         // Take care of the case where the pixel is just
         // in the outer lower boundary of the image grid.
         if ( neighIndex[dim] < this->m_StartIndex[dim] )
@@ -129,32 +132,7 @@ LinearInterpolateImageFunction< TInputImage, TCoordRep >
 
       upper >>= 1;
       }
-
-    // Update output value only if overlap is not zero.
-    // Overlap can be 0 when one or more index dims is an integer.
-    // There will always be at least one iteration of 'counter' loop
-    // that has overlap > 0, even if index is out of bounds.
-    if ( overlap )
-      {
-      if( firstOverlap )
-        {
-        // Performing the first assignment of value like this allows
-        // VariableLengthVector type to be resized properly.
-        value = static_cast< RealType >( this->GetInputImage()->GetPixel(neighIndex) ) * overlap;
-        firstOverlap = false;
-        }
-      else
-        {
-        value += static_cast< RealType >( this->GetInputImage()->GetPixel(neighIndex) ) * overlap;
-        }
-      totalOverlap += overlap;
-      }
-
-    if ( totalOverlap == 1.0 )
-      {
-      // finished
-      break;
-      }
+      value += static_cast< RealType >( inputImagePtr->GetPixel(neighIndex) ) * overlap;
     }
 
   return ( static_cast< OutputType >( value ) );
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.hxx
index be8d2c0..0e4e880 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkMahalanobisDistanceThresholdImageFunction.hxx
@@ -143,14 +143,14 @@ MahalanobisDistanceThresholdImageFunction< TInputImage, TCoordRep >
   // Deal with cases that are barely negative.
   // In theory they should never appear, but
   // they may happen and would produce NaNs
-  // in the vcl_sqrt
+  // in the std::sqrt
   if ( mahalanobisDistanceSquared < 0.0 )
     {
     mahalanobisDistance = 0.0;
     }
   else
     {
-    mahalanobisDistance = vcl_sqrt(mahalanobisDistanceSquared);
+    mahalanobisDistance = std::sqrt(mahalanobisDistanceSquared);
     }
 
   return mahalanobisDistance;
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx
index 9ce9866..596def1 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx
@@ -107,7 +107,7 @@ public:
 
     if ( m_ValidRay )
       {
-      return vcl_sqrt(m_VoxelIncrement[0] * spacing[0] * m_VoxelIncrement[0] * spacing[0]
+      return std::sqrt(m_VoxelIncrement[0] * spacing[0] * m_VoxelIncrement[0] * spacing[0]
                       + m_VoxelIncrement[1] * spacing[1] * m_VoxelIncrement[1] * spacing[1]
                       + m_VoxelIncrement[2] * spacing[2] * m_VoxelIncrement[2] * spacing[2]);
       }
@@ -432,10 +432,10 @@ RayCastHelper< TInputImage, TCoordRep >
              + C * m_BoundingCorner[c1][2] );
 
     // initialise plane value and normalise
-    m_BoundingPlane[j][0] = A / vcl_sqrt(A * A + B * B + C * C);
-    m_BoundingPlane[j][1] = B / vcl_sqrt(A * A + B * B + C * C);
-    m_BoundingPlane[j][2] = C / vcl_sqrt(A * A + B * B + C * C);
-    m_BoundingPlane[j][3] = D / vcl_sqrt(A * A + B * B + C * C);
+    m_BoundingPlane[j][0] = A / std::sqrt(A * A + B * B + C * C);
+    m_BoundingPlane[j][1] = B / std::sqrt(A * A + B * B + C * C);
+    m_BoundingPlane[j][2] = C / std::sqrt(A * A + B * B + C * C);
+    m_BoundingPlane[j][3] = D / std::sqrt(A * A + B * B + C * C);
 
     if ( ( A * A + B * B + C * C ) == 0 )
       {
@@ -765,9 +765,9 @@ RayCastHelper< TInputImage, TCoordRep >
 
   // Calculate the number of voxels in each direction
 
-  xNum = vcl_fabs(m_RayVoxelStartPosition[0] - m_RayVoxelEndPosition[0]);
-  yNum = vcl_fabs(m_RayVoxelStartPosition[1] - m_RayVoxelEndPosition[1]);
-  zNum = vcl_fabs(m_RayVoxelStartPosition[2] - m_RayVoxelEndPosition[2]);
+  xNum = std::fabs(m_RayVoxelStartPosition[0] - m_RayVoxelEndPosition[0]);
+  yNum = std::fabs(m_RayVoxelStartPosition[1] - m_RayVoxelEndPosition[1]);
+  zNum = std::fabs(m_RayVoxelStartPosition[2] - m_RayVoxelEndPosition[2]);
 
   // The direction iterated in is that with the greatest number of voxels
   // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -972,9 +972,9 @@ RayCastHelper< TInputImage, TCoordRep >
     startOK = false;
     endOK = false;
 
-    Istart[0] = (int)vcl_floor(m_RayVoxelStartPosition[0]);
-    Istart[1] = (int)vcl_floor(m_RayVoxelStartPosition[1]);
-    Istart[2] = (int)vcl_floor(m_RayVoxelStartPosition[2]);
+    Istart[0] = (int)std::floor(m_RayVoxelStartPosition[0]);
+    Istart[1] = (int)std::floor(m_RayVoxelStartPosition[1]);
+    Istart[2] = (int)std::floor(m_RayVoxelStartPosition[2]);
 
     if ( ( Istart[0] >= 0 ) && ( Istart[0] + Idirn[0] < m_NumberOfVoxelsInX )
          && ( Istart[1] >= 0 ) && ( Istart[1] + Idirn[1] < m_NumberOfVoxelsInY )
@@ -991,13 +991,13 @@ RayCastHelper< TInputImage, TCoordRep >
       m_TotalRayVoxelPlanes--;
       }
 
-    Istart[0] = (int)vcl_floor(m_RayVoxelStartPosition[0]
+    Istart[0] = (int)std::floor(m_RayVoxelStartPosition[0]
                                + m_TotalRayVoxelPlanes * m_VoxelIncrement[0]);
 
-    Istart[1] = (int)vcl_floor(m_RayVoxelStartPosition[1]
+    Istart[1] = (int)std::floor(m_RayVoxelStartPosition[1]
                                + m_TotalRayVoxelPlanes * m_VoxelIncrement[1]);
 
-    Istart[2] = (int)vcl_floor(m_RayVoxelStartPosition[2]
+    Istart[2] = (int)std::floor(m_RayVoxelStartPosition[2]
                                + m_TotalRayVoxelPlanes * m_VoxelIncrement[2]);
 
     if ( ( Istart[0] >= 0 ) && ( Istart[0] + Idirn[0] < m_NumberOfVoxelsInX )
@@ -1062,7 +1062,7 @@ RayCastHelper< TInputImage, TCoordRep >
 
     for ( i = 0; i < 4; i++ )
       {
-      m_RayIntersectionVoxels[i] = 0;
+      m_RayIntersectionVoxels[i] = ITK_NULLPTR;
       }
     for ( i = 0; i < 3; i++ )
       {
@@ -1121,7 +1121,7 @@ RayCastHelper< TInputImage, TCoordRep >
         m_RayIntersectionVoxels[0] =
           m_RayIntersectionVoxels[1] =
             m_RayIntersectionVoxels[2] =
-              m_RayIntersectionVoxels[3] = NULL;
+              m_RayIntersectionVoxels[3] = ITK_NULLPTR;
         }
       break;
       }
@@ -1153,7 +1153,7 @@ RayCastHelper< TInputImage, TCoordRep >
         m_RayIntersectionVoxels[0] =
           m_RayIntersectionVoxels[1] =
             m_RayIntersectionVoxels[2] =
-              m_RayIntersectionVoxels[3] = NULL;
+              m_RayIntersectionVoxels[3] = ITK_NULLPTR;
         }
       break;
       }
@@ -1185,7 +1185,7 @@ RayCastHelper< TInputImage, TCoordRep >
         m_RayIntersectionVoxels[0] =
           m_RayIntersectionVoxels[1] =
             m_RayIntersectionVoxels[2] =
-              m_RayIntersectionVoxels[3] = NULL;
+              m_RayIntersectionVoxels[3] = ITK_NULLPTR;
         }
       break;
       }
@@ -1261,20 +1261,20 @@ RayCastHelper< TInputImage, TCoordRep >
     {
     case TRANSVERSE_IN_X:
       {
-      y = m_Position3Dvox[1].GetSum() - vcl_floor(m_Position3Dvox[1].GetSum());
-      z = m_Position3Dvox[2].GetSum() - vcl_floor(m_Position3Dvox[2].GetSum());
+      y = m_Position3Dvox[1].GetSum() - std::floor(m_Position3Dvox[1].GetSum());
+      z = m_Position3Dvox[2].GetSum() - std::floor(m_Position3Dvox[2].GetSum());
       break;
       }
     case TRANSVERSE_IN_Y:
       {
-      y = m_Position3Dvox[0].GetSum() - vcl_floor(m_Position3Dvox[0].GetSum());
-      z = m_Position3Dvox[2].GetSum() - vcl_floor(m_Position3Dvox[2].GetSum());
+      y = m_Position3Dvox[0].GetSum() - std::floor(m_Position3Dvox[0].GetSum());
+      z = m_Position3Dvox[2].GetSum() - std::floor(m_Position3Dvox[2].GetSum());
       break;
       }
     case TRANSVERSE_IN_Z:
       {
-      y = m_Position3Dvox[0].GetSum() - vcl_floor(m_Position3Dvox[0].GetSum());
-      z = m_Position3Dvox[1].GetSum() - vcl_floor(m_Position3Dvox[1].GetSum());
+      y = m_Position3Dvox[0].GetSum() - std::floor(m_Position3Dvox[0].GetSum());
+      z = m_Position3Dvox[1].GetSum() - std::floor(m_Position3Dvox[1].GetSum());
       break;
       }
     default:
@@ -1284,7 +1284,6 @@ RayCastHelper< TInputImage, TCoordRep >
       err.SetDescription("The ray traversal direction is unset "
                          "- GetCurrentIntensity().");
       throw err;
-      return 0;
       }
     }
 
@@ -1386,7 +1385,7 @@ RayCastHelper< TInputImage, TCoordRep >
 
   for ( i = 0; i < 4; i++ )
     {
-    m_RayIntersectionVoxels[i] = 0;
+    m_RayIntersectionVoxels[i] = ITK_NULLPTR;
     }
   for ( i = 0; i < 3; i++ )
     {
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h b/Utilities/ITK/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h
index bb76f4e..d3ed80b 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.h
@@ -39,7 +39,7 @@ class CosineWindowFunction
 {
 public:
   inline TOutput operator()(const TInput & A) const
-  { return (TOutput)vcl_cos(A * m_Factor); }
+  { return (TOutput)std::cos(A * m_Factor); }
 
 private:
   /** Equal to \f$ \frac{\pi}{2 m} \f$ */
@@ -59,7 +59,7 @@ class HammingWindowFunction
 {
 public:
   inline TOutput operator()(const TInput & A) const
-  { return (TOutput)0.54 + 0.46 * vcl_cos(A * m_Factor); }
+  { return (TOutput)0.54 + 0.46 * std::cos(A * m_Factor); }
 
 private:
   /** Equal to \f$ \frac{\pi}{m} \f$ */
@@ -104,7 +104,7 @@ public:
   {
     if ( A == 0.0 ) { return (TOutput)1.0; }
     double z = m_Factor * A;
-    return (TOutput)( vcl_sin(z) / z );
+    return (TOutput)( std::sin(z) / z );
   }
 
 private:
@@ -127,7 +127,7 @@ public:
   inline TOutput operator()(const TInput & A) const
   {
     return (TOutput)
-           ( 0.42 + 0.5 * vcl_cos(A * m_Factor1) + 0.08 * vcl_cos(A * m_Factor2) );
+           ( 0.42 + 0.5 * std::cos(A * m_Factor1) + 0.08 * std::cos(A * m_Factor2) );
   }
 
 private:
@@ -341,7 +341,7 @@ private:
   {
     double px = vnl_math::pi * x;
 
-    return ( x == 0.0 ) ? 1.0 : vcl_sin(px) / px;
+    return ( x == 0.0 ) ? 1.0 : std::sin(px) / px;
   }
 };
 } // namespace itk
diff --git a/Utilities/ITK/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx b/Utilities/ITK/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx
index dca3941..54b540a 100644
--- a/Utilities/ITK/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx
+++ b/Utilities/ITK/Modules/Core/ImageFunction/include/itkWindowedSincInterpolateImageFunction.hxx
@@ -123,7 +123,7 @@ WindowedSincInterpolateImageFunction< TInputImage, VRadius,
   // Call the parent implementation
   Superclass::SetInputImage(image);
 
-  if ( image == NULL )
+  if ( image == ITK_NULLPTR )
     {
     return;
     }
@@ -239,7 +239,7 @@ WindowedSincInterpolateImageFunction< TInputImage, VRadius,
         {
         // Increment the offset, taking it through the range
         // (dist + rad - 1, ..., dist - rad), i.e. all x
-        // such that vcl_abs(x) <= rad
+        // such that std::abs(x) <= rad
         x -= 1.0;
 
         // Compute the weight for this m
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx
index 88f7a1b..5129d8d 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkBinaryMask3DMeshSource.hxx
@@ -26,40 +26,45 @@ namespace itk
 {
 template< typename TInputImage, typename TOutputMesh >
 BinaryMask3DMeshSource< TInputImage, TOutputMesh >
-::BinaryMask3DMeshSource()
+::BinaryMask3DMeshSource() :
+  m_RegionOfInterestProvidedByUser(false),
+  m_LastRow(ITK_NULLPTR),
+  m_LastFrame(ITK_NULLPTR),
+  m_CurrentRow(ITK_NULLPTR),
+  m_CurrentFrame(ITK_NULLPTR),
+  m_CurrentRowIndex(0),
+  m_CurrentFrameIndex(0),
+  m_LastRowNum(0),
+  m_LastFrameNum(0),
+  m_CurrentRowNum(200),
+  m_CurrentFrameNum(2000),
+  m_NumberOfNodes(0),
+  m_NumberOfCells(0),
+  m_NodeLimit(2000),
+  m_CellLimit(4000),
+  m_ImageWidth(0),
+  m_ImageHeight(0),
+  m_ImageDepth(0),
+  m_ColFlag(0),
+  m_RowFlag(0),
+  m_FrameFlag(0),
+  m_LastRowIndex(0),
+  m_LastVoxelIndex(0),
+  m_LastFrameIndex(0),
+  m_PointFound(0),
+  m_ObjectValue(NumericTraits< InputPixelType >::One),
+  m_OutputMesh(ITK_NULLPTR),
+  m_InputImage(ITK_NULLPTR)
 {
   // Modify superclass default values, can be overridden by subclasses
   this->SetNumberOfRequiredInputs(1);
 
-  m_RegionOfInterestProvidedByUser = false;
-
   SizeType size;
   size.Fill( 0 );
   m_RegionOfInterest.SetSize(size);
 
-  m_NumberOfCells = 0;
-  m_NumberOfNodes = 0;
-
-  m_NodeLimit = 2000;
-  m_CellLimit = 4000;
-  m_LastRowIndex = 0;
-  m_LastVoxelIndex = 0;
-  m_LastFrameIndex = 0;
-  m_CurrentRowIndex = 0;
-  m_CurrentFrameIndex = 0;
-  m_CurrentFrame = 0;
-  m_CurrentRow = 0;
-  m_LastRow = 0;
-  m_LastRowNum = 0;
-  m_LastFrameNum = 0;
-  m_LastFrame = 0;
-  m_CurrentRowNum = 200;
-  m_CurrentFrameNum = 2000;
   this->GetOutput()->GetPoints()->Reserve(m_NodeLimit);
   this->GetOutput()->GetCells()->Reserve(m_CellLimit);
-  m_OutputMesh = 0;
-  m_InputImage = 0;
-  m_ObjectValue = NumericTraits< InputPixelType >::One;
 }
 
 template< typename TInputImage, typename TOutputMesh >
@@ -1055,12 +1060,12 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh >
   m_LastFrameIndex = 0;
   m_CurrentRowIndex = 0;
   m_CurrentFrameIndex = 0;
-  m_CurrentFrame = 0;
-  m_CurrentRow = 0;
-  m_LastRow = 0;
+  m_CurrentFrame = ITK_NULLPTR;
+  m_CurrentRow = ITK_NULLPTR;
+  m_LastRow = ITK_NULLPTR;
   m_LastRowNum = 0;
   m_LastFrameNum = 0;
-  m_LastFrame = 0;
+  m_LastFrame = ITK_NULLPTR;
   m_CurrentRowNum = 200;
   m_CurrentFrameNum = 2000;
   m_OutputMesh = this->GetOutput();
@@ -1294,7 +1299,7 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh >
           free (m_LastRow[i]);
           }
         free (m_LastRow);
-        m_LastRow = NULL;
+        m_LastRow = ITK_NULLPTR;
         }
       m_LastRowNum = 0;
       }
@@ -1341,7 +1346,7 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh >
         free (m_LastFrame[i]);
         }
       free (m_LastFrame);
-      m_LastFrame = 0;
+      m_LastFrame = ITK_NULLPTR;
       }
     }
 
@@ -2578,7 +2583,7 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh >
 
   if ( ( end - start ) > 1 )
     {
-    mid = static_cast< int >( vcl_floor( static_cast< float >( ( start + end ) / 2 ) ) );
+    mid = static_cast< int >( std::floor( static_cast< float >( ( start + end ) / 2 ) ) );
     if ( lindex == m_LastRow[mid][0] )
       {
       m_PointFound = 1;
@@ -2623,7 +2628,7 @@ BinaryMask3DMeshSource< TInputImage, TOutputMesh >
 
   if ( ( end - start ) > 1 )
     {
-    mid = static_cast< int >( vcl_floor( static_cast< float >( ( start + end ) / 2 ) ) );
+    mid = static_cast< int >( std::floor( static_cast< float >( ( start + end ) / 2 ) ) );
     if ( lindex == m_LastFrame[mid][0] )
       {
       m_PointFound = 1;
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx
index 9a85247..2b1ca38 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx
@@ -41,9 +41,13 @@ namespace itk
  */
 template< typename TInputMesh, typename TOutputMesh >
 ConnectedRegionsMeshFilter< TInputMesh, TOutputMesh >
-::ConnectedRegionsMeshFilter()
+::ConnectedRegionsMeshFilter() :
+  m_ExtractionMode(Self::LargestRegion),
+  m_NumberOfCellsInRegion(NumericTraits< SizeValueType >::Zero),
+  m_RegionNumber(NumericTraits< IdentifierType >::Zero),
+  m_Wave(ITK_NULLPTR),
+  m_Wave2(ITK_NULLPTR)
 {
-  m_ExtractionMode = Self::LargestRegion;
   m_ClosestPoint.Fill(0);
 }
 
@@ -287,7 +291,7 @@ ConnectedRegionsMeshFilter< TInputMesh, TOutputMesh >
 
   delete m_Wave;
   delete m_Wave2;
-  m_Wave = m_Wave2 = 0;
+  m_Wave = m_Wave2 = ITK_NULLPTR;
 
   itkDebugMacro (<< "Extracted " << m_RegionNumber << " region(s)");
 
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.hxx
index 1137168..e1190eb 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkInteriorExteriorMeshFilter.hxx
@@ -59,16 +59,12 @@ InteriorExteriorMeshFilter< TInputMesh, TOutputMesh, TSpatialFunction >
 ::GenerateData(void)
 {
   typedef typename TInputMesh::PointsContainer  InputPointsContainer;
-  typedef typename TOutputMesh::PointsContainer OutputPointsContainer;
 
   typedef typename TInputMesh::PointsContainerConstPointer InputPointsContainerConstPointer;
-  typedef typename TOutputMesh::PointsContainerPointer     OutputPointsContainerPointer;
 
   typedef typename TInputMesh::PointDataContainer  InputPointDataContainer;
-  typedef typename TOutputMesh::PointDataContainer OutputPointDataContainer;
 
   typedef typename TInputMesh::PointDataContainerConstPointer InputPointDataContainerConstPointer;
-  typedef typename TOutputMesh::PointDataContainerPointer     OutputPointDataContainerPointer;
 
   const InputMeshType *inputMesh =  this->GetInput();
   OutputMeshPointer    outputMesh =  this->GetOutput();
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkMesh.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkMesh.hxx
index 0e9a57c..fbd786d 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkMesh.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkMesh.hxx
@@ -48,7 +48,7 @@ Mesh< TPixelType, VDimension, TMeshTraits >
   os << indent << "Number Of Cells: "
      << ( ( m_CellsContainer ) ?  m_CellsContainer->Size() : 0 ) << std::endl;
   os << indent << "Cell Data Container pointer: "
-     << ( ( m_CellDataContainer ) ?  m_CellDataContainer.GetPointer() : 0 ) << std::endl;
+     << ( ( m_CellDataContainer ) ?  m_CellDataContainer.GetPointer() : ITK_NULLPTR ) << std::endl;
   os << indent << "Size of Cell Data Container: "
      << ( ( m_CellDataContainer ) ?  m_CellDataContainer->Size() : 0 ) << std::endl;
   os << indent << "Number of explicit cell boundary assignments: "
@@ -280,7 +280,7 @@ Mesh< TPixelType, VDimension, TMeshTraits >
   /**
    * Ask the container if the cell identifier exists.
    */
-  CellType * cellptr = 0;
+  CellType * cellptr = ITK_NULLPTR;
   const bool found = m_CellsContainer->GetElementIfIndexExists(cellId, &cellptr);
   if ( found )
     {
@@ -514,9 +514,9 @@ Mesh< TPixelType, VDimension, TMeshTraits >
 
   this->ReleaseCellsMemory();
 
-  m_CellsContainer = 0;
-  m_CellDataContainer = 0;
-  m_CellLinksContainer = 0;
+  m_CellsContainer = ITK_NULLPTR;
+  m_CellDataContainer = ITK_NULLPTR;
+  m_CellLinksContainer = ITK_NULLPTR;
 }
 
 /**
@@ -613,7 +613,7 @@ Mesh< TPixelType, VDimension, TMeshTraits >
      * and put them in the output set except for the cell through which the
      * request was made.  First we empty the output set.
      */
-    if ( cellSet != 0 )
+    if ( cellSet != ITK_NULLPTR )
       {
       cellSet->erase( cellSet->begin(), cellSet->end() );
 
@@ -720,7 +720,7 @@ Mesh< TPixelType, VDimension, TMeshTraits >
    */
   currentCells->erase(cellId);
   CellIdentifier numberOfNeighboringCells = currentCells->size();
-  if ( cellSet != 0 )
+  if ( cellSet != ITK_NULLPTR )
     {
     *cellSet = *currentCells;
     }
@@ -783,7 +783,7 @@ Mesh< TPixelType, VDimension, TMeshTraits >
      * Loop through UsingCells and put them in the output set.  First
      * we empty the output set.
      */
-    if ( cellSet != 0 )
+    if ( cellSet != ITK_NULLPTR )
       {
       cellSet->erase( cellSet->begin(), cellSet->end() );
 
@@ -869,7 +869,7 @@ Mesh< TPixelType, VDimension, TMeshTraits >
    * this set to the output cell set.
    */
   CellIdentifier numberOfNeighboringCells = currentCells->size();
-  if ( cellSet != 0 )
+  if ( cellSet != ITK_NULLPTR )
     {
     *cellSet = *currentCells;
     }
@@ -911,7 +911,7 @@ Mesh< TPixelType, VDimension, TMeshTraits >
     if ( m_BoundaryAssignmentsContainers[dimension]->
          GetElementIfIndexExists(assignId, &boundaryId) )
       {
-      CellType * boundaryptr = 0;
+      CellType * boundaryptr = ITK_NULLPTR;
       const bool found = m_CellsContainer->
                          GetElementIfIndexExists(boundaryId, &boundaryptr);
       if ( found )
@@ -1138,19 +1138,7 @@ Mesh< TPixelType, VDimension, TMeshTraits >
 {
   this->Superclass::CopyInformation(data);
 
-  const Self *mesh = NULL;
-
-  try
-    {
-    mesh = dynamic_cast< const Self * >( data );
-    }
-  catch ( ... )
-    {
-    // mesh could not be cast back down
-    itkExceptionMacro( << "itk::Mesh::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( Self * ).name() );
-    }
+  const Self *mesh = dynamic_cast< const Self * >( data );
 
   if ( !mesh )
     {
@@ -1170,19 +1158,7 @@ Mesh< TPixelType, VDimension, TMeshTraits >
 {
   this->Superclass::Graft(data);
 
-  const Self *mesh = NULL;
-
-  try
-    {
-    mesh = dynamic_cast< const Self * >( data );
-    }
-  catch ( ... )
-    {
-    // mesh could not be cast back down
-    itkExceptionMacro( << "itk::Mesh::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( Self * ).name() );
-    }
+  const Self *mesh = dynamic_cast< const Self * >( data );
 
   if ( !mesh )
     {
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkMeshRegion.h b/Utilities/ITK/Modules/Core/Mesh/include/itkMeshRegion.h
index 052e507..d861e15 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkMeshRegion.h
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkMeshRegion.h
@@ -67,7 +67,7 @@ public:
   virtual ~MeshRegion();
 
   /** Return the region type. Meshes are described with unstructured regions. */
-  virtual RegionType GetRegionType() const
+  virtual RegionType GetRegionType() const ITK_OVERRIDE
   { return Superclass::ITK_UNSTRUCTURED_REGION; }
 
   /** Get the number of regions. */
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkMeshSource.h b/Utilities/ITK/Modules/Core/Mesh/include/itkMeshSource.h
index 79db8a3..d03baa7 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkMeshSource.h
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkMeshSource.h
@@ -139,17 +139,17 @@ public:
    * an implementation of MakeOutput(). */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
 protected:
   MeshSource();
   virtual ~MeshSource() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Requested region of Mesh is specified as i of N unstructured regions.
    * Since all DataObjects should be able to set the requested region in
    * unstructured form, just copy output->RequestedRegion all inputs. */
-  void GenerateInputRequestedRegion();
+  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
 
 private:
   MeshSource(const Self &);     //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx
index 672c86b..09560f6 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkParametricSpaceToImageSpaceMeshFilter.hxx
@@ -56,13 +56,11 @@ ParametricSpaceToImageSpaceMeshFilter< TInputMesh, TOutputMesh >
   typedef typename TInputMesh::PointsContainer  InputPointsContainer;
   typedef typename TOutputMesh::PointsContainer OutputPointsContainer;
 
-  typedef typename TInputMesh::PointsContainerPointer  InputPointsContainerPointer;
   typedef typename TOutputMesh::PointsContainerPointer OutputPointsContainerPointer;
 
   typedef typename TInputMesh::PointDataContainer  InputPointDataContainer;
   typedef typename TOutputMesh::PointDataContainer OutputPointDataContainer;
 
-  typedef typename TInputMesh::PointDataContainerPointer  InputPointDataContainerPointer;
   typedef typename TOutputMesh::PointDataContainerPointer OutputPointDataContainerPointer;
 
   const InputMeshType *inputMesh    =  this->GetInput();
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx
index 3efae97..a10617a 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx
@@ -299,7 +299,7 @@ RegularSphereMeshSource< TOutputMesh >
     // set output
     outputMesh->Graft(result);
 
-    result->SetCells(NULL);
+    result->SetCells(ITK_NULLPTR);
     }
 }
 
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMesh.h b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMesh.h
index c994236..e3d2b22 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMesh.h
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMesh.h
@@ -170,7 +170,7 @@ public:
   /**
    * Get all neighbor points with a specified radius
    */
-  NeighborListType * GetNeighbors(PointIdentifier pointId, unsigned int radius, NeighborListType *list = NULL) const;
+  NeighborListType * GetNeighbors(PointIdentifier pointId, unsigned int radius, NeighborListType *list = ITK_NULLPTR) const;
 
   /**
    * Add a neighbor to a point.
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMesh.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMesh.hxx
index dfd76c3..09976bf 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMesh.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMesh.hxx
@@ -80,17 +80,15 @@ SimplexMesh< TPixelType, VDimension, TMeshTraits >
 
   mesh = dynamic_cast< const Superclass * >( data );
 
-  if ( mesh )
-    {
-    this->m_MaximumNumberOfRegions = mesh->GetMaximumNumberOfRegions();
-    }
-  else
+  if ( mesh == ITK_NULLPTR )
     {
     // pointer could not be cast back down
     itkExceptionMacro( << "itk::Mesh::CopyInformation() cannot cast "
                        << typeid( data ).name() << " to "
                        << typeid( Superclass * ).name() );
     }
+
+  this->m_MaximumNumberOfRegions = mesh->GetMaximumNumberOfRegions();
 }
 
 template< typename TPixelType, unsigned int VDimension, typename TMeshTraits >
@@ -288,7 +286,7 @@ typename SimplexMesh< TPixelType, VDimension, TMeshTraits >::NeighborListType *
 SimplexMesh< TPixelType, VDimension, TMeshTraits >
 ::GetNeighbors(PointIdentifier idx, unsigned int radius, NeighborListType *list) const
 {
-  if ( list == NULL )
+  if ( list == ITK_NULLPTR )
     {
     list = new NeighborListType();
     IndexArray neighborArray = GetNeighbors(idx);
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h
index d249fbf..c3117ac 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.h
@@ -134,11 +134,11 @@ public:
       double        meanCurvature = 0;
       PointIdentifier refPoint = *it;
       double        val = mesh->GetMeanCurvature(*it++);
-      meanCurvature += vcl_abs(val);
+      meanCurvature += std::abs(val);
 
       PointIdentifier id1 = *it;
       val = mesh->GetMeanCurvature(*it++);
-      meanCurvature += vcl_abs(val);
+      meanCurvature += std::abs(val);
 
       PointIdentifier id2;
 
@@ -152,7 +152,7 @@ public:
         area += ComputeArea(refPoint, id1, id2);
         id1 = id2;
         val = mesh->GetMeanCurvature(*it);
-        meanCurvature += vcl_abs(val);
+        meanCurvature += std::abs(val);
         cnt++;
         it++;
         }
@@ -181,7 +181,7 @@ public:
       mesh->GetPoint(p1, &v1);
       mesh->GetPoint(p2, &v2);
       mesh->GetPoint(p3, &v3);
-      return vcl_abs (itk_cross_3d( ( v2 - v1 ).GetVnlVector(), ( v3 - v1 ).GetVnlVector() ).two_norm() / 2.0);
+      return std::abs (itk_cross_3d( ( v2 - v1 ).GetVnlVector(), ( v3 - v1 ).GetVnlVector() ).two_norm() / 2.0);
     }
 
     typename DoubleValueMapType::Pointer GetAreaMap()
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx
index e65fc76..131f464 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx
@@ -33,14 +33,15 @@
 namespace itk
 {
 template< typename TInputMesh, typename TOutputMesh >
-SimplexMeshAdaptTopologyFilter< TInputMesh, TOutputMesh >::SimplexMeshAdaptTopologyFilter()
+SimplexMeshAdaptTopologyFilter< TInputMesh, TOutputMesh >::SimplexMeshAdaptTopologyFilter() :
+  m_IdOffset(0),
+  m_Threshold(0.5),
+  m_SelectionMethod(0),
+  m_ModifiedCount(0),
+  m_Output(TOutputMesh::New())
 {
-  m_Output = TOutputMesh::New();
   this->ProcessObject::SetNumberOfRequiredOutputs(1);
   this->ProcessObject::SetNthOutput( 0, m_Output.GetPointer() );
-  m_ModifiedCount = 0;
-  m_SelectionMethod = 0;
-  m_Threshold = 0.5;
 }
 
 template< typename TInputMesh, typename TOutputMesh >
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h
index fa90b3b..209d8f0 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.h
@@ -176,7 +176,7 @@ protected:
 protected:
   SimplexMeshVolumeCalculator();
   virtual ~SimplexMeshVolumeCalculator();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   SimplexMeshVolumeCalculator(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx
index fb83ceb..133e4fa 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx
@@ -27,12 +27,24 @@ namespace itk
  */
 template< typename TInputMesh >
 SimplexMeshVolumeCalculator< TInputMesh >
-::SimplexMeshVolumeCalculator()
+::SimplexMeshVolumeCalculator() :
+  m_Volume(0.0),
+  m_VolumeX(0.0),
+  m_VolumeY(0.0),
+  m_VolumeZ(0.0),
+  m_Area(0.0),
+  m_Kx(0.0),
+  m_Ky(0.0),
+  m_Kz(0.0),
+  m_Wxyz(0.0),
+  m_Wxy(0.0),
+  m_Wxz(0.0),
+  m_Wyz(0.0),
+  m_Muncx(0),
+  m_Muncy(0),
+  m_Muncz(0),
+  m_NumberOfTriangles(0)
 {
-  m_Volume = m_VolumeX = m_VolumeY = m_VolumeZ = 0.0;
-  m_Area = 0.0;
-  m_Kx = m_Ky = m_Kz = 0.0;
-  m_NumberOfTriangles = 0;
 }
 
 template< typename TInputMesh >
@@ -75,7 +87,7 @@ void SimplexMeshVolumeCalculator< TInputMesh >
   m_Volume =  ( m_Kx * m_VolumeX
                 + m_Ky * m_VolumeY
                 + m_Kz * m_VolumeZ );
-  m_Volume =  vcl_fabs(m_Volume);
+  m_Volume =  std::fabs(m_Volume);
 }
 
 template< typename TInputMesh >
@@ -139,7 +151,7 @@ SimplexMeshVolumeCalculator< TInputMesh >
 
   // Normalize normal
   //
-  length = vcl_sqrt(u[0] * u[0] + u[1] * u[1] + u[2] * u[2]);
+  length = std::sqrt(u[0] * u[0] + u[1] * u[1] + u[2] * u[2]);
   if ( length != 0.0 )
     {
     u[0] /= length;
@@ -153,7 +165,7 @@ SimplexMeshVolumeCalculator< TInputMesh >
 
   // Determine max unit normal component...
   //
-  absu[0] = vcl_fabs(u[0]); absu[1] = vcl_fabs(u[1]); absu[2] = vcl_fabs(u[2]);
+  absu[0] = std::fabs(u[0]); absu[1] = std::fabs(u[1]); absu[2] = std::fabs(u[2]);
   if ( ( absu[0] > absu[1] ) && ( absu[0] > absu[2] ) )
     {
     m_Muncx++;
@@ -196,11 +208,11 @@ SimplexMeshVolumeCalculator< TInputMesh >
 
   // Area of a triangle using Heron's formula...
   //
-  a = vcl_sqrt(ii[1] + jj[1] + kk[1]);
-  b = vcl_sqrt(ii[0] + jj[0] + kk[0]);
-  c = vcl_sqrt(ii[2] + jj[2] + kk[2]);
+  a = std::sqrt(ii[1] + jj[1] + kk[1]);
+  b = std::sqrt(ii[0] + jj[0] + kk[0]);
+  c = std::sqrt(ii[2] + jj[2] + kk[2]);
   s = 0.5 * ( a + b + c );
-  area = vcl_sqrt( vcl_fabs( s * ( s - a ) * ( s - b ) * ( s - c ) ) );
+  area = std::sqrt( std::fabs( s * ( s - a ) * ( s - b ) * ( s - c ) ) );
 
   // Volume elements ...
   //
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkSphereMeshSource.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkSphereMeshSource.hxx
index e7d78cf..6b45d7b 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkSphereMeshSource.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkSphereMeshSource.hxx
@@ -90,7 +90,7 @@ SphereMeshSource< TOutputMesh >
       {
       for ( v = vbeg, j = 0; j < m_ResolutionY; v += vstep, j++ )
         {
-        if ( vcl_cos(u) > 0 )
+        if ( std::cos(u) > 0 )
           {
           signu = 1;
           }
@@ -98,7 +98,7 @@ SphereMeshSource< TOutputMesh >
           {
           signu = -1;
           }
-        if ( vcl_cos(v) > 0 )
+        if ( std::cos(v) > 0 )
           {
           signv = 1;
           }
@@ -107,10 +107,10 @@ SphereMeshSource< TOutputMesh >
           signv = -1;
           }
 
-        p1[0] = m_Scale[0] * signu * ( vcl_pow( (float)( vcl_fabs( vcl_cos(u) ) ), (float)m_Squareness1 ) ) * signv
-                * ( vcl_pow( (float)( vcl_fabs( vcl_cos(v) ) ), (float)m_Squareness2 ) ) + m_Center[0];
+        p1[0] = m_Scale[0] * signu * ( std::pow( (float)( std::fabs( std::cos(u) ) ), (float)m_Squareness1 ) ) * signv
+                * ( std::pow( (float)( std::fabs( std::cos(v) ) ), (float)m_Squareness2 ) ) + m_Center[0];
 
-        if ( vcl_sin(v) > 0 )
+        if ( std::sin(v) > 0 )
           {
           signv = 1;
           }
@@ -119,10 +119,10 @@ SphereMeshSource< TOutputMesh >
           signv = -1;
           }
 
-        p1[1] = m_Scale[1] * signu * ( vcl_pow( (float)( vcl_fabs( vcl_cos(u) ) ), (float)m_Squareness1 ) ) * signv
-                * ( vcl_pow( (float)( vcl_fabs( vcl_sin(v) ) ), (float)m_Squareness2 ) ) + m_Center[1];
+        p1[1] = m_Scale[1] * signu * ( std::pow( (float)( std::fabs( std::cos(u) ) ), (float)m_Squareness1 ) ) * signv
+                * ( std::pow( (float)( std::fabs( std::sin(v) ) ), (float)m_Squareness2 ) ) + m_Center[1];
 
-        if ( vcl_sin(u) > 0 )
+        if ( std::sin(u) > 0 )
           {
           signu = 1;
           }
@@ -131,7 +131,7 @@ SphereMeshSource< TOutputMesh >
           signu = -1;
           }
 
-        p1[2] = m_Scale[2] * signu * ( vcl_pow( (float)( vcl_fabs( vcl_sin(u) ) ), (float)m_Squareness1 ) )
+        p1[2] = m_Scale[2] * signu * ( std::pow( (float)( std::fabs( std::sin(u) ) ), (float)m_Squareness1 ) )
                 + m_Center[2];
 
         point.Value() = p1;
@@ -140,21 +140,21 @@ SphereMeshSource< TOutputMesh >
       }
 
     // calculate the south pole node
-    p1[0] = ( m_Scale[0] * ( vcl_pow( (float)( vcl_fabs( vcl_cos(-vnl_math::pi / 2) ) ), 1.0f ) )
-              * ( vcl_pow( (float)( vcl_fabs( vcl_cos(0.0) ) ), 1.0f ) ) + m_Center[0] );
-    p1[1] = ( m_Scale[1] * ( vcl_pow( (float)( vcl_fabs( vcl_cos(-vnl_math::pi / 2) ) ), 1.0f ) )
-              * ( vcl_pow( (float)( vcl_fabs( vcl_sin(0.0) ) ), 1.0f ) ) + m_Center[1] );
-    p1[2] = ( m_Scale[2] * -1 * ( vcl_pow( (float)( vcl_fabs( vcl_sin(-vnl_math::pi / 2) ) ), 1.0f ) )
+    p1[0] = ( m_Scale[0] * ( std::pow( (float)( std::fabs( std::cos(-vnl_math::pi / 2) ) ), 1.0f ) )
+              * ( std::pow( (float)( std::fabs( std::cos(0.0) ) ), 1.0f ) ) + m_Center[0] );
+    p1[1] = ( m_Scale[1] * ( std::pow( (float)( std::fabs( std::cos(-vnl_math::pi / 2) ) ), 1.0f ) )
+              * ( std::pow( (float)( std::fabs( std::sin(0.0) ) ), 1.0f ) ) + m_Center[1] );
+    p1[2] = ( m_Scale[2] * -1 * ( std::pow( (float)( std::fabs( std::sin(-vnl_math::pi / 2) ) ), 1.0f ) )
               + m_Center[2] );
     point.Value() = p1;
     ++point;
 
     // calculate the north pole node
-    p1[0] = ( m_Scale[0] * ( vcl_pow( (float)( vcl_fabs( vcl_cos(vnl_math::pi / 2) ) ), 1.0f ) )
-              * ( vcl_pow(vcl_fabs( vcl_cos(0.0) ), 1.0) ) + m_Center[0] );
-    p1[1] = ( m_Scale[1] * ( vcl_pow( (float)( vcl_fabs( vcl_cos(vnl_math::pi / 2) ) ), 1.0f ) )
-              * ( vcl_pow(vcl_fabs( vcl_sin(0.0) ), 1.0) ) + m_Center[1] );
-    p1[2] = ( m_Scale[2] * ( vcl_pow( (float)( vcl_fabs( vcl_sin(vnl_math::pi / 2) ) ), 1.0f ) )
+    p1[0] = ( m_Scale[0] * ( std::pow( (float)( std::fabs( std::cos(vnl_math::pi / 2) ) ), 1.0f ) )
+              * ( std::pow(std::fabs( std::cos(0.0) ), 1.0) ) + m_Center[0] );
+    p1[1] = ( m_Scale[1] * ( std::pow( (float)( std::fabs( std::cos(vnl_math::pi / 2) ) ), 1.0f ) )
+              * ( std::pow(std::fabs( std::sin(0.0) ), 1.0) ) + m_Center[1] );
+    p1[2] = ( m_Scale[2] * ( std::pow( (float)( std::fabs( std::sin(vnl_math::pi / 2) ) ), 1.0f ) )
               + m_Center[2] );
     point.Value() = p1;
     ++point;
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx
index 52f765d..1ea6c7f 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkTransformMeshFilter.hxx
@@ -30,7 +30,7 @@ template< typename TInputMesh, typename TOutputMesh, typename TTransform >
 TransformMeshFilter< TInputMesh, TOutputMesh, TTransform >
 ::TransformMeshFilter()
 {
-  m_Transform = 0; // has to be provided by the user.
+  m_Transform = ITK_NULLPTR; // has to be provided by the user.
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx
index 329079a..dc4f140 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx
@@ -45,7 +45,7 @@ TriangleMeshToBinaryImageFilter< TInputMesh, TOutputImage >
   m_Direction.GetVnlMatrix().set_identity();
 
   m_Tolerance = 1e-5;
-  m_InfoImage = NULL;
+  m_InfoImage = ITK_NULLPTR;
 }
 
 /** Destructor */
@@ -167,7 +167,7 @@ TriangleMeshToBinaryImageFilter< TInputMesh, TOutputImage >
 
   // Get the input and output pointers
   OutputImagePointer OutputImage = this->GetOutput();
-  if ( m_InfoImage == NULL )
+  if ( m_InfoImage == ITK_NULLPTR )
     {
     if ( m_Size[0] == 0 ||  m_Size[1] == 0 ||  m_Size[2] == 0 )
       {
@@ -292,8 +292,8 @@ TriangleMeshToBinaryImageFilter< TInputMesh, TOutputImage >
       std::swap(p1, p2);
       }
 
-    int zmin = (int)( vcl_ceil(p1[2]) );
-    int zmax = (int)( vcl_ceil(p2[2]) );
+    int zmin = (int)( std::ceil(p1[2]) );
+    int zmax = (int)( std::ceil(p2[2]) );
 
     if ( zmin > extent[5] || zmax < extent[4] )
       {
@@ -370,8 +370,8 @@ TriangleMeshToBinaryImageFilter< TInputMesh, TOutputImage >
         continue;
         }
       double temp = 1.0 / ( Y2 - Y1 );
-      int    ymin = (int)( vcl_ceil(Y1) );
-      int    ymax = (int)( vcl_ceil(Y2) );
+      int    ymin = (int)( std::ceil(Y1) );
+      int    ymax = (int)( std::ceil(Y2) );
       for ( int y = ymin; y < ymax; y++ )
         {
         double r = ( Y2 - y ) * temp;
@@ -545,8 +545,8 @@ TriangleMeshToBinaryImageFilter< TInputMesh, TOutputImage >
 
       for ( int i = 0; i < n; i++ )
         {
-        int x1 = (int)( vcl_ceil(nlist[2 * i]) );
-        int x2 = (int)( vcl_floor(nlist[2 * i + 1]) );
+        int x1 = (int)( std::ceil(nlist[2 * i]) );
+        int x2 = (int)( std::floor(nlist[2 * i + 1]) );
 
         if ( x2 < extent[0] || x1 > ( extent[1] ) )
           {
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx
index 6657180..dd1918d 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkTriangleMeshToSimplexMeshFilter.hxx
@@ -23,14 +23,21 @@ namespace itk
 {
 template< typename TInputMesh, typename TOutputMesh >
 TriangleMeshToSimplexMeshFilter< TInputMesh, TOutputMesh >
-::TriangleMeshToSimplexMeshFilter()
+::TriangleMeshToSimplexMeshFilter() :
+  m_FaceSet(ITK_NULLPTR),
+  m_Edges(ITK_NULLPTR),
+  m_EdgeNeighborList(ITK_NULLPTR),
+  m_VertexNeighborList(ITK_NULLPTR),
+  m_LineCellIndices(ITK_NULLPTR),
+  m_CellIdxOffset(0),
+  m_IdOffset(0),
+  m_EdgeCellId(0),
+  m_HandledEdgeIds(IdVectorType::New())
 {
   OutputMeshPointer output = TOutputMesh::New();
 
   this->ProcessObject::SetNumberOfRequiredOutputs(1);
   this->ProcessObject::SetNthOutput( 0, output.GetPointer() );
-  m_HandledEdgeIds = IdVectorType::New();
-  m_FaceSet = NULL;
 }
 
 template< typename TInputMesh, typename TOutputMesh >
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataReader.h b/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataReader.h
index 0db59a6..f24fb9c 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataReader.h
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataReader.h
@@ -33,7 +33,13 @@ namespace itk
  *          Use vtkTriangleFilter to convert your mesh to a triangle mesh.
  * Caviet2: itkVTKPolyDataReader can only read vtk legacy files.
  * Caveat3: itkVTKPolyDataReader cannot read binary vtk files.
+ *
+ * This class may be deprecated in the future. The MeshFileReader is
+ * preferred.
+ *
  * \ingroup ITKMesh
+ *
+ * \sa MeshFileReader
  */
 template< typename TOutputMesh >
 class VTKPolyDataReader:public MeshSource< TOutputMesh >
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataWriter.h b/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataWriter.h
index 6a50496..5a5b28e 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataWriter.h
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataWriter.h
@@ -30,7 +30,13 @@ namespace itk
  *
  * Caveat: The input to itkVTKPolyDataWriter must be a triangle mesh.
  *         Use vtkTriangleFilter to convert your mesh to a triangle mesh.
+ *
+ * This class may be deprecated in the future. The MeshFileWriter is
+ * preferred.
+ *
  * \ingroup ITKMesh
+ *
+ * \sa MeshFileWriter
  */
 template< typename TInputMesh >
 class VTKPolyDataWriter:public Object
@@ -95,7 +101,7 @@ protected:
 
   InputMeshPointer m_Input;
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   VTKPolyDataWriter(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx
index b0319d3..b741738 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkVTKPolyDataWriter.hxx
@@ -32,7 +32,7 @@ template< typename TInputMesh >
 VTKPolyDataWriter< TInputMesh >
 ::VTKPolyDataWriter()
 {
-  this->m_Input = NULL;
+  this->m_Input = ITK_NULLPTR;
   this->m_FileName = "";
 }
 
diff --git a/Utilities/ITK/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx b/Utilities/ITK/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx
index 8686f5e..31bd89c 100644
--- a/Utilities/ITK/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx
@@ -78,7 +78,6 @@ WarpMeshFilter< TInputMesh, TOutputMesh, TDisplacementField >
   typedef typename TInputMesh::PointsContainer  InputPointsContainer;
   typedef typename TOutputMesh::PointsContainer OutputPointsContainer;
 
-  typedef typename TInputMesh::PointsContainerPointer  InputPointsContainerPointer;
   typedef typename TOutputMesh::PointsContainerPointer OutputPointsContainerPointer;
 
   const InputMeshType *   inputMesh   =  this->GetInput();
diff --git a/Utilities/ITK/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx b/Utilities/ITK/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx
index 63a06e8..e5709a1 100644
--- a/Utilities/ITK/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx
+++ b/Utilities/ITK/Modules/Core/Mesh/src/itkSimplexMeshGeometry.cxx
@@ -40,24 +40,28 @@ SimplexMeshGeometry
   normal.Fill(0);
   externalForce.Fill(0);
   internalForce.Fill(0);
+  closestAttractor.Fill(0);
   circleRadius = 0;
   circleCenter.Fill(0);
   sphereRadius = 0;
   distance = 0;
   phi = 0;
+  multiplier = 0.0;
+  forceIndex = 0;
 
   neighborIndices.Fill( NumericTraits< IdentifierType >::max() );
   neighbors.Fill(p);
   meanCurvature = c;
 
-  neighborSet = NULL;
+  neighborSet = ITK_NULLPTR;
+  closestAttractorIndex = 0;
 }
 
 SimplexMeshGeometry
 ::~SimplexMeshGeometry()
 {
   delete this->neighborSet;
-  this->neighborSet = NULL;
+  this->neighborSet = ITK_NULLPTR;
 }
 
 void
@@ -157,7 +161,7 @@ SimplexMeshGeometry
     }
   else
     {
-    this->neighborSet = NULL;
+    this->neighborSet = ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Core/Mesh/wrapping/itkImageToMeshFilter.wrap b/Utilities/ITK/Modules/Core/Mesh/wrapping/itkImageToMeshFilter.wrap
index 1836f3f..8fba37d 100644
--- a/Utilities/ITK/Modules/Core/Mesh/wrapping/itkImageToMeshFilter.wrap
+++ b/Utilities/ITK/Modules/Core/Mesh/wrapping/itkImageToMeshFilter.wrap
@@ -7,7 +7,10 @@ itk_wrap_class("itk::ImageToMeshFilter" POINTER)
     endforeach(t)
   endforeach(d)
   # For BinaryMask3DMeshSource
-  foreach(t ${WRAP_ITK_INT})
-    itk_wrap_template("${ITKM_I${t}3}M${ITKM_D}3ST${ITKM_D}33${ITKM_D}${ITKM_D}" "${ITKT_I${t}3}, itk::Mesh< ${ITKT_D},3,itk::DefaultStaticMeshTraits< ${ITKT_D},3,3,${ITKT_D},${ITKT_D} > >")
-  endforeach(t)
+  itk_wrap_filter_dims(has_d_3 3)
+  if(has_d_3)
+    foreach(t ${WRAP_ITK_INT})
+      itk_wrap_template("${ITKM_I${t}3}M${ITKM_D}3ST${ITKM_D}33${ITKM_D}${ITKM_D}" "${ITKT_I${t}3}, itk::Mesh< ${ITKT_D},3,itk::DefaultStaticMeshTraits< ${ITKT_D},3,3,${ITKT_D},${ITKT_D} > >")
+    endforeach(t)
+  endif(has_d_3)
 itk_end_wrap_class()
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx
index 6750fa4..6eb0596 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx
@@ -30,7 +30,7 @@ template< typename TVRef, typename TFRef,
 const typename GeometricalQuadEdge< TVRef, TFRef,
                                     TPrimalData, TDualData, PrimalDual >::OriginRefType
 GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual >::m_NoPoint =
-  vcl_numeric_limits< OriginRefType >::max();
+  std::numeric_limits< OriginRefType >::max();
 
 /**
  *   Constructor
@@ -38,10 +38,12 @@ GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual >::m_NoPoi
 template< typename TVRef, typename TFRef,
           typename TPrimalData, typename TDualData, bool PrimalDual >
 GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual >
-::GeometricalQuadEdge()
+::GeometricalQuadEdge() :
+  m_Origin(m_NoPoint),
+  m_Data(),
+  m_DataSet(false),
+  m_LineCellIdent(0)
 {
-  this->m_Origin     = m_NoPoint;
-  this->m_DataSet = false;
 }
 
 /**
@@ -304,7 +306,7 @@ GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual >::GetNext
   if ( this->IsOriginInternal() )
     {
     itkQEDebugMacro("Internal point.");
-    return ( 0 );
+    return ( ITK_NULLPTR );
     }
 
   // Update reference
@@ -331,7 +333,7 @@ GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual >::GetNext
 
   // No border edge found
   itkQEDebugMacro("Unfound border edge.");
-  return ( 0 );
+  return ( ITK_NULLPTR );
 }
 
 /**
@@ -665,7 +667,7 @@ GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual >
 {
   const Self *p1 = this->GetSym();
 
-  if ( p1 == NULL )
+  if ( p1 == ITK_NULLPTR )
     {
     return false; // FIXME: Is this the right answer ?
     }
@@ -682,7 +684,7 @@ GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual >
 {
   const DualType *p1 = this->GetRot();
 
-  if ( p1 == NULL )
+  if ( p1 == ITK_NULLPTR )
     {
     return false;  // FIXME: Is this the right answer ?
     }
@@ -699,7 +701,7 @@ GeometricalQuadEdge< TVRef, TFRef, TPrimalData, TDualData, PrimalDual >
 {
   const DualType *p1 = this->GetInvRot();
 
-  if ( p1 == NULL )
+  if ( p1 == ITK_NULLPTR )
     {
     return false;  // FIXME: Is this the right answer ?
     }
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h
index 546f71b..1ff7760 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h
@@ -403,7 +403,7 @@ public:
   inline const Self * GetInvDnext() const { return this->GetDprev(); }
 
   /** Queries. */
-  inline bool IsHalfEdge() const { return ( ( m_Onext == this ) || ( m_Rot == NULL ) ); }
+  inline bool IsHalfEdge() const { return ( ( m_Onext == this ) || ( m_Rot == ITK_NULLPTR ) ); }
   inline bool IsIsolated() const { return ( this == this->GetOnext() ); }
   bool IsEdgeInOnextRing(Self *testEdge) const;
 
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h
index de1f594..200a64e 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.h
@@ -304,7 +304,7 @@ public:
     int dimension) const
   {
     (void)dimension;
-    return ( (BoundaryAssignmentsContainerPointer)0 );
+    return ( (BoundaryAssignmentsContainerPointer)ITK_NULLPTR );
   }
 
 #endif
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx
index 41f48ae..ba7f56c 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx
@@ -26,12 +26,12 @@ namespace itk
 template< typename TPixel, unsigned int VDimension, typename TTraits >
 const typename QuadEdgeMesh< TPixel, VDimension, TTraits >::PointIdentifier
 QuadEdgeMesh< TPixel, VDimension, TTraits >::m_NoPoint =
-  vcl_numeric_limits< PointIdentifier >::max();
+  std::numeric_limits< PointIdentifier >::max();
 
 template< typename TPixel, unsigned int VDimension, typename TTraits >
 const typename QuadEdgeMesh< TPixel, VDimension, TTraits >::CellIdentifier
 QuadEdgeMesh< TPixel, VDimension, TTraits >::m_NoFace =
-  vcl_numeric_limits< CellIdentifier >::max();
+  std::numeric_limits< CellIdentifier >::max();
 
 /**
  * Restore the mesh to its initial state. Useful for data pipeline updates
@@ -82,19 +82,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
 ::Graft(const DataObject *data)
 {
   this->Superclass::Graft(data);
-  const Self *mesh = 0;
-
-  try
-    {
-    mesh = dynamic_cast< const Self * >( data );
-    }
-  catch ( ... )
-    {
-    // mesh could not be cast back down
-    itkExceptionMacro( << "itk::QuadEdgeMesh::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( Self * ).name() );
-    }
+  const Self *mesh = dynamic_cast< const Self * >( data );
 
   if ( !mesh )
     {
@@ -331,7 +319,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
     ///////////////////////////////////////////////////////////////
     // Back to dealing with the geometrical references. First
     // make sure the oldOrigin's edge entry won't be used any more:
-    oldOrigin.SetEdge( (QEPrimal *)0 );
+    oldOrigin.SetEdge( (QEPrimal *)ITK_NULLPTR );
     this->SetPoint(oldOriginId, oldOrigin);
 
     // We need to inform the edges ranging from a->Onext() to b that
@@ -671,7 +659,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
   if ( orgPid == destPid )
     {
     itkDebugMacro("Creating an edge between the same point.");
-    return ( (QEPrimal *)0 );
+    return ( (QEPrimal *)ITK_NULLPTR );
     }
 
   // Make sure the points are already in the QuadEdgeMesh container:
@@ -679,12 +667,12 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
        || !( this->GetPoints()->IndexExists(destPid) ) )
     {
     itkDebugMacro("One of the points not in the PointSet.");
-    return ( (QEPrimal *)0 );
+    return ( (QEPrimal *)ITK_NULLPTR );
     }
 
   // Make sure the edge is not already in the container
   QEPrimal *e = this->FindEdge(orgPid, destPid);
-  if ( e != (QEPrimal *)0 )
+  if ( e != (QEPrimal *)ITK_NULLPTR )
     {
     itkDebugMacro("Edge already in QuadEdgeMesh.");
     return e;
@@ -698,7 +686,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
     if ( eOrigin->IsOriginInternal() )
       {
       itkDebugMacro("No room for a new edge in the Origin() ring.");
-      return ( (QEPrimal *)0 );
+      return ( (QEPrimal *)ITK_NULLPTR );
       }
     }
 
@@ -709,7 +697,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
     if ( eDestination->IsOriginInternal() )
       {
       itkDebugMacro("No room for a new edge in the Destination() ring.");
-      return ( (QEPrimal *)0 );
+      return ( (QEPrimal *)ITK_NULLPTR );
       }
     }
 
@@ -793,7 +781,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
   // Check if the edge exists
   QEPrimal *e = this->FindEdge(orgPid, destPid);
 
-  if ( e == (QEPrimal *)0 )
+  if ( e == (QEPrimal *)ITK_NULLPTR )
     {
     itkDebugMacro("Edge missing in mesh.");
     return;
@@ -825,7 +813,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
       }
     else
       {
-      pOrigin.SetEdge( (QEPrimal *)0 );
+      pOrigin.SetEdge( (QEPrimal *)ITK_NULLPTR );
       }
     }
 
@@ -840,7 +828,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
       }
     else
       {
-      pDestination.SetEdge( (QEPrimal *)0 );
+      pDestination.SetEdge( (QEPrimal *)ITK_NULLPTR );
       }
     }
 
@@ -860,7 +848,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
     {
     PolygonCellType *pcell = dynamic_cast< PolygonCellType * >( cit.Value() );
     bool             toDelete = false;
-    if ( pcell != (PolygonCellType *)0 )
+    if ( pcell != (PolygonCellType *)ITK_NULLPTR )
       {
       QEPrimal *edge = pcell->GetEdgeRingEntry();
       typename QEPrimal::IteratorGeom it  = edge->BeginGeomLnext();
@@ -976,7 +964,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
         }
       else
         {
-        pOrigin.SetEdge( (QEPrimal *)0 );
+        pOrigin.SetEdge( (QEPrimal *)ITK_NULLPTR );
         }
       }
 
@@ -991,7 +979,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
         }
       else
         {
-        pDestination.SetEdge( (QEPrimal *)0 );
+        pDestination.SetEdge( (QEPrimal *)ITK_NULLPTR );
         }
       }
     // ------------------------------------------------------------------
@@ -1125,7 +1113,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
 {
   if ( this->GetEdgeCells()->size() == 0 )
     {
-    return ( (QEPrimal *)0 );
+    return ( (QEPrimal *)ITK_NULLPTR );
     }
 
   const CellsContainer* edgeCells = this->GetEdgeCells();
@@ -1147,7 +1135,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
   if( !this->GetEdgeCells()->GetElementIfIndexExists( eid, &c ) )
     {
     itkDebugMacro("No such edge in container");
-    return ( (QEPrimal *)0 );
+    return ( (QEPrimal *)ITK_NULLPTR );
     }
 
   EdgeCellType *e = dynamic_cast< EdgeCellType * >( c );
@@ -1188,7 +1176,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
       ++it;
       }
     }
-  return ( static_cast< QEPrimal * >( NULL ) );
+  return ( static_cast< QEPrimal * >( ITK_NULLPTR ) );
 }
 
 /**
@@ -1198,10 +1186,10 @@ typename QuadEdgeMesh< TPixel, VDimension, TTraits >::EdgeCellType *
 QuadEdgeMesh< TPixel, VDimension, TTraits >
 ::FindEdgeCell(const PointIdentifier & pid0, const PointIdentifier & pid1) const
 {
-  EdgeCellType *result = (EdgeCellType *)0;
+  EdgeCellType *result = (EdgeCellType *)ITK_NULLPTR;
   QEPrimal *    EdgeGeom = FindEdge(pid0, pid1);
 
-  if ( EdgeGeom != (QEPrimal *)0 )
+  if ( EdgeGeom != (QEPrimal *)ITK_NULLPTR )
     {
     CellIdentifier LineIdent = EdgeGeom->GetIdent();
     if ( LineIdent != m_NoPoint )
@@ -1273,7 +1261,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
         {
         itkDebugMacro("Edge [" << i << " " << ( ( i + 1 ) % N )
                                << " has a left face.");
-        return (QEPrimal *)NULL;
+        return (QEPrimal *)ITK_NULLPTR;
         }
       }
     }
@@ -1301,7 +1289,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
   const PointIdentifier numberOfPoints = static_cast< PointIdentifier >( points.size() );
 
   typedef std::vector< QEPrimal * > QEList;
-  QEList FaceQEList( numberOfPoints, NULL );
+  QEList FaceQEList( numberOfPoints, ITK_NULLPTR );
 
   // Now create edge list and create missing edges if needed.
   for ( PointIdentifier i = 0; i < numberOfPoints; i++ )
@@ -1313,7 +1301,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
     if ( !edge && CheckEdges )
       {
       QEPrimal *entry = this->AddEdgeWithSecurePointList(pid0, pid1);
-      if ( entry == (QEPrimal *)0 )
+      if ( entry == (QEPrimal *)ITK_NULLPTR )
         {
         return ( entry );
         }
@@ -1349,7 +1337,7 @@ QuadEdgeMesh< TPixel, VDimension, TTraits >
     {
     // FIXME throw exception here instead
     itkDebugMacro("entry == NULL");
-    return (QEPrimal *)NULL;
+    return (QEPrimal *)ITK_NULLPTR;
     }
 
   this->AddFace(entry);
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx
index eb5317f..fea43a3 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx
@@ -67,7 +67,7 @@ const
       {
       itkWarningMacro("Entry edge has not face adjacency.");
       delete ResultList;
-      return ( (OutputType)0 );
+      return ( (OutputType)ITK_NULLPTR );
       }
 
     // Store this edge as representative of it's Lnext() ring i.e.
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.h b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.h
index 72328ba..02cc8ea 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.h
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.h
@@ -63,7 +63,7 @@ public:
   }
 
 protected:
-  QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction(){}
+  QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction() : m_OldPointID(0) {}
   ~QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction(){}
 
 private:
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx
index be8deb9..b328502 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx
@@ -29,19 +29,19 @@ QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction< TMesh, TQEType >::Evaluate(
   if ( !g )
     {
     itkDebugMacro("Input is not an edge.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   if ( !this->m_Mesh )
     {
     itkDebugMacro("No mesh present.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   if ( !g->IsInternal() )
     {
     itkDebugMacro("The edge is either border or wire.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   // None of the incident facets of g->GetDestination() is a hole.
@@ -58,7 +58,7 @@ QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction< TMesh, TQEType >::Evaluate(
     if ( !one_edge->IsInternal() )
       {
       itkDebugMacro("DeleteVertex requires a full one-ring, i.e. no holes.");
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
       }
     pList.push_back( one_edge->GetDestination() );
     }
@@ -91,7 +91,7 @@ QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction< TMesh, TQEType >::Evaluate(
     itkDebugMacro(
       "DeleteVertex requires at least two distinct \
     facets incident to the facets that are incident to g->GetDestination()."                                                     );
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   // let's do the job now.
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx
index 3d2e846..a9d2ad8 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx
@@ -98,7 +98,7 @@ QuadEdgeMeshEulerOperatorFlipEdgeFunction< TMesh, TQEType >::CheckStatus(QEType
     }
 
   if ( this->m_Mesh->FindEdge( h->GetOnext()->GetDestination(),
-                               h->GetSym()->GetOnext()->GetDestination() ) != 0 )
+                               h->GetSym()->GetOnext()->GetDestination() ) != ITK_NULLPTR )
     {
     m_EdgeStatus = EXISTING_OPPOSITE_EDGE;
     return;
@@ -134,22 +134,22 @@ QuadEdgeMeshEulerOperatorFlipEdgeFunction< TMesh, TQEType >::Evaluate(QEType *h)
       return Process(h);
     case EDGE_NULL:
       itkDebugMacro("No Edge to flip.");
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
     case MESH_NULL:
       itkDebugMacro("No mesh present.");
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
     case NON_INTERNAL_EDGE:
       itkDebugMacro("Can only flip internal edge.");
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
     case NON_TRIANGULAR_LEFT_FACE:
       itkDebugMacro("Can only flip edge for triangles.");
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
     case NON_TRIANGULAR_RIGHT_FACE:
       itkDebugMacro("Can only flip edge for triangles.");
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
     case EXISTING_OPPOSITE_EDGE:
       itkDebugMacro("The opposite edge already exists.");
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
     }
 }
 
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx
index e0f470b..efebd23 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx
@@ -43,7 +43,7 @@ QuadEdgeMeshEulerOperatorJoinFacetFunction< TMesh, TQEType >::Evaluate(QEType *e
   if ( !e->IsInternal() )
     {
     itkDebugMacro("The edge is either border or wire.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   //     Initial state                           Final state        //
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx
index 3ab3a81..6401f00 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx
@@ -120,9 +120,9 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction< TMesh, TQEType >::Evaluate(QEType *
     case SAMOSA_CONFIG:
     // Eye case
     case EYE_CONFIG:
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
     case EDGE_JOINING_DIFFERENT_BORDERS:
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
     }
 }
 
@@ -197,7 +197,7 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction< TMesh, TQEType >::Process(QEType *e
     if ( QEType::m_NoPoint != zip->Evaluate(leftZip) )
       {
       itkDebugMacro("Zip must return NoPoint (left).");
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
       }
     }
   else
@@ -217,7 +217,7 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction< TMesh, TQEType >::Process(QEType *e
     if ( QEType::m_NoPoint != zip->Evaluate(riteZip) )
       {
       itkDebugMacro("Zip must return NoPoint (right).");
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
       }
     }
   else
@@ -283,7 +283,7 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction< TMesh, TQEType >::ProcessIsolatedFa
   // it now retuns one edge from NewDest or NewOrg if there are any
   // else NULL
   QEType *temp = this->m_Mesh->FindEdge(dest);
-  if ( temp != 0 )
+  if ( temp != ITK_NULLPTR )
     {
     return temp;
     }
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h
index 5e269b5..0a0f6e0 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h
@@ -61,13 +61,13 @@ public:
     if ( !e )
       {
       itkDebugMacro("Input is not an edge.");
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
       }
 
     if ( !this->m_Mesh )
       {
       itkDebugMacro("No mesh present.");
-      return ( (QEType *)0 );
+      return ( (QEType *)ITK_NULLPTR );
       }
 
     m_SplitVertex->SetInput(this->m_Mesh);
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx
index 12c6ad4..738b8e3 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx
@@ -45,32 +45,32 @@ QuadEdgeMeshEulerOperatorSplitFacetFunction< TMesh, TQEType >::Evaluate(QEType *
   if ( !h || !g )
     {
     itkDebugMacro("At least one of the Input is not an edge.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   if ( !this->m_Mesh )
     {
     itkDebugMacro("No mesh present.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   if ( h == g )
     {
     itkDebugMacro("Provided edges should be different.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   if ( h->GetLeft() != g->GetLeft() )
     {
     itkDebugMacro("The edges are not around the same face.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   if ( ( h->GetLnext() == g )
        || ( g->GetLnext() == h ) )
     {
     itkDebugMacro("Provided edges should NOT be consecutive.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   typedef typename MeshType::VertexRefType VertexRefType;
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx
index 3055c0b..cdef635 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx
@@ -29,25 +29,25 @@ QuadEdgeMeshEulerOperatorSplitVertexFunction< TMesh, TQEType >::Evaluate(QEType
   if ( !this->m_Mesh )
     {
     itkDebugMacro("No mesh present.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
-  if ( ( h == (QEType *)( 0 ) ) || ( g == (QEType *)( 0 ) ) )
+  if ( ( h == (QEType *)ITK_NULLPTR ) || ( g == (QEType *)ITK_NULLPTR ) )
     {
     itkDebugMacro("One or more argument(s) is(are) null.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   if ( h == g )
     {
     itkDebugMacro("The two half-edges are the same. No antenna allowed.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   if ( h->GetDestination() != g->GetDestination() )
     {
     itkDebugMacro("The two half-edges must be incident to the same vertex.");
-    return ( (QEType *)0 );
+    return ( (QEType *)ITK_NULLPTR );
     }
 
   // delete the faces
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx
index f79bd89..0db88cd 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx
@@ -24,10 +24,13 @@ namespace itk
 {
 // ---------------------------------------------------------------------
 template< typename TMesh, typename TQE >
-QuadEdgeMeshFrontBaseIterator< TMesh, TQE >::QuadEdgeMeshFrontBaseIterator(MeshType *mesh,
-                                                                           bool start,
-                                                                           QEType *seed):
-  m_Mesh(mesh), m_Seed(seed), m_Start(start)
+QuadEdgeMeshFrontBaseIterator< TMesh, TQE >::
+QuadEdgeMeshFrontBaseIterator(MeshType *mesh, bool start, QEType *seed) :
+  m_Mesh(mesh),
+  m_Seed(seed),
+  m_Start(start),
+  m_Front(ITK_NULLPTR),
+  m_CurrentEdge(ITK_NULLPTR)
 {
   if ( !mesh )
     {
@@ -122,7 +125,7 @@ QuadEdgeMeshFrontBaseIterator< TMesh, TQE >::operator++()
   // All the edge->Origin() neighbours were already visited. Remove
   // the edge from the front, and move to next edge...
   m_Front->pop_front();
-  m_CurrentEdge = (QEType *)0;
+  m_CurrentEdge = (QEType *)ITK_NULLPTR;
   return ( this->operator++() );
 }
 
@@ -143,7 +146,7 @@ QuadEdgeMeshFrontBaseIterator< TMesh, TQE >::FindDefaultSeed()
     {
     return edge->GetRot();
     }
-  return (QEType *)0;
+  return (QEType *)ITK_NULLPTR;
 }
 }
 #endif
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFunctionBase.h b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFunctionBase.h
index 4d5a998..bd6c6eb 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFunctionBase.h
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFunctionBase.h
@@ -86,7 +86,7 @@ public:
 protected:
   QuadEdgeMeshFunctionBase()
   {
-    m_Mesh = (MeshType *)0;
+    m_Mesh = (MeshType *)ITK_NULLPTR;
   }
 
   ~QuadEdgeMeshFunctionBase(){}
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.hxx
index 704a715..b9d6cf3 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.hxx
@@ -28,7 +28,7 @@ void
 QuadEdgeMeshPoint< TCoordRep, VPointDimension, TQuadEdge >
 ::Initialize()
 {
-  m_Edge = static_cast< TQuadEdge * >( NULL );
+  m_Edge = static_cast< TQuadEdge * >( ITK_NULLPTR );
 }
 
 // ---------------------------------------------------------------------
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h
index f94f0c6..fe76f16 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h
@@ -173,7 +173,7 @@ public:
     MakePointIds();
     if ( m_PointIds.size() == 0 )
       {
-      return ( static_cast< PointIdIterator >( 0 ) );
+      return ( static_cast< PointIdIterator >( ITK_NULLPTR ) );
       }
     else
       {
@@ -186,7 +186,7 @@ public:
     // NOTE ALEX: should update the array on the fly to make it faster
     if ( m_PointIds.size() == 0 )
       {
-      return ( static_cast< PointIdIterator >( 0 ) );
+      return ( static_cast< PointIdIterator >( ITK_NULLPTR ) );
       }
     else
       {
@@ -200,7 +200,7 @@ public:
     MakePointIds();
     if ( m_PointIds.size() == 0 )
       {
-      return ( static_cast< PointIdIterator >( 0 ) );
+      return ( static_cast< PointIdIterator >( ITK_NULLPTR ) );
       }
     else
       {
@@ -213,7 +213,7 @@ public:
     // NOTE ALEX: should update the array on the fly to make it faster
     if ( m_PointIds.size() == 0 )
       {
-      return ( static_cast< PointIdIterator >( 0 ) );
+      return ( static_cast< PointIdIterator >( ITK_NULLPTR ) );
       }
     else
       {
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h
index 56040ca..71b479e 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshToQuadEdgeMeshFilter.h
@@ -182,7 +182,7 @@ void CopyMeshToMeshPointData(const TInputMesh *in, TOutputMesh *out)
 
   const InputPointDataContainer *inputPointData = in->GetPointData();
 
-  if ( inputPointData == NULL )
+  if ( inputPointData == ITK_NULLPTR )
     {
     // There is nothing to copy
     return;
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h
index 4649e77..577dc96 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.h
@@ -76,7 +76,7 @@ public:
 protected:
   QuadEdgeMeshTopologyChecker();
   ~QuadEdgeMeshTopologyChecker(){}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   QuadEdgeMeshTopologyChecker(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx
index 3ba9cdb..3e75a30 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshTopologyChecker.hxx
@@ -31,7 +31,7 @@ QuadEdgeMeshTopologyChecker< TMesh >
   m_ExpectedNumberOfFaces = NumericTraits< CellIdentifier >::Zero;
   m_ExpectedNumberOfBoundaries = NumericTraits< CellIdentifier >::Zero;
   m_ExpectedGenus = NumericTraits< OffsetValueType >::Zero;
-  m_Mesh = NULL;
+  m_Mesh = ITK_NULLPTR;
 }
 
 template< typename TMesh >
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/src/itkQuadEdge.cxx b/Utilities/ITK/Modules/Core/QuadEdgeMesh/src/itkQuadEdge.cxx
index 1cea8a8..f7177ff 100644
--- a/Utilities/ITK/Modules/Core/QuadEdgeMesh/src/itkQuadEdge.cxx
+++ b/Utilities/ITK/Modules/Core/QuadEdgeMesh/src/itkQuadEdge.cxx
@@ -24,15 +24,15 @@ QuadEdge
 ::QuadEdge()
 {
   this->m_Onext = this;
-  this->m_Rot   = NULL;
+  this->m_Rot   = ITK_NULLPTR;
 }
 
 // ---------------------------------------------------------------------
 QuadEdge
 ::~QuadEdge()
 {
-  this->m_Onext = NULL;
-  this->m_Rot   = NULL;
+  this->m_Onext = ITK_NULLPTR;
+  this->m_Rot   = ITK_NULLPTR;
 }
 
 // ---------------------------------------------------------------------
@@ -440,7 +440,7 @@ QuadEdge
     ConstIterator it = this->BeginOnext();
     while ( it != this->EndOnext() )
       {
-      if ( it.Value() == NULL )
+      if ( it.Value() == ITK_NULLPTR )
         {
         return false;
         }
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.h
index d1fd626..1458ba6 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.h
@@ -92,13 +92,13 @@ public:
   virtual void Initialize();
 
   /** Clone the geometry frame */
-  virtual LightObject::Pointer InternalClone() const;
+  virtual LightObject::Pointer InternalClone() const ITK_OVERRIDE;
 
 protected:
 
   AffineGeometryFrame();
   virtual ~AffineGeometryFrame();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** used in clone to initialize the newly created geometry */
   virtual void InitializeGeometry(Self *newGeometry) const;
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.hxx
index d24fe6d..41a1ecd 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkAffineGeometryFrame.hxx
@@ -27,14 +27,14 @@ template< typename TScalar, unsigned int NDimensions >
 AffineGeometryFrame< TScalar, NDimensions >
 ::AffineGeometryFrame()
 {
-  m_BoundingBox = NULL;
+  m_BoundingBox = ITK_NULLPTR;
   m_IndexToObjectTransform = TransformType::New();
   m_IndexToObjectTransform->SetIdentity();
   m_ObjectToNodeTransform = TransformType::New();
   m_ObjectToNodeTransform->SetIdentity();
   m_IndexToNodeTransform = TransformType::New();
   m_IndexToNodeTransform->SetIdentity();
-  m_IndexToWorldTransform = 0;
+  m_IndexToWorldTransform = ITK_NULLPTR;
 }
 
 /** Destructor */
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx
index f6511d3..c4fd475 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx
@@ -104,7 +104,7 @@ ArrowSpatialObject< TDimension >
 {
   itkDebugMacro("Checking the point [" << point << "] is on the Line");
 
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
@@ -184,7 +184,7 @@ ArrowSpatialObject< TDimension >
   m_Length = m_Direction.GetSquaredNorm();
   if ( m_Length != 0.0 )
     {
-    m_Length = vcl_sqrt(m_Length);
+    m_Length = std::sqrt(m_Length);
     }
   else
     {
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.h
index 0330352..2262a4a 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.h
@@ -92,14 +92,14 @@ public:
   /** Returns true if the Blob is evaluable at the requested point,
    *  false otherwise. */
   bool IsEvaluableAt(const PointType & point,
-                     unsigned int depth = 0, char *name = NULL) const;
+                     unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns the value of the Blob at that point.
    *  Currently this function returns a binary value,
    *  but it might want to return a degree of membership
    *  in case of fuzzy Blobs. */
   bool ValueAt(const PointType & point, double & value,
-               unsigned int depth = 0, char *name = NULL) const;
+               unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns true if the point is inside the Blob, false otherwise. */
   bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx
index 4d3907c..2f968c0 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBlobSpatialObject.hxx
@@ -164,12 +164,12 @@ BlobSpatialObject< TDimension >
       typename PointType::VectorType difference =
         transformedPoint - it->GetPosition();
 
-      if ( vcl_fabs(difference[0]) <= 0.5
-           && vcl_fabs(difference[1]) <= 0.5 )
+      if ( std::fabs(difference[0]) <= 0.5
+           && std::fabs(difference[1]) <= 0.5 )
         {
         if ( TDimension == 3 )
           {
-          if ( vcl_fabs(difference[2]) <= 0.5 )
+          if ( std::fabs(difference[2]) <= 0.5 )
             {
             return true;
             }
@@ -193,7 +193,7 @@ BlobSpatialObject< TDimension >
 ::IsInside(const PointType & point, unsigned int depth, char *name) const
 {
   itkDebugMacro("Checking the point [" << point << "] is inside the blob");
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h
index 9faff6d..46ba3d0 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.h
@@ -61,13 +61,13 @@ public:
    *  That's useful for fuzzy objects. */
   virtual bool ValueAt(const PointType & point, double & value,
                        unsigned int depth = 0,
-                       char *name = NULL) const;
+                       char *name = ITK_NULLPTR) const;
 
   /** Return true if the object provides a method to evaluate the value
    * at the specified point, false otherwise. */
   virtual bool IsEvaluableAt(const PointType & point,
                              unsigned int depth = 0,
-                             char *name = NULL) const;
+                             char *name = ITK_NULLPTR) const;
 
   /** Test whether a point is inside or outside the object */
   virtual bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx
index 0cbaad6..f71e43b 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkBoxSpatialObject.hxx
@@ -91,7 +91,7 @@ BoxSpatialObject< TDimension >
   itkDebugMacro("Checking the point ["
                 << point << "] is inside the AxisAlignedBox");
 
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
@@ -135,22 +135,27 @@ BoxSpatialObject< TDimension >
 
     bb->SetMinimum(pntMin);
     bb->SetMaximum(pntMax);
-
-    const_cast< BoundingBoxType * >( this->GetBounds() )->SetMinimum(pntMin);
-    const_cast< BoundingBoxType * >( this->GetBounds() )->SetMinimum(pntMax);
-
     bb->ComputeBoundingBox();
 
+    // Next Transform the corners of the bounding box
     typedef typename BoundingBoxType::PointsContainer PointsContainer;
     const PointsContainer *corners = bb->GetCorners();
-    typename BoundingBoxType::PointsContainer::const_iterator
-    it = corners->begin();
+    typename PointsContainer::Pointer transformedCorners = PointsContainer::New();
+    transformedCorners->Reserve(corners->size());
+
+    typename PointsContainer::const_iterator it = corners->begin();
+    typename PointsContainer::iterator itTrans = transformedCorners->begin();
     while ( it != corners->end() )
       {
       PointType pnt = this->GetIndexToWorldTransform()->TransformPoint(*it);
-      const_cast< BoundingBoxType * >( this->GetBounds() )->ConsiderPoint(pnt);
+      *itTrans = pnt;
       ++it;
+      ++itTrans;
       }
+
+    // refresh the bounding box with the transformed corners
+    const_cast< BoundingBoxType * >( this->GetBounds() )->SetPoints(transformedCorners);
+    this->GetBounds()->ComputeBoundingBox();
     }
   return true;
 }
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h
index cf6d16a..c4141b6 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkContourSpatialObject.h
@@ -135,14 +135,14 @@ public:
    * Note: For this class, this will always return false. -GH
    */
   bool IsEvaluableAt(const PointType & point,
-                     unsigned int depth = 0, char *name = NULL) const;
+                     unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns the value of the Contour at that point.
    *  Currently this function returns a binary value,
    *  but it might want to return a degree of membership
    *  in case of fuzzy Contours. */
   bool ValueAt(const PointType & point, double & value,
-               unsigned int depth = 0, char *name = NULL) const;
+               unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns true if the point is inside the Contour, false otherwise. */
   bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkCylinderSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkCylinderSpatialObject.h
index 169bbd1..5a1b3ba 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkCylinderSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkCylinderSpatialObject.h
@@ -64,18 +64,18 @@ public:
    *  That's useful for fuzzy objects. */
   virtual bool ValueAt(const PointType & point, double & value,
                        unsigned int depth = 0,
-                       char *name = NULL) const;
+                       char *name = ITK_NULLPTR) const ITK_OVERRIDE;
 
   /** Return true if the object provides a method to evaluate the value
    * at the specified point, false otherwise. */
   virtual bool IsEvaluableAt(const PointType & point,
                              unsigned int depth = 0,
-                             char *name = NULL) const;
+                             char *name = ITK_NULLPTR) const ITK_OVERRIDE;
 
   /** Test whether a point is inside or outside the object */
   virtual bool IsInside(const PointType & point,
                         unsigned int depth,
-                        char *) const;
+                        char *) const ITK_OVERRIDE;
 
   /** Test whether a point is inside or outside the object
    *  For computational speed purposes, it is faster if the method does not
@@ -85,7 +85,7 @@ public:
   /** Get the boundaries of a specific object.  This function needs to
    *  be called every time one of the object's components is
    *  changed. */
-  virtual bool ComputeLocalBoundingBox() const;
+  virtual bool ComputeLocalBoundingBox() const ITK_OVERRIDE;
 
 protected:
   CylinderSpatialObject(const Self &); //purposely not implemented
@@ -98,7 +98,7 @@ protected:
   double m_Height;
 
   /** Print the object informations in a stream. */
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 };
 } // end namespace itk
 
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.h
index d92f07d..648b605 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.h
@@ -73,13 +73,13 @@ public:
    *  That's useful for fuzzy objects. */
   virtual bool ValueAt(const PointType & point, double & value,
                        unsigned int depth = 0,
-                       char *name = NULL) const;
+                       char *name = ITK_NULLPTR) const;
 
   /** Return true if the object provides a method to evaluate the value
    * at the specified point, false otherwise. */
   virtual bool IsEvaluableAt(const PointType & point,
                              unsigned int depth = 0,
-                             char *name = NULL) const;
+                             char *name = ITK_NULLPTR) const;
 
   /** Test whether a point is inside or outside the object */
   virtual bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx
index 8a4fc62..b773d73 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkEllipseSpatialObject.hxx
@@ -102,7 +102,7 @@ EllipseSpatialObject< TDimension >
 {
   itkDebugMacro("Checking the point [" << point << "] is inside the Ellipse");
 
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h
index cf6d9fc..5a5313e 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.h
@@ -85,13 +85,13 @@ public:
   /** Returns the value of the Gaussian at the given point.  */
   virtual bool ValueAt(const PointType & point, ScalarType & value,
                        unsigned int depth = 0,
-                       char *name = NULL) const;
+                       char *name = ITK_NULLPTR) const;
 
   /** Return true if the object provides a method to evaluate the value
    * at the specified point, false otherwise. */
   virtual bool IsEvaluableAt(const PointType & point,
                              unsigned int depth = 0,
-                             char *name = NULL) const;
+                             char *name = ITK_NULLPTR) const;
 
   /** Test whether a point is inside or outside the object */
   virtual bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx
index 68924ad..cb033bf 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx
@@ -117,7 +117,7 @@ GaussianSpatialObject< TDimension >
   itkDebugMacro("Checking the point [" << point
                                        << "] is inside the GaussianSpatialObject");
 
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
@@ -207,7 +207,7 @@ GaussianSpatialObject< TDimension >
   if ( IsInside(point, 0, name) )
     {
     const double zsq = this->SquaredZScore(point);
-    value = m_Maximum * (ScalarType)vcl_exp(-zsq / 2.0);
+    value = m_Maximum * (ScalarType)std::exp(-zsq / 2.0);
     return true;
     }
   else if ( Superclass::IsEvaluableAt(point, depth, name) )
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h
index c83fd4e..c33e874 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.h
@@ -84,6 +84,11 @@ public:
    * volumes. */
   RegionType GetAxisAlignedBoundingBoxRegion() const;
 
+  /** Get the boundaries of a specific object.  This function needs to
+   *  be called every time one of the object's components is
+   *  changed. */
+  virtual bool ComputeLocalBoundingBox() const;
+
 protected:
   ImageMaskSpatialObject(const Self &); //purposely not implemented
   void operator=(const Self &);         //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx
index 96fa5e5..f3f5c07 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx
@@ -85,7 +85,7 @@ bool
 ImageMaskSpatialObject< TDimension >
 ::IsInside(const PointType & point, unsigned int depth, char *name) const
 {
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
@@ -248,6 +248,70 @@ ImageMaskSpatialObject< TDimension >
   return region;
 }
 
+template< unsigned int TDimension >
+bool
+ImageMaskSpatialObject< TDimension >
+::ComputeLocalBoundingBox() const
+{
+  itkDebugMacro("Computing ImageMaskSpatialObject bounding box");
+
+  if ( this->GetBoundingBoxChildrenName().empty()
+       || strstr( typeid( Self ).name(),
+                  this->GetBoundingBoxChildrenName().c_str() ) )
+    {
+
+    // First get the region bounding box...
+    RegionType boundingRegion = GetAxisAlignedBoundingBoxRegion();
+    const typename RegionType::IndexType index = boundingRegion.GetIndex();
+    const typename RegionType::SizeType  size = boundingRegion.GetSize();
+
+    //Now find the corners (by index)
+    typedef VectorContainer< unsigned int, typename RegionType::IndexType >
+                                                         IndexContainerType;
+
+    typename IndexContainerType::Pointer cornerInds = IndexContainerType::New();
+
+    unsigned int c = 0;
+    cornerInds->InsertElement(c++, index);
+    for ( unsigned int i = 0; i < ImageType::ImageDimension; ++i )
+      {
+      unsigned int curSize = cornerInds->Size();
+      for ( unsigned int ii = 0; ii < curSize; ++ii)
+        {
+        IndexType tmpIndex = cornerInds->ElementAt(ii);
+        tmpIndex[i] += size[i];
+        cornerInds->InsertElement(c++,tmpIndex);
+        }
+      }
+
+    // Next Transform the corners of the bounding box
+    typedef typename BoundingBoxType::PointsContainer PointsContainer;
+    typename PointsContainer::Pointer transformedCorners = PointsContainer::New();
+    transformedCorners->Reserve(cornerInds->size());
+
+    typename IndexContainerType::const_iterator it = cornerInds->begin();
+    typename PointsContainer::iterator itTrans = transformedCorners->begin();
+    while ( it != cornerInds->end() )
+      {
+      PointType origPnt;
+      for ( unsigned int i = 0; i < ImageType::ImageDimension; ++i )
+        {
+        origPnt[i] = static_cast< typename PointType::CoordRepType>( (*it)[i]);
+        }
+      PointType pnt = this->GetIndexToWorldTransform()->TransformPoint(origPnt);
+      *itTrans = pnt;
+      ++it;
+      ++itTrans;
+      }
+
+    // refresh the bounding box with the transformed corners
+    const_cast< BoundingBoxType * >( this->GetBounds() )->SetPoints(transformedCorners);
+    this->GetBounds()->ComputeBoundingBox();
+    }
+  return true;
+}
+
+
 /** Print the object */
 template< unsigned int TDimension >
 void
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h
index fd2a9e7..22dcb87 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageSpatialObject.h
@@ -79,13 +79,13 @@ public:
   /** Return true if the object is evaluable at the requested point,
    *  and else otherwise. */
   bool IsEvaluableAt(const PointType & point,
-                     unsigned int depth = 0, char *name = NULL) const;
+                     unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns the value of the image at the requested point.
    *  If the point is not inside the object, then an exception is thrown.
    * \sa ExceptionObject */
   bool ValueAt(const PointType & point, double & value,
-               unsigned int depth = 0, char *name = NULL) const;
+               unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns true if the point is inside, false otherwise. */
   bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx
index 884254e..8a27401 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx
@@ -38,7 +38,7 @@ ImageSpatialObject< TDimension,  PixelType >
     }
 
   this->ComputeBoundingBox();
-  this->InternalSetPixelType(static_cast<const PixelType *>(0));
+  this->InternalSetPixelType(static_cast<const PixelType *>(ITK_NULLPTR));
   m_Interpolator = NNInterpolatorType::New();
 }
 
@@ -123,7 +123,7 @@ bool
 ImageSpatialObject< TDimension,  PixelType >
 ::IsInside(const PointType & point, unsigned int depth, char *name) const
 {
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.h
index a13f1da..6d2a68c 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.h
@@ -84,14 +84,14 @@ public:
   /** Returns true if the Landmark is evaluable at the requested point,
    *  false otherwise. */
   bool IsEvaluableAt(const PointType & point,
-                     unsigned int depth = 0, char *name = NULL) const;
+                     unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns the value of the Landmark at that point.
    *  Currently this function returns a binary value,
    *  but it might want to return a degree of membership
    *  in case of fuzzy Landmarks. */
   bool ValueAt(const PointType & point, double & value,
-               unsigned int depth = 0, char *name = NULL) const;
+               unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns true if the point is inside the Landmark, false otherwise. */
   bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx
index 8501cdb..2d30987 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLandmarkSpatialObject.hxx
@@ -180,7 +180,7 @@ LandmarkSpatialObject< TDimension >
 {
   itkDebugMacro("Checking the point [" << point << "] is inside the blob");
 
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLineSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLineSpatialObject.h
index c51d0af..7412c0b 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLineSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLineSpatialObject.h
@@ -88,14 +88,14 @@ public:
   /** Returns true if the line is evaluable at the requested point,
    *  false otherwise. */
   bool IsEvaluableAt(const PointType & point,
-                     unsigned int depth = 0, char *name = NULL) const;
+                     unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns the value of the line at that point.
    * Currently this function returns a binary value,
    * but it might want to return a degree of membership
    * in case of fuzzy Lines. */
   bool ValueAt(const PointType & point, double & value,
-               unsigned int depth = 0, char *name = NULL) const;
+               unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns true if the point is inside the line, false otherwise. */
   bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx
index b4e51dd..80f3f4f 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkLineSpatialObject.hxx
@@ -160,7 +160,7 @@ LineSpatialObject< TDimension >
 {
   itkDebugMacro("Checking the point [" << point << "] is on the Line");
 
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.h
index 049d1d4..57cbfa3 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.h
@@ -73,13 +73,13 @@ public:
   /** Return true if the object is evaluable at the requested point,
    *  and else otherwise. */
   bool IsEvaluableAt(const PointType & point,
-                     unsigned int depth = 0, char *name = NULL) const;
+                     unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns the value of the Mesh at the requested point.
    *  If the point is not inside the object, then an exception is thrown.
    * \sa ExceptionObject */
   bool ValueAt(const PointType & point, double & value,
-               unsigned int depth = 0, char *name = NULL) const;
+               unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns true if the point is inside, false otherwise. */
   bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx
index 5b2e643..0de92aa 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx
@@ -85,7 +85,7 @@ MeshSpatialObject< TMesh >
         {
         double minDist = 0.0;
         const bool pointIsInside = it.Value()->EvaluatePosition(
-          position, m_Mesh->GetPoints(), NULL, NULL, &minDist, NULL);
+          position, m_Mesh->GetPoints(), ITK_NULLPTR, ITK_NULLPTR, &minDist, ITK_NULLPTR);
 
         if ( pointIsInside  && minDist <= this->m_IsInsidePrecision )
           {
@@ -95,7 +95,7 @@ MeshSpatialObject< TMesh >
       else
         {
         if ( it.Value()->EvaluatePosition(position, m_Mesh->GetPoints(),
-                                          NULL, NULL, NULL, NULL) )
+                                          ITK_NULLPTR, ITK_NULLPTR, ITK_NULLPTR, ITK_NULLPTR) )
           {
           return true;
           }
@@ -112,7 +112,7 @@ bool
 MeshSpatialObject< TMesh >
 ::IsInside(const PointType & point, unsigned int depth, char *name) const
 {
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx
index ee5bee4..f8900ce 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx
@@ -44,7 +44,7 @@ MetaArrowConverter< NDimensions >
 ::MetaObjectToSpatialObject( const MetaObjectType *mo )
 {
   const ArrowMetaObjectType *metaArrow = dynamic_cast<const MetaArrow *>(mo);
-  if(metaArrow == 0)
+  if(metaArrow == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't convert MetaObject to MetaArrow");
     }
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx
index da5abe5..be86b0d 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx
@@ -43,16 +43,13 @@ MetaBlobConverter< NDimensions >
 ::MetaObjectToSpatialObject(const MetaObjectType *mo)
 {
   const BlobMetaObjectType *Blob = dynamic_cast<const BlobMetaObjectType *>(mo);
-  if(Blob == 0)
+  if(Blob == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't downcast MetaObject to BlobMetaObject");
     }
 
   typename BlobSpatialObjectType::Pointer blob = BlobSpatialObjectType::New();
 
-  //typedef BlobSpatialObjectType::VectorType VectorType;
-  typedef vnl_vector< double > VectorType;
-
   unsigned int ndims = Blob->NDims();
   double       spacing[NDimensions];
   for ( unsigned int ii = 0; ii < ndims; ii++ )
@@ -70,7 +67,6 @@ MetaBlobConverter< NDimensions >
   blob->GetProperty()->SetAlpha(Blob->Color()[3]);
 
   typedef itk::SpatialObjectPoint< NDimensions > BlobPointType;
-  typedef BlobPointType *                        BlobPointPointer;
 
   MetaBlob::PointListType::const_iterator it2 = Blob->GetPoints().begin();
 
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx
index 26cf919..5936d89 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx
@@ -44,7 +44,7 @@ MetaContourConverter< NDimensions >
 ::MetaObjectToSpatialObject(const MetaObjectType *mo)
 {
   const ContourMetaObjectType *contourMO = dynamic_cast<const MetaContour *>(mo);
-  if(contourMO == 0)
+  if(contourMO == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't downcast MetaObject to MetaContour");
     }
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx
index 7d36dd4..c89d342 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx
@@ -43,7 +43,7 @@ MetaDTITubeConverter< NDimensions >
 ::MetaObjectToSpatialObject(const MetaObjectType *mo)
 {
   const MetaDTITube *tube = dynamic_cast<const MetaDTITube *>(mo);
-  if(tube == 0)
+  if(tube == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't downcast MetaObject to MetaDTITube");
     }
@@ -69,7 +69,6 @@ MetaDTITubeConverter< NDimensions >
   tubeSO->GetProperty()->SetAlpha(tube->Color()[3]);
 
   typedef itk::DTITubeSpatialObjectPoint< NDimensions > TubePointType;
-  typedef TubePointType *                               TubePointPointer;
 
   MetaDTITube::PointListType::const_iterator it2 = tube->GetPoints().begin();
 
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx
index 0ab8c38..0a1a193 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx
@@ -43,7 +43,7 @@ MetaEllipseConverter< NDimensions >
 ::MetaObjectToSpatialObject(const MetaObjectType *mo)
 {
   const EllipseMetaObjectType *ellipseMO = dynamic_cast<const EllipseMetaObjectType *>(mo);
-  if(ellipseMO == 0)
+  if(ellipseMO == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't downcast MetaObject to EllipseMetaObject");
     }
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx
index d98d998..6e93c12 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx
@@ -44,7 +44,7 @@ MetaGaussianConverter< NDimensions >
 {
   const GaussianMetaObjectType *gaussian =
     dynamic_cast<const GaussianMetaObjectType *>(mo);
-  if(gaussian == 0)
+  if(gaussian == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't convert MetaObject to MetaGaussian" );
     }
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx
index 9a26083..55fe0bd 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx
@@ -43,7 +43,7 @@ MetaGroupConverter< NDimensions >
 ::MetaObjectToSpatialObject(const MetaObjectType *mo)
 {
   const GroupMetaObjectType *group = dynamic_cast<const GroupMetaObjectType *>(mo);
-  if(group == 0)
+  if(group == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't convert MetaObject to MetaGroup" );
     }
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx
index 9157ec4..1788ca3 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx
@@ -53,7 +53,6 @@ MetaImageConverter< NDimensions, PixelType, TSpatialObjectType >
 {
   typename ImageType::Pointer rval = ImageType::New();
 
-  typedef typename ImageType::Pointer     ImagePointer;
   typedef typename ImageType::SizeType    SizeType;
   typedef typename ImageType::SpacingType SpacingType;
   typedef typename ImageType::RegionType  RegionType;
@@ -96,7 +95,7 @@ MetaImageConverter< NDimensions, PixelType, TSpatialObjectType >
   const ImageMetaObjectType *imageMO =
     dynamic_cast<const ImageMetaObjectType *>(mo);
 
-  if(imageMO == 0)
+  if(imageMO == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't convert MetaObject to MetaImage" );
     }
@@ -137,8 +136,6 @@ MetaImageConverter< NDimensions, PixelType, TSpatialObjectType >
     itkExceptionMacro(<< "Can't downcast SpatialObject to ImageSpatialObject");
     }
   typedef typename ImageType::ConstPointer     ImageConstPointer;
-  typedef typename ImageType::SizeType         SizeType;
-  typedef typename ImageType::RegionType       RegionType;
 
   ImageConstPointer SOImage = imageSO->GetImage();
 
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx
index 07583f9..3b4ea53 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx
@@ -44,7 +44,7 @@ MetaLandmarkConverter< NDimensions >
 {
   const LandmarkMetaObjectType *landmarkMO =
     dynamic_cast<const LandmarkMetaObjectType *>(mo);
-  if(landmarkMO == 0)
+  if(landmarkMO == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't convert MetaObject to MetaLandmark");
     }
@@ -52,9 +52,6 @@ MetaLandmarkConverter< NDimensions >
   LandmarkSpatialObjectPointer landmarkSO =
     LandmarkSpatialObjectType::New();
 
-  //typedef LandmarkSpatialObjectType::VectorType VectorType;
-  typedef vnl_vector< double > VectorType;
-
   unsigned int ndims = landmarkMO->NDims();
   double       spacing[NDimensions];
   for ( unsigned int ii = 0; ii < ndims; ii++ )
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx
index bece3da..7611c03 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx
@@ -44,7 +44,7 @@ MetaLineConverter< NDimensions >
 {
   const LineMetaObjectType *lineMO =
     dynamic_cast<const LineMetaObjectType *>(mo);
-  if(lineMO == 0)
+  if(lineMO == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't convert MetaObject to MetaLine" );
     }
@@ -68,7 +68,6 @@ MetaLineConverter< NDimensions >
   lineSO->GetProperty()->SetAlpha(lineMO->Color()[3]);
 
   typedef itk::LineSpatialObjectPoint< NDimensions > LinePointType;
-  typedef LinePointType *                            LinePointPointer;
 
   typedef MetaLine::PointListType ListType;
   ListType::const_iterator it2 = lineMO->GetPoints().begin();
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx
index 89d6932..66c5a05 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx
@@ -49,7 +49,7 @@ MetaMeshConverter< NDimensions, PixelType, TMeshTraits >
 {
   const MeshMetaObjectType *_mesh =
     dynamic_cast<const MeshMetaObjectType *>(mo);
-  if(_mesh == 0)
+  if(_mesh == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't convert MetaObject to MetaMesh");
     }
@@ -244,7 +244,7 @@ MetaMeshConverter< NDimensions, PixelType, TMeshTraits >
     {
     std::cout << "MetaMeshConverter : GetMesh() returned a NULL Pointer"
               << std::endl;
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   // fill in the Mesh information
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h
index d00ef08..34492ef 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.h
@@ -67,7 +67,7 @@ public:
   /** write out a Scene SpatialObject */
   bool WriteMeta(SceneType *scene, const char *fileName,
                  unsigned int depth = MaximumDepth,
-                 char *spatialObjectTypeName = NULL);
+                 char *spatialObjectTypeName = ITK_NULLPTR);
 
   const MetaEvent * GetEvent() const { return m_Event; }
   void  SetEvent(MetaEvent *event) { m_Event = event; }
@@ -99,7 +99,7 @@ public:
 
   MetaScene * CreateMetaScene(SceneType *scene,
                               unsigned int depth = MaximumDepth,
-                              char *name = NULL);
+                              char *name = ITK_NULLPTR);
 
   ScenePointer CreateSpatialObjectScene(MetaScene *scene);
 
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx
index 18fa8b5..b495895 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx
@@ -47,7 +47,7 @@ MetaSceneConverter< NDimensions, PixelType, TMeshTraits >
 {
   // default behaviour of scene converter is not to save transform
   // with each spatial object.
-  m_Event = NULL;
+  m_Event = ITK_NULLPTR;
   m_BinaryPoints = false;
   m_TransformPrecision = 6;
   m_WriteImagesInSeparateFile = false;
@@ -336,7 +336,6 @@ MetaSceneConverter< NDimensions, PixelType, TMeshTraits >
       }
     else if ( spatialObjectTypeName == "MeshSpatialObject" )
       {
-      typedef itk::Mesh< PixelType, NDimensions, TMeshTraits > MeshType;
       currentMeta = this->SpatialObjectToMetaObject< MetaMeshConverter< NDimensions, PixelType, TMeshTraits > > ( *it );
       }
     else
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx
index 9b3a70c..97b4974 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx
@@ -43,7 +43,7 @@ MetaSurfaceConverter< NDimensions >
 ::MetaObjectToSpatialObject(const MetaObjectType *mo)
 {
   const SurfaceMetaObjectType *surfaceMO = dynamic_cast<const SurfaceMetaObjectType *>(mo);
-  if(surfaceMO == 0)
+  if(surfaceMO == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't convert MetaObject to MetaSurface");
     }
@@ -66,7 +66,6 @@ MetaSurfaceConverter< NDimensions >
   surfaceSO->GetProperty()->SetAlpha(surfaceMO->Color()[3]);
 
   typedef typename SurfaceSpatialObjectType::SurfacePointType SurfacePointType;
-  typedef SurfacePointType *                                  SurfacePointPointer;
 
   typedef SurfaceMetaObjectType::PointListType ListType;
 
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx
index e444e96..eb002a3 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx
@@ -44,7 +44,7 @@ MetaTubeConverter< NDimensions >
 {
   const TubeMetaObjectType *tubeMO =
     dynamic_cast<const TubeMetaObjectType *>(mo);
-  if(tubeMO == 0)
+  if(tubeMO == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't convert MetaObject to MetaTube" );
     }
@@ -69,7 +69,6 @@ MetaTubeConverter< NDimensions >
   tubeSO->GetProperty()->SetAlpha(tubeMO->Color()[3]);
 
   typedef itk::TubeSpatialObjectPoint< NDimensions > TubePointType;
-  typedef TubePointType *                            TubePointPointer;
 
   typedef MetaTube::PointListType ListType;
   ListType::const_iterator it2 = tubeMO->GetPoints().begin();
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx
index 6fea806..dbf2fe6 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx
@@ -44,7 +44,7 @@ MetaVesselTubeConverter< NDimensions >
 {
   const VesselTubeMetaObjectType *vesselTubeMO =
     dynamic_cast<const VesselTubeMetaObjectType *>(mo);
-  if(vesselTubeMO == 0)
+  if(vesselTubeMO == ITK_NULLPTR)
     {
     itkExceptionMacro(<< "Can't convert MetaObject to MetaVesselTube" );
     }
@@ -72,7 +72,6 @@ MetaVesselTubeConverter< NDimensions >
   vesselTubeSO->GetProperty()->SetAlpha(vesselTubeMO->Color()[3]);
 
   typedef itk::VesselTubeSpatialObjectPoint< NDimensions > VesselTubePointType;
-  typedef VesselTubePointType *                            TubePointPointer;
 
   typedef VesselTubeMetaObjectType::PointListType ListType;
   ListType::const_iterator it2 = vesselTubeMO->GetPoints().begin();
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.h
index 4a5d1ec..dde4ee1 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.h
@@ -61,12 +61,12 @@ public:
   /** Returns a degree of membership to the object.
    *  That's useful for fuzzy objects. */
   virtual bool ValueAt(const PointType & point, double & value,
-                       unsigned int depth = 0, char *name = NULL) const;
+                       unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** return ture if the object provides a method to evaluate the value
    * at the specified point, else otherwise. */
   virtual bool IsEvaluableAt(const PointType & point,
-                             unsigned int depth = 0, char *name = NULL) const;
+                             unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Test whether a point is inside or outside the object */
   virtual bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.hxx
index 8386bd6..bb5fbec 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPlaneSpatialObject.hxx
@@ -81,7 +81,7 @@ PlaneSpatialObject< TDimension >
 {
   itkDebugMacro("Checking the point [" << point << "is inside the plane");
 
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.h
index 09e347a..cef6c53 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPointBasedSpatialObject.h
@@ -62,7 +62,7 @@ public:
   {
     itkWarningMacro(<< "PointBasedSpatialObject::GetPoint() is not implemented"
                     << " in the base class" << std::endl);
-    return 0;
+    return ITK_NULLPTR;
   }
 
   virtual SpatialObjectPointType *
@@ -70,7 +70,7 @@ public:
   {
     itkWarningMacro(<< "PointBasedSpatialObject::GetPoint() is not implemented"
                     << " in the base class" << std::endl);
-    return 0;
+    return ITK_NULLPTR;
   }
 
   /** Return the number of points in the list */
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.h
index 2c7a8b0..89b60a8 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.h
@@ -97,7 +97,7 @@ public:
   /** Test whether a point is inside or outside the object. */
   virtual bool IsInside(const PointType & point,
                         unsigned int depth = 0,
-                        char *name = NULL) const;
+                        char *name = ITK_NULLPTR) const;
 
 protected:
   PolygonGroupSpatialObject(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.hxx
index b2ab53e..7457086 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonGroupSpatialObject.hxx
@@ -70,7 +70,7 @@ bool PolygonGroupSpatialObject< TDimension >::IsClosed()
     {
     PolygonSpatialObject< TDimension > *curstrand =
       dynamic_cast< PolygonSpatialObject< TDimension > * >( ( *it ).GetPointer() );
-    if ( curstrand != 0 )
+    if ( curstrand != ITK_NULLPTR )
       {
       if ( !curstrand->IsClosed() )
         {
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx
index 507f122..73b24e8 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkPolygonSpatialObject.hxx
@@ -138,10 +138,10 @@ PolygonSpatialObject< TDimension >
 ::MeasureArea() const
 {
   //To find the area of a planar polygon not in the x-y plane, use:
-  //2 A(P) = vcl_abs(N . (sum_{i=0}^{n-1} (v_i x v_{i+1})))
+  //2 A(P) = std::abs(N . (sum_{i=0}^{n-1} (v_i x v_{i+1})))
   //where N is a unit vector normal to the plane. The `.' represents the
   //dot product operator, the `x' represents the cross product operator,
-  //        and vcl_abs() is the absolute value function.
+  //        and std::abs() is the absolute value function.
   double area = 0.0;
   int    numpoints = this->NumberOfPoints();
   int    X, Y;
@@ -411,7 +411,7 @@ bool
 PolygonSpatialObject< TDimension >
 ::IsInside(const PointType & point) const
 {
-  return this->IsInside(point, 0, NULL);
+  return this->IsInside(point, 0, ITK_NULLPTR);
 }
 
 template< unsigned int TDimension >
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.h
index c83a14c..c9cbdfc 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.h
@@ -71,12 +71,12 @@ public:
    *  \warning This function creates a new list therefore
    *  the user is responsible for the deletion of the list. */
   ObjectListType * GetObjects(unsigned int depth = MaximumDepth,
-                              char *name = NULL);
+                              char *name = ITK_NULLPTR);
 
   /** Returns the number of children currently assigned to
    *  the SceneSpatialObject object. */
   unsigned int GetNumberOfObjects(unsigned int depth = MaximumDepth,
-                                  char *name = NULL);
+                                  char *name = ITK_NULLPTR);
 
   /** Set the list of pointers to children to the list passed as
 * argument. */
@@ -84,7 +84,7 @@ public:
 
   /** Returns the latest modified time of all the objects contained
    *  in this SceneSpatialObject object. */
-  ModifiedTimeType GetMTime(void) const;
+  virtual ModifiedTimeType GetMTime(void) const ITK_OVERRIDE;
 
   /** Get/Set the ParentID */
   void SetParentId(int parentid) { m_ParentId = parentid; }
@@ -122,7 +122,7 @@ protected:
   virtual ~SceneSpatialObject();
 
   /** Print the object informations in a stream. */
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Parent ID : default = -1 */
   int m_ParentId;
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.hxx
index 46c3b80..f263f8c 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSceneSpatialObject.hxx
@@ -26,7 +26,7 @@ namespace itk
 /** Constructor */
 template< unsigned int TSpaceDimension >
 SceneSpatialObject< TSpaceDimension >
-::SceneSpatialObject()
+::SceneSpatialObject() : m_ParentId(0)
 {}
 
 /** Destructor */
@@ -106,7 +106,7 @@ SceneSpatialObject< TSpaceDimension >
 
   while ( it != itEnd )
     {
-    if ( name == NULL || strstr(typeid( **it ).name(), name) )
+    if ( name == ITK_NULLPTR || strstr(typeid( **it ).name(), name) )
       {
       newList->push_back(*it);
       }
@@ -155,7 +155,7 @@ SceneSpatialObject< TSpaceDimension >
   unsigned int cnt = 0;
   while ( it != itEnd )
     {
-    if ( name == NULL || strstr(typeid( **it ).name(), name) )
+    if ( name == ITK_NULLPTR || strstr(typeid( **it ).name(), name) )
       {
       cnt++;
       }
@@ -247,7 +247,7 @@ SceneSpatialObject< TSpaceDimension >
     it++;
     }
 
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 template< unsigned int TSpaceDimension >
@@ -268,7 +268,7 @@ SceneSpatialObject< TSpaceDimension >
       SpatialObject< TSpaceDimension > *parentObject =
         static_cast< SpatialObject< TSpaceDimension > * >
         ( this->GetObjectById(parentId) );
-      if ( parentObject == NULL )
+      if ( parentObject == ITK_NULLPTR )
         {
         ret = false;
         ++it;
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObject.h
index 706ccb7..203a066 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObject.h
@@ -167,7 +167,7 @@ public:
   /** Returns the value at a point */
   virtual bool ValueAt(const PointType & point, double & value,
                        unsigned int depth = 0,
-                       char *name = NULL) const;
+                       char *name = ITK_NULLPTR) const;
 
   /** Returns true if the object can provide a "meaningful" value at
    * a point.   Often defaults to returning same answer as IsInside, but
@@ -177,12 +177,12 @@ public:
    */
   virtual bool IsEvaluableAt(const PointType & point,
                              unsigned int depth = 0,
-                             char *name = NULL) const;
+                             char *name = ITK_NULLPTR) const;
 
   /** Returns true if a point is inside the object. */
   virtual bool IsInside(const PointType & point,
                         unsigned int depth = 0,
-                        char *name = NULL) const;
+                        char *name = ITK_NULLPTR) const;
 
   /** Returns true if a point is inside the object - provided
    * to make spatial objects compatible with spatial functions
@@ -198,11 +198,11 @@ public:
                             short unsigned int order,
                             OutputVectorType & value,
                             unsigned int depth = 0,
-                            char *name = NULL);
+                            char *name = ITK_NULLPTR);
 
   /** Returns the latest modified time of the spatial object, and
    * any of its components. */
-  ModifiedTimeType GetMTime(void) const;
+  virtual ModifiedTimeType GetMTime(void) const ITK_OVERRIDE;
 
   /** Returns the latest modified time of the spatial object, but not
    *  the modification time of the children */
@@ -249,7 +249,7 @@ public:
    * region of the data object passed in as a parameter.  This method
    * implements the API from DataObject. The data object parameter must be
    * castable to an ImageBase. */
-  virtual void SetRequestedRegion(const DataObject *data);
+  virtual void SetRequestedRegion(const DataObject *data) ITK_OVERRIDE;
 
   /** Get the region object that defines the size and starting index
    * for the region of the image requested (i.e., the region of the
@@ -315,7 +315,7 @@ public:
    * ImageBase has more meta-data than its DataObject.  Thus, it must
    * provide its own version of CopyInformation() in order to copy the
    * LargestPossibleRegion from the input parameter. */
-  virtual void CopyInformation(const DataObject *data);
+  virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE;
 
   /** Update the information for this DataObject so that it can be used
    * as an output of a ProcessObject.  This method is used the pipeline
@@ -324,12 +324,12 @@ public:
    * ProcessObject::UpdateOutputInformation() which determines modified
    * times, LargestPossibleRegions, and any extra meta data like spacing,
    * origin, etc. */
-  virtual void UpdateOutputInformation();
+  virtual void UpdateOutputInformation() ITK_OVERRIDE;
 
   /** Set the RequestedRegion to the LargestPossibleRegion.  This
    * forces a filter to produce all of the output in one execution
    * (i.e. not streaming) on the next call to Update(). */
-  virtual void SetRequestedRegionToLargestPossibleRegion();
+  virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE;
 
   /** Determine whether the RequestedRegion is outside of the
    * BufferedRegion. This method returns true if the RequestedRegion
@@ -340,7 +340,7 @@ public:
    * inside the BufferedRegion from the previous execution (and the
    * current filter is up to date), then a given filter does not need
    * to re-execute */
-  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion();
+  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE;
 
   /** Verify that the RequestedRegion is within the
    * LargestPossibleRegion.  If the RequestedRegion is not within the
@@ -350,7 +350,7 @@ public:
    * used by PropagateRequestedRegion().  PropagateRequestedRegion()
    * throws a InvalidRequestedRegionError exception is the requested
    * region is not within the LargestPossibleRegion. */
-  virtual bool VerifyRequestedRegion();
+  virtual bool VerifyRequestedRegion() ITK_OVERRIDE;
 
   /** Returns a pointer to the property object applied to this class. */
   PropertyType * GetProperty(void);
@@ -369,7 +369,7 @@ public:
   itkGetConstReferenceMacro(ParentId, int);
 
   /** Specify that the object has been updated */
-  virtual void Update(void);
+  virtual void Update(void) ITK_OVERRIDE;
 
   /** Set the tree container */
   itkSetObjectMacro(TreeNode, TreeNodeType)
@@ -447,11 +447,11 @@ public:
    * \warning User is responsible for freeing the list, but not the elements of
    * the list. */
   virtual ChildrenListType * GetChildren(unsigned int depth = 0,
-                                         char *name = NULL) const;
+                                         char *name = ITK_NULLPTR) const;
 
   /** Returns the number of children currently assigned to the object. */
   unsigned int GetNumberOfChildren(unsigned int depth = 0,
-                                   char *name = NULL) const;
+                                   char *name = ITK_NULLPTR) const;
 
   /** Set the list of pointers to children to the list passed as argument. */
   void SetChildren(ChildrenListType & children);
@@ -491,8 +491,8 @@ public:
     return false;
   }
 
-  /** Get the bounding box of the object.
-   *  This function calls ComputeBoundingBox() */
+  /** Get a pointer to the bounding box of the object.
+   *  The extents and the position of the box are not computed. */
   virtual BoundingBoxType * GetBoundingBox() const;
 
   /** Set/Get the depth at which the bounding box is computed */
@@ -537,7 +537,7 @@ protected:
   /** Destructor. */
   virtual ~SpatialObject();
 
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Calculate the offsets needed to move from one pixel to the next
    * along a row, column, slice, volume, etc. These offsets are based
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx
index 544f2df..db097fc 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx
@@ -35,7 +35,7 @@ SpatialObject< TDimension >
   m_Bounds = BoundingBoxType::New();
   m_BoundsMTime = 0;
   m_Property = PropertyType::New();
-  m_TreeNode = NULL;
+  m_TreeNode = ITK_NULLPTR;
 
   m_ObjectToWorldTransform = TransformType::New();
   m_ObjectToWorldTransform->SetIdentity();
@@ -593,7 +593,7 @@ SpatialObject< TDimension >
 {
   if ( !m_TreeNode )
     {
-    return 0;
+    return ITK_NULLPTR;
     }
 
   typename TreeNodeType::ChildrenListType * children =
@@ -668,7 +668,7 @@ SpatialObject< TDimension >
     {
     return m_TreeNode->GetParent()->Get();
     }
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 /** Get the parent of the spatial object */
@@ -681,7 +681,7 @@ SpatialObject< TDimension >
     {
     return m_TreeNode->GetParent()->Get();
     }
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 /** Set the parent of the spatial object */
@@ -845,17 +845,15 @@ SpatialObject< TDimension >
 {
   const SpatialObject *imgData = dynamic_cast< const SpatialObject * >( data );
 
-  if ( imgData )
-    {
-    m_RequestedRegion = imgData->GetRequestedRegion();
-    }
-  else
+  if ( imgData == ITK_NULLPTR)
     {
     // pointer could not be cast back down
     itkExceptionMacro(
       << "itk::ImageBase::SetRequestedRegion(const DataObject *) cannot cast "
       << typeid( data ).name() << " to " << typeid( SpatialObject * ).name() );
     }
+
+  m_RequestedRegion = imgData->GetRequestedRegion();
 }
 
 template< unsigned int TDimension >
@@ -979,12 +977,7 @@ void SpatialObject< TDimension >
 
   imgData = dynamic_cast< const SpatialObject * >( data );
 
-  if ( imgData )
-    {
-    // Copy the meta data for this data type
-    m_LargestPossibleRegion = imgData->GetLargestPossibleRegion();
-    }
-  else
+  if ( imgData == ITK_NULLPTR )
     {
     // pointer could not be cast back down
     itkExceptionMacro( << "itk::SpatialObject::CopyInformation() cannot cast "
@@ -992,6 +985,9 @@ void SpatialObject< TDimension >
                        << typeid( SpatialObject * ).name() );
     }
 
+  // Copy the meta data for this data type
+  m_LargestPossibleRegion = imgData->GetLargestPossibleRegion();
+
   // check if we are the same type
   const Self *source = dynamic_cast< const Self * >( data );
   if ( !source )
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h
index 760f82b..c4ae31c 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.h
@@ -67,7 +67,7 @@ public:
 protected:
   SpatialObjectDuplicator();
   virtual ~SpatialObjectDuplicator() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   void CopyObject(const InternalSpatialObjectType *source,
                   InternalSpatialObjectType *destination);
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx
index dd7c641..fb8f4cb 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectDuplicator.hxx
@@ -28,8 +28,8 @@ template< typename TInputSpatialObject >
 SpatialObjectDuplicator< TInputSpatialObject >
 ::SpatialObjectDuplicator()
 {
-  m_Input = NULL;
-  m_Output = NULL;
+  m_Input = ITK_NULLPTR;
+  m_Output = ITK_NULLPTR;
   m_InternalSpatialObjectTime = 0;
   SpatialObjectFactoryBase::RegisterDefaultSpatialObjects();
 }
@@ -50,7 +50,7 @@ SpatialObjectDuplicator< TInputSpatialObject >
   typedef itk::SpatialObject< TInputSpatialObject::ObjectDimension > SOType;
 
   SOType *newSO = dynamic_cast< SOType * >( i.GetPointer() );
-  if ( newSO == NULL )
+  if ( newSO == ITK_NULLPTR )
     {
     std::cout << "Could not create an instance of " << value << std::endl
               << "The usual cause of this error is not registering the "
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h
index fa0c854..8209774 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectFactoryBase.h
@@ -47,9 +47,9 @@ public:
   typedef SmartPointer< const Self > ConstPointer;
 
   /** Class methods used to interface with the registered factories. */
-  virtual const char * GetITKSourceVersion(void) const;
+  virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE;
 
-  virtual const char * GetDescription(void) const;
+  virtual const char * GetDescription(void) const ITK_OVERRIDE;
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(SpatialObjectFactoryBase, ObjectFactoryBase);
@@ -63,7 +63,7 @@ public:
   /** Register this SpatialObject */
   static SpatialObjectFactoryBase * GetFactory()
   {
-    if ( m_Factory == 0 )
+    if ( m_Factory == ITK_NULLPTR )
       {
       // Make and register the factory
       SpatialObjectFactoryBase::Pointer p = SpatialObjectFactoryBase::New();
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h
index 123f0e5..ebba2b6 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectProperty.h
@@ -81,7 +81,7 @@ public:
 
 protected:
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   void Modified(void){ m_MTime++; }
 
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h
index 1d044ee..2d44127 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.h
@@ -111,7 +111,7 @@ public:
 protected:
   SpatialObjectToImageStatisticsCalculator();
   virtual ~SpatialObjectToImageStatisticsCalculator() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   bool ComputeStatistics();
 
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx
index ed899c5..1ea5305 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageStatisticsCalculator.hxx
@@ -32,8 +32,8 @@ template< typename TInputImage, typename TInputSpatialObject, unsigned int TSamp
 SpatialObjectToImageStatisticsCalculator< TInputImage, TInputSpatialObject, TSampleDimension >
 ::SpatialObjectToImageStatisticsCalculator()
 {
-  m_Image = NULL;
-  m_SpatialObject = NULL;
+  m_Image = ITK_NULLPTR;
+  m_SpatialObject = ITK_NULLPTR;
   m_Mean.Fill(0);
   m_CovarianceMatrix.SetIdentity();
   m_SampleDirection = TSampleDimension - 1;
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeContainer.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeContainer.h
index 43aac3e..df2115a 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeContainer.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeContainer.h
@@ -38,7 +38,7 @@ class SpatialObject;
  *
  * Template parameters for class Array:
  *
- * - TValueType = Element type stored at each location in the array.
+ * - TValue = Element type stored at each location in the array.
  *
  * \ingroup DataRepresentation
  * \ingroup ITKSpatialObjects
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.h
index 4baf6ab..83dcffc 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.h
@@ -69,7 +69,7 @@ public:
   /** Return a list of children (the list should be deleted by the user */
 #if !defined( CABLE_CONFIGURATION )
   virtual ChildrenListType * GetChildren(unsigned int depth = 0,
-                                         char *name = NULL) const;
+                                         char *name = ITK_NULLPTR) const;
 
 #endif
 
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.hxx
index f17c0c5..0620529 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSpatialObjectTreeNode.hxx
@@ -32,7 +32,7 @@ SpatialObjectTreeNode< TDimension >
   m_NodeToParentNodeTransform->SetIdentity();
   m_NodeToWorldTransform = TransformType::New();
   m_NodeToWorldTransform->SetIdentity();
-  this->m_Parent = NULL;
+  this->m_Parent = ITK_NULLPTR;
 }
 
 template< unsigned int TDimension >
@@ -88,7 +88,7 @@ SpatialObjectTreeNode< TDimension >
 
   while ( childrenListIt != childrenListEnd )
     {
-    if ( name == NULL || strstr(typeid( *( ( *childrenListIt )->Get() ) ).name(),
+    if ( name == ITK_NULLPTR || strstr(typeid( *( ( *childrenListIt )->Get() ) ).name(),
                                 name) )
       {
       children->push_back(*childrenListIt);
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.h
index fd59873..e87bbc6 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.h
@@ -84,14 +84,14 @@ public:
   /** Returns true if the Surface is evaluable at the requested point,
    * false otherwise. */
   bool IsEvaluableAt(const PointType & point,
-                     unsigned int depth = 0, char *name = NULL) const;
+                     unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns the value of the Surface at that point.
    *  Currently this function returns a binary value,
    *  but it might want to return a degree of membership
    *  in case of fuzzy Surfaces. */
   bool ValueAt(const PointType & point, double & value,
-               unsigned int depth = 0, char *name = NULL) const;
+               unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns true if the point is inside the Surface, false otherwise. */
   bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx
index c075a08..2851fdb 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObject.hxx
@@ -176,7 +176,7 @@ SurfaceSpatialObject< TDimension >
 {
   itkDebugMacro("Checking the point [" << point << "is on the surface");
 
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
@@ -369,7 +369,7 @@ SurfaceSpatialObject< TDimension >
                       + v2[0] * ( v3[1] - v1[1] )
                       + v3[0] * ( v1[1] - v2[1] ) );
 
-      absvec = -vcl_sqrt ( (double)( ( coa * coa ) + ( cob * cob ) + ( coc * coc ) ) );
+      absvec = -std::sqrt ( (double)( ( coa * coa ) + ( cob * cob ) + ( coc * coc ) ) );
 
       if ( absvec == 0 )
         {
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h
index 1a9c423..387b05f 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.h
@@ -113,14 +113,14 @@ public:
   /** Returns true if the tube is evaluable at the requested point,
    *  false otherwise. */
   bool IsEvaluableAt(const PointType & point,
-                     unsigned int depth = 0, char *name = NULL) const;
+                     unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns the value of the tube at that point.
    *  Currently this function returns a binary value,
    *  but it might want to return a degree of membership
    *  in case of fuzzy tubes. */
   bool ValueAt(const PointType & point, double & value,
-               unsigned int depth = 0, char *name = NULL) const;
+               unsigned int depth = 0, char *name = ITK_NULLPTR) const;
 
   /** Returns true if the point is inside the tube, false otherwise. */
   bool IsInside(const PointType & point,
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx
index b234523..149c807 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/include/itkTubeSpatialObject.hxx
@@ -240,7 +240,7 @@ TubeSpatialObject< TDimension, TTubePointType >
       double lambda = A / B;
 
       if ( ( ( it != m_Points.begin() )
-             && ( lambda > -( ( *it ).GetRadius() / ( 2 * vcl_sqrt(B) ) ) )
+             && ( lambda > -( ( *it ).GetRadius() / ( 2 * std::sqrt(B) ) ) )
              && ( lambda < 0 ) )
            || ( ( lambda <= 1.0 ) && ( lambda >= 0.0 ) )
             )
@@ -297,7 +297,7 @@ TubeSpatialObject< TDimension, TTubePointType >
       it++;
       }
 
-    double dist = vcl_sqrt(minSquareDist);
+    double dist = std::sqrt(minSquareDist);
     if ( dist <= ( ( *min ).GetRadius() ) )
       {
       return true;
@@ -314,7 +314,7 @@ TubeSpatialObject< TDimension, TTubePointType >
 {
   itkDebugMacro("Checking the point [" << point << "] is inside the tube");
 
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
@@ -408,7 +408,7 @@ TubeSpatialObject< TDimension, TTubePointType >
       l = l + t[i] * t[i];
       }
 
-    l = vcl_sqrt(l);
+    l = std::sqrt(l);
     if ( l == 0 )
       {
       std::cerr << "TubeSpatialObject::ComputeTangentAndNormals() : ";
@@ -545,7 +545,7 @@ TubeSpatialObject< TDimension, TTubePointType >
   // check if we are the same type
   const Self *source = dynamic_cast< const Self * >( data );
 
-  if ( !source )
+  if ( source == ITK_NULLPTR )
     {
     std::cout << "CopyInformation: objects are not of the same type"
               << std::endl;
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/src/itkArrowSpatialObject.cxx b/Utilities/ITK/Modules/Core/SpatialObjects/src/itkArrowSpatialObject.cxx
index 7cccfc5..191012b 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/src/itkArrowSpatialObject.cxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/src/itkArrowSpatialObject.cxx
@@ -43,7 +43,7 @@ ArrowSpatialObject< 3 >
 
   if ( m_Length != 0.0 )
     {
-    m_Length = vcl_sqrt(m_Length);
+    m_Length = std::sqrt(m_Length);
     }
   else
     {
@@ -70,11 +70,11 @@ ArrowSpatialObject< 3 >
     {
     if ( m_Direction[0] < 0.0 )
       {
-      anglez = vnl_math::pi + vcl_atan(m_Direction[1] / m_Direction[0]);
+      anglez = vnl_math::pi + std::atan(m_Direction[1] / m_Direction[0]);
       }
     else
       {
-      anglez = vcl_atan(m_Direction[1] / m_Direction[0]);
+      anglez = std::atan(m_Direction[1] / m_Direction[0]);
       }
     }
   const double angley = -asin(m_Direction[2]);
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/src/itkCylinderSpatialObject.cxx b/Utilities/ITK/Modules/Core/SpatialObjects/src/itkCylinderSpatialObject.cxx
index 21ae20f..97ae629 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/src/itkCylinderSpatialObject.cxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/src/itkCylinderSpatialObject.cxx
@@ -72,7 +72,7 @@ bool CylinderSpatialObject
     double lambda = A / B;
 
     if ( (
-           ( lambda > -( m_Radius / ( 2 * vcl_sqrt(B) ) ) )
+           ( lambda > -( m_Radius / ( 2 * std::sqrt(B) ) ) )
            && ( lambda < 0 ) )
          || ( ( lambda <= 1.0 ) && ( lambda >= 0.0 ) )
           )
@@ -103,7 +103,7 @@ bool CylinderSpatialObject
 {
   itkDebugMacro("Checking the point [" << point << "] is inside the Cylinder");
 
-  if ( name == NULL )
+  if ( name == ITK_NULLPTR )
     {
     if ( IsInside(point) )
       {
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/src/itkSpatialObjectFactoryBase.cxx b/Utilities/ITK/Modules/Core/SpatialObjects/src/itkSpatialObjectFactoryBase.cxx
index 94abf8e..cf56156 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/src/itkSpatialObjectFactoryBase.cxx
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/src/itkSpatialObjectFactoryBase.cxx
@@ -24,7 +24,7 @@
 
 namespace itk
 {
-SpatialObjectFactoryBase *SpatialObjectFactoryBase:: m_Factory = 0;
+SpatialObjectFactoryBase *SpatialObjectFactoryBase:: m_Factory = ITK_NULLPTR;
 
 SpatialObjectFactoryBase::SpatialObjectFactoryBase()
 {}
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObject.wrap b/Utilities/ITK/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObject.wrap
index 9fa7071..6efaab6 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObject.wrap
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObject.wrap
@@ -1,12 +1,7 @@
-itk_wrap_class("itk::DTITubeSpatialObject" POINTER_WITH_SUPERCLASS)
-#  foreach(d ${ITK_WRAP_DIMS})
-#    itk_wrap_template(${d} ${d})
-#  endforeach(d)
+itk_wrap_filter_dims(has_d_3 3)
 
-  # seems to be usable only with dim=3
-  itk_wrap_filter_dims(d 3)
-  if(d)
+if(has_d_3)
+  itk_wrap_class("itk::DTITubeSpatialObject" POINTER_WITH_SUPERCLASS)
     itk_wrap_template(3 3)
-  endif(d)
-
-itk_end_wrap_class()
+  itk_end_wrap_class()
+endif(has_d_3)
diff --git a/Utilities/ITK/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObjectPoint.wrap b/Utilities/ITK/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObjectPoint.wrap
index 7dd4e40..b8377e9 100644
--- a/Utilities/ITK/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObjectPoint.wrap
+++ b/Utilities/ITK/Modules/Core/SpatialObjects/wrapping/itkDTITubeSpatialObjectPoint.wrap
@@ -1,12 +1,7 @@
-itk_wrap_class("itk::DTITubeSpatialObjectPoint")
-#  foreach(d ${ITK_WRAP_DIMS})
-#    itk_wrap_template("${d}" "${d}")
-#  endforeach(d)
+itk_wrap_filter_dims(has_d_3 3)
 
-  # seems to be usable only with dim=3
-  itk_wrap_filter_dims(d 3)
-  if(d)
+if(has_d_3)
+  itk_wrap_class("itk::DTITubeSpatialObjectPoint")
     itk_wrap_template(3 3)
-  endif(d)
-
-itk_end_wrap_class()
+  itk_end_wrap_class()
+endif(has_d_3)
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkAffineTransform.h b/Utilities/ITK/Modules/Core/Transform/include/itkAffineTransform.h
index cfce1ab..e4708dc 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkAffineTransform.h
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkAffineTransform.h
@@ -179,8 +179,8 @@ public:
    * rotation angle is in radians.  The axis of rotation goes
    * through the origin.  The transformation is given by
    *
-   * y[axis1] =  vcl_cos(angle)*x[axis1] + vcl_sin(angle)*x[axis2]
-   * y[axis2] = -sin(angle)*x[axis1] + vcl_cos(angle)*x[axis2].
+   * y[axis1] =  std::cos(angle)*x[axis1] + std::sin(angle)*x[axis2]
+   * y[axis2] = -sin(angle)*x[axis1] + std::cos(angle)*x[axis2].
    *
    * All coordinates other than axis1 and axis2 are unchanged;
    * a rotation of pi/2 radians will carry +axis1 into +axis2.
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkAffineTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkAffineTransform.hxx
index a2addf1..80ddcc4 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkAffineTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkAffineTransform.hxx
@@ -152,10 +152,10 @@ AffineTransform< TScalar, NDimensions >
       }
     trans[i][i] = 1.0;
     }
-  trans[axis1][axis1] =  vcl_cos(angle);
-  trans[axis1][axis2] =  vcl_sin(angle);
-  trans[axis2][axis1] = -vcl_sin(angle);
-  trans[axis2][axis2] =  vcl_cos(angle);
+  trans[axis1][axis1] =  std::cos(angle);
+  trans[axis1][axis2] =  std::sin(angle);
+  trans[axis2][axis1] = -std::sin(angle);
+  trans[axis2][axis2] =  std::cos(angle);
   if ( pre )
     {
     this->SetVarMatrix(this->GetMatrix() * trans);
@@ -180,10 +180,10 @@ AffineTransform< TScalar, NDimensions >
 {
   MatrixType trans;
 
-  trans[0][0] =  vcl_cos(angle);
-  trans[0][1] = -vcl_sin(angle);
-  trans[1][0] =  vcl_sin(angle);
-  trans[1][1] =  vcl_cos(angle);
+  trans[0][0] =  std::cos(angle);
+  trans[0][1] = -std::sin(angle);
+  trans[1][0] =  std::sin(angle);
+  trans[1][1] =  std::cos(angle);
   if ( pre )
     {
     this->SetVarMatrix(this->GetMatrix() * trans);
@@ -211,16 +211,16 @@ AffineTransform< TScalar, NDimensions >
   ScalarType q0, q1, q2, q3;
 
   // Convert the axis to a unit vector
-  r = vcl_sqrt(axis[0] * axis[0] + axis[1] * axis[1] + axis[2] * axis[2]);
+  r = std::sqrt(axis[0] * axis[0] + axis[1] * axis[1] + axis[2] * axis[2]);
   x1 = axis[0] / r;
   x2 = axis[1] / r;
   x3 = axis[2] / r;
 
   // Compute quaternion elements
-  q0 = vcl_cos(angle / 2.0);
-  q1 = x1 * vcl_sin(angle / 2.0);
-  q2 = x2 * vcl_sin(angle / 2.0);
-  q3 = x3 * vcl_sin(angle / 2.0);
+  q0 = std::cos(angle / 2.0);
+  q1 = x1 * std::sin(angle / 2.0);
+  q2 = x2 * std::sin(angle / 2.0);
+  q3 = x3 * std::sin(angle / 2.0);
 
   // Compute elements of the rotation matrix
   trans[0][0] = q0 * q0 + q1 * q1 - q2 * q2 - q3 * q3;
@@ -297,7 +297,7 @@ AffineTransform< TScalar, NDimensions >
 {
   Pointer inv = New();
 
-  return this->GetInverse(inv) ? inv.GetPointer() : NULL;
+  return this->GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR;
 }
 
 /** Compute a distance between two affine transforms */
@@ -318,7 +318,7 @@ AffineTransform< TScalar, NDimensions >
     term = this->GetOffset()[i] - other->GetOffset()[i];
     result += term * term;
     }
-  return vcl_sqrt(result);
+  return std::sqrt(result);
 }
 
 /** Compute a distance between self and the identity transform */
@@ -347,7 +347,7 @@ AffineTransform< TScalar, NDimensions >
     result += term * term;
     }
 
-  return vcl_sqrt(result);
+  return std::sqrt(result);
 }
 } // namespace
 
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h b/Utilities/ITK/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h
index 02001bd..2feb3d9 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.h
@@ -37,15 +37,15 @@ namespace itk
  *
  * The equations form performing the conversion from azimuth-elevation
  * coordinates to cartesian coordinates are as follows:
- * z = vcl_sqrt((r^2*(cos(azimuth))^2)/(1 + (cos(azimuth))^2 *
+ * z = std::sqrt((r^2*(cos(azimuth))^2)/(1 + (cos(azimuth))^2 *
  *     (tan(elevation))^2);
- * x = z * vcl_tan(azimuth)
- * y = z * vcl_tan(elevation)
+ * x = z * std::tan(azimuth)
+ * y = z * std::tan(elevation)
  *
  * The reversed transforms are:
  * azimuth = arctan(x/y)
  * elevation = arctan(y/z)
- * r = vcl_sqrt(x^2 + y^2 + z^2)
+ * r = std::sqrt(x^2 + y^2 + z^2)
  *
  * In this class, we can also set what a "forward" transform means.  If we call
  * SetForwardAzimuthElevationToCartesian(), a forward transform will return
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.hxx
index a076f1a..79bcb60 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkAzimuthElevationToCartesianTransform.hxx
@@ -107,13 +107,13 @@ AzimuthElevationToCartesianTransform< TScalar,
                                - ( ( m_MaxElevation - 1 ) / 2.0 ) );
   ScalarType r = ( m_FirstSampleDistance + point[2] ) * m_RadiusSampleSize;
 
-  ScalarType cosOfAzimuth = vcl_cos(Azimuth);
-  ScalarType tanOfElevation = vcl_tan(Elevation);
+  ScalarType cosOfAzimuth = std::cos(Azimuth);
+  ScalarType tanOfElevation = std::tan(Elevation);
 
-  result[2] = vcl_sqrt( ( r * r * cosOfAzimuth * cosOfAzimuth )
+  result[2] = std::sqrt( ( r * r * cosOfAzimuth * cosOfAzimuth )
                         / ( 1 + cosOfAzimuth * cosOfAzimuth * tanOfElevation
                             * tanOfElevation ) );
-  result[0] = result[2] * vcl_tan(Azimuth);
+  result[0] = result[2] * std::tan(Azimuth);
   result[1] = result[2] * tanOfElevation;
   return result;
 }
@@ -126,11 +126,11 @@ AzimuthElevationToCartesianTransform< TScalar, NDimensions >::TransformCartesian
 {
   InputPointType result;       // Converted point
 
-  result[0] = ( vcl_atan(point[0] / point[2]) ) * ( 360 / ( 2 * vnl_math::pi ) )
+  result[0] = ( std::atan(point[0] / point[2]) ) * ( 360 / ( 2 * vnl_math::pi ) )
               + ( ( m_MaxAzimuth - 1 ) / 2.0 );
-  result[1] = ( vcl_atan(point[1] / point[2]) ) * ( 360 / ( 2 * vnl_math::pi ) )
+  result[1] = ( std::atan(point[1] / point[2]) ) * ( 360 / ( 2 * vnl_math::pi ) )
               + ( ( m_MaxElevation - 1 ) / 2.0 );
-  result[2] = ( ( vcl_sqrt(point[0] * point[0]
+  result[2] = ( ( std::sqrt(point[0] * point[0]
                            + point[1] * point[1]
                            + point[2] * point[2]) / m_RadiusSampleSize )
                 - m_FirstSampleDistance );
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkBSplineBaseTransform.h b/Utilities/ITK/Modules/Core/Transform/include/itkBSplineBaseTransform.h
index 4ef12ae..cb6d8e8 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkBSplineBaseTransform.h
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkBSplineBaseTransform.h
@@ -249,7 +249,6 @@ public:
   virtual OutputVectorType TransformVector( const InputVectorType & ) const
   {
     itkExceptionMacro( << "Method not applicable for deformable transform." );
-    return OutputVectorType();
   }
 
   /** Method to transform a vnl_vector -
@@ -257,7 +256,6 @@ public:
   virtual OutputVnlVectorType TransformVector( const InputVnlVectorType & ) const
   {
     itkExceptionMacro( << "Method not applicable for deformable transform. " );
-    return OutputVnlVectorType();
   }
 
   /** Method to transform a CovariantVector -
@@ -267,7 +265,6 @@ public:
     const InputCovariantVectorType & ) const
   {
     itkExceptionMacro( << "Method not applicable for deformable transfrom. " );
-    return OutputCovariantVectorType();
   }
 
   /** Get Jacobian at a point. A very specialized function just for BSplines */
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx
index 145eb8c..be80556 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx
@@ -507,7 +507,7 @@ BSplineDeformableTransform<TScalar, NDimensions, VSplineOrder>
     }
 
   // if no coefficients are set, this isn't a proper BSpline Transform
-  if( this->m_CoefficientImages[0]->GetBufferPointer() == 0)
+  if( this->m_CoefficientImages[0]->GetBufferPointer() == ITK_NULLPTR)
     {
     itkExceptionMacro( "B-spline coefficients have not been set" );
     }
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransform.hxx
index 1b4e230..73fe632 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransform.hxx
@@ -218,8 +218,7 @@ BSplineTransform<TScalar, NDimensions, VSplineOrder>
       }
     }
   this->m_CoefficientImages[0]->SetDirection( direction );
-  this->m_CoefficientImages[0]->Allocate();
-  this->m_CoefficientImages[0]->FillBuffer( 0 );
+  this->m_CoefficientImages[0]->Allocate(true); // initializes buffer to zero
 
   // Copy the information to the rest of the images
   for( unsigned int i = 1; i < SpaceDimension; i++ )
@@ -227,8 +226,7 @@ BSplineTransform<TScalar, NDimensions, VSplineOrder>
     this->m_CoefficientImages[i]->CopyInformation( this->m_CoefficientImages[0] );
     this->m_CoefficientImages[i]->SetRegions(
       this->m_CoefficientImages[0]->GetLargestPossibleRegion() );
-    this->m_CoefficientImages[i]->Allocate();
-    this->m_CoefficientImages[i]->FillBuffer( 0 );
+    this->m_CoefficientImages[i]->Allocate(true); // initialize buffer to zero
     }
 }
 
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransformInitializer.h b/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransformInitializer.h
index f68aba5..2921fe1 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransformInitializer.h
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransformInitializer.h
@@ -100,7 +100,7 @@ protected:
   BSplineTransformInitializer();
   ~BSplineTransformInitializer();
 
-  void PrintSelf( std::ostream & os, Indent indent ) const;
+  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
 
 private:
   BSplineTransformInitializer( const Self & ); //purposely not
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx
index 98a4d69..4310de7 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkBSplineTransformInitializer.hxx
@@ -30,7 +30,7 @@ namespace itk
 template<typename TTransform, typename TImage>
 BSplineTransformInitializer<TTransform, TImage>
 ::BSplineTransformInitializer() :
-  m_Transform( NULL ),
+  m_Transform( ITK_NULLPTR ),
   m_SetTransformDomainMeshSizeViaInitializer( false )
 {
   this->m_TransformDomainMeshSize.Fill( 1 );
@@ -123,7 +123,7 @@ BSplineTransformInitializer<TTransform, TImage>
   // We also store the corners using the point set class which gives us easy
   // access to the bounding box.
 
-  const CoordRepType BSplineTransformDomainEpsilon = vcl_pow( 2.0, -3 );
+  const CoordRepType BSplineTransformDomainEpsilon = std::pow( 2.0, -3 );
 
   ContinuousIndexType startIndex;
   for( unsigned int i = 0; i < SpaceDimension; i++ )
@@ -132,7 +132,7 @@ BSplineTransformInitializer<TTransform, TImage>
       BSplineTransformDomainEpsilon;
     }
 
-  for( unsigned int d = 0; d < vcl_pow( 2.0, SpaceDimension ); d++ )
+  for( unsigned int d = 0; d < std::pow( 2.0, SpaceDimension ); d++ )
     {
     ContinuousIndexType whichIndex;
     for( unsigned int i = 0; i < SpaceDimension; i++ )
@@ -200,7 +200,7 @@ BSplineTransformInitializer<TTransform, TImage>
     for( unsigned int i = 0; i < SpaceDimension; i++ )
       {
       PointIdentifier oppositeCornerId = static_cast<PointIdentifier>(
-        vcl_pow( 2.0, static_cast<int>( i ) ) ) ^ transformDomainOriginId;
+        std::pow( 2.0, static_cast<int>( i ) ) ) ^ transformDomainOriginId;
 
       PointType corner;
       corner.Fill( 0.0 );
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx
index 4b0fa73..fdc234b 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx
@@ -182,7 +182,7 @@ CenteredAffineTransform<TScalar, NDimensions>
 {
   Pointer inv = New();
 
-  return this->GetInverse(inv) ? inv.GetPointer() : NULL;
+  return this->GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR;
 }
 
 } // namespace
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx
index ba7d473..fa0a4a3 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx
@@ -80,7 +80,6 @@ CenteredEuler3DTransform<TScalar>
   this->SetVarRotation(angleX, angleY, angleZ);
 
   CenterType newCenter;
-  typedef typename CenterType::ValueType CenterValueType;
   newCenter[0] = parameters[3];
   newCenter[1] = parameters[4];
   newCenter[2] = parameters[5];
@@ -139,12 +138,12 @@ CenteredEuler3DTransform<TScalar>
 ::ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & jacobian) const
 {
   // need to check if angles are in the right order
-  const double cx = vcl_cos( this->GetAngleX() );
-  const double sx = vcl_sin( this->GetAngleX() );
-  const double cy = vcl_cos( this->GetAngleY() );
-  const double sy = vcl_sin( this->GetAngleY() );
-  const double cz = vcl_cos( this->GetAngleZ() );
-  const double sz = vcl_sin( this->GetAngleZ() );
+  const double cx = std::cos( this->GetAngleX() );
+  const double sx = std::sin( this->GetAngleX() );
+  const double cy = std::cos( this->GetAngleY() );
+  const double sy = std::sin( this->GetAngleY() );
+  const double cz = std::cos( this->GetAngleZ() );
+  const double sz = std::sin( this->GetAngleZ() );
 
   jacobian.SetSize( 3, this->GetNumberOfLocalParameters() );
   jacobian.Fill(0.0);
@@ -217,7 +216,7 @@ CenteredEuler3DTransform<TScalar>
 {
   Pointer inv = New();
 
-  return this->GetInverse(inv) ? inv.GetPointer() : NULL;
+  return this->GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR;
 }
 
 // Print self
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx
index 1123f47..b9d72a5 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx
@@ -130,8 +130,8 @@ void
 CenteredRigid2DTransform<TScalar>
 ::ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & jacobian) const
 {
-  const double ca = vcl_cos( this->GetAngle() );
-  const double sa = vcl_sin( this->GetAngle() );
+  const double ca = std::cos( this->GetAngle() );
+  const double sa = std::sin( this->GetAngle() );
 
   jacobian.SetSize( 2, this->GetNumberOfLocalParameters() );
   jacobian.Fill(0.0);
@@ -212,7 +212,7 @@ CenteredRigid2DTransform<TScalar>
 {
   Pointer inv = New();
 
-  return GetInverse(inv) ? inv.GetPointer() : NULL;
+  return GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR;
 }
 
 // Create and return an clone transformation
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx
index 87dbf25..6a14af8 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx
@@ -119,8 +119,8 @@ CenteredSimilarity2DTransform<TScalar>
 ::ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & jacobian) const
 {
   const double angle = this->GetAngle();
-  const double ca = vcl_cos(angle);
-  const double sa = vcl_sin(angle);
+  const double ca = std::cos(angle);
+  const double sa = std::sin(angle);
 
   jacobian.SetSize( 2, this->GetNumberOfLocalParameters() );
   jacobian.Fill(0.0);
@@ -218,7 +218,7 @@ CenteredSimilarity2DTransform<TScalar>
     {
     return inv.GetPointer();
     }
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 // Create and return a clone of the transformation
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkCompositeTransform.h b/Utilities/ITK/Modules/Core/Transform/include/itkCompositeTransform.h
index cdeda5c..785de0c 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkCompositeTransform.h
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkCompositeTransform.h
@@ -358,7 +358,18 @@ public:
    * Compute the Jacobian with respect to the parameters for the compositie
    * transform using Jacobian rule. See comments in the implementation.
    */
-  virtual void ComputeJacobianWithRespectToParameters(const InputPointType  & p, JacobianType & j) const;
+  virtual void ComputeJacobianWithRespectToParameters(const InputPointType  & p, JacobianType & j) const ITK_OVERRIDE;
+
+  /**
+   * Expanded interface to Compute the Jacobian with respect to the parameters for the compositie
+   * transform using Jacobian rule. This version takes in temporary
+   * variables to avoid excessive constructions.
+   * NOTE: outJacobian and jacobianWithRespectToPosition MUST be sized
+   * prior to the call; outJacobian's size should be
+   * [NDimensions, this->GetNumberOfLocalParameters() ]
+   * jacobianWithRespectToPosition size == [ NDimensions, NDimensions ]
+   */
+  virtual void ComputeJacobianWithRespectToParametersCachedTemporaries( const InputPointType & p, JacobianType & outJacobian, JacobianType & jacobianWithRespectToPosition ) const ITK_OVERRIDE;
 
 protected:
   CompositeTransform();
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkCompositeTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkCompositeTransform.hxx
index 1bf79cf..5d9fa7d 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkCompositeTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkCompositeTransform.hxx
@@ -653,7 +653,7 @@ CompositeTransform<TScalar, NDimensions>
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
@@ -661,14 +661,27 @@ template
 <typename TScalar, unsigned int NDimensions>
 void
 CompositeTransform<TScalar, NDimensions>
-::ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & j ) const
+::ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & outJacobian ) const
 {
   /* Returns a concatenated MxN array, holding the Jacobian of each sub
    * transform that is selected for optimization. The order is the same
    * as that in which they're applied, i.e. reverse order.
    * M rows = dimensionality of the transforms
    * N cols = total number of parameters in the selected sub transforms. */
-  j.SetSize( NDimensions, this->GetNumberOfLocalParameters() );
+  outJacobian.SetSize( NDimensions, this->GetNumberOfLocalParameters() );
+  JacobianType jacobianWithRespectToPosition(NDimensions, NDimensions);
+  this->ComputeJacobianWithRespectToParametersCachedTemporaries( p, outJacobian, jacobianWithRespectToPosition );
+}
+
+template
+<typename TScalar, unsigned int NDimensions>
+void
+CompositeTransform<TScalar, NDimensions>
+::ComputeJacobianWithRespectToParametersCachedTemporaries( const InputPointType & p, JacobianType & outJacobian, JacobianType & jacobianWithRespectToPosition ) const
+{
+  //NOTE: This must have been done outside of outJacobian.SetSize( NDimensions, this->GetNumberOfLocalParameters() );
+  //NOTE: assert( outJacobian.GetSize == ( NDimensions, this->GetNumberOfLocalParameters() ) )
+  //NOTE: assert( jacobianWithRespectToPosition.GetSize == (NDimensions, NDimensions) )
 
   NumberOfParametersType offset = NumericTraits< NumberOfParametersType >::Zero;
 
@@ -715,12 +728,12 @@ CompositeTransform<TScalar, NDimensions>
    *
    */
   for( signed long tind = (signed long) this->GetNumberOfTransforms() - 1;
-       tind >= 0; tind-- )
+       tind >= 0; --tind )
     {
     /* Get a raw pointer for efficiency, avoiding SmartPointer register/unregister */
-    const TransformType * transform = this->GetNthTransformConstPointer( tind );
+    const TransformType * const transform = this->GetNthTransformConstPointer( tind );
 
-    NumberOfParametersType offsetLast = offset;
+    const NumberOfParametersType offsetLast = offset;
 
     if( this->GetNthTransformToOptimize( tind ) )
       {
@@ -729,12 +742,11 @@ CompositeTransform<TScalar, NDimensions>
        * better */
 
       // to do: why parameters are listed from N-1 to 1???
-      typename TransformType::JacobianType current_jacobian;
-      NumberOfParametersType numberOfLocalParameters = transform->GetNumberOfLocalParameters();
+      const NumberOfParametersType numberOfLocalParameters = transform->GetNumberOfLocalParameters();
 
-      current_jacobian.SetSize( NDimensions, numberOfLocalParameters );
+      typename TransformType::JacobianType current_jacobian( NDimensions, numberOfLocalParameters );
       transform->ComputeJacobianWithRespectToParameters( transformedPoint, current_jacobian );
-      j.update( current_jacobian, 0, offset );
+      outJacobian.update( current_jacobian, 0, offset );
       offset += numberOfLocalParameters;
       }
 
@@ -744,28 +756,24 @@ CompositeTransform<TScalar, NDimensions>
      *  jacobian by multiplying the current matrix jumping over the
      *  first transform. The matrix here refers to  dT/dx at the point.
      *  For example, in the affine transform, this is the affine matrix.
-     *  TODO1: for general transform, there should be something like
+     *
+     *  TODO: for general transform, there should be something like
      *  GetPartialDerivativeOfPointCoordinates
      *
      *  Also, noted the multiplication contains all the affine matrix from
      *  all transforms no matter they are going to be optimized or not
-     *
      */
 
     // update every old term by left multiplying dTk / dT{k-1}
     // do this before computing the transformedPoint for the next iteration
     if( offsetLast > 0 )
       {
+      transform->ComputeJacobianWithRespectToPosition(transformedPoint, jacobianWithRespectToPosition);
 
-      JacobianType old_j = j.extract(NDimensions, offsetLast, 0, 0);
-
-      JacobianType j1;
-
-      j1.SetSize(NDimensions, NDimensions);
-
-      transform->ComputeJacobianWithRespectToPosition(transformedPoint, j1);
+      const JacobianType & old_j = outJacobian.extract(NDimensions, offsetLast, 0, 0);
+      const JacobianType & update_j = jacobianWithRespectToPosition * old_j;
 
-      j.update(j1 * old_j, 0, 0);
+      outJacobian.update(update_j, 0, 0);
 
       // itkExceptionMacro(" To sort out with new ComputeJacobianWithRespectToPosition prototype ");
       }
@@ -1074,8 +1082,13 @@ CompositeTransform<TScalar, NDimensions>
       /* The input values are in a monolithic block, so we have to point
        * to the subregion corresponding to the individual subtransform.
        * This simply creates an Array object with data pointer, no
-       * memory is allocated or copied. */
-      DerivativeType subUpdate( &( (update.data_block() )[offset]),
+       * memory is allocated or copied.
+       * NOTE: the use of const_cast is used to avoid a deep copy in the underlying vnl_vector
+       * by using LetArrayManageMemory=false, and being very careful here we can
+       * ensure that casting away consteness does not result in memory corruption. */
+      typename DerivativeType::ValueType * nonConstDataRefForPerformance =
+        const_cast< typename DerivativeType::ValueType * >( &( (update.data_block() )[offset]) );
+      const DerivativeType subUpdate( nonConstDataRefForPerformance,
                                 subtransform->GetNumberOfParameters(), false );
       /* This call will also call SetParameters, so don't need to call it
        * expliclity here. */
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkEuler2DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkEuler2DTransform.hxx
index 7824867..0b38f4a 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkEuler2DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkEuler2DTransform.hxx
@@ -69,7 +69,7 @@ Euler2DTransform< TScalar >
 {
   Pointer inv = New();
 
-  return GetInverse(inv) ? inv.GetPointer() : NULL;
+  return GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR;
 }
 
 // Create and return an inverse transformation
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkEuler3DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkEuler3DTransform.hxx
index 2e129fb..fa666a0 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkEuler3DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkEuler3DTransform.hxx
@@ -152,45 +152,45 @@ Euler3DTransform<TScalar>
 {
   if( m_ComputeZYX )
     {
-    m_AngleY = -vcl_asin(this->GetMatrix()[2][0]);
-    double C = vcl_cos(m_AngleY);
-    if( vcl_fabs(C) > 0.00005 )
+    m_AngleY = -std::asin(this->GetMatrix()[2][0]);
+    double C = std::cos(m_AngleY);
+    if( std::fabs(C) > 0.00005 )
       {
       double x = this->GetMatrix()[2][2] / C;
       double y = this->GetMatrix()[2][1] / C;
-      m_AngleX = vcl_atan2(y, x);
+      m_AngleX = std::atan2(y, x);
       x = this->GetMatrix()[0][0] / C;
       y = this->GetMatrix()[1][0] / C;
-      m_AngleZ = vcl_atan2(y, x);
+      m_AngleZ = std::atan2(y, x);
       }
     else
       {
       m_AngleX = NumericTraits<ScalarType>::Zero;
       double x = this->GetMatrix()[1][1];
       double y = -this->GetMatrix()[0][1];
-      m_AngleZ = vcl_atan2(y, x);
+      m_AngleZ = std::atan2(y, x);
       }
     }
   else
     {
-    m_AngleX = vcl_asin(this->GetMatrix()[2][1]);
-    double A = vcl_cos(m_AngleX);
-    if( vcl_fabs(A) > 0.00005 )
+    m_AngleX = std::asin(this->GetMatrix()[2][1]);
+    double A = std::cos(m_AngleX);
+    if( std::fabs(A) > 0.00005 )
       {
       double x = this->GetMatrix()[2][2] / A;
       double y = -this->GetMatrix()[2][0] / A;
-      m_AngleY = vcl_atan2(y, x);
+      m_AngleY = std::atan2(y, x);
 
       x = this->GetMatrix()[1][1] / A;
       y = -this->GetMatrix()[0][1] / A;
-      m_AngleZ = vcl_atan2(y, x);
+      m_AngleZ = std::atan2(y, x);
       }
     else
       {
       m_AngleZ = NumericTraits<ScalarType>::Zero;
       double x = this->GetMatrix()[0][0];
       double y = this->GetMatrix()[1][0];
-      m_AngleY = vcl_atan2(y, x);
+      m_AngleY = std::atan2(y, x);
       }
     }
   this->ComputeMatrix();
@@ -203,12 +203,12 @@ Euler3DTransform<TScalar>
 ::ComputeMatrix(void)
 {
   // need to check if angles are in the right order
-  const ScalarType cx = vcl_cos(m_AngleX);
-  const ScalarType sx = vcl_sin(m_AngleX);
-  const ScalarType cy = vcl_cos(m_AngleY);
-  const ScalarType sy = vcl_sin(m_AngleY);
-  const ScalarType cz = vcl_cos(m_AngleZ);
-  const ScalarType sz = vcl_sin(m_AngleZ);
+  const ScalarType cx = std::cos(m_AngleX);
+  const ScalarType sx = std::sin(m_AngleX);
+  const ScalarType cy = std::cos(m_AngleY);
+  const ScalarType sy = std::sin(m_AngleY);
+  const ScalarType cz = std::cos(m_AngleZ);
+  const ScalarType sz = std::sin(m_AngleZ);
   const ScalarType one = NumericTraits<ScalarType>::One;
   const ScalarType zero = NumericTraits<ScalarType>::Zero;
 
@@ -245,12 +245,12 @@ Euler3DTransform<TScalar>
 ::ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & jacobian) const
 {
   // need to check if angles are in the right order
-  const double cx = vcl_cos(m_AngleX);
-  const double sx = vcl_sin(m_AngleX);
-  const double cy = vcl_cos(m_AngleY);
-  const double sy = vcl_sin(m_AngleY);
-  const double cz = vcl_cos(m_AngleZ);
-  const double sz = vcl_sin(m_AngleZ);
+  const double cx = std::cos(m_AngleX);
+  const double sx = std::sin(m_AngleX);
+  const double cy = std::cos(m_AngleY);
+  const double sy = std::sin(m_AngleY);
+  const double cz = std::cos(m_AngleZ);
+  const double sz = std::sin(m_AngleZ);
 
   jacobian.SetSize( 3, this->GetNumberOfLocalParameters() );
   jacobian.Fill(0.0);
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkLandmarkBasedTransformInitializer.h b/Utilities/ITK/Modules/Core/Transform/include/itkLandmarkBasedTransformInitializer.h
index 4ba9981..ce71fc7 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkLandmarkBasedTransformInitializer.h
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkLandmarkBasedTransformInitializer.h
@@ -147,7 +147,7 @@ protected:
   LandmarkBasedTransformInitializer();
   ~LandmarkBasedTransformInitializer(){}
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   // Supported Transform types
   typedef enum {
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkLandmarkBasedTransformInitializer.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkLandmarkBasedTransformInitializer.hxx
index 1aab569..a37ec56 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkLandmarkBasedTransformInitializer.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkLandmarkBasedTransformInitializer.hxx
@@ -59,7 +59,7 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage >
 {
   AffineTransformType *transform =
     dynamic_cast<AffineTransformType *>(this->m_Transform.GetPointer());
-  if ( transform == 0 )
+  if ( transform == ITK_NULLPTR )
     {
     itkExceptionMacro( << "AffineTransform Expected but transform is "
                        << this->m_Transform->GetNameOfClass() );
@@ -211,7 +211,7 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage >
   itkDebugMacro("Internal Initialize VersorRigid3DTransformType");
   VersorRigid3DTransformType *transform = dynamic_cast< VersorRigid3DTransformType * >(
     this->m_Transform.GetPointer() );
-  if ( transform == 0 )
+  if ( transform == ITK_NULLPTR )
     {
     itkExceptionMacro( << "VersorRigid3DTransformType Expected but transform is "
                        << this->m_Transform->GetNameOfClass() );
@@ -249,7 +249,6 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage >
 
   typedef typename VersorRigid3DTransformType::OutputVectorType VectorType;
   typedef typename VersorRigid3DTransformType::OutputPointType  PointType;
-  typedef typename VersorRigid3DTransformType::CenterType       RotationCenterType;
 
   // Compute the centroids
   PointType fixedCentroid;
@@ -406,7 +405,7 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage >
   Rigid2DTransformType *transform =
     dynamic_cast< Rigid2DTransformType * >(this->m_Transform.GetPointer() );
 
-  if ( transform == 0 )
+  if ( transform == ITK_NULLPTR )
     {
     itkExceptionMacro( << "VersorRigid3DTransformType Expected but transform is "
                        << this->m_Transform->GetNameOfClass() );
@@ -425,7 +424,7 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage >
     return;
     }
 
-  const double PI = 4.0 * vcl_atan(1.0);
+  const double PI = 4.0 * std::atan(1.0);
   typedef typename Rigid2DTransformType::OutputVectorType VectorType;
   typedef typename Rigid2DTransformType::OutputPointType  PointType;
 
@@ -510,9 +509,9 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage >
       }
 
     itkDebugMacro(<< "Dot Product of landmarks: " << s_dot << " Cross Product: " << s_cross);
-    if ( vcl_fabs(s_dot) > 0.00005 )
+    if ( std::fabs(s_dot) > 0.00005 )
       {
-      rotationAngle = vcl_atan2(s_cross, s_dot);
+      rotationAngle = std::atan2(s_cross, s_dot);
       }
     else
       {
@@ -554,7 +553,7 @@ LandmarkBasedTransformInitializer< TTransform, TFixedImage, TMovingImage >
     itkExceptionMacro("Different number of fixed and moving landmarks");
     return;
     }
-  this->InternalInitializeTransform(static_cast<TTransform *>(0));
+  this->InternalInitializeTransform(static_cast<TTransform *>(ITK_NULLPTR));
 }
 
 template< typename TTransform, typename TFixedImage, typename TMovingImage >
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx
index 24bd8d5..ad8999a 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx
@@ -528,7 +528,7 @@ MatrixOffsetTransformBase<TScalar, NInputDimensions, NOutputDimensions>
 {
   Pointer inv = New();
 
-  return GetInverse(inv) ? inv.GetPointer() : NULL;
+  return GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR;
 }
 
 // Get fixed parameters
@@ -540,7 +540,6 @@ MatrixOffsetTransformBase<TScalar, NInputDimensions, NOutputDimensions>
 {
   this->m_FixedParameters = fp;
   InputPointType c;
-  typedef typename ParametersType::ValueType ParameterValueType;
   for( unsigned int i = 0; i < NInputDimensions; i++ )
     {
     c[i] = this->m_FixedParameters[i];
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkMultiTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkMultiTransform.hxx
index 374d08e..4d86a32 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkMultiTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkMultiTransform.hxx
@@ -341,8 +341,13 @@ MultiTransform<TScalar, NDimensions, NSubDimensions>
     /* The input values are in a monolithic block, so we have to point
      * to the subregion corresponding to the individual subtransform.
      * This simply creates an Array object with data pointer, no
-     * memory is allocated or copied. */
-    DerivativeType subUpdate( &( (update.data_block() )[offset]), subtransform->GetNumberOfParameters(), false );
+     * memory is allocated or copied.
+     * NOTE: the use of const_cast is used to avoid a deep copy in the underlying vnl_vector
+     * by using LetArrayManageMemory=false, and being very careful here we can
+     * ensure that casting away consteness does not result in memory corruption. */
+    typename DerivativeType::ValueType * nonConstDataRefForPerformance =
+      const_cast< typename DerivativeType::ValueType * >( &( (update.data_block() )[offset]) );
+    const DerivativeType subUpdate( nonConstDataRefForPerformance, subtransform->GetNumberOfParameters(), false );
     /* This call will also call SetParameters, so don't need to call it
      * expliclity here. */
     subtransform->UpdateTransformParameters( subUpdate, factor );
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkQuaternionRigidTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkQuaternionRigidTransform.hxx
index 9e6efff..3537b67 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkQuaternionRigidTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkQuaternionRigidTransform.hxx
@@ -28,8 +28,8 @@ QuaternionRigidTransform<TScalar>
 ::QuaternionRigidTransform() :
   Superclass(ParametersDimension)
 {
-  m_Rotation = VnlQuaternionType(0, 0, 0, 1); // axis * vcl_sin(t/2),
-                                              // vcl_cos(t/2)
+  m_Rotation = VnlQuaternionType(0, 0, 0, 1); // axis * std::sin(t/2),
+                                              // std::cos(t/2)
 }
 
 // Constructor with default arguments
@@ -37,8 +37,8 @@ template <typename TScalar>
 QuaternionRigidTransform<TScalar>::QuaternionRigidTransform(unsigned int parametersDimension) :
   Superclass(parametersDimension)
 {
-  m_Rotation = VnlQuaternionType(0, 0, 0, 1); // axis * vcl_sin(t/2),
-                                              // vcl_cos(t/2)
+  m_Rotation = VnlQuaternionType(0, 0, 0, 1); // axis * std::sin(t/2),
+                                              // std::cos(t/2)
 }
 
 // Constructor with explicit arguments
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkRigid2DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkRigid2DTransform.hxx
index 7d611ca..6bce0ba 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkRigid2DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkRigid2DTransform.hxx
@@ -100,14 +100,14 @@ Rigid2DTransform<TScalar>
   vnl_matrix<TScalar> r(2, 2);
   r = svd.U() * svd.V().transpose();
 
-  m_Angle = vcl_acos(r[0][0]);
+  m_Angle = std::acos(r[0][0]);
 
   if( r[1][0] < 0.0 )
     {
     m_Angle = -m_Angle;
     }
 
-  if( r[1][0] - vcl_sin(m_Angle) > 0.000001 )
+  if( r[1][0] - std::sin(m_Angle) > 0.000001 )
     {
     itkWarningMacro( "Bad Rotation Matrix " << this->GetMatrix() );
     }
@@ -159,7 +159,7 @@ Rigid2DTransform<TScalar>
 {
   Pointer inv = New();
 
-  return GetInverse(inv) ? inv.GetPointer() : NULL;
+  return GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR;
 }
 
 // Create and return a clone of the transformation
@@ -200,7 +200,7 @@ void
 Rigid2DTransform<TScalar>
 ::SetAngleInDegrees(TScalar angle)
 {
-  const TScalar angleInRadians = angle * vcl_atan(1.0) / 45.0;
+  const TScalar angleInRadians = angle * std::atan(1.0) / 45.0;
 
   this->SetAngle(angleInRadians);
 }
@@ -211,8 +211,8 @@ void
 Rigid2DTransform<TScalar>
 ::ComputeMatrix(void)
 {
-  const MatrixValueType ca = vcl_cos(m_Angle);
-  const MatrixValueType sa = vcl_sin(m_Angle);
+  const MatrixValueType ca = std::cos(m_Angle);
+  const MatrixValueType sa = std::sin(m_Angle);
 
   MatrixType rotationMatrix;
 
@@ -287,8 +287,8 @@ Rigid2DTransform<TScalar>::ComputeJacobianWithRespectToParameters(const InputPoi
   j.SetSize( OutputSpaceDimension, this->GetNumberOfLocalParameters() );
   j.Fill(0.0);
 
-  const double ca = vcl_cos( this->GetAngle() );
-  const double sa = vcl_sin( this->GetAngle() );
+  const double ca = std::cos( this->GetAngle() );
+  const double sa = std::sin( this->GetAngle() );
 
   const double cx = this->GetCenter()[0];
   const double cy = this->GetCenter()[1];
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx
index 1cc2552..9602168 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx
@@ -85,7 +85,7 @@ Rigid3DPerspectiveTransform<TScalar>
   axis[2] = parameters[2];
   if( norm > NumericTraits<double>::Zero )
     {
-    norm = vcl_sqrt(norm);
+    norm = std::sqrt(norm);
     }
 
   double epsilon = 1e-10;
@@ -150,8 +150,8 @@ template <typename TScalar>
 void
 Rigid3DPerspectiveTransform<TScalar>::SetRotation(const Vector<TScalar, 3> & axis, double angle)
 {
-  const double sinus   = vcl_sin(angle / 2.0);
-  const double cosinus = vcl_cos(angle / 2.0);
+  const double sinus   = std::sin(angle / 2.0);
+  const double cosinus = std::cos(angle / 2.0);
 
   Vector<TScalar, 3> norm;
   norm = axis;
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkRigid3DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkRigid3DTransform.hxx
index ea5798c..43e7e74 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkRigid3DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkRigid3DTransform.hxx
@@ -165,7 +165,7 @@ typename Rigid3DTransform< TScalar >::InverseTransformBasePointer
 Rigid3DTransform< TScalar >::GetInverseTransform() const
 {
   Pointer inv = New();
-  return this->GetInverse(inv) ? inv.GetPointer() : NULL;
+  return this->GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR;
 }
 
 template< typename TScalar >
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkScalableAffineTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkScalableAffineTransform.hxx
index 02cc7bd..89a4852 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkScalableAffineTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkScalableAffineTransform.hxx
@@ -170,7 +170,7 @@ ScalableAffineTransform< TScalar, NDimensions >
 {
   Pointer inv = New();
 
-  return this->GetInverse(inv) ? inv.GetPointer() : NULL;
+  return this->GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR;
 }
 
 /** Set the scale of the transformation */
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx
index 514bc9e..08ba1a4 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx
@@ -45,7 +45,7 @@ ScaleLogarithmicTransform<ScalarType, NDimensions>
 
   for( unsigned int i = 0; i < SpaceDimension; i++ )
     {
-    scales[i] = vcl_exp(parameters[i]);
+    scales[i] = std::exp(parameters[i]);
     }
   // Save parameters. Needed for proper operation of TransformUpdateParameters.
   if( &parameters != &(this->m_Parameters) )
@@ -71,7 +71,7 @@ const typename ScaleLogarithmicTransform<TScalar, NDimensions>::ParametersType
   // Transfer the translation part
   for( unsigned int i = 0; i < SpaceDimension; i++ )
     {
-    this->m_Parameters[i] = vcl_log(scales[i]);
+    this->m_Parameters[i] = std::log(scales[i]);
     }
 
   itkDebugMacro(<< "After getting parameters " << this->m_Parameters);
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx
index fd7d282..63222de 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx
@@ -88,7 +88,7 @@ ScaleSkewVersor3DTransform<TScalar>
   axis[2] = parameters[2];
   if( norm > 0 )
     {
-    norm = vcl_sqrt(norm);
+    norm = std::sqrt(norm);
     }
 
   double epsilon = 1e-10;
@@ -137,7 +137,7 @@ ScaleSkewVersor3DTransform<TScalar>
 //
 // Parameters are ordered as:
 //
-// p[0:2] = right part of the versor (axis times vcl_sin(t/2))
+// p[0:2] = right part of the versor (axis times std::sin(t/2))
 // p[3:5] = translation components
 // p[6:8] = Scale
 // p[9:14] = Skew {xy, xz, yx, yz, zx, zy}
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkScaleTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkScaleTransform.hxx
index d7881e6..24eb4b7 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkScaleTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkScaleTransform.hxx
@@ -44,7 +44,6 @@ void
 ScaleTransform<ScalarType, NDimensions>
 ::SetParameters(const ParametersType & parameters)
 {
-  typedef typename ParametersType::ValueType ParameterValueType;
   for( unsigned int i = 0; i < SpaceDimension; i++ )
     {
     m_Scale[i] = parameters[i];
@@ -199,7 +198,7 @@ ScaleTransform<ScalarType, NDimensions>
     {
     return inv.GetPointer();
     }
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 // Compute the Jacobian of the transformation
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx
index 6ebca1f..38945b8 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx
@@ -91,7 +91,7 @@ ScaleVersor3DTransform<TScalar>
   axis[2] = parameters[2];
   if( norm > 0 )
     {
-    norm = vcl_sqrt(norm);
+    norm = std::sqrt(norm);
     }
 
   double epsilon = 1e-10;
@@ -132,7 +132,7 @@ ScaleVersor3DTransform<TScalar>
 //
 // Parameters are ordered as:
 //
-// p[0:2] = right part of the versor (axis times vcl_sin(t/2))
+// p[0:2] = right part of the versor (axis times std::sin(t/2))
 // p[3:5] = translation components
 // p[6:8] = Scale
 //
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx
index c024d0e..323c79d 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx
@@ -128,8 +128,8 @@ Similarity2DTransform<TScalar>
 {
   const double angle = this->GetAngle();
 
-  const double cc = vcl_cos(angle);
-  const double ss = vcl_sin(angle);
+  const double cc = std::cos(angle);
+  const double ss = std::sin(angle);
 
   const MatrixValueType ca = cc * m_Scale;
   const MatrixValueType sa = ss * m_Scale;
@@ -148,17 +148,17 @@ void
 Similarity2DTransform<TScalar>
 ::ComputeMatrixParameters(void)
 {
-  m_Scale = vcl_sqrt( vnl_math_sqr(this->GetMatrix()[0][0])
+  m_Scale = std::sqrt( vnl_math_sqr(this->GetMatrix()[0][0])
                       + vnl_math_sqr(this->GetMatrix()[0][1]) );
 
-  this->SetVarAngle( vcl_acos(this->GetMatrix()[0][0] / m_Scale) );
+  this->SetVarAngle( std::acos(this->GetMatrix()[0][0] / m_Scale) );
 
   if( this->GetMatrix()[1][0] < 0.0 )
     {
     this->SetVarAngle( -this->GetAngle() );
     }
 
-  if( ( this->GetMatrix()[1][0] / m_Scale ) - vcl_sin( this->GetAngle() ) > 0.000001 )
+  if( ( this->GetMatrix()[1][0] / m_Scale ) - std::sin( this->GetAngle() ) > 0.000001 )
     {
     std::cout << "Bad Rotation Matrix" << std::endl;
     }
@@ -170,8 +170,8 @@ Similarity2DTransform<TScalar>
 ::ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & jacobian) const
 {
   const double angle = this->GetAngle();
-  const double ca = vcl_cos(angle);
-  const double sa = vcl_sin(angle);
+  const double ca = std::cos(angle);
+  const double sa = std::sin(angle);
 
   jacobian.SetSize( 2, this->GetNumberOfLocalParameters() );
   jacobian.Fill(0.0);
@@ -255,7 +255,7 @@ Similarity2DTransform<TScalar>
     {
     return inv.GetPointer();
     }
-  return NULL;
+  return ITK_NULLPTR;
 }
 
 // Create and return a clone of the transformation
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx
index 8c132b4..8c152d9 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx
@@ -144,7 +144,7 @@ Similarity3DTransform<TScalar>
   axis[2] = parameters[2];
   if( norm > 0 )
     {
-    norm = vcl_sqrt(norm);
+    norm = std::sqrt(norm);
     }
 
   double epsilon = 1e-10;
@@ -180,7 +180,7 @@ Similarity3DTransform<TScalar>
 //
 // Parameters are ordered as:
 //
-// p[0:2] = right part of the versor (axis times vcl_sin(t/2))
+// p[0:2] = right part of the versor (axis times std::sin(t/2))
 // p[3:5} = translation components
 // p[6:6} = scaling factor (isotropic)
 //
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.hxx
index b035ca8..57958f0 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkThinPlateR2LogRSplineKernelTransform.hxx
@@ -30,7 +30,7 @@ ThinPlateR2LogRSplineKernelTransform< TScalar, NDimensions >::ComputeG(const Inp
 
   gmatrix.fill(NumericTraits< TScalar >::Zero);
   const TScalar      R2logR =
-    ( r > 1e-8 ) ? r *r *vcl_log(r):NumericTraits< TScalar >::Zero;
+    ( r > 1e-8 ) ? r *r *std::log(r):NumericTraits< TScalar >::Zero;
 
   gmatrix.fill_diagonal(R2logR);
 }
@@ -51,7 +51,7 @@ ThinPlateR2LogRSplineKernelTransform< TScalar, NDimensions >::ComputeDeformation
     InputVectorType        position = thisPoint - sp->Value();
     const TScalar      r = position.GetNorm();
     const TScalar      R2logR =
-      ( r > 1e-8 ) ? r *r *vcl_log(r):NumericTraits< TScalar >::Zero;
+      ( r > 1e-8 ) ? r *r *std::log(r):NumericTraits< TScalar >::Zero;
     for ( unsigned int odim = 0; odim < NDimensions; odim++ )
       {
       result[odim] += R2logR * this->m_DMatrix(odim, lnd);
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkTransform.h b/Utilities/ITK/Modules/Core/Transform/include/itkTransform.h
index 0f376c3..5e5127f 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkTransform.h
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkTransform.h
@@ -192,7 +192,6 @@ public:
   {
     itkExceptionMacro( "TransformVector(const InputVectorType &)"
                        "is unimplemented for " << this->GetNameOfClass() );
-    return OutputVectorType();
   }
 
   /** Method to transform a vector at a given location.
@@ -208,7 +207,6 @@ public:
   {
     itkExceptionMacro( "TransformVector( const InputVnlVectorType & ) is "
                        "unimplemented for " << this->GetNameOfClass() );
-    return OutputVnlVectorType();
   }
 
   /** Method to transform a vnl_vector, at a point.
@@ -225,7 +223,6 @@ public:
   {
     itkExceptionMacro( "TransformVector( const InputVectorPixelType & ) is "
                        "unimplemented for " << this->GetNameOfClass() );
-    return OutputVectorPixelType();
   }
 
   /** Method to transform a vector stored in a VectorImage, at a point.
@@ -241,7 +238,6 @@ public:
   {
     itkExceptionMacro( "TransformCovariantVector( const InputCovariantVectorType & ) is "
                        "unimplemented for " << this->GetNameOfClass() );
-    return OutputCovariantVectorType();
   }
   /** Method to transform a CovariantVector, using a point. Global transforms
    * can ignore the \c point parameter. Local transforms (e.g. deformation
@@ -259,7 +255,6 @@ public:
   {
     itkExceptionMacro( "TransformCovariantVector(const InputVectorPixelType &)"
                        "is unimplemented for " << this->GetNameOfClass() );
-    return OutputVectorPixelType();
   }
 
   /** Method to transform a CovariantVector, using a point. Global transforms
@@ -279,7 +274,6 @@ public:
     itkExceptionMacro(
       "TransformDiffusionTensor3D( const InputDiffusionTensor3DType & ) is "
       "unimplemented for " << this->GetNameOfClass() );
-    return OutputDiffusionTensor3DType();
   }
 
   /** Method to transform a diffusion tensor at a point. Global transforms
@@ -298,7 +292,6 @@ public:
     itkExceptionMacro(
       "TransformDiffusionTensor( const InputVectorPixelType & ) is "
       "unimplemented for " << this->GetNameOfClass() );
-    return OutputVectorPixelType();
   }
 
   virtual OutputVectorPixelType TransformDiffusionTensor3D(
@@ -321,7 +314,6 @@ public:
     itkExceptionMacro(
       "TransformSymmetricSecondRankTensor( const InputSymmetricSecondRankTensorType & ) is "
       "unimplemented for " << this->GetNameOfClass() );
-    return OutputSymmetricSecondRankTensorType();
   }
 
   /** Method to transform a ssr tensor stored in a VectorImage */
@@ -331,7 +323,6 @@ public:
     itkExceptionMacro(
       "TransformSymmetricSecondRankTensor( const InputVectorPixelType & ) is "
       "unimplemented for " << this->GetNameOfClass() );
-    return OutputVectorPixelType();
   }
 
   /** Method to transform a diffusion tensor stored in a VectorImage, at
@@ -429,7 +420,7 @@ public:
    */
   virtual InverseTransformBasePointer GetInverseTransform() const
   {
-    return NULL;
+    return ITK_NULLPTR;
   }
 
   /** Generate a platform independent name */
@@ -505,12 +496,12 @@ public:
    *  will most likely occur during multi-threading.
    *  To avoid repeatitive memory allocation, pass in 'jacobian' with its size
    *  already set. */
-  virtual void ComputeJacobianWithRespectToParameters(const InputPointType  & itkNotUsed(p), JacobianType & itkNotUsed(jacobian) ) const
+  virtual void ComputeJacobianWithRespectToParameters(const InputPointType  & itkNotUsed(p), JacobianType & itkNotUsed(jacobian) ) const = 0;
+
+  virtual void ComputeJacobianWithRespectToParametersCachedTemporaries(const InputPointType  & p, JacobianType & jacobian, JacobianType & itkNotUsed(jacobianWithRespectToPosition) ) const
   {
-    itkExceptionMacro(
-      "ComputeJacobianWithRespectToParamters( InputPointType, JacobianType"
-      " is unimplemented for " << this->GetNameOfClass() );
-    return;
+    //NOTE: default implementation is not optimized, and just falls back to original methods.
+    this->ComputeJacobianWithRespectToParameters(p, jacobian);
   }
 
 
@@ -524,7 +515,6 @@ public:
     itkExceptionMacro(
       "ComputeJacobianWithRespectToPosition( InputPointType, JacobianType"
       " is unimplemented for " << this->GetNameOfClass() );
-    return;
   }
 
 
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkTransform.hxx
index 52b2c49..f62bec6 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkTransform.hxx
@@ -71,7 +71,7 @@ std::string Transform<TScalar, NInputDimensions, NOutputDimensions>
 
   n << GetNameOfClass();
   n << "_";
-  n << this->GetTransformTypeAsString(static_cast<TScalar *>(0) );
+  n << this->GetTransformTypeAsString(static_cast<TScalar *>(ITK_NULLPTR) );
   n << "_" << this->GetInputSpaceDimension() << "_" << this->GetOutputSpaceDimension();
   return n.str();
 }
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkTranslationTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkTranslationTransform.hxx
index 4ce0db3..21aa6f6 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkTranslationTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkTranslationTransform.hxx
@@ -59,7 +59,6 @@ TranslationTransform<TScalar, NDimensions>
     this->m_Parameters = parameters;
     }
 
-  typedef typename ParametersType::ValueType ParameterValueType;
   bool modified = false;
   for( unsigned int i = 0; i < SpaceDimension; i++ )
     {
@@ -174,7 +173,7 @@ TranslationTransform<TScalar, NDimensions>
 {
   Pointer inv = New();
 
-  return GetInverse(inv) ? inv.GetPointer() : NULL;
+  return GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR;
 }
 
 // Compute the Jacobian in one position
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkVersorRigid3DTransform.h b/Utilities/ITK/Modules/Core/Transform/include/itkVersorRigid3DTransform.h
index cd761f6..ebd6bb3 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkVersorRigid3DTransform.h
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkVersorRigid3DTransform.h
@@ -86,6 +86,8 @@ public:
 
   /** Versor type. */
   typedef typename Superclass::VersorType VersorType;
+  typedef typename VersorType::VectorType VectorType;
+
   typedef typename Superclass::AxisType   AxisType;
   typedef typename Superclass::AngleType  AngleType;
 
@@ -93,6 +95,8 @@ public:
   typedef typename Superclass::TranslationValueType TranslationValueType;
   typedef typename Superclass::ParameterValueType   ParameterValueType;
 
+  typedef  Array<ParameterValueType>                DerivativeType;
+
   /** Set the transformation from a container of parameters
    * This is typically used by optimizers.
    * There are 6 parameters. The first three represent the
@@ -101,6 +105,15 @@ public:
 
   virtual const ParametersType & GetParameters(void) const;
 
+  /** Update the transform's parameters by the values in \c update.
+   * \param update must be of the same length as returned by
+   * GetNumberOfParameters(). Throw an exception otherwise.
+   * \param factor is a scalar multiplier for each value in \c update.
+   * SetParameters is called at the end of this method, to allow the transform
+   * to perform any required operations on the updated parameters - typically
+   * a conversion to member variables for use in TransformPoint. */
+  virtual void UpdateTransformParameters( const DerivativeType & update, TScalar factor = 1.0 );
+
   /** This method computes the Jacobian matrix of the transformation.
    * given point or vector, returning the transformed point or
    * vector. The rank of the Jacobian will also indicate if the
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkVersorRigid3DTransform.hxx b/Utilities/ITK/Modules/Core/Transform/include/itkVersorRigid3DTransform.hxx
index 8bdb9be..bde3a66 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkVersorRigid3DTransform.hxx
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkVersorRigid3DTransform.hxx
@@ -71,7 +71,7 @@ VersorRigid3DTransform<TScalar>
   axis[2] = parameters[2];
   if( norm > 0 )
     {
-    norm = vcl_sqrt(norm);
+    norm = std::sqrt(norm);
     }
 
   double epsilon = 1e-10;
@@ -106,7 +106,7 @@ VersorRigid3DTransform<TScalar>
 //
 // Parameters are ordered as:
 //
-// p[0:2] = right part of the versor (axis times vcl_sin(t/2))
+// p[0:2] = right part of the versor (axis times std::sin(t/2))
 // p[3:5} = translation components
 //
 
@@ -134,6 +134,92 @@ const typename VersorRigid3DTransform<TScalar>::ParametersType
 template <typename TScalar>
 void
 VersorRigid3DTransform<TScalar>
+::UpdateTransformParameters( const DerivativeType & update, TScalar factor )
+{
+  SizeValueType numberOfParameters = this->GetNumberOfParameters();
+
+  if( update.Size() != numberOfParameters )
+    {
+    itkExceptionMacro("Parameter update size, " << update.Size() << ", must "
+                      " be same as transform parameter size, "
+                      << numberOfParameters << std::endl);
+    }
+
+  /* Make sure m_Parameters is updated to reflect the current values in
+   * the transform's other parameter-related variables. This is effective for
+   * managing the parallel variables used for storing parameter data,
+   * but inefficient. However for small global transforms, shouldn't be
+   * too bad. Dense-field transform will want to make sure m_Parameters
+   * is always updated whenever the transform is changed, so GetParameters
+   * can be skipped in their implementations of UpdateTransformParameters.
+   */
+  this->GetParameters();
+
+  VectorType rightPart;
+
+  for ( unsigned int i = 0; i < 3; i++ )
+    {
+    rightPart[i] = this->m_Parameters[i];
+    }
+
+  VersorType currentRotation;
+  currentRotation.Set(rightPart);
+
+  // The gradient indicate the contribution of each one
+  // of the axis to the direction of highest change in
+  // the function
+  VectorType axis;
+  axis[0] = update[0];
+  axis[1] = update[1];
+  axis[2] = update[2];
+
+  // gradientRotation is a rotation along the
+  // versor direction which maximize the
+  // variation of the cost function in question.
+  // An additional Exponentiation produce a jump
+  // of a particular length along the versor gradient
+  // direction.
+
+  VersorType gradientRotation;
+  gradientRotation.Set( axis, factor * axis.GetNorm() );
+
+  //
+  // Composing the currentRotation with the gradientRotation
+  // produces the new Rotation versor
+  //
+  VersorType newRotation = currentRotation * gradientRotation;
+
+  ParametersType newParameters( numberOfParameters );
+
+  newParameters[0] = newRotation.GetX();
+  newParameters[1] = newRotation.GetY();
+  newParameters[2] = newRotation.GetZ();
+
+  // Optimize the non-versor parameters as the
+  // RegularStepGradientDescentOptimizer
+  for ( unsigned int k = 3; k < numberOfParameters; k++ )
+    {
+    newParameters[k] = this->m_Parameters[k] + update[k] * factor;
+    }
+
+  /* Call SetParameters with the updated parameters.
+   * SetParameters in most transforms is used to assign the input params
+   * to member variables, possibly with some processing. The member variables
+   * are then used in TransformPoint.
+   * In the case of dense-field transforms that are updated in blocks from
+   * a threaded implementation, SetParameters doesn't do this, and is
+   * optimized to not copy the input parameters when == m_Parameters.
+   */
+  this->SetParameters( newParameters );
+
+  /* Call Modified, following behavior of other transform when their
+   * parameters change, e.g. MatrixOffsetTransformBase */
+  this->Modified();
+}
+
+template <typename TScalar>
+void
+VersorRigid3DTransform<TScalar>
 ::ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & jacobian) const
 {
   typedef typename VersorType::ValueType ValueType;
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkVersorTransform.h b/Utilities/ITK/Modules/Core/Transform/include/itkVersorTransform.h
index 25ae492..4b7e756 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkVersorTransform.h
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkVersorTransform.h
@@ -100,7 +100,7 @@ public:
    * There are 3 parameters. They represent the components
    * of the right part of the versor. This can be seen
    * as the components of the vector parallel to the rotation
-   * axis and multiplied by vcl_sin( angle / 2 ). */
+   * axis and multiplied by std::sin( angle / 2 ). */
   void SetParameters(const ParametersType & parameters);
 
   /** Get the Transformation Parameters. */
diff --git a/Utilities/ITK/Modules/Core/Transform/include/itkv3Rigid3DTransform.h b/Utilities/ITK/Modules/Core/Transform/include/itkv3Rigid3DTransform.h
index 5b2b236..a8d7f80 100644
--- a/Utilities/ITK/Modules/Core/Transform/include/itkv3Rigid3DTransform.h
+++ b/Utilities/ITK/Modules/Core/Transform/include/itkv3Rigid3DTransform.h
@@ -117,7 +117,7 @@ public:
 virtual InverseTransformBasePointer GetInverseTransform() const
   {
   Pointer inv = New();
-  return this->GetInverse(inv) ? inv.GetPointer() : NULL;
+  return this->GetInverse(inv) ? inv.GetPointer() : ITK_NULLPTR;
   }
 
 protected:
diff --git a/Utilities/ITK/Modules/Core/Transform/wrapping/itkVersorTransform.wrap b/Utilities/ITK/Modules/Core/Transform/wrapping/itkVersorTransform.wrap
index a0bdcb6..06b2d98 100644
--- a/Utilities/ITK/Modules/Core/Transform/wrapping/itkVersorTransform.wrap
+++ b/Utilities/ITK/Modules/Core/Transform/wrapping/itkVersorTransform.wrap
@@ -1,6 +1,7 @@
-itk_wrap_class("itk::VersorTransform" POINTER)
-  itk_wrap_filter_dims(d3 3)
-  if(d3)
+itk_wrap_filter_dims(has_d_3 3)
+
+if(has_d_3)
+  itk_wrap_class("itk::VersorTransform" POINTER)
     itk_wrap_template("${ITKM_D}" "${ITKT_D}")
-  endif(d3)
-itk_end_wrap_class()
+  itk_end_wrap_class()
+endif(has_d_3)
diff --git a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h
index 7d4be7a..ebb8756 100644
--- a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h
+++ b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionFunction.h
@@ -214,7 +214,7 @@ public:
    * so it's safe to return a null value. */
   virtual void * GetGlobalDataPointer() const
   {
-    return 0;
+    return ITK_NULLPTR;
   }
 
   /** Does nothing.  No global data is used in this class of equations.   */
diff --git a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.hxx
index 47770a8..5480e8e 100644
--- a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkAnisotropicDiffusionImageFilter.hxx
@@ -33,7 +33,7 @@ AnisotropicDiffusionImageFilter< TInputImage, TOutputImage >
   m_ConductanceParameter = 1.0;
   m_ConductanceScalingParameter = 1.0;
   m_ConductanceScalingUpdateInterval = 1;
-  m_TimeStep = 0.5 / vcl_pow( 2.0, static_cast< double >( ImageDimension ) );
+  m_TimeStep = 0.5 / std::pow( 2.0, static_cast< double >( ImageDimension ) );
   m_FixedAverageGradientMagnitude = 1.0;
   m_GradientMagnitudeIsFixed = false;
 }
@@ -72,14 +72,14 @@ AnisotropicDiffusionImageFilter< TInputImage, TOutputImage >
     {
     minSpacing = 1.0;
     }
-  if ( m_TimeStep >  ( minSpacing / vcl_pow(2.0, static_cast< double >( ImageDimension ) + 1) ) )
+  if ( m_TimeStep >  ( minSpacing / std::pow(2.0, static_cast< double >( ImageDimension ) + 1) ) )
     {
-    //    f->SetTimeStep(1.0 / vcl_pow(2.0,
+    //    f->SetTimeStep(1.0 / std::pow(2.0,
     // static_cast<double>(ImageDimension)));
     itkWarningMacro( << "Anisotropic diffusion unstable time step: "
                      << m_TimeStep << std::endl
                      << "Stable time step for this image must be smaller than "
-                     << minSpacing / vcl_pow( 2.0, static_cast< double >( ImageDimension + 1 ) ) );
+                     << minSpacing / std::pow( 2.0, static_cast< double >( ImageDimension + 1 ) ) );
     }
 
   if ( m_GradientMagnitudeIsFixed == false )
diff --git a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureAnisotropicDiffusionImageFilter.h b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureAnisotropicDiffusionImageFilter.h
index 701fa4e..a2e1040 100644
--- a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureAnisotropicDiffusionImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureAnisotropicDiffusionImageFilter.h
@@ -100,7 +100,7 @@ protected:
   virtual void InitializeIteration()
   {
     Superclass::InitializeIteration();
-    if ( this->GetTimeStep() >  0.5 / vcl_pow( 2.0, static_cast< double >( ImageDimension ) ) )
+    if ( this->GetTimeStep() >  0.5 / std::pow( 2.0, static_cast< double >( ImageDimension ) ) )
       {
       itkWarningMacro(
         << "Anisotropic diffusion is using a time step which may introduce instability into the solution.");
diff --git a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.hxx b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.hxx
index 20174e3..e558fcf 100644
--- a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.hxx
+++ b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkCurvatureNDAnisotropicDiffusionFunction.hxx
@@ -28,7 +28,8 @@ double CurvatureNDAnisotropicDiffusionFunction< TImage >
 
 template< typename TImage >
 CurvatureNDAnisotropicDiffusionFunction< TImage >
-::CurvatureNDAnisotropicDiffusionFunction()
+::CurvatureNDAnisotropicDiffusionFunction() :
+  m_K(0.0)
 {
   unsigned int i, j;
   RadiusType   r;
@@ -123,8 +124,8 @@ CurvatureNDAnisotropicDiffusionFunction< TImage >
         grad_mag_sq_d += 0.25f * ( dx[j] + dx_dim ) * ( dx[j] + dx_dim );
         }
       }
-    grad_mag = vcl_sqrt(m_MIN_NORM + grad_mag_sq);
-    grad_mag_d = vcl_sqrt(m_MIN_NORM + grad_mag_sq_d);
+    grad_mag = std::sqrt(m_MIN_NORM + grad_mag_sq);
+    grad_mag_d = std::sqrt(m_MIN_NORM + grad_mag_sq_d);
 
     // Conductance Terms
     if ( m_K == 0.0 )
@@ -134,8 +135,8 @@ CurvatureNDAnisotropicDiffusionFunction< TImage >
       }
     else
       {
-      Cx  = vcl_exp(grad_mag_sq   / m_K);
-      Cxd = vcl_exp(grad_mag_sq_d / m_K);
+      Cx  = std::exp(grad_mag_sq   / m_K);
+      Cxd = std::exp(grad_mag_sq_d / m_K);
       }
     // First order normalized finite-difference conductance products
     dx_forward_Cn  = ( dx_forward[i]  / grad_mag ) * Cx;
@@ -164,7 +165,7 @@ CurvatureNDAnisotropicDiffusionFunction< TImage >
         + vnl_math_sqr( vnl_math_min(dx_forward[i],  0.0) );
       }
     }
-  return static_cast< PixelType >( vcl_sqrt(propagation_gradient) * speed );
+  return static_cast< PixelType >( std::sqrt(propagation_gradient) * speed );
 }
 } // end namespace itk
 
diff --git a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.hxx b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.hxx
index 9117446..85de432 100644
--- a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.hxx
+++ b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkGradientNDAnisotropicDiffusionFunction.hxx
@@ -29,7 +29,8 @@ double GradientNDAnisotropicDiffusionFunction< TImage >
 
 template< typename TImage >
 GradientNDAnisotropicDiffusionFunction< TImage >
-::GradientNDAnisotropicDiffusionFunction()
+::GradientNDAnisotropicDiffusionFunction() :
+  m_K(0.0)
 {
   unsigned int i, j;
   RadiusType   r;
@@ -144,8 +145,8 @@ GradientNDAnisotropicDiffusionFunction< TImage >
       }
     else
       {
-      Cx = vcl_exp( ( vnl_math_sqr(dx_forward) + accum )  / m_K );
-      Cxd = vcl_exp( ( vnl_math_sqr(dx_backward) + accum_d ) / m_K );
+      Cx = std::exp( ( vnl_math_sqr(dx_forward) + accum )  / m_K );
+      Cxd = std::exp( ( vnl_math_sqr(dx_backward) + accum_d ) / m_K );
       }
 
     // Conductance modified first order derivatives.
diff --git a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureAnisotropicDiffusionImageFilter.h b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureAnisotropicDiffusionImageFilter.h
index 6608fb7..bb2542a 100644
--- a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureAnisotropicDiffusionImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureAnisotropicDiffusionImageFilter.h
@@ -107,7 +107,7 @@ protected:
   virtual void InitializeIteration()
   {
     Superclass::InitializeIteration();
-    if ( this->GetTimeStep() >  0.5 / vcl_pow( 2.0, static_cast< double >( ImageDimension ) ) )
+    if ( this->GetTimeStep() >  0.5 / std::pow( 2.0, static_cast< double >( ImageDimension ) ) )
       {
       itkWarningMacro(
         << "Anisotropic diffusion has attempted to use a time step which may introduce instability into the solution.");
diff --git a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.hxx b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.hxx
index 1cfcea2..c71b9ba 100644
--- a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.hxx
+++ b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorCurvatureNDAnisotropicDiffusionFunction.hxx
@@ -143,8 +143,8 @@ VectorCurvatureNDAnisotropicDiffusionFunction< TImage >
         }
       }
 
-    grad_mag[k]   = vcl_sqrt(m_MIN_NORM + grad_mag_sq[k]);
-    grad_mag_d[k] = vcl_sqrt(m_MIN_NORM + grad_mag_sq_d[k]);
+    grad_mag[k]   = std::sqrt(m_MIN_NORM + grad_mag_sq[k]);
+    grad_mag_d[k] = std::sqrt(m_MIN_NORM + grad_mag_sq_d[k]);
     // this grad mag should depend only on the current k
     for ( i = 0; i < ImageDimension; i++ )
       {
@@ -174,8 +174,8 @@ VectorCurvatureNDAnisotropicDiffusionFunction< TImage >
       }
     else
       {
-      Cx[i]  = vcl_exp(grad_mag_sq_tmp   / m_K);
-      Cxd[i] = vcl_exp(grad_mag_sq_d_tmp / m_K);
+      Cx[i]  = std::exp(grad_mag_sq_tmp   / m_K);
+      Cxd[i] = std::exp(grad_mag_sq_d_tmp / m_K);
       }
     }
 
@@ -213,7 +213,7 @@ VectorCurvatureNDAnisotropicDiffusionFunction< TImage >
         }
       }
 
-    ans[k] = vcl_sqrt(propagation_gradient) * speed;
+    ans[k] = std::sqrt(propagation_gradient) * speed;
     }
 
   return ans;
diff --git a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.hxx b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.hxx
index d79807c..bdf49ee 100644
--- a/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.hxx
+++ b/Utilities/ITK/Modules/Filtering/AnisotropicSmoothing/include/itkVectorGradientNDAnisotropicDiffusionFunction.hxx
@@ -147,8 +147,8 @@ VectorGradientNDAnisotropicDiffusionFunction< TImage >
       }
     else
       {
-      Cx[i]  = vcl_exp(GradMag   / m_K);
-      Cxd[i] = vcl_exp(GradMag_d / m_K);
+      Cx[i]  = std::exp(GradMag   / m_K);
+      Cxd[i] = std::exp(GradMag_d / m_K);
       }
     }
 
diff --git a/Utilities/ITK/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx b/Utilities/ITK/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx
index 5e54b7a..26ee95c 100644
--- a/Utilities/ITK/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/AntiAlias/include/itkAntiAliasBinaryImageFilter.hxx
@@ -59,7 +59,7 @@ template< typename TInputImage, typename TOutputImage >
 AntiAliasBinaryImageFilter< TInputImage, TOutputImage >
 ::AntiAliasBinaryImageFilter()
 {
-  m_InputImage = NULL;
+  m_InputImage = ITK_NULLPTR;
   m_CurvatureFunction = CurvatureFunctionType::New();
   this->SetDifferenceFunction(m_CurvatureFunction);
 
diff --git a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkCompositeValleyFunction.h b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkCompositeValleyFunction.h
index 1f20f68..0198506 100644
--- a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkCompositeValleyFunction.h
+++ b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkCompositeValleyFunction.h
@@ -136,7 +136,7 @@ public:
   }
 
   /** Evalaute the function at point x.  */
-  inline MeasureType Evaluate(MeasureType x)
+  virtual inline MeasureType Evaluate(MeasureType x) ITK_OVERRIDE
   {
     MeasureType res = 1;
 
diff --git a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h
index c9b0574..dc8680c 100644
--- a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h
+++ b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.h
@@ -124,7 +124,7 @@ public:
 protected:
   MRASlabIdentifier();
   virtual ~MRASlabIdentifier() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   MRASlabIdentifier(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx
index 8d5afaf..6090053 100644
--- a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx
+++ b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx
@@ -31,7 +31,7 @@ template< typename TInputImage >
 MRASlabIdentifier< TInputImage >
 ::MRASlabIdentifier()
 {
-  m_Image = 0;
+  m_Image = ITK_NULLPTR;
   m_NumberOfSamples = 10;
   m_BackgroundMinimumThreshold = NumericTraits< ImagePixelType >::min();
   m_Tolerance = 0.0;
diff --git a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h
index d4551e4..0002762 100644
--- a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h
+++ b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.h
@@ -122,12 +122,12 @@ public:
 
   /** Gets the total energy value of an image or a slice using the
    * given parameters. */
-  MeasureType GetValue(const ParametersType & parameters) const;
+  virtual MeasureType GetValue(const ParametersType & parameters) const ITK_OVERRIDE;
 
   /** Dummy implementation to confirm to the SingleValuedCostFunction
    * interfaces. It is pure virtual in the superclass */
   void GetDerivative( const ParametersType & itkNotUsed(parameters),
-                      DerivativeType & itkNotUsed(derivative) ) const
+                      DerivativeType & itkNotUsed(derivative) ) const ITK_OVERRIDE
   {}
 
   /** Set Mean and Sigma for the normal distributions
@@ -137,7 +137,7 @@ public:
   void InitializeDistributions(Array< double > classMeans,
                                Array< double > classSigmas);
 
-  unsigned int GetNumberOfParameters(void) const;
+  virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE;
 
 protected:
   /** Constructor: */
@@ -470,13 +470,13 @@ protected:
   bool CheckMaskImage(ImageMaskType *mask);
 
 protected:
-  /** Converts image data from source to target applying vcl_log(pixel + 1)
+  /** Converts image data from source to target applying std::log(pixel + 1)
    * to all pixels. If the source pixel has negative value, it sets
    * the value of the corresponding pixel in the targe image as zero.  */
   void Log1PImage(InternalImageType *source,
                   InternalImageType *target);
 
-  /** Converts image data from source to target applying vcl_exp(pixel) - 1
+  /** Converts image data from source to target applying std::exp(pixel) - 1
    * to all pixels.  */
   void ExpImage(InternalImageType *source,
                 InternalImageType *target);
diff --git a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx
index 39d4845..f6e6f9f 100644
--- a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx
@@ -28,13 +28,13 @@ template< typename TImage, typename TImageMask, typename TBiasField >
 MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >
 ::MRIBiasEnergyFunction()
 {
-  m_BiasField = 0;
+  m_BiasField = ITK_NULLPTR;
   for ( unsigned int i = 0; i < SpaceDimension; i++ )
     {
     m_SamplingFactor[i] = 1;
     }
-  m_Mask = NULL;
-  m_Image = NULL;
+  m_Mask = ITK_NULLPTR;
+  m_Image = ITK_NULLPTR;
 }
 
 template< typename TImage, typename TImageMask, typename TBiasField >
@@ -52,7 +52,7 @@ MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >
 ::~MRIBiasEnergyFunction()
 {
   delete m_InternalEnergyFunction;
-  m_InternalEnergyFunction = 0;
+  m_InternalEnergyFunction = ITK_NULLPTR;
 }
 
 template< typename TImage, typename TImageMask, typename TBiasField >
@@ -60,7 +60,7 @@ unsigned int
 MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >
 ::GetNumberOfParameters(void) const
 {
-  if ( m_BiasField == 0 )
+  if ( m_BiasField == ITK_NULLPTR )
     {
     return 0;
     }
@@ -82,7 +82,7 @@ MRIBiasEnergyFunction< TImage, TImageMask, TBiasField >
     itkExceptionMacro(<< "EnergyFunction is null");
     }
 
-  if ( m_BiasField == 0 )
+  if ( m_BiasField == ITK_NULLPTR )
     {
     itkExceptionMacro(<< "BiasField is null");
     }
@@ -211,8 +211,8 @@ template< typename TInputImage, typename TOutputImage, typename TMaskImage >
 MRIBiasFieldCorrectionFilter< TInputImage, TOutputImage, TMaskImage >
 ::MRIBiasFieldCorrectionFilter()
 {
-  m_InputMask = 0;
-  m_OutputMask = 0;
+  m_InputMask = ITK_NULLPTR;
+  m_OutputMask = ITK_NULLPTR;
 
   m_BiasMultiplicative = true;
   m_BiasFieldDegree = 3;
@@ -220,12 +220,12 @@ MRIBiasFieldCorrectionFilter< TInputImage, TOutputImage, TMaskImage >
   m_VolumeCorrectionMaximumIteration = 2000;
   m_InterSliceCorrectionMaximumIteration = 4000;
   m_OptimizerGrowthFactor = 1.05;
-  m_OptimizerShrinkFactor = vcl_pow(m_OptimizerGrowthFactor, -0.25);
+  m_OptimizerShrinkFactor = std::pow(m_OptimizerGrowthFactor, -0.25);
 
-  m_EnergyFunction = 0;
+  m_EnergyFunction = ITK_NULLPTR;
   m_NormalVariateGenerator = NormalVariateGeneratorType::New();
   //m_NormalVariateGenerator->Initialize(3024);
-  m_NormalVariateGenerator->Initialize( time(NULL) );
+  m_NormalVariateGenerator->Initialize( time(ITK_NULLPTR) );
 
   if ( ImageDimension == 3 )
     {
@@ -578,12 +578,12 @@ throw ( ExceptionObject )
     const unsigned int size = m_TissueClassMeans.Size();
     for ( unsigned int i = 0; i < size; i++ )
       {
-      m_TissueClassSigmas[i] = vcl_log( 1.0 + m_TissueClassSigmas[i]
+      m_TissueClassSigmas[i] = std::log( 1.0 + m_TissueClassSigmas[i]
                                         / ( m_TissueClassMeans[i] + 1.0 ) );
-      m_TissueClassMeans[i] = vcl_log(m_TissueClassMeans[i] + 1.0);
+      m_TissueClassMeans[i] = std::log(m_TissueClassMeans[i] + 1.0);
       }
 
-    m_OptimizerInitialRadius = vcl_log(1.0 + m_OptimizerInitialRadius);
+    m_OptimizerInitialRadius = std::log(1.0 + m_OptimizerInitialRadius);
 
     this->Log1PImage( m_InternalInput.GetPointer(),
                       m_InternalInput.GetPointer() );
@@ -932,12 +932,12 @@ MRIBiasFieldCorrectionFilter< TInputImage, TOutputImage, TMaskImage >
     const unsigned int size = m_TissueClassMeans.Size();
     for ( unsigned int i = 0; i < size; i++ )
       {
-      m_TissueClassMeans[i] = vcl_exp(m_TissueClassMeans[i]) - 1.0;
-      m_TissueClassSigmas[i] = vcl_exp(m_TissueClassSigmas[i])
+      m_TissueClassMeans[i] = std::exp(m_TissueClassMeans[i]) - 1.0;
+      m_TissueClassSigmas[i] = std::exp(m_TissueClassSigmas[i])
                                * ( 1.0 + m_TissueClassMeans[i] )
                                - m_TissueClassMeans[i];
       }
-    m_OptimizerInitialRadius = vcl_exp(m_OptimizerInitialRadius) - 1.0;
+    m_OptimizerInitialRadius = std::exp(m_OptimizerInitialRadius) - 1.0;
     }
 
   if ( m_GeneratingOutput )
@@ -1034,7 +1034,7 @@ MRIBiasFieldCorrectionFilter< TInputImage, TOutputImage, TMaskImage >
       }
     else
       {
-      t_iter.Set( vcl_log(pixel + 1) );
+      t_iter.Set( std::log(pixel + 1) );
       }
 
     ++s_iter;
@@ -1063,7 +1063,7 @@ MRIBiasFieldCorrectionFilter< TInputImage, TOutputImage, TMaskImage >
     {
     temp = s_iter.Get();
     //t_iter.Set( m_EnergyFunction->GetEnergy0(temp));
-    temp = vcl_exp(temp) - 1;
+    temp = std::exp(temp) - 1;
     t_iter.Set( (InternalImagePixelType)temp );
 
     ++s_iter;
diff --git a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx
index e8ff593..add2c38 100644
--- a/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx
@@ -52,7 +52,7 @@ N4BiasFieldCorrectionImageFilter<TInputImage, TMaskImage, TOutputImage>
 {
   this->SetNumberOfRequiredInputs( 1 );
 
-  this->m_LogBiasFieldControlPointLattice = NULL;
+  this->m_LogBiasFieldControlPointLattice = ITK_NULLPTR;
 
   this->m_NumberOfFittingLevels.Fill( 1 );
   this->m_NumberOfControlPoints.Fill( 4 );
@@ -105,7 +105,7 @@ N4BiasFieldCorrectionImageFilter<TInputImage, TMaskImage, TOutputImage>
       {
       if( It.Get() > NumericTraits<typename InputImageType::PixelType>::Zero )
         {
-        It.Set( vcl_log( static_cast< RealType >( It.Get() ) ) );
+        It.Set( std::log( static_cast< RealType >( It.Get() ) ) );
         }
       }
     }
@@ -124,9 +124,7 @@ N4BiasFieldCorrectionImageFilter<TInputImage, TMaskImage, TOutputImage>
   RealImagePointer logBiasField = RealImageType::New();
   logBiasField->CopyInformation( inputImage );
   logBiasField->SetRegions( inputImage->GetLargestPossibleRegion() );
-  logBiasField->Allocate();
-  logBiasField->FillBuffer( 0.0 );
-
+  logBiasField->Allocate(true); // initialize buffer to zero
 
   // Iterate until convergence or iterative exhaustion.
   unsigned int maximumNumberOfLevels = 1;
@@ -305,10 +303,10 @@ N4BiasFieldCorrectionImageFilter<TInputImage, TMaskImage, TOutputImage>
   // histogram to a power of 2.
 
   RealType exponent =
-    vcl_ceil( vcl_log( static_cast<RealType>( this->m_NumberOfHistogramBins ) ) /
-              vcl_log( 2.0 ) ) + 1;
+    std::ceil( std::log( static_cast<RealType>( this->m_NumberOfHistogramBins ) ) /
+              std::log( 2.0 ) ) + 1;
   unsigned int paddedHistogramSize = static_cast<unsigned int>(
-    vcl_pow( static_cast<RealType>( 2.0 ), exponent ) + 0.5 );
+    std::pow( static_cast<RealType>( 2.0 ), exponent ) + 0.5 );
   unsigned int histogramOffset = static_cast<unsigned int>( 0.5 *
     ( paddedHistogramSize - this->m_NumberOfHistogramBins ) );
 
@@ -331,8 +329,8 @@ N4BiasFieldCorrectionImageFilter<TInputImage, TMaskImage, TOutputImage>
   // Create the Gaussian filter.
 
   RealType scaledFWHM = this->m_BiasFieldFullWidthAtHalfMaximum / histogramSlope;
-  RealType expFactor = 4.0 * vcl_log( 2.0 ) / vnl_math_sqr( scaledFWHM );
-  RealType scaleFactor = 2.0 * vcl_sqrt( vcl_log( 2.0 )
+  RealType expFactor = 4.0 * std::log( 2.0 ) / vnl_math_sqr( scaledFWHM );
+  RealType scaleFactor = 2.0 * std::sqrt( std::log( 2.0 )
                                          / vnl_math::pi ) / scaledFWHM;
 
   vnl_vector< vcl_complex<RealType> > F( paddedHistogramSize,
@@ -344,11 +342,11 @@ N4BiasFieldCorrectionImageFilter<TInputImage, TMaskImage, TOutputImage>
   for( unsigned int n = 1; n <= halfSize; n++ )
     {
     F[n] = F[paddedHistogramSize - n] = vcl_complex<RealType>( scaleFactor *
-      vcl_exp( -vnl_math_sqr( static_cast<RealType>( n ) ) * expFactor ), 0.0 );
+      std::exp( -vnl_math_sqr( static_cast<RealType>( n ) ) * expFactor ), 0.0 );
     }
   if( paddedHistogramSize % 2 == 0 )
     {
-    F[halfSize] = vcl_complex<RealType>( scaleFactor * vcl_exp( 0.25 *
+    F[halfSize] = vcl_complex<RealType>( scaleFactor * std::exp( 0.25 *
       -vnl_math_sqr( static_cast<RealType>( paddedHistogramSize ) ) *
       expFactor ), 0.0 );
     }
@@ -434,8 +432,7 @@ N4BiasFieldCorrectionImageFilter<TInputImage, TMaskImage, TOutputImage>
   RealImagePointer sharpenedImage = RealImageType::New();
   sharpenedImage->CopyInformation( inputImage );
   sharpenedImage->SetRegions( inputImage->GetLargestPossibleRegion() );
-  sharpenedImage->Allocate();
-  sharpenedImage->FillBuffer( 0.0 );
+  sharpenedImage->Allocate(true); // initialize buffer to zero
 
   ImageRegionIterator<RealImageType> ItC(
     sharpenedImage, sharpenedImage->GetLargestPossibleRegion() );
@@ -661,7 +658,7 @@ N4BiasFieldCorrectionImageFilter<TInputImage, TMaskImage, TOutputImage>
         && ( !confidenceImage ||
              confidenceImage->GetPixel( It.GetIndex() ) > 0.0 ) )
       {
-      RealType pixel = vcl_exp( It.Get() );
+      RealType pixel = std::exp( It.Get() );
       N += 1.0;
 
       if( N > 1.0 )
@@ -671,7 +668,7 @@ N4BiasFieldCorrectionImageFilter<TInputImage, TMaskImage, TOutputImage>
       mu = mu * ( 1.0 - 1.0 / N ) + pixel / N;
       }
     }
-  sigma = vcl_sqrt( sigma / ( N - 1.0 ) );
+  sigma = std::sqrt( sigma / ( N - 1.0 ) );
 
   return ( sigma / mu );
 }
@@ -704,15 +701,7 @@ N4BiasFieldCorrectionImageFilter<TInputImage, TMaskImage, TOutputImage>
   os << indent << "CurrentLevel: " << this->m_CurrentLevel << std::endl;
   os << indent << "ElapsedIterations: "
      << this->m_ElapsedIterations << std::endl;
-  if ( this->m_LogBiasFieldControlPointLattice )
-    {
-    os << indent << "LogBiasFieldControlPointLattice:" << std::endl;
-    this->m_LogBiasFieldControlPointLattice->Print( os, indent.GetNextIndent() );
-    }
-  else
-    {
-    os << indent << "LogBiasFieldControlPointLattice: " << "(null)" << std::endl;
-    }
+  itkPrintSelfObjectMacro( LogBiasFieldControlPointLattice );
 }
 
 } // end namespace itk
diff --git a/Utilities/ITK/Modules/Filtering/BiasCorrection/src/itkCacheableScalarFunction.cxx b/Utilities/ITK/Modules/Filtering/BiasCorrection/src/itkCacheableScalarFunction.cxx
index 76105b5..9cb503a 100644
--- a/Utilities/ITK/Modules/Filtering/BiasCorrection/src/itkCacheableScalarFunction.cxx
+++ b/Utilities/ITK/Modules/Filtering/BiasCorrection/src/itkCacheableScalarFunction.cxx
@@ -20,9 +20,14 @@
 namespace itk
 {
 CacheableScalarFunction
-::CacheableScalarFunction()
+::CacheableScalarFunction() :
+  m_NumberOfSamples(0),
+  m_CacheTable(0),
+  m_CacheUpperBound(0.0),
+  m_CacheLowerBound(0.0),
+  m_TableInc(0.0),
+  m_CacheAvailable(false)
 {
-  m_CacheAvailable = false;
 }
 
 void
diff --git a/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.hxx
index 45d655d..30abb67 100644
--- a/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryClosingByReconstructionImageFilter.hxx
@@ -26,7 +26,6 @@
 #include "itkConstantPadImageFilter.h"
 #include "itkConstNeighborhoodIterator.h"
 #include "itkNeighborhoodIterator.h"
-#include "itkProgressReporter.h"
 
 namespace itk {
 
diff --git a/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx b/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx
index eeb81bb..c0c283b 100644
--- a/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx
@@ -201,16 +201,16 @@ BinaryThinningImageFilter< TInputImage, TOutputImage >
           // First find the total number of transitions, and then
           // divide by 2.
           const PixelType transitions = (
-            vcl_abs( static_cast< int >( p3
+            std::abs( static_cast< int >( p3
                                          - p2 ) )
-            + vcl_abs( static_cast< int >( p4
+            + std::abs( static_cast< int >( p4
                                            - p3 ) )
-            + vcl_abs( static_cast< int >( p5 - p4 ) ) + vcl_abs( static_cast< int >( p6 - p5 ) )
-            + vcl_abs( static_cast< int >( p7
+            + std::abs( static_cast< int >( p5 - p4 ) ) + std::abs( static_cast< int >( p6 - p5 ) )
+            + std::abs( static_cast< int >( p7
                                            - p6 ) )
-            + vcl_abs( static_cast< int >( p8
+            + std::abs( static_cast< int >( p8
                                            - p7 ) )
-            + vcl_abs( static_cast< int >( p9 - p8 ) ) + vcl_abs( static_cast< int >( p2 - p9 ) )
+            + std::abs( static_cast< int >( p9 - p8 ) ) + std::abs( static_cast< int >( p2 - p9 ) )
             ) / 2;
 
           if ( transitions == 1 )
diff --git a/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx b/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx
index 9e116f0..8fbff7a 100644
--- a/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx
@@ -189,7 +189,7 @@ ObjectMorphologyImageFilter< TInputImage, TOutputImage, TKernel >
 ::IsObjectPixelOnBoundary(const InputNeighborhoodIteratorType & iNIter)
 {
   static const unsigned int s =
-    (unsigned int)vcl_pow( (double)3.0,
+    (unsigned int)std::pow( (double)3.0,
                            (double)( ImageDimension ) );
 
   PixelType    tf;
diff --git a/Utilities/ITK/Modules/Filtering/Colormap/include/itkColormapFunction.h b/Utilities/ITK/Modules/Filtering/Colormap/include/itkColormapFunction.h
index 5e4da68..d10ffe5 100644
--- a/Utilities/ITK/Modules/Filtering/Colormap/include/itkColormapFunction.h
+++ b/Utilities/ITK/Modules/Filtering/Colormap/include/itkColormapFunction.h
@@ -123,7 +123,7 @@ protected:
     return rescaled;
     }
 
-  void PrintSelf(std::ostream & os, Indent indent) const
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
     {
     Superclass::PrintSelf(os, indent);
 
diff --git a/Utilities/ITK/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx
index 0377242..bb9f336 100644
--- a/Utilities/ITK/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx
@@ -77,8 +77,8 @@ FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPre
 
   const KernelImageType* kernelImage = this->GetKernelImage();
 
-  InternalComplexImagePointerType input = NULL;
-  InternalComplexImagePointerType kernel = NULL;
+  InternalComplexImagePointerType input = ITK_NULLPTR;
+  InternalComplexImagePointerType kernel = ITK_NULLPTR;
   this->PrepareInputs( localInput, kernelImage, input, kernel, progress, 0.7f );
 
   typedef MultiplyImageFilter< InternalComplexImageType,
@@ -91,8 +91,8 @@ FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPre
   progress->RegisterInternalFilter( multiplyFilter, 0.1 );
 
   // Free up the memory for the prepared inputs
-  input = NULL;
-  kernel = NULL;
+  input = ITK_NULLPTR;
+  kernel = ITK_NULLPTR;
 
   this->ProduceOutput( multiplyFilter->GetOutput(), progress, 0.2 );
 }
@@ -193,8 +193,8 @@ FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPre
   transformedInput = imageFFTFilter->GetOutput();
   transformedInput->DisconnectPipeline();
 
-  imageFFTFilter->SetInput( NULL );
-  imageFFTFilter = NULL;
+  imageFFTFilter->SetInput( ITK_NULLPTR );
+  imageFFTFilter = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
@@ -214,7 +214,7 @@ FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPre
     kernelUpperBound[i] = padSize[i] - kernelSize[i];
     }
 
-  InternalImagePointerType paddedKernelImage = NULL;
+  InternalImagePointerType paddedKernelImage = ITK_NULLPTR;
 
   float paddingWeight = 0.2f;
   if ( this->GetNormalize() )
@@ -331,7 +331,6 @@ FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPre
   typedef ExtractImageFilter< InternalImageType, OutputImageType > ExtractFilterType;
 
   typename ExtractFilterType::Pointer extractFilter = ExtractFilterType::New();
-  extractFilter->SetDirectionCollapseToIdentity();
   extractFilter->InPlaceOn();
   extractFilter->GraftOutput( this->GetOutput() );
 
@@ -353,9 +352,16 @@ FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPre
   progress->RegisterInternalFilter( extractFilter, progressWeight );
   extractFilter->Update();
 
-  // Graft the output of the crop filter back onto this
-  // filter's output.
-  this->GraftOutput( extractFilter->GetOutput() );
+  OutputImageType *extractedImage = extractFilter->GetOutput();
+  OutputImageType *output = this->GetOutput();
+
+  // Only manually copy the buffer via the pixel container.
+  // The output meta-data of the extract filter is not correct and
+  // different that the GenerateOutputInformation method. So just copy
+  // the buffer.
+  output->SetBufferedRegion(extractedImage->GetBufferedRegion());
+  output->SetPixelContainer(extractedImage->GetPixelContainer());
+
 }
 
 template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
diff --git a/Utilities/ITK/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx
index 7e9a538..6f8cc4c 100644
--- a/Utilities/ITK/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx
@@ -119,14 +119,14 @@ void MaskedFFTNormalizedCorrelationImageFilter<TInputImage, TOutputImage, TMaskI
   InputImagePointer movingImage = InputImageType::New();
   movingImage->Graft( this->GetMovingImage() );
 
-  MaskImagePointer fixedMask = NULL;
+  MaskImagePointer fixedMask = ITK_NULLPTR;
   if( this->GetFixedImageMask() )
   {
     fixedMask = MaskImageType::New();
     fixedMask->Graft( this->GetFixedImageMask() );
   }
 
-  MaskImagePointer movingMask = NULL;
+  MaskImagePointer movingMask = ITK_NULLPTR;
   if( this->GetMovingImageMask() )
   {
     movingMask = MaskImageType::New();
@@ -146,9 +146,9 @@ void MaskedFFTNormalizedCorrelationImageFilter<TInputImage, TOutputImage, TMaskI
   movingImage = this->PreProcessImage( movingImage,movingMask );
 
   InputImagePointer rotatedMovingImage = this->RotateImage<InputImageType>( movingImage );
-  movingImage = NULL;
+  movingImage = ITK_NULLPTR;
   MaskImagePointer rotatedMovingMask = this->RotateImage<MaskImageType>( movingMask);
-  movingMask = NULL;
+  movingMask = ITK_NULLPTR;
 
   // The combinedImageSize is the size resulting from the correlation of the two images.
   RealSizeType combinedImageSize;
@@ -168,10 +168,10 @@ void MaskedFFTNormalizedCorrelationImageFilter<TInputImage, TOutputImage, TMaskI
   // separation.
   FFTImagePointer fixedFFT = this->CalculateForwardFFT<InputImageType,FFTImageType>( fixedImage, FFTImageSize );
   FFTImagePointer fixedMaskFFT = this->CalculateForwardFFT<MaskImageType,FFTImageType>( fixedMask, FFTImageSize );
-  fixedMask = NULL;
+  fixedMask = ITK_NULLPTR;
   FFTImagePointer rotatedMovingFFT = this->CalculateForwardFFT<InputImageType,FFTImageType>( rotatedMovingImage, FFTImageSize );
   FFTImagePointer rotatedMovingMaskFFT = this->CalculateForwardFFT<MaskImageType,FFTImageType>( rotatedMovingMask, FFTImageSize );
-  rotatedMovingMask = NULL;
+  rotatedMovingMask = ITK_NULLPTR;
 
   // Only 6 IFFTs are needed.
   // Compute and save some of these rather than computing them multiple times.
@@ -188,31 +188,31 @@ void MaskedFFTNormalizedCorrelationImageFilter<TInputImage, TOutputImage, TMaskI
   RealImagePointer numerator = this->ElementSubtraction<RealImageType>(
       this->CalculateInverseFFT<FFTImageType,RealImageType>(this->ElementProduct<FFTImageType,FFTImageType>(fixedFFT,rotatedMovingFFT),combinedImageSize),
       this->ElementQuotient<RealImageType>(this->ElementProduct<RealImageType,RealImageType>(fixedCumulativeSumImage,rotatedMovingCumulativeSumImage),numberOfOverlapPixels));
-  fixedFFT = NULL; // No longer needed
-  rotatedMovingFFT = NULL; // No longer needed
+  fixedFFT = ITK_NULLPTR; // No longer needed
+  rotatedMovingFFT = ITK_NULLPTR; // No longer needed
 
   // Calculate the fixed part of the masked FFT NCC denominator.
   FFTImagePointer fixedSquaredFFT = this->CalculateForwardFFT<RealImageType,FFTImageType>( this->ElementProduct<InputImageType,RealImageType>(fixedImage,fixedImage), FFTImageSize );
-  fixedImage = NULL; // No longer needed
+  fixedImage = ITK_NULLPTR; // No longer needed
   RealImagePointer fixedDenom = this->ElementSubtraction<RealImageType>(
       this->CalculateInverseFFT<FFTImageType,RealImageType>(this->ElementProduct<FFTImageType,FFTImageType>(fixedSquaredFFT,rotatedMovingMaskFFT),combinedImageSize),
       this->ElementQuotient<RealImageType>(this->ElementProduct<RealImageType,RealImageType>(fixedCumulativeSumImage,fixedCumulativeSumImage),numberOfOverlapPixels));
-  fixedSquaredFFT = NULL; // No longer needed
-  rotatedMovingMaskFFT = NULL; // No longer needed
-  fixedCumulativeSumImage = NULL; // No longer needed
+  fixedSquaredFFT = ITK_NULLPTR; // No longer needed
+  rotatedMovingMaskFFT = ITK_NULLPTR; // No longer needed
+  fixedCumulativeSumImage = ITK_NULLPTR; // No longer needed
   // Ensure that the result is positive.
   fixedDenom = this->ElementPositive<RealImageType>(fixedDenom);
 
   // Calculate the moving part of the masked FFT NCC denominator.
   FFTImagePointer rotatedMovingSquaredFFT = this->CalculateForwardFFT<RealImageType,FFTImageType>(
       this->ElementProduct<InputImageType,RealImageType>(rotatedMovingImage,rotatedMovingImage), FFTImageSize );
-  rotatedMovingImage = NULL; // No longer needed
+  rotatedMovingImage = ITK_NULLPTR; // No longer needed
   RealImagePointer rotatedMovingDenom = this->ElementSubtraction<RealImageType>(
       this->CalculateInverseFFT<FFTImageType,RealImageType>(this->ElementProduct<FFTImageType,FFTImageType>(fixedMaskFFT,rotatedMovingSquaredFFT),combinedImageSize),
       this->ElementQuotient<RealImageType>(this->ElementProduct<RealImageType,RealImageType>(rotatedMovingCumulativeSumImage,rotatedMovingCumulativeSumImage),numberOfOverlapPixels));
-  rotatedMovingSquaredFFT = NULL; // No longer needed
-  fixedMaskFFT = NULL; // No longer needed
-  rotatedMovingCumulativeSumImage = NULL; // No longer needed
+  rotatedMovingSquaredFFT = ITK_NULLPTR; // No longer needed
+  fixedMaskFFT = ITK_NULLPTR; // No longer needed
+  rotatedMovingCumulativeSumImage = ITK_NULLPTR; // No longer needed
   // Ensure that the result is positive.
   rotatedMovingDenom = this->ElementPositive<RealImageType>(rotatedMovingDenom);
 
@@ -221,14 +221,14 @@ void MaskedFFTNormalizedCorrelationImageFilter<TInputImage, TOutputImage, TMaskI
   sqrtFilter->SetInput( this->ElementProduct<RealImageType,RealImageType>(fixedDenom,rotatedMovingDenom) );
   sqrtFilter->Update();
   RealImagePointer denominator = sqrtFilter->GetOutput();
-  fixedDenom = NULL;  // No longer needed
-  rotatedMovingDenom = NULL; // No longer needed
+  fixedDenom = ITK_NULLPTR;  // No longer needed
+  rotatedMovingDenom = ITK_NULLPTR; // No longer needed
 
   // Determine a tolerance on the precision of the denominator values.
   const double precisionTolerance = CalculatePrecisionTolerance<RealImageType>( denominator );
 
   RealImagePointer NCC = this->ElementQuotient<RealImageType>(numerator,denominator);
-  numerator = NULL; // No longer needed
+  numerator = ITK_NULLPTR; // No longer needed
 
   // Given the numberOfOverlapPixels, we can check that the m_RequiredNumberOfOverlappingPixels is not set higher than
   // the actual maximum overlap voxels.  If it is, we set m_RequiredNumberOfOverlappingPixels to be this maximum.
@@ -236,7 +236,7 @@ void MaskedFFTNormalizedCorrelationImageFilter<TInputImage, TOutputImage, TMaskI
   typename CalculatorType::Pointer calculator = CalculatorType::New();
   calculator->SetImage(numberOfOverlapPixels);
   calculator->ComputeMaximum();
-  m_MaximumNumberOfOverlappingPixels = calculator->GetMaximum();
+  m_MaximumNumberOfOverlappingPixels = static_cast< SizeValueType >( calculator->GetMaximum() );
   if( m_RequiredNumberOfOverlappingPixels > m_MaximumNumberOfOverlappingPixels )
   {
     m_RequiredNumberOfOverlappingPixels = (SizeValueType)m_MaximumNumberOfOverlappingPixels;
@@ -562,11 +562,11 @@ MaskedFFTNormalizedCorrelationImageFilter<TInputImage, TOutputImage, TMaskImage>
   double precisionTolerance=0.0F;
   if( typeid(inputImage->GetPixel(index)) == typeid(double) )
     {
-    precisionTolerance = 1000.0 * vcl_pow(2.0,-52) * vcl_pow(2,vcl_floor(vcl_log(calculator->GetMaximum())/vcl_log(2.0)));
+    precisionTolerance = 1000.0 * std::pow(2.0,-52) * std::pow(2,std::floor(std::log(calculator->GetMaximum())/std::log(2.0)));
     }
   else if( typeid(inputImage->GetPixel(index)) == typeid(float) )
     {
-    precisionTolerance = 1000.0 * vcl_pow(2.0,-23) * vcl_pow(2,vcl_floor(vcl_log(calculator->GetMaximum())/vcl_log(2.0)));
+    precisionTolerance = 1000.0 * std::pow(2.0,-23) * std::pow(2,std::floor(std::log(calculator->GetMaximum())/std::log(2.0)));
     }
   else
     {
diff --git a/Utilities/ITK/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.h b/Utilities/ITK/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.h
index abb1fc7..131bc51 100644
--- a/Utilities/ITK/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.h
@@ -142,8 +142,7 @@ protected:
    * region is expanded by the radius of the template.  If the request
    * extends past the LargestPossibleRegion for the input, the request
    * is cropped by the LargestPossibleRegion. */
-  void GenerateInputRequestedRegion()
-  throw ( InvalidRequestedRegionError );
+  void GenerateInputRequestedRegion();
 
   /** NormalizedCorrelationImageFilter can be implemented as a
    * multithreaded filter.  Therefore, this implementation provides a
diff --git a/Utilities/ITK/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.hxx
index fe1203e..584fa31 100644
--- a/Utilities/ITK/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Convolution/include/itkNormalizedCorrelationImageFilter.hxx
@@ -46,7 +46,6 @@ template< typename TInputImage, typename TMaskImage, typename TOutputImage, type
 void
 NormalizedCorrelationImageFilter< TInputImage, TMaskImage, TOutputImage, TOperatorValueType >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
@@ -121,13 +120,13 @@ NormalizedCorrelationImageFilter< TInputImage, TMaskImage, TOutputImage, TOperat
     static_cast< OutputPixelRealType >( this->GetOperator().Size() );
   OutputPixelRealType mean = sum / num;
   OutputPixelRealType var = ( sumOfSquares - ( sum * sum / num ) ) / ( num - 1.0 );
-  OutputPixelRealType std = vcl_sqrt(var);
+  OutputPixelRealType std = std::sqrt(var);
 
   // convert std to a scaling factor k such that
   //
   //        || (coeff - mean) / k || = 1.0
   //
-  double k = std * vcl_sqrt(num - 1.0);
+  double k = std * std::sqrt(num - 1.0);
 
   // normalize the template
   for ( ntIt = normalizedTemplate.Begin(), tIt = this->GetOperator().Begin();
@@ -208,7 +207,7 @@ NormalizedCorrelationImageFilter< TInputImage, TMaskImage, TOutputImage, TOperat
           sum += value;
           sumOfSquares += ( value * value );
           }
-        denominator = vcl_sqrt( sumOfSquares - ( sum * sum / realTemplateSize ) );
+        denominator = std::sqrt( sumOfSquares - ( sum * sum / realTemplateSize ) );
 
         it.Value() = numerator / denominator;
 
@@ -244,7 +243,7 @@ NormalizedCorrelationImageFilter< TInputImage, TMaskImage, TOutputImage, TOperat
             sum += value;
             sumOfSquares += ( value * value );
             }
-          denominator = vcl_sqrt( sumOfSquares - ( sum * sum / realTemplateSize ) );
+          denominator = std::sqrt( sumOfSquares - ( sum * sum / realTemplateSize ) );
 
           it.Value() = numerator / denominator;
           }
diff --git a/Utilities/ITK/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx b/Utilities/ITK/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx
index 9b69b7c..9f849ae 100644
--- a/Utilities/ITK/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx
+++ b/Utilities/ITK/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx
@@ -116,10 +116,13 @@ MinMaxCurvatureFlowFunction< TImage >
     }
 
   // normalize the operator so that it sums to one
-  for ( opIter = m_StencilOperator.Begin(); opIter < opEnd; ++opIter )
+  if (numPixelsInSphere != 0)
     {
-    *opIter = static_cast< PixelType >( (double)*opIter
-                                        / (double)numPixelsInSphere );
+    for ( opIter = m_StencilOperator.Begin(); opIter < opEnd; ++opIter )
+      {
+      *opIter = static_cast< PixelType >( (double)*opIter
+                                          / (double)numPixelsInSphere );
+      }
     }
 }
 
@@ -157,7 +160,7 @@ MinMaxCurvatureFlowFunction< TImage >
 
   if ( gradMagnitude == 0.0 ) { return threshold; }
 
-  gradMagnitude = vcl_sqrt( (double)gradMagnitude );
+  gradMagnitude = std::sqrt( (double)gradMagnitude );
 
   // Search for all position in the neighborhood perpendicular to
   // the gradient and at a distance of StencilRadius from center.
@@ -190,7 +193,7 @@ MinMaxCurvatureFlowFunction< TImage >
       vectorMagnitude += static_cast< PixelType >( vnl_math_sqr(diff) );
       }
 
-    vectorMagnitude = vcl_sqrt( (double)vectorMagnitude );
+    vectorMagnitude = std::sqrt( (double)vectorMagnitude );
 
     if ( vectorMagnitude != 0.0 )
       {
@@ -264,7 +267,7 @@ MinMaxCurvatureFlowFunction< TImage >
 
   if ( gradMagnitude == 0.0 ) { return threshold; }
 
-  gradMagnitude = vcl_sqrt( (double)gradMagnitude )
+  gradMagnitude = std::sqrt( (double)gradMagnitude )
                   / static_cast< PixelType >( m_StencilRadius );
 
   for ( j = 0; j < imageDimension; j++ )
@@ -335,7 +338,7 @@ MinMaxCurvatureFlowFunction< TImage >
 
   if ( gradMagnitude == 0.0 ) { return threshold; }
 
-  gradMagnitude = vcl_sqrt( (double)gradMagnitude )
+  gradMagnitude = std::sqrt( (double)gradMagnitude )
                   / static_cast< PixelType >( m_StencilRadius );
 
   for ( j = 0; j < imageDimension; j++ )
@@ -352,7 +355,7 @@ MinMaxCurvatureFlowFunction< TImage >
     {
     gradient[2] = -1.0;
     }
-  theta = vcl_acos( (double)gradient[2] );
+  theta = std::acos( (double)gradient[2] );
 
   if ( gradient[0] == 0 )
     {
@@ -360,13 +363,13 @@ MinMaxCurvatureFlowFunction< TImage >
     }
   else
     {
-    phi = vcl_atan( (double)gradient[1] / (double)gradient[0] );
+    phi = std::atan( (double)gradient[1] / (double)gradient[0] );
     }
 
-  double cosTheta = vcl_cos(theta);
-  double sinTheta = vcl_sin(theta);
-  double cosPhi   = vcl_cos(phi);
-  double sinPhi   = vcl_sin(phi);
+  double cosTheta = std::cos(theta);
+  double sinTheta = std::sin(theta);
+  double cosPhi   = std::cos(phi);
+  double sinPhi   = std::sin(phi);
 
   double rSinTheta       = m_StencilRadius * sinTheta;
   double rCosThetaCosPhi = m_StencilRadius * cosTheta * cosPhi;
diff --git a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx
index 0db544a..57cdf92 100644
--- a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkInverseDeconvolutionImageFilter.hxx
@@ -47,8 +47,8 @@ InverseDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInter
 
   const KernelImageType* kernelImage = this->GetKernelImage();
 
-  InternalComplexImagePointerType input = NULL;
-  InternalComplexImagePointerType kernel = NULL;
+  InternalComplexImagePointerType input = ITK_NULLPTR;
+  InternalComplexImagePointerType kernel = ITK_NULLPTR;
 
   this->PrepareInputs( localInput, kernelImage, input, kernel, progress, 0.7 );
 
@@ -68,8 +68,8 @@ InverseDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInter
   progress->RegisterInternalFilter( inverseFilter, 0.1 );
 
   // Free up the memory for the prepared inputs
-  input = NULL;
-  kernel = NULL;
+  input = ITK_NULLPTR;
+  kernel = ITK_NULLPTR;
 
   this->ProduceOutput( inverseFilter->GetOutput(), progress, 0.2 );
 }
diff --git a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx
index 1b397a5..f299ae3 100644
--- a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkIterativeDeconvolutionImageFilter.hxx
@@ -31,8 +31,8 @@ IterativeDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInt
   m_NumberOfIterations = 1;
   m_Iteration = 0;
   m_StopIteration = false;
-  m_TransferFunction = NULL;
-  m_CurrentEstimate = NULL;
+  m_TransferFunction = ITK_NULLPTR;
+  m_CurrentEstimate = ITK_NULLPTR;
   m_InputMTime = 0L;
   m_KernelMTime = 0L;
 }
@@ -41,8 +41,8 @@ template< typename TInputImage, typename TKernelImage, typename TOutputImage, ty
 IterativeDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
 ::~IterativeDeconvolutionImageFilter()
 {
-  m_TransferFunction = NULL;
-  m_CurrentEstimate = NULL;
+  m_TransferFunction = ITK_NULLPTR;
+  m_CurrentEstimate = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
@@ -82,8 +82,8 @@ IterativeDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInt
 {
   this->CropOutput( m_CurrentEstimate, progress, progressWeight );
 
-  m_CurrentEstimate = NULL;
-  m_TransferFunction = NULL;
+  m_CurrentEstimate = ITK_NULLPTR;
+  m_TransferFunction = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
diff --git a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx
index a27503d..8a2c4e4 100644
--- a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkLandweberDeconvolutionImageFilter.hxx
@@ -28,14 +28,14 @@ LandweberDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInt
 ::LandweberDeconvolutionImageFilter()
 {
   m_Alpha = 0.1;
-  m_TransformedInput = NULL;
+  m_TransformedInput = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
 LandweberDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
 ::~LandweberDeconvolutionImageFilter()
 {
-  m_TransformedInput = NULL;
+  m_TransformedInput = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
@@ -99,8 +99,8 @@ LandweberDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInt
 {
   this->Superclass::Finish( progress, progressWeight );
 
-  m_LandweberFilter = NULL;
-  m_IFFTFilter = NULL;
+  m_LandweberFilter = ITK_NULLPTR;
+  m_IFFTFilter = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
diff --git a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx
index 59808f3..0266a29 100644
--- a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx
@@ -103,7 +103,7 @@ ParametricBlindLeastSquaresDeconvolutionImageFilter< TInputImage, TKernelImage,
 {
   // Compute the new padded, shifted, and transformed kernel
   m_KernelSource->UpdateLargestPossibleRegion();
-  InternalComplexImagePointerType preparedKernel = NULL;
+  InternalComplexImagePointerType preparedKernel = ITK_NULLPTR;
   this->PrepareKernel( m_KernelSource->GetOutput(), preparedKernel, progress, 0.0 );
 
   m_DifferenceFilter->SetInput1( m_TransformedCurrentEstimate );
@@ -266,10 +266,10 @@ ParametricBlindLeastSquaresDeconvolutionImageFilter< TInputImage, TKernelImage,
 
   this->Superclass::Finish( progress, progressWeight );
 
-  m_TransformedInput = NULL;
-  m_TransformedCurrentEstimate = NULL;
-  m_DifferenceFilter = NULL;
-  m_ImageUpdateFilter = NULL;
+  m_TransformedInput = ITK_NULLPTR;
+  m_TransformedCurrentEstimate = ITK_NULLPTR;
+  m_DifferenceFilter = ITK_NULLPTR;
+  m_ImageUpdateFilter = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TKernelImage, typename TOutputImage >
diff --git a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx
index cb4abf3..839f258 100644
--- a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkProjectedIterativeDeconvolutionImageFilter.hxx
@@ -27,14 +27,14 @@ template< typename TSuperclass >
 ProjectedIterativeDeconvolutionImageFilter< TSuperclass >
 ::ProjectedIterativeDeconvolutionImageFilter()
 {
-  m_ProjectionFilter = NULL;
+  m_ProjectionFilter = ITK_NULLPTR;
 }
 
 template< typename TSuperclass >
 ProjectedIterativeDeconvolutionImageFilter< TSuperclass >
 ::~ProjectedIterativeDeconvolutionImageFilter()
 {
-  m_ProjectionFilter = NULL;
+  m_ProjectionFilter = ITK_NULLPTR;
 }
 
 template< typename TSuperclass >
diff --git a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx
index 8dd63cc..c9f5fba 100644
--- a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkRichardsonLucyDeconvolutionImageFilter.hxx
@@ -27,14 +27,14 @@ template< typename TInputImage, typename TKernelImage, typename TOutputImage, ty
 RichardsonLucyDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
 ::RichardsonLucyDeconvolutionImageFilter()
 {
-  m_PaddedInput = NULL;
+  m_PaddedInput = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
 RichardsonLucyDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
 ::~RichardsonLucyDeconvolutionImageFilter()
 {
-  m_PaddedInput = NULL;
+  m_PaddedInput = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
@@ -142,14 +142,14 @@ RichardsonLucyDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage,
 {
   this->Superclass::Finish( progress, progressWeight );
 
-  m_ComplexMultiplyFilter1 = NULL;
-  m_IFFTFilter1 = NULL;
-  m_DivideFilter = NULL;
-  m_FFTFilter = NULL;
-  m_ConjugateAdaptor = NULL;
-  m_ComplexMultiplyFilter2 = NULL;
-  m_IFFTFilter2 = NULL;
-  m_MultiplyFilter = NULL;
+  m_ComplexMultiplyFilter1 = ITK_NULLPTR;
+  m_IFFTFilter1 = ITK_NULLPTR;
+  m_DivideFilter = ITK_NULLPTR;
+  m_FFTFilter = ITK_NULLPTR;
+  m_ConjugateAdaptor = ITK_NULLPTR;
+  m_ComplexMultiplyFilter2 = ITK_NULLPTR;
+  m_IFFTFilter2 = ITK_NULLPTR;
+  m_MultiplyFilter = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
diff --git a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx
index 25f39fa..250acd3 100644
--- a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkTikhonovDeconvolutionImageFilter.hxx
@@ -47,8 +47,8 @@ TikhonovDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInte
 
   const KernelImageType* kernelImage = this->GetKernelImage();
 
-  InternalComplexImagePointerType input = NULL;
-  InternalComplexImagePointerType kernel = NULL;
+  InternalComplexImagePointerType input = ITK_NULLPTR;
+  InternalComplexImagePointerType kernel = ITK_NULLPTR;
 
   this->PrepareInputs( localInput, kernelImage, input, kernel, progress, 0.7 );
 
@@ -69,8 +69,8 @@ TikhonovDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInte
   progress->RegisterInternalFilter( tikhonovFilter, 0.1 );
 
   // Free up the memory for the prepared inputs
-  input = NULL;
-  kernel = NULL;
+  input = ITK_NULLPTR;
+  kernel = ITK_NULLPTR;
 
   this->ProduceOutput( tikhonovFilter->GetOutput(), progress, 0.2 );
 }
diff --git a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx
index 9a7b363..09322f5 100644
--- a/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Deconvolution/include/itkWienerDeconvolutionImageFilter.hxx
@@ -47,8 +47,8 @@ WienerDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TIntern
 
   const KernelImageType* kernelImage = this->GetKernelImage();
 
-  InternalComplexImagePointerType input = NULL;
-  InternalComplexImagePointerType kernel = NULL;
+  InternalComplexImagePointerType input = ITK_NULLPTR;
+  InternalComplexImagePointerType kernel = ITK_NULLPTR;
 
   this->PrepareInputs( localInput, kernelImage, input, kernel, progress, 0.7 );
 
@@ -68,8 +68,8 @@ WienerDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TIntern
   progress->RegisterInternalFilter( wienerFilter, 0.1 );
 
   // Free up the memory for the prepared inputs
-  input = NULL;
-  kernel = NULL;
+  input = ITK_NULLPTR;
+  kernel = ITK_NULLPTR;
 
   this->ProduceOutput( wienerFilter->GetOutput(), progress, 0.2 );
 }
diff --git a/Utilities/ITK/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx
index 4c31f95..b0324c0 100644
--- a/Utilities/ITK/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx
@@ -54,8 +54,8 @@ PatchBasedDenoisingBaseImageFilter<TInputImage, TOutputImage>
   m_ManualReinitialization  = false;
   m_State                   = UNINITIALIZED;
 
-  m_InputImage  = 0;
-  m_OutputImage = 0;
+  m_InputImage  = ITK_NULLPTR;
+  m_OutputImage = ITK_NULLPTR;
 }
 
 template <typename TInputImage, typename TOutputImage>
@@ -249,7 +249,7 @@ PatchBasedDenoisingBaseImageFilter<TInputImage, TOutputImage>
 {
   const typename Self::Pointer thisPtr = const_cast< Self* >(this);
   // cache input image, if it has not yet been set.
-  if(thisPtr->m_InputImage == 0)
+  if(thisPtr->m_InputImage == ITK_NULLPTR)
     {
     thisPtr->m_InputImage = this->GetInput();
     }
diff --git a/Utilities/ITK/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx
index f06e6a3..4e53583 100644
--- a/Utilities/ITK/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx
@@ -35,44 +35,31 @@ namespace itk
 
 template <typename TInputImage, typename TOutputImage>
 PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
-::PatchBasedDenoisingImageFilter()
+::PatchBasedDenoisingImageFilter() :
+  m_UpdateBuffer(OutputImageType::New()),
+  m_NumPixelComponents(0),       // not valid until Initialize()
+  m_NumIndependentComponents(0), // not valid until Initialize()
+  m_TotalNumberPixels(0),        // not valid until an image is provided
+  m_UseSmoothDiscPatchWeights(true),
+  m_UseFastTensorComputations(true),
+  m_KernelBandwidthSigmaIsSet(false),
+  m_ZeroPixel(),                 // not valid until Initialize()
+  m_KernelBandwidthFractionPixelsForEstimation(0.20),
+  m_ComputeConditionalDerivatives(false),
+  m_MinSigma(NumericTraits<RealValueType>::min() * 100), // to avoid divide by zero
+  m_MinProbability(NumericTraits<RealValueType>::min() * 100), // to avoid divide by zero
+  m_SigmaUpdateDecimationFactor(static_cast<unsigned int>
+                                (Math::Round<double>(1.0 / m_KernelBandwidthFractionPixelsForEstimation))),
+  m_SigmaUpdateConvergenceTolerance(0.01),   // desired accuracy of Newton-Raphson sigma estimation
+  m_KernelBandwidthMultiplicationFactor(1.0),
+  m_NoiseSigma(0.0),
+  m_NoiseSigmaSquared(0.0),
+  m_NoiseSigmaIsSet(false),
+  m_Sampler(ITK_NULLPTR), // not valid until a sampler is provided
+  m_SearchSpaceList(ListAdaptorType::New())
 {
-  m_SearchSpaceList = ListAdaptorType::New();
-  m_UpdateBuffer    = OutputImageType::New();
-
-  // patch weights
-  m_UseSmoothDiscPatchWeights = true;
-
-  //
-  m_UseFastTensorComputations = true;
-
   // by default, turn off automatic kernel bandwidth sigma estimation
   this->KernelBandwidthEstimationOff();
-  // minimum probability, used to avoid divide by zero
-  m_MinProbability = NumericTraits<RealValueType>::min() * 100;
-  // minimum sigma allowed, used to avoid divide by zero
-  m_MinSigma       = NumericTraits<RealValueType>::min() * 100;
-
-  m_ComputeConditionalDerivatives   = false;
-  m_KernelBandwidthFractionPixelsForEstimation    = 0.20;
-  m_SigmaUpdateDecimationFactor     = static_cast<unsigned int>
-    (Math::Round<double>(1.0 / m_KernelBandwidthFractionPixelsForEstimation) );
-  // desired accuracy of Newton-Raphson sigma estimation
-  m_SigmaUpdateConvergenceTolerance     = 0.01;
-  m_KernelBandwidthMultiplicationFactor = 1.0;
-
-  m_NoiseSigmaIsSet           = false;
-  m_KernelBandwidthSigmaIsSet = false;
-
-  m_TotalNumberPixels  = 0;       // won't be valid until an image is provided
-  m_Sampler            = 0;       // won't be valid until a sampler is provided
-  m_NumPixelComponents = 0;       // won't be valid until Initialize() gets
-                                  // called
-  m_NumIndependentComponents = 0; // won't be valid until Initialize() gets
-                                  // called
-  // m_IntensityRescaleInvFactor won't be allocated until Initialize() gets
-  // called
-  // because we need the input image first.
 }
 
 template <typename TInputImage, typename TOutputImage>
@@ -354,7 +341,7 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
       newStruct.minNorm[ic] = 0;
       newStruct.maxNorm[ic] = 0;
       }
-    newStruct.sampler = NULL;
+    newStruct.sampler = ITK_NULLPTR;
 
     m_ThreadData.push_back(newStruct);
     }
@@ -845,8 +832,8 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
   if (foundMinMax)
     {
     threadData.validNorms[0] = 1;
-    threadData.minNorm[0] = vcl_sqrt(minNorm[0]);
-    threadData.maxNorm[0] = vcl_sqrt(maxNorm[0]);
+    threadData.minNorm[0] = std::sqrt(minNorm[0]);
+    threadData.maxNorm[0] = std::sqrt(maxNorm[0]);
 
     itkDebugMacro( <<"threadData minNorm: " << minNorm[0]
                    << ", maxNorm: " << maxNorm[0] );
@@ -972,7 +959,7 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
   RealTensorValueT n, sqrtn, s;
   n = I1div3 * I1div3 - I2/3;
   s = I1div3 * I1div3 * I1div3 - I1*I2/6 + I3/2;
-  sqrtn = vcl_sqrt(n);
+  sqrtn = std::sqrt(n);
 
   // now check for some degenerate cases
   // if these occur, default to the standard eigen analysis
@@ -993,7 +980,7 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
 
   // Compute phi = (acos((s/n) * sqrt(1/n)) / 3)
   RealTensorValueT phi;
-  phi = vcl_acos( (s/n) * 1/sqrtn) / 3;
+  phi = std::acos( (s/n) * 1/sqrtn) / 3;
 
   // Now compute the eigenvalues
   // lambda1 = I1/3 + 2*sqrt(n)*cos(phi)
@@ -1003,8 +990,8 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
   // lambda3 also = I1 - lambda1 - lambda2
 
   RealTensorValueT               lambda1, lambda2, lambda3;
-  lambda1 = I1div3 + 2 * sqrtn * vcl_cos(phi);
-  lambda2 = I1div3 - 2*sqrtn *   vcl_cos(vnl_math::pi/3 + phi);
+  lambda1 = I1div3 + 2 * sqrtn * std::cos(phi);
+  lambda2 = I1div3 - 2*sqrtn *   std::cos(vnl_math::pi/3 + phi);
   lambda3 = I1 - lambda1 - lambda2;
 
   eigenVals[0] = lambda1;
@@ -1052,7 +1039,7 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
     // eigenVec = e / sqrt(e'e)
     RealTensorValueT norm, sqrtnorm;
     norm = ex * ex + ey * ey + ez * ez;
-    sqrtnorm = vcl_sqrt(norm);
+    sqrtnorm = std::sqrt(norm);
     eigenVecs(i,0) = ex / sqrtnorm;
     eigenVecs(i,1) = ey / sqrtnorm;
     eigenVecs(i,2) = ez / sqrtnorm;
@@ -1077,10 +1064,8 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
                                                     EigenVectorsCacheType& eigenVecsCache,
                                                     RealType& symMatrixLogMap, RealArrayType& geodesicDist)
 {
-  typedef typename PixelType::MatrixType            MatrixType;
   typedef typename RealType::EigenValuesArrayType   RealEigenValuesArrayType;
   typedef typename RealType::EigenVectorsMatrixType RealEigenVectorsMatrixType;
-  typedef typename RealType::MatrixType             RealMatrixType;
   EigenValuesArrayType       eigenVals;
   EigenVectorsMatrixType     eigenVecs;
   RealEigenValuesArrayType   YEigenVals;
@@ -1109,8 +1094,8 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
 
     if (cacheIndex >= eigenValsCache.size() )
       {
-      eigenValsCache.resize(cacheIndex+1, 0);
-      eigenVecsCache.resize(cacheIndex+1, 0);
+      eigenValsCache.resize(cacheIndex+1, ITK_NULLPTR);
+      eigenVecsCache.resize(cacheIndex+1, ITK_NULLPTR);
       }
 
     delete eigenValsCache[cacheIndex];
@@ -1143,9 +1128,9 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
   factor2 = spdMatrixB[2] * eigenVecs(0,0) + spdMatrixB[4] * eigenVecs(0,1) + spdMatrixB[5] * eigenVecs(0,2);
 
   Y[0] = ( eigenVecs(0,0) * factor0 + eigenVecs(0,1) * factor1 + eigenVecs(0,2) * factor2 ) / eigenVals[0];
-  Y[1] = ( eigenVecs(1,0) * factor0 + eigenVecs(1,1) * factor1 + eigenVecs(1,2) * factor2 ) / vcl_sqrt(
+  Y[1] = ( eigenVecs(1,0) * factor0 + eigenVecs(1,1) * factor1 + eigenVecs(1,2) * factor2 ) / std::sqrt(
       eigenVals[0] * eigenVals[1]);
-  Y[2] = ( eigenVecs(2,0) * factor0 + eigenVecs(2,1) * factor1 + eigenVecs(2,2) * factor2 ) / vcl_sqrt(
+  Y[2] = ( eigenVecs(2,0) * factor0 + eigenVecs(2,1) * factor1 + eigenVecs(2,2) * factor2 ) / std::sqrt(
       eigenVals[0] * eigenVals[2]);
 
   factor0 = spdMatrixB[0] * eigenVecs(1,0) + spdMatrixB[1] * eigenVecs(1,1) + spdMatrixB[2] * eigenVecs(1,2);
@@ -1153,7 +1138,7 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
   factor2 = spdMatrixB[2] * eigenVecs(1,0) + spdMatrixB[4] * eigenVecs(1,1) + spdMatrixB[5] * eigenVecs(1,2);
 
   Y[3] = ( eigenVecs(1,0) * factor0 + eigenVecs(1,1) * factor1 + eigenVecs(1,2) * factor2 ) / eigenVals[1];
-  Y[4] = ( eigenVecs(2,0) * factor0 + eigenVecs(2,1) * factor1 + eigenVecs(2,2) * factor2 ) / vcl_sqrt(
+  Y[4] = ( eigenVecs(2,0) * factor0 + eigenVecs(2,1) * factor1 + eigenVecs(2,2) * factor2 ) / std::sqrt(
       eigenVals[1] * eigenVals[2]);
 
   factor0 = spdMatrixB[0] * eigenVecs(2,0) + spdMatrixB[1] * eigenVecs(2,1) + spdMatrixB[2] * eigenVecs(2,2);
@@ -1187,11 +1172,11 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
   //  these calculations can be optimized as follows.
   for (unsigned int ii = 0; ii < 3; ++ii)
     {
-    YEigenVals[ii] = vcl_log(vnl_math_max(RealValueType(1e-15),YEigenVals[ii]) );
+    YEigenVals[ii] = std::log(vnl_math_max(RealValueType(1e-15),YEigenVals[ii]) );
     }
-  const RealValueType eigVal0 = vcl_sqrt(eigenVals[0]);
-  const RealValueType eigVal1 = vcl_sqrt(eigenVals[1]);
-  const RealValueType eigVal2 = vcl_sqrt(eigenVals[2]);
+  const RealValueType eigVal0 = std::sqrt(eigenVals[0]);
+  const RealValueType eigVal1 = std::sqrt(eigenVals[1]);
+  const RealValueType eigVal2 = std::sqrt(eigenVals[2]);
   const RealValueType YEigVal0 = YEigenVals[0];
   const RealValueType YEigVal1 = YEigenVals[1];
   const RealValueType YEigVal2 = YEigenVals[2];
@@ -1263,7 +1248,6 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
 {
   typedef typename RealType::EigenValuesArrayType   RealEigenValuesArrayType;
   typedef typename RealType::EigenVectorsMatrixType RealEigenVectorsMatrixType;
-  typedef typename RealType::MatrixType             RealMatrixType;
   RealEigenValuesArrayType   eigenVals;
   RealEigenVectorsMatrixType eigenVecs;
   RealEigenValuesArrayType   YEigenVals;
@@ -1308,9 +1292,9 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
   factor2 = symMatrix[2] * eigenVecs(0,0) + symMatrix[4] * eigenVecs(0,1) + symMatrix[5] * eigenVecs(0,2);
 
   Y[0] = ( eigenVecs(0,0) * factor0 + eigenVecs(0,1) * factor1 + eigenVecs(0,2) * factor2 ) / eigenVals[0];
-  Y[1] = ( eigenVecs(1,0) * factor0 + eigenVecs(1,1) * factor1 + eigenVecs(1,2) * factor2 ) / vcl_sqrt(
+  Y[1] = ( eigenVecs(1,0) * factor0 + eigenVecs(1,1) * factor1 + eigenVecs(1,2) * factor2 ) / std::sqrt(
       eigenVals[0] * eigenVals[1]);
-  Y[2] = ( eigenVecs(2,0) * factor0 + eigenVecs(2,1) * factor1 + eigenVecs(2,2) * factor2 ) / vcl_sqrt(
+  Y[2] = ( eigenVecs(2,0) * factor0 + eigenVecs(2,1) * factor1 + eigenVecs(2,2) * factor2 ) / std::sqrt(
       eigenVals[0] * eigenVals[2]);
 
   factor0 = symMatrix[0] * eigenVecs(1,0) + symMatrix[1] * eigenVecs(1,1) + symMatrix[2] * eigenVecs(1,2);
@@ -1318,7 +1302,7 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
   factor2 = symMatrix[2] * eigenVecs(1,0) + symMatrix[4] * eigenVecs(1,1) + symMatrix[5] * eigenVecs(1,2);
 
   Y[3] = ( eigenVecs(1,0) * factor0 + eigenVecs(1,1) * factor1 + eigenVecs(1,2) * factor2 ) / eigenVals[1];
-  Y[4] = ( eigenVecs(2,0) * factor0 + eigenVecs(2,1) * factor1 + eigenVecs(2,2) * factor2 ) / vcl_sqrt(
+  Y[4] = ( eigenVecs(2,0) * factor0 + eigenVecs(2,1) * factor1 + eigenVecs(2,2) * factor2 ) / std::sqrt(
       eigenVals[1] * eigenVals[2]);
 
   factor0 = symMatrix[0] * eigenVecs(2,0) + symMatrix[1] * eigenVecs(2,1) + symMatrix[2] * eigenVecs(2,2);
@@ -1350,11 +1334,11 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
 
   for (unsigned int ii = 0; ii < 3; ++ii)
     {
-    YEigenVals[ii] = vcl_exp(YEigenVals[ii]);
+    YEigenVals[ii] = std::exp(YEigenVals[ii]);
     }
-  const RealValueType eigVal0 = vcl_sqrt(eigenVals[0]);
-  const RealValueType eigVal1 = vcl_sqrt(eigenVals[1]);
-  const RealValueType eigVal2 = vcl_sqrt(eigenVals[2]);
+  const RealValueType eigVal0 = std::sqrt(eigenVals[0]);
+  const RealValueType eigVal1 = std::sqrt(eigenVals[1]);
+  const RealValueType eigVal2 = std::sqrt(eigenVals[2]);
   const RealValueType YEigVal0 = YEigenVals[0];
   const RealValueType YEigVal1 = YEigenVals[1];
   const RealValueType YEigVal2 = YEigenVals[2];
@@ -1858,7 +1842,7 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
         squaredNorm[ic] += centerPatchSquaredNorm[ic];
 
         const RealValueType sigmaKernel = m_KernelBandwidthSigma[ic];
-        const RealValueType distanceJointEntropy = vcl_sqrt(squaredNorm[ic]);
+        const RealValueType distanceJointEntropy = std::sqrt(squaredNorm[ic]);
 
         const RealValueType gaussianJointEntropy
           = exp(-vnl_math_sqr(distanceJointEntropy / sigmaKernel) / 2.0);
@@ -1875,7 +1859,7 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
         if (m_ComputeConditionalDerivatives)
           {
           const RealValueType distancePatchEntropySquared = squaredNorm[ic] - centerPatchSquaredNorm[ic];
-          const RealValueType distancePatchEntropy = vcl_sqrt(distancePatchEntropySquared);
+          const RealValueType distancePatchEntropy = std::sqrt(distancePatchEntropySquared);
           const RealValueType gaussianPatchEntropy
             = exp(-vnl_math_sqr(distancePatchEntropy / sigmaKernel) / 2.0);
           probPatchEntropy[ic] += gaussianPatchEntropy;
@@ -2573,26 +2557,9 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>
   os << indent << "KernelBandwidthMultiplicationFactor: "
      << m_KernelBandwidthMultiplicationFactor << std::endl;
 
-  if (m_Sampler)
-    {
-    os << indent << "Sampler: " << std::endl;
-    m_Sampler->Print(os,indent.GetNextIndent() );
-    }
-  else
-    {
-    os << indent << "Sampler: " << "(None)" << std::endl;
-    }
+  itkPrintSelfObjectMacro( Sampler );
+  itkPrintSelfObjectMacro( UpdateBuffer );
 
-  if (m_UpdateBuffer)
-    {
-    os << indent << "Update buffer:\n";
-    m_UpdateBuffer->Print(os, indent.GetNextIndent() );
-    os << std::endl;
-    }
-  else
-    {
-    os << indent << "Update buffer is NULL" << std::endl;
-    }
   os << std::endl;
 }
 
diff --git a/Utilities/ITK/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx
index 4e018db..e5c5a22 100644
--- a/Utilities/ITK/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx
@@ -24,6 +24,7 @@
 #include "itkArray.h"
 #include "itkImageMaskSpatialObject.h"
 #include "vnl/vnl_vector.h"
+#include "itkProgressReporter.h"
 
 namespace itk
 {
@@ -43,7 +44,7 @@ DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType,
   m_NumberOfBaselineImages = 1;
   m_Threshold = NumericTraits< ReferencePixelType >::min();
   m_GradientImageTypeEnumeration = Else;
-  m_GradientDirectionContainer = NULL;
+  m_GradientDirectionContainer = ITK_NULLPTR;
   m_TensorBasis.set_identity();
   m_BValue = 1.0;
   m_MaskImagePresent = false;
@@ -181,7 +182,7 @@ void DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType,
                                                  TTensorPixelType,
                                                  TMaskImageType >
 ::ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
-                       ThreadIdType)
+                       ThreadIdType threadId)
 {
   typename OutputImageType::Pointer outputImage =
     static_cast< OutputImageType * >( this->ProcessObject::GetOutput(0) );
@@ -242,6 +243,8 @@ void DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType,
     // "A Dual Tensor Basis Solution to the Stejskal-Tanner Equations for
     // DT-MRI"
 
+    ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
+
     while ( !it.IsAtEnd() )
       {
 
@@ -275,7 +278,7 @@ void DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType,
             }
           else
             {
-            B[i] = -vcl_log( static_cast< double >( b ) / static_cast< double >( b0 ) ) / this->m_BValue;
+            B[i] = -std::log( static_cast< double >( b ) / static_cast< double >( b0 ) ) / this->m_BValue;
             }
 
           ++( *gradientItContainer[i] );
@@ -309,6 +312,7 @@ void DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType,
       oit.Set(tensor);
       ++oit;
       ++it;
+      progress.CompletedPixel();
       }
 
     for ( unsigned int i = 0; i < gradientItContainer.size(); i++ )
@@ -323,7 +327,7 @@ void DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType,
       GradientIteratorType;
     typedef typename GradientImagesType::PixelType
       GradientVectorType;
-    typename GradientImagesType::Pointer gradientImagePointer = NULL;
+    typename GradientImagesType::Pointer gradientImagePointer = ITK_NULLPTR;
 
     // Would have liked a dynamic_cast here, but seems SGI doesn't like it
     // The enum will ensure that an inappropriate cast is not done
@@ -353,6 +357,8 @@ void DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType,
         }
       }
 
+    ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
+
     while ( !git.IsAtEnd() )
       {
       GradientVectorType b = git.Get();
@@ -395,7 +401,7 @@ void DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType,
           else
             {
             B[i] =
-              -vcl_log( static_cast< double >( b[gradientind[i]] ) / static_cast< double >( b0 ) ) / this->m_BValue;
+              -std::log( static_cast< double >( b[gradientind[i]] ) / static_cast< double >( b0 ) ) / this->m_BValue;
             }
           }
 
@@ -420,6 +426,7 @@ void DiffusionTensor3DReconstructionImageFilter< TReferenceImagePixelType,
       oit.Set(tensor);
       ++oit; // Output (reconstructed tensor image) iterator
       ++git; // Gradient  image iterator
+      progress.CompletedPixel();
       }
     }
 }
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.hxx
index e06b717..05f8364 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkComposeDisplacementFieldsImageFilter.hxx
@@ -129,10 +129,8 @@ void
 ComposeDisplacementFieldsImageFilter<InputImage, TOutputImage>
 ::PrintSelf( std::ostream& os, Indent indent ) const
 {
-  os << "Interpolator:" << std::endl;
-  this->m_Interpolator->Print( os, indent );
-
   Superclass::PrintSelf( os, indent );
+  itkPrintSelfObjectMacro( Interpolator );
 }
 
 }  //end namespace itk
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx
index abd28e4..69b0dab 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx
@@ -34,7 +34,7 @@ namespace itk
 template <typename TScalar, unsigned int NDimensions>
 ConstantVelocityFieldTransform<TScalar, NDimensions>
 ::ConstantVelocityFieldTransform() :
-  m_ConstantVelocityField( NULL ),
+  m_ConstantVelocityField( ITK_NULLPTR ),
   m_CalculateNumberOfIntegrationStepsAutomatically( false ),
   m_ConstantVelocityFieldSetTime( 0 )
 {
@@ -118,7 +118,7 @@ ConstantVelocityFieldTransform<TScalar, NDimensions>
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h
index 187dc68..67cc4db 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.h
@@ -171,8 +171,7 @@ public:
    * pipeline execution model.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
   /** Set the derivative weights according to the spacing of the input image
       (1/spacing). Use this option if you want to calculate the Jacobian
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx
index 09c3a7e..83e19bf 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx
@@ -92,7 +92,6 @@ template< typename TInputImage, typename TRealType, typename TOutputImage >
 void
 DisplacementFieldJacobianDeterminantFilter< TInputImage, TRealType, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx
index e2b73db..dbb20a5 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx
@@ -43,7 +43,7 @@ DisplacementFieldToBSplineImageFilter<TInputImage, TOutputImage>
   this->m_NumberOfFittingLevels.Fill( 1 );
   this->m_NumberOfControlPoints.Fill( 4 );
 
-  this->m_DisplacementFieldControlPointLattice = NULL;
+  this->m_DisplacementFieldControlPointLattice = ITK_NULLPTR;
 }
 
 template<typename TInputImage, typename TOutputImage>
@@ -84,9 +84,6 @@ DisplacementFieldToBSplineImageFilter<TInputImage, TOutputImage>
   typename PointSetType::Pointer fieldPoints = PointSetType::New();
   fieldPoints->Initialize();
 
-  typedef typename ImporterType::OutputImageType        ImporterOutputImageType;
-  typedef typename ImporterOutputImageType::RegionType  ImporterRegionType;
-
   typedef typename InputFieldType::PointType InputFieldPointType;
   typedef ContinuousIndex<typename InputFieldPointType::CoordRepType, ImageDimension> ContinuousIndexType;
 
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx
index 7074baa..16550f1 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx
@@ -35,8 +35,8 @@ template <typename TScalar, unsigned int NDimensions>
 DisplacementFieldTransform<TScalar, NDimensions>::DisplacementFieldTransform()
 : Superclass( 0 )
 {
-  this->m_DisplacementField = NULL;
-  this->m_InverseDisplacementField = NULL;
+  this->m_DisplacementField = ITK_NULLPTR;
+  this->m_InverseDisplacementField = ITK_NULLPTR;
 
   this->m_FixedParameters.SetSize( NDimensions * ( NDimensions + 3 ) );
   this->m_FixedParameters.Fill( 0.0 );
@@ -151,7 +151,7 @@ DisplacementFieldTransform<TScalar, NDimensions>
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
@@ -377,7 +377,7 @@ void DisplacementFieldTransform<TScalar, NDimensions>
 
     if( !this->m_InverseDisplacementField.IsNull() )
       {
-      this->m_InverseDisplacementField = NULL;
+      this->m_InverseDisplacementField = ITK_NULLPTR;
       }
     this->Modified();
     /* Store this separately for use in smoothing because we only want
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.hxx
index 77dfd85..bf3c903 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkExponentialDisplacementFieldImageFilter.hxx
@@ -113,7 +113,7 @@ ExponentialDisplacementFieldImageFilter< TInputImage, TOutputImage >
     maxnorm2 /= vnl_math_sqr(minpixelspacing);
 
     InputPixelRealValueType numiterfloat = 2.0
-                                           + 0.5 * vcl_log(maxnorm2) / vnl_math::ln2;
+                                           + 0.5 * std::log(maxnorm2) / vnl_math::ln2;
 
     if ( numiterfloat >= 0.0 )
       {
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.h b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.h
index 1090036..8fddd4d 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.h
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.h
@@ -52,7 +52,7 @@ public:
                                                 TimeVaryingVelocityFieldTransform );
 
   /** New macro for creation of through a Smart Pointer */
-  itkSimpleNewMacro( Self );
+  itkNewMacro( Self );
 
   /** Dimension of the time varying velocity field. */
   itkStaticConstMacro( TimeVaryingVelocityFieldDimension, unsigned int, NDimensions+1 );
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.hxx
index d196ef6..0c26da5 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkGaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform.hxx
@@ -33,12 +33,13 @@ namespace itk
 
 template<typename TScalar, unsigned int NDimensions>
 GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform<TScalar, NDimensions>
-::GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform()
+::GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform() :
+  m_GaussianSmoothingTempFieldModifiedTime(0),
+  m_GaussianSpatialSmoothingVarianceForTheUpdateField(3.0),
+  m_GaussianSpatialSmoothingVarianceForTheTotalField(0.5),
+  m_GaussianTemporalSmoothingVarianceForTheUpdateField(0.25),
+  m_GaussianTemporalSmoothingVarianceForTheTotalField(0.0)
 {
-  this->m_GaussianSpatialSmoothingVarianceForTheUpdateField = 3.0;
-  this->m_GaussianSpatialSmoothingVarianceForTheTotalField = 0.5;
-  this->m_GaussianTemporalSmoothingVarianceForTheUpdateField = 0.25;
-  this->m_GaussianTemporalSmoothingVarianceForTheTotalField = 0.0;
 }
 
 template<typename TScalar, unsigned int NDimensions>
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.hxx
index c9ca360..230f744 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.hxx
@@ -134,7 +134,6 @@ InverseDisplacementFieldImageFilter< TInputImage, TOutputImage >
 
   typedef typename InputImageType::RegionType InputRegionType;
   typedef typename InputImageType::SizeType   InputSizeType;
-  typedef typename InputImageType::IndexType  InputIndexType;
 
   InputRegionType region;
 
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h
index 5696ead..84550bc 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.h
@@ -20,6 +20,8 @@
 
 #include "itkImageToImageFilter.h"
 #include "itkVectorInterpolateImageFunction.h"
+#include "itkVectorLinearInterpolateImageFunction.h"
+#include "itkSimpleFastMutexLock.h"
 
 namespace itk
 {
@@ -73,6 +75,8 @@ public:
   typedef typename VectorType::ComponentType                        RealType;
   typedef Image<RealType, ImageDimension>                           RealImageType;
   typedef VectorInterpolateImageFunction<InputFieldType, RealType>  InterpolatorType;
+  typedef VectorLinearInterpolateImageFunction <InputFieldType, RealType>
+                                                                    DefaultInterpolatorType;
 
   /** Get the interpolator. */
   itkGetModifiableObjectMacro( Interpolator, InterpolatorType );
@@ -169,6 +173,7 @@ private:
   SpacingType                                       m_DisplacementFieldSpacing;
   bool                                              m_DoThreadedEstimateInverse;
   bool                                              m_EnforceBoundaryCondition;
+  SimpleFastMutexLock                               m_Mutex;
 
 };
 
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx
index 0103d31..75258d2 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx
@@ -23,7 +23,7 @@
 #include "itkComposeDisplacementFieldsImageFilter.h"
 #include "itkImageDuplicator.h"
 #include "itkImageRegionIterator.h"
-#include "itkVectorLinearInterpolateImageFunction.h"
+#include "itkMutexLockHolder.h"
 
 namespace itk
 {
@@ -34,19 +34,20 @@ namespace itk
 template<typename TInputImage, typename TOutputImage>
 InvertDisplacementFieldImageFilter<TInputImage, TOutputImage>
 ::InvertDisplacementFieldImageFilter() :
- m_MaximumNumberOfIterations( 20 ),
- m_MaxErrorToleranceThreshold( 0.1 ),
- m_MeanErrorToleranceThreshold( 0.001 )
+  m_Interpolator(DefaultInterpolatorType::New()),
+  m_MaximumNumberOfIterations(20),
+  m_MaxErrorToleranceThreshold(0.1),
+  m_MeanErrorToleranceThreshold(0.001),
+
+  m_ComposedField(DisplacementFieldType::New()),
+  m_ScaledNormImage(RealImageType::New()),
+  m_MaxErrorNorm(0.0),
+  m_MeanErrorNorm(0.0),
+  m_Epsilon(0.0),
+  m_DoThreadedEstimateInverse(false),
+  m_EnforceBoundaryCondition(true)
 {
   this->SetNumberOfRequiredInputs( 1 );
-
-  typedef VectorLinearInterpolateImageFunction <InputFieldType, RealType> DefaultInterpolatorType;
-  typename DefaultInterpolatorType::Pointer interpolator = DefaultInterpolatorType::New();
-  this->m_Interpolator = interpolator;
-
-  this->m_ComposedField = DisplacementFieldType::New();
-  this->m_ScaledNormImage = RealImageType::New();
-  this->m_EnforceBoundaryCondition = true;
 }
 
 template<typename TInputImage, typename TOutputImage>
@@ -109,8 +110,9 @@ InvertDisplacementFieldImageFilter<TInputImage, TOutputImage>
 
   this->m_ScaledNormImage->CopyInformation( displacementField );
   this->m_ScaledNormImage->SetRegions( displacementField->GetRequestedRegion() );
-  this->m_ScaledNormImage->Allocate();
-  this->m_ScaledNormImage->FillBuffer( 0.0 );
+  this->m_ScaledNormImage->Allocate(true); // initialize
+                                                                  // buffer
+                                                                  // to zero
 
   SizeValueType numberOfPixelsInRegion = ( displacementField->GetRequestedRegion() ).GetNumberOfPixels();
   this->m_MaxErrorNorm = NumericTraits<RealType>::max();
@@ -211,6 +213,8 @@ InvertDisplacementFieldImageFilter<TInputImage, TOutputImage>
   else
     {
     VectorType inverseSpacing;
+    RealType localMean = NumericTraits<RealType>::Zero;
+    RealType localMax  = NumericTraits<RealType>::Zero;
     for( unsigned int d = 0; d < ImageDimension; ++d )
       {
       inverseSpacing[d]=1.0/this->m_DisplacementFieldSpacing[d];
@@ -223,17 +227,25 @@ InvertDisplacementFieldImageFilter<TInputImage, TOutputImage>
         {
         scaledNorm += vnl_math_sqr( displacement[d] * inverseSpacing[d] );
         }
-      scaledNorm = vcl_sqrt( scaledNorm );
+      scaledNorm = std::sqrt( scaledNorm );
 
-      this->m_MeanErrorNorm += scaledNorm;
-      if( this->m_MaxErrorNorm < scaledNorm )
+      localMean += scaledNorm;
+      if( localMax < scaledNorm )
         {
-        this->m_MaxErrorNorm = scaledNorm;
+        localMax = scaledNorm;
         }
 
       ItS.Set( scaledNorm );
       ItE.Set( -displacement );
       }
+      {
+      MutexLockHolder<SimpleFastMutexLock> holder(m_Mutex);
+      this->m_MeanErrorNorm += localMean;
+      if( this->m_MaxErrorNorm < localMax )
+        {
+        this->m_MaxErrorNorm = localMax;
+        }
+      }
     }
 }
 
@@ -244,8 +256,7 @@ InvertDisplacementFieldImageFilter<TInputImage, TOutputImage>
 {
   Superclass::PrintSelf( os, indent );
 
-  os << "Interpolator:" << std::endl;
-  this->m_Interpolator->Print( os, indent );
+  itkPrintSelfObjectMacro( Interpolator );
 
   os << "Maximum number of iterations: " << this->m_MaximumNumberOfIterations << std::endl;
   os << "Max error tolerance threshold: " << this->m_MaxErrorToleranceThreshold << std::endl;
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx
index 98eaa4e..6012b41 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx
@@ -146,9 +146,9 @@ void IterativeInverseDisplacementFieldImageFilter< TInputImage, TOutputImage >
         smallestError = 0;
         for ( unsigned int j = 0; j < ImageDimension; j++ )
           {
-          smallestError += vcl_pow(mappedPoint[j] + forwardVector[j] - originalPoint[j], 2);
+          smallestError += std::pow(mappedPoint[j] + forwardVector[j] - originalPoint[j], 2);
           }
-        smallestError = vcl_sqrt(smallestError);
+        smallestError = std::sqrt(smallestError);
         }
 
       // iteration loop
@@ -170,9 +170,9 @@ void IterativeInverseDisplacementFieldImageFilter< TInputImage, TOutputImage >
             tmp = 0;
             for ( unsigned int l = 0; l < ImageDimension; l++ )
               {
-              tmp += vcl_pow(mappedPoint[l] + forwardVector[l] - originalPoint[l], 2);
+              tmp += std::pow(mappedPoint[l] + forwardVector[l] - originalPoint[l], 2);
               }
-            tmp = vcl_sqrt(tmp);
+            tmp = std::sqrt(tmp);
             if ( tmp < smallestError )
               {
               smallestError = tmp;
@@ -190,9 +190,9 @@ void IterativeInverseDisplacementFieldImageFilter< TInputImage, TOutputImage >
             tmp = 0;
             for ( unsigned int l = 0; l < ImageDimension; l++ )
               {
-              tmp += vcl_pow(mappedPoint[l] + forwardVector[l] - originalPoint[l], 2);
+              tmp += std::pow(mappedPoint[l] + forwardVector[l] - originalPoint[l], 2);
               }
-            tmp = vcl_sqrt(tmp);
+            tmp = std::sqrt(tmp);
             if ( tmp < smallestError )
               {
               smallestError = tmp;
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.h b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.h
index d2dbfd4..4e86613 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.h
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.h
@@ -79,7 +79,7 @@ public:
   itkTypeMacro( TimeVaryingBSplineVelocityFieldTransform, VelocityFieldTransform );
 
   /** New macro for creation of through a Smart Pointer */
-  itkSimpleNewMacro( Self );
+  itkNewMacro( Self );
 
   /** InverseTransform type. */
   typedef typename Superclass::InverseTransformBasePointer InverseTransformBasePointer;
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.hxx
index 446f448..80f3d18 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingBSplineVelocityFieldTransform.hxx
@@ -109,6 +109,7 @@ TimeVaryingBSplineVelocityFieldTransform<TScalar, NDimensions>
   inverseIntegrator->SetInput( bspliner->GetOutput() );
   inverseIntegrator->SetLowerTimeBound( this->GetUpperTimeBound() );
   inverseIntegrator->SetUpperTimeBound( this->GetLowerTimeBound() );
+
   if( this->GetVelocityFieldInterpolator() )
     {
     inverseIntegrator->SetVelocityFieldInterpolator( this->GetModifiableVelocityFieldInterpolator() );
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx
index 8cc010b..33d8ffc 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTimeVaryingVelocityFieldIntegrationImageFilter.hxx
@@ -93,7 +93,6 @@ TimeVaryingVelocityFieldIntegrationImageFilter
   typedef typename DisplacementFieldType::SpacingType   SpacingType;
   typedef typename DisplacementFieldType::PointType     OriginType;
   typedef typename DisplacementFieldType::DirectionType DirectionType;
-  typedef typename DisplacementFieldType::RegionType    RegionType;
 
   SizeType size;
   SpacingType spacing;
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h
new file mode 100644
index 0000000..96efc59
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h
@@ -0,0 +1,201 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkTransformToDisplacementFieldFilter_h
+#define __itkTransformToDisplacementFieldFilter_h
+
+#include "itkDataObjectDecorator.h"
+#include "itkTransform.h"
+#include "itkImageSource.h"
+
+namespace itk
+{
+/** \class TransformToDisplacementFieldFilter
+ * \brief Generate a displacement field from a coordinate transform
+ *
+ * Output information (spacing, size and direction) for the output
+ * image should be set. This information has the normal defaults of
+ * unit spacing, zero origin and identity direction. Optionally, the
+ * output information can be obtained from a reference image. If the
+ * reference image is provided and UseReferenceImage is On, then the
+ * spacing, origin and direction of the reference image will be used.
+ *
+ * Since this filter produces an image which is a different size than
+ * its input, it needs to override several of the methods defined
+ * in ProcessObject in order to properly manage the pipeline execution model.
+ * In particular, this filter overrides
+ * ProcessObject::GenerateOutputInformation().
+ *
+ * This filter is implemented as a multithreaded filter.  It provides a
+ * ThreadedGenerateData() method for its implementation.
+ *
+ * \author Marius Staring, Leiden University Medical Center, The Netherlands.
+ *
+ * This class was taken from the Insight Journal paper:
+ * http://hdl.handle.net/1926/1387
+ *
+ * \ingroup GeometricTransform
+ * \ingroup ITKDisplacementField
+ */
+template< typename TOutputImage,
+          typename TScalar = double >
+class TransformToDisplacementFieldFilter:
+  public ImageSource< TOutputImage >
+{
+public:
+  /** Standard class typedefs. */
+  typedef TransformToDisplacementFieldFilter Self;
+  typedef ImageSource< TOutputImage >        Superclass;
+  typedef SmartPointer< Self >               Pointer;
+  typedef SmartPointer< const Self >         ConstPointer;
+
+  typedef TOutputImage                           OutputImageType;
+  typedef typename OutputImageType::RegionType   OutputImageRegionType;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(TransformToDisplacementFieldFilter, ImageSource);
+
+  /** Number of dimensions. */
+  itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension);
+
+  /** Typedefs for transform. */
+  typedef Transform< TScalar, ImageDimension, ImageDimension >  TransformType;
+  typedef DataObjectDecorator< TransformType >                  TransformInputType;
+
+  /** Typedefs for output image. */
+  typedef typename OutputImageType::PixelType     PixelType;
+  typedef typename PixelType::ValueType           PixelValueType;
+  typedef typename OutputImageType::RegionType    RegionType;
+  typedef typename RegionType::SizeType           SizeType;
+  typedef typename OutputImageType::IndexType     IndexType;
+  typedef typename OutputImageType::PointType     PointType;
+  typedef typename OutputImageType::SpacingType   SpacingType;
+  typedef typename OutputImageType::PointType     OriginType;
+  typedef typename OutputImageType::DirectionType DirectionType;
+
+  /** Typedef the reference image ImageBase. */
+  typedef ImageBase< ImageDimension > ReferenceImageBaseType;
+
+  /** Get/Set the coordinate transformation.
+   * Set the coordinate transform to use for resampling.  Note that this must
+   * be in physical coordinates and it is the output-to-input transform, NOT
+   * the input-to-output transform that you might naively expect. */
+  using Superclass::SetInput;
+  virtual void SetInput( const TransformInputType * transform );
+  const TransformInputType * GetInput() const;
+  itkSetGetDecoratedObjectInputMacro(Transform, TransformType);
+
+  /** Set/Get the start index of the output largest possible region.
+   * The default is an index of all zeros. */
+  itkSetMacro(OutputStartIndex, IndexType);
+  itkGetConstReferenceMacro(OutputStartIndex, IndexType);
+
+  /** Set/Get the size of the output image. */
+  itkSetMacro(Size, SizeType);
+  itkGetConstReferenceMacro(Size, SizeType);
+
+  /** Set the output image spacing. */
+  itkSetMacro(OutputSpacing, SpacingType);
+  virtual void SetOutputSpacing(const SpacePrecisionType *values);
+
+  /** Get the output image spacing. */
+  itkGetConstReferenceMacro(OutputSpacing, SpacingType);
+
+  /** Set the output image origin. */
+  itkSetMacro(OutputOrigin, OriginType);
+  virtual void SetOutputOrigin(const SpacePrecisionType *values);
+
+  /** Get the output image origin. */
+  itkGetConstReferenceMacro(OutputOrigin, OriginType);
+
+  /** Set the output direction cosine matrix. */
+  itkSetMacro(OutputDirection, DirectionType);
+  itkGetConstReferenceMacro(OutputDirection, DirectionType);
+
+   /** Set a reference image to use to define the output information.
+    *  By default, output information is specificed through the
+    *  SetOutputSpacing, Origin, and Direction methods.  Alternatively,
+    *  this method can be used to specify an image from which to
+    *  copy the information. UseReferenceImageOn must be set to utilize the
+    *  reference image. */
+  itkSetInputMacro(ReferenceImage, ReferenceImageBaseType);
+
+  /** Get the reference image that is defining the output information. */
+  itkGetInputMacro(ReferenceImage, ReferenceImageBaseType);
+
+  /** Turn on/off whether a specified reference image should be used to define
+   *  the output information. */
+  itkSetMacro(UseReferenceImage, bool);
+  itkBooleanMacro(UseReferenceImage);
+  itkGetConstMacro(UseReferenceImage, bool);
+
+#ifdef ITK_USE_CONCEPT_CHECKING
+  // Begin concept checking
+  itkStaticConstMacro(PixelDimension, unsigned int,
+                      PixelType::Dimension);
+  itkConceptMacro( SameDimensionCheck,
+                   ( Concept::SameDimension< ImageDimension, PixelDimension > ) );
+  // End concept checking
+#endif
+
+protected:
+  TransformToDisplacementFieldFilter();
+  virtual ~TransformToDisplacementFieldFilter() {}
+
+  /** Produces a Vector Image. */
+  virtual void GenerateOutputInformation();
+
+  /** TransformToDisplacementFieldFilter can be implemented as a multithreaded
+   * filter.
+   */
+  virtual void ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId );
+
+  /** Default implementation for resampling that works for any
+   * transformation type.
+   */
+  void NonlinearThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId );
+
+  /** Faster implementation for resampling that works for with linear
+   *  transformation types.
+   */
+  void LinearThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId );
+
+  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+
+private:
+  TransformToDisplacementFieldFilter( const Self & ); //purposely not implemented
+  void operator=( const Self & );                    //purposely not implemented
+
+  /** Member variables. */
+  SizeType             m_Size;            // size of the output region
+  IndexType            m_OutputStartIndex; // start index of the output region
+  SpacingType          m_OutputSpacing;   // output image spacing
+  OriginType           m_OutputOrigin;    // output image origin
+  DirectionType        m_OutputDirection; // output image direction cosines
+  bool                 m_UseReferenceImage;
+
+};
+} // end namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "itkTransformToDisplacementFieldFilter.hxx"
+#endif
+
+#endif
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.hxx
new file mode 100644
index 0000000..2221b00
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.hxx
@@ -0,0 +1,300 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkTransformToDisplacementFieldFilter_hxx
+#define __itkTransformToDisplacementFieldFilter_hxx
+
+#include "itkTransformToDisplacementFieldFilter.h"
+
+#include "itkIdentityTransform.h"
+#include "itkProgressReporter.h"
+#include "itkImageRegionIteratorWithIndex.h"
+#include "itkImageLinearIteratorWithIndex.h"
+
+namespace itk
+{
+
+template< typename TOutputImage, typename TScalarType >
+TransformToDisplacementFieldFilter< TOutputImage, TScalarType >
+::TransformToDisplacementFieldFilter():
+  m_UseReferenceImage( false )
+{
+  this->m_OutputSpacing.Fill(1.0);
+  this->m_OutputOrigin.Fill(0.0);
+  this->m_OutputDirection.SetIdentity();
+
+  this->m_Size.Fill(0);
+  this->m_OutputStartIndex.Fill(0);
+
+  this->SetNumberOfRequiredInputs( 1 );
+  this->SetPrimaryInputName( "Transform" );
+
+  //  #1 "ReferenceImage" optional
+  Self::AddRequiredInputName("ReferenceImage",1);
+  Self::RemoveRequiredInputName("ReferenceImage");
+}
+
+
+template< typename TOutputImage, typename TScalarType >
+void
+TransformToDisplacementFieldFilter< TOutputImage, TScalarType >
+::PrintSelf(std::ostream & os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  os << indent << "Size: " << this->m_Size << std::endl;
+  os << indent << "OutputStartIndex: " << this->m_OutputStartIndex << std::endl;
+  os << indent << "OutputSpacing: " << this->m_OutputSpacing << std::endl;
+  os << indent << "OutputOrigin: " << this->m_OutputOrigin << std::endl;
+  os << indent << "OutputDirection: " << this->m_OutputDirection << std::endl;
+  os << indent << "UseReferenceImage: ";
+  if( this->m_UseReferenceImage )
+    {
+    os << "On" << std::endl;
+    }
+  else
+    {
+    os << "Off" << std::endl;
+    }
+}
+
+
+template< typename TOutputImage, typename TScalarType >
+void
+TransformToDisplacementFieldFilter< TOutputImage, TScalarType >
+::SetOutputSpacing(const SpacePrecisionType *spacing)
+{
+  SpacingType ss(spacing);
+  this->SetOutputSpacing(ss);
+}
+
+
+template< typename TOutputImage, typename TScalarType >
+void
+TransformToDisplacementFieldFilter< TOutputImage, TScalarType >
+::SetOutputOrigin(const SpacePrecisionType *origin)
+{
+  OriginType pp(origin);
+  this->SetOutputOrigin(pp);
+}
+
+template< typename TOutputImage, typename TScalarType >
+void
+TransformToDisplacementFieldFilter< TOutputImage, TScalarType >
+::SetInput( const TransformInputType * input )
+{
+  if( input != itkDynamicCastInDebugMode< TransformInputType * >( this->ProcessObject::GetPrimaryInput() ) )
+    {
+    // Process object is not const-correct so the const_cast is required here
+    this->ProcessObject::SetNthInput( 0, const_cast< TransformInputType * >( input ) );
+    this->Modified();
+    }
+}
+
+template< typename TOutputImage, typename TScalarType >
+const typename TransformToDisplacementFieldFilter< TOutputImage, TScalarType >::TransformInputType *
+TransformToDisplacementFieldFilter< TOutputImage, TScalarType >
+::GetInput() const
+{
+  return itkDynamicCastInDebugMode< const TransformInputType * >( this->GetPrimaryInput() );
+}
+
+
+template< typename TOutputImage, typename TScalarType >
+void
+TransformToDisplacementFieldFilter< TOutputImage, TScalarType >
+::GenerateOutputInformation(void)
+{
+  OutputImageType * output = this->GetOutput();
+  if ( !output )
+    {
+    return;
+    }
+
+  const ReferenceImageBaseType *referenceImage = this->GetReferenceImage();
+
+  // Set the size of the output region
+  if ( m_UseReferenceImage && referenceImage )
+    {
+    output->SetLargestPossibleRegion(
+      referenceImage->GetLargestPossibleRegion() );
+    }
+  else
+    {
+    typename TOutputImage::RegionType outputLargestPossibleRegion;
+    outputLargestPossibleRegion.SetSize(m_Size);
+    outputLargestPossibleRegion.SetIndex(m_OutputStartIndex);
+    output->SetLargestPossibleRegion(outputLargestPossibleRegion);
+    }
+
+  // Set spacing and origin
+  if ( m_UseReferenceImage && referenceImage )
+    {
+    output->SetSpacing( referenceImage->GetSpacing() );
+    output->SetOrigin( referenceImage->GetOrigin() );
+    output->SetDirection( referenceImage->GetDirection() );
+    }
+  else
+    {
+    output->SetSpacing(m_OutputSpacing);
+    output->SetOrigin(m_OutputOrigin);
+    output->SetDirection(m_OutputDirection);
+    }
+}
+
+
+template< typename TOutputImage, typename TScalarType >
+void
+TransformToDisplacementFieldFilter< TOutputImage, TScalarType >
+::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId )
+{
+  const TransformType * transform = this->GetInput()->Get();
+  // Check whether we can use a fast path for resampling. Fast path
+  // can be used if the transformation is linear. Transform respond
+  // to the IsLinear() call.
+  if ( transform->IsLinear() )
+    {
+    this->LinearThreadedGenerateData(outputRegionForThread, threadId);
+    return;
+    }
+
+  // Otherwise, we use the normal method where the transform is called
+  // for computing the transformation of every point.
+  this->NonlinearThreadedGenerateData(outputRegionForThread, threadId);
+}
+
+
+template< typename TOutputImage, typename TScalarType >
+void
+TransformToDisplacementFieldFilter< TOutputImage, TScalarType >
+::NonlinearThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId )
+{
+  // Get the output pointer
+  OutputImageType * output = this->GetOutput();
+  const TransformType * transform = this->GetInput()->Get();
+
+  // Create an iterator that will walk the output region for this thread.
+  typedef ImageRegionIteratorWithIndex< TOutputImage > OutputIteratorType;
+  OutputIteratorType outIt( output, outputRegionForThread );
+
+  // Define a few variables that will be used to translate from an input pixel
+  // to an output pixel
+  PointType outputPoint;         // Coordinates of output pixel
+  PointType transformedPoint;    // Coordinates of transformed pixel
+  PixelType displacement;         // the difference
+
+  // Support for progress methods/callbacks
+  ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
+
+  // Walk the output region
+  outIt.GoToBegin();
+  while ( !outIt.IsAtEnd() )
+    {
+    // Determine the index of the current output pixel
+    output->TransformIndexToPhysicalPoint( outIt.GetIndex(), outputPoint );
+
+    // Compute corresponding input pixel position
+    transformedPoint = transform->TransformPoint( outputPoint );
+
+    displacement = transformedPoint - outputPoint;
+
+    // Set it
+    outIt.Set( displacement );
+
+    // Update progress and iterator
+    progress.CompletedPixel();
+    ++outIt;
+    }
+}
+
+
+template< typename TOutputImage, typename TScalarType >
+void
+TransformToDisplacementFieldFilter< TOutputImage, TScalarType >
+::LinearThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId )
+{
+  // Get the output pointer
+  OutputImageType * output = this->GetOutput();
+  const TransformType * transform = this->GetInput()->Get();
+
+  // Create an iterator that will walk the output region for this thread.
+  typedef ImageLinearIteratorWithIndex< TOutputImage > OutputIteratorType;
+  OutputIteratorType outIt( output, outputRegionForThread );
+
+  outIt.SetDirection(0);
+
+  // Define a few indices that will be used to translate from an input pixel
+  // to an output pixel
+  PointType outputPoint;         // Coordinates of current output pixel
+  PointType transformedPoint;    // Coordinates of transformed pixel
+  PixelType displacement;         // the difference
+
+  IndexType index;
+
+  // Support for progress methods/callbacks
+  ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
+
+  // Determine the position of the first pixel in the scanline
+  outIt.GoToBegin();
+  index = outIt.GetIndex();
+  output->TransformIndexToPhysicalPoint( index, outputPoint );
+
+  // Compute corresponding transformed pixel position
+  transformedPoint = transform->TransformPoint( outputPoint );
+
+  // Compare with the ResampleImageFilter
+
+  // Compute delta
+  PointType outputPointNeighbour;
+  PointType transformedPointNeighbour;
+  typedef typename PointType::VectorType VectorType;
+  VectorType delta;
+  ++index[0];
+  output->TransformIndexToPhysicalPoint( index, outputPointNeighbour );
+  transformedPointNeighbour = transform->TransformPoint( outputPointNeighbour );
+  delta = transformedPointNeighbour - transformedPoint - ( outputPointNeighbour - outputPoint );
+
+  // loop over the vector image
+  while ( !outIt.IsAtEnd() )
+    {
+    // Get current point
+    index = outIt.GetIndex();
+    output->TransformIndexToPhysicalPoint( index, outputPoint );
+
+    // Compute transformed point
+    transformedPoint = transform->TransformPoint( outputPoint );
+
+    while ( !outIt.IsAtEndOfLine() )
+      {
+      displacement = transformedPoint - outputPoint;
+
+      // Set it
+      outIt.Set( displacement );
+
+      // Update stuff
+      progress.CompletedPixel();
+      ++outIt;
+      transformedPoint += delta;
+      }
+
+    outIt.NextLine();
+    }
+}
+
+} // end namespace itk
+
+#endif
diff --git a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx
index b20e676..ef86cd8 100644
--- a/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx
+++ b/Utilities/ITK/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx
@@ -116,7 +116,7 @@ VelocityFieldTransform<TScalar, NDimensions>
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.hxx
index 9601c9e..acc0781 100644
--- a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkApproximateSignedDistanceMapImageFilter.hxx
@@ -23,7 +23,6 @@
 #include "itkNumericTraits.h"
 #include "itkImageScanlineIterator.h"
 #include "itkProgressAccumulator.h"
-#include "vcl_cmath.h"
 
 namespace itk
 {
@@ -70,7 +69,7 @@ ApproximateSignedDistanceMapImageFilter< TInputImage, TOutputImage >
   // double,
   // which is the general SizeValueType.
   maximumDistance =
-    static_cast< OutputSizeValueType >( vcl_sqrt( static_cast< double >( maximumDistance ) ) );
+    static_cast< OutputSizeValueType >( std::sqrt( static_cast< double >( maximumDistance ) ) );
 
   // Allocate the output
   this->AllocateOutputs();
diff --git a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx
index 98fa990..2696704 100644
--- a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx
@@ -38,7 +38,7 @@ ContourDirectedMeanDistanceImageFilter< TInputImage1, TInputImage2 >
   this->SetNumberOfRequiredInputs(2);
 
   m_UseImageSpacing = true;
-  m_DistanceMap = NULL;
+  m_DistanceMap = ITK_NULLPTR;
   m_ContourDirectedMeanDistance = NumericTraits< RealType >::Zero;
 }
 
diff --git a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx
index f421320..bb356f9 100644
--- a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx
@@ -296,7 +296,7 @@ DanielssonDistanceMapImageFilter< TInputImage, TOutputImage, TVoronoiImage >
       }
     else
       {
-      dt.Set( static_cast< OutputPixelType >( vcl_sqrt(distance) ) );
+      dt.Set( static_cast< OutputPixelType >( std::sqrt(distance) ) );
       }
     ++ot;
     ++ct;
diff --git a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx
index c8efb0b..2bbde65 100644
--- a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx
@@ -32,7 +32,7 @@ DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >
   // this filter requires two input images
   this->SetNumberOfRequiredInputs(2);
 
-  m_DistanceMap = NULL;
+  m_DistanceMap = ITK_NULLPTR;
   m_DirectedHausdorffDistance = NumericTraits< RealType >::Zero;
   m_AverageHausdorffDistance = NumericTraits< RealType >::Zero;
   m_UseImageSpacing     = true;
@@ -182,7 +182,7 @@ DirectedHausdorffDistanceImageFilter< TInputImage1, TInputImage2 >
     }
 
   // clean up
-  m_DistanceMap = NULL;
+  m_DistanceMap = ITK_NULLPTR;
 }
 
 template< typename TInputImage1, typename TInputImage2 >
diff --git a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx
index 47ab7e5..7053f7c 100644
--- a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx
@@ -46,12 +46,12 @@ FastChamferDistanceImageFilter< TInputImage, TOutputImage >
       itkWarningMacro(<< "Dimension " << ImageDimension << " with Default weights ");
       for ( unsigned int i = 1; i <= ImageDimension; i++ )
         {
-        m_Weights[i - 1] = vcl_sqrt( static_cast< float >( i ) );
+        m_Weights[i - 1] = std::sqrt( static_cast< float >( i ) );
         }
     }
 
   m_MaximumDistance = 10.0;
-  m_NarrowBand = 0;
+  m_NarrowBand = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TOutputImage >
@@ -214,7 +214,7 @@ void FastChamferDistanceImageFilter< TInputImage, TOutputImage >
     // Update the narrow band
     if ( m_NarrowBand.IsNotNull() )
       {
-      if ( vcl_fabs( (float)center_value ) <= m_NarrowBand->GetTotalRadius() )
+      if ( std::fabs( (float)center_value ) <= m_NarrowBand->GetTotalRadius() )
         {
         node.m_Index = it.GetIndex();
         //Check node state.
@@ -223,7 +223,7 @@ void FastChamferDistanceImageFilter< TInputImage, TOutputImage >
           {
           node.m_NodeState += SIGN_MASK;
           }
-        if ( vcl_fabs( (float)center_value ) < m_NarrowBand->GetInnerRadius() )
+        if ( std::fabs( (float)center_value ) < m_NarrowBand->GetInnerRadius() )
           {
           node.m_NodeState += INNER_MASK;
           }
diff --git a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx
index ef0a303..b0eb71d 100644
--- a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx
@@ -37,7 +37,7 @@ IsoContourDistanceImageFilter< TInputImage, TOutputImage >
   m_FarValue = 10 * NumericTraits< PixelType >::One;
 
   m_NarrowBanding = false;
-  m_NarrowBand = NULL;
+  m_NarrowBand = ITK_NULLPTR;
 
   m_Barrier = Barrier::New();
 }
@@ -263,8 +263,6 @@ IsoContourDistanceImageFilter< TInputImage, TOutputImage >
   //3. Computation over the narrowband
   ConstBandIterator bandIt  = m_NarrowBandRegion[threadId].Begin;
   ConstBandIterator bandEnd = m_NarrowBandRegion[threadId].End;
-  typedef ImageRegionConstIterator< InputImageType > ConstIteratorType;
-  typedef ImageRegionIterator< OutputImageType >     IteratorType;
 
   unsigned int n;
 
@@ -371,20 +369,20 @@ IsoContourDistanceImageFilter< TInputImage, TOutputImage >
         grad[ng] = ( grad0[ng] * alpha0 + grad1[ng] * alpha1 ) / ( 2. * static_cast< PixelRealType >( m_Spacing[ng] ) );
         norm += grad[ng] * grad[ng];
         }
-      norm = vcl_sqrt( norm );
+      norm = std::sqrt( norm );
 
       if ( norm > NumericTraits< PixelRealType >::min() )
         {
-        PixelRealType val = vcl_fabs( grad[n] ) * m_Spacing[n] / norm / diff;
+        PixelRealType val = std::fabs( grad[n] ) * m_Spacing[n] / norm / diff;
 
         PixelRealType valNew0 = val0 * val;
         PixelRealType valNew1 = val1 * val;
 
-        if ( vcl_fabs( static_cast< double >( valNew0 ) ) < vcl_fabs( static_cast< double >( outNeigIt.GetNext(n, 0) ) ) )
+        if ( std::fabs( static_cast< double >( valNew0 ) ) < std::fabs( static_cast< double >( outNeigIt.GetNext(n, 0) ) ) )
           {
           outNeigIt.SetNext( n, 0, static_cast< PixelType >( valNew0 ) );
           }
-        if ( vcl_fabs( static_cast< double >( valNew1 ) ) < vcl_fabs( static_cast< double >( outNeigIt.GetNext(n, 1) ) ) )
+        if ( std::fabs( static_cast< double >( valNew1 ) ) < std::fabs( static_cast< double >( outNeigIt.GetNext(n, 1) ) ) )
           {
           outNeigIt.SetNext( n, 1, static_cast< PixelType >( valNew1 ) );
           }
diff --git a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.hxx b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.hxx
index 0ca9cf5..7df49bc 100644
--- a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.hxx
+++ b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkReflectiveImageRegionConstIterator.hxx
@@ -52,7 +52,7 @@ template< typename TImage >
 ReflectiveImageRegionConstIterator< TImage >
 ::ReflectiveImageRegionConstIterator(const Self & it)
 {
-  this->Operator = ( it );
+  this->operator= ( it );
   this->GoToBegin();
 }
 
diff --git a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx
index ed748af..c07d550 100644
--- a/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx
@@ -34,9 +34,11 @@ SignedMaurerDistanceMapImageFilter< TInputImage, TOutputImage >
 ::SignedMaurerDistanceMapImageFilter():
   m_BackgroundValue( NumericTraits< InputPixelType >::Zero ),
   m_Spacing(0.0),
+  m_CurrentDimension(0),
   m_InsideIsPositive(false),
   m_UseImageSpacing(true),
-  m_SquaredDistance(false)
+  m_SquaredDistance(false),
+  m_InputCache(ITK_NULLPTR)
 {}
 
 template< typename TInputImage, typename TOutputImage >
@@ -79,9 +81,9 @@ SignedMaurerDistanceMapImageFilter< TInputImage, TOutputImage >
   double range = static_cast< double >( requestedRegionSize[splitAxis] );
 
   unsigned int valuesPerThread =
-    static_cast< unsigned int >( vcl_ceil( range / static_cast< double >( num ) ) );
+    static_cast< unsigned int >( std::ceil( range / static_cast< double >( num ) ) );
   unsigned int maxThreadIdUsed =
-    static_cast< unsigned int >( vcl_ceil( range / static_cast< double >( valuesPerThread ) ) ) - 1;
+    static_cast< unsigned int >( std::ceil( range / static_cast< double >( valuesPerThread ) ) ) - 1;
 
   // Split the region
   if ( i < maxThreadIdUsed )
@@ -286,7 +288,7 @@ SignedMaurerDistanceMapImageFilter< TInputImage, TOutputImage >
       // cast to a real type is required on some platforms
       const OutputPixelType outputValue =
         static_cast< OutputPixelType >(
-          vcl_sqrt( static_cast< OutputRealType >( vnl_math_abs( Ot.Get() ) ) ) );
+          std::sqrt( static_cast< OutputRealType >( vnl_math_abs( Ot.Get() ) ) ) );
 
       if ( It.Get() != this->m_BackgroundValue )
         {
diff --git a/Utilities/ITK/Modules/Filtering/FFT/include/itkFFTWCommon.h b/Utilities/ITK/Modules/Filtering/FFT/include/itkFFTWCommon.h
index 90546b4..ad0dfea 100644
--- a/Utilities/ITK/Modules/Filtering/FFT/include/itkFFTWCommon.h
+++ b/Utilities/ITK/Modules/Filtering/FFT/include/itkFFTWCommon.h
@@ -130,7 +130,7 @@ public:
       roflags = flags | FFTW_WISDOM_ONLY;
       }
     PlanType plan = fftwf_plan_dft_c2r(rank,n,in,out,roflags);
-    if( plan == NULL )
+    if( plan == ITK_NULLPTR )
       {
       // no wisdom available for that plan
       if( canDestroyInput )
@@ -222,7 +222,7 @@ public:
       roflags = flags | FFTW_WISDOM_ONLY;
       }
     PlanType plan = fftwf_plan_dft_r2c(rank,n,in,out,roflags);
-    if( plan == NULL )
+    if( plan == ITK_NULLPTR )
       {
       // no wisdom available for that plan
       if( canDestroyInput )
@@ -316,7 +316,7 @@ public:
       roflags = flags | FFTW_WISDOM_ONLY;
       }
     PlanType plan = fftwf_plan_dft(rank,n,in,out,sign,roflags);
-    if( plan == NULL )
+    if( plan == ITK_NULLPTR )
       {
       // no wisdom available for that plan
       if( canDestroyInput )
@@ -431,7 +431,7 @@ public:
       roflags = flags | FFTW_WISDOM_ONLY;
       }
     PlanType plan = fftw_plan_dft_c2r(rank,n,in,out,roflags);
-    if( plan == NULL )
+    if( plan == ITK_NULLPTR )
       {
       // no wisdom available for that plan
       if( canDestroyInput )
@@ -522,7 +522,7 @@ public:
       roflags = flags | FFTW_WISDOM_ONLY;
       }
     PlanType plan = fftw_plan_dft_r2c(rank,n,in,out,roflags);
-    if( plan == NULL )
+    if( plan == ITK_NULLPTR )
       {
       // no wisdom available for that plan
       if( canDestroyInput )
@@ -616,7 +616,7 @@ public:
       roflags = flags | FFTW_WISDOM_ONLY;
       }
     PlanType plan = fftw_plan_dft(rank,n,in,out,sign,roflags);
-    if( plan == NULL )
+    if( plan == ITK_NULLPTR )
       {
       // no wisdom available for that plan
       if( canDestroyInput )
diff --git a/Utilities/ITK/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h b/Utilities/ITK/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h
index 391e680..5ac6525 100644
--- a/Utilities/ITK/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h
+++ b/Utilities/ITK/Modules/Filtering/FFT/include/itkFFTWGlobalConfiguration.h
@@ -83,7 +83,7 @@ class ManualWisdomFilenameGenerator: public WisdomFilenameGeneratorBase
       {
       this->m_WisdomFilename=wfn;
       }
-    virtual std::string GenerateWisdomFilename(const std::string itkNotUsed(baseCacheDirectory) ) const
+    virtual std::string GenerateWisdomFilename(const std::string itkNotUsed(baseCacheDirectory) ) const ITK_OVERRIDE
       {
        return this->m_WisdomFilename;
       }
@@ -94,7 +94,7 @@ class ManualWisdomFilenameGenerator: public WisdomFilenameGeneratorBase
 class SimpleWisdomFilenameGenerator: public WisdomFilenameGeneratorBase
 {
   public:
-    virtual std::string GenerateWisdomFilename(const std::string baseCacheDirectory) const
+    virtual std::string GenerateWisdomFilename(const std::string baseCacheDirectory) const ITK_OVERRIDE
       {
        return baseCacheDirectory+FFTWPathSep+".itksimple.wisdom";
       }
@@ -103,7 +103,7 @@ class SimpleWisdomFilenameGenerator: public WisdomFilenameGeneratorBase
 class HostnameWisdomFilenameGenerator: public WisdomFilenameGeneratorBase
 {
   public:
-    virtual std::string GenerateWisdomFilename(const std::string baseCacheDirectory) const
+    virtual std::string GenerateWisdomFilename(const std::string baseCacheDirectory) const ITK_OVERRIDE
       {
 
       itksys::SystemInformation hostInfo;
@@ -130,7 +130,7 @@ public:
       m_UseSteppingCode(true)
     {}
 
-    virtual std::string GenerateWisdomFilename(const std::string baseCacheDirectory) const
+    virtual std::string GenerateWisdomFilename(const std::string baseCacheDirectory) const ITK_OVERRIDE
       {
       //Now build the hardware string by system interogation
       itksys::SystemInformation hardwareInfo;
diff --git a/Utilities/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx b/Utilities/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx
index 3d8fd71..b513f92 100644
--- a/Utilities/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx
+++ b/Utilities/ITK/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx
@@ -88,7 +88,7 @@ static bool isDeclineString(std::string response)
 }
 
 itk::SimpleFastMutexLock              itk::FFTWGlobalConfiguration::m_CreationLock;
-itk::FFTWGlobalConfiguration::Pointer itk::FFTWGlobalConfiguration::m_Instance=NULL;
+itk::FFTWGlobalConfiguration::Pointer itk::FFTWGlobalConfiguration::m_Instance=ITK_NULLPTR;
 
 FFTWGlobalConfiguration::Pointer
 FFTWGlobalConfiguration
diff --git a/Utilities/ITK/Modules/Filtering/FFT/wrapping/itkFFTWGlobalConfiguration.wrap b/Utilities/ITK/Modules/Filtering/FFT/wrapping/itkFFTWGlobalConfiguration.wrap
index d9ec81a..d862993 100644
--- a/Utilities/ITK/Modules/Filtering/FFT/wrapping/itkFFTWGlobalConfiguration.wrap
+++ b/Utilities/ITK/Modules/Filtering/FFT/wrapping/itkFFTWGlobalConfiguration.wrap
@@ -7,4 +7,5 @@ if(ITK_USE_FFTWF OR ITK_USE_FFTWD)
   itk_wrap_simple_class("itk::SimpleWisdomFilenameGenerator")
   itk_wrap_simple_class("itk::HostnameWisdomFilenameGenerator")
   itk_wrap_simple_class("itk::HardwareWisdomFilenameGenerator")
+  itk_wrap_simple_class("itk::SimpleFastMutexLock")
 endif()
diff --git a/Utilities/ITK/Modules/Filtering/FFT/wrapping/itkMagnitudeAndPhaseToComplexImageFilter.wrap b/Utilities/ITK/Modules/Filtering/FFT/wrapping/itkMagnitudeAndPhaseToComplexImageFilter.wrap
new file mode 100644
index 0000000..f25dc60
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/FFT/wrapping/itkMagnitudeAndPhaseToComplexImageFilter.wrap
@@ -0,0 +1,9 @@
+itk_wrap_class("itk::MagnitudeAndPhaseToComplexImageFilter" POINTER_WITH_SUPERCLASS)
+  foreach(d ${ITK_WRAP_DIMS})
+    foreach(t ${WRAP_ITK_REAL})
+      foreach(c ${WRAP_ITK_COMPLEX_REAL})
+        itk_wrap_template("${ITKM_I${t}${d}}${ITKM_I${t}${d}}${ITKM_I${c}${d}}" "${ITKT_I${t}${d}},${ITKT_I${t}${d}},${ITKT_I${c}${d}}")
+      endforeach(c)
+    endforeach(t)
+  endforeach(d)
+itk_end_wrap_class()
diff --git a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingBase.hxx b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingBase.hxx
index e76a1c5..e78c05b 100644
--- a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingBase.hxx
+++ b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingBase.hxx
@@ -33,10 +33,10 @@ FastMarchingBase()
   {
   this->ProcessObject::SetNumberOfRequiredInputs(0);
 
-  m_TrialPoints = NULL;
-  m_AlivePoints = NULL;
-  m_ProcessedPoints = NULL;
-  m_ForbiddenPoints = NULL;
+  m_TrialPoints = ITK_NULLPTR;
+  m_AlivePoints = ITK_NULLPTR;
+  m_ProcessedPoints = ITK_NULLPTR;
+  m_ForbiddenPoints = ITK_NULLPTR;
 
   //m_Heap = PriorityQueueType::New();
   m_SpeedConstant = 1.;
diff --git a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx
index ad69988..56c9656 100644
--- a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx
@@ -27,8 +27,8 @@ template< typename TLevelSet, typename TAuxValue, unsigned int VAuxDimension,
 FastMarchingExtensionImageFilter< TLevelSet, TAuxValue, VAuxDimension, TSpeedImage >
 ::FastMarchingExtensionImageFilter()
 {
-  m_AuxAliveValues = NULL;
-  m_AuxTrialValues = NULL;
+  m_AuxAliveValues = ITK_NULLPTR;
+  m_AuxTrialValues = ITK_NULLPTR;
 
   this->ProcessObject::SetNumberOfRequiredOutputs(1 + AuxDimension);
 
@@ -66,7 +66,7 @@ FastMarchingExtensionImageFilter< TLevelSet, TAuxValue, VAuxDimension, TSpeedIma
 {
   if ( idx >= AuxDimension || this->GetNumberOfIndexedOutputs() < idx + 2 )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   return this->m_AuxImages[idx];
diff --git a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx
index 9c92965..1227e6d 100644
--- a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx
+++ b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx
@@ -28,8 +28,8 @@ template< typename TInput, typename TOutput,
 FastMarchingExtensionImageFilterBase< TInput, TOutput, TAuxValue, VAuxDimension >
 ::FastMarchingExtensionImageFilterBase()
 {
-  m_AuxiliaryAliveValues = NULL;
-  m_AuxiliaryTrialValues = NULL;
+  m_AuxiliaryAliveValues = ITK_NULLPTR;
+  m_AuxiliaryTrialValues = ITK_NULLPTR;
 
   this->ProcessObject::SetNumberOfRequiredOutputs(1 + AuxDimension);
 
@@ -38,7 +38,7 @@ FastMarchingExtensionImageFilterBase< TInput, TOutput, TAuxValue, VAuxDimension
     {
     ptr = AuxImageType::New();
     this->ProcessObject::SetNthOutput( k + 1, ptr.GetPointer() );
-    this->m_AuxImages[k] = 0;
+    this->m_AuxImages[k] = ITK_NULLPTR;
     }
 }
 
@@ -67,7 +67,7 @@ FastMarchingExtensionImageFilterBase< TInput, TOutput, TAuxValue, VAuxDimension
 {
   if ( idx >= AuxDimension || this->GetNumberOfIndexedOutputs() < idx + 2 )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   return static_cast< AuxImageType * >( this->ProcessObject::GetOutput(idx + 1) );
diff --git a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h
index b30fc65..d734337 100644
--- a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.h
@@ -136,6 +136,7 @@ public:
   class AxisNodeType:public NodeType
   {
 public:
+    AxisNodeType() : m_Axis(0) {}
     int GetAxis() const { return m_Axis; }
     void SetAxis(int axis) { m_Axis = axis; }
     const AxisNodeType & operator=(const NodeType & node)
diff --git a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx
index 8f7ca73..a4761ab 100644
--- a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx
@@ -46,10 +46,10 @@ FastMarchingImageFilter< TLevelSet, TSpeedImage >
   m_OutputDirection.SetIdentity();
   m_OverrideOutputInformation = false;
 
-  m_AlivePoints = NULL;
-  m_OutsidePoints = NULL;
-  m_TrialPoints = NULL;
-  m_ProcessedPoints = NULL;
+  m_AlivePoints = ITK_NULLPTR;
+  m_OutsidePoints = ITK_NULLPTR;
+  m_TrialPoints = ITK_NULLPTR;
+  m_ProcessedPoints = ITK_NULLPTR;
 
   m_SpeedConstant = 1.0;
   m_InverseSpeed = -1.0;
@@ -94,7 +94,7 @@ FastMarchingImageFilter< TLevelSet, TSpeedImage >
   Superclass::GenerateOutputInformation();
 
   // use user-specified output information
-  if ( this->GetInput() == NULL || m_OverrideOutputInformation )
+  if ( this->GetInput() == ITK_NULLPTR || m_OverrideOutputInformation )
     {
     LevelSetPointer output = this->GetOutput();
     output->SetLargestPossibleRegion(m_OutputRegion);
@@ -499,7 +499,7 @@ FastMarchingImageFilter< TLevelSet, TSpeedImage >
         throw err;
         }
 
-      solution = ( vcl_sqrt(discrim) + bb ) / aa;
+      solution = ( std::sqrt(discrim) + bb ) / aa;
       }
     else
       {
diff --git a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx
index a5acf5e..42bed2b 100644
--- a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx
+++ b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx
@@ -67,7 +67,7 @@ FastMarchingImageFilterBase()
   m_OutputDirection.SetIdentity();
   m_OverrideOutputInformation = false;
 
-  m_InputCache = NULL;
+  m_InputCache = ITK_NULLPTR;
   m_LabelImage = LabelImageType::New();
   }
 // -----------------------------------------------------------------------------
@@ -373,7 +373,7 @@ Solve( OutputImageType* oImage,
           <<"Discriminant of quadratic equation is negative" );
         }
 
-      oSolution = ( vcl_sqrt(discrim) + bb ) / aa;
+      oSolution = ( std::sqrt(discrim) + bb ) / aa;
       }
     else
       {
diff --git a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx
index 7fd0148..8884b70 100644
--- a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx
+++ b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx
@@ -28,8 +28,8 @@ namespace itk
 template< typename TInput, typename TOutput, typename TImage >
 FastMarchingImageToNodePairContainerAdaptor< TInput, TOutput, TImage >
 ::FastMarchingImageToNodePairContainerAdaptor() :
-  m_AliveImage( NULL ), m_TrialImage( NULL ), m_ForbiddenImage( NULL ),
-  m_AlivePoints( NULL ), m_TrialPoints( NULL ), m_ForbiddenPoints( NULL ),
+  m_AliveImage( ITK_NULLPTR ), m_TrialImage( ITK_NULLPTR ), m_ForbiddenImage( ITK_NULLPTR ),
+  m_AlivePoints( ITK_NULLPTR ), m_TrialPoints( ITK_NULLPTR ), m_ForbiddenPoints( ITK_NULLPTR ),
   m_AliveValue( NumericTraits< OutputPixelType >::Zero ),
   m_TrialValue( NumericTraits< OutputPixelType >::Zero ),
   m_IsForbiddenImageBinaryMask( false )
diff --git a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx
index edaa260..acd479a 100644
--- a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx
+++ b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingQuadEdgeMeshFilterBase.hxx
@@ -31,7 +31,7 @@ template< typename TInput, typename TOutput >
 FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput >
 ::FastMarchingQuadEdgeMeshFilterBase() : Superclass()
 {
-  this->m_InputMesh = 0;
+  this->m_InputMesh = ITK_NULLPTR;
 }
 
 template< typename TInput, typename TOutput >
@@ -270,7 +270,7 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput >
 
   if( sq_norm1 > epsilon )
     {
-    norm1 = vcl_sqrt( sq_norm1 );
+    norm1 = std::sqrt( sq_norm1 );
 
     OutputVectorRealType inv_norm1 = 1. / norm1;
     Edge1 *= inv_norm1;
@@ -281,7 +281,7 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput >
 
   if( sq_norm2 > epsilon )
     {
-    norm2 = vcl_sqrt( sq_norm2 );
+    norm2 = std::sqrt( sq_norm2 );
 
     OutputVectorRealType inv_norm2 = 1. / norm2;
     Edge2 *= inv_norm2;
@@ -364,7 +364,7 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput >
   OutputVectorRealType t = large_value;
 
   OutputVectorRealType CosAngle = iDot;
-  OutputVectorRealType SinAngle = vcl_sqrt( 1. - iDot * iDot );
+  OutputVectorRealType SinAngle = std::sqrt( 1. - iDot * iDot );
 
   OutputVectorRealType u = iVal2 - iVal1;
 
@@ -382,14 +382,14 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput >
     {
     if( vnl_math_abs( f2 ) > epsilon )
       {
-      t = ( -f1 - vcl_sqrt( delta ) ) / f2;
+      t = ( -f1 - std::sqrt( delta ) ) / f2;
 
       // test if we must must choose the other solution
       if( ( t < u ) ||
           ( iNorm2 * ( t - u ) / t < iNorm1 * CosAngle ) ||
           ( iNorm1 / CosAngle < iNorm2 * ( t - u ) / t ) )
         {
-        t = ( -f1 + vcl_sqrt( delta ) ) / f2;
+        t = ( -f1 + std::sqrt( delta ) ) / f2;
         }
       }
     else
@@ -466,7 +466,7 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput >
 
   Vector2DType v1;
   v1[0] = dot;
-  v1[1] = vcl_sqrt( 1. - dot * dot );
+  v1[1] = std::sqrt( 1. - dot * dot );
 
   Vector2DType v2;
   v2[0] = 1.;
@@ -534,7 +534,7 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput >
 
     Matrix2DType rotation;
     rotation[0][0] = dot;
-    rotation[0][1] = vcl_sqrt( 1. - dot * dot );
+    rotation[0][1] = std::sqrt( 1. - dot * dot );
     rotation[1][0] = - rotation[0][1];
     rotation[1][1] = dot;
 
@@ -578,7 +578,7 @@ FastMarchingQuadEdgeMeshFilterBase< TInput, TOutput >
 
         if( oSqNorm > epsilon )
           {
-          oNorm = vcl_sqrt( oSqNorm );
+          oNorm = std::sqrt( oSqNorm );
           OutputVectorRealType temp_norm = x_start1.GetNorm();
           if( temp_norm > epsilon )
             {
diff --git a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h
index 9de3b57..4c445f6 100644
--- a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h
+++ b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h
@@ -147,13 +147,15 @@ public:
 protected:
 
   /** Constructor */
-  FastMarchingReachedTargetNodesStoppingCriterion() : Superclass()
+  FastMarchingReachedTargetNodesStoppingCriterion() :
+    Superclass(),
+    m_TargetCondition(AllTargets),
+    m_NumberOfTargetsToBeReached(0),
+    m_TargetOffset(NumericTraits< OutputPixelType >::Zero),
+    m_StoppingValue(NumericTraits< OutputPixelType >::Zero),
+    m_Satisfied(false),
+    m_Initialized(false)
   {
-    m_TargetCondition = AllTargets;
-    m_TargetOffset = NumericTraits< OutputPixelType >::Zero;
-    m_StoppingValue = NumericTraits< OutputPixelType >::Zero;
-    m_Satisfied = false;
-    m_Initialized = false;
   }
 
   /** Destructor */
diff --git a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingStoppingCriterionBase.h b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingStoppingCriterionBase.h
index 36106b7..93672c1 100644
--- a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingStoppingCriterionBase.h
+++ b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingStoppingCriterionBase.h
@@ -70,7 +70,7 @@ public:
 
  protected:
   /** Constructor */
-  FastMarchingStoppingCriterionBase() : Superclass(), m_Domain( NULL )
+  FastMarchingStoppingCriterionBase() : Superclass(), m_Domain( ITK_NULLPTR )
   {
     m_CurrentValue = NumericTraits< OutputPixelType >::Zero;
     m_PreviousValue = NumericTraits< OutputPixelType >::Zero;
diff --git a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx
index a141a3b..279647a 100644
--- a/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.hxx
@@ -33,8 +33,8 @@ template< typename TLevelSet, typename TSpeedImage >
 FastMarchingUpwindGradientImageFilter< TLevelSet, TSpeedImage >
 ::FastMarchingUpwindGradientImageFilter()
 {
-  m_TargetPoints = NULL;
-  m_ReachedTargetPoints = NULL;
+  m_TargetPoints = ITK_NULLPTR;
+  m_ReachedTargetPoints = ITK_NULLPTR;
   m_GradientImage = GradientImageType::New();
   m_GenerateGradientImage = false;
   m_TargetOffset = 1.0;
diff --git a/Utilities/ITK/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionImageFilter.hxx
index 017b752..7b82262 100644
--- a/Utilities/ITK/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUAnisotropicDiffusionImageFilter.hxx
@@ -59,14 +59,14 @@ GPUAnisotropicDiffusionImageFilter< TInputImage, TOutputImage, TParentImageFilte
     {
     minSpacing = 1.0;
     }
-  if ( this->GetTimeStep() >  ( minSpacing / vcl_pow(2.0, static_cast< double >( ImageDimension ) + 1) ) )
+  if ( this->GetTimeStep() >  ( minSpacing / std::pow(2.0, static_cast< double >( ImageDimension ) + 1) ) )
     {
-    //    f->SetTimeStep(1.0 / vcl_pow(2.0,
+    //    f->SetTimeStep(1.0 / std::pow(2.0,
     // static_cast<double>(ImageDimension)));
     itkWarningMacro( << "Anisotropic diffusion unstable time step: "
                      << this->GetTimeStep() << std::endl
                      << "Stable time step for this image must be smaller than "
-                     << minSpacing / vcl_pow( 2.0, static_cast< double >( ImageDimension + 1 ) ) );
+                     << minSpacing / std::pow( 2.0, static_cast< double >( ImageDimension + 1 ) ) );
     }
 
   if ( this->m_GradientMagnitudeIsFixed == false )
diff --git a/Utilities/ITK/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h b/Utilities/ITK/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h
index 46e2e4f..491bb26 100644
--- a/Utilities/ITK/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h
@@ -131,8 +131,7 @@ public:
    * execution model.
    *
    * \sa ProcessObject::GenerateInputRequestedRegion()
-  virtual void GenerateInputRequestedRegion()
-  throw ( InvalidRequestedRegionError );*/
+  virtual void GenerateInputRequestedRegion();*/
 
 #ifdef ITK_USE_CONCEPT_CHECKING
   // Begin concept checking
diff --git a/Utilities/ITK/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx b/Utilities/ITK/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx
index 91cef5c..a3c9c01 100644
--- a/Utilities/ITK/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.hxx
@@ -32,7 +32,6 @@ template< typename TInputImage, typename TOutputImage, typename TOperatorValueTy
 void
 GPUNeighborhoodOperatorImageFilter< TInputImage, TOutputImage, TOperatorValueType >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h b/Utilities/ITK/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h
index a12146d..1d11bd8 100644
--- a/Utilities/ITK/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.h
@@ -96,8 +96,7 @@ public:
   typedef GPUNeighborhoodOperatorImageFilter< InputImageType, OutputImageType,
                                               RealOutputPixelValueType > SingleFilterType;
 
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
 protected:
   GPUDiscreteGaussianImageFilter();
diff --git a/Utilities/ITK/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.hxx b/Utilities/ITK/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.hxx
index 5a99896..a0b8d00 100644
--- a/Utilities/ITK/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/GPUSmoothing/include/itkGPUDiscreteGaussianImageFilter.hxx
@@ -67,7 +67,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 GPUDiscreteGaussianImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
   {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.hxx
index 06c789e..4322df3 100644
--- a/Utilities/ITK/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageCompose/include/itkComposeImageFilter.hxx
@@ -20,6 +20,7 @@
 
 #include "itkComposeImageFilter.h"
 #include "itkImageRegionIterator.h"
+#include "itkProgressReporter.h"
 
 namespace itk
 {
@@ -114,8 +115,10 @@ template< typename TInputImage, typename TOutputImage >
 void
 ComposeImageFilter< TInputImage, TOutputImage >
 ::ThreadedGenerateData(const RegionType & outputRegionForThread,
-                       ThreadIdType)
+                       ThreadIdType threadId)
 {
+  ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
+
   typename OutputImageType::Pointer outputImage =
     static_cast< OutputImageType * >( this->ProcessObject::GetOutput(0) );
 
@@ -140,6 +143,7 @@ ComposeImageFilter< TInputImage, TOutputImage >
     ComputeOutputPixel( pix, inputItContainer );
     oit.Set(pix);
     ++oit;
+    progress.CompletedPixel();
     }
 }
 } // end namespace itk
diff --git a/Utilities/ITK/Modules/Filtering/ImageCompose/wrapping/itkJoinSeriesImageFilter.wrap b/Utilities/ITK/Modules/Filtering/ImageCompose/wrapping/itkJoinSeriesImageFilter.wrap
index dfe8847..82cf0f1 100644
--- a/Utilities/ITK/Modules/Filtering/ImageCompose/wrapping/itkJoinSeriesImageFilter.wrap
+++ b/Utilities/ITK/Modules/Filtering/ImageCompose/wrapping/itkJoinSeriesImageFilter.wrap
@@ -1,13 +1,24 @@
-itk_wrap_class("itk::JoinSeriesImageFilter" POINTER)
-  foreach(d1 ${ITK_WRAP_DIMS})
-    foreach(d2 ${ITK_WRAP_DIMS})
-      if("${d1}" LESS "${d2}")
-        foreach(t ${WRAP_ITK_SCALAR})
-          itk_wrap_template("${ITKM_I${t}${d1}}${ITKM_I${t}${d2}}"
-                        "${ITKT_I${t}${d1}},${ITKT_I${t}${d2}}")
-        endforeach(t)
-      endif("${d1}" LESS "${d2}")
-    endforeach(d2)
-  endforeach(d1)
+# Check if we have the right dimensions before wrapping
+foreach(d1 ${ITK_WRAP_DIMS})
+  foreach(d2 ${ITK_WRAP_DIMS})
+    if("${d1}" LESS "${d2}")
+      set(wrappable true)
+    endif("${d1}" LESS "${d2}")
+  endforeach(d2)
+endforeach(d1)
 
-itk_end_wrap_class()
+# Wrap if allowed
+if(wrappable)
+  itk_wrap_class("itk::JoinSeriesImageFilter" POINTER)
+    foreach(d1 ${ITK_WRAP_DIMS})
+      foreach(d2 ${ITK_WRAP_DIMS})
+        if("${d1}" LESS "${d2}")
+          foreach(t ${WRAP_ITK_SCALAR})
+            itk_wrap_template("${ITKM_I${t}${d1}}${ITKM_I${t}${d2}}"
+                          "${ITKT_I${t}${d1}},${ITKT_I${t}${d2}}")
+          endforeach(t)
+        endif("${d1}" LESS "${d2}")
+      endforeach(d2)
+    endforeach(d1)
+  itk_end_wrap_class()
+endif(wrappable)
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h
index 2994066..e082cce 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.h
@@ -200,8 +200,7 @@ protected:
    * an implementation for GenerateInputRequestedRegion() in order to
    * inform the pipeline execution model.
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
 private:
   BilateralImageFilter(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.hxx
index 82761dd..abe41ef 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkBilateralImageFilter.hxx
@@ -57,7 +57,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 BilateralImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
@@ -82,7 +81,7 @@ throw( InvalidRequestedRegionError )
       {
       radius[i] =
         ( typename TInputImage::SizeType::SizeValueType )
-        vcl_ceil(m_DomainMu * m_DomainSigma[i] / this->GetInput()->GetSpacing()[i]);
+        std::ceil(m_DomainMu * m_DomainSigma[i] / this->GetInput()->GetSpacing()[i]);
       }
     }
   else
@@ -131,8 +130,8 @@ BilateralImageFilter< TInputImage, TOutputImage >
 {
   // Build a small image of the N-dimensional Gaussian used for domain filter
   //
-  // Gaussian image size will be (2*vcl_ceil(2.5*sigma)+1) x
-  // (2*vcl_ceil(2.5*sigma)+1)
+  // Gaussian image size will be (2*std::ceil(2.5*sigma)+1) x
+  // (2*std::ceil(2.5*sigma)+1)
   unsigned int i;
 
   typename InputImageType::SizeType radius;
@@ -149,7 +148,7 @@ BilateralImageFilter< TInputImage, TOutputImage >
       {
       radius[i] =
         ( typename TInputImage::SizeType::SizeValueType )
-        vcl_ceil(m_DomainMu * m_DomainSigma[i] / inputSpacing[i]);
+        std::ceil(m_DomainMu * m_DomainSigma[i] / inputSpacing[i]);
       domainKernelSize[i] = 2 * radius[i] + 1;
       }
     }
@@ -223,7 +222,7 @@ BilateralImageFilter< TInputImage, TOutputImage >
 
   // denominator (normalization factor) for Gaussian used for range
   double rangeGaussianDenom;
-  rangeGaussianDenom = m_RangeSigma * vcl_sqrt(2.0 * vnl_math::pi);
+  rangeGaussianDenom = m_RangeSigma * std::sqrt(2.0 * vnl_math::pi);
 
   // Maximum delta for the dynamic range
   double tableDelta;
@@ -242,7 +241,7 @@ BilateralImageFilter< TInputImage, TOutputImage >
   for ( i = 0, v = 0.0; i < m_NumberOfRangeGaussianSamples;
         ++i, v += tableDelta )
     {
-    m_RangeGaussianTable[i] = vcl_exp(-0.5 * v * v / rangeVariance) / rangeGaussianDenom;
+    m_RangeGaussianTable[i] = std::exp(-0.5 * v * v / rangeVariance) / rangeGaussianDenom;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h
index 428d34a..6c2213b 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h
@@ -28,11 +28,11 @@
 
 namespace itk
 {
-template< typename TValueType >
+template< typename TValue >
 class ListNode
 {
 public:
-  TValueType m_Value;
+  TValue m_Value;
 
   ListNode *Next;
   ListNode *Previous;
@@ -40,7 +40,9 @@ public:
 
 /** \class CannyEdgeDetectionImageFilter
  * \brief This filter is an implementation of a Canny edge detector for
- * scalar-valued images.  Based on John Canny's paper "A Computational Approach
+ * scalar-valued images.
+ *
+ *  Based on John Canny's paper "A Computational Approach
  * to Edge Detection"(IEEE Transactions on Pattern Analysis and Machine
  * Intelligence, Vol. PAMI-8, No.6, November 1986),  there are four major steps
  * used in the edge-detection scheme:
@@ -174,7 +176,9 @@ public:
       }
   }
 
-  /** TODO:  Document in the ITKv4 migration guide that
+  /** \brief Set the Threshold value for detected edges.
+   *
+   * TODO:  Document in the ITKv4 migration guide that
    * the SetThreshold member function was removed from
    * the CannyEdgeDetectionImageFilter, and that both
    * UpperThreshold and LowerThreshold need to be set.
@@ -182,8 +186,6 @@ public:
    * change "myfilter->SetThrehsold" to "myfilter->SetUpperThreshold",
    * and add "myfilter->SetLowerThreshold(GetUpperThreshold()/2.0)"
    */
-
-  ///* Set the Threshold value for detected edges. */
   itkSetMacro(UpperThreshold, OutputImagePixelType);
   itkGetConstMacro(UpperThreshold, OutputImagePixelType);
 
@@ -202,8 +204,7 @@ public:
    * pipeline execution model.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion()  */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
 #ifdef ITK_USE_CONCEPT_CHECKING
   // Begin concept checking
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx
index 18b3887..e690aec 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx
@@ -78,8 +78,8 @@ CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >::CannyEdgeDetectionIm
   m_NodeStore = ListNodeStorageType::New();
   m_NodeList = ListType::New();
 
-  m_InputImage = 0;
-  m_OutputImage = 0;
+  m_InputImage = ITK_NULLPTR;
+  m_OutputImage = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TOutputImage >
@@ -101,7 +101,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
@@ -117,7 +116,7 @@ CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >
 
   ImageRegionIterator< TOutputImage > it;
 
-  void *globalData = 0;
+  void *globalData = ITK_NULLPTR;
 
   // Here input is the result from the gaussian filter
   //      output is the update buffer.
@@ -505,7 +504,7 @@ CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >
                     m_ComputeCannyEdge1stDerivativeOper);
         }
 
-      gradMag = vcl_sqrt( (double)gradMag );
+      gradMag = std::sqrt( (double)gradMag );
       derivPos = zero;
       for ( unsigned int i = 0; i < ImageDimension; i++ )
         {
@@ -593,12 +592,9 @@ CannyEdgeDetectionImageFilter< TInputImage, TOutputImage >
      << m_Center << std::endl;
   os << "Stride: "
      << m_Stride << std::endl;
-  os << "Gaussian Filter: " << std::endl;
-  m_GaussianFilter->Print( os, indent.GetNextIndent() );
-  os << "Multiply image Filter: " << std::endl;
-  m_MultiplyImageFilter->Print( os, indent.GetNextIndent() );
-  os << "UpdateBuffer1: " << std::endl;
-  m_UpdateBuffer1->Print( os, indent.GetNextIndent() );
+  itkPrintSelfObjectMacro( GaussianFilter );
+  itkPrintSelfObjectMacro( MultiplyImageFilter );
+  itkPrintSelfObjectMacro( UpdateBuffer1 );
 }
 } //end of itk namespace
 #endif
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.h
index 16c72fe..e35ab5d 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.h
@@ -113,8 +113,7 @@ public:
    * inform the pipeline execution model.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
 protected:
   DerivativeImageFilter()
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.hxx
index 8ff20d4..c20fe35 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkDerivativeImageFilter.hxx
@@ -30,7 +30,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 DerivativeImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.hxx
index 277b061..95f81f8 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.hxx
@@ -86,12 +86,12 @@ Hessian3DToVesselnessMeasureImageFilter< TPixel >
       if ( eigenValue[2] <= 0 )
         {
         lineMeasure =
-          vcl_exp( -0.5 * vnl_math_sqr( eigenValue[2] / ( m_Alpha1 * normalizeValue ) ) );
+          std::exp( -0.5 * vnl_math_sqr( eigenValue[2] / ( m_Alpha1 * normalizeValue ) ) );
         }
       else
         {
         lineMeasure =
-          vcl_exp( -0.5 * vnl_math_sqr( eigenValue[2] / ( m_Alpha2 * normalizeValue ) ) );
+          std::exp( -0.5 * vnl_math_sqr( eigenValue[2] / ( m_Alpha2 * normalizeValue ) ) );
         }
 
       lineMeasure *= normalizeValue;
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h
index 30b8a86..753a76d 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.h
@@ -140,8 +140,7 @@ public:
    * an implementation for GenerateInputRequestedRegion in order to inform
    * the pipeline execution model.
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
 #ifdef ITK_USE_CONCEPT_CHECKING
   // Begin concept checking
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx
index 39a7341..27610a3 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx
@@ -139,7 +139,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 HessianRecursiveGaussianImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx
index 0f2021f..b99b233 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx
@@ -98,8 +98,8 @@ HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType >
   m_RadiusImage->SetOrigin( inputImage->GetOrigin() );
   m_RadiusImage->SetSpacing( inputImage->GetSpacing() );
   m_RadiusImage->SetDirection( inputImage->GetDirection() );
-  m_RadiusImage->Allocate();
-  m_RadiusImage->FillBuffer(0);
+  m_RadiusImage->Allocate(true); // initialize
+                                                        // buffer to zero
 
   ImageRegionConstIteratorWithIndex< InputImageType > image_it( inputImage,  inputImage->GetRequestedRegion() );
   image_it.GoToBegin();
@@ -119,9 +119,9 @@ HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType >
       double Vy = grad[1];
 
       // if the gradient is not flat
-      if ( ( vcl_fabs(Vx) > 1 ) || ( vcl_fabs(Vy) > 1 ) )
+      if ( ( std::fabs(Vx) > 1 ) || ( std::fabs(Vy) > 1 ) )
         {
-        double norm = vcl_sqrt(Vx * Vx + Vy * Vy);
+        double norm = std::sqrt(Vx * Vx + Vy * Vy);
         Vx /= norm;
         Vy /= norm;
 
@@ -132,10 +132,10 @@ HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType >
 
           do
             {
-            index[0] = (IndexValueType)( point[0] - i * ( Vx * vcl_cos(angle) + Vy * vcl_sin(angle) ) );
-            index[1] = (IndexValueType)( point[1] - i * ( Vx * vcl_sin(angle) + Vy * vcl_cos(angle) ) );
+            index[0] = (IndexValueType)( point[0] - i * ( Vx * std::cos(angle) + Vy * std::sin(angle) ) );
+            index[1] = (IndexValueType)( point[1] - i * ( Vx * std::sin(angle) + Vy * std::cos(angle) ) );
 
-            distance = vcl_sqrt( ( index[1] - point[1] ) * ( index[1] - point[1] )
+            distance = std::sqrt( ( index[1] - point[1] ) * ( index[1] - point[1] )
                                  + ( index[0] - point[0] ) * ( index[0] - point[0] ) );
 
             if ( outputImage->GetRequestedRegion().IsInside(index) )
@@ -192,8 +192,8 @@ HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType >
   outputImage->SetOrigin( this->GetOutput(0)->GetOrigin() );
   outputImage->SetSpacing( this->GetOutput(0)->GetSpacing() );
   outputImage->SetDirection( this->GetOutput(0)->GetDirection() );
-  outputImage->Allocate();
-  outputImage->FillBuffer(0);
+  outputImage->Allocate(true); // initialize
+                                                      // buffer to zero
 
   ImageRegionConstIteratorWithIndex< OutputImageType > image_it( this->GetOutput(0),  this->GetOutput(
                                                                    0)->GetRequestedRegion() );
@@ -228,7 +228,7 @@ HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType >
   CirclesListSizeType circles = 0;
   bool         found;
 
-  const double nPI = 4.0 * vcl_atan(1.0);
+  const double nPI = 4.0 * std::atan(1.0);
 
   // Find maxima
   do
@@ -260,8 +260,8 @@ HoughTransform2DCirclesImageFilter< TInputPixelType, TOutputPixelType >
           {
           for ( double length = 0; length < m_DiscRadiusRatio * Circle->GetRadius()[0]; length += 1 )
             {
-            index[0] = (IndexValueType)( it_input.GetIndex()[0] + length * vcl_cos(angle) );
-            index[1] = (IndexValueType)( it_input.GetIndex()[1] + length * vcl_sin(angle) );
+            index[0] = (IndexValueType)( it_input.GetIndex()[0] + length * std::cos(angle) );
+            index[1] = (IndexValueType)( it_input.GetIndex()[1] + length * std::sin(angle) );
             if ( postProcessImage->GetLargestPossibleRegion().IsInside(index) )
               {
               postProcessImage->SetPixel(index, 0);
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h
index 88c02ad..88ee7f5 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.h
@@ -34,9 +34,11 @@ namespace itk
  * to be extracted. The output is the image of the accumulator.
  * GetLines() returns a list of LinesSpatialObjects.
  *
- * Lines are parameterized in the form: R = x*vcl_cos(Teta)+y*vcl_sin(Teta)
- * where R is the perpendicular distance from the origin and Teta
- * the angle with the normal.
+ * Lines are parameterized in the form:
+ *
+ * \f$ R = x \cos(\theta) + y \sin(\theta) \f$
+ * where \f$R\f$ is the perpendicular distance from the origin and
+ * \f$\theta\f$ the angle with the normal.
  *
  * The output is the accumulator array:
  *    -The first dimension (X) represents the distance R from the corner
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx
index aceaeaa..9677c57 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx
@@ -38,7 +38,7 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >
   m_Variance = 5;
   m_OldModifiedTime = 0;
   m_OldNumberOfLines = 0;
-  m_SimplifyAccumulator = NULL;
+  m_SimplifyAccumulator = ITK_NULLPTR;
 }
 
 template< typename TInputPixelType, typename TOutputPixelType >
@@ -74,7 +74,7 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >
   Size< 2 > size;
 
   size[0] =
-    (SizeValueType)( vcl_sqrt(m_AngleResolution * m_AngleResolution
+    (SizeValueType)( std::sqrt(m_AngleResolution * m_AngleResolution
                                   + input->GetLargestPossibleRegion().GetSize()[0]
                                   * input->GetLargestPossibleRegion().GetSize()[0]) );
   size[1] = (SizeValueType)m_AngleResolution;
@@ -114,7 +114,7 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >
   this->AllocateOutputs();
   outputImage->FillBuffer(0);
 
-  const double nPI = 4.0 * vcl_atan(1.0);
+  const double nPI = 4.0 * std::atan(1.0);
 
   ImageRegionConstIteratorWithIndex< InputImageType > image_it( inputImage,  inputImage->GetRequestedRegion() );
   image_it.GoToBegin();
@@ -129,7 +129,7 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >
         {
         index[0] =
           // m_R
-          (IndexValueType)( image_it.GetIndex()[0] * vcl_cos(angle) + image_it.GetIndex()[1] * vcl_sin(angle) );
+          (IndexValueType)( image_it.GetIndex()[0] * std::cos(angle) + image_it.GetIndex()[1] * std::sin(angle) );
         // m_Theta
         index[1] = (IndexValueType)( ( m_AngleResolution / 2 ) + m_AngleResolution * angle / ( 2 * nPI ) );
 
@@ -170,8 +170,9 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >
   m_SimplifyAccumulator->SetOrigin( inputImage->GetOrigin() );
   m_SimplifyAccumulator->SetSpacing( inputImage->GetSpacing() );
   m_SimplifyAccumulator->SetDirection( inputImage->GetDirection() );
-  m_SimplifyAccumulator->Allocate();
-  m_SimplifyAccumulator->FillBuffer(0);
+  m_SimplifyAccumulator->Allocate(true); // initialize
+                                                                // buffer
+                                                                // to zero
 
   Index< 2 > index;
   Index< 2 > maxIndex;
@@ -182,7 +183,7 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >
   ImageRegionConstIteratorWithIndex< InputImageType > image_it( inputImage,  inputImage->GetRequestedRegion() );
   image_it.GoToBegin();
 
-  const double nPI = 4.0 * vcl_atan(1.0);
+  const double nPI = 4.0 * std::atan(1.0);
 
   while ( !image_it.IsAtEnd() )
     {
@@ -195,7 +196,7 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >
       for ( double angle = -nPI; angle < nPI; angle += nPI / m_AngleResolution )
         {
         // m_R
-        index[0] = (IndexValueType)( image_it.GetIndex()[0] * vcl_cos(angle) + image_it.GetIndex()[1] * vcl_sin(angle) );
+        index[0] = (IndexValueType)( image_it.GetIndex()[0] * std::cos(angle) + image_it.GetIndex()[1] * std::sin(angle) );
         // m_Theta
         index[1] = (IndexValueType)( ( m_AngleResolution / 2 ) + m_AngleResolution * angle / ( 2 * nPI ) );
 
@@ -277,7 +278,7 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >
   itk::ImageRegionIterator< InternalImageType >
   it_input( postProcessImage, postProcessImage->GetLargestPossibleRegion() );
 
-  const double nPI = 4.0 * vcl_atan(1.0);
+  const double nPI = 4.0 * std::atan(1.0);
 
   itk::Index< 2 > index;
 
@@ -301,9 +302,9 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >
 
         double radius = it_input.GetIndex()[0];
         double teta   = ( ( it_input.GetIndex()[1] ) * 2 * nPI / this->GetAngleResolution() ) - nPI;
-        double Vx = radius * vcl_cos(teta);
-        double Vy = radius * vcl_sin(teta);
-        double norm = vcl_sqrt(Vx * Vx + Vy * Vy);
+        double Vx = radius * std::cos(teta);
+        double Vy = radius * std::sin(teta);
+        double norm = std::sqrt(Vx * Vx + Vy * Vy);
         double VxNorm = Vx / norm;
         double VyNorm = Vy / norm;
 
@@ -343,8 +344,8 @@ HoughTransform2DLinesImageFilter< TInputPixelType, TOutputPixelType >
           {
           for ( double length = 0; length < m_DiscRadius; length += 1 )
             {
-            index[0] = (IndexValueType)( it_input.GetIndex()[0] + length * vcl_cos(angle) );
-            index[1] = (IndexValueType)( it_input.GetIndex()[1] + length * vcl_sin(angle) );
+            index[0] = (IndexValueType)( it_input.GetIndex()[0] + length * std::cos(angle) );
+            index[1] = (IndexValueType)( it_input.GetIndex()[1] + length * std::sin(angle) );
             if ( postProcessImage->GetBufferedRegion().IsInside(index) )
               {
               postProcessImage->SetPixel(index, 0);
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.h
index 34abe97..e8fe1ef 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.h
@@ -100,8 +100,7 @@ public:
    * inform the pipeline execution model.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion()  */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
  /** Enable/Disable using the image spacing information in
    *  calculations. Use this option if you  want derivatives in
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.hxx
index 9e62c85..ccc4d14 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianImageFilter.hxx
@@ -38,7 +38,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 LaplacianImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.h
index e2b94bb..b92ccaf 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.h
@@ -91,8 +91,7 @@ public:
    * execution model.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion()  */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
   /** Enable/Disable using the image spacing information in
    *  calculations. Use this option if you  want derivatives in
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx
index 2ee5016..2315191 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkLaplacianSharpeningImageFilter.hxx
@@ -40,7 +40,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 LaplacianSharpeningImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. This should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx
index 7776d15..460ea1e 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkMaskFeaturePointSelectionFilter.hxx
@@ -149,7 +149,7 @@ MaskFeaturePointSelectionFilter< TImage, TMask, TFeatures >
 
   const TMask * mask = this->GetMaskImage();
 
-  if ( mask == NULL )
+  if ( mask == ITK_NULLPTR )
     {
     // create all 1s selectionMap
     selectionMap->FillBuffer( NumericTraits< MapPixelType >::One );
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.h
index 8202d04..414d74e 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.h
@@ -102,8 +102,7 @@ public:
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion()
    */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
 #ifdef ITK_USE_CONCEPT_CHECKING
   // Begin concept checking
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.hxx
index ec9d731..499059e 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkSobelEdgeDetectionImageFilter.hxx
@@ -31,7 +31,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 SobelEdgeDetectionImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.h
index 4d26a0d..7ea6252 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.h
@@ -103,8 +103,7 @@ public:
    * pipeline execution model.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion()   */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
   /** Set/Get the label value for zero-crossing pixels. */
   itkSetMacro(ForegroundValue, OutputImagePixelType);
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.hxx
index d840371..d9a2ccc 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.hxx
@@ -31,7 +31,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 ZeroCrossingImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/wrapping/itkHessian3DToVesselnessMeasureImageFilter.wrap b/Utilities/ITK/Modules/Filtering/ImageFeature/wrapping/itkHessian3DToVesselnessMeasureImageFilter.wrap
index 3544b0b..fbde315 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/wrapping/itkHessian3DToVesselnessMeasureImageFilter.wrap
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/wrapping/itkHessian3DToVesselnessMeasureImageFilter.wrap
@@ -1,8 +1,9 @@
-itk_wrap_class("itk::Hessian3DToVesselnessMeasureImageFilter" POINTER)
-  itk_wrap_filter_dims(d3 3)
-  if(d3)
+itk_wrap_filter_dims(has_d_3 3)
+
+if(has_d_3)
+  itk_wrap_class("itk::Hessian3DToVesselnessMeasureImageFilter" POINTER)
     foreach(t ${WRAP_ITK_SCALAR})
       itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
     endforeach(t)
-  endif(d3)
-itk_end_wrap_class()
+  itk_end_wrap_class()
+endif(has_d_3)
diff --git a/Utilities/ITK/Modules/Filtering/ImageFeature/wrapping/itkMaskFeaturePointSelectionFilter.wrap b/Utilities/ITK/Modules/Filtering/ImageFeature/wrapping/itkMaskFeaturePointSelectionFilter.wrap
index 3a90ab5..712dc4b 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFeature/wrapping/itkMaskFeaturePointSelectionFilter.wrap
+++ b/Utilities/ITK/Modules/Filtering/ImageFeature/wrapping/itkMaskFeaturePointSelectionFilter.wrap
@@ -1,3 +1,7 @@
-itk_wrap_class("itk::MaskFeaturePointSelectionFilter" POINTER_WITH_2_SUPERCLASSES)
-  itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3)
-itk_end_wrap_class()
+itk_wrap_filter_dims(has_d_3 3)
+
+if(has_d_3)
+  itk_wrap_class("itk::MaskFeaturePointSelectionFilter" POINTER_WITH_2_SUPERCLASSES)
+    itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3)
+  itk_end_wrap_class()
+endif(has_d_3)
diff --git a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx
index 11bbe40..46cca9c 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx
@@ -90,7 +90,7 @@ BinaryFunctorImageFilter< TInputImage1, TInputImage2, TOutputImage, TFunction >
   itkDebugMacro("Getting constant 1");
   const DecoratedInput1ImagePixelType *input = dynamic_cast< const DecoratedInput1ImagePixelType * >(
       this->ProcessObject::GetInput(0) );
-  if( input == NULL )
+  if( input == ITK_NULLPTR )
     {
     itkExceptionMacro(<<"Constant 1 is not set");
     }
@@ -151,7 +151,7 @@ BinaryFunctorImageFilter< TInputImage1, TInputImage2, TOutputImage, TFunction >
   itkDebugMacro("Getting constant 2");
   const DecoratedInput2ImagePixelType *input = dynamic_cast< const DecoratedInput2ImagePixelType * >(
       this->ProcessObject::GetInput(1) );
-  if( input == NULL )
+  if( input == ITK_NULLPTR )
     {
     itkExceptionMacro(<<"Constant 2 is not set");
     }
@@ -165,7 +165,7 @@ void
 BinaryFunctorImageFilter< TInputImage1, TInputImage2, TOutputImage, TFunction >
 ::GenerateOutputInformation()
 {
-  const DataObject * input = NULL;
+  const DataObject * input = ITK_NULLPTR;
   Input1ImagePointer inputPtr1 =
     dynamic_cast< const TInputImage1 * >( ProcessObject::GetInput(0) );
   Input2ImagePointer inputPtr2 =
diff --git a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.h
index 1539563..5bc48ab 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkBoxImageFilter.h
@@ -79,13 +79,13 @@ public:
 
   itkGetConstReferenceMacro(Radius, RadiusType);
 
-  void GenerateInputRequestedRegion();
-
 protected:
   BoxImageFilter();
   ~BoxImageFilter() {}
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void GenerateInputRequestedRegion();
+
+  virtual void PrintSelf(std::ostream & os, Indent indent) const;
 
 private:
   BoxImageFilter(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h
index 82dc69b..fadce0c 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.h
@@ -161,8 +161,7 @@ protected:
    * region is expanded by the radius of the template.  If the request
    * extends past the LargestPossibleRegion for the input, the request
    * is cropped by the LargestPossibleRegion. */
-  void GenerateInputRequestedRegion()
-  throw ( InvalidRequestedRegionError );
+  void GenerateInputRequestedRegion();
 
   /** MaskNeighborhoodOperatorImageFilter can be implemented as a
    * multithreaded filter.  Therefore, this implementation provides a
diff --git a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.hxx
index 0e955c5..9b744f4 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkMaskNeighborhoodOperatorImageFilter.hxx
@@ -46,7 +46,6 @@ template< typename TInputImage, typename TMaskImage, typename TOutputImage, type
 void
 MaskNeighborhoodOperatorImageFilter< TInputImage, TMaskImage, TOutputImage, TOperatorValueType >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
diff --git a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.h
index b558a93..8ebbe25 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.h
@@ -133,8 +133,7 @@ public:
    * execution model.
    *
    * \sa ProcessObject::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw ( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
 #ifdef ITK_USE_CONCEPT_CHECKING
   // Begin concept checking
diff --git a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.hxx
index ca88c6f..8140544 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNeighborhoodOperatorImageFilter.hxx
@@ -32,7 +32,6 @@ template< typename TInputImage, typename TOutputImage, typename TOperatorValueTy
 void
 NeighborhoodOperatorImageFilter< TInputImage, TOutputImage, TOperatorValueType >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.hxx
index b45507e..a312c76 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNoiseImageFilter.hxx
@@ -92,7 +92,7 @@ NoiseImageFilter< TInputImage, TOutputImage >
 
       // calculate the standard deviation value
       var = ( sumOfSquares - ( sum * sum / num ) ) / ( num - 1.0 );
-      it.Set( static_cast< OutputPixelType >( vcl_sqrt(var) ) );
+      it.Set( static_cast< OutputPixelType >( std::sqrt(var) ) );
 
       ++bit;
       ++it;
diff --git a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx
index 5f87ce6..fa141a6 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkNullImageToImageFilterDriver.hxx
@@ -49,7 +49,7 @@ class NullImageToImageFilterDriver
 {
 public:
   NullImageToImageFilterDriver():
-    m_Filter( NULL )
+    m_Filter( ITK_NULLPTR )
     {};
 
   typedef typename TInputImage::SizeType  ImageSizeType;
diff --git a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx
index a83b6da..9a29ed6 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkRecursiveSeparableImageFilter.hxx
@@ -33,14 +33,29 @@ RecursiveSeparableImageFilter< TInputImage, TOutputImage >
   m_N1( 1.0 ),
   m_N2( 1.0 ),
   m_N3( 1.0 ),
-  m_Direction( 0 )
+  m_D1( 0.0 ),
+  m_D2( 0.0 ),
+  m_D3( 0.0 ),
+  m_D4( 0.0 ),
+  m_M1( 0.0 ),
+  m_M2( 0.0 ),
+  m_M3( 0.0 ),
+  m_M4( 0.0 ),
+  m_BN1( 0.0 ),
+  m_BN2( 0.0 ),
+  m_BN3( 0.0 ),
+  m_BN4( 0.0 ),
+  m_BM1( 0.0 ),
+  m_BM2( 0.0 ),
+  m_BM3( 0.0 ),
+  m_BM4( 0.0 ),
+  m_Direction( 0 ),
+  m_ImageRegionSplitter(ImageRegionSplitterDirection::New())
 {
   this->SetNumberOfRequiredOutputs(1);
   this->SetNumberOfRequiredInputs(1);
 
   this->InPlaceOff();
-
-  this->m_ImageRegionSplitter = ImageRegionSplitterDirection::New();
 }
 
 /**
@@ -263,9 +278,9 @@ RecursiveSeparableImageFilter< TInputImage, TOutputImage >
 
   const unsigned int ln = region.GetSize()[this->m_Direction];
 
-  RealType *inps = 0;
-  RealType *outs = 0;
-  RealType *scratch = 0;
+  RealType *inps = ITK_NULLPTR;
+  RealType *outs = ITK_NULLPTR;
+  RealType *scratch = ITK_NULLPTR;
 
   try
     {
diff --git a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.h
index eafdce2..841a344 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.h
@@ -120,8 +120,7 @@ public:
    * execution model.
    *
    * \sa ProcessObject::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw ( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
 #ifdef ITK_USE_CONCEPT_CHECKING
   // Begin concept checking
@@ -133,7 +132,10 @@ public:
 #endif
 
 protected:
-  VectorNeighborhoodOperatorImageFilter() {}
+  VectorNeighborhoodOperatorImageFilter() :
+    m_BoundsCondition(ITK_NULLPTR)
+  {}
+
   virtual ~VectorNeighborhoodOperatorImageFilter() {}
 
   /** VectorNeighborhoodOperatorImageFilter can be implemented as a
diff --git a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.hxx
index 688a8df..d612a82 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFilterBase/include/itkVectorNeighborhoodOperatorImageFilter.hxx
@@ -31,7 +31,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 VectorNeighborhoodOperatorImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h
index 420b08d..e90d6e2 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.h
@@ -174,6 +174,20 @@ public:
   itkSetMacro( SliceDimension, int );
   itkGetConstReferenceMacro( SliceDimension, int );
 
+  /** Set/Get the overlay functor - defaults to a reasonable set of colors.
+   * This can be used to apply a different colormap.
+   */
+  virtual void SetFunctor(const FunctorType & functor)
+  {
+    if ( m_Functor != functor )
+      {
+      m_Functor = functor;
+      this->Modified();
+      }
+  }
+  FunctorType &       GetFunctor() { return m_Functor; }
+  const FunctorType & GetFunctor() const { return m_Functor; }
+
 protected:
   LabelMapContourOverlayImageFilter();
   ~LabelMapContourOverlayImageFilter() {};
@@ -212,6 +226,7 @@ private:
   SizeType                  m_ContourThickness;
   SizeType                  m_DilationRadius;
   int                       m_SliceDimension;
+  FunctorType               m_Functor;
 
   LabelMapPointer           m_TempImage;
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx
index aee2783..5147522 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapContourOverlayImageFilter.hxx
@@ -129,10 +129,9 @@ LabelMapContourOverlayImageFilter<TLabelMap, TFeatureImage, TOutputImage>
   typedef typename SliceKernelType::RadiusType RadiusType;
   RadiusType srad;
   srad.Fill(NumericTraits<typename RadiusType::SizeValueType>::Zero);
-  int j=0;
-  for( int i=0; i<ImageDimension; i++ )
+  for( unsigned int i=0, j=0; i<ImageDimension; i++ )
     {
-    if( j != m_SliceDimension )
+    if( j != static_cast< unsigned int >( m_SliceDimension ) )
       {
       srad[j] = m_ContourThickness[i];
       j++;
@@ -215,7 +214,7 @@ LabelMapContourOverlayImageFilter<TLabelMap, TFeatureImage, TOutputImage>
   LabelMapType * input = const_cast<LabelMapType *>(this->GetInput());
   const FeatureImageType * input2 = this->GetFeatureImage();
 
-  FunctorType function;
+  FunctorType function( m_Functor );
   function.SetBackgroundValue( input->GetBackgroundValue() );
   function.SetOpacity( m_Opacity );
 
@@ -252,7 +251,7 @@ LabelMapContourOverlayImageFilter<TLabelMap, TFeatureImage, TOutputImage>
   LabelMapType * input = const_cast<LabelMapType *>(this->GetInput());
   const FeatureImageType * input2 = this->GetFeatureImage();
 
-  FunctorType function;
+  FunctorType function( m_Functor );
   function.SetBackgroundValue( input->GetBackgroundValue() );
   function.SetOpacity( m_Opacity );
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h
index a6001dd..e35047d 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.h
@@ -132,6 +132,20 @@ public:
   itkSetMacro( Opacity, double );
   itkGetConstReferenceMacro( Opacity, double );
 
+  /** Set/Get the overlay functor - defaults to a reasonable set of colors.
+   * This can be used to apply a different colormap.
+   */
+  virtual void SetFunctor(const FunctorType& functor)
+  {
+    if ( m_Functor != functor )
+      {
+      m_Functor = functor;
+      this->Modified();
+      }
+  }
+  FunctorType &       GetFunctor() { return m_Functor; }
+  const FunctorType & GetFunctor() const { return m_Functor; }
+
 protected:
   LabelMapOverlayImageFilter();
   ~LabelMapOverlayImageFilter() {};
@@ -160,6 +174,7 @@ private:
 
   double                    m_Opacity;
   typename Barrier::Pointer m_Barrier;
+  FunctorType               m_Functor;
 
 }; // end of class
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.hxx
index f004480..3a19d72 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapOverlayImageFilter.hxx
@@ -91,7 +91,7 @@ LabelMapOverlayImageFilter<TLabelMap, TFeatureImage, TOutputImage>
   LabelMapType * input = const_cast<LabelMapType *>(this->GetInput());
   const FeatureImageType * input2 = this->GetFeatureImage();
 
-  FunctorType function;
+  FunctorType function( m_Functor );
   function.SetBackgroundValue( input->GetBackgroundValue() );
   function.SetOpacity( m_Opacity );
 
@@ -127,7 +127,7 @@ LabelMapOverlayImageFilter<TLabelMap, TFeatureImage, TOutputImage>
   LabelMapType * input = const_cast<LabelMapType *>(this->GetInput());
   const FeatureImageType * input2 = this->GetFeatureImage();
 
-  FunctorType function;
+  FunctorType function( m_Functor );
   function.SetBackgroundValue( input->GetBackgroundValue() );
   function.SetOpacity( m_Opacity );
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.hxx
index ae5e351..9c72c5e 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelMapToRGBImageFilter.hxx
@@ -56,8 +56,6 @@ LabelMapToRGBImageFilter<TInputImage, TOutputImage>
 {
   const typename LabelObjectType::LabelType & label = labelObject->GetLabel();
 
-  typedef typename LabelObjectType::LengthType  LengthType;
-
   FunctorType function;
   function.SetBackgroundValue( this->GetInput()->GetBackgroundValue() );
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelOverlayFunctor.h b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelOverlayFunctor.h
index 21525c7..9c0b9fe 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelOverlayFunctor.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelOverlayFunctor.h
@@ -52,6 +52,7 @@ public:
     // provide some default value for external use (outside
     // LabelOverlayFunctorImageFilter) Inside LabelOverlayFunctorImageFilter,
     // the values are always initialized
+    m_Opacity = 1.0;
     m_BackgroundValue = NumericTraits< TLabel >::Zero;
   }
 
@@ -87,10 +88,15 @@ public:
 
   bool operator!=(const LabelOverlayFunctor & l) const
   {
-    bool value = l.m_Opacity != m_Opacity
-                 || m_BackgroundValue != l.m_BackgroundValue;
+    bool areDifferent = l.m_Opacity != m_Opacity
+                        || l.m_BackgroundValue != m_BackgroundValue
+                        || l.m_RGBFunctor != m_RGBFunctor;
+    return areDifferent;
+  }
 
-    return value;
+  bool operator==(const LabelOverlayFunctor & l) const
+  {
+    return !(*this != l);
   }
 
   ~LabelOverlayFunctor() {}
diff --git a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h
index 93b8797..be0e181 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h
+++ b/Utilities/ITK/Modules/Filtering/ImageFusion/include/itkLabelToRGBFunctor.h
@@ -55,8 +55,6 @@ public:
 
   LabelToRGBFunctor()
   {
-    TRGBPixel rgbPixel;
-
     typedef typename TRGBPixel::ValueType ValueType;
 
     // the following colors are from "R", and named:
@@ -152,10 +150,22 @@ public:
 
   bool operator!=(const Self & l) const
   {
-    const bool areDifferent = m_BackgroundColor != l.m_BackgroundColor
-                              || m_BackgroundValue != l.m_BackgroundValue;
+    if ( m_BackgroundColor != l.m_BackgroundColor
+         || m_BackgroundValue != l.m_BackgroundValue
+         || m_Colors.size() != l.m_Colors.size() )
+      {
+      return true;
+      }
 
-    return areDifferent;
+    // We need to check each color to see if it's different
+    for ( typename std::vector< TRGBPixel >::size_type i = 0; i < m_Colors.size(); ++i )
+      {
+      if ( m_Colors[i] != l.m_Colors[i] )
+        {
+        return true;
+        }
+      }
+    return false;
   }
 
   bool operator==(const Self & other) const
diff --git a/Utilities/ITK/Modules/Filtering/ImageFusion/wrapping/CMakeLists.txt b/Utilities/ITK/Modules/Filtering/ImageFusion/wrapping/CMakeLists.txt
index 7bd8f98..ff6ec64 100644
--- a/Utilities/ITK/Modules/Filtering/ImageFusion/wrapping/CMakeLists.txt
+++ b/Utilities/ITK/Modules/Filtering/ImageFusion/wrapping/CMakeLists.txt
@@ -1,3 +1,14 @@
 itk_wrap_module(ITKImageFusion)
+
+# Save default includes so they can be reseted afterwards
+set(tmp_default_includes ${WRAPPER_DEFAULT_INCLUDE})
+
+# Add itkStatisticsLabelObject.h, it is not automatically detected
+# (but it maybe should)
+set(WRAPPER_DEFAULT_INCLUDE ${WRAPPER_DEFAULT_INCLUDE} "itkStatisticsLabelObject.h")
+
 itk_auto_load_submodules()
 itk_end_wrap_module()
+
+# Reset the WRAPPER_DEFAULT_INCLUDE to original value
+set(WRAPPER_DEFAULT_INCLUDE ${tmp_default_includes})
diff --git a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h
index ff00359..8cfd1ea 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.h
@@ -103,8 +103,7 @@ public:
    * in order to inform the pipeline execution model.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
   /** Use the image spacing information in calculations. Use this option if you
    *  want derivatives in physical space. Default is UseImageSpacingOn. */
@@ -170,8 +169,8 @@ private:
 
   // An overloaded method which may transform the gradient to a
   // physical vector and converts to the correct output pixel type.
-  template <typename TValueType>
-  void SetOutputPixel( ImageRegionIterator< VectorImage<TValueType,OutputImageDimension> > &it, CovariantVectorType &gradient )
+  template <typename TValue>
+  void SetOutputPixel( ImageRegionIterator< VectorImage<TValue,OutputImageDimension> > &it, CovariantVectorType &gradient )
   {
     if ( this->m_UseImageDirection )
       {
diff --git a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx
index 3ac9d07..29fc4f7 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientImageFilter.hxx
@@ -52,7 +52,6 @@ template< typename TInputImage, typename TOperatorValueType, typename TOutputVal
 void
 GradientImageFilter< TInputImage, TOperatorValueType, TOutputValueType, TOutputImageType >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
diff --git a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.h
index b287b7d..4b300d9 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.h
@@ -82,8 +82,7 @@ public:
    * pipeline execution model.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
   /** Use the image spacing information in calculations. Use this option if you
    *  want derivatives in physical space. Default is UseImageSpacingOn. */
diff --git a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx
index 9186ecf..abcca42 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeImageFilter.hxx
@@ -41,7 +41,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 GradientMagnitudeImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
@@ -185,7 +184,7 @@ GradientMagnitudeImageFilter< TInputImage, TOutputImage >
         const RealType g = SIP(x_slice[i], bit, op[i]);
         a += g * g;
         }
-      it.Value() = static_cast< OutputPixelType >( vcl_sqrt(a) );
+      it.Value() = static_cast< OutputPixelType >( std::sqrt(a) );
       ++bit;
       ++it;
       progress.CompletedPixel();
diff --git a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h
index 2ead44b..618d33a 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.h
@@ -154,8 +154,7 @@ protected:
    * implementation for GenerateInputRequestedRegion in order to
    * inform the pipeline execution model.  \sa
    * ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
   /** GradientMagnitudeRecursiveGaussianImageFilter produces all of
    * the output.  Therefore, it needs to provide an implementation of
diff --git a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx
index 1e6f142..8bc9f9a 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx
@@ -149,7 +149,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 GradientMagnitudeRecursiveGaussianImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h
index 8c03d1f..2defe26 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.h
@@ -148,8 +148,7 @@ public:
    * an implementation for GenerateInputRequestedRegion in order to inform
    * the pipeline execution model.
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
   /** The UseImageDirection flag determines whether the gradients are
    * computed with respect to the image grid or with respect to the physical
@@ -187,8 +186,8 @@ protected:
 
 private:
 
-  template <typename TValueType>
-  void TransformOutputPixel( ImageRegionIterator< VectorImage<TValueType, ImageDimension> > &it )
+  template <typename TValue>
+  void TransformOutputPixel( ImageRegionIterator< VectorImage<TValue, ImageDimension> > &it )
   {
     // To transform Variable length vector we need to convert to and
     // fro the CovariantVectorType
@@ -220,8 +219,8 @@ private:
         DefaultConvertPixelTraits<OutputPixelType>::SetNthComponent( nc*ImageDimension+dim, correctedGradient,
                                                                      correctedComponentGradient[dim] );
         }
-      it.Set(correctedGradient);
       }
+    it.Set(correctedGradient);
   }
 
   template <template<typename, unsigned int> class P, class T, unsigned int N>
diff --git a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx
index 81e4877..e678ed8 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx
@@ -131,7 +131,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 GradientRecursiveGaussianImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h
index 82319da..5ffae2a 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.h
@@ -194,8 +194,7 @@ public:
    * pipeline execution model.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
   /** Set the derivative weights according to the spacing of the input image
       (1/spacing). Use this option if you want to calculate the gradient in the
@@ -309,7 +308,7 @@ protected:
         }
       accum += sum;
       }
-    return vcl_sqrt(accum);
+    return std::sqrt(accum);
   }
 
   TRealType EvaluateAtNeighborhood3D(const ConstNeighborhoodIteratorType & it) const
diff --git a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx
index 1e3eb5f..9e91414 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx
@@ -107,7 +107,6 @@ template< typename TInputImage, typename TRealType, typename TOutputImage >
 void
 VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
@@ -167,7 +166,7 @@ VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >
       {
       itkExceptionMacro(<< "Component weights must be positive numbers");
       }
-    m_SqrtComponentWeights[i] = vcl_sqrt(m_ComponentWeights[i]);
+    m_SqrtComponentWeights[i] = std::sqrt(m_ComponentWeights[i]);
     }
 
   // Set the weights on the derivatives.
@@ -308,12 +307,12 @@ VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >
 
   if ( D < -epsilon ) // D < 0, three real solutions, by far the common case.
     {
-    double phi = 1.0 / 3.0 * vcl_acos( -q / vcl_sqrt(-cb_p) );
-    double t = 2.0 * vcl_sqrt(-p);
+    double phi = 1.0 / 3.0 * std::acos( -q / std::sqrt(-cb_p) );
+    double t = 2.0 * std::sqrt(-p);
 
-    s[0] =   t * vcl_cos(phi);
-    s[1] = -t *vcl_cos(phi + dpi / 3);
-    s[2] = -t *vcl_cos(phi - dpi / 3);
+    s[0] =   t * std::cos(phi);
+    s[1] = -t *std::cos(phi + dpi / 3);
+    s[2] = -t *std::cos(phi - dpi / 3);
     num = 3;
     }
 
@@ -335,7 +334,7 @@ VectorGradientMagnitudeImageFilter< TInputImage, TRealType, TOutputImage >
   else // Only one real solution. This case misses a double root on rare
        // occasions with very large char eqn coefficients.
     {
-    double sqrt_D = vcl_sqrt(D);
+    double sqrt_D = std::sqrt(D);
     double u = vnl_math_cuberoot(sqrt_D - q);
     double v = -vnl_math_cuberoot(sqrt_D + q);
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.hxx
index d82415a..f622e51 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineCenteredResampleImageFilterBase.hxx
@@ -349,7 +349,7 @@ void BSplineCenteredResampleImageFilterBase< TInputImage, TOutputImage >
     outVal2 = 0;
     for ( IndexValueType k = -k0; k < this->m_HSize; k += 2L )
       {
-      IndexValueType kk = vcl_abs( static_cast< int >( k ) );
+      IndexValueType kk = std::abs( static_cast< int >( k ) );
       i1 = inK + ( k + 1L ) / 2L;
       if ( i1 < 0L )
         {
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx
index a04ff5b..53132f2 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx
@@ -67,7 +67,7 @@ BSplineControlPointImageFilter<InputImage, TOutputImage>
   this->m_NumberOfLevels.Fill( 1 );
   this->m_CloseDimension.Fill( 0 );
 
-  this->m_BSplineEpsilon = vcl_numeric_limits<RealType>::epsilon();
+  this->m_BSplineEpsilon = std::numeric_limits<RealType>::epsilon();
 }
 
 template<typename InputImage, typename TOutputImage>
@@ -158,7 +158,7 @@ BSplineControlPointImageFilter<TInputPointImage, TOutputImage>
         }
       for( unsigned int j = 0; j < C.cols(); j++ )
         {
-        RealType c = vcl_pow( static_cast<RealType>( 2.0 ),
+        RealType c = std::pow( static_cast<RealType>( 2.0 ),
                               static_cast<RealType>( C.cols()-j-1 ) );
         for( unsigned int k = 0; k < C.rows(); k++)
           {
@@ -206,7 +206,7 @@ BSplineControlPointImageFilter<InputImage, TOutputImage>
       maximumNumberOfSpans = numberOfSpans;
       }
     }
-  this->m_BSplineEpsilon = 100 * vcl_numeric_limits<RealType>::epsilon();
+  this->m_BSplineEpsilon = 100 * std::numeric_limits<RealType>::epsilon();
   while( static_cast<RealType>( maximumNumberOfSpans ) ==
     static_cast<RealType>( maximumNumberOfSpans ) - this->m_BSplineEpsilon )
     {
@@ -397,9 +397,9 @@ BSplineControlPointImageFilter<TInputImage, TOutputImage>
 
   // determine the actual number of pieces that will be generated
   typename SizeType::SizeValueType range = requestedRegionSize[splitAxis];
-  unsigned int valuesPerThread = static_cast<unsigned int>( vcl_ceil(
+  unsigned int valuesPerThread = static_cast<unsigned int>( std::ceil(
     range / static_cast<double>( num ) ) );
-  unsigned int maxThreadIdUsed = static_cast<unsigned int>( vcl_ceil(
+  unsigned int maxThreadIdUsed = static_cast<unsigned int>( std::ceil(
     range / static_cast<double>( valuesPerThread ) ) - 1 );
 
   // Split the region
@@ -638,7 +638,7 @@ BSplineControlPointImageFilter<InputImage, TOutputImage>
   Superclass::PrintSelf( os, indent );
   for( unsigned int i = 0; i < ImageDimension; i++ )
     {
-    this->m_Kernel[i]->Print( os, indent );
+    this->m_Kernel[i]->Print( os, indent.GetNextIndent() );
     }
   os << indent << "Spline order: " << this->m_SplineOrder << std::endl;
   os << indent << "Close dimension: " << this->m_CloseDimension << std::endl;
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx
index 5634b54..f3ccdbb 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx
@@ -47,9 +47,9 @@ BSplineControlPointImageFunction<TInputImage, TCoordRep>
 
   this->m_CloseDimension.Fill( 0 );
 
-  this->m_NeighborhoodWeightImage = NULL;
+  this->m_NeighborhoodWeightImage = ITK_NULLPTR;
 
-  this->m_BSplineEpsilon = vcl_numeric_limits<CoordRepType>::epsilon();
+  this->m_BSplineEpsilon = std::numeric_limits<CoordRepType>::epsilon();
 }
 
 template<typename TInputImage, typename TCoordRep>
@@ -114,7 +114,7 @@ BSplineControlPointImageFunction<TInputImage, TCoordRep>
       maximumNumberOfSpans = numberOfSpans;
       }
     }
-  this->m_BSplineEpsilon = 100 * vcl_numeric_limits<CoordRepType>::epsilon();
+  this->m_BSplineEpsilon = 100 * std::numeric_limits<CoordRepType>::epsilon();
   while( static_cast<CoordRepType>( maximumNumberOfSpans ) ==
     static_cast<CoordRepType>( maximumNumberOfSpans ) - this->m_BSplineEpsilon )
     {
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx
index 3f77eb0..139d6a1 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx
@@ -152,8 +152,8 @@ BSplineDownsampleImageFilter< TInputImage, TOutputImage, ResamplerType >
     //TODO:  Verify this is being rounded correctly.
     outputSpacing[i] = inputSpacing[i] * (double)2;
     //TODO:  Verify this is being rounded correctly.
-    outputSize[i] = (unsigned int)vcl_floor( (double)( inputSize[i] / 2.0 ) );
-    outputStartIndex[i] = (int)vcl_ceil( (double)inputStartIndex[i] / 2.0 );
+    outputSize[i] = (unsigned int)std::floor( (double)( inputSize[i] / 2.0 ) );
+    outputStartIndex[i] = (int)std::ceil( (double)inputStartIndex[i] / 2.0 );
     }
 
   outputPtr->SetSpacing(outputSpacing);
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.hxx
index 734d517..47d1cbb 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.hxx
@@ -250,7 +250,10 @@ void BSplineResampleImageFilterBase< TInputImage, TOutputImage >
           }
         if ( i2 > (int)inModK )
           {
-          i2 = i2 % inModK;
+          if (inModK)
+            {
+            i2 = i2 % inModK;
+            }
           // Removed because i1 can never be greater than inModK, right?
           //if (i2 > inModK)
           //i2=inModK-i2;  //TODO: I don't think this is correct.
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.hxx
index cc03803..01d07e3 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineScatteredDataPointSetToImageFilter.hxx
@@ -66,7 +66,7 @@ BSplineScatteredDataPointSetToImageFilter<TInputPointSet, TOutputImage>
   this->m_NumberOfLevels.Fill( 1 );
   this->m_MaximumNumberOfLevels = 1;
 
-  this->m_PhiLattice = NULL;
+  this->m_PhiLattice = ITK_NULLPTR;
   this->m_PsiLattice = PointDataImageType::New();
   this->m_InputPointData = PointDataContainerType::New();
   this->m_OutputPointData = PointDataContainerType::New();
@@ -74,9 +74,10 @@ BSplineScatteredDataPointSetToImageFilter<TInputPointSet, TOutputImage>
   this->m_PointWeights = WeightsContainerType::New();
   this->m_UsePointWeights = false;
 
-  this->m_BSplineEpsilon = vcl_numeric_limits<RealType>::epsilon();
+  this->m_BSplineEpsilon = std::numeric_limits<RealType>::epsilon();
 
   this->m_IsFittingComplete = false;
+  this->m_CurrentLevel = 0;
 }
 
 template<typename TInputPointSet, typename TOutputImage>
@@ -130,7 +131,7 @@ BSplineScatteredDataPointSetToImageFilter<TInputPointSet, TOutputImage>
         }
       for( unsigned int j = 0; j < C.cols(); j++ )
         {
-        RealType c = vcl_pow( static_cast<RealType>( 2.0 ),
+        RealType c = std::pow( static_cast<RealType>( 2.0 ),
           static_cast<RealType>( C.cols() ) - j - 1 );
 
         for( unsigned int k = 0; k < C.rows(); k++ )
@@ -268,7 +269,7 @@ BSplineScatteredDataPointSetToImageFilter<TInputPointSet, TOutputImage>
       maximumNumberOfSpans = numberOfSpans;
       }
     }
-  this->m_BSplineEpsilon = 100 * vcl_numeric_limits<RealType>::epsilon();
+  this->m_BSplineEpsilon = 100 * std::numeric_limits<RealType>::epsilon();
   while( static_cast<RealType>( maximumNumberOfSpans ) ==
     static_cast<RealType>( maximumNumberOfSpans ) - this->m_BSplineEpsilon )
     {
@@ -511,9 +512,9 @@ BSplineScatteredDataPointSetToImageFilter<TInputPointSet, TOutputImage>
 
     // determine the actual number of pieces that will be generated
     typename SizeType::SizeValueType range = requestedRegionSize[splitAxis];
-    unsigned int valuesPerThread = static_cast<unsigned int>( vcl_ceil(
+    unsigned int valuesPerThread = static_cast<unsigned int>( std::ceil(
       range / static_cast<double>( num ) ) );
-    unsigned int maxThreadIdUsed = static_cast<unsigned int>( vcl_ceil(
+    unsigned int maxThreadIdUsed = static_cast<unsigned int>( std::ceil(
       range / static_cast<double>( valuesPerThread ) ) - 1 );
 
     // Split the region
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx
index fa05ce7..40d77ee 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx
@@ -164,8 +164,8 @@ BSplineUpsampleImageFilter< TInputImage, TOutputImage, ResamplerType >
     //TODO:  Verify this is being rounded correctly.
     outputSpacing[i] = inputSpacing[i] / (double)2;
     //TODO:  Verify this is being rounded correctly.
-    outputSize[i] = (unsigned int)vcl_floor( (double)( inputSize[i] * 2.0 ) );
-    outputStartIndex[i] = (int)vcl_ceil( (double)inputStartIndex[i] * 2.0 );
+    outputSize[i] = (unsigned int)std::floor( (double)( inputSize[i] * 2.0 ) );
+    outputStartIndex[i] = (int)std::ceil( (double)inputStartIndex[i] * 2.0 );
     }
 
   outputPtr->SetSpacing(outputSpacing);
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h
index fe6383f..cf46fca 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.h
@@ -32,7 +32,7 @@ namespace itk
  *
  * The output image size in each dimension is given by:
  *
- * outputSize[j] = max( vcl_floor(inputSize[j]/shrinkFactor[j]), 1 );
+ * outputSize[j] = max( std::floor(inputSize[j]/shrinkFactor[j]), 1 );
  *
  * The algorithm implemented can be describe with the following
  * equation for 2D:
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx
index 5aa266a..801cc45 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkBinShrinkImageFilter.hxx
@@ -142,7 +142,7 @@ BinShrinkImageFilter<TInputImage,TOutputImage>
 
   // allocate acumulate line
   const size_t         ln =  outputRegionForThread.GetSize(0);
-  AccumulatePixelType *accBuffer = 0;
+  AccumulatePixelType *accBuffer = ITK_NULLPTR;
   accBuffer = new AccumulatePixelType[ln];
 
   try
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx
index a962064..8b64b94 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx
@@ -32,7 +32,7 @@ template< typename TInputImage >
 ChangeInformationImageFilter< TInputImage >
 ::ChangeInformationImageFilter()
 {
-  m_ReferenceImage = 0;
+  m_ReferenceImage = ITK_NULLPTR;
 
   m_ChangeSpacing = false;
   m_ChangeOrigin = false;
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.hxx
index 4cc6436..033d723 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkConstantPadImageFilter.hxx
@@ -31,7 +31,7 @@ template< typename TInputImage, typename TOutputImage >
 ConstantPadImageFilter< TInputImage, TOutputImage >
 ::ConstantPadImageFilter()
 {
-  m_InternalBoundaryCondition.SetConstant( NumericTraits< OutputImagePixelType >::Zero );
+  m_InternalBoundaryCondition.SetConstant( NumericTraits< OutputImagePixelType >::ZeroValue() );
   this->InternalSetBoundaryCondition( &m_InternalBoundaryCondition );
 }
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx
index d02986c..f5a88b7 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkExpandImageFilter.hxx
@@ -221,11 +221,11 @@ ExpandImageFilter< TInputImage, TOutputImage >
   for ( i = 0; i < TInputImage::ImageDimension; i++ )
     {
     inputRequestedRegionSize[i] =
-      (SizeValueType)vcl_ceil( (double)outputRequestedRegionSize[i]
+      (SizeValueType)std::ceil( (double)outputRequestedRegionSize[i]
                       / (double)m_ExpandFactors[i] ) + 1;
 
     inputRequestedRegionStartIndex[i] =
-      (SizeValueType)vcl_floor( (double)outputRequestedRegionStartIndex[i]
+      (SizeValueType)std::floor( (double)outputRequestedRegionStartIndex[i]
                        / (double)m_ExpandFactors[i] );
     }
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx
index f76c766..6bae701 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx
@@ -46,7 +46,7 @@ InterpolateImageFilter< TInputImage, TOutputImage >
   // Set default distance to 0,5
   m_Distance = 0.5;
 
-  m_IntermediateImage = NULL;
+  m_IntermediateImage = ITK_NULLPTR;
 }
 
 /**
@@ -164,7 +164,7 @@ InterpolateImageFilter< TInputImage, TOutputImage >
 ::AfterThreadedGenerateData()
 {
   // Clean up intermediate memory usage
-  m_IntermediateImage = NULL;
+  m_IntermediateImage = ITK_NULLPTR;
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkPadImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkPadImageFilter.hxx
index de35ad3..5aa93ba 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkPadImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkPadImageFilter.hxx
@@ -41,7 +41,7 @@ PadImageFilter< TInputImage, TOutputImage >
     m_PadUpperBound[j] = 0;
     }
 
-  m_BoundaryCondition = NULL;
+  m_BoundaryCondition = ITK_NULLPTR;
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h
index 8b30fa7..95f2ebf 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h
@@ -26,6 +26,8 @@
 #include "itkLinearInterpolateImageFunction.h"
 #include "itkSize.h"
 #include "itkDefaultConvertPixelTraits.h"
+#include "itkDataObjectDecorator.h"
+
 
 namespace itk
 {
@@ -121,8 +123,11 @@ public:
    */
   typedef Transform< TTransformPrecisionType,
                      itkGetStaticConstMacro(ImageDimension),
-                     itkGetStaticConstMacro(ImageDimension) >       TransformType;
-  typedef typename TransformType::ConstPointer TransformPointerType;
+                     itkGetStaticConstMacro(ImageDimension) >   TransformType;
+  typedef typename TransformType::ConstPointer                  TransformPointerType;
+  typedef DataObjectDecorator<TransformType>                    DecoratedTransformType;
+  typedef typename DecoratedTransformType::Pointer              DecoratedTransformPointer;
+
 
   /** Interpolator typedef. */
   typedef InterpolateImageFunction< InputImageType,
@@ -185,8 +190,7 @@ public:
    * the filter uses an Identity transform. You must provide a different
    * transform here, before attempting to run the filter, if you do not want to
    * use the default Identity transform. */
-  itkSetConstObjectMacro(Transform, TransformType);
-  itkGetConstObjectMacro(Transform, TransformType);
+   itkSetGetDecoratedObjectInputMacro(Transform, TransformType);
 
   /** Get/Set the interpolator function.  The default is
    * LinearInterpolateImageFunction<InputImageType,
@@ -247,10 +251,10 @@ public:
     *  this method can be used to specify an image from which to
     *  copy the information. UseReferenceImageOn must be set to utilize the
     *  reference image. */
-  void SetReferenceImage(const ReferenceImageBaseType *image);
+  itkSetInputMacro(ReferenceImage, ReferenceImageBaseType);
 
   /** Get the reference image that is defining the output information. */
-  const ReferenceImageBaseType * GetReferenceImage() const;
+  itkGetInputMacro(ReferenceImage, ReferenceImageBaseType);
 
   /** Turn on/off whether a specified reference image should be used to define
    *  the output information. */
@@ -338,7 +342,6 @@ private:
   void operator=(const Self &);      //purposely not implemented
 
   SizeType                m_Size;         // Size of the output image
-  TransformPointerType    m_Transform;    // Transform
   InterpolatorPointerType m_Interpolator; // Image function for
                                           // interpolation
   ExtrapolatorPointerType m_Extrapolator; // Image function for
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx
index 86f26d3..d2ed52e 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx
@@ -48,13 +48,23 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
   m_Size.Fill(0);
   m_OutputStartIndex.Fill(0);
 
-  m_Transform =
-    IdentityTransform< TTransformPrecisionType, ImageDimension >::New();
+  // Pipeline input configuration
+
+  // implicit:
+  // #0 "Primary" required
+
+  //  #1 "ReferenceImage" optional
+  Self::AddRequiredInputName("ReferenceImage",1);
+  Self::RemoveRequiredInputName("ReferenceImage");
+
+  //   "Transform" required ( not numbered )
+  Self::AddRequiredInputName("Transform");
+  Self::SetTransform(IdentityTransform< TTransformPrecisionType, ImageDimension >::New());
 
   m_Interpolator = dynamic_cast< InterpolatorType * >
     ( LinearInterpolatorType::New().GetPointer() );
 
-  m_Extrapolator = NULL;
+  m_Extrapolator = ITK_NULLPTR;
 
   m_DefaultPixelValue
     = NumericTraits<PixelType>::ZeroValue( m_DefaultPixelValue );
@@ -84,7 +94,7 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
   os << indent << "OutputSpacing: " << m_OutputSpacing << std::endl;
   os << indent << "OutputOrigin: " << m_OutputOrigin << std::endl;
   os << indent << "OutputDirection: " << m_OutputDirection << std::endl;
-  os << indent << "Transform: " << m_Transform.GetPointer() << std::endl;
+  os << indent << "Transform: " << this->GetTransform() << std::endl;
   os << indent << "Interpolator: " << m_Interpolator.GetPointer() << std::endl;
   os << indent << "Extrapolator: " << m_Extrapolator.GetPointer() << std::endl;
   os << indent << "UseReferenceImage: " << ( m_UseReferenceImage ? "On" : "Off" )
@@ -155,10 +165,6 @@ void
 ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType >
 ::BeforeThreadedGenerateData()
 {
-  if ( !m_Transform )
-    {
-    itkExceptionMacro(<< "Transform not set");
-    }
 
   if ( !m_Interpolator )
     {
@@ -204,11 +210,11 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
 ::AfterThreadedGenerateData()
 {
   // Disconnect input image from the interpolator
-  m_Interpolator->SetInputImage(NULL);
+  m_Interpolator->SetInputImage(ITK_NULLPTR);
   if( !m_Extrapolator.IsNull() )
     {
     // Disconnect input image from the extrapolator
-    m_Extrapolator->SetInputImage(NULL);
+    m_Extrapolator->SetInputImage(ITK_NULLPTR);
     }
 }
 
@@ -243,7 +249,7 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
   // Check whether we can use a fast path for resampling. Fast path
   // can be used if the transformation is linear. Transform respond
   // to the IsLinear() call.
-  if ( this->m_Transform->GetTransformCategory() == TransformType::Linear )
+  if ( this->GetTransform()->GetTransformCategory() == TransformType::Linear )
     {
     this->LinearThreadedGenerateData(outputRegionForThread, threadId);
     return;
@@ -309,10 +315,14 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
                                 ThreadIdType threadId)
 {
   // Get the output pointers
-  OutputImagePointer outputPtr = this->GetOutput();
+  OutputImageType *outputPtr = this->GetOutput();
 
   // Get this input pointers
-  InputImageConstPointer inputPtr = this->GetInput();
+  const InputImageType *inputPtr = this->GetInput();
+
+  // Get the input transform
+  const TransformType *transformPtr = this->GetTransform();
+
 
   // Create an iterator that will walk the output region for this thread.
   typedef ImageRegionIteratorWithIndex< TOutputImage > OutputIterator;
@@ -348,7 +358,7 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
     outputPtr->TransformIndexToPhysicalPoint(outIt.GetIndex(), outputPoint);
 
     // Compute corresponding input pixel position
-    inputPoint = this->m_Transform->TransformPoint(outputPoint);
+    inputPoint = transformPtr->TransformPoint(outputPoint);
     inputPtr->TransformPhysicalPointToContinuousIndex(inputPoint, inputIndex);
 
     PixelType  pixval;
@@ -393,10 +403,13 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
                              ThreadIdType threadId)
 {
   // Get the output pointers
-  OutputImagePointer outputPtr = this->GetOutput();
+  OutputImageType *outputPtr = this->GetOutput();
 
   // Get this input pointers
-  InputImageConstPointer inputPtr = this->GetInput();
+  const InputImageType *inputPtr = this->GetInput();
+
+  // Get the input transform
+  const TransformType *transformPtr = this->GetTransform();
 
   // Create an iterator that will walk the output region for this thread.
   typedef ImageLinearIteratorWithIndex< TOutputImage > OutputIterator;
@@ -443,7 +456,7 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
   outputPtr->TransformIndexToPhysicalPoint(index, outputPoint);
 
   // Compute corresponding input pixel position
-  inputPoint = this->m_Transform->TransformPoint(outputPoint);
+  inputPoint = transformPtr->TransformPoint(outputPoint);
   inputPtr->TransformPhysicalPointToContinuousIndex(inputPoint, inputIndex);
 
   // As we walk across a scan line in the output image, we trace
@@ -464,7 +477,7 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
   //
   ++index[0];
   outputPtr->TransformIndexToPhysicalPoint(index, tmpOutputPoint);
-  tmpInputPoint = this->m_Transform->TransformPoint(tmpOutputPoint);
+  tmpInputPoint = transformPtr->TransformPoint(tmpOutputPoint);
   inputPtr->TransformPhysicalPointToContinuousIndex(tmpInputPoint,
                                                     tmpInputIndex);
   delta = tmpInputIndex - inputIndex;
@@ -481,7 +494,7 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
 
     // Compute corresponding input pixel continuous index, this index
     // will incremented in the scanline loop
-    inputPoint = this->m_Transform->TransformPoint(outputPoint);
+    inputPoint = transformPtr->TransformPoint(outputPoint);
     inputPtr->TransformPhysicalPointToContinuousIndex(inputPoint, inputIndex);
 
     while ( !outIt.IsAtEndOfLine() )
@@ -549,47 +562,6 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
 }
 
 /**
- * Get the reference image that will provide the grid parameters for the output image.
- */
-template< typename TInputImage,
-          typename TOutputImage,
-          typename TInterpolatorPrecisionType,
-          typename TTransformPrecisionType >
-const typename ResampleImageFilter< TInputImage,
-                                    TOutputImage,
-                                    TInterpolatorPrecisionType,
-                                    TTransformPrecisionType >
-::ReferenceImageBaseType *
-ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType >
-::GetReferenceImage() const
-{
-  Self *                 surrogate = const_cast< Self * >( this );
-  const ReferenceImageBaseType *referenceImage =
-    static_cast< const ReferenceImageBaseType * >( surrogate->ProcessObject::GetInput(1) );
-
-  return referenceImage;
-}
-
-/**
- * Set the reference image that will provide the grid parameters for the output image.
- */
-template< typename TInputImage,
-          typename TOutputImage,
-          typename TInterpolatorPrecisionType,
-          typename TTransformPrecisionType >
-void
-ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTransformPrecisionType >
-::SetReferenceImage(const ReferenceImageBaseType *image)
-{
-  itkDebugMacro("setting input ReferenceImage to " << image);
-  if ( image != static_cast< const ReferenceImageBaseType * >( this->ProcessObject::GetInput(1) ) )
-    {
-    this->ProcessObject::SetNthInput( 1, const_cast< ReferenceImageBaseType * >( image ) );
-    this->Modified();
-    }
-}
-
-/**
  * Inform pipeline of required output region
  */
 template< typename TInputImage,
@@ -604,7 +576,7 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
   Superclass::GenerateOutputInformation();
 
   // get pointers to the input and output
-  OutputImagePointer outputPtr = this->GetOutput();
+  OutputImageType *outputPtr = this->GetOutput();
   if ( !outputPtr )
     {
     return;
@@ -654,14 +626,6 @@ ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType, TTra
 {
   ModifiedTimeType latestTime = Object::GetMTime();
 
-  if ( m_Transform )
-    {
-    if ( latestTime < m_Transform->GetMTime() )
-      {
-      latestTime = m_Transform->GetMTime();
-      }
-    }
-
   if ( m_Interpolator )
     {
     if ( latestTime < m_Interpolator->GetMTime() )
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.h
index 392ac35..cf8bd7e 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.h
@@ -40,7 +40,7 @@ namespace itk
  * in each dimension. The algorithm implemented is a simple subsample.
  * The output image size in each dimension is given by:
  *
- * outputSize[j] = max( vcl_floor(inputSize[j]/shrinkFactor[j]), 1 );
+ * outputSize[j] = max( std::floor(inputSize[j]/shrinkFactor[j]), 1 );
  *
  * NOTE: The physical centers of the input and output will be the
  * same. Because of this, the Origin of the output may not be the same
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx
index ee78866..b7d4317 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkShrinkImageFilter.hxx
@@ -311,7 +311,7 @@ ShrinkImageFilter< TInputImage, TOutputImage >
 
     // Round down so that all output pixels fit input input region
     outputSize[i] = static_cast<SizeValueType>(
-      vcl_floor( (double)inputSize[i] / (double)m_ShrinkFactors[i] ) );
+      std::floor( (double)inputSize[i] / (double)m_ShrinkFactors[i] ) );
 
     if ( outputSize[i] < 1 )
       {
@@ -321,7 +321,7 @@ ShrinkImageFilter< TInputImage, TOutputImage >
     // Because of the later origin shift this starting index is not
     // critical
     outputStartIndex[i] = static_cast<IndexValueType>(
-      vcl_ceil( (double)inputStartIndex[i] / (double)m_ShrinkFactors[i] ) );
+      std::ceil( (double)inputStartIndex[i] / (double)m_ShrinkFactors[i] ) );
     }
 
   outputPtr->SetSpacing(outputSpacing);
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx
index f86ba07..91ff4ec 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkSliceBySliceImageFilter.hxx
@@ -30,8 +30,8 @@ SliceBySliceImageFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter,
                          TInternalOutputImageType >
 ::SliceBySliceImageFilter()
 {
-  m_InputFilter = NULL;
-  m_OutputFilter = NULL;
+  m_InputFilter = ITK_NULLPTR;
+  m_OutputFilter = ITK_NULLPTR;
   this->m_Dimension = ImageDimension - 1;
   m_SliceIndex = 0;
 }
@@ -113,7 +113,7 @@ SliceBySliceImageFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter,
 {
   OutputFilterType *outputFilter = dynamic_cast< OutputFilterType * >( filter );
 
-  if ( outputFilter == NULL && filter != NULL )
+  if ( outputFilter == ITK_NULLPTR && filter != ITK_NULLPTR )
     {
     // TODO: can it be replaced by a concept check ?
     itkExceptionMacro(
@@ -130,6 +130,11 @@ SliceBySliceImageFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter,
                          TInternalOutputImageType >
 ::SetInputFilter(InputFilterType *filter)
 {
+  if ( !filter )
+    {
+    itkExceptionMacro("InputFilter cannot be NULL.");
+    }
+
   if ( m_InputFilter.GetPointer() != filter )
     {
     this->Modified();
@@ -146,6 +151,11 @@ SliceBySliceImageFilter< TInputImage, TOutputImage, TInputFilter, TOutputFilter,
                          TInternalOutputImageType >
 ::SetOutputFilter(OutputFilterType *filter)
 {
+  if ( !filter )
+    {
+    itkExceptionMacro("OutputFilter cannot be NULL.");
+    }
+
   if ( m_OutputFilter.GetPointer() != filter )
     {
     this->Modified();
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkTileImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkTileImageFilter.hxx
index 2a932d8..875f41f 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkTileImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkTileImageFilter.hxx
@@ -26,6 +26,7 @@
 #include "itkPasteImageFilter.h"
 #include "itkImportImageContainer.h"
 #include "itkNumericTraitsRGBPixel.h"
+#include "itkProgressAccumulator.h"
 
 namespace itk
 {
@@ -42,6 +43,9 @@ void
 TileImageFilter< TInputImage, TOutputImage >
 ::GenerateData()
 {
+  ProgressAccumulator::Pointer progress = ProgressAccumulator::New();
+  progress->SetMiniPipelineFilter(this);
+
   typename TOutputImage::Pointer output = this->GetOutput();
 
 
@@ -53,6 +57,19 @@ TileImageFilter< TInputImage, TOutputImage >
 
   ImageRegionIterator< TileImageType > it( m_TileImage, m_TileImage->GetBufferedRegion() );
   it.GoToBegin();
+
+  SizeValueType numPastes = 0;
+  while ( !it.IsAtEnd() )
+    {
+    if ( it.Get().m_ImageNumber >= 0 )
+      {
+      ++numPastes;
+      }
+    ++it;
+    }
+  const float progressContrib = 1.0f/numPastes;
+
+  it.GoToBegin();
   while ( !it.IsAtEnd() )
     {
     if ( it.Get().m_ImageNumber >= 0 )
@@ -62,6 +79,8 @@ TileImageFilter< TInputImage, TOutputImage >
       paste->SetDestinationImage(output);
       paste->InPlaceOn();
 
+      progress->RegisterInternalFilter(paste, progressContrib);
+
       // Create a temporary image that has the same dimensions as the
       // output image. The additional dimensions are set to 1. The
       // temporary image will use the same container as the input
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.hxx
index e2200c7..6a5f5ad 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkVectorResampleImageFilter.hxx
@@ -133,7 +133,7 @@ VectorResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType
 ::AfterThreadedGenerateData()
 {
   // Disconnect input image from the interpolator
-  m_Interpolator->SetInputImage(NULL);
+  m_Interpolator->SetInputImage(ITK_NULLPTR);
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx
index d884fb7..95df7b7 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/include/itkWarpImageFilter.hxx
@@ -50,6 +50,8 @@ WarpImageFilter< TInputImage, TOutputImage, TDisplacementField >
 
   m_Interpolator =
     static_cast< InterpolatorType * >( interp.GetPointer() );
+
+  m_DefFieldSizeSame = false;
 }
 
 /**
@@ -203,7 +205,7 @@ WarpImageFilter< TInputImage, TOutputImage, TDisplacementField >
 ::AfterThreadedGenerateData()
 {
   // Disconnect input image from interpolator
-  m_Interpolator->SetInputImage(NULL);
+  m_Interpolator->SetInputImage(ITK_NULLPTR);
 }
 
 template< typename TInputImage, typename TOutputImage, typename TDisplacementField >
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkBinShrinkImageFilter.wrap b/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkBinShrinkImageFilter.wrap
index b49ece8..32499b1 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkBinShrinkImageFilter.wrap
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkBinShrinkImageFilter.wrap
@@ -1,5 +1,4 @@
 itk_wrap_class("itk::BinShrinkImageFilter" POINTER)
-  itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2)
   itk_wrap_image_filter("${WRAP_ITK_RGB}" 2)
   itk_wrap_image_filter("${WRAP_ITK_RGBA}" 2)
 # VS9 (2008) does not correctly implicitly cast itk::Vector for operator +=
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkOrientImageFilter.wrap b/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkOrientImageFilter.wrap
index ca21675..641375f 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkOrientImageFilter.wrap
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkOrientImageFilter.wrap
@@ -1,3 +1,7 @@
-itk_wrap_class("itk::OrientImageFilter" POINTER)
-  itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2 3)
-itk_end_wrap_class()
+itk_wrap_filter_dims(has_d_3 3)
+
+if(has_d_3)
+  itk_wrap_class("itk::OrientImageFilter" POINTER)
+    itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" 2 3)
+  itk_end_wrap_class()
+endif(has_d_3)
diff --git a/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkSliceBySliceImageFilter.wrap b/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkSliceBySliceImageFilter.wrap
index 03fac31..e179e14 100644
--- a/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkSliceBySliceImageFilter.wrap
+++ b/Utilities/ITK/Modules/Filtering/ImageGrid/wrapping/itkSliceBySliceImageFilter.wrap
@@ -1,13 +1,22 @@
-itk_wrap_class("itk::SliceBySliceImageFilter" POINTER)
-  foreach(d ${ITK_WRAP_DIMS})
-    math(EXPR d_1 "${d} - 1")
-    itk_wrap_filter_dims(has_d_1 ${d_1})
-    if(has_d_1)
-      # avoid the vector and covariant vector types: the type
-      # Image< Vector< T, N >, N-1 > is not wrapped
-      itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 ${d})
-      itk_wrap_image_filter("${WRAP_ITK_RGB}" 2 ${d})
-      itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 2 ${d})
-    endif(has_d_1)
-  endforeach(d)
-itk_end_wrap_class()
+# Check if we have the right dimensions before wrapping
+foreach(d ${ITK_WRAP_DIMS})
+  math(EXPR d_1 "${d} - 1")
+endforeach(d)
+itk_wrap_filter_dims(has_d_1 ${d_1})
+
+# Wrap if allowed
+if(has_d_1)
+  itk_wrap_class("itk::SliceBySliceImageFilter" POINTER)
+    foreach(d ${ITK_WRAP_DIMS})
+      math(EXPR d_1 "${d} - 1")
+      itk_wrap_filter_dims(has_d_1 ${d_1})
+      if(has_d_1)
+        # avoid the vector and covariant vector types: the type
+        # Image< Vector< T, N >, N-1 > is not wrapped
+        itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 ${d})
+        itk_wrap_image_filter("${WRAP_ITK_RGB}" 2 ${d})
+        itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" 2 ${d})
+      endif(has_d_1)
+    endforeach(d)
+  itk_end_wrap_class()
+endif(has_d_1)
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAcosImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAcosImageFilter.h
index 03abc44..eceb985 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAcosImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAcosImageFilter.h
@@ -48,7 +48,7 @@ public:
 
   inline TOutput operator()(const TInput & A) const
   {
-    return static_cast< TOutput >( vcl_acos( static_cast< double >( A ) ) );
+    return static_cast< TOutput >( std::acos( static_cast< double >( A ) ) );
   }
 };
 }
@@ -63,8 +63,8 @@ public:
  * each pixel does do the following:
  *
  * \li cast the pixel value to \c double,
- * \li apply the \c vcl_acos() function to the \c double value
- * \li cast the \c double value resulting from \c vcl_acos() to the pixel type
+ * \li apply the \c std::acos() function to the \c double value
+ * \li cast the \c double value resulting from \c std::acos() to the pixel type
  *     of the output image
  * \li store the casted value into the output image.
  *
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAdaptImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAdaptImageFilter.h
index 1551a41..722a534 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAdaptImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAdaptImageFilter.h
@@ -100,7 +100,7 @@ private:
  * (i.e. short to float) or can extract a subcomponent of a pixel
  * (i.e. extract the green component of an RGB pixel.
  * AdaptImageFilter could also be used for performing simple
- * arithmetic operations at a pixel (i.e. taking the vcl_sqrt() or vcl_sin()
+ * arithmetic operations at a pixel (i.e. taking the std::sqrt() or std::sin()
  * of a pixel); however, these types of operations could also be
  * accomplished using the itk::UnaryImageFilter.
  *
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAsinImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAsinImageFilter.h
index b169fa5..daaa413 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAsinImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAsinImageFilter.h
@@ -49,7 +49,7 @@ public:
   inline TOutput operator()(const TInput & A) const
   {
     return static_cast< TOutput >(
-             vcl_asin(
+             std::asin(
                static_cast< double >( A )
                )
              );
@@ -66,8 +66,8 @@ public:
  * each pixel does the following:
  *
  * \li cast the pixel value to \c double,
- * \li apply the \c vcl_asin() function to the \c double value,
- * \li cast the \c double value resulting from \c vcl_asin() to the
+ * \li apply the \c std::asin() function to the \c double value,
+ * \li cast the \c double value resulting from \c std::asin() to the
  *     pixel type of the output image,
  * \li store the casted value into the output image.
  *
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAtan2ImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAtan2ImageFilter.h
index 8d72fa6..6ad463c 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAtan2ImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAtan2ImageFilter.h
@@ -49,7 +49,7 @@ public:
   inline TOutput operator()(const TInput1 & A, const TInput2 & B) const
   {
     return static_cast< TOutput >(
-             vcl_atan2(
+             std::atan2(
                static_cast< double >( A ),
                static_cast< double >( B ) )
              );
@@ -69,7 +69,7 @@ public:
  * Numeric conversions (castings) are done by the C++ defaults.
  *
  * Both pixel input types are cast to \c double in order to be
- * used as parameters of \c vcl_atan2(). The resulting \c double value
+ * used as parameters of \c std::atan2(). The resulting \c double value
  * is cast to the output pixel type.
  *
  * \ingroup IntensityImageFilters
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAtanImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAtanImageFilter.h
index c75f8ca..f722794 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAtanImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkAtanImageFilter.h
@@ -48,7 +48,7 @@ public:
 
   inline TOutput operator()(const TInput & A) const
   {
-    return static_cast< TOutput >( vcl_atan( static_cast< double >( A ) ) );
+    return static_cast< TOutput >( std::atan( static_cast< double >( A ) ) );
   }
 };
 }
@@ -62,8 +62,8 @@ public:
  * each pixel does the following:
  *
  * \li cast the pixel value to \c double,
- * \li apply the \c vcl_atan() function to the \c double value,
- * \li cast the \c double value resulting from \c vcl_atan() to the pixel
+ * \li apply the \c std::atan() function to the \c double value,
+ * \li cast the \c double value resulting from \c std::atan() to the pixel
  * type of the output image,
  * \li store the cast value into the output image.
  *
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkBinaryMagnitudeImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkBinaryMagnitudeImageFilter.h
index e8fafc5..f4dd6c2 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkBinaryMagnitudeImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkBinaryMagnitudeImageFilter.h
@@ -51,7 +51,7 @@ public:
     const double dA = static_cast< double >( A );
     const double dB = static_cast< double >( B );
 
-    return static_cast< TOutput >( vcl_sqrt(dA * dA + dB * dB) );
+    return static_cast< TOutput >( std::sqrt(dA * dA + dB * dB) );
   }
 };
 }
@@ -70,7 +70,7 @@ public:
  * \li cast the input 2 pixel value to \c double
  * \li compute the sum of squares of the two pixel values
  * \li compute the square root of the sum
- * \li cast the \c double value resulting from \c vcl_sqrt() to the pixel type of the output image
+ * \li cast the \c double value resulting from \c std::sqrt() to the pixel type of the output image
  * \li store the cast value into the output image.
  *
  * The filter expects all images to have the same dimension
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkComplexToModulusImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkComplexToModulusImageFilter.h
index 2df75bd..9fb8db4 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkComplexToModulusImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkComplexToModulusImageFilter.h
@@ -49,7 +49,7 @@ public:
 
   inline TOutput operator()(const TInput & A) const
   {
-    return (TOutput)( vcl_sqrt( A.real() * A.real()
+    return (TOutput)( std::sqrt( A.real() * A.real()
                                 + A.imag() * A.imag() ) );
   }
 };
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkComplexToPhaseImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkComplexToPhaseImageFilter.h
index 92689cd..e54c721 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkComplexToPhaseImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkComplexToPhaseImageFilter.h
@@ -49,7 +49,7 @@ public:
 
   inline TOutput operator()(const TInput & A) const
   {
-    return (TOutput)( vcl_atan2( A.imag(), A.real() ) );
+    return (TOutput)( std::atan2( A.imag(), A.real() ) );
   }
 };
 }
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkCosImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkCosImageFilter.h
index b68b41f..3598d6d 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkCosImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkCosImageFilter.h
@@ -48,7 +48,7 @@ public:
 
   inline TOutput operator()(const TInput & A) const
   {
-    return static_cast< TOutput >( vcl_cos( static_cast< double >( A ) ) );
+    return static_cast< TOutput >( std::cos( static_cast< double >( A ) ) );
   }
 };
 }
@@ -62,8 +62,8 @@ public:
  * each pixel does the following:
  *
  * \li cast the pixel value to \c double,
- * \li apply the \c vcl_cos() function to the \c double value,
- * \li cast the \c double value resulting from \c vcl_cos() to the pixel type of the output image,
+ * \li apply the \c std::cos() function to the \c double value,
+ * \li cast the \c double value resulting from \c std::cos() to the pixel type of the output image,
  * \li store the cast value into the output image.
  *
  * The filter expects both images to have the same dimension (e.g. both
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h
index d15c76c..28f485d 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkDivideImageFilter.h
@@ -136,7 +136,7 @@ protected:
     const typename Superclass::DecoratedInput2ImagePixelType *input
        = dynamic_cast< const typename Superclass::DecoratedInput2ImagePixelType * >(
         this->ProcessObject::GetInput(1) );
-    if( input != NULL && input->Get() == itk::NumericTraits< typename TInputImage2::PixelType >::Zero )
+    if( input != ITK_NULLPTR && input->Get() == itk::NumericTraits< typename TInputImage2::PixelType >::Zero )
       {
       itkGenericExceptionMacro(<<"The constant value used as denominator should not be set to zero");
       }
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkEdgePotentialImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkEdgePotentialImageFilter.h
index 0c66906..9d83337 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkEdgePotentialImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkEdgePotentialImageFilter.h
@@ -54,7 +54,7 @@ public:
 
   inline TOutput operator()(const TInput & A) const
   {
-    return static_cast< TOutput >( vcl_exp( -1.0 * A.GetNorm() ) );
+    return static_cast< TOutput >( std::exp( -1.0 * A.GetNorm() ) );
   }
 };
 }
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h
index 3d5387c..dd6af53 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h
@@ -48,14 +48,14 @@ public:
 
   inline TOutput operator()(const TInput & A) const
   {
-    return (TOutput)vcl_exp( (double)A );
+    return (TOutput)std::exp( (double)A );
   }
 };
 }
 /** \class ExpImageFilter
  * \brief Computes the exponential function of each pixel.
  *
- * The computation is performed using vcl_exp(x).
+ * The computation is performed using std::exp(x).
  *
  * \ingroup IntensityImageFilters
  * \ingroup MultiThreaded
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkExpNegativeImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkExpNegativeImageFilter.h
index 7fb6ca6..30e7a03 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkExpNegativeImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkExpNegativeImageFilter.h
@@ -53,7 +53,7 @@ public:
 
   inline TOutput operator()(const TInput & A) const
   {
-    return static_cast< TOutput >( vcl_exp( -m_Factor * static_cast< double >( A ) ) );
+    return static_cast< TOutput >( std::exp( -m_Factor * static_cast< double >( A ) ) );
   }
 
   /** Sets the value 'K' used in the function evaluation exp(-K.x). */
@@ -74,7 +74,7 @@ private:
 /** \class ExpNegativeImageFilter
  * \brief Computes the function exp(-K.x) for each input pixel.
  *
- * Every output pixel is equal to vcl_exp(-K.x ). where x is the
+ * Every output pixel is equal to std::exp(-K.x ). where x is the
  * intensity of the homologous input pixel, and K is a user-provided
  * constant.
  *
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx
index 54498e3..560cb7d 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkHistogramMatchingImageFilter.hxx
@@ -30,28 +30,34 @@ namespace itk
  */
 template< typename TInputImage, typename TOutputImage, typename THistogramMeasurement >
 HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >
-::HistogramMatchingImageFilter()
+::HistogramMatchingImageFilter() :
+  m_NumberOfHistogramLevels(256),
+  m_NumberOfMatchPoints(1),
+  m_ThresholdAtMeanIntensity(true),
+  m_SourceIntensityThreshold(NumericTraits<InputPixelType>::Zero),
+  m_ReferenceIntensityThreshold(NumericTraits<InputPixelType>::Zero),
+  m_OutputIntensityThreshold(NumericTraits<OutputPixelType>::Zero),
+  m_SourceMinValue(NumericTraits<THistogramMeasurement>::Zero),
+  m_SourceMaxValue(NumericTraits<THistogramMeasurement>::Zero),
+  m_SourceMeanValue(NumericTraits<THistogramMeasurement>::Zero),
+  m_ReferenceMinValue(NumericTraits<THistogramMeasurement>::Zero),
+  m_ReferenceMaxValue(NumericTraits<THistogramMeasurement>::Zero),
+  m_ReferenceMeanValue(NumericTraits<THistogramMeasurement>::Zero),
+  m_OutputMinValue(NumericTraits<THistogramMeasurement>::Zero),
+  m_OutputMaxValue(NumericTraits<THistogramMeasurement>::Zero),
+  m_OutputMeanValue(NumericTraits<THistogramMeasurement>::Zero),
+  m_SourceHistogram(HistogramType::New()),
+  m_ReferenceHistogram(HistogramType::New()),
+  m_OutputHistogram(HistogramType::New()),
+  m_LowerGradient(0.0),
+  m_UpperGradient(0.0)
 {
   this->SetNumberOfRequiredInputs(2);
 
-  m_NumberOfHistogramLevels = 256;
-  m_NumberOfMatchPoints = 1;
-
   m_QuantileTable.set_size(3, m_NumberOfMatchPoints + 2);
   m_QuantileTable.fill(0);
   m_Gradients.set_size(m_NumberOfMatchPoints + 1);
   m_Gradients.fill(0);
-
-  m_ThresholdAtMeanIntensity = true;
-  m_SourceIntensityThreshold = 0;
-  m_ReferenceIntensityThreshold = 0;
-  m_LowerGradient = 0.0;
-  m_UpperGradient = 0.0;
-
-  // Create histograms.
-  m_SourceHistogram = HistogramType::New();
-  m_ReferenceHistogram = HistogramType::New();
-  m_OutputHistogram = HistogramType::New();
 }
 
 /*
@@ -398,7 +404,7 @@ HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >
   const THistogramMeasurement minValue,
   const THistogramMeasurement maxValue)
 {
-    {
+  {
     // allocate memory for the histogram
     typename HistogramType::SizeType size;
     typename HistogramType::MeasurementVectorType lowerBound;
@@ -416,15 +422,15 @@ HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >
     //Initialize with equally spaced bins.
     histogram->Initialize(size, lowerBound, upperBound);
     histogram->SetToZero();
-    }
-
-  typename HistogramType::MeasurementVectorType measurement;
-  measurement.SetSize(1);
+  }
 
+  typename HistogramType::IndexType index(1);
+  typename HistogramType::MeasurementVectorType measurement(1);
   typedef typename HistogramType::MeasurementType MeasurementType;
   measurement[0] = NumericTraits< MeasurementType >::Zero;
 
     {
+
     // put each image pixel into the histogram
     typedef ImageRegionConstIterator< InputImageType > ConstIterator;
     ConstIterator iter( image, image->GetBufferedRegion() );
@@ -439,7 +445,8 @@ HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >
         {
         // add sample to histogram
         measurement[0] = value;
-        histogram->IncreaseFrequencyOfMeasurement(measurement, 1);
+        histogram->GetIndex( measurement, index );
+        histogram->IncreaseFrequencyOfIndex( index, 1 );
         }
       ++iter;
       }
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h
index 489e9ee..caa5340 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.h
@@ -32,7 +32,13 @@ class IntensityWindowingTransform
 {
 public:
   typedef typename NumericTraits< TInput >::RealType RealType;
-  IntensityWindowingTransform() {}
+  IntensityWindowingTransform() :
+    m_Factor(0.0),
+    m_Offset(0.0),
+    m_OutputMaximum(0),
+    m_OutputMinimum(0),
+    m_WindowMaximum(0),
+    m_WindowMinimum(0) {}
   ~IntensityWindowingTransform() {}
   bool operator!=(const IntensityWindowingTransform & other) const
   {
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkLog10ImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkLog10ImageFilter.h
index b2be24f..7c07d32 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkLog10ImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkLog10ImageFilter.h
@@ -48,14 +48,14 @@ public:
 
   inline TOutput operator()(const TInput & A) const
   {
-    return static_cast< TOutput >( vcl_log10( static_cast< double >( A ) ) );
+    return static_cast< TOutput >( std::log10( static_cast< double >( A ) ) );
   }
 };
 }
 /** \class Log10ImageFilter
  * \brief Computes the log10 of each pixel.
  *
- * The computation is performed using vcl_log10(x).
+ * The computation is performed using std::log10(x).
  *
  * \ingroup IntensityImageFilters
  * \ingroup MultiThreaded
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkLogImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkLogImageFilter.h
index 9403b61..38f02be 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkLogImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkLogImageFilter.h
@@ -48,7 +48,7 @@ public:
 
   inline TOutput operator()(const TInput & A) const
   {
-    return static_cast< TOutput >( vcl_log( static_cast< double >( A ) ) );
+    return static_cast< TOutput >( std::log( static_cast< double >( A ) ) );
   }
 };
 }
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkMagnitudeAndPhaseToComplexImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkMagnitudeAndPhaseToComplexImageFilter.h
new file mode 100644
index 0000000..f13cebb
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkMagnitudeAndPhaseToComplexImageFilter.h
@@ -0,0 +1,142 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkMagnitudeAndPhaseToComplexImageFilter_h
+#define __itkMagnitudeAndPhaseToComplexImageFilter_h
+
+#include "itkBinaryFunctorImageFilter.h"
+
+namespace itk
+{
+/** \class MagnitudeAndPhaseToComplexImageFilter
+ *
+ * \brief Implements pixel-wise conversion of magnitude and phase data into
+ * complex voxels.
+ *
+ * This filter is parametrized over the types of the two
+ * input images and the type of the output image.
+ *
+ * The filter expect all images to have the same dimension
+ * (e.g. all 2D, or all 3D, or all ND)
+ *
+ * \ingroup IntensityImageFilters MultiThreaded
+ *
+ * \weakgroup FourierTransform
+ *
+ * \author Simon K. Warfield simon.warfield at childrens.harvard.edu
+ *
+ * \note Attribution Notice. This research work was made possible by Grant
+ * Number R01 RR021885 (PI Simon K. Warfield, Ph.D.) from the National Center
+ * for Research Resources (NCRR), a component of the National Institutes of
+ * Health (NIH).  Its contents are solely the responsibility of the authors
+ * and do not necessarily represent the official view of NCRR or NIH.
+ *
+ * This class was taken from the Insight Journal paper:
+ * http://hdl.handle.net/1926/326
+ *
+ * \sa ComposeImageFilter
+ *
+ * \ingroup ITKImageIntensity
+ */
+namespace Functor
+{
+template< typename TInput1, typename TInput2, typename TOutput >
+class MagnitudeAndPhaseToComplex
+{
+public:
+  MagnitudeAndPhaseToComplex() {}
+  ~MagnitudeAndPhaseToComplex() {}
+  bool operator!=(const MagnitudeAndPhaseToComplex &) const
+  {
+    return false;
+  }
+
+  bool operator==(const MagnitudeAndPhaseToComplex & other) const
+  {
+    return !( *this != other );
+  }
+
+  inline std::complex< TOutput > operator()(const TInput1 & A, const TInput2 & B) const
+  {
+    return std::complex< TOutput >( std::polar( static_cast< TOutput >( A ),  static_cast< TOutput >( B ) ) );
+  }
+};
+}
+
+template< typename TInputImage1,
+          typename TInputImage2 = TInputImage1,
+          typename TOutputImage = itk::Image< std::complex< typename TInputImage1::PixelType >,
+                                           TInputImage1::ImageDimension > >
+class MagnitudeAndPhaseToComplexImageFilter:
+  public BinaryFunctorImageFilter<
+    TInputImage1,
+    TInputImage2,
+    TOutputImage,
+    Functor::MagnitudeAndPhaseToComplex<
+      typename TInputImage1::PixelType,
+      typename TInputImage2::PixelType,
+      typename TOutputImage::PixelType::value_type > >
+
+{
+public:
+  /** Standard class typedefs. */
+  typedef MagnitudeAndPhaseToComplexImageFilter Self;
+
+  typedef BinaryFunctorImageFilter<
+    TInputImage1,
+    TInputImage2,
+    TOutputImage,
+    Functor::MagnitudeAndPhaseToComplex<
+      typename TInputImage1::PixelType,
+      typename TInputImage2::PixelType,
+      typename TOutputImage::PixelType::value_type > > Superclass;
+
+  typedef typename TInputImage1::PixelType InputPixel1Type;
+  typedef typename TInputImage2::PixelType InputPixel2Type;
+  typedef typename TOutputImage::PixelType OutputPixelType;
+
+  typedef SmartPointer< Self >       Pointer;
+  typedef SmartPointer< const Self > ConstPointer;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(MagnitudeAndPhaseToComplexImageFilter, BinaryFunctorImageFilter);
+
+#ifdef ITK_USE_CONCEPT_CHECKING
+  // Begin concept checking
+  itkConceptMacro( Input1ConvertibleToDoubleCheck,
+                   ( Concept::Convertible< InputPixel1Type, double > ) );
+  itkConceptMacro( Input2ConvertibleToDoubleCheck,
+                   ( Concept::Convertible< InputPixel2Type, double > ) );
+  itkConceptMacro( DoubleConvertibleToOutputCheck,
+                   ( Concept::Convertible< double, OutputPixelType > ) );
+  // End concept checking
+#endif
+
+protected:
+  MagnitudeAndPhaseToComplexImageFilter() {}
+  virtual ~MagnitudeAndPhaseToComplexImageFilter() {}
+
+private:
+  MagnitudeAndPhaseToComplexImageFilter(const Self &); //purposely not implemented
+  void operator=(const Self &);                        //purposely not implemented
+};
+} // end namespace itk
+
+#endif
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h
index 5e3d954..fb319cd 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkMaskImageFilter.h
@@ -40,7 +40,7 @@ public:
   MaskInput()
   {
     m_MaskingValue = NumericTraits< TMask >::ZeroValue();
-    InitializeOutsideValue( static_cast<TOutput*>( NULL ) );
+    InitializeOutsideValue( static_cast<TOutput*>( ITK_NULLPTR ) );
   }
   ~MaskInput() {}
   bool operator!=(const MaskInput &) const
@@ -93,14 +93,14 @@ private:
   template < typename TPixelType >
   void InitializeOutsideValue( TPixelType * )
   {
-    this->m_OutsideValue = NumericTraits< TPixelType >::Zero;
+    this->m_OutsideValue = NumericTraits< TPixelType >::ZeroValue();
   }
 
-  template < typename TValueType >
-  void InitializeOutsideValue( VariableLengthVector<TValueType> * )
+  template < typename TValue >
+  void InitializeOutsideValue( VariableLengthVector<TValue> * )
   {
     // set the outside value to be of zero length
-    this->m_OutsideValue = VariableLengthVector< TValueType >(0);
+    this->m_OutsideValue = VariableLengthVector< TValue >(0);
   }
 
   TOutput m_OutsideValue;
@@ -221,7 +221,7 @@ public:
   void BeforeThreadedGenerateData()
   {
     typedef typename TOutputImage::PixelType PixelType;
-    this->CheckOutsideValue( static_cast<PixelType*>(NULL) );
+    this->CheckOutsideValue( static_cast<PixelType*>(ITK_NULLPTR) );
   }
 
 #ifdef ITK_USE_CONCEPT_CHECKING
@@ -262,12 +262,12 @@ private:
     VariableLengthVector< TValue > currentValue =
       this->GetFunctor().GetOutsideValue();
     VariableLengthVector< TValue > zeroVector( currentValue.GetSize() );
-    zeroVector.Fill( NumericTraits< TValue >::Zero );
+    zeroVector.Fill( NumericTraits< TValue >::ZeroValue() );
 
     if ( currentValue == zeroVector )
       {
       zeroVector.SetSize( this->GetOutput()->GetVectorLength() );
-      zeroVector.Fill( NumericTraits< TValue >::Zero );
+      zeroVector.Fill( NumericTraits< TValue >::ZeroValue() );
       this->GetFunctor().SetOutsideValue( zeroVector );
       }
     else if ( this->GetFunctor().GetOutsideValue().GetSize() !=
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h
index c39d702..ca45378 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkMaskNegatedImageFilter.h
@@ -37,7 +37,7 @@ public:
   typedef typename NumericTraits< TInput >::AccumulateType AccumulatorType;
 
   MaskNegatedInput()
-    : m_OutsideValue(NumericTraits< TOutput >::Zero)
+    : m_OutsideValue(NumericTraits< TOutput >::ZeroValue())
     , m_MaskingValue(NumericTraits< TMask >::ZeroValue())
   {
   }
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.hxx
index 5979335..6507b11 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkNormalizeImageFilter.hxx
@@ -28,7 +28,7 @@ template< typename TInputImage, typename TOutputImage >
 NormalizeImageFilter< TInputImage, TOutputImage >
 ::NormalizeImageFilter()
 {
-  m_StatisticsFilter = 0;
+  m_StatisticsFilter = ITK_NULLPTR;
   m_StatisticsFilter = StatisticsImageFilter< TInputImage >::New();
   m_ShiftScaleFilter = ShiftScaleImageFilter< TInputImage, TOutputImage >::New();
 }
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx
index 20e2691..a21c1a3 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPolylineMask2DImageFilter.hxx
@@ -83,7 +83,6 @@ void PolylineMask2DImageFilter< TInputImage, TPolyline, TOutputImage >
   typedef typename TOutputImage::PixelType    PixelType;
   typedef ImageRegionIterator< TOutputImage > OutputImageIteratorType;
 
-  typedef typename TPolyline::Pointer        PolylinePointer;
   typedef typename TPolyline::VertexType     VertexType;
   typedef typename TPolyline::VertexListType VertexListType;
 
@@ -105,7 +104,6 @@ void PolylineMask2DImageFilter< TInputImage, TPolyline, TOutputImage >
   outputImagePtr->SetLargestPossibleRegion( inputImagePtr->GetLargestPossibleRegion() );
   outputImagePtr->Allocate();
 
-  typedef typename VertexListType::Pointer VertexListPointer;
 
   const VertexListType *container      = polylinePtr->GetVertexList();
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx
index 4395030..4e9d352 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx
@@ -188,14 +188,11 @@ void PolylineMaskImageFilter< TInputImage, TPolyline, TVector, TOutputImage >
   typedef typename TInputImage::SpacingType       InputImageSpacingType;
   typedef ImageRegionConstIterator< TInputImage > InputImageConstIteratorType;
 
-  typedef typename TOutputImage::IndexType    ImageIndexType;
   typedef typename TOutputImage::PixelType    PixelType;
   typedef ImageRegionIterator< TOutputImage > OutputImageIteratorType;
 
-  typedef typename TPolyline::Pointer        PolylinePointer;
   typedef typename TPolyline::VertexType     VertexType;
   typedef typename TPolyline::VertexListType VertexListType;
-  typedef typename TPolyline::IndexType      PolylineIndexType;
 
   typedef Point< double, 3 > OriginType;
 
@@ -219,14 +216,13 @@ void PolylineMaskImageFilter< TInputImage, TPolyline, TVector, TOutputImage >
   outputImagePtr->SetRequestedRegion( inputImagePtr->GetRequestedRegion() );
   outputImagePtr->SetBufferedRegion( inputImagePtr->GetBufferedRegion() );
   outputImagePtr->SetLargestPossibleRegion( inputImagePtr->GetLargestPossibleRegion() );
-  outputImagePtr->Allocate();
-  outputImagePtr->FillBuffer(0);
+  outputImagePtr->Allocate(true); // initialize
+                                                         // buffer to zero
 
   InputImageConstIteratorType inputIt( inputImagePtr, inputImagePtr->GetLargestPossibleRegion() );
   OutputImageIteratorType     outputIt( outputImagePtr, outputImagePtr->GetLargestPossibleRegion() );
 
   typedef NearestNeighborInterpolateImageFunction< TInputImage, double > InterpolatorType;
-  typedef typename InterpolatorType::OutputType                          OutputType;
   typedef typename InterpolatorType::PointType InterpolatorPointType;
 
   /* Generate the transformation matrix */
@@ -394,16 +390,15 @@ void PolylineMaskImageFilter< TInputImage, TPolyline, TVector, TOutputImage >
   projectionImagePtr->SetRequestedRegion(projectionRegion);
   projectionImagePtr->SetBufferedRegion(projectionRegion);
   projectionImagePtr->SetLargestPossibleRegion(projectionRegion);
-  projectionImagePtr->Allocate();
-  projectionImagePtr->FillBuffer(0);
+  projectionImagePtr->Allocate(true); // initialize
+                                                             // buffer
+                                                             // to zero
 
   typedef ImageRegionIterator< ProjectionImageType > ProjectionImageIteratorType;
   ProjectionImageIteratorType projectionIt( projectionImagePtr, projectionImagePtr->GetLargestPossibleRegion() );
 
   itkDebugMacro(<< "Rotation matrix"  << m_RotationMatrix);
 
-  typedef typename VertexListType::Pointer VertexListPointer;
-
   const VertexListType *container      = polylinePtr->GetVertexList();
 
   typename VertexListType::ConstIterator piter = container->Begin();
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPowImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPowImageFilter.h
index 2573e56..f769413 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPowImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkPowImageFilter.h
@@ -51,7 +51,7 @@ public:
   {
 
     typedef typename NumericTraits< TInput1 >::RealType RealType;
-    return static_cast< TOutput >( vcl_pow(static_cast<RealType>(A),static_cast<RealType>(B)) );
+    return static_cast< TOutput >( std::pow(static_cast<RealType>(A),static_cast<RealType>(B)) );
   }
 };
 }
@@ -67,7 +67,7 @@ public:
  *
  * The total operation over one pixel will be
  * \code
- * output_pixel = static_cast< TOutput >( vcl_pow(static_cast<RealType>(A),static_cast<RealType>(B)) );
+ * output_pixel = static_cast< TOutput >( std::pow(static_cast<RealType>(A),static_cast<RealType>(B)) );
  * \endcode
  *
  * The pow function can be applied to two images with the following:
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx
index fdea7af..68bbd39 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkShiftScaleImageFilter.hxx
@@ -35,8 +35,8 @@ ShiftScaleImageFilter< TInputImage, TOutputImage >
   m_OverflowCount = 0;
   m_ThreadUnderflow.SetSize(1);
   m_ThreadOverflow.SetSize(1);
-  m_InputImage = 0;
-  m_OutputImage = 0;
+  m_InputImage = ITK_NULLPTR;
+  m_OutputImage = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TOutputImage >
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h
index ea1f2d6..5bddb63 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSigmoidImageFilter.h
@@ -79,7 +79,7 @@ public:
   inline TOutput operator()(const TInput & A) const
   {
     const double x = ( static_cast< double >( A ) - m_Beta ) / m_Alpha;
-    const double e = 1.0 / ( 1.0 + vcl_exp(-x) );
+    const double e = 1.0 / ( 1.0 + std::exp(-x) );
     const double v =
       ( m_OutputMaximum - m_OutputMinimum ) * e + m_OutputMinimum;
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSinImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSinImageFilter.h
index c02332e..a7e442c 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSinImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSinImageFilter.h
@@ -47,13 +47,13 @@ public:
   }
 
   inline TOutput operator()(const TInput & A) const
-  { return (TOutput)vcl_sin( (double)A ); }
+  { return (TOutput)std::sin( (double)A ); }
 };
 }
 /** \class SinImageFilter
  * \brief Computes the sine of each pixel.
  *
- * The computations are performed using vcl_sin(x).
+ * The computations are performed using std::sin(x).
  *
  * \ingroup IntensityImageFilters
  * \ingroup MultiThreaded
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSqrtImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSqrtImageFilter.h
index edae9a7..c16cd17 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSqrtImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkSqrtImageFilter.h
@@ -48,14 +48,14 @@ public:
 
   inline TOutput operator()(const TInput & A) const
   {
-    return (TOutput)vcl_sqrt( (double)A );
+    return (TOutput)std::sqrt( (double)A );
   }
 };
 }
 /** \class SqrtImageFilter
  * \brief Computes the square root of each pixel.
  *
- * The computations are performed using vcl_sqrt(x).
+ * The computations are performed using std::sqrt(x).
  *
  * \ingroup IntensityImageFilters
  * \ingroup MultiThreaded
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkTanImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkTanImageFilter.h
index e7ec8af..96cca56 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkTanImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkTanImageFilter.h
@@ -47,13 +47,13 @@ public:
   }
 
   inline TOutput operator()(const TInput & A) const
-  { return (TOutput)vcl_tan( (double)A ); }
+  { return (TOutput)std::tan( (double)A ); }
 };
 }
 /** \class TanImageFilter
  * \brief Computes the tangent of each input pixel.
  *
- * The computations are performed using vcl_tan(x).
+ * The computations are performed using std::tan(x).
  *
  * \ingroup IntensityImageFilters
  * \ingroup MultiThreaded
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeImageFilter.h
index 4630de2..6bcbcf2 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkTernaryMagnitudeImageFilter.h
@@ -48,7 +48,7 @@ public:
   inline TOutput operator()(const TInput1 & A,
                             const TInput2 & B,
                             const TInput3 & C) const
-  { return (TOutput)vcl_sqrt( (double)( A * A + B * B + C * C ) ); }
+  { return (TOutput)std::sqrt( (double)( A * A + B * B + C * C ) ); }
 };
 }
 /** \class TernaryMagnitudeImageFilter
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.hxx
index 133e0ad..7dbd137 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorExpandImageFilter.hxx
@@ -259,11 +259,11 @@ VectorExpandImageFilter< TInputImage, TOutputImage >
   for ( i = 0; i < TInputImage::ImageDimension; i++ )
     {
     inputRequestedRegionSize[i] =
-      (SizeValueType)vcl_ceil( (double)outputRequestedRegionSize[i]
+      (SizeValueType)std::ceil( (double)outputRequestedRegionSize[i]
                       / (double)m_ExpandFactors[i] ) + 1;
 
     inputRequestedRegionStartIndex[i] =
-      (IndexValueType)vcl_floor( (double)outputRequestedRegionStartIndex[i]
+      (IndexValueType)std::floor( (double)outputRequestedRegionStartIndex[i]
                        / (double)m_ExpandFactors[i] );
     }
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h
index 4444c7e..be0db94 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.h
@@ -31,7 +31,7 @@ class VectorMagnitudeLinearTransform
 {
 public:
   typedef typename NumericTraits< typename TInput::ValueType >::RealType RealType;
-  VectorMagnitudeLinearTransform() {}
+  VectorMagnitudeLinearTransform() : m_Factor(0.0) {}
   ~VectorMagnitudeLinearTransform() {}
   void SetFactor(RealType a) { m_Factor = a; }
   itkStaticConstMacro(VectorDimension, unsigned int, TInput::Dimension);
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.hxx
index d8aa214..a8ddfd6 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkVectorRescaleIntensityImageFilter.hxx
@@ -38,12 +38,12 @@ namespace itk
  */
 template< typename TInputImage, typename TOutputImage >
 VectorRescaleIntensityImageFilter< TInputImage, TOutputImage >
-::VectorRescaleIntensityImageFilter()
+::VectorRescaleIntensityImageFilter() :
+  m_Scale(1.0),
+  m_Shift(1.0),
+  m_InputMaximumMagnitude(NumericTraits< InputRealType  >::Zero),
+  m_OutputMaximumMagnitude(NumericTraits< OutputRealType >::Zero)
 {
-  m_OutputMaximumMagnitude   = NumericTraits< OutputRealType >::Zero;
-  m_InputMaximumMagnitude    = NumericTraits< InputRealType  >::Zero;
-
-  m_Scale = 1.0;
 }
 
 /**
@@ -101,7 +101,7 @@ VectorRescaleIntensityImageFilter< TInputImage, TOutputImage >
     ++it;
     }
 
-  m_InputMaximumMagnitude = vcl_sqrt(maximumSquaredMagnitude);
+  m_InputMaximumMagnitude = std::sqrt(maximumSquaredMagnitude);
 
   m_Scale = static_cast< InputRealType >( m_OutputMaximumMagnitude )
             / static_cast< InputRealType >( m_InputMaximumMagnitude  );
diff --git a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkWeightedAddImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkWeightedAddImageFilter.h
index 2cfc50a..660a7b6 100644
--- a/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkWeightedAddImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageIntensity/include/itkWeightedAddImageFilter.h
@@ -36,7 +36,7 @@ class WeightedAdd2
 public:
   typedef typename NumericTraits< TInput1 >::AccumulateType AccumulatorType;
   typedef typename NumericTraits< TInput1 >::RealType       RealType;
-  WeightedAdd2() {}
+  WeightedAdd2() : m_Alpha(0.0), m_Beta(0.0) {}
   ~WeightedAdd2() {}
   bool operator!=(const WeightedAdd2 & other) const
   {
diff --git a/Utilities/ITK/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx
index ca32050..da64605 100644
--- a/Utilities/ITK/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx
@@ -289,7 +289,7 @@ void
 BinaryContourImageFilter< TInputImage, TOutputImage >
 ::AfterThreadedGenerateData()
 {
-  m_Barrier = NULL;
+  m_Barrier = ITK_NULLPTR;
   m_ForegroundLineMap.clear();
   m_BackgroundLineMap.clear();
 }
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/CMakeLists.txt b/Utilities/ITK/Modules/Filtering/ImageNoise/CMakeLists.txt
new file mode 100644
index 0000000..a117184
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/CMakeLists.txt
@@ -0,0 +1,2 @@
+project(ITKImageNoise)
+itk_module_impl()
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.h
new file mode 100644
index 0000000..ffa1efc
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.h
@@ -0,0 +1,105 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkAdditiveGaussianNoiseImageFilter_h
+#define __itkAdditiveGaussianNoiseImageFilter_h
+
+#include "itkNoiseBaseImageFilter.h"
+
+namespace itk
+{
+
+/** \class AdditiveGaussianNoiseImageFilter
+ *
+ * \brief Alter an image with additive gaussian white noise.
+ *
+ * \author Gaetan Lehmann
+ *
+ * This code was contributed in the Insight Journal paper "Noise
+ * Simulation". http://hdl.handle.net/10380/3158
+ *
+ * \ingroup ITKImageNoise
+ */
+template <class TInputImage, class TOutputImage=TInputImage>
+class AdditiveGaussianNoiseImageFilter :
+  public NoiseBaseImageFilter<TInputImage,TOutputImage >
+{
+public:
+  /** Standard class typedefs. */
+  typedef AdditiveGaussianNoiseImageFilter                 Self;
+  typedef NoiseBaseImageFilter< TInputImage,TOutputImage > Superclass;
+  typedef SmartPointer<Self>                               Pointer;
+  typedef SmartPointer<const Self>                         ConstPointer;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(AdditiveGaussianNoiseImageFilter, NoiseBaseImageFilter);
+
+  /** Superclass typedefs. */
+  typedef typename Superclass::OutputImageType       OutputImageType;
+  typedef typename Superclass::OutputImagePointer    OutputImagePointer;
+  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
+  typedef typename Superclass::OutputImagePixelType  OutputImagePixelType;
+
+  /** Some convenient typedefs. */
+  typedef TInputImage                           InputImageType;
+  typedef typename InputImageType::Pointer      InputImagePointer;
+  typedef typename InputImageType::ConstPointer InputImageConstPointer;
+  typedef typename InputImageType::RegionType   InputImageRegionType;
+  typedef typename InputImageType::PixelType    InputImagePixelType;
+
+  itkGetConstMacro(Mean, double);
+  itkSetMacro(Mean, double);
+
+  itkGetConstMacro(StandardDeviation, double);
+  itkSetMacro(StandardDeviation, double);
+
+#ifdef ITK_USE_CONCEPT_CHECKING
+  /** Begin concept checking */
+  itkConceptMacro(InputConvertibleToOutputCheck,
+                  (Concept::Convertible<typename TInputImage::PixelType,
+                                        typename TOutputImage::PixelType>) );
+  /** End concept checking */
+#endif
+
+protected:
+  AdditiveGaussianNoiseImageFilter();
+  virtual ~AdditiveGaussianNoiseImageFilter() {
+  }
+
+  void PrintSelf(std::ostream &os, Indent indent) const;
+
+  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId );
+
+private:
+  AdditiveGaussianNoiseImageFilter(const Self&); //purposely not implemented
+  void operator=(const Self&);                   //purposely not implemented
+
+  double m_Mean;
+  double m_StandardDeviation;
+
+};
+
+} // end namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "itkAdditiveGaussianNoiseImageFilter.hxx"
+#endif
+
+#endif
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.hxx
new file mode 100644
index 0000000..a2dc34e
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkAdditiveGaussianNoiseImageFilter.hxx
@@ -0,0 +1,100 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkAdditiveGaussianNoiseImageFilter_hxx
+#define __itkAdditiveGaussianNoiseImageFilter_hxx
+
+#include "itkAdditiveGaussianNoiseImageFilter.h"
+#include "itkImageScanlineIterator.h"
+#include "itkProgressReporter.h"
+#include "itkNormalVariateGenerator.h"
+
+namespace itk
+{
+
+template <class TInputImage, class TOutputImage>
+AdditiveGaussianNoiseImageFilter<TInputImage, TOutputImage>
+::AdditiveGaussianNoiseImageFilter()
+{
+  m_Mean = 0.0;
+  m_StandardDeviation = 1.0;
+}
+
+template <class TInputImage, class TOutputImage>
+void
+AdditiveGaussianNoiseImageFilter<TInputImage, TOutputImage>
+::ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread,
+                        ThreadIdType threadId)
+{
+  const InputImageType*  inputPtr = this->GetInput();
+  OutputImageType*       outputPtr = this->GetOutput(0);
+
+  // create a random generator per thread
+  typename Statistics::NormalVariateGenerator::Pointer randn = Statistics::NormalVariateGenerator::New();
+  const uint32_t seed = Self::Hash(this->GetSeed(),threadId);
+  // convert the seed bit for bit to int32
+  randn->Initialize(*static_cast<int32_t*>( (void*)&seed) );
+
+  // 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
+  InputImageRegionType inputRegionForThread;
+  this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread);
+
+  // Define the iterators
+  ImageScanlineConstIterator<TInputImage> inputIt(inputPtr, inputRegionForThread);
+  ImageScanlineIterator<TOutputImage>     outputIt(outputPtr, outputRegionForThread);
+
+  ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels() );
+
+  inputIt.GoToBegin();
+  outputIt.GoToBegin();
+
+  while ( !inputIt.IsAtEnd() )
+    {
+    while ( !inputIt.IsAtEndOfLine() )
+      {
+      const double out = inputIt.Get() + m_Mean + m_StandardDeviation * randn->GetVariate();
+      outputIt.Set( Self::ClampCast(out) );
+      ++inputIt;
+      ++outputIt;
+      }
+    inputIt.NextLine();
+    outputIt.NextLine();
+    progress.CompletedPixel();  // potential exception thrown here
+    }
+}
+
+template <class TInputImage, class TOutputImage>
+void
+AdditiveGaussianNoiseImageFilter<TInputImage, TOutputImage>
+::PrintSelf(std::ostream& os,
+            Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  os << indent << "Mean: "
+     << static_cast<typename NumericTraits<double>::PrintType>(m_Mean)
+     << std::endl;
+  os << indent << "StandardDeviation: "
+     << static_cast<typename NumericTraits<double>::PrintType>(m_StandardDeviation)
+     << std::endl;
+}
+
+} /* namespace itk */
+
+#endif // __itkAdditiveGaussianNoiseImageFilter_hxx
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.h
new file mode 100644
index 0000000..3e18be1
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.h
@@ -0,0 +1,91 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkNoiseBaseImageFilter_h
+#define __itkNoiseBaseImageFilter_h
+
+#include "itkInPlaceImageFilter.h"
+#include <vcl_ctime.h>
+
+namespace itk
+{
+
+/** \class NoiseBaseImageFilter
+ *
+ * \brief An Abstract Base class for Noise image filters
+ *
+ * This class add common methods for setting a seed for the random
+ * generators used to generate the noise.
+ *
+ * \sa InPlaceImageFilter
+ * \ingroup ITKImageNoise
+ */
+template <class TInputImage, class TOutputImage=TInputImage>
+class NoiseBaseImageFilter :
+  public InPlaceImageFilter<TInputImage,TOutputImage >
+{
+public:
+  /** Standard class typedefs. */
+  typedef NoiseBaseImageFilter                          Self;
+  typedef InPlaceImageFilter<TInputImage,TOutputImage > Superclass;
+  typedef SmartPointer<Self>                            Pointer;
+  typedef SmartPointer<const Self>                      ConstPointer;
+
+  typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(NoiseBaseImageFilter, InPlaceImageFilter);
+
+  /** Seed for random initialization  */
+  itkGetConstMacro(Seed, uint32_t);
+  itkSetMacro(Seed, uint32_t);
+
+  /** Set the seed to a value initialized with the current time and
+   * process clock. */
+  virtual void SetSeed();
+
+protected:
+  NoiseBaseImageFilter();
+
+  virtual ~NoiseBaseImageFilter() = 0;
+
+  void PrintSelf(std::ostream &os, Indent indent) const;
+
+  inline static uint32_t Hash(uint32_t a, uint32_t b)
+  {
+    //  Knuth's Multiplicative Method for hashing
+    return (a+b)*2654435761u;
+  }
+
+  // Clamp and round the input value to the output
+  static OutputImagePixelType ClampCast(const double &value);
+
+private:
+  NoiseBaseImageFilter(const Self&); //purposely not implemented
+  void operator=(const Self&);       //purposely not implemented
+
+  uint32_t m_Seed;
+
+};
+
+} // end namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "itkNoiseBaseImageFilter.hxx"
+#endif
+
+#endif //  __itkNoiseBaseImageFilter_h
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.hxx
new file mode 100644
index 0000000..0fa632a
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.hxx
@@ -0,0 +1,89 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkNoiseBaseImageFilter_hxx
+#define __itkNoiseBaseImageFilter_hxx
+
+#include "itkNoiseBaseImageFilter.h"
+#include <ctime>
+
+namespace itk
+{
+
+template <class TInputImage, class TOutputImage>
+NoiseBaseImageFilter<TInputImage, TOutputImage>
+::NoiseBaseImageFilter()
+  : m_Seed(0)
+{
+  Self::SetSeed();
+
+  this->InPlaceOff();
+}
+
+template <class TInputImage, class TOutputImage>
+NoiseBaseImageFilter<TInputImage, TOutputImage>
+::~NoiseBaseImageFilter()
+{
+}
+
+template <class TInputImage, class TOutputImage>
+void
+NoiseBaseImageFilter<TInputImage, TOutputImage>
+::SetSeed()
+{
+  time_t t;
+
+  time(&t);
+  this->SetSeed(Hash(t,clock() ) );
+}
+
+template <class TInputImage, class TOutputImage>
+typename NoiseBaseImageFilter<TInputImage, TOutputImage>::OutputImagePixelType
+NoiseBaseImageFilter<TInputImage, TOutputImage>
+::ClampCast(const double &value)
+{
+  if (value >= (double)NumericTraits<OutputImagePixelType>::max() )
+    {
+    return NumericTraits<OutputImagePixelType>::max();
+    }
+  else if(value <= (double)NumericTraits<OutputImagePixelType>::NonpositiveMin() )
+    {
+    return NumericTraits<OutputImagePixelType>::NonpositiveMin();
+    }
+  else if (NumericTraits<OutputImagePixelType>::is_integer)
+    {
+    return Math::Round<OutputImagePixelType>(value);
+    }
+  else
+    {
+    return static_cast<OutputImagePixelType>(value);
+    }
+}
+
+template <class TInputImage, class TOutputImage>
+void
+NoiseBaseImageFilter<TInputImage, TOutputImage>
+::PrintSelf(std::ostream &os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  os << indent << "Seed: "     << static_cast<typename NumericTraits<uint32_t>::PrintType>(m_Seed) << std::endl;
+}
+
+}
+
+#endif // __itkNoiseBaseImageFilter_hxx
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.h
new file mode 100644
index 0000000..768c455
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.h
@@ -0,0 +1,106 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+
+#ifndef __itkSaltAndPepperNoiseImageFilter_h
+#define __itkSaltAndPepperNoiseImageFilter_h
+
+#include "itkNoiseBaseImageFilter.h"
+
+namespace itk
+{
+
+/** \class SaltAndPepperNoiseImageFilter
+ *
+ * \brief Alter an image with fixed value impulse noise, often called salt and pepper noise.
+ *
+ * Pixel alteration occurs at a user defined probability.
+ * Salt and pepper pixel are equally distributed.
+ *
+ * \author Gaetan Lehmann
+ *
+ * This code was contributed in the Insight Journal paper "Noise
+ * Simulation". http://hdl.handle.net/10380/3158
+ *
+ * \ingroup ITKImageNoise
+ */
+template <class TInputImage, class TOutputImage=TInputImage>
+class SaltAndPepperNoiseImageFilter :
+  public NoiseBaseImageFilter<TInputImage,TOutputImage >
+{
+public:
+  /** Standard class typedefs. */
+  typedef SaltAndPepperNoiseImageFilter                    Self;
+  typedef NoiseBaseImageFilter< TInputImage,TOutputImage > Superclass;
+  typedef SmartPointer<Self>                               Pointer;
+  typedef SmartPointer<const Self>                         ConstPointer;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(SaltAndPepperNoiseImageFilter, NoiseBaseImageFilter);
+
+  /** Superclass typedefs. */
+  typedef typename Superclass::OutputImageType       OutputImageType;
+  typedef typename Superclass::OutputImagePointer    OutputImagePointer;
+  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
+  typedef typename Superclass::OutputImagePixelType  OutputImagePixelType;
+
+  /** Some convenient typedefs. */
+  typedef TInputImage                           InputImageType;
+  typedef typename InputImageType::Pointer      InputImagePointer;
+  typedef typename InputImageType::ConstPointer InputImageConstPointer;
+  typedef typename InputImageType::RegionType   InputImageRegionType;
+  typedef typename InputImageType::PixelType    InputImagePixelType;
+
+  itkGetConstMacro(Probability, double);
+  itkSetMacro(Probability, double);
+
+#ifdef ITK_USE_CONCEPT_CHECKING
+  /** Begin concept checking */
+  itkConceptMacro(InputConvertibleToOutputCheck,
+                  (Concept::Convertible<typename TInputImage::PixelType,
+                                        typename TOutputImage::PixelType>) );
+  /** End concept checking */
+#endif
+
+protected:
+  SaltAndPepperNoiseImageFilter();
+  virtual ~SaltAndPepperNoiseImageFilter() {
+  }
+
+  void PrintSelf(std::ostream &os, Indent indent) const;
+
+  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
+                            ThreadIdType threadId );
+
+private:
+  SaltAndPepperNoiseImageFilter(const Self&); //purposely not implemented
+  void operator=(const Self&);                //purposely not implemented
+
+  double m_Probability;
+
+};
+
+} // end namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "itkSaltAndPepperNoiseImageFilter.hxx"
+#endif
+
+#endif
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.hxx
new file mode 100644
index 0000000..bdbcc42
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSaltAndPepperNoiseImageFilter.hxx
@@ -0,0 +1,111 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkSaltAndPepperNoiseImageFilter_hxx
+#define  __itkSaltAndPepperNoiseImageFilter_hxx
+
+#include "itkSaltAndPepperNoiseImageFilter.h"
+#include "itkMersenneTwisterRandomVariateGenerator.h"
+#include "itkImageScanlineIterator.h"
+#include "itkProgressReporter.h"
+
+namespace itk
+{
+
+template <class TInputImage, class TOutputImage>
+SaltAndPepperNoiseImageFilter<TInputImage, TOutputImage>
+::SaltAndPepperNoiseImageFilter()
+{
+  m_Probability = 0.01;
+}
+
+template <class TInputImage, class TOutputImage>
+void
+SaltAndPepperNoiseImageFilter<TInputImage, TOutputImage>
+::ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
+{
+  const InputImageType* inputPtr = this->GetInput();
+  OutputImageType*      outputPtr = this->GetOutput(0);
+
+  // create a random generator per thread
+  typename Statistics::MersenneTwisterRandomVariateGenerator::Pointer rand =
+    Statistics::MersenneTwisterRandomVariateGenerator::New();
+  const uint32_t seed = Self::Hash(this->GetSeed(),threadId);
+  rand->Initialize(seed);
+
+  // 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
+  InputImageRegionType inputRegionForThread;
+  this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread);
+
+  // Define the iterators
+  ImageScanlineConstIterator<TInputImage> inputIt(inputPtr, inputRegionForThread);
+  ImageScanlineIterator<TOutputImage>     outputIt(outputPtr, outputRegionForThread);
+
+  ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels() );
+
+  inputIt.GoToBegin();
+  outputIt.GoToBegin();
+
+  while ( !inputIt.IsAtEnd() )
+    {
+    while ( !inputIt.IsAtEndOfLine() )
+      {
+      if( rand->GetVariate() < m_Probability )
+        {
+        if( rand->GetVariate() < 0.5 )
+          {
+          // salt
+          outputIt.Set( NumericTraits<OutputImagePixelType>::max() );
+          }
+        else
+          {
+          // pepper
+          outputIt.Set( NumericTraits<OutputImagePixelType>::NonpositiveMin() );
+          }
+        }
+      else
+        {
+        // keep the data unchanged
+        outputIt.Set( (OutputImagePixelType) inputIt.Get() );
+        }
+      ++inputIt;
+      ++outputIt;
+      }
+    inputIt.NextLine();
+    outputIt.NextLine();
+    progress.CompletedPixel();  // potential exception thrown here
+    }
+}
+
+template <class TInputImage, class TOutputImage>
+void
+SaltAndPepperNoiseImageFilter<TInputImage, TOutputImage>
+::PrintSelf(std::ostream& os,
+            Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  os << indent << "Probability: "
+     << static_cast<typename NumericTraits<double>::PrintType>(this->GetProbability() )
+     << std::endl;
+}
+
+} /* namespace itk */
+
+#endif //  __itkSaltAndPepperNoiseImageFilter_hxx
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.h
new file mode 100644
index 0000000..2b8ae39
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.h
@@ -0,0 +1,109 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkShotNoiseImageFilter_h
+#define __itkShotNoiseImageFilter_h
+
+#include "itkNoiseBaseImageFilter.h"
+
+namespace itk
+{
+
+/** \class ShotNoiseImageFilter
+ *
+ * \brief Alter an image with shot noise.
+ *
+ * The shot noise follows a Poisson distribution.
+ *
+ * \author Gaetan Lehmann
+ *
+ * This code was contributed in the Insight Journal paper "Noise
+ * Simulation". http://hdl.handle.net/10380/3158
+ *
+ * \ingroup ITKImageNoise
+ */
+template <class TInputImage, class TOutputImage=TInputImage>
+class ShotNoiseImageFilter :
+  public NoiseBaseImageFilter<TInputImage,TOutputImage >
+{
+public:
+  /** Standard class typedefs. */
+  typedef ShotNoiseImageFilter                             Self;
+  typedef NoiseBaseImageFilter< TInputImage,TOutputImage > Superclass;
+  typedef SmartPointer<Self>                               Pointer;
+  typedef SmartPointer<const Self>                         ConstPointer;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(ShotNoiseImageFilter, NoiseBaseImageFilter);
+
+  /** Superclass typedefs. */
+  typedef typename Superclass::OutputImageType       OutputImageType;
+  typedef typename Superclass::OutputImagePointer    OutputImagePointer;
+  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
+  typedef typename Superclass::OutputImagePixelType  OutputImagePixelType;
+
+  /** Some convenient typedefs. */
+  typedef TInputImage                           InputImageType;
+  typedef typename InputImageType::Pointer      InputImagePointer;
+  typedef typename InputImageType::ConstPointer InputImageConstPointer;
+  typedef typename InputImageType::RegionType   InputImageRegionType;
+  typedef typename InputImageType::PixelType    InputImagePixelType;
+
+  /** \brief a value to map the pixel value to the actual number of photon.
+   *
+   * This value defaults to 1.0. The scaling can be seen as the
+   * inverse of the gain used during the acquisition. The noisy signal
+   * is then scaled back to its input intensity range.
+   */
+  itkGetConstMacro(Scale, double);
+  itkSetMacro(Scale, double);
+
+#ifdef ITK_USE_CONCEPT_CHECKING
+  /** Begin concept checking */
+  itkConceptMacro(InputConvertibleToOutputCheck,
+                  (Concept::Convertible<typename TInputImage::PixelType,
+                                        typename TOutputImage::PixelType>) );
+  /** End concept checking */
+#endif
+
+protected:
+  ShotNoiseImageFilter();
+  virtual ~ShotNoiseImageFilter() {
+  }
+
+  void PrintSelf(std::ostream &os, Indent indent) const;
+
+  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId );
+
+private:
+  ShotNoiseImageFilter(const Self&); //purposely not implemented
+  void operator=(const Self&);       //purposely not implemented
+
+  double m_Scale;
+
+};
+
+} // end namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "itkShotNoiseImageFilter.hxx"
+#endif
+
+#endif
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.hxx
new file mode 100644
index 0000000..908c1d7
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkShotNoiseImageFilter.hxx
@@ -0,0 +1,123 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkShotNoiseImageFilter_hxx
+#define __itkShotNoiseImageFilter_hxx
+
+#include "itkShotNoiseImageFilter.h"
+#include "itkMersenneTwisterRandomVariateGenerator.h"
+#include "itkImageScanlineIterator.h"
+#include "itkProgressReporter.h"
+#include "itkNormalVariateGenerator.h"
+
+namespace itk
+{
+
+template <class TInputImage, class TOutputImage>
+ShotNoiseImageFilter<TInputImage, TOutputImage>
+::ShotNoiseImageFilter()
+  : m_Scale(1.0)
+{
+}
+
+template <class TInputImage, class TOutputImage>
+void
+ShotNoiseImageFilter<TInputImage, TOutputImage>
+::ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
+{
+  const InputImageType* inputPtr = this->GetInput();
+  OutputImageType*      outputPtr = this->GetOutput(0);
+
+  // create a random generator per thread
+  typename Statistics::MersenneTwisterRandomVariateGenerator::Pointer rand =
+    Statistics::MersenneTwisterRandomVariateGenerator::New();
+  const uint32_t seed = Self::Hash(this->GetSeed(),threadId);
+  rand->Initialize(seed);
+  typename Statistics::NormalVariateGenerator::Pointer randn = Statistics::NormalVariateGenerator::New();
+  randn->Initialize(*static_cast<int32_t*>( (void*)&seed) );
+
+  // 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
+  InputImageRegionType inputRegionForThread;
+  this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread);
+
+  // Define the iterators
+  ImageScanlineConstIterator<TInputImage> inputIt(inputPtr, inputRegionForThread);
+  ImageScanlineIterator<TOutputImage>     outputIt(outputPtr, outputRegionForThread);
+
+  ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels() );
+
+  inputIt.GoToBegin();
+  outputIt.GoToBegin();
+
+  while ( !inputIt.IsAtEnd() )
+    {
+    while ( !inputIt.IsAtEndOfLine() )
+      {
+      const double in = m_Scale * inputIt.Get();
+
+      // The value of >=50, is the lambda value in a Poisson
+      // distribution where a Gaussian distribution make a "good"
+      // approximation of the Poisson. This could be considered to be
+      // exposed as an advance parameter in the future.
+      if( in < 50 )
+        {
+        const double L = std::exp( -in );
+        long         k = 0;
+        double       p = 1.0;
+
+        do
+          {
+          k += 1;
+          p *= rand->GetVariate();
+          }
+        while( p > L );
+
+        // clip the output to the actual supported range
+        outputIt.Set( Self::ClampCast( (k-1)/m_Scale ) );
+        }
+      else
+        {
+        const double out = in + std::sqrt( in ) * randn->GetVariate();
+        outputIt.Set( Self::ClampCast( out/m_Scale ) );
+        }
+      ++inputIt;
+      ++outputIt;
+      }
+    inputIt.NextLine();
+    outputIt.NextLine();
+    progress.CompletedPixel();  // potential exception thrown here
+    }
+}
+
+template <class TInputImage, class TOutputImage>
+void
+ShotNoiseImageFilter<TInputImage, TOutputImage>
+::PrintSelf(std::ostream& os,
+            Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  os << indent << "Scale: "
+     << static_cast<typename NumericTraits<double>::PrintType>(this->GetScale() )
+     << std::endl;
+}
+
+} /* namespace itk */
+
+#endif // __itkShotNoiseImageFilter_hxx
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.h
new file mode 100644
index 0000000..22d8f5a
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.h
@@ -0,0 +1,105 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+
+#ifndef __itkSpeckleNoiseImageFilter_h
+#define __itkSpeckleNoiseImageFilter_h
+
+#include "itkNoiseBaseImageFilter.h"
+
+namespace itk
+{
+
+/** \class SpeckleNoiseImageFilter
+ *
+ * \brief Alter an image with speckle (multiplicative) noise.
+ *
+ * The speckle noise follows a Gamma distribution of mean 1 and standard deviation
+ * provided by the user. The noise is proportional to the pixel intensity.
+ *
+ * \author Gaetan Lehmann
+ *
+ * This code was contributed in the Insight Journal paper "Noise
+ * Simulation". http://hdl.handle.net/10380/3158
+ *
+ * \ingroup ITKImageNoise
+ */
+template <class TInputImage, class TOutputImage=TInputImage>
+class SpeckleNoiseImageFilter :
+  public NoiseBaseImageFilter<TInputImage,TOutputImage >
+{
+public:
+  /** Standard class typedefs. */
+  typedef SpeckleNoiseImageFilter                          Self;
+  typedef NoiseBaseImageFilter< TInputImage,TOutputImage > Superclass;
+  typedef SmartPointer<Self>                               Pointer;
+  typedef SmartPointer<const Self>                         ConstPointer;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(SpeckleNoiseImageFilter, NoiseBaseImageFilter);
+
+  /** Superclass typedefs. */
+  typedef typename Superclass::OutputImageType       OutputImageType;
+  typedef typename Superclass::OutputImagePointer    OutputImagePointer;
+  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
+  typedef typename Superclass::OutputImagePixelType  OutputImagePixelType;
+
+  /** Some convenient typedefs. */
+  typedef TInputImage                           InputImageType;
+  typedef typename InputImageType::Pointer      InputImagePointer;
+  typedef typename InputImageType::ConstPointer InputImageConstPointer;
+  typedef typename InputImageType::RegionType   InputImageRegionType;
+  typedef typename InputImageType::PixelType    InputImagePixelType;
+
+  itkGetConstMacro(StandardDeviation, double);
+  itkSetMacro(StandardDeviation, double);
+
+#ifdef ITK_USE_CONCEPT_CHECKING
+  /** Begin concept checking */
+  itkConceptMacro(InputConvertibleToOutputCheck,
+                  (Concept::Convertible<typename TInputImage::PixelType,
+                                        typename TOutputImage::PixelType>) );
+  /** End concept checking */
+#endif
+
+protected:
+  SpeckleNoiseImageFilter();
+  virtual ~SpeckleNoiseImageFilter() {
+  }
+
+  void PrintSelf(std::ostream &os, Indent indent) const;
+
+  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId );
+
+private:
+  SpeckleNoiseImageFilter(const Self&); //purposely not implemented
+  void operator=(const Self&);          //purposely not implemented
+
+  double m_StandardDeviation;
+
+};
+
+} // end namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "itkSpeckleNoiseImageFilter.hxx"
+#endif
+
+#endif
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.hxx
new file mode 100644
index 0000000..5fba05f
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/include/itkSpeckleNoiseImageFilter.hxx
@@ -0,0 +1,134 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+
+#ifndef __itkSpeckleNoiseImageFilter_hxx
+#define __itkSpeckleNoiseImageFilter_hxx
+
+#include "itkSpeckleNoiseImageFilter.h"
+#include "itkMersenneTwisterRandomVariateGenerator.h"
+#include "itkImageScanlineIterator.h"
+#include "itkProgressReporter.h"
+
+namespace itk
+{
+
+template <class TInputImage, class TOutputImage>
+SpeckleNoiseImageFilter<TInputImage, TOutputImage>
+::SpeckleNoiseImageFilter()
+{
+  m_StandardDeviation = 1.0;
+}
+
+template <class TInputImage, class TOutputImage>
+void
+SpeckleNoiseImageFilter<TInputImage, TOutputImage>
+::ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
+{
+  const InputImageType* inputPtr = this->GetInput();
+  OutputImageType*      outputPtr = this->GetOutput(0);
+
+  // create a random generator per thread
+  typename Statistics::MersenneTwisterRandomVariateGenerator::Pointer rand =
+    Statistics::MersenneTwisterRandomVariateGenerator::New();
+  const uint32_t seed = Self::Hash(this->GetSeed(),threadId);
+  rand->Initialize(seed);
+
+  // 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
+  InputImageRegionType inputRegionForThread;
+  this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread);
+
+  // Define the iterators
+  ImageScanlineConstIterator<TInputImage> inputIt(inputPtr, inputRegionForThread);
+  ImageScanlineIterator<TOutputImage>     outputIt(outputPtr, outputRegionForThread);
+
+  ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels() );
+
+  inputIt.GoToBegin();
+  outputIt.GoToBegin();
+
+  // choose the value of the gamma distribution so that the mean is 1 and the
+  // variance depend
+  // on m_StandardDeviation
+  const double theta = m_StandardDeviation * m_StandardDeviation;
+  const double k = 1 / theta;
+
+  const double floork = Math::Floor<double>( k );
+  const double delta = k - floork;
+  const double v0 = Math::e / ( Math::e + delta );
+
+  while ( !inputIt.IsAtEnd() )
+    {
+    while ( !inputIt.IsAtEndOfLine() )
+      {
+      // first generate the gamma distributed random variable
+      // ref http://en.wikipedia.org/wiki/Gamma_distribution#Generating_gamma-distributed_random_variables
+      double xi;
+      double nu;
+      do
+        {
+        const double v1 = 1.0 - rand->GetVariateWithOpenUpperRange(); // open *lower* range -- (0,1]
+        const double v2 = 1.0 - rand->GetVariateWithOpenUpperRange();
+        const double v3 = 1.0 - rand->GetVariateWithOpenUpperRange();
+        if( v1 <= v0 )
+          {
+          xi = std::pow( v2, 1 / delta );
+          nu = v3 * std::pow( xi, delta - 1.0 );
+          }
+        else
+          {
+          xi = 1.0 - std::log( v2 );
+          nu = v3 * std::exp( -xi );
+          }
+        }
+      while( nu > std::exp( -xi ) * std::pow( xi, delta - 1.0 ) );
+      double gamma = xi;
+      for( int i=0; i<floork; i++ )
+        {
+        gamma -= std::log( 1.0 - rand->GetVariateWithOpenUpperRange() );
+        }
+      gamma *= theta;
+      // ok, so now apply multiplicative noise
+      const double out = gamma * inputIt.Get();
+      outputIt.Set( Self::ClampCast( out )  );
+      ++inputIt;
+      ++outputIt;
+      }
+    inputIt.NextLine();
+    outputIt.NextLine();
+    progress.CompletedPixel();  // potential exception thrown here
+    }
+}
+
+template <class TInputImage, class TOutputImage>
+void
+SpeckleNoiseImageFilter<TInputImage, TOutputImage>
+::PrintSelf(std::ostream& os,
+            Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  os << indent << "StandardDeviation: "
+     << static_cast<typename NumericTraits<double>::PrintType>(this->GetStandardDeviation() )
+     << std::endl;
+}
+
+} /* namespace itk */
+
+#endif // __itkSpeckleNoiseImageFilter_hxx
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/itk-module.cmake b/Utilities/ITK/Modules/Filtering/ImageNoise/itk-module.cmake
new file mode 100644
index 0000000..45cce6c
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/itk-module.cmake
@@ -0,0 +1,13 @@
+set(DOCUMENTATION "This module con stains classes to simulate and
+evaluate noise. The classes were originally contributed via the
+Insight Journal (http://hdl.handle.net/10380/3158).")
+
+itk_module(ITKImageNoise
+  DEPENDS
+    ITKImageFilterBase
+    ITKStatistics
+  TEST_DEPENDS
+    ITKTestKernel
+  DESCRIPTION
+    "${DOCUMENTATION}"
+)
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkAdditiveGaussianNoiseImageFilter.wrap b/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkAdditiveGaussianNoiseImageFilter.wrap
new file mode 100644
index 0000000..dbe51d5
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkAdditiveGaussianNoiseImageFilter.wrap
@@ -0,0 +1,3 @@
+wrap_class("itk::AdditiveGaussianNoiseImageFilter" POINTER)
+  wrap_image_filter_scalar(2)
+end_wrap_class()
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkPeakSignalToNoiseRatioCalculator.wrap b/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkPeakSignalToNoiseRatioCalculator.wrap
new file mode 100644
index 0000000..dd9895f
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkPeakSignalToNoiseRatioCalculator.wrap
@@ -0,0 +1,3 @@
+wrap_class("itk::PeakSignalToNoiseRatioCalculator" POINTER)
+  wrap_image_filter_scalar(1)
+end_wrap_class()
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkSaltAndPepperNoiseImageFilter.wrap b/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkSaltAndPepperNoiseImageFilter.wrap
new file mode 100644
index 0000000..36d1242
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkSaltAndPepperNoiseImageFilter.wrap
@@ -0,0 +1,3 @@
+wrap_class("itk::SaltAndPepperNoiseImageFilter" POINTER)
+  wrap_image_filter_scalar(2)
+end_wrap_class()
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkShotNoiseImageFilter.wrap b/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkShotNoiseImageFilter.wrap
new file mode 100644
index 0000000..bfca9b0
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkShotNoiseImageFilter.wrap
@@ -0,0 +1,3 @@
+wrap_class("itk::ShotNoiseImageFilter" POINTER)
+  wrap_image_filter_scalar(2)
+end_wrap_class()
diff --git a/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkSpeckleNoiseImageFilter.wrap b/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkSpeckleNoiseImageFilter.wrap
new file mode 100644
index 0000000..f9f3074
--- /dev/null
+++ b/Utilities/ITK/Modules/Filtering/ImageNoise/wrapping/itkSpeckleNoiseImageFilter.wrap
@@ -0,0 +1,3 @@
+wrap_class("itk::SpeckleNoiseImageFilter" POINTER)
+  wrap_image_filter_scalar(2)
+end_wrap_class()
diff --git a/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaborImageSource.hxx b/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaborImageSource.hxx
index ad51622..eb52d0c 100644
--- a/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaborImageSource.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaborImageSource.hxx
@@ -80,7 +80,7 @@ GaborImageSource< TOutputImage >
       {
       sum += vnl_math_sqr( ( evalPoint[i] - this->m_Mean[i] ) / this->m_Sigma[i] );
       }
-    double value = vcl_exp(-0.5 * sum) * gabor->Evaluate(evalPoint[0] - this->m_Mean[0]);
+    double value = std::exp(-0.5 * sum) * gabor->Evaluate(evalPoint[0] - this->m_Mean[0]);
 
     // Set the pixel value to the function value
     outIt.Set( static_cast< PixelType >( value ) );
diff --git a/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaborKernelFunction.h b/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaborKernelFunction.h
index 5f9f511..0d0c31f 100644
--- a/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaborKernelFunction.h
+++ b/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaborKernelFunction.h
@@ -65,17 +65,17 @@ public:
   inline TRealValueType Evaluate(const TRealValueType & u) const
   {
     TRealValueType parameter = vnl_math_sqr(u / this->m_Sigma);
-    TRealValueType envelope = vcl_exp(static_cast< TRealValueType >(-0.5) * parameter);
+    TRealValueType envelope = std::exp(static_cast< TRealValueType >(-0.5) * parameter);
     TRealValueType phase = static_cast< TRealValueType >(2.0 * vnl_math::pi) * this->m_Frequency * u
                    + this->m_PhaseOffset;
 
     if ( this->m_CalculateImaginaryPart )
       {
-      return envelope * vcl_sin(phase);
+      return envelope * std::sin(phase);
       }
     else
       {
-      return envelope * vcl_cos(phase);
+      return envelope * std::cos(phase);
       }
   }
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaussianImageSource.hxx b/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaussianImageSource.hxx
index e75682c..25546a7 100644
--- a/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaussianImageSource.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageSources/include/itkGaussianImageSource.hxx
@@ -133,7 +133,6 @@ GaussianImageSource< TOutputImage >
 
   // Create and initialize a new gaussian function
   typedef itk::GaussianSpatialFunction< double, NDimensions > FunctionType;
-  typedef typename FunctionType::InputType                    FunctionPositionType;
   typename FunctionType::Pointer pGaussian = FunctionType::New();
 
   pGaussian->SetSigma(m_Sigma);
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkAdaptiveHistogramEqualizationImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkAdaptiveHistogramEqualizationImageFilter.hxx
index d6698b7..61aa373 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkAdaptiveHistogramEqualizationImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkAdaptiveHistogramEqualizationImageFilter.hxx
@@ -42,7 +42,7 @@ AdaptiveHistogramEqualizationImageFilter< TImageType >
   s = vnl_math_sgn(u - v);
   ad = vnl_math_abs( 2.0 * ( u - v ) );
 
-  return 0.5 *s *vcl_pow(ad, m_Alpha) - m_Beta * 0.5 * s * ad + m_Beta * u;
+  return 0.5 *s *std::pow(ad, m_Alpha) - m_Beta * 0.5 * s * ad + m_Beta * u;
 }
 
 template< typename TImageType >
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.h b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.h
index da7630a..245baa8 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.h
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.h
@@ -78,7 +78,7 @@ public:
 protected:
   HistogramAlgorithmBase();
   virtual ~HistogramAlgorithmBase() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   virtual void Compute() = 0;
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.hxx b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.hxx
index 8de6140..26bf6dc 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkHistogramAlgorithmBase.hxx
@@ -26,7 +26,7 @@ template< typename TInputHistogram >
 HistogramAlgorithmBase< TInputHistogram >
 ::HistogramAlgorithmBase()
 {
-  m_InputHistogram = 0;
+  m_InputHistogram = ITK_NULLPTR;
 }
 
 template< typename TInputHistogram >
@@ -36,15 +36,8 @@ HistogramAlgorithmBase< TInputHistogram >
 {
   Superclass::PrintSelf(os, indent);
 
-  os << indent << "Input Histogram: ";
-  if ( m_InputHistogram.IsNotNull() )
-    {
-    os << m_InputHistogram << std::endl;
-    }
-  else
-    {
-    os << "not set." << std::endl;
-    }
+  itkPrintSelfObjectMacro(InputHistogram);
+
 }
 } // end of namespace itk
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h
index eb486c1..2a08fe5 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h
@@ -202,7 +202,7 @@ public:
 protected:
   ImageMomentsCalculator();
   virtual ~ImageMomentsCalculator();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   ImageMomentsCalculator(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx
index 89b19fb..962c152 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx
@@ -53,8 +53,8 @@ template< typename TImage >
 ImageMomentsCalculator< TImage >::ImageMomentsCalculator(void)
 {
   m_Valid = false;
-  m_Image = NULL;
-  m_SpatialObjectMask = NULL;
+  m_Image = ITK_NULLPTR;
+  m_SpatialObjectMask = ITK_NULLPTR;
   m_M0 = NumericTraits< ScalarType >::Zero;
   m_M1.Fill(NumericTraits< typename VectorType::ValueType >::Zero);
   m_M2.Fill(NumericTraits< typename MatrixType::ValueType >::Zero);
@@ -183,7 +183,7 @@ ImageMomentsCalculator< TImage >::Compute()
   vnl_diag_matrix< double >           pm = eigen.D;
   for ( unsigned int i = 0; i < ImageDimension; i++ )
     {
-    m_Pm[i] = pm(i, i) * m_M0;
+    m_Pm[i] = pm(i) * m_M0;
     }
   m_Pa = eigen.V.transpose();
 
@@ -195,7 +195,7 @@ ImageMomentsCalculator< TImage >::Compute()
 
   for ( unsigned int i = 0; i < ImageDimension; i++ )
     {
-    det *= eigenval(i, i);
+    det *= eigenval(i);
     }
 
   for ( unsigned int i = 0; i < ImageDimension; i++ )
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h
index 9d3aae0..678c1fa 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.h
@@ -129,7 +129,7 @@ public:
 protected:
   ImagePCADecompositionCalculator();
   virtual ~ImagePCADecompositionCalculator() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   void CalculateBasisMatrix(void);
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx
index 5ee1885..ce442da 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkImagePCADecompositionCalculator.hxx
@@ -30,8 +30,8 @@ template< typename TInputImage, typename TBasisImage >
 ImagePCADecompositionCalculator< TInputImage, TBasisImage >
 ::ImagePCADecompositionCalculator()
 {
-  m_Image = NULL;
-  m_MeanImage = NULL;
+  m_Image = ITK_NULLPTR;
+  m_MeanImage = ITK_NULLPTR;
   m_BasisMatrixCalculated = false;
   m_NumPixels = 0;
 }
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.h
index 443f0fa..f36663f 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.h
@@ -196,9 +196,6 @@ protected:
   /** Multi-thread version GenerateData. */
   void ThreadedGenerateData( const RegionType&, ThreadIdType );
 
-  // Override since the filter needs all the data for the algorithm
-  void GenerateInputRequestedRegion();
-
   // Override since the filter produces all of its output
   void EnlargeOutputRequestedRegion( DataObject *data );
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.hxx
index b62ceb9..30cd66e 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.hxx
@@ -36,26 +36,6 @@ LabelOverlapMeasuresImageFilter<TLabelImage>
 template<typename TLabelImage>
 void
 LabelOverlapMeasuresImageFilter<TLabelImage>
-::GenerateInputRequestedRegion()
-{
-  Superclass::GenerateInputRequestedRegion();
-  if( this->GetSourceImage() )
-    {
-    LabelImagePointer source = const_cast
-      <LabelImageType *>( this->GetSourceImage() );
-    source->SetRequestedRegionToLargestPossibleRegion();
-    }
-  if( this->GetTargetImage() )
-    {
-    LabelImagePointer target = const_cast
-      <LabelImageType *>( this->GetTargetImage() );
-    target->SetRequestedRegionToLargestPossibleRegion();
-    }
-}
-
-template<typename TLabelImage>
-void
-LabelOverlapMeasuresImageFilter<TLabelImage>
 ::EnlargeOutputRequestedRegion( DataObject *data )
 {
   Superclass::EnlargeOutputRequestedRegion( data );
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h
index d0e72d4..b57447a 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.h
@@ -140,7 +140,7 @@ public:
         m_BoundingBox[i] = NumericTraits< IndexValueType >::max();
         m_BoundingBox[i + 1] = NumericTraits< IndexValueType >::NonpositiveMin();
         }
-      m_Histogram = 0;
+      m_Histogram = ITK_NULLPTR;
     }
 
     // constructor with histogram enabled
@@ -346,9 +346,6 @@ protected:
                              outputRegionForThread,
                              ThreadIdType threadId);
 
-  // Override since the filter needs all the data for the algorithm
-  void GenerateInputRequestedRegion();
-
   // Override since the filter produces all of its output
   void EnlargeOutputRequestedRegion(DataObject *data);
 
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx
index 4e21957..3122835 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx
@@ -19,8 +19,8 @@
 #define __itkLabelStatisticsImageFilter_hxx
 #include "itkLabelStatisticsImageFilter.h"
 
-#include "itkImageRegionIterator.h"
-#include "itkImageRegionConstIteratorWithIndex.h"
+#include "itkImageLinearConstIteratorWithIndex.h"
+#include "itkImageScanlineConstIterator.h"
 #include "itkProgressReporter.h"
 
 namespace itk
@@ -41,29 +41,6 @@ LabelStatisticsImageFilter< TInputImage, TLabelImage >
 template< typename TInputImage, typename TLabelImage >
 void
 LabelStatisticsImageFilter< TInputImage, TLabelImage >
-::GenerateInputRequestedRegion()
-{
-  Superclass::GenerateInputRequestedRegion();
-  if ( this->GetInput() )
-    {
-    InputImagePointer image =
-      const_cast< typename Superclass::InputImageType * >( this->GetInput() );
-    if ( image )
-      {
-      image->SetRequestedRegionToLargestPossibleRegion();
-      }
-    }
-  if ( this->GetLabelInput() )
-    {
-    LabelImagePointer label =
-      const_cast< TLabelImage * >( this->GetLabelInput() );
-    label->SetRequestedRegionToLargestPossibleRegion();
-    }
-}
-
-template< typename TInputImage, typename TLabelImage >
-void
-LabelStatisticsImageFilter< TInputImage, TLabelImage >
 ::EnlargeOutputRequestedRegion(DataObject *data)
 {
   Superclass::EnlargeOutputRequestedRegion(data);
@@ -153,31 +130,34 @@ LabelStatisticsImageFilter< TInputImage, TLabelImage >
           }
         }
 
+
+      typename MapType::mapped_type &labelStats = ( *mapIt ).second;
+
       // accumulate the information from this thread
-      ( *mapIt ).second.m_Count += ( *threadIt ).second.m_Count;
-      ( *mapIt ).second.m_Sum += ( *threadIt ).second.m_Sum;
-      ( *mapIt ).second.m_SumOfSquares += ( *threadIt ).second.m_SumOfSquares;
+      labelStats.m_Count += ( *threadIt ).second.m_Count;
+      labelStats.m_Sum += ( *threadIt ).second.m_Sum;
+      labelStats.m_SumOfSquares += ( *threadIt ).second.m_SumOfSquares;
 
-      if ( ( *mapIt ).second.m_Minimum > ( *threadIt ).second.m_Minimum )
+      if ( labelStats.m_Minimum > ( *threadIt ).second.m_Minimum )
         {
-        ( *mapIt ).second.m_Minimum = ( *threadIt ).second.m_Minimum;
+        labelStats.m_Minimum = ( *threadIt ).second.m_Minimum;
         }
-      if ( ( *mapIt ).second.m_Maximum < ( *threadIt ).second.m_Maximum )
+      if ( labelStats.m_Maximum < ( *threadIt ).second.m_Maximum )
         {
-        ( *mapIt ).second.m_Maximum = ( *threadIt ).second.m_Maximum;
+        labelStats.m_Maximum = ( *threadIt ).second.m_Maximum;
         }
 
       //bounding box is min,max pairs
-      int dimension = ( *mapIt ).second.m_BoundingBox.size() / 2;
+      int dimension = labelStats.m_BoundingBox.size() / 2;
       for ( int ii = 0; ii < ( dimension * 2 ); ii += 2 )
         {
-        if ( ( *mapIt ).second.m_BoundingBox[ii] > ( *threadIt ).second.m_BoundingBox[ii] )
+        if ( labelStats.m_BoundingBox[ii] > ( *threadIt ).second.m_BoundingBox[ii] )
           {
-          ( *mapIt ).second.m_BoundingBox[ii] = ( *threadIt ).second.m_BoundingBox[ii];
+          labelStats.m_BoundingBox[ii] = ( *threadIt ).second.m_BoundingBox[ii];
           }
-        if ( ( *mapIt ).second.m_BoundingBox[ii + 1] < ( *threadIt ).second.m_BoundingBox[ii + 1] )
+        if ( labelStats.m_BoundingBox[ii + 1] < ( *threadIt ).second.m_BoundingBox[ii + 1] )
           {
-          ( *mapIt ).second.m_BoundingBox[ii + 1] = ( *threadIt ).second.m_BoundingBox[ii + 1];
+          labelStats.m_BoundingBox[ii + 1] = ( *threadIt ).second.m_BoundingBox[ii + 1];
           }
         }
 
@@ -189,7 +169,7 @@ LabelStatisticsImageFilter< TInputImage, TLabelImage >
         for ( unsigned int bin = 0; bin < m_NumBins[0]; bin++ )
           {
           index[0] = bin;
-          ( *mapIt ).second.m_Histogram->IncreaseFrequency( bin, ( *threadIt ).second.m_Histogram->GetFrequency(bin) );
+          labelStats.m_Histogram->IncreaseFrequency( bin, ( *threadIt ).second.m_Histogram->GetFrequency(bin) );
           }
         }
       } // end of thread map iterator loop
@@ -200,12 +180,14 @@ LabelStatisticsImageFilter< TInputImage, TLabelImage >
         mapIt != m_LabelStatistics.end();
         ++mapIt )
     {
+    typename MapType::mapped_type &labelStats = ( *mapIt ).second;
+
     // mean
-    ( *mapIt ).second.m_Mean = ( *mapIt ).second.m_Sum
-                               / static_cast< RealType >( ( *mapIt ).second.m_Count );
+    labelStats.m_Mean = labelStats.m_Sum
+                               / static_cast< RealType >( labelStats.m_Count );
 
     // variance
-    if ( ( *mapIt ).second.m_Count > 1 )
+    if ( labelStats.m_Count > 1 )
       {
       // unbiased estimate of variance
       LabelStatistics & ls = mapIt->second;
@@ -216,11 +198,11 @@ LabelStatisticsImageFilter< TInputImage, TLabelImage >
       }
     else
       {
-      ( *mapIt ).second.m_Variance = NumericTraits< RealType >::Zero;
+      labelStats.m_Variance = NumericTraits< RealType >::Zero;
       }
 
     // sigma
-    ( *mapIt ).second.m_Sigma = vcl_sqrt( ( *mapIt ).second.m_Variance );
+    labelStats.m_Sigma = std::sqrt( labelStats.m_Variance );
     }
 
     {
@@ -242,85 +224,103 @@ LabelStatisticsImageFilter< TInputImage, TLabelImage >
 ::ThreadedGenerateData(const RegionType & outputRegionForThread,
                        ThreadIdType threadId)
 {
-  RealType       value;
-  LabelPixelType label;
 
-  ImageRegionConstIteratorWithIndex< TInputImage > it (this->GetInput(),
+  typename HistogramType::IndexType histogramIndex(1);
+  typename HistogramType::MeasurementVectorType histogramMeasurement(1);
+
+  const SizeValueType size0 = outputRegionForThread.GetSize(0);
+  if( size0 == 0)
+    {
+    return;
+    }
+
+  ImageLinearConstIteratorWithIndex< TInputImage > it (this->GetInput(),
                                                        outputRegionForThread);
-  ImageRegionConstIterator< TLabelImage > labelIt (this->GetLabelInput(),
-                                                   outputRegionForThread);
+
+  ImageScanlineConstIterator< TLabelImage > labelIt (this->GetLabelInput(),
+                                                     outputRegionForThread);
+
   MapIterator mapIt;
 
   // support progress methods/callbacks
-  ProgressReporter progress( this, threadId,
-                             outputRegionForThread.GetNumberOfPixels() );
+  const size_t numberOfLinesToProcess = outputRegionForThread.GetNumberOfPixels() / size0;
+  ProgressReporter progress( this, threadId, numberOfLinesToProcess );
 
   // do the work
   while ( !it.IsAtEnd() )
     {
-    value = static_cast< RealType >( it.Get() );
-    label = labelIt.Get();
-
-    // is the label already in this thread?
-    mapIt = m_LabelStatisticsPerThread[threadId].find(label);
-    if ( mapIt == m_LabelStatisticsPerThread[threadId].end() )
+    while ( !it.IsAtEndOfLine() )
       {
-      // create a new statistics object
-      typedef typename MapType::value_type MapValueType;
-      if ( m_UseHistograms )
+      const RealType & value = static_cast< RealType >( it.Get() );
+
+      const LabelPixelType & label = labelIt.Get();
+
+      // is the label already in this thread?
+      mapIt = m_LabelStatisticsPerThread[threadId].find(label);
+      if ( mapIt == m_LabelStatisticsPerThread[threadId].end() )
+        {
+        // create a new statistics object
+        typedef typename MapType::value_type MapValueType;
+        if ( m_UseHistograms )
+          {
+          mapIt = m_LabelStatisticsPerThread[threadId].insert( MapValueType( label,
+                                                                             LabelStatistics(m_NumBins[0], m_LowerBound,
+                                                                                             m_UpperBound) ) ).first;
+          }
+        else
+          {
+          mapIt = m_LabelStatisticsPerThread[threadId].insert( MapValueType( label,
+                                                                             LabelStatistics() ) ).first;
+          }
+        }
+
+      typename MapType::mapped_type &labelStats = ( *mapIt ).second;
+
+      // update the values for this label and this thread
+      if ( value < labelStats.m_Minimum )
         {
-        mapIt = m_LabelStatisticsPerThread[threadId].insert( MapValueType( label,
-                                                                           LabelStatistics(m_NumBins[0], m_LowerBound,
-                                                                                           m_UpperBound) ) ).first;
+        labelStats.m_Minimum = value;
         }
-      else
+      if ( value > labelStats.m_Maximum )
         {
-        mapIt = m_LabelStatisticsPerThread[threadId].insert( MapValueType( label,
-                                                                           LabelStatistics() ) ).first;
+        labelStats.m_Maximum = value;
         }
-      }
-
-    // update the values for this label and this thread
-    if ( value < ( *mapIt ).second.m_Minimum )
-      {
-      ( *mapIt ).second.m_Minimum = value;
-      }
-    if ( value > ( *mapIt ).second.m_Maximum )
-      {
-      ( *mapIt ).second.m_Maximum = value;
-      }
 
-    // bounding box is min,max pairs
-    for ( unsigned int i = 0; i < ( 2 * it.GetImageDimension() ); i += 2 )
-      {
-      typename ImageRegionConstIteratorWithIndex< TInputImage >::IndexType index = it.GetIndex();
-      if ( ( *mapIt ).second.m_BoundingBox[i] > index[i / 2] )
+      // bounding box is min,max pairs
+      for ( unsigned int i = 0; i < ( 2 * TInputImage::ImageDimension ); i += 2 )
         {
-        ( *mapIt ).second.m_BoundingBox[i] = index[i / 2];
+        const IndexType & index = it.GetIndex();
+        if ( labelStats.m_BoundingBox[i] > index[i / 2] )
+          {
+          labelStats.m_BoundingBox[i] = index[i / 2];
+          }
+        if ( labelStats.m_BoundingBox[i + 1] < index[i / 2] )
+          {
+          labelStats.m_BoundingBox[i + 1] = index[i / 2];
+          }
         }
-      if ( ( *mapIt ).second.m_BoundingBox[i + 1] < index[i / 2] )
+
+      labelStats.m_Sum += value;
+      labelStats.m_SumOfSquares += ( value * value );
+      labelStats.m_Count++;
+
+      // if enabled, update the histogram for this label
+      if ( m_UseHistograms )
         {
-        ( *mapIt ).second.m_BoundingBox[i + 1] = index[i / 2];
+        histogramMeasurement[0] = value;
+        labelStats.m_Histogram->GetIndex(histogramMeasurement, histogramIndex);
+        labelStats.m_Histogram->IncreaseFrequencyOfIndex(histogramIndex, 1);
         }
-      }
 
-    ( *mapIt ).second.m_Sum += value;
-    ( *mapIt ).second.m_SumOfSquares += ( value * value );
-    ( *mapIt ).second.m_Count++;
 
-    // if enabled, update the histogram for this label
-    if ( m_UseHistograms )
-      {
-      typename HistogramType::MeasurementVectorType meas;
-      meas.SetSize(1);
-      meas[0] = value;
-      ( *mapIt ).second.m_Histogram->IncreaseFrequencyOfMeasurement(meas, 1);
+      ++labelIt;
+      ++it;
       }
-
-    ++it;
-    ++labelIt;
+    labelIt.NextLine();
+    it.NextLine();
     progress.CompletedPixel();
     }
+
 }
 
 template< typename TInputImage, typename TLabelImage >
@@ -563,7 +563,7 @@ LabelStatisticsImageFilter< TInputImage, TLabelImage >
   if ( mapIt == m_LabelStatistics.end() )
     {
     // label does not exist, return a default value
-    return 0;
+    return ITK_NULLPTR;
     }
   else
     {
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h
index 768c3de..fef3bba 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkStandardDeviationProjectionImageFilter.h
@@ -88,7 +88,7 @@ public:
       {
       squaredSum += vnl_math_sqr(*it - mean);
       }
-    return vcl_sqrt( squaredSum / ( m_Size - 1 ) );
+    return std::sqrt( squaredSum / ( m_Size - 1 ) );
   }
 
   TAccumulate                m_Sum;
diff --git a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.hxx b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.hxx
index 6b3debb..ec918ee 100644
--- a/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/ImageStatistics/include/itkStatisticsImageFilter.hxx
@@ -287,7 +287,7 @@ StatisticsImageFilter< TInputImage >
   // unbiased estimate
   variance = ( sumOfSquares - ( sum * sum / static_cast< RealType >( count ) ) )
              / ( static_cast< RealType >( count ) - 1 );
-  sigma = vcl_sqrt(variance);
+  sigma = std::sqrt(variance);
 
   // Set the outputs
   this->GetMinimumOutput()->Set(minimum);
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h
index e5785a3..7b47fa6 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h
@@ -120,7 +120,7 @@ public:
 
     // copy the data of the current type if possible
     const Self * src = dynamic_cast<const Self *>( lo );
-    if( src == NULL )
+    if( src == ITK_NULLPTR )
       {
       return;
       }
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryGrindPeakImageFilter.hxx b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryGrindPeakImageFilter.hxx
index 0ff79ec..e7e69e3 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryGrindPeakImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryGrindPeakImageFilter.hxx
@@ -81,7 +81,7 @@ BinaryGrindPeakImageFilter<TInputImage>
   labelizer->SetOutputBackgroundValue( m_BackgroundValue );
   labelizer->SetFullyConnected( m_FullyConnected );
   labelizer->SetNumberOfThreads( this->GetNumberOfThreads() );
-  progress->RegisterInternalFilter(labelizer, .6f);
+  progress->RegisterInternalFilter(labelizer, .65f);
 
   typedef typename LabelizerType::OutputImageType                  LabelMapType;
   typedef typename itk::ShapeOpeningLabelMapFilter< LabelMapType > OpeningType;
@@ -99,7 +99,7 @@ BinaryGrindPeakImageFilter<TInputImage>
   binarizer->SetBackgroundValue( m_BackgroundValue );
   binarizer->SetBackgroundImage( this->GetInput() );
   binarizer->SetNumberOfThreads( this->GetNumberOfThreads() );
-  progress->RegisterInternalFilter(binarizer, .2f);
+  progress->RegisterInternalFilter(binarizer, .25f);
 
   binarizer->GraftOutput( this->GetOutput() );
   binarizer->Update();
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx
index 244aa8e..1cd20b8 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryImageToLabelMapFilter.hxx
@@ -368,7 +368,7 @@ BinaryImageToLabelMapFilter< TInputImage, TOutputImage >
     }
 
   this->m_NumberOfLabels.clear();
-  this->m_Barrier = NULL;
+  this->m_Barrier = ITK_NULLPTR;
 
   m_LineMap.clear();
 }
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.hxx b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.hxx
index c9baf2d..2c1990b 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryShapeKeepNObjectsImageFilter.hxx
@@ -25,13 +25,14 @@ namespace itk
 {
 template< typename TInputImage >
 BinaryShapeKeepNObjectsImageFilter< TInputImage >
-::BinaryShapeKeepNObjectsImageFilter()
+::BinaryShapeKeepNObjectsImageFilter() :
+  m_FullyConnected(false),
+  m_BackgroundValue(NumericTraits< OutputImagePixelType >::NonpositiveMin()),
+  m_ForegroundValue(NumericTraits< OutputImagePixelType >::max()),
+  m_NumberOfObjects(0),
+  m_ReverseOrdering(false),
+  m_Attribute(LabelObjectType::NUMBER_OF_PIXELS)
 {
-  m_BackgroundValue = NumericTraits< OutputImagePixelType >::NonpositiveMin();
-  m_ForegroundValue = NumericTraits< OutputImagePixelType >::max();
-  m_FullyConnected = false;
-  m_ReverseOrdering = false;
-  m_Attribute = LabelObjectType::NUMBER_OF_PIXELS;
 }
 
 template< typename TInputImage >
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.hxx b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.hxx
index ba2d79c..cadae9a 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkBinaryStatisticsKeepNObjectsImageFilter.hxx
@@ -25,13 +25,14 @@ namespace itk
 {
 template< typename TInputImage, typename TFeatureImage >
 BinaryStatisticsKeepNObjectsImageFilter< TInputImage, TFeatureImage >
-::BinaryStatisticsKeepNObjectsImageFilter()
+::BinaryStatisticsKeepNObjectsImageFilter() :
+  m_FullyConnected(false),
+  m_BackgroundValue(NumericTraits< OutputImagePixelType >::NonpositiveMin()),
+  m_ForegroundValue(NumericTraits< OutputImagePixelType >::max()),
+  m_NumberOfObjects(0),
+  m_ReverseOrdering(false),
+  m_Attribute(LabelObjectType::MEAN)
 {
-  m_BackgroundValue = NumericTraits< OutputImagePixelType >::NonpositiveMin();
-  m_ForegroundValue = NumericTraits< OutputImagePixelType >::max();
-  m_FullyConnected = false;
-  m_ReverseOrdering = false;
-  m_Attribute = LabelObjectType::MEAN;
   this->SetNumberOfRequiredInputs(2);
 }
 
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMap.h b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMap.h
index df7d096..88f4075 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMap.h
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMap.h
@@ -136,7 +136,7 @@ public:
   virtual void Initialize();
 
   /**  */
-  virtual void Allocate();
+  virtual void Allocate(bool initialize = false) ITK_OVERRIDE;
 
   virtual void Graft(const DataObject *data);
 
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMap.hxx b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMap.hxx
index 3c079a6..c533509 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMap.hxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMap.hxx
@@ -76,7 +76,7 @@ LabelMap< TLabelObject >
 template< typename TLabelObject >
 void
 LabelMap< TLabelObject >
-::Allocate()
+::Allocate(bool)
 {
   this->Initialize();
 }
@@ -86,37 +86,27 @@ void
 LabelMap< TLabelObject >
 ::Graft(const DataObject *data)
 {
+  if(data == ITK_NULLPTR)
+    {
+    return; // nothing to do
+    }
   // call the superclass' implementation
   Superclass::Graft(data);
 
-  if ( data )
-    {
-    // Attempt to cast data to an Image
-    const Self *imgData;
-
-    try
-      {
-      imgData = dynamic_cast< const Self * >( data );
-      }
-    catch ( ... )
-      {
-      return;
-      }
+  // Attempt to cast data to an Image
+  const Self *imgData = dynamic_cast< const Self * >( data );
 
-    if ( imgData )
-      {
-      // Now copy anything remaining that is needed
-      m_LabelObjectContainer = imgData->m_LabelObjectContainer;
-      m_BackgroundValue = imgData->m_BackgroundValue;
-      }
-    else
-      {
-      // pointer could not be cast back down
-      itkExceptionMacro( << "itk::Image::Graft() cannot cast "
-                         << typeid( data ).name() << " to "
-                         << typeid( const Self * ).name() );
-      }
+  if ( imgData == ITK_NULLPTR )
+    {
+    // pointer could not be cast back down
+    itkExceptionMacro( << "itk::Image::Graft() cannot cast "
+                       << typeid( data ).name() << " to "
+                       << typeid( const Self * ).name() );
     }
+
+  // Now copy anything remaining that is needed
+  m_LabelObjectContainer = imgData->m_LabelObjectContainer;
+  m_BackgroundValue = imgData->m_BackgroundValue;
 }
 
 template< typename TLabelObject >
@@ -412,7 +402,7 @@ void
 LabelMap< TLabelObject >
 ::AddLabelObject(LabelObjectType *labelObject)
 {
-  itkAssertOrThrowMacro( ( labelObject != NULL ), "Input LabelObject can't be Null" );
+  itkAssertOrThrowMacro( ( labelObject != ITK_NULLPTR ), "Input LabelObject can't be Null" );
 
   m_LabelObjectContainer[labelObject->GetLabel()] = labelObject;
   this->Modified();
@@ -423,7 +413,7 @@ void
 LabelMap< TLabelObject >
 ::PushLabelObject(LabelObjectType *labelObject)
 {
-  itkAssertOrThrowMacro( ( labelObject != NULL ), "Input LabelObject can't be Null" );
+  itkAssertOrThrowMacro( ( labelObject != ITK_NULLPTR ), "Input LabelObject can't be Null" );
 
   if ( m_LabelObjectContainer.empty() )
     {
@@ -488,7 +478,7 @@ void
 LabelMap< TLabelObject >
 ::RemoveLabelObject(LabelObjectType *labelObject)
 {
-  itkAssertOrThrowMacro( ( labelObject != NULL ), "Input LabelObject can't be Null" );
+  itkAssertOrThrowMacro( ( labelObject != ITK_NULLPTR ), "Input LabelObject can't be Null" );
   // modified is called in RemoveLabel()
   this->RemoveLabel( labelObject->GetLabel() );
 }
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx
index d6457db..4653c8d 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.hxx
@@ -30,7 +30,7 @@ template< typename TInputImage, typename TOutputImage >
 LabelMapToLabelImageFilter< TInputImage, TOutputImage >
 ::LabelMapToLabelImageFilter()
 {
-  m_OutputImage = 0;
+  m_OutputImage = ITK_NULLPTR;
 }
 
 
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObject.h b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObject.h
index a2c4d77..9dd7bac 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObject.h
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObject.h
@@ -362,7 +362,7 @@ public:
 
 protected:
   LabelObject();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   LabelObject(const Self &);    //purposely not implemented
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObject.hxx b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObject.hxx
index a9277c4..28d70f7 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObject.hxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObject.hxx
@@ -270,7 +270,7 @@ template< typename TLabel, unsigned int VImageDimension >
 void
 LabelObject< TLabel, VImageDimension >::CopyAttributesFrom(const Self *src)
 {
-  itkAssertOrThrowMacro ( ( src != NULL ), "Null Pointer" );
+  itkAssertOrThrowMacro ( ( src != ITK_NULLPTR ), "Null Pointer" );
   m_Label = src->m_Label;
 }
 
@@ -279,7 +279,7 @@ template< typename TLabel, unsigned int VImageDimension >
 void
 LabelObject< TLabel, VImageDimension >::CopyAllFrom(const Self *src)
 {
-  itkAssertOrThrowMacro ( ( src != NULL ), "Null Pointer" );
+  itkAssertOrThrowMacro ( ( src != ITK_NULLPTR ), "Null Pointer" );
   m_LineContainer = src->m_LineContainer;
   // also copy the attributes
   this->CopyAttributesFrom(src);
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObjectLine.h b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObjectLine.h
index e26118f..0054f05 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObjectLine.h
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObjectLine.h
@@ -47,9 +47,9 @@ public:
   typedef Index< VImageDimension > IndexType;
   typedef SizeValueType            LengthType;
 
-  LabelObjectLine() {}
-  virtual ~LabelObjectLine() {}
+  LabelObjectLine();
   LabelObjectLine(const IndexType & idx, const LengthType & length);
+  virtual ~LabelObjectLine() {}
 
   /**
    * Set/Get Index
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx
index a5988ed..3522359 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx
@@ -23,13 +23,19 @@
 namespace itk
 {
 template< unsigned int VImageDimension >
-LabelObjectLine< VImageDimension >::LabelObjectLine(const IndexType & idx, const LengthType & length)
+LabelObjectLine< VImageDimension >::LabelObjectLine() :
+  m_Length( NumericTraits< SizeValueType >::Zero )
 {
-  this->SetIndex(idx);
-  this->SetLength(length);
+  m_Index.Fill( NumericTraits< IndexValueType >::Zero );
 }
 
 template< unsigned int VImageDimension >
+LabelObjectLine< VImageDimension >::LabelObjectLine(const IndexType & idx, const LengthType & length) :
+  m_Index( idx ),
+  m_Length( length )
+{}
+
+template< unsigned int VImageDimension >
 void LabelObjectLine< VImageDimension >::SetIndex(const IndexType & idx)
 {
   m_Index = idx;
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.hxx b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.hxx
index d99765b..28d32c6 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkObjectByObjectLabelMapFilter.hxx
@@ -42,8 +42,8 @@ ObjectByObjectLabelMapFilter<TInputImage, TOutputImage, TInputFilter, TOutputFil
   m_KeepLabels = true;
   m_InternalForegroundValue = itk::NumericTraits< InternalOutputPixelType >::max();
 
-  m_InputFilter = NULL;
-  m_OutputFilter = NULL;
+  m_InputFilter = ITK_NULLPTR;
+  m_OutputFilter = ITK_NULLPTR;
 
 
   m_Select = SelectType::New();
@@ -80,7 +80,7 @@ ObjectByObjectLabelMapFilter<TInputImage, TOutputImage, TInputFilter, TOutputFil
 ::SetFilter( InputFilterType * filter )
 {
   OutputFilterType * outputFilter = dynamic_cast< OutputFilterType * >( filter );
-  if( outputFilter == NULL && filter != NULL )
+  if( outputFilter == ITK_NULLPTR && filter != ITK_NULLPTR )
     {
     // TODO: can it be replaced by a concept check ?
     itkExceptionMacro("Wrong output filter type. Use SetOutputFilter() and SetInputFilter() instead of SetFilter() when input and output filter types are different.");
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx
index 8445a70..ef2a5fd 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx
@@ -299,7 +299,7 @@ ShapeLabelMapFilter< TImage, TLabelImage >
   vnl_diag_matrix< double >           pm = eigen.D;
   for ( unsigned int i = 0; i < ImageDimension; i++ )
     {
-    principalMoments[i] = pm(i, i);
+    principalMoments[i] = pm(i);
     }
   MatrixType principalAxes = eigen.V.transpose();
 
@@ -311,7 +311,7 @@ ShapeLabelMapFilter< TImage, TLabelImage >
 
   for ( unsigned int i = 0; i < ImageDimension; i++ )
     {
-    det *= eigenval(i, i);
+    det *= eigenval(i);
     }
 
   for ( unsigned int i = 0; i < ImageDimension; i++ )
@@ -328,8 +328,8 @@ ShapeLabelMapFilter< TImage, TLabelImage >
     }
   else if ( principalMoments[0] != 0 )
     {
-    elongation = vcl_sqrt(principalMoments[ImageDimension - 1] / principalMoments[ImageDimension - 2]);
-    flatness = vcl_sqrt(principalMoments[1] / principalMoments[0]);
+    elongation = std::sqrt(principalMoments[ImageDimension - 1] / principalMoments[ImageDimension - 2]);
+    flatness = std::sqrt(principalMoments[1] / principalMoments[0]);
     }
 
   double physicalSize = nbOfPixels * sizePerPixel;
@@ -343,12 +343,12 @@ ShapeLabelMapFilter< TImage, TLabelImage >
     {
     edet *= principalMoments[i];
     }
-  edet = vcl_pow(edet, 1.0 / ImageDimension);
+  edet = std::pow(edet, 1.0 / ImageDimension);
   for ( unsigned int i = 0; i < ImageDimension; i++ )
     {
     if ( edet != 0.0 )
       {
-      ellipsoidDiameter[i] = 2.0 *equivalentRadius *vcl_sqrt(principalMoments[i] / edet);
+      ellipsoidDiameter[i] = 2.0 *equivalentRadius *std::sqrt(principalMoments[i] / edet);
       }
     else
       {
@@ -392,8 +392,6 @@ ShapeLabelMapFilter< TImage, TLabelImage >
   typedef typename std::deque< IndexType > IndexListType;
   IndexListType idxList;
 
-  typedef typename LabelObjectType::LengthType LengthType;
-
   typedef typename itk::ConstNeighborhoodIterator< LabelImageType > NeighborIteratorType;
   SizeType neighborHoodRadius;
   neighborHoodRadius.Fill(1);
@@ -443,7 +441,7 @@ ShapeLabelMapFilter< TImage, TLabelImage >
       for ( unsigned int i = 0; i < ImageDimension; i++ )
         {
         const OffsetValueType indexDifference = ( iIt1->operator[](i) - iIt2->operator[](i) );
-        length += vcl_pow(indexDifference * spacing[i], 2);
+        length += std::pow(indexDifference * spacing[i], 2);
         }
       if ( feretDiameter < length )
         {
@@ -452,7 +450,7 @@ ShapeLabelMapFilter< TImage, TLabelImage >
       }
     }
   // Final computation
-  feretDiameter = vcl_sqrt(feretDiameter);
+  feretDiameter = std::sqrt(feretDiameter);
 
   // Finally put the values in the label object
   labelObject->SetFeretDiameter(feretDiameter);
@@ -506,7 +504,7 @@ ShapeLabelMapFilter< TImage, TLabelImage >
   // a data structure to store the number of intercepts on each direction
   typedef typename std::map<OffsetType, SizeValueType, typename OffsetType::LexicographicCompare> MapInterceptType;
   MapInterceptType intercepts;
-  // int nbOfDirections = (int)vcl_pow( 2.0, (int)ImageDimension ) - 1;
+  // int nbOfDirections = (int)std::pow( 2.0, (int)ImageDimension ) - 1;
   // intecepts.resize(nbOfDirections + 1);  // code begins at position 1
 
   // now iterate over the vectors of lines
@@ -693,10 +691,10 @@ ShapeLabelMapFilter< TImage, TLabelImage >
   double dx = spacing[0];
   double dy = spacing[1];
   double dz = spacing[2];
-  double dxy = vcl_sqrt( spacing[0]*spacing[0] + spacing[1]*spacing[1] );
-  double dxz = vcl_sqrt( spacing[0]*spacing[0] + spacing[2]*spacing[2] );
-  double dyz = vcl_sqrt( spacing[1]*spacing[1] + spacing[2]*spacing[2] );
-  double dxyz = vcl_sqrt( spacing[0]*spacing[0] + spacing[1]*spacing[1] + spacing[2]*spacing[2] );
+  double dxy = std::sqrt( spacing[0]*spacing[0] + spacing[1]*spacing[1] );
+  double dxz = std::sqrt( spacing[0]*spacing[0] + spacing[2]*spacing[2] );
+  double dyz = std::sqrt( spacing[1]*spacing[1] + spacing[2]*spacing[2] );
+  double dxyz = std::sqrt( spacing[0]*spacing[0] + spacing[1]*spacing[1] + spacing[2]*spacing[2] );
   double vol = spacing[0]*spacing[1]*spacing[2];
 
   // 'magical numbers', corresponding to area of voronoi partition on the
@@ -748,7 +746,7 @@ ShapeLabelMapFilter< TImage, TLabelImage >
   Superclass::AfterThreadedGenerateData();
 
   // Release the label image
-  m_LabelImage = NULL;
+  m_LabelImage = ITK_NULLPTR;
 }
 
 template< typename TImage, typename TLabelImage >
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h
index 732bbd8..2d3b0ec 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h
@@ -521,7 +521,7 @@ public:
 
     // copy the data of the current type if possible
     const Self *src = dynamic_cast< const Self * >( lo );
-    if ( src == NULL )
+    if ( src == ITK_NULLPTR )
       {
       return;
       }
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.hxx b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.hxx
index 2182480..f909bc2 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkStatisticsLabelMapFilter.hxx
@@ -67,16 +67,15 @@ StatisticsLabelMapFilter< TImage, TFeatureImage >
 
   typedef typename LabelObjectType::HistogramType HistogramType;
 
-  typename HistogramType::SizeType histogramSize;
-  histogramSize.SetSize(1);
+  typename HistogramType::IndexType             histogramIndex(1);
+  typename HistogramType::MeasurementVectorType mv(1);
+  typename HistogramType::SizeType              histogramSize(1);
   histogramSize.Fill(m_NumberOfBins);
 
-  typename HistogramType::MeasurementVectorType featureImageMin;
-  featureImageMin.SetSize(1);
+  typename HistogramType::MeasurementVectorType featureImageMin(1);
   featureImageMin.Fill(m_Minimum);
 
-  typename HistogramType::MeasurementVectorType featureImageMax;
-  featureImageMax.SetSize(1);
+  typename HistogramType::MeasurementVectorType featureImageMax(1);
   featureImageMax.Fill(m_Maximum);
 
   typename HistogramType::Pointer histogram = HistogramType::New();
@@ -103,8 +102,7 @@ StatisticsLabelMapFilter< TImage, TFeatureImage >
   VectorType principalMoments;
   principalMoments.Fill(0);
 
-  typename HistogramType::MeasurementVectorType mv;
-  mv.SetSize(1);
+
   // iterate over all the indexes
   typename LabelObjectType::ConstIndexIterator it( labelObject );
   while( ! it.IsAtEnd() )
@@ -112,7 +110,8 @@ StatisticsLabelMapFilter< TImage, TFeatureImage >
     const IndexType & idx = it.GetIndex();
     const FeatureImagePixelType & v = featureImage->GetPixel(idx);
     mv[0] = v;
-    histogram->IncreaseFrequencyOfMeasurement(mv, 1);
+    histogram->GetIndex(mv, histogramIndex);
+    histogram->IncreaseFrequencyOfIndex(histogramIndex, 1);
 
     // update min and max
     if ( v <= min )
@@ -128,9 +127,9 @@ StatisticsLabelMapFilter< TImage, TFeatureImage >
 
     //increase the sums
     sum += v;
-    sum2 += vcl_pow( (double)v, 2 );
-    sum3 += vcl_pow( (double)v, 3 );
-    sum4 += vcl_pow( (double)v, 4 );
+    sum2 += std::pow( (double)v, 2 );
+    sum3 += std::pow( (double)v, 3 );
+    sum4 += std::pow( (double)v, 4 );
 
     // moments
     PointType physicalPosition;
@@ -152,11 +151,11 @@ StatisticsLabelMapFilter< TImage, TFeatureImage >
   // final computations
   const typename HistogramType::AbsoluteFrequencyType & totalFreq = histogram->GetTotalFrequency();
   const double mean = sum / totalFreq;
-  const double variance = ( sum2 - ( vcl_pow(sum, 2) / totalFreq ) ) / ( totalFreq - 1 );
-  const double sigma = vcl_sqrt(variance);
+  const double variance = ( sum2 - ( std::pow(sum, 2) / totalFreq ) ) / ( totalFreq - 1 );
+  const double sigma = std::sqrt(variance);
   const double mean2 = mean * mean;
   double skewness;
-  if(vcl_abs(variance * sigma) > itk::NumericTraits<double>::min())
+  if(std::abs(variance * sigma) > itk::NumericTraits<double>::min())
     {
     skewness = ( ( sum3 - 3.0 * mean * sum2 ) / totalFreq + 2.0 * mean * mean2 ) / ( variance * sigma );
     }
@@ -165,7 +164,7 @@ StatisticsLabelMapFilter< TImage, TFeatureImage >
     skewness = 0.0;
     }
   double kurtosis;
-  if(vcl_abs(variance) > itk::NumericTraits<double>::min())
+  if(std::abs(variance) > itk::NumericTraits<double>::min())
     {
     kurtosis = ( ( sum4 - 4.0 * mean * sum3 + 6.0 * mean2
                    * sum2 ) / totalFreq - 3.0 * mean2 * mean2 ) /
@@ -224,8 +223,8 @@ StatisticsLabelMapFilter< TImage, TFeatureImage >
     vnl_diag_matrix< double >           pm = eigen.D;
     for ( unsigned int i = 0; i < ImageDimension; i++ )
       {
-      //    principalMoments[i] = 4 * vcl_sqrt( pm(i,i) );
-      principalMoments[i] = pm(i, i);
+      //    principalMoments[i] = 4 * std::sqrt( pm(i,i) );
+      principalMoments[i] = pm(i);
       }
     principalAxes = eigen.V.transpose();
 
@@ -237,7 +236,7 @@ StatisticsLabelMapFilter< TImage, TFeatureImage >
 
     for ( unsigned int i = 0; i < ImageDimension; i++ )
       {
-      det *= eigenval(i, i);
+      det *= eigenval(i);
       }
 
     for ( unsigned int i = 0; i < ImageDimension; i++ )
@@ -254,8 +253,8 @@ StatisticsLabelMapFilter< TImage, TFeatureImage >
       {
       //    elongation = principalMoments[ImageDimension-1] /
       // principalMoments[0];
-      elongation = vcl_sqrt(principalMoments[ImageDimension - 1] / principalMoments[ImageDimension - 2]);
-      flatness = vcl_sqrt(principalMoments[1] / principalMoments[0]);
+      elongation = std::sqrt(principalMoments[ImageDimension - 1] / principalMoments[ImageDimension - 2]);
+      flatness = std::sqrt(principalMoments[1] / principalMoments[0]);
       }
     }
   else
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h
index 3cc82e4..60639d8 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h
@@ -248,7 +248,7 @@ public:
 
     // copy the data of the current type if possible
     const Self *src = dynamic_cast< const Self * >( lo );
-    if ( src == NULL )
+    if ( src == ITK_NULLPTR )
       {
       return;
       }
@@ -528,7 +528,7 @@ protected:
     m_Kurtosis = 0;
     m_Skewness = 0;
     m_WeightedElongation = 0;
-    m_Histogram = NULL;
+    m_Histogram = ITK_NULLPTR;
     m_WeightedFlatness = 0;
   }
 
@@ -553,15 +553,7 @@ protected:
     // os << indent << "CentralMoments: " << std::endl << m_CentralMoments;
     os << indent << "WeightedPrincipalMoments: " << m_WeightedPrincipalMoments << std::endl;
     os << indent << "WeightedPrincipalAxes: " << std::endl << m_WeightedPrincipalAxes;
-    os << indent << "Histogram: ";
-    if ( m_Histogram.IsNull() )
-      {
-      os << "NULL" << std::endl;
-      }
-    else
-      {
-      m_Histogram->Print(os, indent);
-      }
+    itkPrintSelfObjectMacro( Histogram );
   }
 
 private:
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/src/itkGeometryUtilities.cxx b/Utilities/ITK/Modules/Filtering/LabelMap/src/itkGeometryUtilities.cxx
index 9f811d9..171fa97 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/src/itkGeometryUtilities.cxx
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/src/itkGeometryUtilities.cxx
@@ -55,7 +55,7 @@ GeometryUtilities
     }
   else
     {
-    return vcl_sqrt(vnl_math::pi) * DoubleFactorial(n) / vcl_pow(2, ( n + 1 ) / 2.0);
+    return std::sqrt(vnl_math::pi) * DoubleFactorial(n) / std::pow(2, ( n + 1 ) / 2.0);
     }
 }
 
@@ -65,7 +65,7 @@ GeometryUtilities
 {
   const double dbldim = static_cast< double >( dim );
 
-  return vcl_pow(vnl_math::pi, dbldim * 0.5) * vcl_pow(radius, dbldim) / GammaN2p1(dim);
+  return std::pow(vnl_math::pi, dbldim * 0.5) * std::pow(radius, dbldim) / GammaN2p1(dim);
 }
 
 double
@@ -79,7 +79,7 @@ double
 GeometryUtilities
 ::HyperSphereRadiusFromVolume(const int dim, const double volume)
 {
-  return vcl_pow(volume * GammaN2p1(dim) / vcl_pow(vnl_math::pi, dim * 0.5), 1.0 / dim);
+  return std::pow(volume * GammaN2p1(dim) / std::pow(vnl_math::pi, dim * 0.5), 1.0 / dim);
 }
 
 } // end of itk namespace
diff --git a/Utilities/ITK/Modules/Filtering/LabelMap/wrapping/CMakeLists.txt b/Utilities/ITK/Modules/Filtering/LabelMap/wrapping/CMakeLists.txt
index 7cedd05..e87014f 100644
--- a/Utilities/ITK/Modules/Filtering/LabelMap/wrapping/CMakeLists.txt
+++ b/Utilities/ITK/Modules/Filtering/LabelMap/wrapping/CMakeLists.txt
@@ -10,5 +10,16 @@ set(WRAPPER_LIBRARY_GROUPS
   itkInPlaceLabelMapFilter
   itkChangeRegionLabelMapFilter
 )
+
+# Save default includes so they can be reseted afterwards
+set(tmp_default_includes ${WRAPPER_DEFAULT_INCLUDE})
+
+# Add itkStatisticsLabelObject.h, it is not automatically detected
+# (but it maybe should)
+set(WRAPPER_DEFAULT_INCLUDE ${WRAPPER_DEFAULT_INCLUDE} "itkStatisticsLabelObject.h")
+
 itk_auto_load_submodules()
 itk_end_wrap_module()
+
+# Reset the WRAPPER_DEFAULT_INCLUDE to original value
+set(WRAPPER_DEFAULT_INCLUDE ${tmp_default_includes})
diff --git a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.hxx b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.hxx
index c68b465..8382192 100644
--- a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkClosingByReconstructionImageFilter.hxx
@@ -80,6 +80,8 @@ ClosingByReconstructionImageFilter< TInputImage, TOutputImage, TKernel >
   dilate->SetInput( this->GetInput() );
   dilate->SetKernel(this->m_Kernel);
 
+  progress->RegisterInternalFilter(dilate, .5);
+
   // Delegate to a dilate filter.
   typename ReconstructionByErosionImageFilter< TInputImage, TInputImage >::Pointer
   erode = ReconstructionByErosionImageFilter< TInputImage, TInputImage >::New();
@@ -90,6 +92,7 @@ ClosingByReconstructionImageFilter< TInputImage, TOutputImage, TKernel >
 
   if ( m_PreserveIntensities )
     {
+    progress->RegisterInternalFilter(erode, .25);
     erode->Update();
     typename TInputImage::Pointer tempImage = TInputImage::New();
     tempImage->SetRegions ( dilate->GetOutput()->GetBufferedRegion() );
@@ -133,6 +136,7 @@ ClosingByReconstructionImageFilter< TInputImage, TOutputImage, TKernel >
     }
   else
     {
+    progress->RegisterInternalFilter(erode, .5);
     erode->GraftOutput( this->GetOutput() );
     erode->Update();
     this->GraftOutput( erode->GetOutput() );
diff --git a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx
index b7a6721..e8379fe 100644
--- a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx
+++ b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx
@@ -102,15 +102,15 @@ FlatStructuringElement< VDimension >
   while ( theta <= M_PI / 2.0 + 0.0001 )
     {
     LType2 O;
-    O[0] = k1 * vcl_cos(theta);
-    O[1] = k2 * vcl_sin(theta);
+    O[0] = k1 * std::cos(theta);
+    O[1] = k2 * std::sin(theta);
     if ( !res.CheckParallel(O) )
       {
       //std::cout << O << std::endl;
       res.AddLine(O);
       }
-    O[0] = k1 * vcl_cos(-theta);
-    O[1] = k2 * vcl_sin(-theta);
+    O[0] = k1 * std::cos(-theta);
+    O[1] = k2 * std::sin(-theta);
     if ( !res.CheckParallel(O) )
       {
       //std::cout << O << std::endl;
@@ -123,9 +123,9 @@ FlatStructuringElement< VDimension >
   res.ComputeBufferFromLines();
 }
 
-//    O[0] = k1 * vcl_cos(phi) * vcl_cos(theta);
-//    O[1] = k2 * vcl_cos(phi) * vcl_sin(theta);
-//    O[2] = k3 * vcl_sin(theta);
+//    O[0] = k1 * std::cos(phi) * std::cos(theta);
+//    O[1] = k2 * std::cos(phi) * std::sin(theta);
+//    O[2] = k3 * std::sin(theta);
 
 template< unsigned int VDimension >
 void
@@ -148,7 +148,7 @@ FlatStructuringElement< VDimension >
     case 12:
       {
       // dodecahedron
-      float    phi = ( 1.0 + vcl_sqrt(5.0) ) / 2.0;
+      float    phi = ( 1.0 + std::sqrt(5.0) ) / 2.0;
       float    b = 1.0 / phi;
       float    c = 2.0 - phi;
       unsigned facets = 12;
@@ -317,7 +317,7 @@ FlatStructuringElement< VDimension >
     case 20:
       {
       // Icosahedron
-      float    phi = ( 1.0 + vcl_sqrt(5.0) ) / 2.0;
+      float    phi = ( 1.0 + std::sqrt(5.0) ) / 2.0;
       float    a = 0.5;
       float    b = 1.0 / ( 2.0 * phi );
       unsigned facets = 20;
@@ -518,8 +518,8 @@ FlatStructuringElement< VDimension >
       // create triangular facet approximation to a sphere - begin with
       // unit sphere
       // total number of facets is 8 * (4^iterations)
-      unsigned int facets = 8 * (int)vcl_pow( (double)4, iterations );
-      float        sqrt2 = vcl_sqrt(2.0);
+      unsigned int facets = 8 * (int)std::pow( (double)4, iterations );
+      float        sqrt2 = std::sqrt(2.0);
       // std::cout << facets << " facets" << std::endl;
       typedef std::vector< FacetType3 > FacetArrayType;
       FacetArrayType FacetArray;
@@ -926,7 +926,7 @@ FlatStructuringElement< VDimension >::CheckParallel(LType NewVec) const
     LType LL = m_Lines[i];
     LL.Normalize();
     float L = NN * LL;
-    if ( ( 1.0 - vcl_fabs(L) ) < 0.000001 ) { return ( true ); }
+    if ( ( 1.0 - std::fabs(L) ) < 0.000001 ) { return ( true ); }
     }
   return ( false );
 }
diff --git a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx
index 8b26005..32d01aa 100644
--- a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleDilateImageFilter.hxx
@@ -55,16 +55,9 @@ void
 GrayscaleDilateImageFilter< TInputImage, TOutputImage, TKernel >
 ::SetKernel(const KernelType & kernel)
 {
-  const FlatKernelType *flatKernel = NULL;
+  const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &kernel );
 
-  try
-    {
-    flatKernel = dynamic_cast< const FlatKernelType * >( &kernel );
-    }
-  catch ( ... )
-                  {}
-
-  if ( flatKernel != NULL && flatKernel->GetDecomposable() )
+  if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() )
     {
     m_AnchorFilter->SetKernel(*flatKernel);
     m_Algorithm = ANCHOR;
@@ -119,14 +112,7 @@ void
 GrayscaleDilateImageFilter< TInputImage, TOutputImage, TKernel >
 ::SetAlgorithm(int algo)
 {
-  const FlatKernelType *flatKernel = NULL;
-
-  try
-    {
-    flatKernel = dynamic_cast< const FlatKernelType * >( &this->GetKernel() );
-    }
-  catch ( ... )
-                  {}
+  const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &this->GetKernel() );
 
   if ( m_Algorithm != algo )
     {
@@ -138,11 +124,11 @@ GrayscaleDilateImageFilter< TInputImage, TOutputImage, TKernel >
       {
       m_HistogramFilter->SetKernel( this->GetKernel() );
       }
-    else if ( flatKernel != NULL && flatKernel->GetDecomposable() && algo == ANCHOR )
+    else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == ANCHOR )
       {
       m_AnchorFilter->SetKernel(*flatKernel);
       }
-    else if ( flatKernel != NULL && flatKernel->GetDecomposable() && algo == VHGW )
+    else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == VHGW )
       {
       m_VHGWFilter->SetKernel(*flatKernel);
       }
diff --git a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx
index bddc5fc..342ff61 100644
--- a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleErodeImageFilter.hxx
@@ -55,16 +55,9 @@ void
 GrayscaleErodeImageFilter< TInputImage, TOutputImage, TKernel >
 ::SetKernel(const KernelType & kernel)
 {
-  const FlatKernelType *flatKernel = NULL;
+  const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &kernel );
 
-  try
-    {
-    flatKernel = dynamic_cast< const FlatKernelType * >( &kernel );
-    }
-  catch ( ... )
-                  {}
-
-  if ( flatKernel != NULL && flatKernel->GetDecomposable() )
+  if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() )
     {
     m_AnchorFilter->SetKernel(*flatKernel);
     m_Algorithm = ANCHOR;
@@ -119,14 +112,7 @@ void
 GrayscaleErodeImageFilter< TInputImage, TOutputImage, TKernel >
 ::SetAlgorithm(int algo)
 {
-  const FlatKernelType *flatKernel = NULL;
-
-  try
-    {
-    flatKernel = dynamic_cast< const FlatKernelType * >( &this->GetKernel() );
-    }
-  catch ( ... )
-                  {}
+  const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &this->GetKernel() );
 
   if ( m_Algorithm != algo )
     {
@@ -138,11 +124,11 @@ GrayscaleErodeImageFilter< TInputImage, TOutputImage, TKernel >
       {
       m_HistogramFilter->SetKernel( this->GetKernel() );
       }
-    else if ( flatKernel != NULL && flatKernel->GetDecomposable() && algo == ANCHOR )
+    else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == ANCHOR )
       {
       m_AnchorFilter->SetKernel(*flatKernel);
       }
-    else if ( flatKernel != NULL && flatKernel->GetDecomposable() && algo == VHGW )
+    else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == VHGW )
       {
       m_VHGWFilter->SetKernel(*flatKernel);
       }
diff --git a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx
index 45e712b..4e940e1 100644
--- a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalClosingImageFilter.hxx
@@ -47,16 +47,9 @@ void
 GrayscaleMorphologicalClosingImageFilter< TInputImage, TOutputImage, TKernel >
 ::SetKernel(const KernelType & kernel)
 {
-  const FlatKernelType *flatKernel = NULL;
+  const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &kernel );
 
-  try
-    {
-    flatKernel = dynamic_cast< const FlatKernelType * >( &kernel );
-    }
-  catch ( ... )
-                  {}
-
-  if ( flatKernel != NULL && flatKernel->GetDecomposable() )
+  if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() )
     {
     m_AnchorFilter->SetKernel(*flatKernel);
     m_Algorithm = ANCHOR;
@@ -100,14 +93,7 @@ void
 GrayscaleMorphologicalClosingImageFilter< TInputImage, TOutputImage, TKernel >
 ::SetAlgorithm(int algo)
 {
-  const FlatKernelType *flatKernel = NULL;
-
-  try
-    {
-    flatKernel = dynamic_cast< const FlatKernelType * >( &this->GetKernel() );
-    }
-  catch ( ... )
-                  {}
+  const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &this->GetKernel() );
 
   if ( m_Algorithm != algo )
     {
@@ -121,11 +107,11 @@ GrayscaleMorphologicalClosingImageFilter< TInputImage, TOutputImage, TKernel >
       m_HistogramErodeFilter->SetKernel( this->GetKernel() );
       m_HistogramDilateFilter->SetKernel( this->GetKernel() );
       }
-    else if ( flatKernel != NULL && flatKernel->GetDecomposable() && algo == ANCHOR )
+    else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == ANCHOR )
       {
       m_AnchorFilter->SetKernel(*flatKernel);
       }
-    else if ( flatKernel != NULL && flatKernel->GetDecomposable() && algo == VHGW )
+    else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == VHGW )
       {
       m_VanHerkGilWermanDilateFilter->SetKernel(*flatKernel);
       m_VanHerkGilWermanErodeFilter->SetKernel(*flatKernel);
diff --git a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.h b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.h
index cfd7561..507a69e 100644
--- a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.h
@@ -115,12 +115,12 @@ public:
   virtual void Modified() const;
 
   /** define values used to determine which algorithm to use */
-  enum {
+  enum AlgorithmType {
     BASIC = 0,
     HISTO = 1,
     ANCHOR = 2,
     VHGW = 3
-    } AlgorithmChoice;
+  };
 
   /** A safe border is added to input image to avoid borders effects
    * and remove it once the closing is done */
diff --git a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx
index 1cfdce1..e1710f1 100644
--- a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleMorphologicalOpeningImageFilter.hxx
@@ -29,17 +29,17 @@ namespace itk
 {
 template< typename TInputImage, typename TOutputImage, typename TKernel >
 GrayscaleMorphologicalOpeningImageFilter< TInputImage, TOutputImage, TKernel >
-::GrayscaleMorphologicalOpeningImageFilter()
+::GrayscaleMorphologicalOpeningImageFilter() :
+  m_HistogramDilateFilter(HistogramDilateFilterType::New()),
+  m_HistogramErodeFilter(HistogramErodeFilterType::New()),
+  m_BasicDilateFilter(BasicDilateFilterType::New()),
+  m_BasicErodeFilter(BasicErodeFilterType::New()),
+  m_VanHerkGilWermanDilateFilter(VanHerkGilWermanDilateFilterType::New()),
+  m_VanHerkGilWermanErodeFilter(VanHerkGilWermanErodeFilterType::New()),
+  m_AnchorFilter(AnchorFilterType::New()),
+  m_Algorithm(HISTO),
+  m_SafeBorder(true)
 {
-  m_BasicDilateFilter = BasicDilateFilterType::New();
-  m_BasicErodeFilter = BasicErodeFilterType::New();
-  m_HistogramDilateFilter = HistogramDilateFilterType::New();
-  m_HistogramErodeFilter = HistogramErodeFilterType::New();
-  m_VanHerkGilWermanDilateFilter = VanHerkGilWermanDilateFilterType::New();
-  m_VanHerkGilWermanErodeFilter = VanHerkGilWermanErodeFilterType::New();
-  m_AnchorFilter = AnchorFilterType::New();
-  m_Algorithm = HISTO;
-  m_SafeBorder = true;
 }
 
 template< typename TInputImage, typename TOutputImage, typename TKernel >
@@ -47,16 +47,9 @@ void
 GrayscaleMorphologicalOpeningImageFilter< TInputImage, TOutputImage, TKernel >
 ::SetKernel(const KernelType & kernel)
 {
-  const FlatKernelType *flatKernel = NULL;
+  const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &kernel );
 
-  try
-    {
-    flatKernel = dynamic_cast< const FlatKernelType * >( &kernel );
-    }
-  catch ( ... )
-                         {}
-
-  if ( flatKernel != NULL && flatKernel->GetDecomposable() )
+  if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() )
     {
     m_AnchorFilter->SetKernel(*flatKernel);
     m_Algorithm = ANCHOR;
@@ -100,14 +93,7 @@ void
 GrayscaleMorphologicalOpeningImageFilter< TInputImage, TOutputImage, TKernel >
 ::SetAlgorithm(int algo)
 {
-  const FlatKernelType *flatKernel = NULL;
-
-  try
-    {
-    flatKernel = dynamic_cast< const FlatKernelType * >( &this->GetKernel() );
-    }
-  catch ( ... )
-                         {}
+  const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &this->GetKernel() );
 
   if ( m_Algorithm != algo )
     {
@@ -121,11 +107,11 @@ GrayscaleMorphologicalOpeningImageFilter< TInputImage, TOutputImage, TKernel >
       m_HistogramDilateFilter->SetKernel( this->GetKernel() );
       m_HistogramErodeFilter->SetKernel( this->GetKernel() );
       }
-    else if ( flatKernel != NULL && flatKernel->GetDecomposable() && algo == ANCHOR )
+    else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == ANCHOR )
       {
       m_AnchorFilter->SetKernel(*flatKernel);
       }
-    else if ( flatKernel != NULL && flatKernel->GetDecomposable() && algo == VHGW )
+    else if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() && algo == VHGW )
       {
       m_VanHerkGilWermanDilateFilter->SetKernel(*flatKernel);
       m_VanHerkGilWermanErodeFilter->SetKernel(*flatKernel);
diff --git a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkKernelImageFilter.h b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkKernelImageFilter.h
index 36fca25..45e9cff 100644
--- a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkKernelImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkKernelImageFilter.h
@@ -29,8 +29,6 @@ namespace itk
  *
  * This filter provides the code to store the radius information about the
  * neighborhood used in the subclasses.
- * It also conveniently reimplement the GenerateInputRequestedRegion() so
- * that region is well defined for the porvided radius.
  *
  * \author Gaetan Lehmann
  * \ingroup ITKMathematicalMorphology
diff --git a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx
index 7993f28..01d9dd7 100644
--- a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkMorphologicalGradientImageFilter.hxx
@@ -44,16 +44,9 @@ void
 MorphologicalGradientImageFilter< TInputImage, TOutputImage, TKernel >
 ::SetKernel(const KernelType & kernel)
 {
-  const FlatKernelType *flatKernel = NULL;
+  const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &kernel );
 
-  try
-    {
-    flatKernel = dynamic_cast< const FlatKernelType * >( &kernel );
-    }
-  catch ( ... )
-                  {}
-
-  if ( flatKernel != NULL && flatKernel->GetDecomposable() )
+  if ( flatKernel != ITK_NULLPTR && flatKernel->GetDecomposable() )
     {
     m_AnchorDilateFilter->SetKernel(*flatKernel);
     m_AnchorErodeFilter->SetKernel(*flatKernel);
@@ -96,14 +89,7 @@ void
 MorphologicalGradientImageFilter< TInputImage, TOutputImage, TKernel >
 ::SetAlgorithm(int algo)
 {
-  const FlatKernelType *flatKernel = NULL;
-
-  try
-    {
-    flatKernel = dynamic_cast< const FlatKernelType * >( &this->GetKernel() );
-    }
-  catch ( ... )
-                  {}
+  const FlatKernelType *flatKernel = dynamic_cast< const FlatKernelType * >( &this->GetKernel() );
 
   if ( m_Algorithm != algo )
     {
diff --git a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramImageFilter.hxx b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramImageFilter.hxx
index c0e3908..c6d9818 100644
--- a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkMovingHistogramImageFilter.hxx
@@ -96,8 +96,6 @@ MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >
   InputLineIteratorType InLineIt(inputImage, outputRegionForThread);
   InLineIt.SetDirection(BestDirection);
 
-  typedef ImageRegionIterator< OutputImageType > OutputIteratorType;
-  //OutputIteratorType oit(outputImage, outputRegionForThread);
   InLineIt.GoToBegin();
   IndexType LineStart;
   //PrevLineStart = InLineIt.GetIndex();
diff --git a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.hxx b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.hxx
index b0cb870..1102e0a 100644
--- a/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.hxx
+++ b/Utilities/ITK/Modules/Filtering/MathematicalMorphology/include/itkSharedMorphologyUtilities.hxx
@@ -94,12 +94,12 @@ int ComputeStartEnd(const typename TImage::IndexType StartIndex,
   unsigned perpdir = 0;
   for ( unsigned i = 0; i < TImage::RegionType::ImageDimension; i++ )
     {
-    if ( vcl_fabs(line[i]) > domdir )
+    if ( std::fabs(line[i]) > domdir )
       {
-      domdir = vcl_fabs(line[i]);
+      domdir = std::fabs(line[i]);
       perpdir = i;
       }
-    if ( vcl_fabs(line[i]) > tol )
+    if ( std::fabs(line[i]) > tol )
       {
       int   P1 = ImStart[i] - StartIndex[i];
       int   P2 = ImStart[i] + ImSize[i] - 1 - StartIndex[i];
@@ -132,8 +132,8 @@ int ComputeStartEnd(const typename TImage::IndexType StartIndex,
         }
       }
     }
-  sPos = (int)( Tnear * vcl_fabs(line[perpdir]) + 0.5 );
-  ePos = (int)( Tfar * vcl_fabs(line[perpdir]) + 0.5 );
+  sPos = (int)( Tnear * std::fabs(line[perpdir]) + 0.5 );
+  ePos = (int)( Tfar * std::fabs(line[perpdir]) + 0.5 );
 
   //std::cout << Tnear << " " << Tfar << std::endl;
   if ( Tfar < Tnear ) // seems to need some margin
@@ -304,9 +304,9 @@ MakeEnlargedFace(const typename TInputImage::ConstPointer itkNotUsed(input),
   // figure out the dominant direction of the line
   for ( unsigned i = 0; i < TInputImage::RegionType::ImageDimension; i++ )
     {
-    if ( vcl_fabs(line[i]) > MaxComp )
+    if ( std::fabs(line[i]) > MaxComp )
       {
-      MaxComp = vcl_fabs(line[i]);
+      MaxComp = std::fabs(line[i]);
       DomDir = i;
       }
     }
@@ -358,7 +358,7 @@ MakeEnlargedFace(const typename TInputImage::ConstPointer itkNotUsed(input),
       {
       if ( i != NonFaceDim )
         {
-        int Pad = Math::Ceil< int >( (float)( NonFaceLen ) * line[i] / vcl_fabs(line[NonFaceDim]) );
+        int Pad = Math::Ceil< int >( (float)( NonFaceLen ) * line[i] / std::fabs(line[NonFaceDim]) );
         if ( Pad < 0 )
           {
           // just increase the size - no need to change the start
@@ -415,7 +415,7 @@ unsigned int GetLinePixels(const TLine line)
 
   for ( unsigned int i = 0; i < TLine::Dimension; i++ )
     {
-    float tt = vcl_fabs(line[i] / N);
+    float tt = std::fabs(line[i] / N);
     if ( tt > correction ) { correction = tt; }
     }
 
diff --git a/Utilities/ITK/Modules/Filtering/Path/include/itkChainCodePath2D.h b/Utilities/ITK/Modules/Filtering/Path/include/itkChainCodePath2D.h
index fe01f8c..90bf60e 100644
--- a/Utilities/ITK/Modules/Filtering/Path/include/itkChainCodePath2D.h
+++ b/Utilities/ITK/Modules/Filtering/Path/include/itkChainCodePath2D.h
@@ -82,16 +82,16 @@ public:
   // Functions inherited from Path
 
   /** Evaluate the chaincode for the offset at the specified path-position. */
-  virtual OutputType Evaluate(const InputType & input) const;
+  virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE;
 
   /** Like Evaluate(), but returns the index at the specified path-position. */
-  virtual IndexType EvaluateToIndex(const InputType & input) const;
+  virtual IndexType EvaluateToIndex(const InputType & input) const ITK_OVERRIDE;
 
   /** Increment the input variable passed by reference and return the offset
    * stored at the previous path-position.  If the chaincode is unable to be
    * incremented, input is not changed and an offset of zero is returned, which
    * may be used to check for the end of the chain code. */
-  virtual OffsetType IncrementInput(InputType & input) const;
+  virtual OffsetType IncrementInput(InputType & input) const ITK_OVERRIDE;
 
   // Functions specific to ChainCodePath and its descendents
 
@@ -99,7 +99,7 @@ public:
   itkNewMacro(Self);
 
   /** How many steps in the chaincode? */
-  inline ChainCodeSizeType NumberOfSteps() const { return m_Chain2D.size(); }
+  virtual inline ChainCodeSizeType NumberOfSteps() const ITK_OVERRIDE { return m_Chain2D.size(); }
 
   /** Insert a new step into the chaincode at a specified position */
   inline void InsertStep(InputType position, int encodedStep)
@@ -108,7 +108,7 @@ public:
     this->Modified();
   }
 
-  inline void InsertStep(InputType position, OffsetType step)
+  virtual inline void InsertStep(InputType position, OffsetType step) ITK_OVERRIDE
   {
     m_Chain2D.insert( m_Chain2D.begin() + position, EncodeOffset(step) );
     this->Modified();
@@ -121,14 +121,14 @@ public:
     this->Modified();
   }
 
-  inline void ChangeStep(InputType position, OffsetType step)
+  virtual inline void ChangeStep(InputType position, OffsetType step) ITK_OVERRIDE
   {
     m_Chain2D[position] = EncodeOffset(step);
     this->Modified();
   }
 
   /** Remove all steps from the chain code */
-  virtual inline void Clear()
+  virtual inline void Clear() ITK_OVERRIDE
   {
     m_Chain2D.clear();
     this->Modified();
@@ -139,7 +139,7 @@ public:
 protected:
   ChainCodePath2D();
   ~ChainCodePath2D();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Encode and Decode between an offset and a Freeman code */
   inline int EncodeOffset(OffsetType step) const
diff --git a/Utilities/ITK/Modules/Filtering/Path/include/itkChainCodeToFourierSeriesPathFilter.hxx b/Utilities/ITK/Modules/Filtering/Path/include/itkChainCodeToFourierSeriesPathFilter.hxx
index 220c184..12b9d17 100644
--- a/Utilities/ITK/Modules/Filtering/Path/include/itkChainCodeToFourierSeriesPathFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Path/include/itkChainCodeToFourierSeriesPathFilter.hxx
@@ -63,7 +63,7 @@ ChainCodeToFourierSeriesPathFilter< TInputChainCodePath, TOutputFourierSeriesPat
   numSteps = inputPtr->NumberOfSteps();
   outputPtr->Clear();
 
-  const double nPI = 4.0 * vcl_atan(1.0);
+  const double nPI = 4.0 * std::atan(1.0);
 
   // Adjust our private copy of numHarmonics if necessary
   if ( numHarmonics <= 1 )
@@ -92,8 +92,8 @@ ChainCodeToFourierSeriesPathFilter< TInputChainCodePath, TOutputFourierSeriesPat
         indexVector[d] = index[d];
         }
 
-      cosCoefficient += indexVector * ( vcl_cos(theta) / numSteps );
-      sinCoefficient += indexVector * ( vcl_sin(theta) / numSteps );
+      cosCoefficient += indexVector * ( std::cos(theta) / numSteps );
+      sinCoefficient += indexVector * ( std::sin(theta) / numSteps );
       }
 
     outputPtr->AddHarmonic(cosCoefficient, sinCoefficient);
diff --git a/Utilities/ITK/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx b/Utilities/ITK/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx
index c19d60a..eb01807 100644
--- a/Utilities/ITK/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx
+++ b/Utilities/ITK/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx
@@ -35,7 +35,7 @@ FourierSeriesPath< VDimension >
   numHarmonics = m_CosCoefficients->Size();
   output.Fill(0);
 
-  const double PI = 4.0 * vcl_atan(1.0);
+  const double PI = 4.0 * std::atan(1.0);
 
   if ( numHarmonics > 0 ) { output += m_CosCoefficients->ElementAt(0); }
 
@@ -43,8 +43,8 @@ FourierSeriesPath< VDimension >
     {
     // input defined over [0,1] maps to theta defined over [0,2pi * n]
     theta = PI * 2.0 * n * input;
-    output += ( m_CosCoefficients->ElementAt(n) * vcl_cos(theta)
-                + m_SinCoefficients->ElementAt(n) * vcl_sin(theta) ) * 2.0;
+    output += ( m_CosCoefficients->ElementAt(n) * std::cos(theta)
+                + m_SinCoefficients->ElementAt(n) * std::sin(theta) ) * 2.0;
     }
 
   return output;
@@ -62,14 +62,14 @@ FourierSeriesPath< VDimension >
   numHarmonics = m_CosCoefficients->Size();
   output.Fill(0);
 
-  const double PI = 4.0 * vcl_atan(1.0);
+  const double PI = 4.0 * std::atan(1.0);
 
   for ( int n = 1; n < numHarmonics; n++ )
     {
     // input defined over [0,1] maps to theta defined over [0,2pi * n]
     theta = PI * 2.0 * n * input;
-    output += ( m_SinCoefficients->ElementAt(n) * vcl_cos(theta)
-                - m_CosCoefficients->ElementAt(n) * vcl_sin(theta) ) * ( 2.0 * n );
+    output += ( m_SinCoefficients->ElementAt(n) * std::cos(theta)
+                - m_CosCoefficients->ElementAt(n) * std::sin(theta) ) * ( 2.0 * n );
     }
 
   return output;
diff --git a/Utilities/ITK/Modules/Filtering/Path/include/itkHilbertPath.hxx b/Utilities/ITK/Modules/Filtering/Path/include/itkHilbertPath.hxx
index fa9c1e7..8523fa8 100644
--- a/Utilities/ITK/Modules/Filtering/Path/include/itkHilbertPath.hxx
+++ b/Utilities/ITK/Modules/Filtering/Path/include/itkHilbertPath.hxx
@@ -179,7 +179,7 @@ HilbertPath<TIndexValue, VDimension>
     return x;
     }
 
-  PathIndexType m = static_cast<PathIndexType>( vcl_ceil( vcl_log( static_cast<double>(x) ) / vcl_log( 2.0 ) ) ) + 1;
+  PathIndexType m = static_cast<PathIndexType>( std::ceil( std::log( static_cast<double>(x) ) / std::log( 2.0 ) ) ) + 1;
 
   PathIndexType i = x;
   PathIndexType j = 1;
diff --git a/Utilities/ITK/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx
index 0bafb78..d6702f5 100644
--- a/Utilities/ITK/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx
@@ -62,7 +62,7 @@ ImageAndPathToImageFilter< TInputImage, TInputPath, TOutputImage >
 ::GetNonConstImageInput(void)
 {
   TInputImage * temp_return=dynamic_cast< TInputImage * >( this->ProcessObject::GetInput(0) );
-  if(temp_return == NULL)
+  if(temp_return == ITK_NULLPTR)
     {
     itkExceptionMacro("Invalid type conversion in GetNonConstImageInput()")
     }
@@ -94,7 +94,7 @@ ImageAndPathToImageFilter< TInputImage, TInputPath, TOutputImage >
 ::GetNonConstPathInput(void)
 {
   TInputPath * temp_return = dynamic_cast< TInputPath * >( this->ProcessObject::GetInput(1) );
-  if(temp_return == NULL)
+  if(temp_return == ITK_NULLPTR)
     {
     itkExceptionMacro("Invalid type conversion in GetNonConstPathInput()")
     }
diff --git a/Utilities/ITK/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx b/Utilities/ITK/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx
index 7809035..ad4528d 100644
--- a/Utilities/ITK/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Path/include/itkOrthogonalSwath2DPathFilter.hxx
@@ -37,9 +37,9 @@ OrthogonalSwath2DPathFilter< TParametricPath, TSwathMeritImage >
   size[0] = 0;
   size[1] = 0;
   m_SwathSize = size;
-  m_StepValues  = NULL;
-  m_MeritValues = NULL;
-  m_OptimumStepsValues = NULL;
+  m_StepValues  = ITK_NULLPTR;
+  m_MeritValues = ITK_NULLPTR;
+  m_OptimumStepsValues = ITK_NULLPTR;
   m_FinalOffsetValues = OrthogonalCorrectionTableType::New();
 }
 
diff --git a/Utilities/ITK/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h b/Utilities/ITK/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h
index e74adaa..1eb36c5 100644
--- a/Utilities/ITK/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h
+++ b/Utilities/ITK/Modules/Filtering/Path/include/itkOrthogonallyCorrected2DParametricPath.h
@@ -73,7 +73,7 @@ public:
   typedef OrthogonalCorrectionTableType::ElementIdentifier  OrthogonalCorrectionTableSizeType;
 
   /** Return the location of the parametric path at the specified location. */
-  virtual OutputType Evaluate(const InputType & input) const;
+  virtual OutputType Evaluate(const InputType & input) const ITK_OVERRIDE;
 
   /** Set pointer to the original path.  The path MUST be continuous in its
    * first derivative to prevent discontinuities in the corrected path.  The
@@ -90,19 +90,19 @@ public:
   itkNewMacro(Self);
 
   /** Needed for Pipelining */
-  virtual void Initialize(void)
+  virtual void Initialize(void) ITK_OVERRIDE
   {
-    this->m_OriginalPath = NULL;
-    this->m_OrthogonalCorrectionTable = NULL;
+    this->m_OriginalPath = ITK_NULLPTR;
+    this->m_OrthogonalCorrectionTable = ITK_NULLPTR;
   }
 
   /** These are determined by the original path */
-  virtual inline InputType StartOfInput() const
+  virtual inline InputType StartOfInput() const ITK_OVERRIDE
   {
     return m_OriginalPath->StartOfInput();
   }
 
-  virtual inline InputType EndOfInput() const
+  virtual inline InputType EndOfInput() const ITK_OVERRIDE
   {
     return m_OriginalPath->EndOfInput();
   }
@@ -110,7 +110,7 @@ public:
 protected:
   OrthogonallyCorrected2DParametricPath();
   ~OrthogonallyCorrected2DParametricPath(){}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   OrthogonallyCorrected2DParametricPath(const Self &); //purposely not
diff --git a/Utilities/ITK/Modules/Filtering/Path/include/itkPath.h b/Utilities/ITK/Modules/Filtering/Path/include/itkPath.h
index d40e471..bc66820 100644
--- a/Utilities/ITK/Modules/Filtering/Path/include/itkPath.h
+++ b/Utilities/ITK/Modules/Filtering/Path/include/itkPath.h
@@ -111,7 +111,7 @@ protected:
   Path();
   ~Path(){}
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   itkGetConstMacro(ZeroOffset, OffsetType);
   itkGetConstMacro(ZeroIndex, IndexType);
diff --git a/Utilities/ITK/Modules/Filtering/Path/include/itkPathFunctions.h b/Utilities/ITK/Modules/Filtering/Path/include/itkPathFunctions.h
index a6eb924..f40e2b1 100644
--- a/Utilities/ITK/Modules/Filtering/Path/include/itkPathFunctions.h
+++ b/Utilities/ITK/Modules/Filtering/Path/include/itkPathFunctions.h
@@ -35,9 +35,7 @@ void MakeChainCodeTracePath(TChainCodePath & chainPath,
 {
   typedef typename TChainCodePath::OffsetType OffsetType;
   typedef typename TChainCodePath::InputType  ChainInputType;
-  typedef typename TChainCodePath::OutputType ChainOutputType;
   typedef typename TPathInput::InputType      InPathInputType;
-  typedef typename TPathInput::OutputType     InPathOutputType;
 
   OffsetType      offset, tempOffset, zeroOffset;
   InPathInputType inPathInput;
@@ -86,9 +84,7 @@ void MakeFourierSeriesPathTraceChainCode(TFourierSeriesPath & FSPath,
   typedef typename TFourierSeriesPath::VectorType VectorType;
 
   typedef typename TFourierSeriesPath::InputType  FSInputType;
-  typedef typename TFourierSeriesPath::OutputType FSOutputType;
   typedef typename TChainCodePath::InputType      ChainInputType;
-  typedef typename TChainCodePath::OutputType     ChainOutputType;
 
   IndexType   index;
   VectorType  indexVector;
@@ -98,7 +94,7 @@ void MakeFourierSeriesPathTraceChainCode(TFourierSeriesPath & FSPath,
   int         dimension =     OffsetType::GetOffsetDimension();
   unsigned    numSteps  =     chainPath.NumberOfSteps();
 
-  const double PI = 4.0 * vcl_atan(1.0);
+  const double PI = 4.0 * std::atan(1.0);
 
   FSPath.Clear();
 
@@ -128,8 +124,8 @@ void MakeFourierSeriesPathTraceChainCode(TFourierSeriesPath & FSPath,
         {
         indexVector[d] = index[d];
         }
-      cosCoefficient += indexVector * ( vcl_cos(theta) / numSteps );
-      sinCoefficient += indexVector * ( vcl_sin(theta) / numSteps );
+      cosCoefficient += indexVector * ( std::cos(theta) / numSteps );
+      sinCoefficient += indexVector * ( std::sin(theta) / numSteps );
       }
 
     FSPath.AddHarmonic(cosCoefficient, sinCoefficient);
diff --git a/Utilities/ITK/Modules/Filtering/Path/include/itkPathSource.h b/Utilities/ITK/Modules/Filtering/Path/include/itkPathSource.h
index ce43ff6..60b6cc0 100644
--- a/Utilities/ITK/Modules/Filtering/Path/include/itkPathSource.h
+++ b/Utilities/ITK/Modules/Filtering/Path/include/itkPathSource.h
@@ -168,12 +168,12 @@ public:
    * an implementation of MakeOutput(). */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
 protected:
   PathSource();
   virtual ~PathSource() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   // Inherit the empty ProcessObject::GenerateData()
 
diff --git a/Utilities/ITK/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx b/Utilities/ITK/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx
index 5a85694..3d4d529 100644
--- a/Utilities/ITK/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx
+++ b/Utilities/ITK/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx
@@ -84,7 +84,7 @@ PolyLineParametricPath<VDimension>
 ::IncrementInput(InputType & input) const
 {
   //Save this input index since we will use it to calculate the offset
-  const OutputType originalIndex = this->EvaluateToIndex(input);
+  const IndexType originalIndex = this->EvaluateToIndex(input);
 
   InputType potentialTimestep = itk::NumericTraits< InputType >::ZeroValue();
   bool timeStepSmallEnough = false;
@@ -92,7 +92,7 @@ PolyLineParametricPath<VDimension>
     {
     if (input == this->EndOfInput())
       {
-      const OutputType finalIndex = this->EvaluateToIndex(this->EndOfInput());
+      const IndexType finalIndex = this->EvaluateToIndex(this->EndOfInput());
       OffsetType finalOffset;
       for (unsigned int i = 0; i < VDimension; ++i)
         {
@@ -102,7 +102,7 @@ PolyLineParametricPath<VDimension>
       }
 
     //Check to make sure we aren't already at a place with an offset of 1 pixel
-    const OutputType potentialIndex = this->EvaluateToIndex(input);
+    const IndexType potentialIndex = this->EvaluateToIndex(input);
     //For some reason, there's no way to convert OutputType to OffsetType
     OffsetType offset;
     for (unsigned int i = 0; i < VDimension; ++i)
@@ -146,7 +146,7 @@ PolyLineParametricPath<VDimension>
   const InputType timestep = potentialTimestep;
 
   //Get the index at the next timestep so we can calculate the offset
-  const OutputType nextIndex = this->EvaluateToIndex(input + timestep);
+  const IndexType nextIndex = this->EvaluateToIndex(input + timestep);
 
   //For some reason, there's no way to convert OutputType to OffsetType
   OffsetType offset;
diff --git a/Utilities/ITK/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx b/Utilities/ITK/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx
index 66e3ff4..3992672 100644
--- a/Utilities/ITK/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx
+++ b/Utilities/ITK/Modules/Filtering/Path/src/itkOrthogonallyCorrected2DParametricPath.cxx
@@ -91,7 +91,7 @@ OrthogonallyCorrected2DParametricPath
 OrthogonallyCorrected2DParametricPath
 ::OrthogonallyCorrected2DParametricPath()
 {
-  m_OriginalPath = NULL;
+  m_OriginalPath = ITK_NULLPTR;
   m_OrthogonalCorrectionTable = OrthogonalCorrectionTableType::New();
 }
 
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx
index 9ad4029..114f42d 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx
@@ -56,7 +56,7 @@ void
 BorderQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
 ::ComputeBoundary()
 {
-  InputQEType *bdryEdge = NULL;
+  InputQEType *bdryEdge = ITK_NULLPTR;
 
   switch( m_BorderPick )
     {
@@ -215,7 +215,7 @@ BorderQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
 
   std::vector< InputCoordRepType > tetas(NbBoundaryPt, 0.0);
   tetas[0] = static_cast< InputCoordRepType >(
-    vcl_acos( ( two_r - dist ) * inv_two_r ) );
+    std::acos( ( two_r - dist ) * inv_two_r ) );
 
   MapPointIdentifierIterator BoundaryPtIterator = this->m_BoundaryPtMap.begin();
 
@@ -232,7 +232,7 @@ BorderQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
 
     dist = pt1.SquaredEuclideanDistanceTo(pt2);
 
-    tetas[j] = tetas[j - 1] + vcl_acos( ( two_r - dist ) * inv_two_r );
+    tetas[j] = tetas[j - 1] + std::acos( ( two_r - dist ) * inv_two_r );
 
     ++j;
     ++BoundaryPtIterator;
@@ -242,7 +242,7 @@ BorderQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
 
   if ( this->m_Radius == 0.0 )
     {
-    this->m_Radius = vcl_pow(vcl_sqrt(r), a);
+    this->m_Radius = std::pow(std::sqrt(r), a);
     }
 
   for ( MapPointIdentifierIterator
@@ -253,8 +253,8 @@ BorderQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
     id = BoundaryPtMapIterator->first;
     j = BoundaryPtMapIterator->second;
 
-    pt1[0] =  this->m_Radius * static_cast< InputCoordRepType >( vcl_cos(a * tetas[j]) );
-    pt1[1] =  this->m_Radius * static_cast< InputCoordRepType >( vcl_sin(a * tetas[j]) );
+    pt1[0] =  this->m_Radius * static_cast< InputCoordRepType >( std::cos(a * tetas[j]) );
+    pt1[1] =  this->m_Radius * static_cast< InputCoordRepType >( std::sin(a * tetas[j]) );
     pt1[2] =  0.0;
 
     this->m_Border[j] = pt1;
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx
index eadb20f..15db09a 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkCleanQuadEdgeMeshFilter.hxx
@@ -141,7 +141,7 @@ CleanQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
   while ( p_it != p_end )
     {
     id = p_it->Index();
-    if ( output->FindEdge(id) == 0 )
+    if ( output->FindEdge(id) == ITK_NULLPTR )
       {
       output->DeletePoint(id);
       }
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h
index 776e0f5..a52981e 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDecimationQuadEdgeMeshFilter.h
@@ -59,7 +59,7 @@ protected:
   DecimationQuadEdgeMeshFilter()
   {
     this->m_Iteration = 0;
-    this->m_OutputMesh = 0;
+    this->m_OutputMesh = ITK_NULLPTR;
   }
 
   ~DecimationQuadEdgeMeshFilter() {}
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h
index 5f9f4b9..327688a 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.h
@@ -22,7 +22,6 @@
 #include "itkPriorityQueueContainer.h"
 #include "itkQuadEdgeMeshToQuadEdgeMeshFilter.h"
 #include "itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.h"
-#include "vcl_cmath.h"
 #include "vnl/vnl_math.h"
 
 namespace itk
@@ -171,7 +170,7 @@ protected:
 
     if ( den != 0. )
       {
-      dotA /= vcl_sqrt(den);
+      dotA /= std::sqrt(den);
       }
 
     if ( dotA > 1. )
@@ -188,7 +187,7 @@ protected:
 
     if ( den != 0. )
       {
-      dotB /= vcl_sqrt(den);
+      dotB /= std::sqrt(den);
       }
 
     if ( dotB > 1. )
@@ -201,7 +200,7 @@ protected:
       dotB = -1.;
       }
 
-    return ( vcl_acos(dotA) + vcl_acos(dotB) - vnl_math::pi );
+    return ( std::acos(dotA) + std::acos(dotB) - vnl_math::pi );
   }
 
 private:
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx
index 60bf1b5..67eea4f 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDelaunayConformingQuadEdgeMeshFilter.hxx
@@ -55,7 +55,7 @@ void DelaunayConformingQuadEdgeMeshFilter< TInputMesh, TOutputMesh >::Initialize
 {
   OutputMeshType *output = this->GetOutput();
 
-  OutputEdgeCellType *edge = 0;
+  OutputEdgeCellType *edge = ITK_NULLPTR;
 
   CriterionValueType value = 0.;
 
@@ -140,7 +140,7 @@ void DelaunayConformingQuadEdgeMeshFilter< TInputMesh, TOutputMesh >::Process()
     m_QueueMapper.erase(edge);
 
     qe = m_FlipEdge->Evaluate(qe);
-    if ( qe != 0 )
+    if ( qe != ITK_NULLPTR )
       {
       ++this->m_NumberOfEdgeFlips;
       list_qe[4] = qe;
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h
index c5cc34d..b918ea2 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteCurvatureQuadEdgeMeshFilter.h
@@ -69,7 +69,7 @@ public:
 #endif
 
 protected:
-  DiscreteCurvatureQuadEdgeMeshFilter() : m_OutputMesh(0) {}
+  DiscreteCurvatureQuadEdgeMeshFilter() : m_OutputMesh(ITK_NULLPTR) {}
   virtual ~DiscreteCurvatureQuadEdgeMeshFilter() {}
 
   virtual OutputCurvatureType EstimateCurvature(const OutputPointType & iP) = 0;
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h
index 5a78003..2d1c5d1 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteGaussianCurvatureQuadEdgeMeshFilter.h
@@ -85,7 +85,7 @@ protected:
 
     OutputQEType *qe = iP.GetEdge();
 
-    if ( qe != 0 )
+    if ( qe != ITK_NULLPTR )
       {
       OutputQEType *qe_it = qe;
       OutputQEType *qe_it2;
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.h b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.h
index 6c45ef0..7e99923 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.h
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMaximumCurvatureQuadEdgeMeshFilter.h
@@ -78,7 +78,7 @@ protected:
   virtual OutputCurvatureType EstimateCurvature(const OutputPointType & iP)
   {
     this->ComputeMeanAndGaussianCurvatures(iP);
-    return this->m_Mean + vcl_sqrt( this->ComputeDelta() );
+    return this->m_Mean + std::sqrt( this->ComputeDelta() );
   }
 
 private:
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h
index b59b817..d95f87f 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMeanCurvatureQuadEdgeMeshFilter.h
@@ -95,7 +95,7 @@ protected:
     OutputVectorType    normal;
     normal.Fill(0.);
 
-    if ( qe != 0 )
+    if ( qe != ITK_NULLPTR )
       {
       if ( qe != qe->GetOnext() )
         {
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.h b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.h
index f0b8113..8dd173d 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.h
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.h
@@ -78,7 +78,7 @@ protected:
   virtual OutputCurvatureType EstimateCurvature(const OutputPointType & iP)
   {
     this->ComputeMeanAndGaussianCurvatures(iP);
-    return this->m_Mean - vcl_sqrt( this->ComputeDelta() );
+    return this->m_Mean - std::sqrt( this->ComputeDelta() );
   }
 
 private:
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h
index 89a8a78..8903a73 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h
@@ -87,7 +87,7 @@ protected:
     m_Mean = 0.;
     m_Gaussian = 0.;
 
-    if ( qe != 0 )
+    if ( qe != ITK_NULLPTR )
       {
       OutputVectorType Laplace;
       Laplace.Fill(0.);
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx
index 9967b37..66d4aec 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx
@@ -23,9 +23,13 @@
 namespace itk
 {
 template< typename TInput, typename TOutput, typename TCriterion >
-EdgeDecimationQuadEdgeMeshFilter< TInput, TOutput,
-                                       TCriterion >::EdgeDecimationQuadEdgeMeshFilter():Superclass(),
-  m_Relocate(true), m_CheckOrientation(false)
+EdgeDecimationQuadEdgeMeshFilter< TInput, TOutput,TCriterion >::
+EdgeDecimationQuadEdgeMeshFilter() :
+  Superclass(),
+  m_Relocate(true),
+  m_CheckOrientation(false),
+  m_Element(ITK_NULLPTR)
+
 {
   m_JoinVertexFunction = OperatorType::New();
   m_PriorityQueue = PriorityQueueType::New();
@@ -103,7 +107,7 @@ IsEdgeOKToBeProcessed(OutputQEType *)
 #endif
   {
 #ifdef NDEBUG
-  if ( iEdge == 0 )
+  if ( iEdge == ITK_NULLPTR )
     {
     itkDebugMacro("iEdge == 0, at iteration: " << this->m_Iteration);
     return false;
@@ -118,13 +122,13 @@ IsEdgeOKToBeProcessed(OutputQEType *)
     }
 
   OutputMeshPointer output = this->GetOutput();
-  if ( output->FindEdge(id_org) == 0 )
+  if ( output->FindEdge(id_org) == ITK_NULLPTR )
     {
     itkDebugMacro("output->FindEdge( id_org ) == 0, at iteration: "
                   << this->m_Iteration);
     return false;
     }
-  if ( iEdge->GetSym() == 0 )
+  if ( iEdge->GetSym() == ITK_NULLPTR )
     {
     itkDebugMacro("iEdge->GetSym() == 0, at iteration: "
                   << this->m_Iteration);
@@ -138,13 +142,13 @@ IsEdgeOKToBeProcessed(OutputQEType *)
                   << this->m_Iteration);
     return false;
     }
-  if ( output->FindEdge(id_dest) == 0 )
+  if ( output->FindEdge(id_dest) == ITK_NULLPTR )
     {
     itkDebugMacro("output->FindEdge( id_dest ) == 0, at iteration: "
                   << this->m_Iteration);
     return false;
     }
-  if ( output->FindEdge(id_org, id_dest) == 0 )
+  if ( output->FindEdge(id_org, id_dest) == ITK_NULLPTR )
     {
     itkDebugMacro("output->FindEdge( id_org, id_dest ) == 0, at iteration: "
                   << this->m_Iteration);
@@ -372,7 +376,7 @@ EdgeDecimationQuadEdgeMeshFilter< TInput, TOutput, TCriterion >::ProcessWithoutA
     DeletePoint(old_id, new_id);
 
     OutputQEType *edge = this->m_OutputMesh->FindEdge(new_id);
-    if ( edge == 0 )
+    if ( edge == ITK_NULLPTR )
       {
       itkDebugMacro("edge == 0, at iteration " << this->m_Iteration);
       return false;
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx
index d08ab05..561a0af 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx
@@ -73,7 +73,7 @@ NormalQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
     {
     poly = dynamic_cast< OutputPolygonType * >( cell_it.Value() );
 
-    if ( poly != 0 )
+    if ( poly != ITK_NULLPTR )
       {
       if ( poly->GetNumberOfPoints() == 3 )
         {
@@ -146,7 +146,7 @@ NormalQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
 
     OutputPolygonType *poly = dynamic_cast< OutputPolygonType * >(
       outputMesh->GetCells()->GetElement(iCId) );
-    if ( poly != 0 ) // this test should be removed...
+    if ( poly != ITK_NULLPTR ) // this test should be removed...
       {
       // this test should be removed...
       if ( poly->GetNumberOfPoints() == 3 )
@@ -209,7 +209,7 @@ NormalQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
               v *= norm_v;
               }
             return static_cast< OutputVertexNormalComponentType >(
-                     vcl_acos(u * v) );
+                     std::acos(u * v) );
             }
           case AREA:
             {
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx
index ce089ea..6fe33b8 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkParameterizationQuadEdgeMeshFilter.hxx
@@ -27,8 +27,8 @@ template< typename TInputMesh, typename TOutputMesh, typename TSolverTraits >
 ParameterizationQuadEdgeMeshFilter< TInputMesh, TOutputMesh, TSolverTraits >
 ::ParameterizationQuadEdgeMeshFilter()
 {
-  this->m_CoefficientsMethod = 0;
-  this->m_BorderTransform = 0;
+  this->m_CoefficientsMethod = ITK_NULLPTR;
+  this->m_BorderTransform = ITK_NULLPTR;
 }
 
 // ---------------------------------------------------------------------
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h
index d778c82..a4a9234 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationCriteria.h
@@ -80,7 +80,7 @@ protected:
   }
 
   ~QuadEdgeMeshDecimationCriterion() {}
-  void PrintSelf(std::ostream & os, Indent indent) const
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
   {
     Superclass::PrintSelf(os, indent);
     os << indent << "TopologicalChange: "
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx
index 9337036..e3fe44a 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx
@@ -51,7 +51,7 @@ QuadricDecimationQuadEdgeMeshFilter< TInput, TOutput, TCriterion >
     p_id = it->Index();
 
     qe = output->FindEdge(p_id);
-    if ( qe != 0 )
+    if ( qe != ITK_NULLPTR )
       {
       qe_it = qe;
       do
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx
index b44cc02..1a0f8c9 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSmoothingQuadEdgeMeshFilter.hxx
@@ -26,7 +26,7 @@ template< typename TInputMesh, typename TOutputMesh >
 SmoothingQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
 ::SmoothingQuadEdgeMeshFilter()
 {
-  this->m_CoefficientsMethod = 0;
+  this->m_CoefficientsMethod = ITK_NULLPTR;
   this->m_DelaunayConforming = false;
   this->m_NumberOfIterations = 1;
   this->m_RelaxationFactor = static_cast< OutputCoordType >( 1.0 );
@@ -98,7 +98,7 @@ void SmoothingQuadEdgeMeshFilter< TInputMesh, TOutputMesh >::GenerateData()
       {
       p = it.Value();
       qe = p.GetEdge();
-      if ( qe != 0 )
+      if ( qe != ITK_NULLPTR )
         {
         r = p;
         v.Fill(0.0);
diff --git a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h
index d21cdfb..151cb4c 100644
--- a/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h
+++ b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h
@@ -73,8 +73,9 @@ protected:
   SquaredEdgeLengthDecimationQuadEdgeMeshFilter();
   virtual ~SquaredEdgeLengthDecimationQuadEdgeMeshFilter();
 
-  /**
-   * Compute the measure value for iEdge.
+  // keep the start of this documentation text on very first comment line,
+  // it prevents a Doxygen bug
+  /** Compute the measure value for iEdge.
    *
    * \param[in] iEdge
    * \return measure value, here the squared edge length
@@ -90,8 +91,9 @@ protected:
     return static_cast< MeasureType >( org.SquaredEuclideanDistanceTo(dest) );
     }
 
-  /**
-   * Calculate the position of the remaining vertex from collapsing iEdge.
+  // keep the start of this documentation text on very first comment line,
+  // it prevents a Doxygen bug
+  /** Calculate the position of the remaining vertex from collapsing iEdge.
    *
    * \param[in] iEdge
    * \return the optimal point location
diff --git a/Utilities/ITK/Modules/Core/QuadEdgeMesh/wrapping/itkMatrixCoefficients.wrap b/Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkMatrixCoefficients.wrap
similarity index 100%
rename from Utilities/ITK/Modules/Core/QuadEdgeMesh/wrapping/itkMatrixCoefficients.wrap
rename to Utilities/ITK/Modules/Filtering/QuadEdgeMeshFiltering/wrapping/itkMatrixCoefficients.wrap
diff --git a/Utilities/ITK/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.h b/Utilities/ITK/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.h
index af3d275..0013d04 100644
--- a/Utilities/ITK/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.h
@@ -218,8 +218,7 @@ public:
    * provide an implementation for GenerateInputRequestedRegion() in
    * order to inform the pipeline execution model.
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
 #ifdef ITK_USE_CONCEPT_CHECKING
   // Begin concept checking
diff --git a/Utilities/ITK/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.hxx
index d8f8ed1..d3699ab 100644
--- a/Utilities/ITK/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Smoothing/include/itkDiscreteGaussianImageFilter.hxx
@@ -31,7 +31,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 DiscreteGaussianImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx
index a5ec5c5..e2c44bb 100644
--- a/Utilities/ITK/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx
@@ -241,12 +241,12 @@ RecursiveGaussianImageFilter< TInputImage, TOutputImage >
                        ScalarRealType & N0, ScalarRealType & N1, ScalarRealType & N2, ScalarRealType & N3,
                        ScalarRealType & SN, ScalarRealType & DN, ScalarRealType & EN)
 {
-  ScalarRealType Sin1 = vcl_sin(W1 / sigmad);
-  ScalarRealType Sin2 = vcl_sin(W2 / sigmad);
-  ScalarRealType Cos1 = vcl_cos(W1 / sigmad);
-  ScalarRealType Cos2 = vcl_cos(W2 / sigmad);
-  ScalarRealType Exp1 = vcl_exp(L1 / sigmad);
-  ScalarRealType Exp2 = vcl_exp(L2 / sigmad);
+  ScalarRealType Sin1 = std::sin(W1 / sigmad);
+  ScalarRealType Sin2 = std::sin(W2 / sigmad);
+  ScalarRealType Cos1 = std::cos(W1 / sigmad);
+  ScalarRealType Cos2 = std::cos(W2 / sigmad);
+  ScalarRealType Exp1 = std::exp(L1 / sigmad);
+  ScalarRealType Exp2 = std::exp(L2 / sigmad);
 
   N0  = A1 + A2;
   N1  = Exp2 * ( B2 * Sin2 - ( A2 + 2 * A1 ) * Cos2 );
@@ -273,12 +273,12 @@ RecursiveGaussianImageFilter< TInputImage, TOutputImage >
                        ScalarRealType W1, ScalarRealType L1, ScalarRealType W2, ScalarRealType L2,
                        ScalarRealType & SD, ScalarRealType & DD, ScalarRealType & ED)
 {
-  //  const ScalarRealType Sin1 = vcl_sin(W1 / sigmad);
-  //  const ScalarRealType Sin2 = vcl_sin(W2 / sigmad);
-  const ScalarRealType Cos1 = vcl_cos(W1 / sigmad);
-  const ScalarRealType Cos2 = vcl_cos(W2 / sigmad);
-  const ScalarRealType Exp1 = vcl_exp(L1 / sigmad);
-  const ScalarRealType Exp2 = vcl_exp(L2 / sigmad);
+  //  const ScalarRealType Sin1 = std::sin(W1 / sigmad);
+  //  const ScalarRealType Sin2 = std::sin(W2 / sigmad);
+  const ScalarRealType Cos1 = std::cos(W1 / sigmad);
+  const ScalarRealType Cos2 = std::cos(W2 / sigmad);
+  const ScalarRealType Exp1 = std::exp(L1 / sigmad);
+  const ScalarRealType Exp2 = std::exp(L2 / sigmad);
 
   this->m_D4 = Exp1 * Exp1 * Exp2 * Exp2;
   this->m_D3 = -2 * Cos1 * Exp1 * Exp2 * Exp2;
diff --git a/Utilities/ITK/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h b/Utilities/ITK/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h
index c01f6ee..5d5cdff 100644
--- a/Utilities/ITK/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.h
@@ -163,8 +163,7 @@ protected:
    * an implementation for GenerateInputRequestedRegion in order to inform
    * the pipeline execution model.
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
   // Override since the filter produces the entire dataset
   void EnlargeOutputRequestedRegion(DataObject *output);
diff --git a/Utilities/ITK/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx
index b1e11f1..f9b3230 100644
--- a/Utilities/ITK/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx
@@ -184,7 +184,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 SmoothingRecursiveGaussianImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // Call the superclass' implementation of this method. This should
   // copy the output requested region to the input requested region.
diff --git a/Utilities/ITK/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx b/Utilities/ITK/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx
index 2638efd..549c716 100644
--- a/Utilities/ITK/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/SpatialFunction/include/itkSpatialFunctionImageEvaluatorFilter.hxx
@@ -30,7 +30,7 @@ SpatialFunctionImageEvaluatorFilter< TSpatialFunction, TInputImage, TOutputImage
   itkDebugMacro(<< "SpatialFunctionImageEvaluatorFilter::SpatialFunctionImageEvaluatorFilter() called");
 
   // Set the internal function to null
-  this->m_PixelFunction = 0;
+  this->m_PixelFunction = ITK_NULLPTR;
 }
 
 template< typename TSpatialFunction, typename TInputImage, typename TOutputImage >
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h
index a8c25c0..3e2fe7e 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h
@@ -75,7 +75,7 @@ public:
   {
     if ( this->GetNumberOfInputs() < 1 )
       {
-      return 0;
+      return ITK_NULLPTR;
       }
     return static_cast< const HistogramType * >( this->ProcessObject::GetInput(0) );
   }
@@ -84,13 +84,13 @@ public:
   {
     if ( this->GetNumberOfOutputs() < 1 )
       {
-      return 0;
+      return ITK_NULLPTR;
       }
     return static_cast< DecoratedOutputType * >( this->ProcessObject::GetOutput(0) );
   }
 
   using Superclass::MakeOutput;
-  virtual typename DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType)
+  virtual typename DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE
   {
     return DecoratedOutputType::New().GetPointer();
   }
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h
index 3acfb4e..55942bd 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.h
@@ -163,7 +163,7 @@ public:
   itkGetConstMacro(NumberOfHistogramBins, unsigned int);
 
   /** Does histogram generator compute min and max from data?
-    * Default is false for all but char types */
+    * Default is true for all but char types */
   itkSetMacro(AutoMinimumMaximum, bool);
   itkGetConstMacro(AutoMinimumMaximum, bool);
   itkBooleanMacro(AutoMinimumMaximum);
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx
index 7e98d02..702ae6b 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHistogramThresholdImageFilter.hxx
@@ -38,10 +38,12 @@ HistogramThresholdImageFilter<TInputImage, TOutputImage, TMaskImage>
   m_InsideValue    = NumericTraits<OutputPixelType>::max();
   m_Threshold      = NumericTraits<InputPixelType>::Zero;
   m_MaskValue      = NumericTraits<MaskPixelType>::max();
-  m_Calculator     = NULL;
+  m_Calculator     = ITK_NULLPTR;
   m_MaskOutput     = true;
 
-  if( typeid(ValueType) == typeid(signed char) || typeid(ValueType) == typeid(unsigned char) )
+  if( typeid(ValueType) == typeid(signed char)
+      || typeid(ValueType) == typeid(unsigned char)
+      || typeid(ValueType) == typeid(char))
     {
     m_AutoMinimumMaximum = false;
     }
@@ -132,7 +134,7 @@ HistogramThresholdImageFilter<TInputImage, TOutputImage, TMaskImage>
     this->GraftOutput( thresholder->GetOutput() );
     }
   m_Threshold = m_Calculator->GetThreshold();
-  m_Calculator->SetInput( NULL );
+  m_Calculator->SetInput( ITK_NULLPTR );
 }
 
 template<typename TInputImage, typename TOutputImage, typename TMaskImage>
@@ -158,12 +160,15 @@ HistogramThresholdImageFilter<TInputImage,TOutputImage,TMaskImage>
      << static_cast<typename NumericTraits<OutputPixelType>::PrintType>(m_OutsideValue) << std::endl;
   os << indent << "InsideValue: "
      << static_cast<typename NumericTraits<OutputPixelType>::PrintType>(m_InsideValue) << std::endl;
-  os << indent << "Calculator: ";
-  m_Calculator->Print( os, indent.GetNextIndent() );
+  itkPrintSelfObjectMacro( Calculator );
+  os << indent << "AutoMinimumMaximim: " << m_AutoMinimumMaximum  << std::endl;
   os << indent << "Threshold (computed): "
      << static_cast<typename NumericTraits<InputPixelType>::PrintType>(m_Threshold) << std::endl;
   os << indent << "Mask image in use: " << (bool)(this->GetMaskImage() ) << std::endl;
   os << indent << "Masking of output: " << this->GetMaskOutput() << std::endl;
+  os << indent << "MaskValue: " <<  static_cast<typename NumericTraits<OutputPixelType>::PrintType>(m_MaskValue) << std::endl;
+
+  itkPrintSelfObjectMacro(Calculator);
 
 }
 
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx
index d1ca32e..9a7e173 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkHuangThresholdCalculator.hxx
@@ -87,7 +87,7 @@ HuangThresholdCalculator<THistogram, TOutput>
   for( size_t i = 1; i < Smu.size(); i++)
     {
     double mu = 1. / ( 1. + static_cast< double >( i ) / C );
-    Smu[i] = -mu * vcl_log( mu ) - (1. - mu) * vcl_log( 1. - mu );
+    Smu[i] = -mu * std::log( mu ) - (1. - mu) * std::log( 1. - mu );
     }
 
   // calculate the threshold
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx
index 7313e76..50fffe9 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkKittlerIllingworthThresholdCalculator.hxx
@@ -180,7 +180,7 @@ KittlerIllingworthThresholdCalculator<THistogram, TOutput>
     //The terms of the quadratic equation to be solved.
     double w0 = 1.0/sigma2-1.0/tau2;
     double w1 = mu/sigma2-nu/tau2;
-    double w2 = (mu*mu)/sigma2 - (nu*nu)/tau2 + vcl_log10((sigma2*(q*q))/(tau2*p*p));
+    double w2 = (mu*mu)/sigma2 - (nu*nu)/tau2 + std::log10((sigma2*(q*q))/(tau2*p*p));
 
     //If the next threshold would be imaginary, return with the current one.
     double sqterm = (w1*w1)-w0*w2;
@@ -212,7 +212,7 @@ KittlerIllingworthThresholdCalculator<THistogram, TOutput>
       {
       //The updated threshold is the integer part of the solution of the quadratic equation.
       Tprev = threshold;
-      double temp = (w1+vcl_sqrt(sqterm))/w0;
+      double temp = (w1+std::sqrt(sqterm))/w0;
 
       // not sure if this condition is really useful
       if (vnl_math_isnan(temp))
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx
index 4738352..cc608c5 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkLiThresholdCalculator.hxx
@@ -111,7 +111,7 @@ LiThresholdCalculator<THistogram, TOutput>
   //
   //#define IS_NEG( x ) ( ( x ) < -DBL_EPSILON )
   //DBL_EPSILON = 2.220446049250313E-16
-  temp = ( mean_back - mean_obj ) / ( vcl_log ( mean_back ) - vcl_log ( mean_obj ) );
+  temp = ( mean_back - mean_obj ) / ( std::log ( mean_back ) - std::log ( mean_obj ) );
 
   if (temp < -2.220446049250313E-16)
     new_thresh = (int) (temp - 0.5);
@@ -120,7 +120,7 @@ LiThresholdCalculator<THistogram, TOutput>
   /*  Stop the iterations when the difference between the
                         new and old threshold values is less than the tolerance */
   }
-  while ( vcl_abs ( new_thresh - old_thresh ) > tolerance );
+  while ( std::abs ( new_thresh - old_thresh ) > tolerance );
 
   this->GetOutput()->Set( static_cast<OutputType>( histogram->GetMeasurement( histthresh, 0 ) ) );
 }
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx
index 374c758..1340765 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkMaximumEntropyThresholdCalculator.hxx
@@ -82,7 +82,7 @@ MaximumEntropyThresholdCalculator<THistogram, TOutput>
   first_bin=0;
   for (ih = 0; (unsigned)ih < size; ih++ )
     {
-    if ( !(vcl_abs(P1[ih])<tolerance))
+    if ( !(std::abs(P1[ih])<tolerance))
       {
       first_bin = ih;
       break;
@@ -93,7 +93,7 @@ MaximumEntropyThresholdCalculator<THistogram, TOutput>
   last_bin=size - 1;
   for (ih = size - 1; ih >= first_bin; ih-- )
     {
-    if ( !(vcl_abs(P2[ih])<tolerance))
+    if ( !(std::abs(P2[ih])<tolerance))
       {
       last_bin = ih;
       break;
@@ -112,7 +112,7 @@ MaximumEntropyThresholdCalculator<THistogram, TOutput>
       {
       if ( histogram->GetFrequency(ih, 0) != 0 )
         {
-        ent_back -= ( norm_histo[ih] / P1[it] ) * vcl_log ( norm_histo[ih] / P1[it] );
+        ent_back -= ( norm_histo[ih] / P1[it] ) * std::log ( norm_histo[ih] / P1[it] );
         }
       }
 
@@ -122,7 +122,7 @@ MaximumEntropyThresholdCalculator<THistogram, TOutput>
       {
       if (histogram->GetFrequency(ih, 0) != 0)
         {
-        ent_obj -= ( norm_histo[ih] / P2[it] ) * vcl_log ( norm_histo[ih] / P2[it] );
+        ent_obj -= ( norm_histo[ih] / P2[it] ) * std::log ( norm_histo[ih] / P2[it] );
         }
       }
 
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx
index c518d0c..63da109 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkMomentsThresholdCalculator.hxx
@@ -74,8 +74,8 @@ MomentsThresholdCalculator<THistogram, TOutput>
   cd = m0 * m2 - m1 * m1;
   c0 = ( -m2 * m2 + m1 * m3 ) / cd;
   c1 = ( m0 * -m3 + m2 * m1 ) / cd;
-  z0 = 0.5 * ( -c1 - vcl_sqrt ( c1 * c1 - 4.0 * c0 ) );
-  z1 = 0.5 * ( -c1 + vcl_sqrt ( c1 * c1 - 4.0 * c0 ) );
+  z0 = 0.5 * ( -c1 - std::sqrt ( c1 * c1 - 4.0 * c0 ) );
+  z1 = 0.5 * ( -c1 + std::sqrt ( c1 * c1 - 4.0 * c0 ) );
   p0 = ( z1 - m1 ) / ( z1 - z0 );  /* Fraction of the object pixels in the target binary image */
 
   // The threshold is the gray-level closest
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx
index fbf7c33..b83b725 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx
@@ -18,6 +18,7 @@
 #ifndef __itkOtsuMultipleThresholdsCalculator_hxx
 #define __itkOtsuMultipleThresholdsCalculator_hxx
 
+#include "itkMath.h"
 #include "itkOtsuMultipleThresholdsCalculator.h"
 
 namespace itk
@@ -53,11 +54,8 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
 {
   typename TInputHistogram::ConstPointer histogram = this->GetInputHistogram();
 
-  SizeValueType numberOfHistogramBins = histogram->Size();
-  SizeValueType numberOfClasses = classMean.size();
-
-  MeanType      meanOld;
-  FrequencyType freqOld;
+  const SizeValueType numberOfHistogramBins = histogram->Size();
+  const SizeValueType numberOfClasses = classMean.size();
 
   unsigned int k;
   int          j;
@@ -73,8 +71,8 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
       // threshold
       ++thresholdIndexes[j];
 
-      meanOld = classMean[j];
-      freqOld = classFrequency[j];
+      const MeanType meanOld = classMean[j];
+      const FrequencyType freqOld = classFrequency[j];
 
       classFrequency[j] += histogram->GetFrequency(thresholdIndexes[j]);
 
@@ -165,7 +163,7 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
   typename TInputHistogram::ConstIterator end = histogram->End();
 
   MeanType      globalMean = NumericTraits< MeanType >::Zero;
-  FrequencyType globalFrequency = histogram->GetTotalFrequency();
+  const FrequencyType globalFrequency = histogram->GetTotalFrequency();
   while ( iter != end )
     {
     globalMean += static_cast< MeanType >( iter.GetMeasurementVector()[0] )
@@ -232,12 +230,29 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
     classMean[numberOfClasses - 1] = NumericTraits< MeanType >::Zero;
     }
 
+  //
+  // The "volatile" modifier is used here for preventing the variable from
+  // being kept in 80 bit FPU registers when using 32-bit x86 processors with
+  // SSE instructions disabled. A case that arised in the Debian 32-bits
+  // distribution.
+  //
+#ifndef ITK_COMPILER_SUPPORTS_SSE2_32
+  volatile VarianceType maxVarBetween = NumericTraits< VarianceType >::Zero;
+#else
   VarianceType maxVarBetween = NumericTraits< VarianceType >::Zero;
+#endif
+  //
+  // The introduction of the "volatile" modifier forces the compiler to keep
+  // the variable in memory and therefore store it in the IEEE float/double
+  // format. In this way making numerical results consistent across platforms.
+  //
+
   for ( j = 0; j < numberOfClasses; j++ )
     {
-    maxVarBetween += (static_cast< VarianceType >( classFrequency[j] ) / static_cast< VarianceType >( globalFrequency ))
+    maxVarBetween += (static_cast< VarianceType >( classFrequency[j] ))
       * static_cast< VarianceType >( ( classMean[j] ) * ( classMean[j] ) );
     }
+  maxVarBetween /= static_cast< VarianceType >( globalFrequency );
 
   // Sum the relevant weights for valley emphasis
   WeightType valleyEmphasisFactor = NumericTraits< WeightType >::Zero;
@@ -255,7 +270,24 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
   // yields maximum between-class variance
   while ( Self::IncrementThresholds(thresholdIndexes, globalMean, classMean, classFrequency) )
     {
+
+    //
+    // The "volatile" modifier is used here for preventing the variable from
+    // being kept in 80 bit FPU registers when using 32-bit x86 processors with
+    // SSE instructions disabled. A case that arised in the Debian 32-bits
+    // distribution.
+    //
+#ifndef ITK_COMPILER_SUPPORTS_SSE2_32
+    volatile VarianceType varBetween = NumericTraits< VarianceType >::Zero;
+#else
     VarianceType varBetween = NumericTraits< VarianceType >::Zero;
+#endif
+    //
+    // The introduction of the "volatile" modifier forces the compiler to keep
+    // the variable in memory and therefore store it in the IEEE float/double
+    // format. In this way making numerical results consistent across platforms.
+    //
+
     for ( j = 0; j < numberOfClasses; j++ )
       {
       // The true between-class variance \sigma_B^2 for any number of classes is defined as:
@@ -270,9 +302,10 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
       // Since we are looking for the argmax, the second term can be ignored because it is a constant, leading to the simpler
       // (\sum_{k=1}^{M} \omega_k \mu_k^2), which is what is implemented here.
       // Although this is no longer truly a "between class variance", we keep that name since it is only different by a constant.
-      varBetween += (static_cast< VarianceType >( classFrequency[j] ) / static_cast< VarianceType >( globalFrequency ))
+      varBetween += (static_cast< VarianceType >( classFrequency[j] ))
               * static_cast< VarianceType >( ( classMean[j] ) * ( classMean[j] ) );
       }
+    varBetween /= static_cast< VarianceType >( globalFrequency );
 
     if (m_ValleyEmphasis)
     {
@@ -286,7 +319,9 @@ OtsuMultipleThresholdsCalculator< TInputHistogram >
       varBetween = varBetween * valleyEmphasisFactor;
     }
 
-    if ( varBetween > maxVarBetween )
+    const unsigned int maxUlps = 1;
+    if ( varBetween > maxVarBetween &&
+         !Math::FloatAlmostEqual( maxVarBetween, varBetween, maxUlps) )
       {
       maxVarBetween = varBetween;
       maxVarThresholdIndexes = thresholdIndexes;
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h
index d776f8a..8ef8478 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.h
@@ -72,6 +72,7 @@ protected:
     m_OtsuMultipleThresholdsCalculator = OtsuMultipleThresholdsCalculator<THistogram>::New();
   }
   virtual ~OtsuThresholdCalculator() {};
+  void PrintSelf(std::ostream & os, Indent indent) const;
   void GenerateData(void);
 
 private:
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.hxx
index db135a1..176320b 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkOtsuThresholdCalculator.hxx
@@ -36,6 +36,18 @@ OtsuThresholdCalculator< THistogram, TOutput >
   this->GetOutput()->Set( static_cast<OutputType>( m_OtsuMultipleThresholdsCalculator->GetOutput()[0] ) );
   this->UpdateProgress(1.0);
 }
+
+
+template< typename THistogram, typename TOutput >
+void
+OtsuThresholdCalculator< THistogram, TOutput >
+::PrintSelf(std::ostream & os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  itkPrintSelfObjectMacro(OtsuMultipleThresholdsCalculator);
+}
+
 } // end namespace itk
 
 #endif
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx
index c7c2ea8..9aa5dba 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkRenyiEntropyThresholdCalculator.hxx
@@ -73,7 +73,7 @@ RenyiEntropyThresholdCalculator<THistogram, TOutput>
   m_FirstBin=0;
   for(ih = 0; ih < m_Size; ih++ )
     {
-    if( !( vcl_abs( P1[ih] ) < tolerance ) )
+    if( !( std::abs( P1[ih] ) < tolerance ) )
       {
       m_FirstBin = ih;
       break;
@@ -84,7 +84,7 @@ RenyiEntropyThresholdCalculator<THistogram, TOutput>
   m_LastBin = static_cast< InstanceIdentifier >( m_Size - 1 );
   for(ih = m_Size - 1; ih >= m_FirstBin; ih-- )
     {
-    if( !( vcl_abs( P2[ih] ) < tolerance ) )
+    if( !( std::abs( P2[ih] ) < tolerance ) )
       {
       m_LastBin = ih;
       break;
@@ -123,9 +123,9 @@ RenyiEntropyThresholdCalculator<THistogram, TOutput>
 
   // Adjust beta values
   // note t_star1, t_star2, t_star3 are unsigned
-  if( vcl_abs( static_cast< double >( t_star1 ) - static_cast< double >( t_star2 ) ) <= 5. )
+  if( std::abs( static_cast< double >( t_star1 ) - static_cast< double >( t_star2 ) ) <= 5. )
     {
-    if( vcl_abs( static_cast< double >( t_star2 ) - static_cast< double >( t_star3 ) ) <= 5. )
+    if( std::abs( static_cast< double >( t_star2 ) - static_cast< double >( t_star3 ) ) <= 5. )
       {
       beta1 = 1.;
       beta2 = 2.;
@@ -140,7 +140,7 @@ RenyiEntropyThresholdCalculator<THistogram, TOutput>
     }
   else
     {
-    if( vcl_abs( static_cast< double >( t_star2 ) - static_cast< double >( t_star3 ) ) <= 5. )
+    if( std::abs( static_cast< double >( t_star2 ) - static_cast< double >( t_star3 ) ) <= 5. )
       {
       beta1 = 3.;
       beta2 = 1.;
@@ -194,7 +194,7 @@ RenyiEntropyThresholdCalculator<THistogram, TOutput>
       if( histogram->GetFrequency(ih, 0) != NumericTraits< AbsoluteFrequencyType >::Zero )
         {
         double x = ( normHisto[ih] / P1[it] );
-        ent_back -= x * vcl_log ( x );
+        ent_back -= x * std::log ( x );
         }
       }
 
@@ -205,7 +205,7 @@ RenyiEntropyThresholdCalculator<THistogram, TOutput>
       if( histogram->GetFrequency(ih, 0) != NumericTraits< AbsoluteFrequencyType >::Zero )
         {
         double x = ( normHisto[ih] / P2[it] );
-        ent_obj -= x * vcl_log( x );
+        ent_obj -= x * std::log( x );
         }
       }
 
@@ -243,14 +243,14 @@ RenyiEntropyThresholdCalculator<THistogram, TOutput>
     double ent_back = 0.0;
     for( InstanceIdentifier ih = 0; ih <= it; ih++ )
       {
-      ent_back += vcl_sqrt( normHisto[ih] / P1[it] );
+      ent_back += std::sqrt( normHisto[ih] / P1[it] );
       }
 
     /* Entropy of the object pixels */
     double ent_obj = 0.0;
     for( InstanceIdentifier ih = it + 1; ih < m_Size; ih++ )
       {
-      ent_obj += vcl_sqrt( normHisto[ih] / P2[it] );
+      ent_obj += std::sqrt( normHisto[ih] / P2[it] );
       }
 
     /* Total entropy */
@@ -259,7 +259,7 @@ RenyiEntropyThresholdCalculator<THistogram, TOutput>
 
     if( product > 0.0 )
       {
-      tot_ent = term * vcl_log( ent_back * ent_obj );
+      tot_ent = term * std::log( ent_back * ent_obj );
       }
 
     if( tot_ent > max_ent )
@@ -307,7 +307,7 @@ RenyiEntropyThresholdCalculator<THistogram, TOutput>
     double product = ent_back * ent_obj;
     if( product > 0.0 )
       {
-      tot_ent = term * vcl_log( product );
+      tot_ent = term * std::log( product );
       }
 
     if( tot_ent > max_ent )
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx
index f27a3ef..e8ea6f9 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkShanbhagThresholdCalculator.hxx
@@ -78,7 +78,7 @@ ShanbhagThresholdCalculator<THistogram, TOutput>
   first_bin=0;
   for (ih = 0; (unsigned)ih < size; ih++ )
     {
-    if ( !(vcl_abs(P1[ih])<tolerance))
+    if ( !(std::abs(P1[ih])<tolerance))
       {
       first_bin = ih;
       break;
@@ -89,7 +89,7 @@ ShanbhagThresholdCalculator<THistogram, TOutput>
   last_bin=size - 1;
   for (ih = size - 1; ih >= first_bin; ih-- )
     {
-    if ( !(vcl_abs(P2[ih])<tolerance))
+    if ( !(std::abs(P2[ih])<tolerance))
       {
       last_bin = ih;
       break;
@@ -108,7 +108,7 @@ ShanbhagThresholdCalculator<THistogram, TOutput>
     term = 0.5 / P1[it];
     for ( ih = 1; ih <= it; ih++ )
       { //0+1?
-      ent_back -= norm_histo[ih] * vcl_log ( 1.0 - term * P1[ih - 1] );
+      ent_back -= norm_histo[ih] * std::log ( 1.0 - term * P1[ih - 1] );
       }
     ent_back *= term;
 
@@ -117,12 +117,12 @@ ShanbhagThresholdCalculator<THistogram, TOutput>
     term = 0.5 / P2[it];
     for ( ih = it + 1; (unsigned)ih < size; ih++ )
       {
-      ent_obj -= norm_histo[ih] * vcl_log ( 1.0 - term * P2[ih] );
+      ent_obj -= norm_histo[ih] * std::log ( 1.0 - term * P2[ih] );
       }
     ent_obj *= term;
 
     /* Total entropy */
-    tot_ent = vcl_abs ( ent_back - ent_obj );
+    tot_ent = std::abs ( ent_back - ent_obj );
 
     if ( tot_ent < min_ent )
       {
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.h b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.h
index be13b7f..09c0014 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.h
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.h
@@ -42,6 +42,21 @@ namespace itk
  * value (by default, "black") if the image values are below, above, or
  * between simple threshold values.
  *
+ * The available methods are:
+ *
+ * ThresholdAbove():
+ * The values greater than the threshold value are set to OutsideValue
+ *
+ * ThresholdBelow():
+ * The values less than the threshold value are set to OutsideValue
+ *
+ * ThresholdOutside():
+ * The values outside the threshold range (less than lower or greater
+ * than upper) are set to OutsideValue
+ *
+ * Note that these definitions indicate that pixels equal to the threshold
+ * value are not set to OutsideValue in any of these methods
+ *
  * The pixels must support the operators >= and <=.
  *
  * \ingroup IntensityImageFilters MultiThreaded
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx
index a0101c6..a920e86 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkThresholdImageFilter.hxx
@@ -71,7 +71,7 @@ ThresholdImageFilter< TImage >
 }
 
 /**
- * The values greater than or equal to the value are set to OutsideValue
+ * The values greater than the threshold value are set to OutsideValue
  */
 template< typename TImage >
 void
@@ -88,7 +88,7 @@ ThresholdImageFilter< TImage >
 }
 
 /**
- * The values less than or equal to the value are set to OutsideValue
+ * The values less than the threshold value are set to OutsideValue
  */
 template< typename TImage >
 void
@@ -104,7 +104,7 @@ ThresholdImageFilter< TImage >
 }
 
 /**
- * The values outside the range are set to OutsideValue
+ * The values outside the threshold range (less than lower or greater than upper) are set to OutsideValue
  */
 template< typename TImage >
 void
diff --git a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx
index 9781534..6ff5499 100644
--- a/Utilities/ITK/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx
+++ b/Utilities/ITK/Modules/Filtering/Thresholding/include/itkYenThresholdCalculator.hxx
@@ -86,7 +86,7 @@ YenThresholdCalculator<THistogram, TOutput>
   max_crit = itk::NumericTraits<double>::NonpositiveMin();
   for ( it = 0; (unsigned)it < size; it++ )
     {
-    crit = -1.0 * (( P1_sq[it] * P2_sq[it] )> 0.0? vcl_log( P1_sq[it] * P2_sq[it]):0.0) +  2 * ( ( P1[it] * ( 1.0 - P1[it] ) )>0.0? vcl_log(  P1[it] * ( 1.0 - P1[it] ) ): 0.0);
+    crit = -1.0 * (( P1_sq[it] * P2_sq[it] )> 0.0? std::log( P1_sq[it] * P2_sq[it]):0.0) +  2 * ( ( P1[it] * ( 1.0 - P1[it] ) )>0.0? std::log(  P1[it] * ( 1.0 - P1[it] ) ): 0.0);
     if ( crit > max_crit )
       {
       max_crit = crit;
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h b/Utilities/ITK/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h
index beea164..8b948bc 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h
@@ -104,7 +104,7 @@ public:
 protected:
   ArchetypeSeriesFileNames();
   ~ArchetypeSeriesFileNames() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Method that actually does the archetype matching/grouping */
   void Scan();
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileReader.hxx b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileReader.hxx
index a4b4e24..f436c9b 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileReader.hxx
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileReader.hxx
@@ -34,7 +34,7 @@ template< typename TOutputImage, typename ConvertPixelTraits >
 ImageFileReader< TOutputImage, ConvertPixelTraits >
 ::ImageFileReader()
 {
-  m_ImageIO = 0;
+  m_ImageIO = ITK_NULLPTR;
   this->SetFileName("");
   m_UserSpecifiedImageIO = false;
   m_UseStreaming = true;
@@ -51,15 +51,7 @@ void ImageFileReader< TOutputImage, ConvertPixelTraits >
 {
   Superclass::PrintSelf(os, indent);
 
-  if ( m_ImageIO )
-    {
-    os << indent << "ImageIO: \n";
-    m_ImageIO->Print( os, indent.GetNextIndent() );
-    }
-  else
-    {
-    os << indent << "ImageIO: (null)" << "\n";
-    }
+  itkPrintSelfObjectMacro( ImageIO );
 
   os << indent << "UserSpecifiedImageIO flag: " << m_UserSpecifiedImageIO << "\n";
   os << indent << "m_UseStreaming: " << m_UseStreaming << "\n";
@@ -120,7 +112,7 @@ ImageFileReader< TOutputImage, ConvertPixelTraits >
   if ( m_ImageIO.IsNull() )
     {
     std::ostringstream msg;
-    msg << " Could not create IO object for file "
+    msg << " Could not create IO object for reading file "
         << this->GetFileName().c_str() << std::endl;
     if ( m_ExceptionMessage.size() )
       {
@@ -128,17 +120,25 @@ ImageFileReader< TOutputImage, ConvertPixelTraits >
       }
     else
       {
-      msg << "  Tried to create one of the following:" << std::endl;
       std::list< LightObject::Pointer > allobjects =
         ObjectFactoryBase::CreateAllInstance("itkImageIOBase");
-      for ( std::list< LightObject::Pointer >::iterator i = allobjects.begin();
-            i != allobjects.end(); ++i )
+      if (allobjects.size() > 0)
+        {
+        msg << "  Tried to create one of the following:" << std::endl;
+        for ( std::list< LightObject::Pointer >::iterator i = allobjects.begin();
+              i != allobjects.end(); ++i )
+          {
+          ImageIOBase *io = dynamic_cast< ImageIOBase * >( i->GetPointer() );
+          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;
+        }
+      else
         {
-        ImageIOBase *io = dynamic_cast< ImageIOBase * >( i->GetPointer() );
-        msg << "    " << io->GetNameOfClass() << std::endl;
+        msg << "  There are no registered IO factories." << std::endl;
+        msg << "  Please visit http://www.itk.org/Wiki/ITK/FAQ#NoFactoryException to diagnose the problem." << std::endl;
         }
-      msg << "  You probably failed to set a file suffix, or" << std::endl;
-      msg << "    set the suffix to an unsupported type." << std::endl;
       }
     ImageFileReaderException e(__FILE__, __LINE__, msg.str().c_str(), ITK_LOCATION);
     throw e;
@@ -382,7 +382,7 @@ void ImageFileReader< TOutputImage, ConvertPixelTraits >
   itkDebugMacro (<< "Setting imageIO IORegion to: " << m_ActualIORegion);
   m_ImageIO->SetIORegion(m_ActualIORegion);
 
-  char *loadBuffer = 0;
+  char *loadBuffer = ITK_NULLPTR;
   // the size of the buffer is computed based on the actual number of
   // pixels to be read and the actual size of the pixels to be read
   // (as opposed to the sizes of the output)
@@ -452,7 +452,7 @@ void ImageFileReader< TOutputImage, ConvertPixelTraits >
 
     // clean up
     delete[] loadBuffer;
-    loadBuffer = 0;
+    loadBuffer = ITK_NULLPTR;
 
     // then rethrow
     throw;
@@ -460,7 +460,7 @@ void ImageFileReader< TOutputImage, ConvertPixelTraits >
 
   // clean up
   delete[] loadBuffer;
-  loadBuffer = 0;
+  loadBuffer = ITK_NULLPTR;
 }
 
 template< typename TOutputImage, typename ConvertPixelTraits >
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileWriter.h b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileWriter.h
index 7e5663d..20e8945 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileWriter.h
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileWriter.h
@@ -161,7 +161,7 @@ public:
 
   /** Aliased to the Write() method to be consistent with the rest of the
    * pipeline. */
-  virtual void Update()
+  virtual void Update() ITK_OVERRIDE
   {
     this->Write();
   }
@@ -171,7 +171,7 @@ public:
    * Updates the pipeline, streaming it the NumberOfStreamDivisions times.
    * Existing PasteIORegion is reset.
    */
-  virtual void UpdateLargestPossibleRegion()
+  virtual void UpdateLargestPossibleRegion() ITK_OVERRIDE
   {
     m_PasteIORegion = ImageIORegion(TInputImage::ImageDimension);
     m_UserSpecifiedIORegion = false;
@@ -196,10 +196,10 @@ public:
 protected:
   ImageFileWriter();
   ~ImageFileWriter();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Does the real work. */
-  void GenerateData(void);
+  virtual void GenerateData(void) ITK_OVERRIDE;
 
 private:
   ImageFileWriter(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileWriter.hxx b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileWriter.hxx
index 325479b..c161c15 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileWriter.hxx
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageFileWriter.hxx
@@ -111,7 +111,7 @@ ImageFileWriter< TInputImage >
   itkDebugMacro(<< "Writing an image file");
 
   // Make sure input is available
-  if ( input == 0 )
+  if ( input == ITK_NULLPTR )
     {
     itkExceptionMacro(<< "No input to writer!");
     }
@@ -150,21 +150,27 @@ ImageFileWriter< TInputImage >
     {
     ImageFileWriterException e(__FILE__, __LINE__);
     std::ostringstream       msg;
-    msg << " Could not create IO object for file "
+    std::list< LightObject::Pointer > allobjects =
+      ObjectFactoryBase::CreateAllInstance("itkImageIOBase");
+    msg << " Could not create IO object for writing file "
         << m_FileName.c_str() << std::endl;
-    msg << "  Tried to create one of the following:" << std::endl;
+    if (allobjects.size() > 0)
       {
-      std::list< LightObject::Pointer > allobjects =
-        ObjectFactoryBase::CreateAllInstance("itkImageIOBase");
+      msg << "  Tried to create one of the following:" << std::endl;
       for ( std::list< LightObject::Pointer >::iterator i = allobjects.begin();
             i != allobjects.end(); ++i )
         {
         ImageIOBase *io = dynamic_cast< ImageIOBase * >( i->GetPointer() );
         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;
+      }
+    else
+      {
+      msg << "  There are no registered IO factories." << std::endl;
+      msg << "  Please visit http://www.itk.org/Wiki/ITK/FAQ#NoFactoryException to diagnose the problem." << std::endl;
       }
-    msg << "  You probably failed to set a file suffix, or" << std::endl;
-    msg << "    set the suffix to an unsupported type." << std::endl;
     e.SetDescription( msg.str().c_str() );
     e.SetLocation(ITK_LOCATION);
     throw e;
@@ -237,14 +243,14 @@ ImageFileWriter< TInputImage >
   if ( strcmp(input->GetNameOfClass(), "VectorImage") == 0 )
     {
     typedef typename InputImageType::InternalPixelType VectorImageScalarType;
-    m_ImageIO->SetPixelTypeInfo(static_cast<const VectorImageScalarType *>(0));
+    m_ImageIO->SetPixelTypeInfo(static_cast<const VectorImageScalarType *>(ITK_NULLPTR));
     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(static_cast<const InputImagePixelType *>(0));
+    m_ImageIO->SetPixelTypeInfo(static_cast<const InputImagePixelType *>(ITK_NULLPTR));
     }
 
   // Setup the image IO for writing.
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageIOBase.h b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageIOBase.h
index 3d38e08..c90355d 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageIOBase.h
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageIOBase.h
@@ -33,7 +33,9 @@
 #include "itkImageRegionSplitterBase.h"
 
 #include "vnl/vnl_vector.h"
+#include "vcl_compiler.h"
 
+#include <fstream>
 #include <string>
 
 namespace itk
@@ -523,7 +525,7 @@ public:
 protected:
   ImageIOBase();
   ~ImageIOBase();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   virtual const ImageRegionSplitterBase* GetImageRegionSplitter(void) const;
 
@@ -613,6 +615,38 @@ protected:
    * next slice. Returns m_Strides[3]. */
   SizeType GetSliceStride() const;
 
+  /** \brief Opens a file for reading and random access
+   *
+   * \param[out] inputStream is an istream presumed to be opened for reading
+   * \param[in] filename is the name of the file
+   * \param[in] ascii optional (default is false);
+   *                  if true than the file will be opened in ASCII mode,
+   *                  which generally only applies to Windows
+   *
+   * The stream is closed if it's already opened. If an error is
+   * encountered than an exception will be thrown.
+   */
+  virtual void OpenFileForReading(std::ifstream & inputStream, const std::string & filename,
+                                  bool ascii = false);
+
+  /** \brief Opens a file for writing and random access
+   *
+   * \param[out] outputStream is an ostream presumed to be opened for writing
+   * \param[in] filename is the name of the file
+   * \param[in] truncate optional (default is true);
+   *                     if true than the file's existing content is truncated,
+   *                     if false than the file is opened for reading and
+   *                     writing with existing content intact
+   * \param[in] ascii optional (default is false);
+   *                  if true than the file will be opened in ASCII mode,
+   *                  which generally only applies to Windows
+   *
+   * The stream is closed if it's already opened. If an error is
+   * encountered than an exception will be thrown.
+   */
+  virtual void OpenFileForWriting(std::ofstream & outputStream, const std::string & filename,
+                                  bool truncate = true, bool ascii = false);
+
   /** Convenient method to write a buffer as ASCII text. */
   virtual void WriteBufferAsASCII(std::ostream & os, const void *buffer,
                           IOComponentType ctype,
@@ -657,6 +691,10 @@ private:
     static const IOComponentType CType = ctype; \
   }
 
+// the following typemaps are not platform independent
+#if  VCL_CHAR_IS_SIGNED
+IMAGEIOBASE_TYPEMAP(signed char, CHAR);
+#endif // VCL_CHAR_IS_SIGNED
 IMAGEIOBASE_TYPEMAP(char, CHAR);
 IMAGEIOBASE_TYPEMAP(unsigned char, UCHAR);
 IMAGEIOBASE_TYPEMAP(short, SHORT);
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesReader.h b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesReader.h
index 1ae22aa..c4d62f0 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesReader.h
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesReader.h
@@ -155,8 +155,13 @@ public:
   itkBooleanMacro(UseStreaming);
 
 protected:
-  ImageSeriesReader():m_ImageIO(0), m_ReverseOrder(false),
-    m_UseStreaming(true), m_MetaDataDictionaryArrayUpdate(true) {}
+  ImageSeriesReader() :
+    m_ImageIO(ITK_NULLPTR),
+    m_ReverseOrder(false),
+    m_NumberOfDimensionsInImage(0),
+    m_UseStreaming(true),
+    m_MetaDataDictionaryArrayUpdate(true)
+      {}
   ~ImageSeriesReader();
   void PrintSelf(std::ostream & os, Indent indent) const;
 
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx
index 4d67169..991b717 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx
@@ -55,15 +55,7 @@ void ImageSeriesReader< TOutputImage >
   os << indent << "ReverseOrder: " << m_ReverseOrder << std::endl;
   os << indent << "UseStreaming: " << m_UseStreaming << std::endl;
 
-  if ( m_ImageIO )
-    {
-    os << indent << "ImageIO: \n";
-    m_ImageIO->Print( os, indent.GetNextIndent() );
-    }
-  else
-    {
-    os << indent << "ImageIO: (null)" << "\n";
-    }
+  itkPrintSelfObjectMacro( ImageIO );
 
   os << indent << "MetaDataDictionaryArrayMTime: " <<  m_MetaDataDictionaryArrayMTime  << std::endl;
   os << indent << "MetaDataDictionaryArrayUpdate: " << m_MetaDataDictionaryArrayUpdate << std::endl;
@@ -231,7 +223,7 @@ void ImageSeriesReader< TOutputImage >
         {
         interSliceSpacing += vnl_math_sqr(position2[j] - position1[j]);
         }
-      interSliceSpacing = static_cast< float >( vcl_sqrt(interSliceSpacing) );
+      interSliceSpacing = static_cast< float >( std::sqrt(interSliceSpacing) );
 
       if ( interSliceSpacing == 0.0f )
         {
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesWriter.h b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesWriter.h
index 85bcaad..544e4f2 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesWriter.h
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesWriter.h
@@ -133,7 +133,7 @@ public:
 
   /** Aliased to the Write() method to be consistent with the rest of the
    * pipeline. */
-  virtual void Update()
+  virtual void Update() ITK_OVERRIDE
   {
     this->Write();
   }
@@ -200,10 +200,10 @@ public:
 protected:
   ImageSeriesWriter();
   ~ImageSeriesWriter();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Does the real work. */
-  void GenerateData(void);
+  virtual void GenerateData(void) ITK_OVERRIDE;
 
   /** Transition method used for DEPRECATING old functionality.
    *  This method should be removed after release ITK 1.8 */
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx
index 5353669..092ab0a 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx
@@ -34,9 +34,9 @@ namespace itk
 template< typename TInputImage, typename TOutputImage >
 ImageSeriesWriter< TInputImage, TOutputImage >
 ::ImageSeriesWriter():
-  m_ImageIO(0), m_UserSpecifiedImageIO(false),
+  m_ImageIO(ITK_NULLPTR), m_UserSpecifiedImageIO(false),
   m_SeriesFormat("%d"),
-  m_StartIndex(1), m_IncrementIndex(1), m_MetaDataDictionaryArray(NULL)
+  m_StartIndex(1), m_IncrementIndex(1), m_MetaDataDictionaryArray(ITK_NULLPTR)
 {
   m_UseCompression = false;
 }
@@ -87,7 +87,7 @@ ImageSeriesWriter< TInputImage, TOutputImage >
   itkDebugMacro(<< "Writing an image file");
 
   // Make sure input is available
-  if ( inputImage == 0 )
+  if ( inputImage == ITK_NULLPTR )
     {
     itkExceptionMacro(<< "No input to writer!");
     }
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkNumericSeriesFileNames.h b/Utilities/ITK/Modules/IO/ImageBase/include/itkNumericSeriesFileNames.h
index f0c20aa..a278bee 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkNumericSeriesFileNames.h
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkNumericSeriesFileNames.h
@@ -96,7 +96,7 @@ public:
 protected:
   NumericSeriesFileNames();
   ~NumericSeriesFileNames() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   NumericSeriesFileNames(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h b/Utilities/ITK/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h
index 8451d6e..00cb859 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkRegularExpressionSeriesFileNames.h
@@ -115,7 +115,7 @@ protected:
     m_RegularExpression(".*\\.([0-9]+)")
   {}
   ~RegularExpressionSeriesFileNames() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   RegularExpressionSeriesFileNames(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h b/Utilities/ITK/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h
index ffab139..601fc05 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h
+++ b/Utilities/ITK/Modules/IO/ImageBase/include/itkStreamingImageIOBase.h
@@ -63,18 +63,18 @@ public:
   // see super class for documentation
   //
   // overidden to return true
-  virtual bool CanStreamWrite(void);
+  virtual bool CanStreamWrite(void) ITK_OVERRIDE;
 
   // see super class for documentation
   //
   // overidden to return true
-  virtual bool CanStreamRead(void);
+  virtual bool CanStreamRead(void) ITK_OVERRIDE;
 
   // see super class for documentation
   //
   // If UseStreamedReading is true, then returned region is the
   // requested region parameter.
-  virtual ImageIORegion GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requested) const;
+  virtual ImageIORegion GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion & requested) const ITK_OVERRIDE;
 
   // see super class for documentation
   //
@@ -82,12 +82,12 @@ public:
   // GetActualNumberOfSplitsForWritingCanStreamWrite
   virtual unsigned int GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits,
                                                          const ImageIORegion & pasteRegion,
-                                                         const ImageIORegion & largestPossibleRegion);
+                                                         const ImageIORegion & largestPossibleRegion) ITK_OVERRIDE;
 
 protected:
   StreamingImageIOBase();
   // virtual ~StreamingImageIOBase(); not needed
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** \brief Returns true if GetIORegion is not the same size as the
    * largest region give by GetNumberOfDimensions.
@@ -152,24 +152,6 @@ protected:
    */
   virtual SizeType GetDataPosition(void) const { return this->GetHeaderSize(); }
 
-  /** \brief Opens a file for reading and random access
-   *
-   * The stream is closed if it's already opened. If an error is
-   * encountered then an exception will be thrown.
-   */
-  virtual void OpenFileForReading(std::ifstream & os, const char *filename);
-
-  /** \brief Opens a file for writing and random access
-   *
-   * \param os is an ostream presumed to be opened for writing
-   * \param filename is the name of the file
-   * \param truncate if true then the file is truncated
-   *
-   * The stream is closed if it's already opened. If an error is
-   * encountered then an exception will be thrown.
-   */
-  virtual void OpenFileForWriting(std::ofstream & os, const char *filename, bool truncate);
-
 private:
   StreamingImageIOBase(const Self &); //purposely not implemented
   void operator=(const Self &);       //purposely not implemented
diff --git a/Utilities/ITK/Modules/IO/ImageBase/src/itkImageIOBase.cxx b/Utilities/ITK/Modules/IO/ImageBase/src/itkImageIOBase.cxx
index b4c543f..ae10e65 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/src/itkImageIOBase.cxx
+++ b/Utilities/ITK/Modules/IO/ImageBase/src/itkImageIOBase.cxx
@@ -21,6 +21,8 @@
 #include "itkSimpleFastMutexLock.h"
 #include "itkMutexLockHolder.h"
 
+#include "itksys/SystemTools.hxx"
+
 namespace itk
 {
 ImageIOBase::ImageIOBase():
@@ -78,7 +80,7 @@ void ImageIOBase::Resize(const unsigned int numDimensions,
                          const unsigned int *dimensions)
 {
   m_NumberOfDimensions = numDimensions;
-  if ( dimensions != NULL )
+  if ( dimensions != ITK_NULLPTR )
     {
     for ( unsigned int i = 0; i < m_NumberOfDimensions; i++ )
       {
@@ -162,7 +164,8 @@ void ImageIOBase::SetDirection(unsigned int i, const vnl_vector< double > & dire
   this->Modified();
   std::vector< double > v;
   v.resize( m_Direction.size() );
-  for ( unsigned int j = 0; j < v.size(); j++ )
+  // Note: direction.size() <= v.size().
+  for ( unsigned int j = 0; j < direction.size(); j++ )
     {
     v[j] = direction[j];
     }
@@ -197,7 +200,6 @@ const std::type_info & ImageIOBase::GetComponentTypeInfo() const
     default:
       itkExceptionMacro ("Unknown component type: " << m_ComponentType);
     }
-  return typeid( ImageIOBase::UnknownType );
 }
 
 void ImageIOBase::ComputeStrides()
@@ -331,7 +333,6 @@ unsigned int ImageIOBase::GetPixelSize() const
     {
     itkExceptionMacro ("Unknown pixel or component type: ("
                        << m_PixelType << ", " << m_ComponentType << ")");
-    return 0;
     }
 
   return this->GetComponentSize() * this->GetNumberOfComponents();
@@ -365,8 +366,6 @@ unsigned int ImageIOBase::GetComponentSize() const
     default:
       itkExceptionMacro ("Unknown component type: " << m_ComponentType);
     }
-
-  return 0;
 }
 
 std::string ImageIOBase::GetFileTypeAsString(FileType t) const
@@ -556,6 +555,94 @@ ImageIOBase::IOPixelType ImageIOBase::GetPixelTypeFromString(const std::string &
     }
 }
 
+void ImageIOBase::OpenFileForReading(std::ifstream & inputStream, const std::string & filename,
+                                     bool ascii)
+{
+  // Make sure that we have a file to
+  if ( filename.empty() )
+    {
+    itkExceptionMacro( << "A FileName must be specified." );
+    }
+
+  // Close file from any previous image
+  if ( inputStream.is_open() )
+    {
+    inputStream.close();
+    }
+
+  // Open the new file for reading
+  itkDebugMacro( << "Opening file for reading: " << filename );
+
+  std::ios::openmode mode = std::ios::in;
+  if ( !ascii )
+    {
+    mode |= std::ios::binary;
+    }
+
+  inputStream.open( filename.c_str(), mode );
+
+  if ( !inputStream.is_open() || inputStream.fail() )
+    {
+    itkExceptionMacro( << "Could not open file: "
+                       << filename << " for reading."
+                       << std::endl
+                       << "Reason: "
+                       << itksys::SystemTools::GetLastSystemError() );
+    }
+}
+
+void ImageIOBase::OpenFileForWriting(std::ofstream & outputStream, const std::string & filename,
+                                     bool truncate, bool ascii)
+{
+  // Make sure that we have a file to
+  if ( filename.empty() )
+    {
+    itkExceptionMacro( << "A FileName must be specified." );
+    }
+
+  // Close file from any previous image
+  if ( outputStream.is_open() )
+    {
+    outputStream.close();
+    }
+
+  // Open the new file for writing
+  itkDebugMacro( << "Opening file for writing: " << filename );
+
+  std::ios::openmode mode = std::ios::out;
+  if ( truncate )
+    {
+    // typically, ios::out also implies ios::trunc, but being explicit is safer
+    mode |= std::ios::trunc;
+    }
+  else
+    {
+    mode |= std::ios::in;
+    // opening a nonexistent file for reading + writing is not allowed on some platforms
+    if ( !itksys::SystemTools::FileExists( filename.c_str() ) )
+      {
+      itksys::SystemTools::Touch( filename.c_str(), true );
+      // don't worry about failure here, errors should be detected later when the file
+      // is "actually" opened, unless there is a race condition
+      }
+    }
+  if ( !ascii )
+    {
+    mode |= std::ios::binary;
+    }
+
+  outputStream.open( filename.c_str(), mode );
+
+  if ( !outputStream.is_open() || outputStream.fail() )
+    {
+    itkExceptionMacro( << "Could not open file: "
+                       << filename << " for writing."
+                       << std::endl
+                       << "Reason: "
+                       << itksys::SystemTools::GetLastSystemError() );
+    }
+}
+
 namespace
 {
 template< typename TComponent >
diff --git a/Utilities/ITK/Modules/IO/ImageBase/src/itkImageIOFactory.cxx b/Utilities/ITK/Modules/IO/ImageBase/src/itkImageIOFactory.cxx
index 4f7a101..6387758 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/src/itkImageIOFactory.cxx
+++ b/Utilities/ITK/Modules/IO/ImageBase/src/itkImageIOFactory.cxx
@@ -60,6 +60,6 @@ ImageIOFactory::CreateImageIO(const char *path, FileModeType mode)
         }
       }
     }
-  return 0;
+  return ITK_NULLPTR;
 }
 } // end namespace itk
diff --git a/Utilities/ITK/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx b/Utilities/ITK/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx
index 0e563cd..d7a3583 100644
--- a/Utilities/ITK/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx
+++ b/Utilities/ITK/Modules/IO/ImageBase/src/itkStreamingImageIOBase.cxx
@@ -242,63 +242,6 @@ bool StreamingImageIOBase::StreamWriteBufferAsBinary(std::ostream & file, const
   return true;
 }
 
-void StreamingImageIOBase::OpenFileForReading(std::ifstream & os, const char *filename)
-{
-  // Make sure that we have a file to
-  if ( *filename == 0 )
-    {
-    itkExceptionMacro(<< "A FileName must be specified.");
-    }
-
-  // Close file from any previous image
-  if ( os.is_open() )
-    {
-    os.close();
-    }
-
-  // Open the new file for reading
-  itkDebugMacro(<< "Initialize: opening file " << filename);
-
-  os.open(filename,  std::ios::in | std::ios::binary);
-  if ( os.fail() )
-    {
-    itkExceptionMacro(<< "Could not open file for reading: " << filename);
-    }
-}
-
-void StreamingImageIOBase::OpenFileForWriting(std::ofstream & os, const char *filename, bool truncate)
-{
-  // Make sure that we have a file to
-  if ( *filename == 0 )
-    {
-    itkExceptionMacro(<< "A FileName must be specified.");
-    }
-
-  // Close file from any previous image
-  if ( os.is_open() )
-    {
-    os.close();
-    }
-
-  // Open the new file for writing
-  itkDebugMacro(<< "Initialize: opening file " << filename);
-
-  if ( truncate )
-    {
-    // truncate
-    os.open(m_FileName.c_str(), std::ios::out | std::ios::binary | std::ios::trunc);
-    }
-  else
-    {
-    os.open(m_FileName.c_str(), std::ios::out | std::ios::binary | std::ios::in);
-    }
-
-  if ( os.fail() )
-    {
-    itkExceptionMacro(<< "Could not open file for writing: " << filename);
-    }
-}
-
 bool StreamingImageIOBase::CanStreamRead(void)
 {
   return true;
diff --git a/Utilities/ITK/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx b/Utilities/ITK/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx
index 01f3d42..151893d 100644
--- a/Utilities/ITK/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx
@@ -216,7 +216,7 @@ EigenAnalysis2DImageFilter< TInputImage, TEigenValueImage, TEigenVectorImage >
     const double dxy = xx - yy;
     const double sxy = xx + yy;
 
-    const double S = vcl_sqrt(dxy * dxy + 4.0 * xy * xy);
+    const double S = std::sqrt(dxy * dxy + 4.0 * xy * xy);
 
     const double pp =  ( sxy + S ) / 2.0;
     const double qq =  ( sxy - S ) / 2.0;
diff --git a/Utilities/ITK/Modules/Numerics/Eigen/include/itkSymmetricEigenSystem.h b/Utilities/ITK/Modules/Numerics/Eigen/include/itkSymmetricEigenSystem.h
index 46bfce5..b58050a 100644
--- a/Utilities/ITK/Modules/Numerics/Eigen/include/itkSymmetricEigenSystem.h
+++ b/Utilities/ITK/Modules/Numerics/Eigen/include/itkSymmetricEigenSystem.h
@@ -107,7 +107,7 @@ public:
 protected:
   SymmetricEigenSystem();
   virtual ~SymmetricEigenSystem();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Produces the eigen vectors and values. */
   void GenerateData();
diff --git a/Utilities/ITK/Modules/Numerics/Eigen/include/itkSymmetricEigenSystem.hxx b/Utilities/ITK/Modules/Numerics/Eigen/include/itkSymmetricEigenSystem.hxx
index 791e2cf..37bcfe1 100644
--- a/Utilities/ITK/Modules/Numerics/Eigen/include/itkSymmetricEigenSystem.hxx
+++ b/Utilities/ITK/Modules/Numerics/Eigen/include/itkSymmetricEigenSystem.hxx
@@ -29,7 +29,7 @@ template< typename TMatrixElement, int VNumberOfRows >
 SymmetricEigenSystem< TMatrixElement, VNumberOfRows >
 ::SymmetricEigenSystem()
 {
-  m_Matrix = 0;
+  m_Matrix = ITK_NULLPTR;
   m_UseAbsoluteOrder = true;
   m_EigenValues.Fill(NumericTraits< TMatrixElement >::Zero);
   ArrayType temp;
@@ -54,7 +54,7 @@ SymmetricEigenSystem< TMatrixElement, VNumberOfRows >
 
   os << indent << "Matrix:";
 
-  if ( m_Matrix != 0 )
+  if ( m_Matrix != ITK_NULLPTR )
     {
     os << m_Matrix << std::endl;
     }
diff --git a/Utilities/ITK/Modules/Numerics/NarrowBand/include/itkNarrowBand.h b/Utilities/ITK/Modules/Numerics/NarrowBand/include/itkNarrowBand.h
index 533875d..bfcf22f 100644
--- a/Utilities/ITK/Modules/Numerics/NarrowBand/include/itkNarrowBand.h
+++ b/Utilities/ITK/Modules/Numerics/NarrowBand/include/itkNarrowBand.h
@@ -20,6 +20,7 @@
 
 #include "itkLightObject.h"
 #include "itkObjectFactory.h"
+#include "itkNumericTraits.h"
 #include <vector>
 
 namespace itk
@@ -37,7 +38,9 @@ public:
   TDataType   m_Data;
   TIndexType  m_Index;
   signed char m_NodeState;
-  BandNode() : m_NodeState( 0 ) {}
+  BandNode() :
+    m_Data(NumericTraits<TDataType>::ZeroValue()), m_NodeState(0)
+  {}
 };
 
 /** \class NarrowBand
diff --git a/Utilities/ITK/Modules/Numerics/NarrowBand/include/itkNarrowBand.hxx b/Utilities/ITK/Modules/Numerics/NarrowBand/include/itkNarrowBand.hxx
index 23d4633..2478f7c 100644
--- a/Utilities/ITK/Modules/Numerics/NarrowBand/include/itkNarrowBand.hxx
+++ b/Utilities/ITK/Modules/Numerics/NarrowBand/include/itkNarrowBand.hxx
@@ -28,7 +28,6 @@
 #ifndef __itkNarrowBand_hxx
 #define __itkNarrowBand_hxx
 #include "itkNarrowBand.h"
-#include "vcl_cmath.h"
 #include <cmath>
 
 namespace itk
@@ -50,7 +49,7 @@ NarrowBand< NodeType >
 
   SizeType regionsize =
     static_cast< SizeType >(
-        vcl_floor( static_cast< float >( t_size ) / static_cast< float >( t_n ) ) );
+        std::floor( static_cast< float >( t_size ) / static_cast< float >( t_n ) ) );
 
   if ( regionsize == 0 )
     {
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkGaussianRadialBasisFunction.hxx b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkGaussianRadialBasisFunction.hxx
index 1be0f27..c4be9ae 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkGaussianRadialBasisFunction.hxx
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkGaussianRadialBasisFunction.hxx
@@ -49,7 +49,7 @@ GaussianRadialBasisFunction< ScalarType>
 {
   ScalarType val;
   ScalarType radius = Superclass::GetRadius();
-  val = vcl_exp(-0.5*vcl_pow(input,2)/vcl_pow(radius,2));
+  val = std::exp(-0.5*std::pow(input,2)/std::pow(radius,2));
   return val;
 }
 
@@ -65,13 +65,13 @@ GaussianRadialBasisFunction< ScalarType>
   ArrayType center = Superclass::GetCenter();
   if(mode=='u') //w.r.t centers
     {
-    ScalarType temp1= vcl_pow(radius,2);
+    ScalarType temp1= std::pow(radius,2);
     val=Evaluate(dist)
                       *(input.GetElement(element_id)-center.GetElement(element_id))/temp1;
     }
   else if(mode=='s') // w.r.t radius
     {
-    val=Evaluate(dist)*vcl_pow(dist,2)/vcl_pow(radius,3);
+    val=Evaluate(dist)*std::pow(dist,2)/std::pow(radius,3);
     }
   return val;
 }
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkGaussianTransferFunction.hxx b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkGaussianTransferFunction.hxx
index 7eb74e7..bf0a273 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkGaussianTransferFunction.hxx
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkGaussianTransferFunction.hxx
@@ -45,7 +45,7 @@ ScalarType
 GaussianTransferFunction<ScalarType>
 ::Evaluate(const ScalarType& input)  const
 {
-  return static_cast<ScalarType>((vcl_exp(-1 * input * input)));
+  return static_cast<ScalarType>((std::exp(-1 * input * input)));
 }
 
 /** Evaluate derivatives function */
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLayerBase.h b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLayerBase.h
index 667a49a..61c6f44 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLayerBase.h
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLayerBase.h
@@ -142,7 +142,7 @@ protected:
   ~LayerBase();
 
   /** Method to print the object. */
-  virtual void PrintSelf( std::ostream& os, Indent indent ) const;
+  virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
 
   LayerTypeCode m_LayerTypeCode; //input, hidden, output
   unsigned int  m_LayerId;
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLayerBase.hxx b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLayerBase.hxx
index 1277dd0..57564dc 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLayerBase.hxx
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLayerBase.hxx
@@ -25,7 +25,7 @@ namespace itk
 {
 namespace Statistics
 {
-#define INVALID_LAYER_ID vcl_numeric_limits<unsigned int>::max()
+#define INVALID_LAYER_ID std::numeric_limits<unsigned int>::max()
 
 template<typename TMeasurementVector, typename TTargetVector>
 LayerBase<TMeasurementVector,TTargetVector>
@@ -34,10 +34,10 @@ LayerBase<TMeasurementVector,TTargetVector>
   m_NumberOfNodes = 0;
   m_LayerId = INVALID_LAYER_ID;
   m_LayerTypeCode = INVALIDLAYER;
-  m_InputWeightSet = 0;
-  m_OutputWeightSet = 0;
-  m_ActivationFunction = 0;
-  m_NodeInputFunction = 0;
+  m_InputWeightSet = ITK_NULLPTR;
+  m_OutputWeightSet = ITK_NULLPTR;
+  m_ActivationFunction = ITK_NULLPTR;
+  m_NodeInputFunction = ITK_NULLPTR;
 }
 
 template<typename TMeasurementVector, typename TTargetVector>
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLearningFunctionBase.h b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLearningFunctionBase.h
index 49bfffc..14560e9 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLearningFunctionBase.h
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLearningFunctionBase.h
@@ -58,7 +58,7 @@ protected:
   ~LearningFunctionBase() {};
 
   /** Method to print the object. */
-  virtual void PrintSelf( std::ostream& os, Indent indent ) const
+  virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE
     {
     Superclass::PrintSelf( os, indent );
     os << indent << "LearningFunctionBase(" << this << ")" << std::endl;
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.h b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.h
index 928ac8a..77ae713 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.h
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.h
@@ -30,17 +30,20 @@ namespace Statistics
  * \ingroup ITKNeuralNetworks
  */
 
-template<typename ScalarType>
-class LogSigmoidTransferFunction : public TransferFunctionBase<ScalarType>
+template<typename TScalar>
+class LogSigmoidTransferFunction : public TransferFunctionBase<TScalar>
 {
 public:
 
   /** Standard class typedefs. */
   typedef LogSigmoidTransferFunction       Self;
-  typedef TransferFunctionBase<ScalarType> Superclass;
+  typedef TransferFunctionBase<TScalar>    Superclass;
   typedef SmartPointer<Self>               Pointer;
   typedef SmartPointer<const Self>         ConstPointer;
 
+  typedef TScalar                                        ScalarType;
+  typedef typename NumericTraits< ScalarType >::RealType RealType;
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(LogSigmoidTransferFunction, TransferFunctionBase);
 
@@ -48,10 +51,10 @@ public:
   itkNewMacro(Self);
 
   /** Evaluate at the specified input position */
-  virtual ScalarType Evaluate(const ScalarType& input) const;
+  virtual TScalar Evaluate(const ScalarType& input) const;
 
   /** Evaluate the derivative at the specified input position */
-  virtual ScalarType EvaluateDerivative(const ScalarType& input) const;
+  virtual TScalar EvaluateDerivative(const ScalarType& input) const;
 
 protected:
 
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.hxx b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.hxx
index ba23a9f..a852912 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.hxx
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkLogSigmoidTransferFunction.hxx
@@ -25,34 +25,31 @@ namespace itk
 namespace Statistics
 {
 
-/** Constructor */
-template<typename ScalarType>
-LogSigmoidTransferFunction<ScalarType>
+template<typename TScalar>
+LogSigmoidTransferFunction<TScalar>
 ::LogSigmoidTransferFunction()
 {
 }
 
-/** Destructor */
-template<typename ScalarType>
-LogSigmoidTransferFunction<ScalarType>
+template<typename TScalar>
+LogSigmoidTransferFunction<TScalar>
 ::~LogSigmoidTransferFunction()
 {
 }
 
-/** Evaluate */
-template<typename ScalarType>
-ScalarType
-LogSigmoidTransferFunction<ScalarType>
+template<typename TScalar>
+TScalar
+LogSigmoidTransferFunction<TScalar>
 ::Evaluate(const ScalarType& input)  const
 {
-  const ScalarType v = 1.0 / (1.0 + vcl_exp(-input));
+  const ScalarType v = static_cast< ScalarType >( 1.0 /
+    ( 1.0 + std::exp( static_cast< typename NumericTraits< ScalarType >::RealType >(-input)) ) );
   return v;
 }
 
-/** Evaluate derivatives */
-template<typename ScalarType>
-ScalarType
-LogSigmoidTransferFunction<ScalarType>
+template<typename TScalar>
+TScalar
+LogSigmoidTransferFunction<TScalar>
 ::EvaluateDerivative(const ScalarType& input)  const
 {
   ScalarType f = Evaluate(input);
@@ -60,9 +57,9 @@ LogSigmoidTransferFunction<ScalarType>
 }
 
 /** Print the object */
-template<typename ScalarType>
+template<typename TScalar>
 void
-LogSigmoidTransferFunction<ScalarType>
+LogSigmoidTransferFunction<TScalar>
 ::PrintSelf( std::ostream& os, Indent indent ) const
 {
   os << indent << "LogSigmoidTransferFunction(" << this << ")" << std::endl;
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkMultiquadricRadialBasisFunction.hxx b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkMultiquadricRadialBasisFunction.hxx
index 6b3cafc..8dd137f 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkMultiquadricRadialBasisFunction.hxx
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkMultiquadricRadialBasisFunction.hxx
@@ -45,7 +45,7 @@ ScalarType
 MultiquadricRadialBasisFunction<ScalarType>
 ::Evaluate(const ScalarType& input) const
 {
-  const ScalarType val = vcl_pow((input*input)+(m_Radius*m_Radius),0.5);
+  const ScalarType val = std::pow((input*input)+(m_Radius*m_Radius),0.5);
   return val;
 }
 
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkNeuralNetworkObject.h b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkNeuralNetworkObject.h
index 64fe7f2..1214273 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkNeuralNetworkObject.h
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkNeuralNetworkObject.h
@@ -62,7 +62,7 @@ protected:
   virtual ~NeuralNetworkObject();
 
   /** Method to print the object. */
-  virtual void PrintSelf( std::ostream& os, Indent indent ) const;
+  virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
 
   ValueType m_LearningRate;
 
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkRBFBackPropagationLearningFunction.hxx b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkRBFBackPropagationLearningFunction.hxx
index 12ff775..81f6e92 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkRBFBackPropagationLearningFunction.hxx
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkRBFBackPropagationLearningFunction.hxx
@@ -42,11 +42,6 @@ RBFBackPropagationLearningFunction<LayerType,TTargetVector>
   typename LayerType::WeightSetType::Pointer outputweightset = layer->GetModifiableOutputWeightSet();
   typename LayerType::WeightSetType::Pointer inputweightset = layer->GetModifiableInputWeightSet();
 
-  typedef typename LayerType::InputVectorType  InputVectorType;
-  typedef typename LayerType::OutputVectorType OutputVectorType;
-
-  typedef RBFLayer<InputVectorType,OutputVectorType> RbfLayerType;
-  typedef typename RbfLayerType::InternalVectorType  ArrayType;
   typename LayerType::ValuePointer currentdeltavalues = inputweightset->GetTotalDeltaValues();
   vnl_matrix<ValueType> DW_temp(currentdeltavalues,inputweightset->GetNumberOfOutputNodes(),
                                            inputweightset->GetNumberOfInputNodes());
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.h b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.h
index 40d96c1..93aa705 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.h
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.h
@@ -24,23 +24,26 @@ namespace itk
 {
 namespace Statistics
 {
+
 /** \class SigmoidTransferFunction
  * \brief This is the itkSigmoidTransferFunction class.
  *
  * \ingroup ITKNeuralNetworks
  */
-
-template<typename ScalarType>
-class SigmoidTransferFunction : public TransferFunctionBase<ScalarType>
+template<typename TScalar>
+class SigmoidTransferFunction : public TransferFunctionBase<TScalar>
 {
 public:
 
   /** Standard class typedefs. */
   typedef SigmoidTransferFunction          Self;
-  typedef TransferFunctionBase<ScalarType> Superclass;
+  typedef TransferFunctionBase<TScalar>    Superclass;
   typedef SmartPointer<Self>               Pointer;
   typedef SmartPointer<const Self>         ConstPointer;
 
+  typedef TScalar                                        ScalarType;
+  typedef typename NumericTraits< ScalarType >::RealType RealType;
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(SigmoidTransferFunction, TransferFunctionBase);
 
@@ -48,10 +51,10 @@ public:
   itkNewMacro(Self);
 
   /** Set/Get macros */
-  itkSetMacro(Alpha,ScalarType);
-  itkGetMacro(Alpha,ScalarType);
-  itkSetMacro(Beta,ScalarType);
-  itkGetMacro(Beta,ScalarType);
+  itkSetMacro(Alpha,RealType);
+  itkGetMacro(Alpha,RealType);
+  itkSetMacro(Beta,RealType);
+  itkGetMacro(Beta,RealType);
   itkSetMacro(OutputMinimum,ScalarType);
   itkGetMacro(OutputMinimum,ScalarType);
   itkSetMacro(OutputMaximum,ScalarType);
@@ -73,8 +76,8 @@ protected:
 
 private:
 
-  ScalarType m_Alpha;
-  ScalarType m_Beta;
+  RealType   m_Alpha;
+  RealType   m_Beta;
   ScalarType m_OutputMinimum;
   ScalarType m_OutputMaximum;
 };
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.hxx b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.hxx
index 5d8ab9d..1f71e28 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.hxx
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSigmoidTransferFunction.hxx
@@ -25,9 +25,9 @@ namespace itk
 namespace Statistics
 {
 
-/** Constructor */
-template<typename ScalarType>
-SigmoidTransferFunction< ScalarType>
+
+template<typename TScalar>
+SigmoidTransferFunction<TScalar>
 ::SigmoidTransferFunction()
 {
   m_Alpha = 1.0;
@@ -36,40 +36,40 @@ SigmoidTransferFunction< ScalarType>
   m_OutputMaximum = NumericTraits<ScalarType>::max();
 }
 
-/** Destructor */
-template<typename ScalarType>
-SigmoidTransferFunction<ScalarType>
+
+template<typename TScalar>
+SigmoidTransferFunction<TScalar>
 ::~SigmoidTransferFunction()
 {
 }
 
-/** Evaluate */
-template<typename ScalarType>
-ScalarType
-SigmoidTransferFunction<ScalarType>
+
+template<typename TScalar>
+TScalar
+SigmoidTransferFunction<TScalar>
 ::Evaluate(const ScalarType& input)  const
 {
-  const ScalarType x = (static_cast<ScalarType>(input) - m_Beta) / m_Alpha;
-  const ScalarType e = 1.0 / (1.0 + vcl_exp(-x));
-  const ScalarType v = (m_OutputMaximum - m_OutputMinimum) * e
+  const RealType x = static_cast< RealType >( input - m_Beta ) / m_Alpha;
+  const RealType e = 1.0 / (1.0 + std::exp( static_cast< typename NumericTraits< ScalarType >::RealType >(-x)));
+  const ScalarType v = static_cast< ScalarType >( (m_OutputMaximum - m_OutputMinimum) * e )
                      + m_OutputMinimum;
   return v;
 }
 
-/** Evaluate Derivatives */
-template<typename ScalarType>
-ScalarType
-SigmoidTransferFunction< ScalarType>
+
+template<typename TScalar>
+TScalar
+SigmoidTransferFunction<TScalar>
 ::EvaluateDerivative(const ScalarType& input)  const
 {
   ScalarType f = Evaluate(input);
   return f * (1 - f);
 }
 
-/** Print the object */
-template<typename ScalarType>
+
+template<typename TScalar>
 void
-SigmoidTransferFunction<ScalarType>
+SigmoidTransferFunction<TScalar>
 ::PrintSelf( std::ostream& os, Indent indent ) const
 {
   os << indent << "SigmoidTransferFunction(" << this << ")" << std::endl;
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSymmetricSigmoidTransferFunction.hxx b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSymmetricSigmoidTransferFunction.hxx
index a7e14ae..0b71399 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSymmetricSigmoidTransferFunction.hxx
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkSymmetricSigmoidTransferFunction.hxx
@@ -55,7 +55,7 @@ SymmetricSigmoidTransferFunction<ScalarType>
     }
   else
     {
-    val= (ScalarType)1.0/(1.0+vcl_exp(-input))-0.5;
+    val= (ScalarType)1.0/(1.0+std::exp(-input))-0.5;
     }
   return val;
 }
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTanHTransferFunction.hxx b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTanHTransferFunction.hxx
index 51019ba..2962225 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTanHTransferFunction.hxx
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTanHTransferFunction.hxx
@@ -45,8 +45,8 @@ ScalarType
 TanHTransferFunction<ScalarType>
 ::Evaluate(const ScalarType& input)  const
 {
-  ScalarType x = vcl_exp(input);
-  ScalarType y = vcl_exp(-input);
+  ScalarType x = std::exp(input);
+  ScalarType y = std::exp(-input);
   return static_cast<ScalarType>((float) (x - y) / (x + y));
 }
 
@@ -57,7 +57,7 @@ TanHTransferFunction<ScalarType>
 ::EvaluateDerivative(const ScalarType& input)  const
 {
   ScalarType f = Evaluate(input);
-  return 1 - vcl_pow(f, 2);
+  return 1 - std::pow(f, 2);
 }
 
 /** Print the object */
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTanSigmoidTransferFunction.hxx b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTanSigmoidTransferFunction.hxx
index 1f78f60..6af6ca7 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTanSigmoidTransferFunction.hxx
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTanSigmoidTransferFunction.hxx
@@ -46,7 +46,7 @@ TanSigmoidTransferFunction<ScalarType>
 ::Evaluate(const ScalarType& input)  const
 {
   return static_cast<ScalarType>((2
-                                / (1 + vcl_exp(-2 * static_cast<ScalarType>(input))))
+                                / (1 + std::exp(-2 * static_cast<ScalarType>(input))))
                                - 1);
 }
 
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTrainingFunctionBase.h b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTrainingFunctionBase.h
index a610e56..d7b02da 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTrainingFunctionBase.h
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTrainingFunctionBase.h
@@ -105,7 +105,7 @@ protected:
   ~TrainingFunctionBase(){};
 
   /** Method to print the object. */
-  virtual void PrintSelf( std::ostream& os, Indent indent ) const;
+  virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
 
   TSample*                m_TrainingSamples;// original samples
   TTargetVector*          m_SampleTargets;  // original samples
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTrainingFunctionBase.hxx b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTrainingFunctionBase.hxx
index 2b13f8c..82da78b 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTrainingFunctionBase.hxx
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkTrainingFunctionBase.hxx
@@ -31,8 +31,8 @@ TrainingFunctionBase<TSample,TTargetVector,ScalarType>
 {
   m_PerformanceFunction = DefaultPerformanceType::New();
   m_Iterations = 0;
-  m_TrainingSamples = NULL;
-  m_SampleTargets = NULL;
+  m_TrainingSamples = ITK_NULLPTR;
+  m_SampleTargets = ITK_NULLPTR;
   m_LearningRate = 1.0;
 }
 
diff --git a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkWeightSetBase.h b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkWeightSetBase.h
index 5607b16..8b9fa80 100644
--- a/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkWeightSetBase.h
+++ b/Utilities/ITK/Modules/Numerics/NeuralNetworks/include/itkWeightSetBase.h
@@ -125,7 +125,7 @@ protected:
   ~WeightSetBase();
 
   /** Method to print the object. */
-  virtual void PrintSelf( std::ostream& os, Indent indent ) const;
+  virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
 
   typename RandomVariateGeneratorType::Pointer m_RandomGenerator;
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h
index 757565d..11f515b 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkAmoebaOptimizer.h
@@ -83,10 +83,10 @@ public:
   typedef   vnl_vector< double > InternalParametersType;
 
   /** Start optimization with an initial value. */
-  void StartOptimization(void);
+  virtual void StartOptimization(void) ITK_OVERRIDE;
 
   /** Plug in a Cost Function into the optimizer  */
-  virtual void SetCostFunction(SingleValuedCostFunction *costFunction);
+  virtual void SetCostFunction(SingleValuedCostFunction *costFunction) ITK_OVERRIDE;
 
   /** Set/Get the maximum number of iterations. The optimization algorithm will
    * terminate after the maximum number of iterations has been reached.
@@ -137,7 +137,7 @@ public:
   itkGetConstMacro(FunctionConvergenceTolerance, double);
 
   /** Report the reason for stopping. */
-  const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
   /** Return Current Value */
   MeasureType GetValue() const;
@@ -148,7 +148,7 @@ public:
 protected:
   AmoebaOptimizer();
   virtual ~AmoebaOptimizer();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType;
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h
index 3dfc6d0..5ea080f 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkConjugateGradientOptimizer.h
@@ -57,10 +57,10 @@ public:
   vnl_conjugate_gradient * GetOptimizer(void);
 
   /** Start optimization with an initial value. */
-  void StartOptimization(void);
+  virtual void StartOptimization(void) ITK_OVERRIDE;
 
   /** Plug in a Cost Function into the optimizer  */
-  virtual void SetCostFunction(SingleValuedCostFunction *costFunction);
+  virtual void SetCostFunction(SingleValuedCostFunction *costFunction) ITK_OVERRIDE;
 
   /** Return the number of iterations performed so far */
   SizeValueType GetNumberOfIterations(void) const;
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCostFunction.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCostFunction.h
index 8b41eed..7e6a770 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCostFunction.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCostFunction.h
@@ -58,7 +58,7 @@ public:
 protected:
   CostFunctionTemplate() {}
   virtual ~CostFunctionTemplate() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   CostFunctionTemplate(const Self &);   //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h
index 4ea0b02..3b904f8 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCumulativeGaussianCostFunction.h
@@ -74,10 +74,10 @@ public:
 
   /** Not necessary for this optimizer. */
   void GetDerivative( const ParametersType & itkNotUsed(parameters),
-                      DerivativeType & itkNotUsed(derivative) ) const {}
+                      DerivativeType & itkNotUsed(derivative) ) const ITK_OVERRIDE {}
 
   /** Return the values evaluated for the given parameters. */
-  MeasureType GetValue(const ParametersType & parameters) const;
+  virtual MeasureType GetValue(const ParametersType & parameters) const ITK_OVERRIDE;
 
   /** Return a pointer of values evaluated for the given parameters. */
   MeasureType * GetValuePointer(ParametersType & parameters);
@@ -89,10 +89,10 @@ public:
   double EvaluateCumulativeGaussian(double argument) const;
 
   /** Get the SpaceDimension. */
-  unsigned int GetNumberOfParameters() const;
+  virtual unsigned int GetNumberOfParameters() const ITK_OVERRIDE;
 
   /** Get the number Range Dimension. */
-  unsigned int GetNumberOfValues() const;
+  virtual unsigned int GetNumberOfValues() const ITK_OVERRIDE;
 
   /** Initialize the arrays. */
   void Initialize(unsigned int rangeDimension);
@@ -104,7 +104,7 @@ protected:
   CumulativeGaussianCostFunction();
   virtual ~CumulativeGaussianCostFunction();
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h
index 03aa29b..144cbb1 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkCumulativeGaussianOptimizer.h
@@ -83,18 +83,18 @@ public:
   void SetDataArray(MeasureType *dataArray);
 
   /** Start the optimizer. */
-  void StartOptimization();
+  virtual void StartOptimization() ITK_OVERRIDE;
 
   /** Print an array. */
   void PrintArray(MeasureType *array);
 
   /** Report the reason for stopping. */
-  const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
 protected:
   CumulativeGaussianOptimizer();
   virtual ~CumulativeGaussianOptimizer();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkExhaustiveOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkExhaustiveOptimizer.h
index f09f661..8c187bf 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkExhaustiveOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkExhaustiveOptimizer.h
@@ -96,7 +96,7 @@ public:
   /** Run-time type information (and related methods). */
   itkTypeMacro(ExhaustiveOptimizer, SingleValuedNonLinearOptimizer);
 
-  virtual void    StartOptimization(void);
+  virtual void    StartOptimization(void) ITK_OVERRIDE;
 
   void StartWalking(void);
 
@@ -117,12 +117,12 @@ public:
   itkGetConstReferenceMacro(MaximumNumberOfIterations, SizeValueType);
 
   /** Get the reason for termination */
-  const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
 protected:
   ExhaustiveOptimizer();
   virtual ~ExhaustiveOptimizer() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Advance to the next grid position. */
   void AdvanceOneStep(void);
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h
index fa0f032..051a1f7 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkFRPROptimizer.h
@@ -73,7 +73,7 @@ public:
   itkGetConstMacro(UseUnitLengthGradient, bool);
 
   /** Start optimization. */
-  void StartOptimization();
+  virtual void StartOptimization() ITK_OVERRIDE;
 
   /** Set it to the Fletch-Reeves optimizer */
   void SetToFletchReeves();
@@ -85,7 +85,7 @@ protected:
   FRPROptimizer();
   virtual ~FRPROptimizer();
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Get the value of the n-dimensional cost function at this scalar step
    * distance along the current line direction from the current line origin.
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h
index ef43511..3d11b4d 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h
@@ -87,7 +87,7 @@ public:
   virtual void AdvanceOneStep(void);
 
   /** Start optimization. */
-  void    StartOptimization(void);
+  virtual void    StartOptimization(void) ITK_OVERRIDE;
 
   /** Resume previously stopped optimization with current parameters
    * \sa StopOptimization. */
@@ -117,7 +117,7 @@ public:
 
   /** Get Stop condition. */
   itkGetConstReferenceMacro(StopCondition, StopConditionType);
-  const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
   /** Get Gradient condition. */
   itkGetConstReferenceMacro(Gradient, DerivativeType);
@@ -125,7 +125,7 @@ public:
 protected:
   GradientDescentOptimizer();
   virtual ~GradientDescentOptimizer() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   // made protected so subclass can access
   DerivativeType m_Gradient;
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkInitializationBiasedParticleSwarmOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkInitializationBiasedParticleSwarmOptimizer.h
index 07749d3..22bbf76 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkInitializationBiasedParticleSwarmOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkInitializationBiasedParticleSwarmOptimizer.h
@@ -115,8 +115,8 @@ public:
 protected:
   InitializationBiasedParticleSwarmOptimizer();
   virtual ~InitializationBiasedParticleSwarmOptimizer() {};
-  void PrintSelf(std::ostream& os, Indent indent) const;
-  virtual void UpdateSwarm();
+  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
+  virtual void UpdateSwarm() ITK_OVERRIDE;
 
 private:
     //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h
index 79e46d1..81e2ae6 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLBFGSBOptimizer.h
@@ -95,10 +95,10 @@ public:
   typedef LBFGSBOptimizerHelper InternalOptimizerType;
 
   /** Start optimization with an initial value. */
-  void StartOptimization(void);
+  virtual void StartOptimization(void) ITK_OVERRIDE;
 
   /** Plug in a Cost Function into the optimizer  */
-  virtual void SetCostFunction(SingleValuedCostFunction *costFunction);
+  virtual void SetCostFunction(SingleValuedCostFunction *costFunction) ITK_OVERRIDE;
 
   /** Set/Get the optimizer trace flag. If set to true, the optimizer
    * prints out information every iteration.
@@ -175,12 +175,12 @@ public:
   itkGetConstReferenceMacro(InfinityNormOfProjectedGradient, double);
 
   /** Get the reason for termination */
-  const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
 protected:
   LBFGSBOptimizer();
   virtual ~LBFGSBOptimizer();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType;
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h
index a329781..4743cde 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLBFGSOptimizer.h
@@ -55,10 +55,10 @@ public:
   vnl_lbfgs * GetOptimizer(void);
 
   /** Start optimization with an initial value. */
-  void StartOptimization(void);
+  virtual void StartOptimization(void) ITK_OVERRIDE;
 
   /** Plug in a Cost Function into the optimizer  */
-  virtual void SetCostFunction(SingleValuedCostFunction *costFunction);
+  virtual void SetCostFunction(SingleValuedCostFunction *costFunction) ITK_OVERRIDE;
 
   /** Set/Get the optimizer trace flag. If set to true, the optimizer
    * prints out information every iteration.
@@ -104,12 +104,12 @@ public:
   MeasureType GetValue() const;
 
   /** Get the reason for termination */
-  const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
 protected:
   LBFGSOptimizer();
   virtual ~LBFGSOptimizer();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType;
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h
index 1303596..fac25d3 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkLevenbergMarquardtOptimizer.h
@@ -55,10 +55,10 @@ public:
   vnl_levenberg_marquardt * GetOptimizer(void) const;
 
   /** Start optimization with an initial value. */
-  void StartOptimization(void);
+  virtual void StartOptimization(void) ITK_OVERRIDE;
 
   /** Plug in a Cost Function into the optimizer  */
-  virtual void SetCostFunction(MultipleValuedCostFunction *costFunction);
+  virtual void SetCostFunction(MultipleValuedCostFunction *costFunction) ITK_OVERRIDE;
 
   void SetNumberOfIterations(unsigned int iterations);
 
@@ -71,7 +71,7 @@ public:
   /** Get the current value */
   MeasureType GetValue() const;
 
-  const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
 protected:
   LevenbergMarquardtOptimizer();
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearOptimizer.h
index 3ea6327..3d336c7 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearOptimizer.h
@@ -70,7 +70,7 @@ public:
 protected:
   MultipleValuedNonLinearOptimizer();
   virtual ~MultipleValuedNonLinearOptimizer() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   CostFunctionPointer m_CostFunction;
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h
index bf4bba0..cc8e9a8 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedNonLinearVnlOptimizer.h
@@ -90,7 +90,7 @@ protected:
   MultipleValuedNonLinearVnlOptimizer();
   virtual ~MultipleValuedNonLinearVnlOptimizer();
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   typedef MultipleValuedVnlCostFunctionAdaptor CostFunctionAdaptorType;
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h
index c53f8ba..33a66fb 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkMultipleValuedVnlCostFunctionAdaptor.h
@@ -73,11 +73,11 @@ public:
 
   /**  Delegate computation of the value to the CostFunction. */
   virtual void f(const InternalParametersType & inparameters,
-                 InternalMeasureType    & measures);
+                 InternalMeasureType    & measures) ITK_OVERRIDE;
 
   /**  Delegate computation of the gradient to the costFunction.  */
   virtual void gradf(const InternalParametersType   & inparameters,
-                     InternalDerivativeType   & gradient);
+                     InternalDerivativeType   & gradient) ITK_OVERRIDE;
 
   /**  Delegate computation of value and gradient to the costFunction.     */
   virtual void compute(const InternalParametersType   & x,
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h
index bb4d31e..303efff 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkOnePlusOneEvolutionaryOptimizer.h
@@ -151,7 +151,7 @@ public:
   /** Start optimization.
    * Optimization will stop when it meets either of two termination conditions,
    * the maximum iteration limit or epsilon (minimal search radius)  */
-  void StartOptimization();
+  virtual void StartOptimization() ITK_OVERRIDE;
 
   /** when users call StartOptimization, this value will be set false.
    * By calling StopOptimization, this flag will be set true, and
@@ -165,13 +165,13 @@ public:
   itkGetConstReferenceMacro(MetricWorstPossibleValue, double);
   itkSetMacro(MetricWorstPossibleValue, double);
 
-  const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
 protected:
   OnePlusOneEvolutionaryOptimizer();
   OnePlusOneEvolutionaryOptimizer(const OnePlusOneEvolutionaryOptimizer &);
   virtual ~OnePlusOneEvolutionaryOptimizer();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkOptimizer.h
index cf66537..ecc05b8 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkOptimizer.h
@@ -86,7 +86,7 @@ public:
 protected:
   Optimizer();
   virtual ~Optimizer() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Set the current position. */
   virtual void SetCurrentPosition(const ParametersType & param);
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizer.h
index a058b9c..232ead5 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizer.h
@@ -94,8 +94,8 @@ public:
 protected:
   ParticleSwarmOptimizer();
   virtual ~ParticleSwarmOptimizer();
-  void PrintSelf(std::ostream& os, Indent indent) const;
-  virtual void UpdateSwarm();
+  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
+  virtual void UpdateSwarm() ITK_OVERRIDE;
 
 private:
   ParticleSwarmOptimizer(const Self&); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h
index ff07298..3011a69 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkParticleSwarmOptimizerBase.h
@@ -113,7 +113,7 @@ public:
   itkBooleanMacro( PrintSwarm )
 
   /** Start optimization. */
-  void StartOptimization( void );
+  virtual void StartOptimization( void ) ITK_OVERRIDE;
 
 
   /** Set/Get number of particles in the swarm - the maximal number of function
@@ -187,7 +187,7 @@ public:
   MeasureType GetValue() const;
 
   /** Get the reason for termination */
-  virtual const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
   /** Print the swarm information to the given output stream. Each line
    * (particle data) is of the form:
@@ -198,7 +198,7 @@ public:
 protected:
   ParticleSwarmOptimizerBase();
   virtual ~ParticleSwarmOptimizerBase();
-  void PrintSelf( std::ostream& os, Indent indent ) const;
+  virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
   void PrintParamtersType(  const ParametersType& x, std::ostream& os ) const;
 
   /**
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h
index 4ae9774..6d083d9 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkPowellOptimizer.h
@@ -121,7 +121,7 @@ public:
   itkGetConstReferenceMacro(CurrentLineIteration, unsigned int);
 
   /** Start optimization. */
-  void StartOptimization();
+  virtual void StartOptimization() ITK_OVERRIDE;
 
   /** When users call StartOptimization, this value will be set false.
    * By calling StopOptimization, this flag will be set true, and
@@ -135,13 +135,13 @@ public:
   itkGetConstReferenceMacro(MetricWorstPossibleValue, double);
   itkSetMacro(MetricWorstPossibleValue, double);
 
-  const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
 protected:
   PowellOptimizer();
   PowellOptimizer(const PowellOptimizer &);
   virtual ~PowellOptimizer();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   itkSetMacro(CurrentCost, double);
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkQuaternionRigidTransformGradientDescentOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkQuaternionRigidTransformGradientDescentOptimizer.h
index eeed60a..601e1ed 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkQuaternionRigidTransformGradientDescentOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkQuaternionRigidTransformGradientDescentOptimizer.h
@@ -70,7 +70,7 @@ public:
   typedef Superclass::ParametersType ParametersType;
 
   /** Advance one step following the gradient direction. */
-  virtual void AdvanceOneStep(void);
+  virtual void AdvanceOneStep(void) ITK_OVERRIDE;
 
 protected:
   QuaternionRigidTransformGradientDescentOptimizer() {}
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h
index e67ab70..7087491 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h
@@ -70,7 +70,7 @@ public:
   { SetMaximize(true); }
 
   /** Start optimization. */
-  void    StartOptimization(void);
+  virtual void    StartOptimization(void) ITK_OVERRIDE;
 
   /** Resume previously stopped optimization with current parameters.
    * \sa StopOptimization */
@@ -98,12 +98,12 @@ public:
   itkGetConstReferenceMacro(Gradient, DerivativeType);
 
   /** Get the reason for termination */
-  virtual const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
 protected:
   RegularStepGradientDescentBaseOptimizer();
   virtual ~RegularStepGradientDescentBaseOptimizer() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Advance one step following the gradient direction
    * This method verifies if a change in direction is required
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentOptimizer.h
index 197e951..54bf2a7 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentOptimizer.h
@@ -61,7 +61,7 @@ protected:
    * \sa AdvanceOneStep */
   virtual void StepAlongGradient(
     double factor,
-    const DerivativeType & transformedGradient);
+    const DerivativeType & transformedGradient) ITK_OVERRIDE;
 
 private:
   RegularStepGradientDescentOptimizer(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h
index 344f5e4..5d59d4a 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSPSAOptimizer.h
@@ -69,7 +69,7 @@ public:
   virtual void AdvanceOneStep(void);
 
   /** Start optimization. */
-  void StartOptimization(void);
+  virtual void StartOptimization(void) ITK_OVERRIDE;
 
   /** Resume previously stopped optimization with current parameters
    * \sa StopOptimization. */
@@ -194,7 +194,7 @@ public:
   itkGetConstMacro(Tolerance, double);
 
   /** Get the reason for termination */
-  const std::string GetStopConditionDescription() const;
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
 
 protected:
 
@@ -202,7 +202,7 @@ protected:
   virtual ~SPSAOptimizer() {}
 
   /** PrintSelf method. */
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Variables updated during optimization */
   DerivativeType m_Gradient;
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearOptimizer.h
index fa565ff..464f597 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearOptimizer.h
@@ -76,7 +76,7 @@ public:
 protected:
   SingleValuedNonLinearOptimizer();
   virtual ~SingleValuedNonLinearOptimizer() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   CostFunctionPointer m_CostFunction;
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h
index f2815ed..fe3aae0 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedNonLinearVnlOptimizer.h
@@ -104,7 +104,7 @@ protected:
   CostFunctionAdaptorType * GetNonConstCostFunctionAdaptor(void) const;
 
   /** Print out internal state */
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   /** Callback function for the Command Observer */
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h
index 20f7400..e16c1bd 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkSingleValuedVnlCostFunctionAdaptor.h
@@ -71,16 +71,16 @@ public:
   { return m_CostFunction; }
 
   /**  Delegate computation of the value to the CostFunction. */
-  virtual InternalMeasureType f(const InternalParametersType & inparameters);
+  virtual InternalMeasureType f(const InternalParametersType & inparameters) ITK_OVERRIDE;
 
   /**  Delegate computation of the gradient to the costFunction.  */
   virtual void gradf(const InternalParametersType   & inparameters,
-                     InternalDerivativeType   & gradient);
+                     InternalDerivativeType   & gradient) ITK_OVERRIDE;
 
   /**  Delegate computation of value and gradient to the costFunction.     */
   virtual void compute(const InternalParametersType   & x,
                        InternalMeasureType      *f,
-                       InternalDerivativeType   *g);
+                       InternalDerivativeType   *g) ITK_OVERRIDE;
 
   /**  Convert external derviative measures into internal type   */
   void ConvertExternalToInternalGradient(
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkVersorRigid3DTransformOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkVersorRigid3DTransformOptimizer.h
index ef64e50..09c4261 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkVersorRigid3DTransformOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkVersorRigid3DTransformOptimizer.h
@@ -73,7 +73,7 @@ public:
 
   /** Advance one step following the gradient direction. */
   virtual void StepAlongGradient(double factor,
-                                 const DerivativeType & transformedGradient);
+                                 const DerivativeType & transformedGradient) ITK_OVERRIDE;
 
 protected:
   VersorRigid3DTransformOptimizer() {}
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkVersorTransformOptimizer.h b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkVersorTransformOptimizer.h
index 4359bd2..27ceb7a 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/include/itkVersorTransformOptimizer.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/include/itkVersorTransformOptimizer.h
@@ -71,7 +71,7 @@ public:
 
   /** Advance one step following the gradient direction. */
   virtual void StepAlongGradient(double factor,
-                                 const DerivativeType & transformedGradient);
+                                 const DerivativeType & transformedGradient) ITK_OVERRIDE;
 
 protected:
   VersorTransformOptimizer() {}
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx
index 358edd7..a5613d2 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkAmoebaOptimizer.cxx
@@ -32,7 +32,7 @@ AmoebaOptimizer
   this->m_AutomaticInitialSimplex        = true;
   this->m_InitialSimplexDelta.Fill( NumericTraits< ParametersType::ValueType >::One );
   this->m_OptimizeWithRestarts = false;
-  this->m_VnlOptimizer = NULL;
+  this->m_VnlOptimizer = ITK_NULLPTR;
 }
 
 
@@ -78,7 +78,7 @@ AmoebaOptimizer
   SingleValuedNonLinearVnlOptimizer::CostFunctionAdaptorType *costFunction =
     this->GetNonConstCostFunctionAdaptor();
 
-  if( costFunction != NULL )
+  if( costFunction != ITK_NULLPTR )
     {
     if( static_cast<unsigned int>(costFunction->get_number_of_unknowns()) !=
         numberOfParameters )
@@ -310,7 +310,7 @@ AmoebaOptimizer
 ::ValidateSettings()
 {
   //we have to have a cost function
-  if( GetCostFunctionAdaptor() == NULL )
+  if( GetCostFunctionAdaptor() == ITK_NULLPTR )
     {
     itkExceptionMacro(<<"NULL cost function")
     }
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkConjugateGradientOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkConjugateGradientOptimizer.cxx
index be4207f..da1da76 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkConjugateGradientOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkConjugateGradientOptimizer.cxx
@@ -29,7 +29,7 @@ ConjugateGradientOptimizer
 ::ConjugateGradientOptimizer()
 {
   m_OptimizerInitialized    = false;
-  m_VnlOptimizer            = 0;
+  m_VnlOptimizer            = ITK_NULLPTR;
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkCumulativeGaussianCostFunction.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkCumulativeGaussianCostFunction.cxx
index 9af141a..1ed9615 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkCumulativeGaussianCostFunction.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkCumulativeGaussianCostFunction.cxx
@@ -65,9 +65,9 @@ CumulativeGaussianCostFunction
   double fitError = 0.0;
   for ( int i = 0; i < (int)( numberOfElements ); i++ )
     {
-    fitError += vcl_pow( ( setTestArray->get(i) - m_OriginalDataArray->get(i) ), 2 );
+    fitError += std::pow( ( setTestArray->get(i) - m_OriginalDataArray->get(i) ), 2 );
     }
-  return ( vcl_sqrt( ( 1 / numberOfElements ) * fitError ) );
+  return ( std::sqrt( ( 1 / numberOfElements ) * fitError ) );
 }
 
 double
@@ -192,7 +192,7 @@ CumulativeGaussianCostFunction
                          - parameters.get(2) )
                        * ( EvaluateCumulativeGaussian( ( i
                                                          - parameters.get(0) )
-                                                       / ( parameters.get(1) * vcl_sqrt(2.0) ) ) + 1 ) / 2 );
+                                                       / ( parameters.get(1) * std::sqrt(2.0) ) ) + 1 ) / 2 );
     }
 
   return m_Measure;
@@ -211,7 +211,7 @@ CumulativeGaussianCostFunction
                                  - parameters.get(2) )
                                * ( EvaluateCumulativeGaussian( ( i
                                                                  - parameters.get(0) )
-                                                               / ( parameters.get(1) * vcl_sqrt(2.0) ) ) + 1 ) / 2 ) );
+                                                               / ( parameters.get(1) * std::sqrt(2.0) ) ) + 1 ) / 2 ) );
     }
 
   return m_MeasurePointer;
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx
index 319f31a..5f843a2 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx
@@ -36,8 +36,8 @@ CumulativeGaussianOptimizer::CumulativeGaussianOptimizer()
   m_DifferenceTolerance = 1e-10;
   m_Verbose = 0;
   m_FitError = 0;
-  m_FinalSampledArray = NULL;
-  m_CumulativeGaussianArray = NULL;
+  m_FinalSampledArray = ITK_NULLPTR;
+  m_CumulativeGaussianArray = ITK_NULLPTR;
   m_StopConditionDescription << this->GetNameOfClass() << ": Constructed";
 }
 
@@ -61,7 +61,7 @@ CumulativeGaussianOptimizer
 
   for ( int i = 0; i < (int)( extendedArray->GetNumberOfElements() ); i++ )
     {
-    extendedArray->put( i, amplitude * vcl_exp( -( vcl_pow( ( i - mean ), 2 ) / ( 2 * vcl_pow(sd, 2) ) ) ) );
+    extendedArray->put( i, amplitude * std::exp( -( std::pow( ( i - mean ), 2 ) / ( 2 * std::pow(sd, 2) ) ) ) );
     }
   // Then insert the originalArray over the middle section of extendedArray.
   for ( int i = 0; i < (int)( originalArray->GetNumberOfElements() ); i++ )
@@ -141,12 +141,12 @@ CumulativeGaussianOptimizer
     averageSumOfSquaredDifferences = FindAverageSumOfSquaredDifferences(extendedArray, extendedArrayCopy);
 
     // Stop if there is a very very very small change between iterations.
-    if ( vcl_fabs(temp - averageSumOfSquaredDifferences) <= m_DifferenceTolerance )
+    if ( std::fabs(temp - averageSumOfSquaredDifferences) <= m_DifferenceTolerance )
       {
       m_StopConditionDescription.str("");
       m_StopConditionDescription << this->GetNameOfClass() << ": "
                                  << "Change between iterations ("
-                                 << vcl_fabs(temp - averageSumOfSquaredDifferences)
+                                 << std::fabs(temp - averageSumOfSquaredDifferences)
                                  << ") is less than DifferenceTolerance ("
                                  << m_DifferenceTolerance
                                  << ").";
@@ -197,15 +197,15 @@ void CumulativeGaussianOptimizer
   // Calculate the standard deviation
   for ( int i = 0; i < (int)( array->GetNumberOfElements() ); i++ )
     {
-    m_ComputedStandardDeviation += array->get(i) * vcl_pow( ( i - m_ComputedMean ), 2 );
+    m_ComputedStandardDeviation += array->get(i) * std::pow( ( i - m_ComputedMean ), 2 );
     }
-  m_ComputedStandardDeviation = vcl_sqrt(m_ComputedStandardDeviation / sum);
+  m_ComputedStandardDeviation = std::sqrt(m_ComputedStandardDeviation / sum);
 
   // For the ERF, sum is the difference between the lower and upper intensities.
   m_ComputedTransitionHeight = sum;
 
   // Calculate the amplitude.
-  m_ComputedAmplitude =  sum / ( m_ComputedStandardDeviation * vcl_sqrt(2 * vnl_math::pi) );
+  m_ComputedAmplitude =  sum / ( m_ComputedStandardDeviation * std::sqrt(2 * vnl_math::pi) );
 }
 
 void
@@ -244,7 +244,7 @@ CumulativeGaussianOptimizer
     if ( i < startingPointForInsertion
          || i >= startingPointForInsertion + (int)( originalArray->GetNumberOfElements() ) )
       {
-      extendedArray->put( i, amplitude * vcl_exp( -( vcl_pow( ( i - mean ), 2 ) / ( 2 * vcl_pow(sd, 2) ) ) ) );
+      extendedArray->put( i, amplitude * std::exp( -( std::pow( ( i - mean ), 2 ) / ( 2 * std::pow(sd, 2) ) ) ) );
       }
     }
   return extendedArray;
@@ -298,8 +298,8 @@ CumulativeGaussianOptimizer
   for ( int i = 0; i < sampledGaussianArraySize; i++ )
     {
     sampledGaussianArray->put( i, m_ComputedAmplitude
-                               * vcl_exp( -( vcl_pow( ( i - m_ComputedMean ),
-                                                      2 ) / ( 2 * vcl_pow(m_ComputedStandardDeviation, 2) ) ) ) );
+                               * std::exp( -( std::pow( ( i - m_ComputedMean ),
+                                                      2 ) / ( 2 * std::pow(m_ComputedStandardDeviation, 2) ) ) ) );
     }
   // Add 0.5 to the mean of the sampled Gaussian curve to make up for the 0.5
   // shift during derivation, then take the integral of the Gaussian sample
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkFRPROptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkFRPROptimizer.cxx
index 96ffd26..c446ca2 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkFRPROptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkFRPROptimizer.cxx
@@ -56,7 +56,7 @@ FRPROptimizer
       {
       len += ( *xi )[i] * ( *xi )[i];
       }
-    len = vcl_sqrt( len / this->GetSpaceDimension() );
+    len = std::sqrt( len / this->GetSpaceDimension() );
     for ( unsigned int i = 0; i < this->GetSpaceDimension(); i++ )
       {
       ( *xi )[i] /= len;
@@ -150,8 +150,8 @@ FRPROptimizer
     fret = fp;
     this->LineOptimize(&p, xi, &fret, tempCoord);
 
-    if ( 2.0 * vcl_abs(fret - fp) <=
-         this->GetValueTolerance() * ( vcl_abs(fret) + vcl_abs(fp) + FRPR_TINY ) )
+    if ( 2.0 * std::abs(fret - fp) <=
+         this->GetValueTolerance() * ( std::abs(fret) + std::abs(fp) + FRPR_TINY ) )
       {
       if ( limitCount <  this->GetSpaceDimension() )
         {
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx
index 111d419..945f8fe 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx
@@ -26,16 +26,17 @@ namespace itk
  * Constructor
  */
 GradientDescentOptimizer
-::GradientDescentOptimizer()
+::GradientDescentOptimizer() :
+  m_Maximize(false),
+  m_LearningRate(1.0),
+  m_Stop(false),
+  m_Value(0.0),
+  m_StopCondition(MaximumNumberOfIterations),
+  m_NumberOfIterations(100),
+  m_CurrentIteration(0)
 {
   itkDebugMacro("Constructor");
 
-  m_LearningRate = 1.0;
-  m_NumberOfIterations = 100;
-  m_CurrentIteration = 0;
-  m_Maximize = false;
-  m_Value = 0.0;
-  m_StopCondition = MaximumNumberOfIterations;
   m_StopConditionDescription << this->GetNameOfClass() << ": ";
 }
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx
index e767cb8..3c4da80 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLBFGSBOptimizer.cxx
@@ -45,7 +45,7 @@ public:
                         LBFGSBOptimizer * const itkObj);
 
   /** Handle new iteration event */
-  virtual bool report_iter();
+  virtual bool report_iter() ITK_OVERRIDE;
 
 private:
   LBFGSBOptimizer * const m_ItkObj;
@@ -65,7 +65,7 @@ LBFGSBOptimizer
   m_MaximumNumberOfCorrections(5),
   m_CurrentIteration(0),
   m_InfinityNormOfProjectedGradient(0.0),
-  m_VnlOptimizer(0)
+  m_VnlOptimizer(ITK_NULLPTR)
 {
   m_LowerBound       = InternalBoundValueType(0);
   m_UpperBound       = InternalBoundValueType(0);
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx
index a448de7..11df5ce 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLBFGSOptimizer.cxx
@@ -29,7 +29,7 @@ LBFGSOptimizer
 ::LBFGSOptimizer()
 {
   m_OptimizerInitialized    = false;
-  m_VnlOptimizer            = 0;
+  m_VnlOptimizer            = ITK_NULLPTR;
   m_Trace                              = false;
   m_MaximumNumberOfFunctionEvaluations = 2000;
   m_GradientConvergenceTolerance       = 1e-5;
@@ -221,6 +221,8 @@ LBFGSOptimizer
   m_VnlOptimizer->default_step_length  = m_DefaultStepLength;
 
   m_OptimizerInitialized = true;
+
+  this->Modified();
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx
index c326ae3..3e361a1 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkLevenbergMarquardtOptimizer.cxx
@@ -29,7 +29,7 @@ LevenbergMarquardtOptimizer
 ::LevenbergMarquardtOptimizer()
 {
   m_OptimizerInitialized    = false;
-  m_VnlOptimizer            = 0;
+  m_VnlOptimizer            = ITK_NULLPTR;
   m_NumberOfIterations      = 2000;
   m_ValueTolerance          = 1e-8;
   m_GradientTolerance       = 1e-5;
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx
index 19ac71a..af257b6 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx
@@ -25,7 +25,7 @@ namespace itk
 MultipleValuedNonLinearOptimizer
 ::MultipleValuedNonLinearOptimizer()
 {
-  m_CostFunction = 0;
+  m_CostFunction = ITK_NULLPTR;
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearVnlOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearVnlOptimizer.cxx
index 7e98661..fcd83f6 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearVnlOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearVnlOptimizer.cxx
@@ -28,7 +28,7 @@ namespace itk
 MultipleValuedNonLinearVnlOptimizer
 ::MultipleValuedNonLinearVnlOptimizer()
 {
-  m_CostFunctionAdaptor = 0;
+  m_CostFunctionAdaptor = ITK_NULLPTR;
   m_UseGradient = true;
   m_Command = CommandType::New();
   m_Command->SetCallbackFunction(this,
@@ -45,7 +45,7 @@ MultipleValuedNonLinearVnlOptimizer
 ::~MultipleValuedNonLinearVnlOptimizer()
 {
   delete m_CostFunctionAdaptor;
-  m_CostFunctionAdaptor = 0;
+  m_CostFunctionAdaptor = ITK_NULLPTR;
 }
 
 void
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx
index 28407ce..7d2b2e9 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkOnePlusOneEvolutionaryOptimizer.cxx
@@ -30,11 +30,11 @@ OnePlusOneEvolutionaryOptimizer
 
   m_Maximize = false;
   m_Epsilon = (double)1.5e-4;
-  m_RandomGenerator = 0;
+  m_RandomGenerator = ITK_NULLPTR;
 
   m_Initialized = false;
   m_GrowthFactor = 1.05;
-  m_ShrinkFactor = vcl_pow(m_GrowthFactor, -0.25);
+  m_ShrinkFactor = std::pow(m_GrowthFactor, -0.25);
   m_InitialRadius = 1.01;
   m_MaximumIteration = 100;
   m_Stop = false;
@@ -75,7 +75,7 @@ OnePlusOneEvolutionaryOptimizer
     }
   if ( shrink == -1 )
     {
-    m_ShrinkFactor = vcl_pow(m_GrowthFactor, -0.25);
+    m_ShrinkFactor = std::pow(m_GrowthFactor, -0.25);
     }
   else
     {
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx
index 08f714a..55742f3 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkParticleSwarmOptimizerBase.cxx
@@ -23,7 +23,9 @@ namespace itk
 
 
 ParticleSwarmOptimizerBase
-::ParticleSwarmOptimizerBase(void)
+::ParticleSwarmOptimizerBase(void):
+  m_FunctionBestValue(0),
+  m_IterationIndex(0)
 {
   this->m_PrintSwarm = false;
   this->m_InitializeNormalDistribution = false;
@@ -323,7 +325,7 @@ ParticleSwarmOptimizerBase
   unsigned int i,n;
 
                //we have to have a cost function
-  if( GetCostFunction() == NULL )
+  if( GetCostFunction() == ITK_NULLPTR )
     {
     itkExceptionMacro(<<"NULL cost function")
     }
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkPowellOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkPowellOptimizer.cxx
index 4d34f07..c0f0a8e 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkPowellOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkPowellOptimizer.cxx
@@ -184,7 +184,7 @@ PowellOptimizer
   // Compute the golden ratio as a constant to be
   // used when extrapolating the bracket
   //
-  const double goldenRatio = ( 1.0 + vcl_sqrt(5.0) ) / 2.0;
+  const double goldenRatio = ( 1.0 + std::sqrt(5.0) ) / 2.0;
 
   //
   // Get the value of the function for point x2
@@ -254,7 +254,7 @@ PowellOptimizer
   x = bx;
   w = bx;
 
-  const double goldenSectionRatio = ( 3.0 - vcl_sqrt(5.0) ) / 2;  /* Gold
+  const double goldenSectionRatio = ( 3.0 - std::sqrt(5.0) ) / 2;  /* Gold
                                                                     section
                                                                     ratio    */
   const double POWELL_TINY = 1.0e-20;
@@ -278,10 +278,10 @@ PowellOptimizer
     double tolerance1;
     double tolerance2;
 
-    tolerance1 = m_StepTolerance * vcl_fabs(x) + POWELL_TINY;
+    tolerance1 = m_StepTolerance * std::fabs(x) + POWELL_TINY;
     tolerance2 = 2.0 * tolerance1;
 
-    if ( vcl_fabs(x - middle_range) <= ( tolerance2 - 0.5 * ( b - a ) )
+    if ( std::fabs(x - middle_range) <= ( tolerance2 - 0.5 * ( b - a ) )
          || 0.5 * ( b - a ) < m_StepTolerance )
       {
       *extX = x;
@@ -297,7 +297,7 @@ PowellOptimizer
     new_step = goldenSectionRatio * ( x < middle_range ? b - x : a - x );
 
     /* Decide if the interpolation can be tried  */
-    if ( vcl_fabs(x - w) >= tolerance1  )    /* If x and w are distinct      */
+    if ( std::fabs(x - w) >= tolerance1  )    /* If x and w are distinct      */
       {
       double t;
       t = ( x - w ) * ( functionValueOfX - functionValueOfV );
@@ -321,7 +321,7 @@ PowellOptimizer
 
       /* Chec if x+p/q falls in [a,b] and  not too close to a and b
            and isn't too large */
-      if ( vcl_fabs(p) < vcl_fabs(new_step * q)
+      if ( std::fabs(p) < std::fabs(new_step * q)
            && p > q * ( a - x + 2 * tolerance1 )
            && p < q * ( b - x - 2 * tolerance1 ) )
         {
@@ -333,7 +333,7 @@ PowellOptimizer
       }
 
     /* Adjust the step to be not less than tolerance*/
-    if ( vcl_fabs(new_step) < tolerance1 )
+    if ( std::fabs(new_step) < tolerance1 )
       {
       if ( new_step > 0.0 )
         {
@@ -477,15 +477,15 @@ PowellOptimizer
       this->SetCurrentLinePoint(xx, fx);
       p = this->GetCurrentPosition();
 
-      if ( vcl_fabs(fptt - fx) > del )
+      if ( std::fabs(fptt - fx) > del )
         {
-        del = vcl_fabs(fptt - fx);
+        del = std::fabs(fptt - fx);
         ibig = i;
         }
       }
 
-    if ( 2.0 * vcl_fabs(fp - fx)
-         <= m_ValueTolerance * ( vcl_fabs(fp) + vcl_fabs(fx) ) )
+    if ( 2.0 * std::fabs(fp - fx)
+         <= m_ValueTolerance * ( std::fabs(fp) + std::fabs(fx) ) )
       {
       m_StopConditionDescription << "Cost function values at the current parameter ("
                                  << fx
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx
index 35f8a08..23908cc 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkRegularStepGradientDescentBaseOptimizer.cxx
@@ -26,7 +26,8 @@ namespace itk
  * Constructor
  */
 RegularStepGradientDescentBaseOptimizer
-::RegularStepGradientDescentBaseOptimizer()
+::RegularStepGradientDescentBaseOptimizer():
+  m_Stop(false)
 {
   itkDebugMacro("Constructor");
 
@@ -37,7 +38,7 @@ RegularStepGradientDescentBaseOptimizer
   m_CurrentIteration   =   0;
   m_Value = 0;
   m_Maximize = false;
-  m_CostFunction = 0;
+  m_CostFunction = ITK_NULLPTR;
   m_CurrentStepLength   =   0;
   m_StopCondition = Unknown;
   m_Gradient.Fill(0.0f);
@@ -165,13 +166,11 @@ RegularStepGradientDescentBaseOptimizer
   if ( m_RelaxationFactor < 0.0 )
     {
     itkExceptionMacro(<< "Relaxation factor must be positive. Current value is " << m_RelaxationFactor);
-    return;
     }
 
   if ( m_RelaxationFactor >= 1.0 )
     {
     itkExceptionMacro(<< "Relaxation factor must less than 1.0. Current value is " << m_RelaxationFactor);
-    return;
     }
 
   // Make sure the scales have been set properly
@@ -198,7 +197,7 @@ RegularStepGradientDescentBaseOptimizer
     magnitudeSquare += weighted * weighted;
     }
 
-  const double gradientMagnitude = vcl_sqrt(magnitudeSquare);
+  const double gradientMagnitude = std::sqrt(magnitudeSquare);
 
   if ( gradientMagnitude < m_GradientMagnitudeTolerance )
     {
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx
index d3235e8..6b8e397 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx
@@ -28,7 +28,8 @@ namespace itk
  * ************************* Constructor ************************
  */
 SPSAOptimizer
-::SPSAOptimizer()
+::SPSAOptimizer():
+  m_Stop(false)
 {
   itkDebugMacro("Constructor");
 
@@ -289,7 +290,7 @@ double SPSAOptimizer
 ::Compute_a(SizeValueType k) const
 {
   return static_cast< double >(
-           m_Sa / vcl_pow(m_A + k + 1, m_Alpha) );
+           m_Sa / std::pow(m_A + k + 1, m_Alpha) );
 } // end Compute_a
 
 /**
@@ -303,7 +304,7 @@ double SPSAOptimizer
 ::Compute_c(SizeValueType k) const
 {
   return static_cast< double >(
-           m_Sc / vcl_pow(k + 1, m_Gamma) );
+           m_Sc / std::pow(k + 1, m_Gamma) );
 } // end Compute_c
 
 /**
@@ -482,14 +483,14 @@ SPSAOptimizer::GuessParameters(
     this->ComputeGradient(initialPosition, m_Gradient);
     for ( unsigned int j = 0; j < spaceDimension; j++ )
       {
-      averageAbsoluteGradient[j] += vcl_fabs(m_Gradient[j]);
+      averageAbsoluteGradient[j] += std::fabs(m_Gradient[j]);
       }
     } // end for ++n
   averageAbsoluteGradient /= static_cast< double >( numberOfGradientEstimates );
 
   /** Set a in order to make the first steps approximately have an
     initialStepSize */
-  this->SetSa( initialStepSize * vcl_pow(m_A + 1.0, m_Alpha)
+  this->SetSa( initialStepSize * std::pow(m_A + 1.0, m_Alpha)
                / averageAbsoluteGradient.max_value() );
 } //end GuessParameters
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx
index 2f53d42..c25eedb 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx
@@ -25,7 +25,7 @@ namespace itk
 SingleValuedNonLinearOptimizer
 ::SingleValuedNonLinearOptimizer()
 {
-  m_CostFunction = 0;
+  m_CostFunction = ITK_NULLPTR;
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearVnlOptimizer.cxx b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearVnlOptimizer.cxx
index 9b2f38d..4c74649 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearVnlOptimizer.cxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearVnlOptimizer.cxx
@@ -26,7 +26,7 @@ namespace itk
 SingleValuedNonLinearVnlOptimizer
 ::SingleValuedNonLinearVnlOptimizer()
 {
-  m_CostFunctionAdaptor = 0;
+  m_CostFunctionAdaptor = ITK_NULLPTR;
   m_Maximize = false;
   m_Command = CommandType::New();
   m_Command->SetCallbackFunction(this,
@@ -41,7 +41,7 @@ SingleValuedNonLinearVnlOptimizer
 ::~SingleValuedNonLinearVnlOptimizer()
 {
   delete m_CostFunctionAdaptor;
-  m_CostFunctionAdaptor = 0;
+  m_CostFunctionAdaptor = ITK_NULLPTR;
 }
 
 void
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/CMakeLists.txt b/Utilities/ITK/Modules/Numerics/Optimizersv4/CMakeLists.txt
index d6d34f8..cf81a73 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/CMakeLists.txt
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/CMakeLists.txt
@@ -1,2 +1,3 @@
 project(ITKOptimizersv4)
+set(ITKOptimizersv4_LIBRARIES ITKOptimizersv4)
 itk_module_impl()
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkAmoebaOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkAmoebaOptimizerv4.h
new file mode 100644
index 0000000..8a18b2d
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkAmoebaOptimizerv4.h
@@ -0,0 +1,162 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkAmoebaOptimizerv4_h
+#define __itkAmoebaOptimizerv4_h
+
+#include "itkSingleValuedNonLinearVnlOptimizerv4.h"
+#include "vnl/algo/vnl_amoeba.h"
+
+namespace itk
+{
+/** \class AmoebaOptimizerv4
+ * \brief Wrap of the vnl_amoeba algorithm
+ *
+ * AmoebaOptimizerv4 is a wrapper around the vnl_amoeba algorithm which
+ * is an implementation of the Nelder-Meade downhill simplex
+ * problem. For most problems, it is a few times slower than a
+ * Levenberg-Marquardt algorithm but does not require derivatives of
+ * its cost function. It works by creating a simplex (n+1 points in
+ * ND space). The cost function is evaluated at each corner of the
+ * simplex.  The simplex is then modified (by reflecting a corner
+ * about the opposite edge, by shrinking the entire simplex, by
+ * contracting one edge of the simplex, or by expanding the simplex)
+ * in searching for the minimum of the cost function.
+ *
+ * The methods AutomaticInitialSimplex() and SetInitialSimplexDelta()
+ * control whether the optimizer defines the initial simplex
+ * automatically (by constructing a very small simplex around the
+ * initial position) or uses a user supplied simplex size.
+ *
+ * The method SetOptimizeWithRestarts() indicates that the amoeabe algorithm
+ * should be rerun after if converges. This heuristic increases the chances
+ * of escaping from a local optimum. Each time the simplex is initialized with
+ * the best solution obtained by the previous runs. The edge length is half of
+ * that from the previous iteration. The heuristic is terminated if the total
+ * number of iterations is greater-equal than the maximal number of iterations
+ * (SetNumberOfIterations) or the difference between the current function
+ * value and the best function value is less than a threshold
+ * (SetFunctionConvergenceTolerance) and
+ * max(|best_parameters_i - current_parameters_i|) is less than a threshold
+ * (SetParametersConvergenceTolerance).
+ *
+ * \ingroup ITKOptimizersv4
+ */
+class AmoebaOptimizerv4:
+  public SingleValuedNonLinearVnlOptimizerv4
+{
+public:
+  /** Standard "Self" typedef. */
+  typedef AmoebaOptimizerv4                   Self;
+  typedef SingleValuedNonLinearVnlOptimizerv4 Superclass;
+  typedef SmartPointer< Self >                Pointer;
+  typedef SmartPointer< const Self >          ConstPointer;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(AmoebaOptimizerv4, SingleValuedNonLinearVnlOptimizerv4);
+
+  /**  Parameters type.
+   *  It defines a position in the optimization search space. */
+  typedef Superclass::ParametersType ParametersType;
+
+  /** InternalParameters typedef. */
+  typedef   vnl_vector< double > InternalParametersType;
+
+  /** Start optimization with an initial value. */
+  virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE;
+
+  /** Plug in a Cost Function into the optimizer  */
+  virtual void SetMetric(MetricType *metric) ITK_OVERRIDE;
+
+  /** Set/Get the mode which determines how the amoeba algorithm
+   * defines the initial simplex.  Default is
+   * AutomaticInitialSimplexOn. If AutomaticInitialSimplex is on, the
+   * initial simplex is created with a default size. If
+   * AutomaticInitialSimplex is off, then InitialSimplexDelta will be
+   * used to define the initial simplex, setting the ith corner of the
+   * simplex as [x0[0], x0[1], ..., x0[i]+InitialSimplexDelta[i], ...,
+   * x0[d-1]]. */
+  itkSetMacro(AutomaticInitialSimplex, bool);
+  itkBooleanMacro(AutomaticInitialSimplex);
+  itkGetConstMacro(AutomaticInitialSimplex, bool);
+
+  /** Set/Get the mode that determines if we want to use multiple runs of the
+   * Amoeba optimizer. If true, then the optimizer is rerun after it converges.
+   * The additional runs are performed using a simplex initialized with the
+   * best solution obtained by the previous runs. The edge length is half of
+   * that from the previous iteration.
+   */
+  itkSetMacro(OptimizeWithRestarts, bool);
+  itkBooleanMacro(OptimizeWithRestarts);
+  itkGetConstMacro(OptimizeWithRestarts, bool);
+
+  /** Set/Get the deltas that are used to define the initial simplex
+   * when AutomaticInitialSimplex is off. */
+  void SetInitialSimplexDelta(ParametersType initialSimplexDelta,
+                              bool automaticInitialSimplex = false);
+  itkGetConstMacro(InitialSimplexDelta, ParametersType);
+
+  /** The optimization algorithm will terminate when the simplex
+   * diameter and the difference in cost function values at the corners of
+   * the simplex falls below user specified thresholds. The simplex
+   * diameter threshold is set via SetParametersConvergenceTolerance().*/
+  itkSetMacro(ParametersConvergenceTolerance, double);
+  itkGetConstMacro(ParametersConvergenceTolerance, double);
+
+  /** The optimization algorithm will terminate when the simplex
+   * diameter and the difference in cost function values at the corners of
+   * the simplex falls below user specified thresholds. The cost function
+   * convergence threshold is set via SetFunctionConvergenceTolerance().*/
+  itkSetMacro(FunctionConvergenceTolerance, double);
+  itkGetConstMacro(FunctionConvergenceTolerance, double);
+
+  /** Report the reason for stopping. */
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
+
+  /** Method for getting access to the internal optimizer. */
+  vnl_amoeba * GetOptimizer(void) const;
+
+protected:
+  AmoebaOptimizerv4();
+  virtual ~AmoebaOptimizerv4();
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
+
+  typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType;
+
+private:
+  /**Check that the settings are valid. If not throw an exception.*/
+  void ValidateSettings();
+  //purposely not implemented
+  AmoebaOptimizerv4(const Self &);
+  //purposely not implemented
+  void operator=(const Self &);
+
+  ParametersType::ValueType       m_ParametersConvergenceTolerance;
+  MeasureType                     m_FunctionConvergenceTolerance;
+  bool                            m_AutomaticInitialSimplex;
+  ParametersType                  m_InitialSimplexDelta;
+  bool                            m_OptimizeWithRestarts;
+  vnl_amoeba *                    m_VnlOptimizer;
+
+  std::ostringstream              m_StopConditionDescription;
+};
+} // end namespace itk
+
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkConvergenceMonitoringFunction.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkConvergenceMonitoringFunction.h
index cb83284..6d537e5 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkConvergenceMonitoringFunction.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkConvergenceMonitoringFunction.h
@@ -98,7 +98,7 @@ protected:
 
   ~ConvergenceMonitoringFunction() {}
 
-  void PrintSelf( std::ostream & os, Indent indent ) const
+  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE
     {
     Superclass::PrintSelf( os, indent );
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.h
new file mode 100644
index 0000000..0d2defc
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.h
@@ -0,0 +1,180 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkExhaustiveOptimizerv4_h
+#define __itkExhaustiveOptimizerv4_h
+
+#include "itkIntTypes.h"
+#include "itkObjectToObjectOptimizerBase.h"
+
+namespace itk
+{
+/** \class ExhaustiveOptimizerv4
+ * \brief Optimizer that fully samples a grid on the parametric space.
+ *
+ * This optimizer is equivalent to an exahaustive search in a discrete grid
+ * defined over the parametric space. The grid is centered on the initial
+ * position. The subdivisions of the grid along each one of the dimensions
+ * of the parametric space is defined by an array of number of steps.
+ *
+ * A typical use is to plot the metric space to get an idea of how noisy it
+ * is. An example is given below, where it is desired to plot the metric
+ * space with respect to translations along x, y and z in a 3D registration
+ * application:
+ *     Here it is assumed that the transform is Euler3DTransform.
+ *
+ * \code
+ *
+ * OptimizerType::StepsType steps( m_Transform->GetNumberOfParameters() );
+ * steps[1] = 10;
+ * steps[2] = 10;
+ * steps[3] = 10;
+ * m_Optimizer->SetNumberOfSteps( steps );
+ * m_Optimizer->SetStepLength( 2 );
+ *
+ * \endcode
+ *
+ * The optimizer throws IterationEvents after every iteration. We use this to plot
+ * the metric space in an image as follows:
+ *
+ * \code
+ *
+ *  if( itk::IterationEvent().CheckEvent(& event ) )
+ *    {
+ *    IndexType index;
+ *    index[0] = m_Optimizer->GetCurrentIndex()[0];
+ *    index[1] = m_Optimizer->GetCurrentIndex()[1];
+ *    index[2] = m_Optimizer->GetCurrentIndex()[2];
+ *    image->SetPixel( index, m_Optimizer->GetCurrentValue() );
+ *    }
+ *
+ * \endcode
+ *
+ * The image size is expected to be 11 x 11 x 11.
+ *
+ * If you wish to use different step lengths along each parametric axis,
+ * you can use the SetScales() method. This accepts an array, each element
+ * represents the number of subdivisions per step length. For instance scales
+ * of [0.5 1 4] along with a step length of 2 will cause the optimizer
+ * to search the metric space on a grid with x,y,z spacing of [1 2 8].
+ *
+ * Physical dimensions of the grid are influenced by both the scales and
+ * the number of steps along each dimension, a side of the region is
+ * stepLength*(2*numberOfSteps[d]+1)*scaling[d].
+ *
+ * \ingroup ITKOptimizersv4
+ */
+template<typename TInternalComputationValueType>
+class ExhaustiveOptimizerv4:
+  public ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
+{
+public:
+  /** Standard "Self" typedef. */
+  typedef ExhaustiveOptimizerv4                                               Self;
+  typedef ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>  Superclass;
+  typedef SmartPointer< Self >                                                Pointer;
+  typedef SmartPointer< const Self >                                          ConstPointer;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(ExhaustiveOptimizerv4, Superclass);
+
+  /** Steps type */
+  typedef Array< SizeValueType >                StepsType;
+
+  /** Measure type */
+  typedef typename Superclass::MeasureType      MeasureType;
+
+  /** Parameters type */
+  typedef typename Superclass::ParametersType   ParametersType;
+
+  /** Scales type */
+  typedef typename Superclass::ScalesType       ScalesType;
+
+  virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE;
+
+  /** Start optimization */
+  void StartWalking(void);
+
+  /** Resume the optimization */
+  void ResumeWalking(void);
+
+  /** Stop optimization */
+  void StopWalking(void);
+
+  itkSetMacro(StepLength, double);
+  itkSetMacro(NumberOfSteps, StepsType);
+  itkGetConstReferenceMacro(StepLength, double);
+  itkGetConstReferenceMacro(NumberOfSteps, StepsType);
+  itkGetConstReferenceMacro(CurrentValue, MeasureType);
+  itkGetConstReferenceMacro(MaximumMetricValue, MeasureType);
+  itkGetConstReferenceMacro(MinimumMetricValue, MeasureType);
+  itkGetConstReferenceMacro(MinimumMetricValuePosition, ParametersType);
+  itkGetConstReferenceMacro(MaximumMetricValuePosition, ParametersType);
+  itkGetConstReferenceMacro(CurrentIndex, ParametersType);
+
+  /** Get the reason for termination */
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
+
+  /**  Set the position to initialize the optimization. */
+  void SetInitialPosition(const ParametersType & param);
+
+  /** Get the position to initialize the optimization. */
+  ParametersType & GetInitialPosition(void)
+  {
+    return m_InitialPosition;
+  }
+
+protected:
+  ExhaustiveOptimizerv4();
+  virtual ~ExhaustiveOptimizerv4() {}
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
+
+  /** Advance to the next grid position. */
+  void AdvanceOneStep(void);
+
+  void IncrementIndex(ParametersType & param);
+
+protected:
+  ParametersType  m_InitialPosition;
+  MeasureType     m_CurrentValue;
+  StepsType       m_NumberOfSteps;
+  bool            m_Stop;
+  unsigned int    m_CurrentParameter;
+  double          m_StepLength;
+  ParametersType  m_CurrentIndex;
+  MeasureType     m_MaximumMetricValue;
+  MeasureType     m_MinimumMetricValue;
+  ParametersType  m_MinimumMetricValuePosition;
+  ParametersType  m_MaximumMetricValuePosition;
+
+private:
+  //purposely not implemented
+  ExhaustiveOptimizerv4(const Self &);
+  void operator=(const Self &);
+
+  std::ostringstream m_StopConditionDescription;
+};
+} // end namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "itkExhaustiveOptimizerv4.hxx"
+#endif
+
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.hxx
new file mode 100644
index 0000000..64e1b38
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkExhaustiveOptimizerv4.hxx
@@ -0,0 +1,260 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkExhaustiveOptimizerv4_hxx
+#define __itkExhaustiveOptimizerv4_hxx
+
+#include "itkExhaustiveOptimizerv4.h"
+
+namespace itk
+{
+
+template<typename TInternalComputationValueType>
+ExhaustiveOptimizerv4<TInternalComputationValueType>
+::ExhaustiveOptimizerv4() :
+  m_CurrentValue(0),
+  m_NumberOfSteps(0),
+  m_Stop(false),
+  m_CurrentParameter(0),
+  m_StepLength(1.0),
+  m_CurrentIndex(0),
+  m_MaximumMetricValue(0.0),
+  m_MinimumMetricValue(0.0),
+  m_StopConditionDescription("")
+{
+  this->m_NumberOfIterations = 0;
+}
+
+template<typename TInternalComputationValueType>
+void
+ExhaustiveOptimizerv4<TInternalComputationValueType>
+::StartOptimization(bool /* doOnlyInitialization */)
+{
+  this->StartWalking();
+}
+
+template<typename TInternalComputationValueType>
+void
+ExhaustiveOptimizerv4<TInternalComputationValueType>
+::StartWalking(void)
+{
+  itkDebugMacro("StartWalking");
+  this->InvokeEvent( StartEvent() );
+  m_StopConditionDescription.str("");
+  m_StopConditionDescription << this->GetNameOfClass() << ": Running";
+
+  ParametersType initialPos = this->m_Metric->GetParameters();
+  m_MinimumMetricValuePosition = initialPos;
+  m_MaximumMetricValuePosition = initialPos;
+
+  this->SetInitialPosition( initialPos ); // store the initial position
+
+  MeasureType initialValue = this->m_Metric->GetValue();
+  m_MaximumMetricValue = initialValue;
+  m_MinimumMetricValue = initialValue;
+
+  this->m_CurrentIteration = 0;
+  this->m_NumberOfIterations = 1;
+
+  const unsigned int spaceDimension = this->m_Metric->GetParameters().GetSize();
+
+  for ( unsigned int i = 0; i < spaceDimension; i++ )
+    {
+    this->m_NumberOfIterations *= ( 2 * m_NumberOfSteps[i] + 1 );
+    }
+
+  m_CurrentIndex.SetSize(spaceDimension);
+  m_CurrentIndex.Fill(0);
+
+  const ScalesType & scales = this->GetScales();
+  // Make sure the scales have been set properly
+  if ( scales.size() != spaceDimension )
+    {
+    itkExceptionMacro(<< "The size of Scales is "
+                      << scales.size()
+                      << ", but the NumberOfParameters is "
+                      << spaceDimension
+                      << ".");
+    }
+
+  // Setup first grid position.
+  ParametersType position(spaceDimension);
+  for ( unsigned int i = 0; i < spaceDimension; i++ )
+    {
+    position[i] = this->GetCurrentPosition()[i] - m_NumberOfSteps[i] * m_StepLength * scales[i];
+    }
+  this->m_Metric->SetParameters(position);
+
+  itkDebugMacro("Calling ResumeWalking");
+
+  this->ResumeWalking();
+}
+
+template<typename TInternalComputationValueType>
+void
+ExhaustiveOptimizerv4<TInternalComputationValueType>
+::ResumeWalking(void)
+{
+  itkDebugMacro("ResumeWalk");
+  m_Stop = false;
+
+  while ( !m_Stop )
+    {
+    ParametersType currentPosition = this->GetCurrentPosition();
+
+    if ( m_Stop )
+      {
+      StopWalking();
+      break;
+      }
+
+    m_CurrentValue = this->m_Metric->GetValue();
+
+    if ( m_CurrentValue > m_MaximumMetricValue )
+      {
+      m_MaximumMetricValue = m_CurrentValue;
+      m_MaximumMetricValuePosition = currentPosition;
+      }
+    if ( m_CurrentValue < m_MinimumMetricValue )
+      {
+      m_MinimumMetricValue = m_CurrentValue;
+      m_MinimumMetricValuePosition = currentPosition;
+      }
+
+    if ( m_Stop )
+      {
+      this->StopWalking();
+      break;
+      }
+
+    m_StopConditionDescription.str("");
+    m_StopConditionDescription << this->GetNameOfClass() << ": Running. ";
+    m_StopConditionDescription << "@ index " << this->GetCurrentIndex() << " value is " << m_CurrentValue;
+
+    this->InvokeEvent( IterationEvent() );
+    this->AdvanceOneStep();
+    this->m_CurrentIteration++;
+    }
+}
+
+template<typename TInternalComputationValueType>
+void
+ExhaustiveOptimizerv4<TInternalComputationValueType>
+::StopWalking(void)
+{
+  itkDebugMacro("StopWalking");
+
+  m_Stop = true;
+  this->InvokeEvent( EndEvent() );
+}
+
+template<typename TInternalComputationValueType>
+void
+ExhaustiveOptimizerv4<TInternalComputationValueType>
+::AdvanceOneStep(void)
+{
+  itkDebugMacro("AdvanceOneStep");
+
+  const unsigned int spaceDimension = this->m_Metric->GetParameters().GetSize();
+
+  ParametersType newPosition(spaceDimension);
+  this->IncrementIndex(newPosition);
+
+  itkDebugMacro(<< "new position = " << newPosition);
+
+  this->m_Metric->SetParameters(newPosition);
+}
+
+template<typename TInternalComputationValueType>
+void
+ExhaustiveOptimizerv4<TInternalComputationValueType>
+::IncrementIndex(ParametersType & newPosition)
+{
+  unsigned int       idx = 0;
+  const unsigned int spaceDimension = this->m_Metric->GetParameters().GetSize();
+
+  while ( idx < spaceDimension )
+    {
+    m_CurrentIndex[idx]++;
+
+    if ( m_CurrentIndex[idx] > ( 2 * m_NumberOfSteps[idx] ) )
+      {
+      m_CurrentIndex[idx] = 0;
+      idx++;
+      }
+    else
+      {
+      break;
+      }
+    }
+
+  if ( idx == spaceDimension )
+    {
+    m_Stop = true;
+    m_StopConditionDescription.str("");
+    m_StopConditionDescription << this->GetNameOfClass() << ": ";
+    m_StopConditionDescription << "Completed sampling of parametric space of size " << spaceDimension;
+    }
+
+  const ScalesType & scales = this->GetScales();
+  for ( unsigned int i = 0; i < spaceDimension; i++ )
+    {
+    newPosition[i] = ( m_CurrentIndex[i] - m_NumberOfSteps[i] )
+                     * m_StepLength * scales[i]
+                     + this->GetInitialPosition()[i];
+    }
+}
+
+template<typename TInternalComputationValueType>
+const std::string
+ExhaustiveOptimizerv4<TInternalComputationValueType>
+::GetStopConditionDescription() const
+{
+  return m_StopConditionDescription.str();
+}
+
+template<typename TInternalComputationValueType>
+void
+ExhaustiveOptimizerv4<TInternalComputationValueType>
+::SetInitialPosition(const ParametersType & param)
+{
+  m_InitialPosition = param;
+  this->Modified();
+}
+
+template<typename TInternalComputationValueType>
+void
+ExhaustiveOptimizerv4<TInternalComputationValueType>
+::PrintSelf(std::ostream & os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  os << indent << "InitialPosition = " << m_InitialPosition << std::endl;
+  os << indent << "CurrentValue = " << m_CurrentValue << std::endl;
+  os << indent << "NumberOfSteps = " << m_NumberOfSteps << std::endl;
+  os << indent << "Stop = " << m_Stop << std::endl;
+  os << indent << "CurrentParameter = " << m_CurrentParameter << std::endl;
+  os << indent << "StepLength = " << m_StepLength << std::endl;
+  os << indent << "CurrentIndex = " << m_CurrentIndex << std::endl;
+  os << indent << "MaximumMetricValue = " << m_MaximumMetricValue << std::endl;
+  os << indent << "MinimumMetricValue = " << m_MinimumMetricValue << std::endl;
+  os << indent << "MinimumMetricValuePosition = " << m_MinimumMetricValuePosition << std::endl;
+  os << indent << "MaximumMetricValuePosition = " << m_MaximumMetricValuePosition << std::endl;
+}
+} // end namespace itk
+
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.hxx
index 185d4ba..f45a369 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.hxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentLineSearchOptimizerv4.hxx
@@ -131,7 +131,7 @@ GradientDescentLineSearchOptimizerv4Template<TInternalComputationValueType>
     {
     x = b - this->m_Resphi * ( b - a );
     }
-  if ( vcl_abs( c - a ) < this->m_Epsilon * ( vcl_abs( b ) + vcl_abs( x ) ) )
+  if ( std::abs( c - a ) < this->m_Epsilon * ( std::abs( b ) + std::abs( x ) ) )
     {
     return ( c + a ) / 2;
     }
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h
index 16996d3..c979cf8 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.h
@@ -19,8 +19,7 @@
 #define __itkGradientDescentOptimizerBasev4_h
 
 #include "itkObjectToObjectOptimizerBase.h"
-
-#include "itkObjectToObjectOptimizerBase.h"
+#include "itkWindowConvergenceMonitoringFunction.h"
 #include "itkThreadedIndexedContainerPartitioner.h"
 #include "itkDomainThreader.h"
 
@@ -57,14 +56,15 @@ public:
     UPDATE_PARAMETERS_ERROR,
     STEP_TOO_SMALL,
     CONVERGENCE_CHECKER_PASSED,
+    GRADIENT_MAGNITUDE_TOLEARANCE,
     OTHER_ERROR
     } StopConditionType;
 
   /** Stop condition return string type */
-  typedef std::string                            StopConditionReturnStringType;
+  typedef typename Superclass::StopConditionReturnStringType StopConditionReturnStringType;
 
   /** Stop condition internal string type */
-  typedef std::ostringstream                     StopConditionDescriptionType;
+  typedef typename Superclass::StopConditionDescriptionType  StopConditionDescriptionType;
 
   /** It should be possible to derive the internal computation type from the class object. */
   typedef TInternalComputationValueType          InternalComputationValueType;
@@ -74,7 +74,7 @@ public:
   typedef typename MetricType::Pointer                       MetricTypePointer;
 
   /** Derivative type */
-  typedef typename MetricType::DerivativeType                DerivativeType;
+  typedef typename Superclass::DerivativeType                DerivativeType;
 
   /** Measure type */
   typedef typename Superclass::MeasureType                   MeasureType;
@@ -83,6 +83,10 @@ public:
 
   typedef typename Superclass::ParametersType                ParametersType;
 
+  /** Type for the convergence checker */
+  typedef itk::Function::WindowConvergenceMonitoringFunction<TInternalComputationValueType>
+  ConvergenceMonitoringType;
+
   /** Get the most recent gradient values. */
   itkGetConstReferenceMacro( Gradient, DerivativeType );
 
@@ -93,11 +97,14 @@ public:
   itkSetMacro(NumberOfIterations, SizeValueType);
 
   /** Get the number of iterations. */
-  itkGetConstReferenceMacro(NumberOfIterations, SizeValueType);
+  itkGetConstMacro(NumberOfIterations, SizeValueType);
 
   /** Get the current iteration number. */
   itkGetConstMacro(CurrentIteration, SizeValueType);
 
+  /** Start and run the optimization */
+  virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE;
+
   /** Resume optimization.
    * This runs the optimization loop, and allows continuation
    * of stopped optimization */
@@ -108,7 +115,7 @@ public:
   virtual void StopOptimization(void);
 
   /** Get the reason for termination */
-  virtual const StopConditionReturnStringType GetStopConditionDescription() const;
+  virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE;
 
   /** Modify the gradient in place, to advance the optimization.
    * This call performs a threaded modification for transforms with
@@ -150,6 +157,39 @@ protected:
   GradientDescentOptimizerBasev4Template();
   virtual ~GradientDescentOptimizerBasev4Template();
 
+  /** Flag to control use of the ScalesEstimator (if set) for
+   * automatic learning step estimation at *each* iteration.
+   */
+  bool m_DoEstimateLearningRateAtEachIteration;
+
+  /** Flag to control use of the ScalesEstimator (if set) for
+   * automatic learning step estimation only *once*, during first iteration.
+   */
+  bool m_DoEstimateLearningRateOnce;
+
+  /** The maximum step size in physical units, to restrict learning rates.
+   * Only used with automatic learning rate estimation.
+   * It may be initialized either by calling SetMaximumStepSizeInPhysicalUnits
+   * manually or by using m_ScalesEstimator automatically, and the former has
+   * higher priority than the latter. See main documentation.
+   */
+  TInternalComputationValueType  m_MaximumStepSizeInPhysicalUnits;
+
+  /** Flag to control using the convergence monitoring for stop condition.
+   *  This flag should be always set to true except for regular step gradient
+   *  descent optimizer that uses minimum step length to check the convergence.
+   */
+  bool m_UseConvergenceMonitoring;
+
+  /** Window size for the convergence checker.
+   *  The convergence checker calculates convergence value by fitting to
+   *  a window of the energy (metric value) profile.
+   */
+  SizeValueType m_ConvergenceWindowSize;
+
+  /** The convergence checker. */
+  typename ConvergenceMonitoringType::Pointer m_ConvergenceMonitoring;
+
   typename DomainThreader<ThreadedIndexedContainerPartitioner, Self>::Pointer m_ModifyGradientByScalesThreader;
   typename DomainThreader<ThreadedIndexedContainerPartitioner, Self>::Pointer m_ModifyGradientByLearningRateThreader;
 
@@ -157,14 +197,13 @@ protected:
   bool                          m_Stop;
   StopConditionType             m_StopCondition;
   StopConditionDescriptionType  m_StopConditionDescription;
-  SizeValueType                 m_NumberOfIterations;
-  SizeValueType                 m_CurrentIteration;
 
   /** Current gradient */
   DerivativeType     m_Gradient;
   virtual void PrintSelf(std::ostream & os, Indent indent) const;
 
 private:
+
   GradientDescentOptimizerBasev4Template( const Self & ); //purposely not implemented
   void operator=( const Self& ); //purposely not implemented
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.hxx
index 8834159..9a7cc22 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.hxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.hxx
@@ -28,7 +28,8 @@ namespace itk
 //-------------------------------------------------------------------
 template<typename TInternalComputationValueType>
 GradientDescentOptimizerBasev4Template<TInternalComputationValueType>
-::GradientDescentOptimizerBasev4Template()
+::GradientDescentOptimizerBasev4Template():
+  m_Stop(false)
 {
   /** Threader for apply scales to gradient */
   typename GradientDescentOptimizerBasev4ModifyGradientByScalesThreaderTemplate<TInternalComputationValueType>::Pointer modifyGradientByScalesThreader =
@@ -40,10 +41,16 @@ GradientDescentOptimizerBasev4Template<TInternalComputationValueType>
     GradientDescentOptimizerBasev4ModifyGradientByLearningRateThreaderTemplate<TInternalComputationValueType>::New();
   this->m_ModifyGradientByLearningRateThreader = modifyGradientByLearningRateThreader;
 
-  this->m_NumberOfIterations = 100;
-  this->m_CurrentIteration   = 0;
   this->m_StopCondition      = MAXIMUM_NUMBER_OF_ITERATIONS;
   this->m_StopConditionDescription << this->GetNameOfClass() << ": ";
+
+  this->m_MaximumStepSizeInPhysicalUnits = NumericTraits<TInternalComputationValueType>::Zero;
+
+  this->m_UseConvergenceMonitoring = true;
+  this->m_ConvergenceWindowSize = 50;
+
+  this->m_DoEstimateLearningRateAtEachIteration = false;
+  this->m_DoEstimateLearningRateOnce = true;
 }
 
 //-------------------------------------------------------------------
@@ -59,8 +66,6 @@ GradientDescentOptimizerBasev4Template<TInternalComputationValueType>
 ::PrintSelf(std::ostream & os, Indent indent) const
 {
   Superclass::PrintSelf(os, indent);
-  os << indent << "Number of iterations: " << this->m_NumberOfIterations  << std::endl;
-  os << indent << "Current iteration: " << this->m_CurrentIteration << std::endl;
   os << indent << "Stop condition:"<< this->m_StopCondition << std::endl;
   os << indent << "Stop condition description: " << this->m_StopConditionDescription.str()  << std::endl;
 }
@@ -118,6 +123,47 @@ GradientDescentOptimizerBasev4Template<TInternalComputationValueType>
     }
 }
 
+template<typename TInternalComputationValueType>
+void
+GradientDescentOptimizerBasev4Template<TInternalComputationValueType>
+::StartOptimization( bool doOnlyInitialization )
+{
+  itkDebugMacro("StartOptimization");
+
+  /* Validate some settings */
+  if ( this->m_ScalesEstimator.IsNotNull() &&
+      this->m_DoEstimateLearningRateOnce &&
+      this->m_DoEstimateLearningRateAtEachIteration )
+    {
+    itkExceptionMacro("Both m_DoEstimateLearningRateOnce and "
+                      "m_DoEstimateLearningRateAtEachIteration "
+                      "are enabled. Not allowed. ");
+    }
+
+  /* Estimate the parameter scales if requested. */
+  if ( this->m_ScalesEstimator.IsNotNull() && this->m_DoEstimateScales )
+    {
+    this->m_ScalesEstimator->EstimateScales(this->m_Scales);
+    itkDebugMacro( "Estimated scales = " << this->m_Scales );
+
+    /* If user hasn't set this, assign the default. */
+    if ( this->m_MaximumStepSizeInPhysicalUnits <= NumericTraits<TInternalComputationValueType>::epsilon())
+      {
+      this->m_MaximumStepSizeInPhysicalUnits = this->m_ScalesEstimator->EstimateMaximumStepSize();
+      }
+    }
+
+  if ( this->m_UseConvergenceMonitoring )
+    {
+    // Initialize the convergence checker
+    this->m_ConvergenceMonitoring = ConvergenceMonitoringType::New();
+    this->m_ConvergenceMonitoring->SetWindowSize( this->m_ConvergenceWindowSize );
+    }
+
+  /* Must call the superclass version for basic validation and setup */
+  Superclass::StartOptimization( doOnlyInitialization );
+}
+
 //-------------------------------------------------------------------
 template<typename TInternalComputationValueType>
 void
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h
index 069475b..b85909a 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.h
@@ -19,8 +19,6 @@
 #define __itkGradientDescentOptimizerv4_h
 
 #include "itkGradientDescentOptimizerBasev4.h"
-#include "itkOptimizerParameterScalesEstimator.h"
-#include "itkWindowConvergenceMonitoringFunction.h"
 
 namespace itk
 {
@@ -40,15 +38,8 @@ namespace itk
    * can be stored and retried via GetValue() and GetCurrentPosition().
    * See SetReturnBestParametersAndValue().
    *
-   * The user can scale each component of the df / dp in two ways:
-   * 1) manually, by setting a scaling vector using method SetScales().
-   * Or,
-   * 2) automatically, by assigning a ScalesEstimator using SetScalesEstimator().
-   * When ScalesEstimator is assigned, the optimizer is enabled by default to
-   * estimate scales, and can be changed via SetDoEstimateScales(). The scales
-   * are estimated and assigned once, during the call to StartOptimization().
-   * This option will override any manually-assigned scales.
-   *
+   * Gradient scales can be manually set or automatically estimated,
+   * as documented in the base class.
    * The learing rate defaults to 1.0, and can be set in two ways:
    * 1) manually, via \c SetLearningRate().
    * Or,
@@ -62,9 +53,11 @@ namespace itk
    * SetDoEstimateLearningRateOnce(false). When enabled, the optimizer computes learning
    * rate(s) such that at each step, each voxel's change in physical space will be less
    * than m_MaximumStepSizeInPhysicalUnits.
+   *
    *      m_LearningRate =
    *        m_MaximumStepSizeInPhysicalUnits /
    *        m_ScalesEstimator->EstimateStepScale(scaledGradient)
+   *
    * where m_MaximumStepSizeInPhysicalUnits defaults to the voxel spacing returned by
    * m_ScalesEstimator->EstimateMaximumStepSize() (which is typically 1 voxel),
    * and can be set by the user via SetMaximumStepSizeInPhysicalUnits().
@@ -111,10 +104,6 @@ public:
   typedef typename Superclass::ParametersType               ParametersType;
   typedef typename Superclass::StopConditionType            StopConditionType;
 
-  /** Type for the convergence checker */
-  typedef itk::Function::WindowConvergenceMonitoringFunction<TInternalComputationValueType>
-  ConvergenceMonitoringType;
-
   /** Set the learning rate. */
   itkSetMacro(LearningRate, TInternalComputationValueType);
 
@@ -132,25 +121,6 @@ public:
   /** Get the maximum step size, in physical space units. */
   itkGetConstReferenceMacro(MaximumStepSizeInPhysicalUnits, TInternalComputationValueType);
 
-  /** Set the scales estimator.
-   *
-   *  A ScalesEstimator is required for the scales and learning rate estimation
-   *  options to work. See the main documentation.
-   *
-   * \sa SetDoEstimateScales()
-   * \sa SetDoEstimateLearningRateAtEachIteration()
-   * \sa SetDoEstimateLearningOnce()
-   */
-  itkSetObjectMacro(ScalesEstimator, OptimizerParameterScalesEstimatorTemplate<TInternalComputationValueType>);
-
-  /** Option to use ScalesEstimator for scales estimation.
-   * The estimation is performed once at begin of
-   * optimization, and overrides any scales set using SetScales().
-   * Default is true. */
-  itkSetMacro(DoEstimateScales, bool);
-  itkGetConstReferenceMacro(DoEstimateScales, bool);
-  itkBooleanMacro(DoEstimateScales);
-
   /** Option to use ScalesEstimator for learning rate estimation at
    * *each* iteration. The estimation overrides the learning rate
    * set by SetLearningRate(). Default is false.
@@ -213,11 +183,11 @@ public:
   itkBooleanMacro(ReturnBestParametersAndValue);
 
   /** Start and run the optimization */
-  virtual void StartOptimization( bool doOnlyInitialization = false );
+  virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE;
 
-  virtual void StopOptimization(void);
+  virtual void StopOptimization(void) ITK_OVERRIDE;
 
-  virtual void ResumeOptimization();
+  virtual void ResumeOptimization() ITK_OVERRIDE;
 
   /** Estimate the learning rate based on the current gradient. */
   virtual void EstimateLearningRate();
@@ -229,19 +199,14 @@ protected:
   virtual void AdvanceOneStep(void);
 
   /** Modify the gradient over a given index range. */
-  virtual void ModifyGradientByScalesOverSubRange( const IndexRangeType& subrange );
-  virtual void ModifyGradientByLearningRateOverSubRange( const IndexRangeType& subrange );
+  virtual void ModifyGradientByScalesOverSubRange( const IndexRangeType& subrange ) ITK_OVERRIDE;
+  virtual void ModifyGradientByLearningRateOverSubRange( const IndexRangeType& subrange ) ITK_OVERRIDE;
 
   /** Manual learning rate to apply. It is overridden by
    * automatic learning rate estimation if enabled. See main documentation.
    */
   TInternalComputationValueType  m_LearningRate;
 
-  /** The maximum step size in physical units, to restrict learning rates.
-   * Only used with automatic learning rate estimation. See main documentation.
-   */
-  TInternalComputationValueType  m_MaximumStepSizeInPhysicalUnits;
-
   /** Default constructor */
   GradientDescentOptimizerv4Template();
 
@@ -250,8 +215,6 @@ protected:
 
   virtual void PrintSelf( std::ostream & os, Indent indent ) const;
 
-  typename OptimizerParameterScalesEstimatorTemplate<TInternalComputationValueType>::Pointer m_ScalesEstimator;
-
   /** Minimum convergence value for convergence checking.
    *  The convergence checker calculates convergence value by fitting to
    *  a window of the energy profile. When the convergence value reaches
@@ -259,19 +222,10 @@ protected:
    */
   TInternalComputationValueType m_MinimumConvergenceValue;
 
-  /** Window size for the convergence checker.
-   *  The convergence checker calculates convergence value by fitting to
-   *  a window of the energy (metric value) profile.
-   */
-  SizeValueType m_ConvergenceWindowSize;
-
   /** Current convergence value. */
   /* WindowConvergenceMonitoringFunction always returns output convergence value in 'TInternalComputationValueType' precision */
   TInternalComputationValueType m_ConvergenceValue;
 
-  /** The convergence checker. */
-  typename ConvergenceMonitoringType::Pointer m_ConvergenceMonitoring;
-
   /** Store the best value and related paramters */
   MeasureType                  m_CurrentBestValue;
   ParametersType               m_BestParameters;
@@ -279,21 +233,14 @@ protected:
   /** Flag to control returning of best value and parameters. */
   bool m_ReturnBestParametersAndValue;
 
-private:
-  /** Flag to control use of the ScalesEstimator (if set) for
-   * automatic scale estimation during StartOptimization()
-   */
-  bool m_DoEstimateScales;
-
-  /** Flag to control use of the ScalesEstimator (if set) for
-   * automatic learning step estimation at *each* iteration.
+  /** Store the previous gradient value at each iteration,
+   * so we can detect the changes in geradient direction.
+   * This is needed by the regular step gradient descent and
+   * Quasi newton optimizers.
    */
-  bool m_DoEstimateLearningRateAtEachIteration;
+  DerivativeType m_PreviousGradient;
 
-  /** Flag to control use of the ScalesEstimator (if set) for
-   * automatic learning step estimation only *once*, during first iteration.
-   */
-  bool m_DoEstimateLearningRateOnce;
+private:
 
   GradientDescentOptimizerv4Template( const Self & ); //purposely not implemented
   void operator=( const Self& ); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.hxx
index 08132b9..1c44c69 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.hxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerv4.hxx
@@ -31,21 +31,9 @@ GradientDescentOptimizerv4Template<TInternalComputationValueType>
 ::GradientDescentOptimizerv4Template()
 {
   this->m_LearningRate = NumericTraits<TInternalComputationValueType>::One;
-
-    // m_MaximumStepSizeInPhysicalUnits is used for automatic learning
-    // rate estimation. it may be initialized either by calling
-    // SetMaximumStepSizeInPhysicalUnits manually or by using m_ScalesEstimator
-    // automatically. and the former has higher priority than the latter.
-  this->m_MaximumStepSizeInPhysicalUnits = NumericTraits<TInternalComputationValueType>::Zero;
-
-    // Initialize parameters for the convergence checker
-  this->m_MinimumConvergenceValue = 1e-8;//NumericTraits<TInternalComputationValueType>::epsilon();//1e-30;
-  this->m_ConvergenceWindowSize = 50;
-
-  this->m_DoEstimateScales = true;
-  this->m_DoEstimateLearningRateAtEachIteration = false;
-  this->m_DoEstimateLearningRateOnce = true;
+  this->m_MinimumConvergenceValue = 1e-8;
   this->m_ReturnBestParametersAndValue = false;
+  this->m_PreviousGradient.Fill( NumericTraits<TInternalComputationValueType>::Zero );
 }
 
 /**
@@ -69,16 +57,6 @@ GradientDescentOptimizerv4Template<TInternalComputationValueType>
   os << indent << "Learning rate:" << this->m_LearningRate << std::endl;
   os << indent << "MaximumStepSizeInPhysicalUnits: "
   << this->m_MaximumStepSizeInPhysicalUnits << std::endl;
-  if( this->m_ScalesEstimator.IsNull() )
-    {
-    os << indent << "No ScalesEstimator set." << std::endl;
-    }
-  else
-    {
-    os << indent << "ScalesEstimator: " << std::endl;
-    this->m_ScalesEstimator->Print( os, indent.GetNextIndent() );
-    }
-  os << indent << "DoEstimateScales: " << this->m_DoEstimateScales << std::endl;
   os << indent << "DoEstimateLearningRateAtEachIteration: "
   << this->m_DoEstimateLearningRateAtEachIteration << std::endl;
   os << indent << "DoEstimateLearningRateOnce: "
@@ -93,34 +71,6 @@ void
 GradientDescentOptimizerv4Template<TInternalComputationValueType>
 ::StartOptimization( bool doOnlyInitialization )
 {
-  itkDebugMacro("StartOptimization");
-
-  /* Validate some settings */
-  if ( this->m_ScalesEstimator.IsNotNull() &&
-      this->m_DoEstimateLearningRateOnce &&
-      this->m_DoEstimateLearningRateAtEachIteration )
-    {
-    itkExceptionMacro("Both m_DoEstimateLearningRateOnce and m_DoEstimateLearningRateAtEachIteration are enabled. Not allowed. ");
-    }
-
-  /* Estimate the parameter scales if requested. */
-  if ( this->m_DoEstimateScales && this->m_ScalesEstimator.IsNotNull() )
-    {
-    this->m_ScalesEstimator->EstimateScales(this->m_Scales);
-    itkDebugMacro( "Estimated scales = " << this->m_Scales );
-
-    /* If user hasn't set this, assign the default. */
-    if ( this->m_MaximumStepSizeInPhysicalUnits <=
-        NumericTraits<TInternalComputationValueType>::epsilon())
-      {
-      this->m_MaximumStepSizeInPhysicalUnits = this->m_ScalesEstimator->EstimateMaximumStepSize();
-      }
-    }
-
-    // Initialize the convergence checker
-  this->m_ConvergenceMonitoring = ConvergenceMonitoringType::New();
-  this->m_ConvergenceMonitoring->SetWindowSize( this->m_ConvergenceWindowSize );
-
   /* Must call the superclass version for basic validation and setup */
   Superclass::StartOptimization( doOnlyInitialization );
 
@@ -169,6 +119,18 @@ GradientDescentOptimizerv4Template<TInternalComputationValueType>
   this->m_Stop = false;
   while( ! this->m_Stop )
     {
+    // Do not run the loop if the maximum number of iterations is reached or its value is zero.
+    if ( this->m_CurrentIteration >= this->m_NumberOfIterations )
+      {
+      this->m_StopConditionDescription << "Maximum number of iterations (" << this->m_NumberOfIterations << ") exceeded.";
+      this->m_StopCondition = Superclass::MAXIMUM_NUMBER_OF_ITERATIONS;
+      this->StopOptimization();
+      break;
+      }
+
+    // Save previous value with shallow swap that will be used by child optimizer.
+    swap( this->m_PreviousGradient, this->m_Gradient );
+
     /* Compute metric value/derivative. */
     try
       {
@@ -196,21 +158,24 @@ GradientDescentOptimizerv4Template<TInternalComputationValueType>
 
     /* Check the convergence by WindowConvergenceMonitoringFunction.
      */
-    this->m_ConvergenceMonitoring->AddEnergyValue( this->m_CurrentMetricValue );
-    try
+    if ( this->m_UseConvergenceMonitoring )
       {
-      this->m_ConvergenceValue = this->m_ConvergenceMonitoring->GetConvergenceValue();
-      if (this->m_ConvergenceValue <= this->m_MinimumConvergenceValue)
+      this->m_ConvergenceMonitoring->AddEnergyValue( this->m_CurrentMetricValue );
+      try
         {
-        this->m_StopConditionDescription << "Convergence checker passed at iteration " << this->m_CurrentIteration << ".";
-        this->m_StopCondition = Superclass::CONVERGENCE_CHECKER_PASSED;
-        this->StopOptimization();
-        break;
+        this->m_ConvergenceValue = this->m_ConvergenceMonitoring->GetConvergenceValue();
+        if (this->m_ConvergenceValue <= this->m_MinimumConvergenceValue)
+          {
+          this->m_StopConditionDescription << "Convergence checker passed at iteration " << this->m_CurrentIteration << ".";
+          this->m_StopCondition = Superclass::CONVERGENCE_CHECKER_PASSED;
+          this->StopOptimization();
+          break;
+          }
+        }
+      catch(std::exception & e)
+        {
+        std::cerr << "GetConvergenceValue() failed with exception: " << e.what() << std::endl;
         }
-      }
-    catch(std::exception & e)
-      {
-      std::cerr << "GetConvergenceValue() failed with exception: " << e.what() << std::endl;
       }
 
     /* Advance one step along the gradient.
@@ -227,13 +192,6 @@ GradientDescentOptimizerv4Template<TInternalComputationValueType>
     /* Update and check iteration count */
     this->m_CurrentIteration++;
 
-    if ( this->m_CurrentIteration >= this->m_NumberOfIterations )
-      {
-      this->m_StopConditionDescription << "Maximum number of iterations (" << this->m_NumberOfIterations << ") exceeded.";
-      this->m_StopCondition = Superclass::MAXIMUM_NUMBER_OF_ITERATIONS;
-      this->StopOptimization();
-      break;
-      }
     } //while (!m_Stop)
 }
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSBOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSBOptimizerv4.h
new file mode 100644
index 0000000..9d5b9a5
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSBOptimizerv4.h
@@ -0,0 +1,181 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkLBFGSBOptimizerv4_h
+#define __itkLBFGSBOptimizerv4_h
+
+#include "itkLBFGSOptimizerBasev4.h"
+#include "vnl/algo/vnl_lbfgsb.h"
+
+namespace itk
+{
+/* Necessary forward declaration */
+/** \class LBFGSBOptimizerHelperv4
+ * \brief Wrapper helper around vnl_lbfgsb.
+ *
+ * This class is used to translate iteration events, etc, from
+ * vnl_lbfgsb into iteration events in ITK.
+ *
+ * \ingroup ITKOptimizersv4
+ */
+class LBFGSBOptimizerHelperv4;
+
+/** \class LBFGSBOptimizerv4
+ * \brief Limited memory Broyden Fletcher Goldfarb Shannon minimization with simple bounds.
+ *
+ * This class is a wrapper for converted fortan code for performing limited
+ * memory Broyden Fletcher Goldfarb Shannon minimization with simple bounds.
+ * The algorithm miminizes a nonlinear function f(x) of n variables subject to
+ * simple bound constraints of l <= x <= u.
+ *
+ * See also the documentation in Numerics/lbfgsb.c
+ *
+ * References:
+ *
+ * [1] R. H. Byrd, P. Lu and J. Nocedal.
+ * A Limited Memory Algorithm for Bound Constrained Optimization, (1995),
+ * SIAM Journal on Scientific and Statistical Computing ,
+ * 16, 5, pp. 1190-1208.
+ *
+ * [2] C. Zhu, R. H. Byrd and J. Nocedal.
+ * L-BFGS-B: Algorithm 778: L-BFGS-B, FORTRAN routines for large scale
+ * bound constrained optimization (1997),
+ * ACM Transactions on Mathematical Software,
+ * Vol 23, Num. 4, pp. 550 - 560.
+ *
+ * \ingroup Numerics Optimizersv4
+ * \ingroup ITKOptimizersv4
+ */
+class LBFGSBOptimizerv4:
+  public LBFGSOptimizerBasev4< vnl_lbfgsb >
+{
+public:
+  /** Standard "Self" typedef. */
+  typedef LBFGSBOptimizerv4                 Self;
+  typedef LBFGSOptimizerBasev4<vnl_lbfgsb>  Superclass;
+  typedef SmartPointer< Self >              Pointer;
+  typedef SmartPointer< const Self >        ConstPointer;
+
+  typedef Superclass::MetricType     MetricType;
+  typedef Superclass::ParametersType ParametersType;
+  typedef Superclass::ScalesType     ScalesType;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(LBFGSBOptimizerv4, Superclass);
+
+  enum BoundSelectionValues {
+    UNBOUNDED = 0,
+    LOWERBOUNDED = 1,
+    BOTHBOUNDED = 2,
+    UPPERBOUNDED = 3
+    };
+
+  /**  BoundValue type.
+   *  Use for defining the lower and upper bounds on the variables.
+   */
+  typedef Array< double > BoundValueType;
+
+  /** BoundSelection type
+   * Use for defining the boundary condition for each variables.
+   */
+  typedef Array< long > BoundSelectionType;
+
+  /**  Set the position to initialize the optimization. */
+  void SetInitialPosition(const ParametersType & param);
+
+  /** Get the position to initialize the optimization. */
+  ParametersType & GetInitialPosition(void)
+  {
+  return m_InitialPosition;
+  }
+
+  /** Start optimization with an initial value. */
+  virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE;
+
+  /** Plug in a Cost Function into the optimizer  */
+  virtual void SetMetric(MetricType *metric) ITK_OVERRIDE;
+
+  /** Set the lower bound value for each variable. */
+  void SetLowerBound(const BoundValueType & value);
+
+  itkGetConstReferenceMacro(LowerBound,BoundValueType);
+
+  /** Set the upper bound value for each variable. */
+  void SetUpperBound(const BoundValueType & value);
+
+  itkGetConstReferenceMacro(UpperBound,BoundValueType);
+
+  /** Set the boundary condition for each variable, where
+   * select[i] = 0 if x[i] is unbounded,
+   *           = 1 if x[i] has only a lower bound,
+   *           = 2 if x[i] has both lower and upper bounds, and
+   *           = 3 if x[1] has only an upper bound
+   */
+  void SetBoundSelection(const BoundSelectionType & select);
+
+  itkGetConstReferenceMacro(BoundSelection,BoundSelectionType);
+
+  /** Set/Get the CostFunctionConvergenceFactor. Algorithm terminates
+   * when the reduction in cost function is less than factor * epsmcj
+   * where epsmch is the machine precision.
+   * Typical values for factor: 1e+12 for low accuracy;
+   * 1e+7 for moderate accuracy and 1e+1 for extremely high accuracy.
+   */
+  virtual void SetCostFunctionConvergenceFactor(double);
+
+  itkGetConstMacro(CostFunctionConvergenceFactor, double);
+
+  /** Set/Get the MaximumNumberOfCorrections. Default is 5 */
+  virtual void SetMaximumNumberOfCorrections(unsigned int);
+
+  itkGetConstMacro(MaximumNumberOfCorrections, unsigned int);
+
+  /** This optimizer does not support scaling of the derivatives. */
+  virtual void SetScales(const ScalesType &) ITK_OVERRIDE;
+
+  /** Get the current infinity norm of the project gradient of the cost
+   * function. */
+  itkGetConstReferenceMacro(InfinityNormOfProjectedGradient, double);
+
+protected:
+  LBFGSBOptimizerv4();
+  virtual ~LBFGSBOptimizerv4();
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
+
+  typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType;
+
+  /** Internal optimizer type. */
+  typedef   LBFGSBOptimizerHelperv4   InternalOptimizerType;
+
+  friend class LBFGSBOptimizerHelperv4;
+
+private:
+  LBFGSBOptimizerv4(const Self &); //purposely not implemented
+  void operator=(const Self &); //purposely not implemented
+
+  unsigned int m_MaximumNumberOfCorrections;
+
+  ParametersType          m_InitialPosition;
+  BoundValueType          m_LowerBound;
+  BoundValueType          m_UpperBound;
+  BoundSelectionType      m_BoundSelection;
+};
+} // end namespace itk
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.h
new file mode 100644
index 0000000..87a63ec
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.h
@@ -0,0 +1,169 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkLBFGSOptimizerBasev4_h
+#define __itkLBFGSOptimizerBasev4_h
+
+#include "itkSingleValuedNonLinearVnlOptimizerv4.h"
+#include "vnl/algo/vnl_lbfgs.h"
+#include "vnl/algo/vnl_lbfgsb.h"
+#include "itkAutoPointer.h"
+
+namespace itk
+{
+/* Necessary forward declaration see below for definition */
+/** \class LBFGSOptimizerBaseHelperv4
+ * \brief Wrapper helper around vnl optimizer.
+ *
+ * This class is used to translate iteration events, etc, from
+ * vnl_lbfgsb into iteration events in ITK.
+ *
+ * \ingroup ITKOptimizersv4
+ */
+template< typename TInternalVnlOptimizerType >
+class LBFGSOptimizerBaseHelperv4;
+
+/** \class LBFGSOptimizerBasev4
+ * \brief Abstract base for vnl lbfgs algorithm optimizers in ITKv4 registration framework.
+ *
+ * \note The StopConditionDescription returned by this class is directly from the vnl
+ * optimizer by calling <tt> m_VnlOptimizer->get_failure_code() </tt>. This seems to
+ * return "Failure" even when no error has occured. The same behavior is observed
+ * in the ITKv3 version of this optimizer.
+ *
+ * \note Local-support (high-density) transforms.
+ * Local-support transforms are not supported. To add support for these,
+ * the class must be modified thusly:
+ *
+ * \note 1) Parameter updates:
+ * In SingleValuedNonLinearCostFunctionAdaptor, the handling of the gradient
+ * must be changed to accomodate the fact that local-support transforms expect
+ * a gradient to be added to the transform parameters using the
+ * UpdateTransformParameters method of the local support transform. Other optimizers
+ * in the v4 framework use this method, but the use of the vnl optimizers here
+ * complicates it.
+ *
+ * \note 2) Efficiency
+ * To work efficiently with local-support transforms, this class should be
+ * modified to use a single parameter object to avoid the multiple
+ * parameter copies that are currently performed. It should work to use
+ * the transform parameters pointer.
+ *
+ * This code has been adapted for the ITKv4 registration framework from the
+ * v3 version, itkLBFGSOptimizer.
+ *
+ * \ingroup ITKOptimizersv4
+ */
+template< typename TInternalVnlOptimizerType >
+class LBFGSOptimizerBasev4:
+    public SingleValuedNonLinearVnlOptimizerv4
+{
+public:
+  /** Standard "Self" typedef. */
+  typedef LBFGSOptimizerBasev4                Self;
+  typedef SingleValuedNonLinearVnlOptimizerv4 Superclass;
+  typedef SmartPointer< Self >                Pointer;
+  typedef SmartPointer< const Self >          ConstPointer;
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(LBFGSOptimizerBasev4, SingleValuedNonLinearVnlOptimizerv4);
+
+  typedef Superclass::MetricType     MetricType;
+  typedef Superclass::ParametersType ParametersType;
+  typedef Superclass::ScalesType     ScalesType;
+
+  /** Stop condition return string type */
+  typedef Superclass::StopConditionReturnStringType StopConditionReturnStringType;
+
+  /** Stop condition internal string type */
+  typedef Superclass::StopConditionDescriptionType  StopConditionDescriptionType;
+
+  /** The vnl optimizer */
+  typedef LBFGSOptimizerBaseHelperv4<TInternalVnlOptimizerType>   InternalOptimizerType;
+
+  /** Method for getting access to the internal optimizer. */
+  InternalOptimizerType * GetOptimizer(void);
+
+  /** Start optimization with an initial value. */
+  virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE;
+
+  /** Plug in a Cost Function into the optimizer  */
+  virtual void SetMetric(MetricType *metric) ITK_OVERRIDE;
+
+  /** Set/Get the optimizer trace flag. If set to true, the optimizer
+   * prints out information every iteration.
+   */
+  virtual void SetTrace(bool flag);
+
+  itkGetConstMacro(Trace, bool);
+  itkBooleanMacro(Trace);
+
+  /** Set/Get the maximum number of function evaluations allowed. */
+  virtual void SetMaximumNumberOfFunctionEvaluations(unsigned int n);
+
+  itkGetConstMacro(MaximumNumberOfFunctionEvaluations, unsigned int);
+
+  /** Set/Get the gradient convergence tolerance. This is a positive
+   * real number that determines the accuracy with which the solution is to
+   * be found. The optimization terminates when:
+   * ||G|| < gtol max(1,||X||) where ||.|| denotes the Euclidean norm.
+   */
+  virtual void SetGradientConvergenceTolerance(double gtol);
+
+  itkGetConstMacro(GradientConvergenceTolerance, double);
+
+  /** Get the reason for termination */
+  virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE;
+
+protected:
+  LBFGSOptimizerBasev4();
+  virtual ~LBFGSOptimizerBasev4();
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
+
+  typedef Superclass::CostFunctionAdaptorType CostFunctionAdaptorType;
+
+  bool                         m_OptimizerInitialized;
+
+  typedef AutoPointer<InternalOptimizerType>  InternalOptimizerAutoPointer;
+  InternalOptimizerAutoPointer  m_VnlOptimizer;
+
+  mutable std::ostringstream    m_StopConditionDescription;
+
+  bool         m_Trace;
+  unsigned int m_MaximumNumberOfFunctionEvaluations;
+  double       m_GradientConvergenceTolerance;
+  double       m_InfinityNormOfProjectedGradient;
+  unsigned int m_MaximumNumberOfIterations;
+  double       m_CostFunctionConvergenceFactor;
+
+  // give the helper access to member variables, to update iteration
+  // counts, etc.
+  friend class LBFGSOptimizerBaseHelperv4<TInternalVnlOptimizerType>;
+  friend class LBFGSBOptimizerHelperv4;
+
+private:
+  LBFGSOptimizerBasev4(const Self &); //purposely not implemented
+  void operator=(const Self &); //purposely not implemented
+
+};
+} // end namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "itkLBFGSOptimizerBasev4.hxx"
+#endif
+
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.hxx
new file mode 100644
index 0000000..4c47e69
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.hxx
@@ -0,0 +1,258 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkLBFGSOptimizerBasev4_hxx
+#define __itkLBFGSOptimizerBasev4_hxx
+
+#include "itkLBFGSOptimizerBasev4.h"
+
+extern "C" {
+  extern double v3p_netlib_dpmeps_();
+}
+
+namespace itk
+{
+
+template< typename TInternalVnlOptimizerType >
+class LBFGSOptimizerBaseHelperv4: public TInternalVnlOptimizerType
+{
+  public:
+  typedef LBFGSOptimizerBaseHelperv4  Self;
+  typedef TInternalVnlOptimizerType   Superclass;
+
+  LBFGSOptimizerBaseHelperv4(vnl_cost_function & f,
+                             LBFGSOptimizerBasev4<TInternalVnlOptimizerType> * itkObj):
+  TInternalVnlOptimizerType(f),
+  m_ItkObj(itkObj)
+  {
+  }
+
+  protected:
+  LBFGSOptimizerBasev4<TInternalVnlOptimizerType> * m_ItkObj;
+};
+
+template<typename TInternalVnlOptimizerType>
+LBFGSOptimizerBasev4<TInternalVnlOptimizerType>
+::LBFGSOptimizerBasev4():
+  m_OptimizerInitialized(false),
+  m_Trace(false),
+  m_MaximumNumberOfFunctionEvaluations(2000),
+  m_GradientConvergenceTolerance(1e-5),
+  m_InfinityNormOfProjectedGradient(0.0),
+  m_MaximumNumberOfIterations(500),
+  m_CostFunctionConvergenceFactor(1e+7)
+{
+}
+
+template<typename TInternalVnlOptimizerType>
+LBFGSOptimizerBasev4<TInternalVnlOptimizerType>
+::~LBFGSOptimizerBasev4()
+{
+}
+
+template<typename TInternalVnlOptimizerType>
+void
+LBFGSOptimizerBasev4<TInternalVnlOptimizerType>
+::PrintSelf(std::ostream & os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+  os << indent << "Trace: ";
+  if ( m_Trace )
+    {
+    os << "On";
+    }
+  else
+    {
+    os << "Off";
+    }
+  os << std::endl;
+  os << indent << "MaximumNumberOfFunctionEvaluations: "
+     << m_MaximumNumberOfFunctionEvaluations << std::endl;
+  os << indent << "GradientConvergenceTolerance: "
+     << m_GradientConvergenceTolerance << std::endl;
+}
+
+template<typename TInternalVnlOptimizerType>
+void
+LBFGSOptimizerBasev4<TInternalVnlOptimizerType>
+::SetTrace(bool flag)
+{
+  if ( flag == m_Trace )
+    {
+    return;
+    }
+
+  m_Trace = flag;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->set_trace(m_Trace);
+    }
+
+  this->Modified();
+}
+
+template<typename TInternalVnlOptimizerType>
+void
+LBFGSOptimizerBasev4<TInternalVnlOptimizerType>
+::SetMaximumNumberOfFunctionEvaluations(unsigned int n)
+{
+  if ( n == m_MaximumNumberOfFunctionEvaluations )
+    {
+    return;
+    }
+
+  m_MaximumNumberOfFunctionEvaluations = n;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->set_max_function_evals(
+      static_cast< int >( m_MaximumNumberOfFunctionEvaluations ) );
+    }
+
+  this->Modified();
+}
+
+template<typename TInternalVnlOptimizerType>
+void
+LBFGSOptimizerBasev4<TInternalVnlOptimizerType>
+::SetGradientConvergenceTolerance(double f)
+{
+  if ( f == m_GradientConvergenceTolerance )
+    {
+    return;
+    }
+
+  m_GradientConvergenceTolerance = f;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->set_g_tolerance(m_GradientConvergenceTolerance);
+    }
+
+  this->Modified();
+}
+
+template<typename TInternalVnlOptimizerType>
+void
+LBFGSOptimizerBasev4<TInternalVnlOptimizerType>
+::SetMetric(MetricType *metric)
+{
+  // assign to base class
+  this->m_Metric = metric;
+
+  // assign to vnl cost-function adaptor
+  const unsigned int numberOfParameters = metric->GetNumberOfParameters();
+
+  CostFunctionAdaptorType *adaptor = new CostFunctionAdaptorType( numberOfParameters );
+
+  adaptor->SetCostFunction( metric );
+
+  this->SetCostFunctionAdaptor( adaptor );
+
+  m_VnlOptimizer.TakeOwnership( new InternalOptimizerType( *adaptor, this ) );
+}
+
+template<typename TInternalVnlOptimizerType>
+void
+LBFGSOptimizerBasev4<TInternalVnlOptimizerType>
+::StartOptimization(bool /* doOnlyInitialization */)
+{
+  // Check for a local-support transform.
+  // These aren't currently supported, see main class documentation.
+  if( this->GetMetric()->HasLocalSupport() )
+    {
+    itkExceptionMacro("The assigned transform has local-support. This is not supported for this optimizer. See the optimizer documentation.");
+    }
+
+  // Perform some verification, check scales,
+  // pass settings to cost-function adaptor.
+  Superclass::StartOptimization();
+}
+
+template<typename TInternalVnlOptimizerType>
+typename LBFGSOptimizerBasev4<TInternalVnlOptimizerType>::InternalOptimizerType *
+LBFGSOptimizerBasev4<TInternalVnlOptimizerType>
+::GetOptimizer()
+{
+  return m_VnlOptimizer.GetPointer();
+}
+
+template<typename TInternalVnlOptimizerType>
+const std::string
+LBFGSOptimizerBasev4<TInternalVnlOptimizerType>
+::GetStopConditionDescription() const
+{
+  m_StopConditionDescription.str("");
+  m_StopConditionDescription << this->GetNameOfClass() << ": ";
+  if ( m_VnlOptimizer )
+    {
+    switch ( m_VnlOptimizer->get_failure_code() )
+      {
+      case vnl_nonlinear_minimizer::ERROR_FAILURE:
+        m_StopConditionDescription << "Failure";
+        break;
+      case vnl_nonlinear_minimizer::ERROR_DODGY_INPUT:
+        m_StopConditionDescription << "Dodgy input";
+        break;
+      case vnl_nonlinear_minimizer::CONVERGED_FTOL:
+        m_StopConditionDescription << "Function tolerance reached after "
+                                    << m_CurrentIteration
+                                    << " iterations. "
+                                    << "The relative reduction of the cost function <= "
+                                    << m_CostFunctionConvergenceFactor * v3p_netlib_dpmeps_()
+                                    << " = CostFunctionConvergenceFactor ("
+                                    << m_CostFunctionConvergenceFactor
+                                    << ") * machine precision ("
+                                    << v3p_netlib_dpmeps_()
+                                    << ").";
+        break;
+      case vnl_nonlinear_minimizer::CONVERGED_XTOL:
+        m_StopConditionDescription << "Solution tolerance reached";
+        break;
+      case vnl_nonlinear_minimizer::CONVERGED_XFTOL:
+        m_StopConditionDescription << "Solution and Function tolerance both reached";
+        break;
+      case vnl_nonlinear_minimizer::CONVERGED_GTOL:
+        m_StopConditionDescription << "Gradient tolerance reached. "
+                                   << "Gradient tolerance is "
+                                   << m_GradientConvergenceTolerance;
+        break;
+      case vnl_nonlinear_minimizer::FAILED_TOO_MANY_ITERATIONS:
+        m_StopConditionDescription << "Too many function evaluations. Function evaluations  = "
+                                   << m_MaximumNumberOfFunctionEvaluations;
+        break;
+      case vnl_nonlinear_minimizer::FAILED_FTOL_TOO_SMALL:
+        m_StopConditionDescription << "Function tolerance too small";
+        break;
+      case vnl_nonlinear_minimizer::FAILED_XTOL_TOO_SMALL:
+        m_StopConditionDescription << "Solution tolerance too small";
+        break;
+      case vnl_nonlinear_minimizer::FAILED_GTOL_TOO_SMALL:
+        m_StopConditionDescription << "Gradient tolerance too small";
+        break;
+      case vnl_nonlinear_minimizer::FAILED_USER_REQUEST:
+        m_StopConditionDescription << "User requested";
+        break;
+      }
+    return m_StopConditionDescription.str();
+    }
+  else
+    {
+    return std::string("");
+    }
+}
+} // end namespace itk
+
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerv4.h
new file mode 100644
index 0000000..4fbffd2
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerv4.h
@@ -0,0 +1,99 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkLBFGSOptimizerv4_h
+#define __itkLBFGSOptimizerv4_h
+
+#include "itkLBFGSOptimizerBasev4.h"
+#include "vnl/algo/vnl_lbfgs.h"
+
+namespace itk
+{
+/** \class LBFGSOptimizerv4
+ * \brief Wrap of the vnl_lbfgs algorithm for use in ITKv4 registration framework.
+ *
+ * \ingroup ITKOptimizersv4
+ */
+
+class LBFGSOptimizerv4:
+    public LBFGSOptimizerBasev4< vnl_lbfgs >
+{
+public:
+  /** Standard "Self" typedef. */
+  typedef LBFGSOptimizerv4                  Self;
+  typedef LBFGSOptimizerBasev4<vnl_lbfgs>   Superclass;
+  typedef SmartPointer< Self >              Pointer;
+  typedef SmartPointer< const Self >        ConstPointer;
+
+  typedef Superclass::MetricType     MetricType;
+  typedef Superclass::ParametersType ParametersType;
+  typedef Superclass::ScalesType     ScalesType;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(LBFGSOptimizerv4, Superclass);
+
+  /** Start optimization with an initial value. */
+  virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE;
+
+  /** Plug in a Cost Function into the optimizer  */
+  virtual void SetMetric(MetricType *metric) ITK_OVERRIDE;
+
+  void VerboseOn(void);
+  void VerboseOff(void);
+
+  /** Set/Get the line search accuracy. This is a positive real number
+   * with a default value of 0.9, which controls the accuracy of the line
+   * search. If the function and gradient evalutions are inexpensive with
+   * respect to the cost of the iterations it may be advantageous to set
+   * the value to a small value (say 0.1).
+   */
+  void SetLineSearchAccuracy(double tol);
+
+  itkGetConstMacro(LineSearchAccuracy, double);
+
+  /** Set/Get the default step size. This is a positive real number
+   * with a default value of 1.0 which determines the step size in the line
+   * search.
+   */
+  void SetDefaultStepLength(double stp);
+
+  itkGetConstMacro(DefaultStepLength, double);
+
+protected:
+  LBFGSOptimizerv4();
+  virtual ~LBFGSOptimizerv4();
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
+
+  /** InternalParameters typedef. */
+  typedef vnl_vector< double >  InternalParametersType;
+
+  /** Internal optimizer type. */
+  typedef   vnl_lbfgs           InternalOptimizerType;
+
+private:
+  LBFGSOptimizerv4(const Self &); //purposely not implemented
+  void operator=(const Self &); //purposely not implemented
+
+  bool         m_Verbose;
+  double       m_LineSearchAccuracy;
+  double       m_DefaultStepLength;
+};
+} // end namespace itk
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.h
index 9459fc5..729c47a 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.h
@@ -70,10 +70,10 @@ public:
   typedef typename Superclass::StopConditionType                                             StopConditionType;
 
   /** Stop condition return string type */
-  typedef std::string                            StopConditionReturnStringType;
+  typedef typename Superclass::StopConditionReturnStringType StopConditionReturnStringType;
 
   /** Stop condition internal string type */
-  typedef std::ostringstream                     StopConditionDescriptionType;
+  typedef typename Superclass::StopConditionDescriptionType  StopConditionDescriptionType;
 
   /** It should be possible to derive the internal computation type from the class object. */
   typedef TInternalComputationValueType             InternalComputationValueType;
@@ -92,15 +92,6 @@ public:
   /** Get stop condition enum */
   itkGetConstReferenceMacro(StopCondition, StopConditionType);
 
-  /** Set the number of iterations. */
-  itkSetMacro(NumberOfIterations, SizeValueType);
-
-  /** Get the number of iterations. */
-  itkGetConstReferenceMacro(NumberOfIterations, SizeValueType);
-
-  /** Get the current iteration number. */
-  itkGetConstMacro(CurrentIteration, SizeValueType);
-
   /** Begin the optimization */
   virtual void StartOptimization( bool doOnlyInitialization = false );
 
@@ -113,7 +104,7 @@ public:
   virtual void ResumeOptimization();
 
   /** Get the reason for termination */
-  virtual const StopConditionReturnStringType GetStopConditionDescription() const;
+  virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE;
 
   /** Get the list of optimizers currently held.  */
   OptimizersListType & GetOptimizersList();
@@ -136,8 +127,6 @@ public:
   bool                          m_Stop;
   StopConditionType             m_StopCondition;
   StopConditionDescriptionType  m_StopConditionDescription;
-  SizeValueType                 m_NumberOfIterations;
-  SizeValueType                 m_CurrentIteration;
   OptimizersListType            m_OptimizersList;
   MetricValuesListType          m_MetricValuesList;
   MeasureType                   m_MinimumMetricValue;
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.hxx
index bfab8bd..da9df41 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.hxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.hxx
@@ -26,10 +26,10 @@ namespace itk
 //-------------------------------------------------------------------
 template<typename TInternalComputationValueType>
 MultiGradientOptimizerv4Template<TInternalComputationValueType>
-::MultiGradientOptimizerv4Template()
+::MultiGradientOptimizerv4Template():
+  m_Stop(false)
 {
   this->m_NumberOfIterations = static_cast<SizeValueType>(0);
-  this->m_CurrentIteration   = static_cast<SizeValueType>(0);
   this->m_StopCondition      = Superclass::MAXIMUM_NUMBER_OF_ITERATIONS;
   this->m_StopConditionDescription << this->GetNameOfClass() << ": ";
 
@@ -51,8 +51,6 @@ MultiGradientOptimizerv4Template<TInternalComputationValueType>
 ::PrintSelf(std::ostream & os, Indent indent) const
 {
   Superclass::PrintSelf(os, indent);
-  os << indent << "Number of iterations: " << this->m_NumberOfIterations  << std::endl;
-  os << indent << "Current iteration: " << this->m_CurrentIteration << std::endl;
   os << indent << "Stop condition:"<< this->m_StopCondition << std::endl;
   os << indent << "Stop condition description: " << this->m_StopConditionDescription.str()  << std::endl;
   }
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.h
index 583ae05..0a929eb 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.h
@@ -73,10 +73,11 @@ public:
   } StopConditionType;
 
   /** Stop condition return string type */
-  typedef std::string                            StopConditionReturnStringType;
+  typedef typename Superclass::StopConditionReturnStringType StopConditionReturnStringType;
 
   /** Stop condition internal string type */
-  typedef std::ostringstream                     StopConditionDescriptionType;
+  typedef typename Superclass::StopConditionDescriptionType  StopConditionDescriptionType;
+  /** Stop condition return string type */
 
   /** It should be possible to derive the internal computation type from the class object. */
   typedef TInternalComputationValueType             InternalComputationValueType;
@@ -95,15 +96,6 @@ public:
   /** Get stop condition enum */
   itkGetConstReferenceMacro(StopCondition, StopConditionType);
 
-  /** Set the number of iterations. */
-  itkSetMacro(NumberOfIterations, SizeValueType);
-
-  /** Get the number of iterations. */
-  itkGetConstReferenceMacro(NumberOfIterations, SizeValueType);
-
-  /** Get the current iteration number. */
-  itkGetConstMacro(CurrentIteration, SizeValueType);
-
   /** Create an instance of the local optimizer */
   void InstantiateLocalOptimizer(void);
 
@@ -119,7 +111,7 @@ public:
   virtual void ResumeOptimization();
 
   /** Get the reason for termination */
-  virtual const StopConditionReturnStringType GetStopConditionDescription() const;
+  virtual const StopConditionReturnStringType GetStopConditionDescription() const ITK_OVERRIDE;
 
   /** Get the list of parameters over which to search.  */
   ParametersListType & GetParametersList();
@@ -150,8 +142,6 @@ protected:
   bool                          m_Stop;
   StopConditionType             m_StopCondition;
   StopConditionDescriptionType  m_StopConditionDescription;
-  SizeValueType                 m_NumberOfIterations;
-  SizeValueType                 m_CurrentIteration;
   ParametersListType            m_ParametersList;
   MetricValuesListType          m_MetricValuesList;
   MeasureType                   m_MinimumMetricValue;
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx
index a6e1a0e..2de014d 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx
@@ -26,17 +26,17 @@ namespace itk
 //-------------------------------------------------------------------
 template<typename TInternalComputationValueType>
 MultiStartOptimizerv4Template<TInternalComputationValueType>
-::MultiStartOptimizerv4Template()
+::MultiStartOptimizerv4Template():
+  m_Stop(false)
 {
   this->m_NumberOfIterations = static_cast<SizeValueType>(0);
-  this->m_CurrentIteration   = static_cast<SizeValueType>(0);
   this->m_StopCondition      = MAXIMUM_NUMBER_OF_ITERATIONS;
   this->m_StopConditionDescription << this->GetNameOfClass() << ": ";
 
   this->m_BestParametersIndex= static_cast<ParameterListSizeType>(0);
   this->m_MaximumMetricValue=NumericTraits<MeasureType>::max();
   this->m_MinimumMetricValue = this->m_MaximumMetricValue;
-  m_LocalOptimizer = NULL;
+  m_LocalOptimizer = ITK_NULLPTR;
 }
 
 //-------------------------------------------------------------------
@@ -52,8 +52,6 @@ MultiStartOptimizerv4Template<TInternalComputationValueType>
 ::PrintSelf(std::ostream & os, Indent indent) const
 {
   Superclass::PrintSelf(os, indent);
-  os << indent << "Number of iterations: " << this->m_NumberOfIterations  << std::endl;
-  os << indent << "Current iteration: " << this->m_CurrentIteration << std::endl;
   os << indent << "Stop condition:"<< this->m_StopCondition << std::endl;
   os << indent << "Stop condition description: " << this->m_StopConditionDescription.str()  << std::endl;
 }
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx
index 0a8459b..cf285e1 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx
@@ -31,7 +31,8 @@ namespace itk
  */
 template<unsigned int TFixedDimension, unsigned int TMovingDimension, typename TVirtualImage, typename TInternalComputationValueType>
 ObjectToObjectMetric<TFixedDimension, TMovingDimension, TVirtualImage, TInternalComputationValueType>
-::ObjectToObjectMetric()
+::ObjectToObjectMetric():
+  m_NumberOfValidPoints(0)
 {
   /* Both transforms default to an identity transform */
   typedef IdentityTransform<TInternalComputationValueType, itkGetStaticConstMacro( MovingDimension ) > MovingIdentityTransformType;
@@ -238,7 +239,7 @@ ObjectToObjectMetric<TFixedDimension, TMovingDimension, TVirtualImage, TInternal
     {
     this->m_VirtualImage = virtualImage;
     this->Modified();
-    this->m_UserHasSetVirtualDomain = virtualImage != NULL;
+    this->m_UserHasSetVirtualDomain = virtualImage != ITK_NULLPTR;
     }
 }
 
@@ -415,7 +416,7 @@ ObjectToObjectMetric<TFixedDimension, TMovingDimension, TVirtualImage, TInternal
   const MovingTransformType* transform = this->m_MovingTransform.GetPointer();
   // If it's a CompositeTransform, get the last transform (1st applied).
   const MovingCompositeTransformType* comptx = dynamic_cast< const MovingCompositeTransformType * > ( transform );
-  if( comptx != NULL )
+  if( comptx != ITK_NULLPTR )
     {
     transform = comptx->GetBackTransform();
     }
@@ -441,7 +442,7 @@ ObjectToObjectMetric<TFixedDimension, TMovingDimension, TVirtualImage, TInternal
    * Eventually we'll want a method in Transform something like a
    * GetInputDomainSize to check this cleanly. */
   const MovingDisplacementFieldTransformType * displacementTransform = this->GetMovingDisplacementFieldTransform();
-  if( displacementTransform == NULL )
+  if( displacementTransform == ITK_NULLPTR )
     {
     itkExceptionMacro("Expected the moving transform to be of type DisplacementFieldTransform or derived, "
                       "or a CompositeTransform with DisplacementFieldTransform as the last to have been added." );
@@ -514,20 +515,12 @@ ObjectToObjectMetric<TFixedDimension, TMovingDimension, TVirtualImage, TInternal
 {
   Superclass::PrintSelf(os, indent);
 
-  os << indent << "ObjectToObjectMetric: " << std::endl
-     << indent << "Fixed Transform: " << std::endl
-     << indent << this->m_FixedTransform << std::endl
-     << indent << "Moving Transform: " << std::endl
-     << indent << this->m_MovingTransform << std::endl;
-  if( this->m_VirtualImage.IsNull() )
-    {
-    os << indent << "Virtual Image: NULL " << std::endl;
-    }
-  else
-    {
-    os << indent << "Virtual Image: " << std::endl
-       << indent << this->m_VirtualImage << std::endl;
-    }
+  os << indent << "ObjectToObjectMetric: " << std::endl;
+
+  itkPrintSelfObjectMacro( FixedTransform );
+  itkPrintSelfObjectMacro( MovingTransform );
+  itkPrintSelfObjectMacro( VirtualImage );
+
   os << indent << "m_UserHasSetVirtualDomain: " << this->m_UserHasSetVirtualDomain << std::endl
      << indent << "m_NumberOfValidPoints: " << this->m_NumberOfValidPoints << std::endl;
 }
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h
index f63090d..edcb145 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h
@@ -133,7 +133,7 @@ public:
   virtual NumberOfParametersType GetNumberOfParameters() const = 0;
   virtual NumberOfParametersType GetNumberOfLocalParameters() const = 0;
 
-  /** Set the active transform's parameters */
+  /** Set the active transform's parameters by value*/
   virtual void SetParameters( ParametersType & params ) = 0;
 
   /** Get a const reference to the active transform's parameters */
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h
index 475a0bc..d6b909f 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.h
@@ -19,6 +19,7 @@
 #define __itkObjectToObjectOptimizerBase_h
 
 #include "itkOptimizerParameters.h"
+#include "itkOptimizerParameterScalesEstimator.h"
 #include "itkObjectToObjectMetricBase.h"
 #include "itkIntTypes.h"
 
@@ -38,9 +39,12 @@ namespace itk
  * appropriate, typically by passing it to its transform that is
  * being optimized.
  *
- * SetScales() allows setting of a per-local-parameter scaling array.
- * The gradient of each local parameter is divided by the corresponding
- * scale. If unset, the \c m_Scales array will be initialized to all 1's.
+ * The user can scale each component of the gradient (derivative)
+ * at each iteration in one of two ways:
+ *
+ * 1) manually, by setting a scaling vector using method SetScales().
+ * SetScales() allows setting of a per-local-parameter scaling array. If
+ * unset, the \c m_Scales array will be initialized to all 1's.
  * Note that when used with transforms with local support, these scales
  * correspond to each _local_ parameter, and not to each parameter. For
  * example, in a DisplacementFieldTransform of dimensionality N, the Scales
@@ -48,6 +52,15 @@ namespace itk
  * transform's displacement field, and is applied to each vector in the
  * displacement field.
  *
+ * or,
+ *
+ * 2) automatically, by assigning a ScalesEstimator using SetScalesEstimator().
+ * When ScalesEstimator is assigned, the optimizer is enabled by default to
+ * estimate scales, and can be changed via SetDoEstimateScales(). The scales
+ * are estimated and assigned once, during the call to StartOptimization().
+ * This option will override any manually-assigned scales.
+ *
+ *
  * SetWeights() allows setting of a per-local-parameter weighting array.
  * If unset, the weights are treated as identity. Weights are multiplied
  * by the gradient at the same time scaling is applied. Weights are
@@ -63,7 +76,7 @@ namespace itk
  *
  * \ingroup ITKOptimizersv4
  */
-template< typename TInternalComputationValueType>
+template< typename TInternalComputationValueType = double>
 class ObjectToObjectOptimizerBaseTemplate : public Object
 {
 public:
@@ -77,7 +90,8 @@ public:
   itkTypeMacro(ObjectToObjectOptimizerBaseTemplate, Object);
 
   /**  Scale type. */
-  typedef OptimizerParameters< TInternalComputationValueType >          ScalesType;
+  typedef OptimizerParameters< TInternalComputationValueType >                      ScalesType;
+  typedef OptimizerParameterScalesEstimatorTemplate<TInternalComputationValueType>  ScalesEstimatorType;
 
   /**  Parameters type. */
   typedef OptimizerParameters< TInternalComputationValueType >          ParametersType;
@@ -86,12 +100,21 @@ public:
   typedef ObjectToObjectMetricBaseTemplate< TInternalComputationValueType >  MetricType;
   typedef typename MetricType::Pointer                                      MetricTypePointer;
 
+  /** Derivative type */
+  typedef typename MetricType::DerivativeType                DerivativeType;
+
   /** Number of parameters type */
   typedef typename MetricType::NumberOfParametersType        NumberOfParametersType;
 
   /** Measure type */
   typedef typename MetricType::MeasureType                   MeasureType;
 
+  /** Stop condition return string type */
+  typedef std::string         StopConditionReturnStringType;
+
+  /** Stop condition internal string type */
+  typedef std::ostringstream  StopConditionDescriptionType;
+
   /** Accessors for Metric */
   itkSetObjectMacro( Metric, MetricType );
   itkGetModifiableObjectMacro(Metric, MetricType );
@@ -109,7 +132,11 @@ public:
   virtual const MeasureType & GetValue() const;
 
   /** Set current parameters scaling. */
-  itkSetMacro( Scales, ScalesType );
+  //itkSetMacro( Scales, ScalesType );
+  virtual void SetScales(const ScalesType & scales)
+  {
+  this->m_Scales = scales;
+  }
 
   /** Get current parameters scaling. */
   itkGetConstReferenceMacro( Scales, ScalesType );
@@ -127,6 +154,30 @@ public:
   /** Get whether weights are identity. Cannot be set */
   itkGetConstReferenceMacro( WeightsAreIdentity, bool );
 
+  /** Get whether the scales have been set. Returns
+   *  true if <tt> m_Scales.Size() > 0 </tt> */
+  bool GetScalesInitialized( void ) const;
+
+  /** Set the scales estimator.
+   *
+   *  A ScalesEstimator is required for the scales estimation
+   *  options to work. See the main documentation.
+   *  Derived classes may also provide learning-rate estimation,
+   *  in which case a scales estimator is also required.
+   *
+   * \sa SetDoEstimateScales()
+   */
+  itkSetObjectMacro(ScalesEstimator, ScalesEstimatorType);
+
+  /** Option to use ScalesEstimator for scales estimation.
+   * The estimation is performed once at begin of
+   * optimization, and overrides any scales set using SetScales().
+   * Default is true.
+   */
+  itkSetMacro(DoEstimateScales, bool);
+  itkGetConstReferenceMacro(DoEstimateScales, bool);
+  itkBooleanMacro(DoEstimateScales);
+
   /** Set the number of threads to use when threading.
    * The default is the global default number of threads
    * returned from itkMultiThreader. */
@@ -135,6 +186,15 @@ public:
   /** Get the number of threads set to be used. */
   itkGetConstReferenceMacro( NumberOfThreads, ThreadIdType );
 
+  /** Return current number of iterations. */
+  itkGetConstMacro(CurrentIteration, SizeValueType);
+
+  /** Set the number of iterations. */
+  itkSetMacro(NumberOfIterations, SizeValueType);
+
+  /** Get the number of iterations. */
+  itkGetConstMacro(NumberOfIterations, SizeValueType);
+
   /** Get a reference to the current position of the optimization.
    * This returns the parameters from the assigned metric, since the optimizer
    * itself does not store a position. */
@@ -149,6 +209,9 @@ public:
    * perform any additional initialization before performing optimization. */
   virtual void StartOptimization( bool doOnlyInitialization = false );
 
+  /** Stop condition return string type */
+  virtual const StopConditionReturnStringType GetStopConditionDescription() const = 0;
+
 protected:
 
   /** Default constructor */
@@ -157,6 +220,8 @@ protected:
 
   MetricTypePointer             m_Metric;
   ThreadIdType                  m_NumberOfThreads;
+  SizeValueType                 m_CurrentIteration;
+  SizeValueType                 m_NumberOfIterations;
 
   /** Metric measure value at a given iteration, as most recently evaluated. */
   MeasureType                   m_CurrentMetricValue;
@@ -174,10 +239,18 @@ protected:
   /** Flag to avoid unnecessary arithmetic when scales are identity. */
   bool                          m_ScalesAreIdentity;
 
+  /** Scales estimator. Optionally provided by user. */
+  typename ScalesEstimatorType::Pointer m_ScalesEstimator;
+
   /** Flag to avoid unnecessary arithmetic when weights are identity. */
   bool                          m_WeightsAreIdentity;
 
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  /** Flag to control use of the ScalesEstimator (if set) for
+   * automatic scale estimation during StartOptimization()
+   */
+  bool                          m_DoEstimateScales;
+
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
 
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.hxx
index dfe3453..e730b93 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.hxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkObjectToObjectOptimizerBase.hxx
@@ -29,13 +29,16 @@ template<typename TInternalComputationValueType>
 ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
 ::ObjectToObjectOptimizerBaseTemplate()
 {
-  this->m_Metric = NULL;
+  this->m_Metric = ITK_NULLPTR;
+  this->m_CurrentIteration = 0;
+  this->m_NumberOfIterations = 100;
   this->m_CurrentMetricValue = 0;
   // Initialize, but w/out calling SetNumberOfThreads, to avoid
   // valgrind warning.
   this->m_NumberOfThreads = MultiThreader::GetGlobalDefaultNumberOfThreads();
   this->m_ScalesAreIdentity = false;
   this->m_WeightsAreIdentity = true;
+  this->m_DoEstimateScales = true;
 }
 
 //-------------------------------------------------------------------
@@ -54,13 +57,13 @@ ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
 
   os << indent << "Number of threads: " << this->m_NumberOfThreads << std::endl;
   os << indent << "Number of scales:  " << this->m_Scales.Size() << std::endl;
-  if( this->m_Scales.Size() > 0 )
+  if( this->GetScalesInitialized() )
     {
     os << indent << "m_Scales: " << this->m_Scales << std::endl;
     }
   else
     {
-    os << indent << "m_Scales is unset." << std::endl;
+    os << indent << "m_Scales: uninitialized." << std::endl;
     }
   os << indent << "m_ScalesAreIdentity: " << this->GetScalesAreIdentity() << std::endl;
   if( this->m_Weights.Size() > 0 )
@@ -72,8 +75,14 @@ ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
     os << indent << "m_Weights is unset. Treated as identity." << std::endl;
     }
   os << indent << "m_WeightsAreIdentity: " << this->GetWeightsAreIdentity() << std::endl;
-  os << indent << "Metric: " << std::endl;
-  m_Metric->Print( os, indent.GetNextIndent() );
+  itkPrintSelfObjectMacro( Metric );
+  itkPrintSelfObjectMacro( ScalesEstimator );
+  if ( this->m_CurrentIteration > 0 )
+    {
+    os << indent << "CurrentIteration: " << this->m_CurrentIteration << std::endl;
+    }
+  os << indent << "Number of iterations: " << this->m_NumberOfIterations  << std::endl;
+  os << indent << "DoEstimateScales: " << this->m_DoEstimateScales << std::endl;
 }
 
 //-------------------------------------------------------------------
@@ -106,9 +115,18 @@ ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
     return;
     }
 
+  /* Estimate the parameter scales if requested. */
+  if ( this->m_DoEstimateScales && this->m_ScalesEstimator.IsNotNull() )
+    {
+    ScalesType scales;
+    this->m_ScalesEstimator->EstimateScales( scales );
+    this->SetScales( scales );
+    itkDebugMacro( "Estimated scales = " << this->m_Scales );
+    }
+
   /* Verify m_Scales. If m_Scales hasn't been set, initialize to all 1's. */
   typedef typename ScalesType::ValueType     SValueType;
-  if( this->m_Scales.Size() > 0 )
+  if( this->GetScalesInitialized() )
     {
     if( this->m_Scales.Size() != this->m_Metric->GetNumberOfLocalParameters() )
       {
@@ -125,12 +143,12 @@ ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
       {
       if( this->m_Scales[i] <= NumericTraits<SValueType>::epsilon() )
         {
-        itkExceptionMacro("m_Scales values must be > epsilon.");
+        itkExceptionMacro("m_Scales values must be > epsilon." << this->m_Scales);
         }
       /* Check if the scales are identity. Consider to be identity if
        * within a tolerance, to allow for automatically estimated scales
        * that may not be exactly 1.0 when in priciniple they should be. */
-      SValueType difference = vcl_fabs( NumericTraits<SValueType>::OneValue() - this->m_Scales[i] );
+      SValueType difference = std::fabs( NumericTraits<SValueType>::OneValue() - this->m_Scales[i] );
       SValueType tolerance = static_cast<SValueType>( 0.01 );
       if( difference > tolerance  )
         {
@@ -161,7 +179,7 @@ ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
     this->m_WeightsAreIdentity = true;
     for( SizeType i=0; i < this->m_Weights.Size(); i++ )
       {
-      SValueType difference = vcl_fabs( NumericTraits<SValueType>::OneValue() - this->m_Weights[i] );
+      SValueType difference = std::fabs( NumericTraits<SValueType>::OneValue() - this->m_Weights[i] );
       SValueType tolerance = static_cast<SValueType>( 1e-4 );
       if( difference > tolerance  )
         {
@@ -199,6 +217,13 @@ ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
   return this->GetCurrentMetricValue();
 }
 
+template<typename TInternalComputationValueType>
+bool
+ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
+::GetScalesInitialized( void ) const
+{
+  return m_Scales.Size() > 0;
+}
 }//namespace itk
 
 #endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.h
new file mode 100644
index 0000000..0f62283
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.h
@@ -0,0 +1,216 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkOnePlusOneEvolutionaryOptimizerv4_h
+#define __itkOnePlusOneEvolutionaryOptimizerv4_h
+
+#include "itkObjectToObjectOptimizerBase.h"
+#include "itkRandomVariateGeneratorBase.h"
+#include <string>
+
+namespace itk
+{
+/** \class OnePlusOneEvolutionaryOptimizerv4
+ * \brief 1+1 evolutionary strategy optimizer
+ *
+ * This optimizer searches for the optimal parameters. It changes its search
+ * radius and position using the grow factor ,shrink factor, and isotropic
+ * probability function (which is a random unit normal variate generator).
+ *
+ * This optimizer needs a cost function and a random unit normal
+ * variate generator.
+ * The cost function should return cost with new position in parameter space
+ * which will be generated by 1+1 evolutionary strategy.
+ * Users should plug-in the random unit normal variate generator using
+ * SetNormalVariateGenerator method.
+ *
+ * The SetEpsilon method is the minimum value for the frobenius_norm of
+ * the covariance matrix. If the fnorm is smaller than this value,
+ * the optimization process will stop even before it hits the maximum
+ * iteration.
+ *
+ * Another way to stop the optimization process is calling the
+ * StopOptimization method. At next iteration after calling it, the
+ * optimization process will stop.
+ *
+ * This optimizing scheme was initially developed and implemented
+ * by Martin Styner, Univ. of North Carolina at Chapel Hill, and his
+ * colleagues.
+ *
+ * For more details. refer to the following articles.
+ * "Parametric estimate of intensity inhomogeneities applied to MRI"
+ * Martin Styner, G. Gerig, Christian Brechbuehler, Gabor Szekely,
+ * IEEE TRANSACTIONS ON MEDICAL IMAGING; 19(3), pp. 153-165, 2000,
+ * (http://www.cs.unc.edu/~styner/docs/tmi00.pdf)
+ *
+ * "Evaluation of 2D/3D bias correction with 1+1ES-optimization"
+ * Martin Styner, Prof. Dr. G. Gerig (IKT, BIWI, ETH Zuerich), TR-197
+ * (http://www.cs.unc.edu/~styner/docs/StynerTR97.pdf)
+ *
+ * \sa NormalVariateGenerator
+ * \ingroup ITKOptimizersv4
+ */
+
+template<typename TInternalComputationValueType>
+class OnePlusOneEvolutionaryOptimizerv4:
+  public ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
+{
+public:
+  /** Standard "Self" typedef. */
+  typedef OnePlusOneEvolutionaryOptimizerv4                                   Self;
+  typedef ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>  Superclass;
+  typedef SmartPointer< Self >                                                Pointer;
+  typedef SmartPointer< const Self >                                          ConstPointer;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(OnePlusOneEvolutionaryOptimizerv4, Superclass);
+
+  /** Type of the Cost Function   */
+  typedef  SingleValuedCostFunctionv4   CostFunctionType;
+  typedef  CostFunctionType::Pointer    CostFunctionPointer;
+
+  /** Normal random variate generator type. */
+  typedef Statistics::RandomVariateGeneratorBase NormalVariateGeneratorType;
+
+  /** Measure type */
+  typedef typename Superclass::MeasureType      MeasureType;
+
+  /** Parameters type */
+  typedef typename Superclass::ParametersType   ParametersType;
+
+  /** Scales type */
+  typedef typename Superclass::ScalesType       ScalesType;
+
+  /** Set/Get maximum iteration limit. */
+  itkSetMacro(MaximumIteration, unsigned int);
+  itkGetConstReferenceMacro(MaximumIteration, unsigned int);
+
+  /** Set/Get the search radius grow factor in parameter space. */
+  itkSetMacro(GrowthFactor, double);
+  itkGetConstReferenceMacro(GrowthFactor, double);
+
+  /** Set/Get the search radius shrink factor. */
+  itkSetMacro(ShrinkFactor, double);
+  itkGetConstReferenceMacro(ShrinkFactor, double);
+
+  /** Set/Get initial search radius in parameter space */
+  itkSetMacro(InitialRadius, double);
+  itkGetConstReferenceMacro(InitialRadius, double);
+
+  /** Set/Get the minimal size of search radius
+   * (frobenius_norm of covariance matrix). */
+  itkSetMacro(Epsilon, double);
+  itkGetConstReferenceMacro(Epsilon, double);
+
+  /** Get the current Frobenius norm of covariance matrix */
+  itkGetConstReferenceMacro(FrobeniusNorm, double);
+
+  void SetNormalVariateGenerator(NormalVariateGeneratorType *generator);
+
+  /** Initializes the optimizer.
+   * Before running this optimizer, this function should have been called.
+   *
+   * initialRadius: search radius in parameter space
+   * grow: search radius grow factor
+   * shrink: searhc radius shrink factor */
+  void Initialize(double initialRadius, double grow = -1, double shrink = -1);
+
+  /** Return Current Value */
+  itkGetConstReferenceMacro(CurrentCost, MeasureType);
+  virtual const MeasureType & GetValue() const ITK_OVERRIDE;
+
+  /** Return if optimizer has been initialized */
+  itkGetConstReferenceMacro(Initialized, bool);
+
+  /** Start optimization.
+   * Optimization will stop when it meets either of two termination conditions,
+   * the maximum iteration limit or epsilon (minimal search radius)  */
+  virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE;
+
+  /** when users call StartOptimization, this value will be set false.
+   * By calling StopOptimization, this flag will be set true, and
+   * optimization will stop at the next iteration. */
+  void StopOptimization()
+  { m_Stop = true; }
+
+  itkGetConstReferenceMacro(CatchGetValueException, bool);
+  itkSetMacro(CatchGetValueException, bool);
+
+  itkGetConstReferenceMacro(MetricWorstPossibleValue, double);
+  itkSetMacro(MetricWorstPossibleValue, double);
+
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
+
+protected:
+  OnePlusOneEvolutionaryOptimizerv4();
+  OnePlusOneEvolutionaryOptimizerv4(const OnePlusOneEvolutionaryOptimizerv4 &);
+  virtual ~OnePlusOneEvolutionaryOptimizerv4();
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
+
+private:
+
+  /** Smart pointer to the normal random variate generator. */
+  NormalVariateGeneratorType::Pointer m_RandomGenerator;
+
+  /** Maximum iteration limit. */
+  unsigned int m_MaximumIteration;
+
+  bool   m_CatchGetValueException;
+  double m_MetricWorstPossibleValue;
+
+  /** The minimal size of search radius
+   * (frobenius_norm of covariance matrix). */
+  double m_Epsilon;
+
+  /** Initial search radius in parameter space. */
+  double m_InitialRadius;
+
+  /** Search radius growth factor in parameter space. */
+  double m_GrowthFactor;
+
+  /** Search radius shrink factor in parameter space, */
+  double m_ShrinkFactor;
+
+  /** Flag tells if the optimizer was initialized using Initialize function. */
+  bool m_Initialized;
+
+  /** Internal storage for the value type / used as a cache  */
+  MeasureType m_CurrentCost;
+
+  /** This is user-settable flag to stop optimization.
+   * when users call StartOptimization, this value will be set false.
+   * By calling StopOptimization, this flag will be set true, and
+   * optimization will stop at the next iteration. */
+  bool m_Stop;
+
+  /** Stop description */
+  std::ostringstream m_StopConditionDescription;
+
+  /** Cache variable for reporting the Frobenius Norm
+   */
+  double m_FrobeniusNorm;
+}; // end of class
+} // end of namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "itkOnePlusOneEvolutionaryOptimizerv4.hxx"
+#endif
+
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx
new file mode 100644
index 0000000..0e3425c
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx
@@ -0,0 +1,337 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkOnePlusOneEvolutionaryOptimizerv4_hxx
+#define __itkOnePlusOneEvolutionaryOptimizerv4_hxx
+
+#include "itkOnePlusOneEvolutionaryOptimizerv4.h"
+#include "vnl/vnl_matrix.h"
+namespace itk
+{
+template<typename TInternalComputationValueType>
+OnePlusOneEvolutionaryOptimizerv4<TInternalComputationValueType>
+::OnePlusOneEvolutionaryOptimizerv4()
+{
+  m_CatchGetValueException = false;
+  m_MetricWorstPossibleValue = 0;
+
+  m_Epsilon = (double)1.5e-4;
+  m_RandomGenerator = ITK_NULLPTR;
+
+  m_Initialized = false;
+  m_GrowthFactor = 1.05;
+  m_ShrinkFactor = std::pow(m_GrowthFactor, -0.25);
+  m_InitialRadius = 1.01;
+  m_MaximumIteration = 100;
+  m_Stop = false;
+  m_StopConditionDescription.str("");
+  m_CurrentCost = 0;
+  m_FrobeniusNorm = 0.0;
+}
+
+template<typename TInternalComputationValueType>
+OnePlusOneEvolutionaryOptimizerv4<TInternalComputationValueType>
+::~OnePlusOneEvolutionaryOptimizerv4()
+{}
+
+template<typename TInternalComputationValueType>
+void
+OnePlusOneEvolutionaryOptimizerv4<TInternalComputationValueType>
+::SetNormalVariateGenerator(NormalVariateGeneratorType *generator)
+{
+  if ( m_RandomGenerator != generator )
+    {
+    m_RandomGenerator = generator;
+    this->Modified();
+    }
+}
+
+template<typename TInternalComputationValueType>
+void
+OnePlusOneEvolutionaryOptimizerv4<TInternalComputationValueType>
+::Initialize(double initialRadius, double grow, double shrink)
+{
+  m_InitialRadius = initialRadius;
+
+  if ( grow == -1 )
+    {
+    m_GrowthFactor = 1.05;
+    }
+  else
+    {
+    m_GrowthFactor = grow;
+    }
+  if ( shrink == -1 )
+    {
+    m_ShrinkFactor = std::pow(m_GrowthFactor, -0.25);
+    }
+  else
+    {
+    m_ShrinkFactor = shrink;
+    }
+}
+
+template<typename TInternalComputationValueType>
+void
+OnePlusOneEvolutionaryOptimizerv4<TInternalComputationValueType>
+::StartOptimization(bool /* doOnlyInitialization */)
+{
+  if ( this->m_Metric.IsNull() )
+    {
+    return;
+    }
+
+  Superclass::StartOptimization();
+
+  this->InvokeEvent( StartEvent() );
+  m_Stop = false;
+
+  unsigned int         spaceDimension = this->m_Metric->GetNumberOfParameters();
+  vnl_matrix< double > A(spaceDimension, spaceDimension);
+  vnl_vector< double > parent( this->m_Metric->GetParameters() );
+  vnl_vector< double > f_norm(spaceDimension);
+  vnl_vector< double > child(spaceDimension);
+  vnl_vector< double > delta(spaceDimension);
+
+  ParametersType parentPosition(spaceDimension);
+  ParametersType childPosition(spaceDimension);
+
+  for ( unsigned int i = 0; i < spaceDimension; i++ )
+    {
+    parentPosition[i] = parent[i];
+    }
+  this->m_Metric->SetParameters( parentPosition );
+
+  double pvalue = m_MetricWorstPossibleValue;
+  try
+    {
+    pvalue = this->m_Metric->GetValue();
+    }
+  catch ( ... )
+    {
+    if ( m_CatchGetValueException )
+      {
+      pvalue = m_MetricWorstPossibleValue;
+      }
+    else
+      {
+      throw;
+      }
+    }
+
+  itkDebugMacro(<< ": initial position: " << parentPosition);
+  itkDebugMacro(<< ": initial fitness: " << pvalue);
+
+  this->m_Metric->SetParameters(parentPosition);
+  const ScalesType & scales = this->GetScales();
+
+  // Make sure the scales have been set properly
+  if ( scales.size() != spaceDimension )
+    {
+    itkExceptionMacro(<< "The size of Scales is "
+                      << scales.size()
+                      << ", but the NumberOfParameters for the CostFunction is "
+                      << spaceDimension
+                      << ".");
+    }
+
+  A.set_identity();
+  for ( unsigned int i = 0; i < spaceDimension; i++ )
+    {
+    A(i, i) = m_InitialRadius / scales[i];
+    }
+  this->m_CurrentIteration = 0;
+
+  for ( unsigned int iter = 0; iter < m_MaximumIteration; iter++ )
+    {
+    if ( m_Stop )
+      {
+      m_StopConditionDescription.str("");
+      m_StopConditionDescription << this->GetNameOfClass() << ": ";
+      m_StopConditionDescription << "StopOptimization() called";
+      break;
+      }
+
+    ++this->m_CurrentIteration;
+
+    for ( unsigned int i = 0; i < spaceDimension; i++ )
+      {
+      if ( !m_RandomGenerator )
+        {
+        itkExceptionMacro(<< "Random Generator is not set!");
+        }
+      f_norm[i] = m_RandomGenerator->GetVariate();
+      }
+
+    delta  = A * f_norm;
+    child  = parent + delta;
+
+    for ( unsigned int i = 0; i < spaceDimension; i++ )
+      {
+      childPosition[i] = child[i];
+      }
+    // Update the metric so we can check the metric value in childPosition
+    this->m_Metric->SetParameters( childPosition );
+
+    double cvalue = m_MetricWorstPossibleValue;
+    try
+      {
+      cvalue = this->m_Metric->GetValue();
+      // While we got the metric value in childPosition,
+      // the metric paramteres are set back to parentPosition
+      this->m_Metric->SetParameters( parentPosition );
+      }
+    catch ( ... )
+      {
+      if ( m_CatchGetValueException )
+        {
+        cvalue = m_MetricWorstPossibleValue;
+        }
+      else
+        {
+        throw;
+        }
+      }
+
+    itkDebugMacro(<< "iter: " << iter << ": parent position: "
+                  << parentPosition);
+    itkDebugMacro(<< "iter: " << iter << ": parent fitness: "
+                  << pvalue);
+    itkDebugMacro(<< "iter: " << iter << ": random vector: " << f_norm);
+    itkDebugMacro(<< "iter: " << iter << ": A: " << std::endl << A);
+    itkDebugMacro(<< "iter: " << iter << ": delta: " << delta);
+    itkDebugMacro(<< "iter: " << iter << ": child position: "
+                  << childPosition);
+    itkDebugMacro(<< "iter: " << iter << ": child fitness: "
+                  << cvalue);
+
+    double adjust = m_ShrinkFactor;
+
+    if ( cvalue < pvalue )
+      {
+      itkDebugMacro(<< "iter: " << iter << ": increasing search radius");
+      pvalue = cvalue;
+      parent.swap(child);
+      adjust = m_GrowthFactor;
+      for ( unsigned int i = 0; i < spaceDimension; i++ )
+        {
+        parentPosition[i] = parent[i];
+        }
+      this->m_Metric->SetParameters(parentPosition);
+      }
+    else
+      {
+      itkDebugMacro(<< "iter: " << iter << ": decreasing search radius");
+      }
+
+    m_CurrentCost = pvalue;
+    // convergence criterion: f-norm of A < epsilon_A
+    // Compute double precision sum of absolute values of
+    // a single precision vector
+    m_FrobeniusNorm = A.fro_norm();
+    itkDebugMacro(<< "A f-norm:" << m_FrobeniusNorm);
+    if ( m_FrobeniusNorm <= m_Epsilon )
+      {
+      itkDebugMacro(<< "converges at iteration = " << iter);
+      m_StopConditionDescription.str("");
+      m_StopConditionDescription << this->GetNameOfClass() << ": ";
+      m_StopConditionDescription << "Fnorm (" << m_FrobeniusNorm
+                                 << ") is less than Epsilon (" << m_Epsilon
+                                 << " at iteration #" << iter;
+      this->InvokeEvent( EndEvent() );
+      return;
+      }
+
+    // A += (adjust - 1)/ (f_norm * f_norm) * A * f_norm * f_norm;
+    // Blas_R1_Update(A, A * f_norm, f_norm,
+    //             ((adjust - 1) / Blas_Dot_Prod(f_norm, f_norm)));
+    // = DGER(Fortran)
+    //   performs the rank 1 operation
+    // A := alpha*x*y' + A,
+    // where y' = transpose(y)
+    // where alpha is a scalar, x is an m element vector, y is an n element
+    // vector and A is an m by n matrix.
+    // x = A * f_norm , y = f_norm, alpha = (adjust - 1) / Blas_Dot_Prod(
+    // f_norm, f_norm)
+
+    //A = A + (adjust - 1.0) * A;
+    double alpha = ( ( adjust - 1.0 ) / dot_product(f_norm, f_norm) );
+    for ( unsigned int c = 0; c < spaceDimension; c++ )
+      {
+      for ( unsigned int r = 0; r < spaceDimension; r++ )
+        {
+        A(r, c) += alpha * delta[r] * f_norm[c];
+        }
+      }
+
+    this->InvokeEvent( IterationEvent() );
+    itkDebugMacro( << "Current position: " << this->GetCurrentPosition() );
+    }
+  m_StopConditionDescription.str("");
+  m_StopConditionDescription << this->GetNameOfClass() << ": ";
+  m_StopConditionDescription << "Maximum number of iterations ("
+                             << m_MaximumIteration
+                             << ") exceeded. ";
+  this->InvokeEvent( EndEvent() );
+}
+
+template<typename TInternalComputationValueType>
+const std::string
+OnePlusOneEvolutionaryOptimizerv4<TInternalComputationValueType>
+::GetStopConditionDescription() const
+{
+  return m_StopConditionDescription.str();
+}
+
+template<typename TInternalComputationValueType>
+const typename OnePlusOneEvolutionaryOptimizerv4<TInternalComputationValueType>::MeasureType &
+OnePlusOneEvolutionaryOptimizerv4<TInternalComputationValueType>
+::GetValue() const
+{
+  return this->GetCurrentCost();
+}
+
+template<typename TInternalComputationValueType>
+void
+OnePlusOneEvolutionaryOptimizerv4<TInternalComputationValueType>
+::PrintSelf(std::ostream & os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  if ( m_RandomGenerator )
+    {
+    os << indent << "Random Generator  " << m_RandomGenerator.GetPointer()  << std::endl;
+    }
+  else
+    {
+    os << indent << "Random Generator  " << "(none)" << std::endl;
+    }
+  os << indent << "Maximum Iteration " << GetMaximumIteration() << std::endl;
+  os << indent << "Epsilon           " << GetEpsilon()          << std::endl;
+  os << indent << "Initial Radius    " << GetInitialRadius()    << std::endl;
+  os << indent << "Growth Fractor    " << GetGrowthFactor()     << std::endl;
+  os << indent << "Shrink Fractor    " << GetShrinkFactor()     << std::endl;
+  os << indent << "Initialized       " << GetInitialized()      << std::endl;
+  os << indent << "Current Cost      " << GetCurrentCost()      << std::endl;
+  os << indent << "Frobenius Norm    " << GetFrobeniusNorm()    << std::endl;
+  os << indent << "CatchGetValueException   " << GetCatchGetValueException()
+     << std::endl;
+  os << indent << "MetricWorstPossibleValue " << GetMetricWorstPossibleValue()
+     << std::endl;
+}
+} // end of namespace itk
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkOptimizerParameterScalesEstimator.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkOptimizerParameterScalesEstimator.h
index 11a3552..3bc34c9 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkOptimizerParameterScalesEstimator.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkOptimizerParameterScalesEstimator.h
@@ -20,7 +20,7 @@
 
 #include "itkObject.h"
 #include "itkObjectFactory.h"
-#include "itkObjectToObjectOptimizerBase.h"
+#include "itkOptimizerParameters.h"
 
 namespace itk
 {
@@ -48,11 +48,12 @@ public:
   itkTypeMacro( OptimizerParameterScalesEstimatorTemplate, Object );
 
   /** Type of scales */
-  typedef typename ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>::ScalesType        ScalesType;
+  typedef OptimizerParameters<TInternalComputationValueType> ScalesType;
   /** Type of parameters of the optimizer */
-  typedef typename ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>::ParametersType    ParametersType;
+  typedef OptimizerParameters<TInternalComputationValueType> ParametersType;
+
   /** Type of float */
-  typedef TInternalComputationValueType                                                                  FloatType;
+  typedef TInternalComputationValueType FloatType;
 
   /** Estimate parameter scales. */
   virtual void EstimateScales(ScalesType &scales) = 0;
@@ -71,7 +72,7 @@ protected:
   OptimizerParameterScalesEstimatorTemplate(){};
   ~OptimizerParameterScalesEstimatorTemplate(){};
 
-  void PrintSelf(std::ostream &os, Indent indent) const
+  virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
     {
     Superclass::PrintSelf(os,indent);
     }
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.h
new file mode 100644
index 0000000..408ef73
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.h
@@ -0,0 +1,245 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkPowellOptimizerv4_h
+#define __itkPowellOptimizerv4_h
+
+#include "itkVector.h"
+#include "itkMatrix.h"
+#include "itkObjectToObjectOptimizerBase.h"
+
+namespace itk
+{
+/** \class PowellOptimizerv4
+ * \brief Implements Powell optimization using Brent line search.
+ *
+ * The code in this class was adapted from the Wikipedia and the
+ * netlib.org zeroin function.
+ *
+ * http://www.netlib.org/go/zeroin.f
+ * http://en.wikipedia.org/wiki/Brent_method
+ * http://en.wikipedia.org/wiki/Golden_section_search
+ *
+ * This optimizer needs a cost function.
+ * Partial derivatives of that function are not required.
+ *
+ * For an N-dimensional parameter space, each iteration minimizes
+ * the function in N (initially orthogonal) directions.  Typically only 2-5
+ * iterations are required.   If gradients are available, consider a conjugate
+ * gradient line search strategy.
+ *
+ * The SetStepLength determines the initial distance to step in a line direction
+ * when bounding the minimum (using bracketing triple spaced using a golden
+ * search strategy).
+ *
+ * The StepTolerance terminates optimization when the parameter values are
+ * known to be within this (scaled) distance of the local extreme.
+ *
+ * The ValueTolerance terminates optimization when the cost function values at
+ * the current parameters and at the local extreme are likely (within a second
+ * order approximation) to be within this is tolerance.
+ *
+ * \ingroup ITKOptimizersv4
+ */
+template<typename TInternalComputationValueType>
+class PowellOptimizerv4:
+  public ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>
+{
+public:
+  /** Standard "Self" typedef. */
+  typedef PowellOptimizerv4                                                   Self;
+  typedef ObjectToObjectOptimizerBaseTemplate<TInternalComputationValueType>  Superclass;
+  typedef SmartPointer< Self >                                                Pointer;
+  typedef SmartPointer< const Self >                                          ConstPointer;
+
+  /** Method for creation through the object factory. */
+  itkNewMacro(Self);
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(PowellOptimizerv4, Superclass);
+
+  typedef typename Superclass::ParametersType     ParametersType;
+  typedef typename Superclass::MeasureType        MeasureType;
+  typedef typename Superclass::ScalesType         ScalesType;
+
+  /** Set/Get maximum iteration limit. */
+  itkSetMacro(MaximumIteration, unsigned int);
+  itkGetConstReferenceMacro(MaximumIteration, unsigned int);
+
+  /** Set/Get the maximum number of line search iterations */
+  itkSetMacro(MaximumLineIteration, unsigned int);
+  itkGetConstMacro(MaximumLineIteration, unsigned int);
+
+  /** Set/Get StepLength for the (scaled) spacing of the sampling of
+   * parameter space while bracketing the extremum */
+  itkSetMacro(StepLength, double);
+  itkGetConstReferenceMacro(StepLength, double);
+
+  /** Set/Get StepTolerance.  Once the local extreme is known to be within this
+   * distance of the current parameter values, optimization terminates */
+  itkSetMacro(StepTolerance, double);
+  itkGetConstReferenceMacro(StepTolerance, double);
+
+  /** Set/Get ValueTolerance.  Once this current cost function value is known
+   * to be within this tolerance of the cost function value at the local
+   * extreme, optimization terminates */
+  itkSetMacro(ValueTolerance, double);
+  itkGetConstReferenceMacro(ValueTolerance, double);
+
+  /** Return Current Value */
+  itkGetConstReferenceMacro(CurrentCost, MeasureType);
+  virtual const MeasureType & GetValue() const { return this->GetCurrentCost(); }
+
+  /** Get the current line search iteration */
+  itkGetConstReferenceMacro(CurrentLineIteration, unsigned int);
+
+  /** Start optimization. */
+  virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE;
+
+  /** When users call StartOptimization, this value will be set false.
+   * By calling StopOptimization, this flag will be set true, and
+   * optimization will stop at the next iteration. */
+  void StopOptimization()
+  { m_Stop = true; }
+
+  itkGetConstReferenceMacro(CatchGetValueException, bool);
+  itkSetMacro(CatchGetValueException, bool);
+
+  itkGetConstReferenceMacro(MetricWorstPossibleValue, double);
+  itkSetMacro(MetricWorstPossibleValue, double);
+
+  virtual const std::string GetStopConditionDescription() const ITK_OVERRIDE;
+
+protected:
+  PowellOptimizerv4();
+  PowellOptimizerv4(const PowellOptimizerv4 &);
+  virtual ~PowellOptimizerv4();
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
+
+  itkSetMacro(CurrentCost, double);
+
+  /** Used to specify the line direction through the n-dimensional parameter
+   * space the is currently being bracketed and optimized. */
+  void SetLine(const ParametersType & origin,
+               const vnl_vector< double > & direction);
+
+  /** Get the value of the n-dimensional cost function at this scalar step
+   * distance along the current line direction from the current line origin.
+   * Line origin and distances are set via SetLine */
+  double GetLineValue(double x) const;
+
+  double GetLineValue(double x, ParametersType & tempCoord) const;
+
+  /** Set the given scalar step distance (x) and function value (fx) as the
+   * "best-so-far" optimizer values. */
+  void   SetCurrentLinePoint(double x, double fx);
+
+  /** Used in bracketing the extreme along the current line.
+   * Adapted from NRC */
+  void   Swap(double *a, double *b) const;
+
+  /** Used in bracketing the extreme along the current line.
+   * Adapted from NRC */
+  void   Shift(double *a, double *b, double *c, double d) const;
+
+  /** The LineBracket routine from NRC. Later reimplemented from the description
+   * of the method available in the Wikipedia.
+   *
+   * Uses current origin and line direction (from SetLine) to find a triple of
+   * points (ax, bx, cx) that bracket the extreme "near" the origin.  Search
+   * first considers the point StepLength distance from ax.
+   *
+   * IMPORTANT: The value of ax and the value of the function at ax (i.e., fa),
+   * must both be provided to this function. */
+  virtual void   LineBracket(double *ax, double *bx, double *cx,
+                             double *fa, double *fb, double *fc);
+
+  virtual void   LineBracket(double *ax, double *bx, double *cx,
+                             double *fa, double *fb, double *fc,
+                             ParametersType & tempCoord);
+
+  /** Given a bracketing triple of points and their function values, returns
+   * a bounded extreme.  These values are in parameter space, along the
+   * current line and wrt the current origin set via SetLine.   Optimization
+   * terminates based on MaximumIteration, StepTolerance, or ValueTolerance.
+   * Implemented as Brent line optimers from NRC.  */
+  virtual void   BracketedLineOptimize(double ax, double bx, double cx,
+                                       double fa, double fb, double fc,
+                                       double *extX, double *extVal);
+
+  virtual void   BracketedLineOptimize(double ax, double bx, double cx,
+                                       double fa, double fb, double fc,
+                                       double *extX, double *extVal,
+                                       ParametersType & tempCoord);
+
+  itkGetMacro(SpaceDimension, unsigned int);
+  void SetSpaceDimension(unsigned int dim)
+  {
+    this->m_SpaceDimension = dim;
+    this->m_LineDirection.set_size(dim);
+    this->m_LineOrigin.set_size(dim);
+    this->m_CurrentPosition.set_size(dim);
+    this->Modified();
+  }
+
+  itkSetMacro(CurrentIteration, unsigned int);
+
+  itkGetMacro(Stop, bool);
+  itkSetMacro(Stop, bool);
+
+private:
+  unsigned int m_SpaceDimension;
+
+  /** Current iteration */
+  unsigned int m_CurrentLineIteration;
+
+  /** Maximum iteration limit. */
+  unsigned int m_MaximumIteration;
+  unsigned int m_MaximumLineIteration;
+
+  bool   m_CatchGetValueException;
+  double m_MetricWorstPossibleValue;
+
+  /** The minimal size of search */
+  double m_StepLength;
+  double m_StepTolerance;
+
+  ParametersType       m_LineOrigin;
+  vnl_vector< double > m_LineDirection;
+
+  double m_ValueTolerance;
+
+  /** Internal storage for the value type / used as a cache  */
+  MeasureType m_CurrentCost;
+
+  /** this is user-settable flag to stop optimization.
+   * when users call StartOptimization, this value will be set false.
+   * By calling StopOptimization, this flag will be set true, and
+   * optimization will stop at the next iteration. */
+  bool m_Stop;
+
+  ParametersType m_CurrentPosition;
+
+  std::ostringstream m_StopConditionDescription;
+}; // end of class
+} // end of namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "itkPowellOptimizerv4.hxx"
+#endif
+
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.hxx
new file mode 100644
index 0000000..1903615
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkPowellOptimizerv4.hxx
@@ -0,0 +1,582 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkPowellOptimizerv4_hxx
+#define __itkPowellOptimizerv4_hxx
+
+#include "itkPowellOptimizerv4.h"
+
+namespace itk
+{
+template<typename TInternalComputationValueType>
+PowellOptimizerv4<TInternalComputationValueType>
+::PowellOptimizerv4():
+  m_SpaceDimension(0),
+  m_CurrentLineIteration(0),
+  m_MaximumIteration(100),
+  m_MaximumLineIteration(100),
+  m_CatchGetValueException(false),
+  m_MetricWorstPossibleValue(0),
+  m_StepLength(0),
+  m_StepTolerance(0),
+  m_ValueTolerance(0),
+  m_CurrentCost(0),
+  m_Stop(false)
+{
+  m_StopConditionDescription << this->GetNameOfClass() << ": ";
+}
+
+template<typename TInternalComputationValueType>
+PowellOptimizerv4<TInternalComputationValueType>
+::~PowellOptimizerv4()
+{}
+
+template<typename TInternalComputationValueType>
+void
+PowellOptimizerv4<TInternalComputationValueType>
+::SetLine(const ParametersType & origin,
+          const vnl_vector< double > & direction)
+{
+  const ScalesType & scales = this->GetScales();
+  for ( unsigned int i = 0; i < m_SpaceDimension; ++i )
+    {
+    m_LineOrigin[i] = origin[i];
+    if( this->GetScalesAreIdentity() )
+      {
+      m_LineDirection[i] = direction[i];
+      }
+    else
+      {
+      m_LineDirection[i] = direction[i] / scales[i];
+      }
+    }
+}
+
+template<typename TInternalComputationValueType>
+double
+PowellOptimizerv4<TInternalComputationValueType>
+::GetLineValue(double x) const
+{
+  ParametersType tempCoord(m_SpaceDimension);
+
+  return this->GetLineValue(x, tempCoord);
+}
+
+template<typename TInternalComputationValueType>
+double
+PowellOptimizerv4<TInternalComputationValueType>
+::GetLineValue(double x, ParametersType & tempCoord) const
+{
+  for ( unsigned int i = 0; i < m_SpaceDimension; i++ )
+    {
+    tempCoord[i] = this->m_LineOrigin[i] + x * this->m_LineDirection[i];
+    }
+  this->m_Metric->SetParameters(tempCoord);
+  itkDebugMacro(<< "x = " << x);
+  double val;
+  try
+    {
+    val = ( this->m_Metric->GetValue() );
+    }
+  catch ( ... )
+    {
+    if ( m_CatchGetValueException )
+      {
+      val = m_MetricWorstPossibleValue;
+      }
+    else
+      {
+      throw;
+      }
+    }
+  itkDebugMacro(<< "val = " << val);
+  return val;
+}
+
+template<typename TInternalComputationValueType>
+void
+PowellOptimizerv4<TInternalComputationValueType>
+::SetCurrentLinePoint(double x, double fx)
+{
+  for ( unsigned int i = 0; i < m_SpaceDimension; i++ )
+    {
+    this->m_CurrentPosition[i] = this->m_LineOrigin[i] + x * this->m_LineDirection[i];
+    }
+  this->m_Metric->SetParameters(m_CurrentPosition);
+  this->SetCurrentCost(fx);
+  this->Modified();
+}
+
+template<typename TInternalComputationValueType>
+void
+PowellOptimizerv4<TInternalComputationValueType>
+::Swap(double *a, double  *b) const
+{
+  double tf;
+
+  tf = *a;
+  *a = *b;
+  *b = tf;
+}
+
+template<typename TInternalComputationValueType>
+void
+PowellOptimizerv4<TInternalComputationValueType>
+::Shift(double *a, double *b, double *c, double d) const
+{
+  *a = *b;
+  *b = *c;
+  *c = d;
+}
+
+//
+// This code was implemented from the description of
+// the Golden section search available in the Wikipedia
+//
+// http://en.wikipedia.org/wiki/Golden_section_search
+//
+//
+// The inputs to this function are
+//
+// x1 and its function value f1
+// x2
+//
+// (f2 is not yet evaluated, it will be computed inside)
+// (x2 and its function value f3 are also computed inside)
+//
+// The outputs are the values of x2 and f2 at
+// the end of the iterations.
+//
+template<typename TInternalComputationValueType>
+void
+PowellOptimizerv4<TInternalComputationValueType>
+::LineBracket(double *x1, double *x2, double *x3,
+              double *f1, double *f2, double *f3)
+{
+  ParametersType tempCoord(m_SpaceDimension);
+
+  this->LineBracket(x1, x2, x3, f1, f2, f3, tempCoord);
+}
+
+template<typename TInternalComputationValueType>
+void
+PowellOptimizerv4<TInternalComputationValueType>
+::LineBracket(double *x1, double *x2, double *x3,
+              double *f1, double *f2, double *f3,
+              ParametersType & tempCoord)
+{
+  //
+  // Compute the golden ratio as a constant to be
+  // used when extrapolating the bracket
+  //
+  const double goldenRatio = ( 1.0 + std::sqrt(5.0) ) / 2.0;
+
+  //
+  // Get the value of the function for point x2
+  //
+  *f2 = this->GetLineValue(*x2, tempCoord);
+
+  //
+  // Compute extrapolated point using the golden ratio
+  //
+  if ( *f2 >= *f1 )
+    {
+    this->Swap(x1, x2);
+    this->Swap(f1, f2);
+    }
+
+  // compute x3 on the side of x2
+  *x3 = *x1 + goldenRatio * ( *x2 - *x1 );
+  *f3 = this->GetLineValue(*x3, tempCoord);
+
+  // If the new point is a minimum
+  // then continue extrapolating in
+  // that direction until we find a
+  // value of f3 that makes f2 to be
+  // a minimum.
+  while ( *f3 < *f2 )
+    {
+    *x2 = *x3;
+    *f2 = *f3;
+    *x3 = *x1 + goldenRatio * ( *x2 - *x1 );
+    *f3 = this->GetLineValue(*x3, tempCoord);
+    }
+
+  itkDebugMacro(<< "Initial: " << *x1 << ", " << *x2 << ", " << *x3);
+  //
+  // Report the central point as the minimum
+  //
+  this->SetCurrentLinePoint(*x2, *f2);
+}
+
+template<typename TInternalComputationValueType>
+void
+PowellOptimizerv4<TInternalComputationValueType>
+::BracketedLineOptimize(double ax, double bx, double cx,
+                        double fa, double functionValueOfb, double fc,
+                        double *extX, double *extVal)
+{
+  ParametersType tempCoord(m_SpaceDimension);
+
+  this->BracketedLineOptimize(ax, bx, cx, fa, functionValueOfb, fc, extX, extVal, tempCoord);
+}
+
+template<typename TInternalComputationValueType>
+void
+PowellOptimizerv4<TInternalComputationValueType>
+::BracketedLineOptimize(double ax, double bx, double cx,
+                        double itkNotUsed(fa), double functionValueOfb, double itkNotUsed(fc),
+                        double *extX, double *extVal,
+                        ParametersType & tempCoord)
+{
+  double x;
+  double v = 0.0;
+  double w;        /* Abscissae, descr. see above  */
+  double a;
+  double b;
+
+  a = ( ax < cx ? ax : cx );
+  b = ( ax > cx ? ax : cx );
+
+  x = bx;
+  w = bx;
+
+  const double goldenSectionRatio = ( 3.0 - std::sqrt(5.0) ) / 2;  /* Gold
+                                                                    section
+                                                                    ratio    */
+  const double POWELL_TINY = 1.0e-20;
+
+  double functionValueOfX;        /* f(x)        */
+  double functionValueOfV;        /* f(v)        */
+  double functionValueOfW;        /* f(w)        */
+
+  functionValueOfV   =    functionValueOfb;
+  functionValueOfX   =    functionValueOfV;
+  functionValueOfW   =    functionValueOfV;
+
+  for ( m_CurrentLineIteration = 0;
+        m_CurrentLineIteration < m_MaximumLineIteration;
+        m_CurrentLineIteration++ )
+    {
+    double middle_range = ( a + b ) / 2;
+
+    double new_step;          /* Step at this iteration       */
+
+    double tolerance1;
+    double tolerance2;
+
+    tolerance1 = m_StepTolerance * std::fabs(x) + POWELL_TINY;
+    tolerance2 = 2.0 * tolerance1;
+
+    if ( std::fabs(x - middle_range) <= ( tolerance2 - 0.5 * ( b - a ) )
+         || 0.5 * ( b - a ) < m_StepTolerance )
+      {
+      *extX = x;
+      *extVal = functionValueOfX;
+      this->SetCurrentLinePoint(x, functionValueOfX);
+      itkDebugMacro(<< "x = " << *extX);
+      itkDebugMacro(<< "val = " << *extVal);
+      itkDebugMacro(<< "return 1");
+      return;        /* Acceptable approx. is found  */
+      }
+
+    /* Obtain the gold section step  */
+    new_step = goldenSectionRatio * ( x < middle_range ? b - x : a - x );
+
+    /* Decide if the interpolation can be tried  */
+    if ( std::fabs(x - w) >= tolerance1  )    /* If x and w are distinct      */
+      {
+      double t;
+      t = ( x - w ) * ( functionValueOfX - functionValueOfV );
+
+      double q;    /* ted as p/q; division operation*/
+      q = ( x - v ) * ( functionValueOfX - functionValueOfW );
+
+      double p;     /* Interpolation step is calcula-*/
+      p = ( x - v ) * q - ( x - w ) * t;
+
+      q = 2 * ( q - t );
+
+      if ( q > (double)0 )    /* q was calculated with the op-*/
+        {
+        p = -p;      /* posite sign; make q positive  */
+        }
+      else        /* and assign possible minus to  */
+        {
+        q = -q;      /* p        */
+        }
+
+      /* Chec if x+p/q falls in [a,b] and  not too close to a and b
+           and isn't too large */
+      if ( std::fabs(p) < std::fabs(new_step * q)
+           && p > q * ( a - x + 2 * tolerance1 )
+           && p < q * ( b - x - 2 * tolerance1 ) )
+        {
+        new_step = p / q;      /* it is accepted         */
+        }
+
+      /* If p/q is too large then the  gold section procedure can
+         reduce [a,b] range to more  extent      */
+      }
+
+    /* Adjust the step to be not less than tolerance*/
+    if ( std::fabs(new_step) < tolerance1 )
+      {
+      if ( new_step > 0.0 )
+        {
+        new_step = tolerance1;
+        }
+      else
+        {
+        new_step = -tolerance1;
+        }
+      }
+
+    /* Obtain the next approximation to min  */
+    /* and reduce the enveloping range  */
+    double t = x + new_step;  /* Tentative point for the min  */
+
+    double functionValueOft;
+
+    functionValueOft = this->GetLineValue(t, tempCoord);
+
+    if ( functionValueOft <= functionValueOfX )
+      {
+      if ( t < x )      /* Reduce the range so that  */
+        {
+        b = x;        /* t would fall within it  */
+        }
+      else
+        {
+        a = x;
+        }
+
+      /* assing the best approximation to x */
+      v = w;
+      w = x;
+      x = t;
+
+      functionValueOfV = functionValueOfW;
+      functionValueOfW = functionValueOfX;
+      functionValueOfX = functionValueOft;
+      }
+    else                              /* x remains the better approx  */
+      {
+      if ( t < x )      /* Reduce the range enclosing x  */
+        {
+        a = t;
+        }
+      else
+        {
+        b = t;
+        }
+
+      if ( functionValueOft <= functionValueOfW || w == x )
+        {
+        v = w;
+        w = t;
+        functionValueOfV = functionValueOfW;
+        functionValueOfW = functionValueOft;
+        }
+      else if ( functionValueOft <= functionValueOfV || v == x || v == w )
+        {
+        v = t;
+        functionValueOfV = functionValueOft;
+        }
+      }
+    }
+
+  *extX = x;
+  *extVal = functionValueOfX;
+  itkDebugMacro(<< "x = " << *extX);
+  itkDebugMacro(<< "val = " << *extVal);
+  itkDebugMacro(<< "return 2");
+
+  this->SetCurrentLinePoint(x, functionValueOfX);
+}
+
+template<typename TInternalComputationValueType>
+void
+PowellOptimizerv4<TInternalComputationValueType>
+::StartOptimization(bool /* doOnlyInitialization */)
+{
+  if ( this->m_Metric.IsNull() )
+    {
+    return;
+    }
+
+  Superclass::StartOptimization();
+
+  m_StopConditionDescription.str("");
+  m_StopConditionDescription << this->GetNameOfClass() << ": ";
+
+  this->InvokeEvent( StartEvent() );
+  m_Stop = false;
+
+  this->SetSpaceDimension( this->m_Metric->GetNumberOfParameters() );
+
+  vnl_matrix< double > xi(m_SpaceDimension, m_SpaceDimension);
+  vnl_vector< double > xit(m_SpaceDimension);
+  xi.set_identity();
+  xit.fill(0);
+  xit[0] = 1;
+
+  ParametersType tempCoord(m_SpaceDimension);
+  ParametersType p(m_SpaceDimension);
+  ParametersType pt(m_SpaceDimension);
+  ParametersType ptt(m_SpaceDimension);
+  p = this->m_Metric->GetParameters();
+  pt = p;
+
+  unsigned int ibig;
+  double       fp, del, fptt;
+  double       ax, xx, bx;
+  double       fa, fx, fb;
+
+  xx = 0;
+  this->SetLine(p, xit);
+  fx = this->GetLineValue(0, tempCoord);
+
+  for ( this->m_CurrentIteration = 0;
+        this->m_CurrentIteration <= m_MaximumIteration;
+        this->m_CurrentIteration++ )
+    {
+    fp = fx;
+    ibig = 0;
+    del = 0.0;
+
+    for ( unsigned int i = 0; i < m_SpaceDimension; i++ )
+      {
+      for ( unsigned int j = 0; j < m_SpaceDimension; ++j )
+        {
+        xit[j] = xi[j][i];
+        }
+      fptt = fx;
+
+      this->SetLine(p, xit);
+
+      ax = 0.0;
+      fa = fx;
+      xx = m_StepLength;
+      this->LineBracket(&ax, &xx, &bx, &fa, &fx, &fb, tempCoord);
+      this->BracketedLineOptimize(ax, xx, bx, fa, fx, fb, &xx, &fx, tempCoord);
+      this->SetCurrentLinePoint(xx, fx);
+      p = this->GetCurrentPosition();
+
+      if ( std::fabs(fptt - fx) > del )
+        {
+        del = std::fabs(fptt - fx);
+        ibig = i;
+        }
+      }
+
+    if ( 2.0 * std::fabs(fp - fx)
+         <= m_ValueTolerance * ( std::fabs(fp) + std::fabs(fx) ) )
+      {
+      m_StopConditionDescription << "Cost function values at the current parameter ("
+                                 << fx
+                                 << ") and at the local extrema ("
+                                 << fp
+                                 << ") are within Value Tolerance ("
+                                 << m_ValueTolerance << ")";
+      this->InvokeEvent( EndEvent() );
+      return;
+      }
+
+    const ScalesType & scales = this->GetScales();
+    for ( unsigned int j = 0; j < m_SpaceDimension; ++j )
+      {
+      ptt[j] = 2.0 * p[j] - pt[j];
+
+      if( this->GetScalesAreIdentity() )
+        {
+        xit[j] = p[j] - pt[j];
+        }
+      else
+        {
+        xit[j] = ( p[j] - pt[j] ) * scales[j];
+        }
+
+      pt[j] = p[j];
+      }
+
+    this->SetLine(ptt, xit);
+    fptt = this->GetLineValue(0, tempCoord);
+    if ( fptt < fp )
+      {
+      double t = 2.0 * ( fp - 2.0 * fx + fptt )
+                 * vnl_math_sqr(fp - fx - del)
+                 - del *vnl_math_sqr(fp - fptt);
+      if ( t < 0.0 )
+        {
+        this->SetLine(p, xit);
+
+        ax = 0.0;
+        fa = fx;
+        xx = 1;
+        this->LineBracket(&ax, &xx, &bx, &fa, &fx, &fb, tempCoord);
+        this->BracketedLineOptimize(ax, xx, bx, fa, fx, fb, &xx, &fx, tempCoord);
+        this->SetCurrentLinePoint(xx, fx);
+        p = this->GetCurrentPosition();
+
+        for ( unsigned int j = 0; j < m_SpaceDimension; j++ )
+          {
+          xi[j][ibig] = xx * xit[j];
+          }
+        }
+      }
+
+    this->InvokeEvent( IterationEvent() );
+    }
+
+  m_StopConditionDescription << "Maximum number of iterations exceeded. "
+                             << "Number of iterations is "
+                             << m_MaximumIteration;
+  this->InvokeEvent( EndEvent() );
+}
+
+template<typename TInternalComputationValueType>
+const std::string
+PowellOptimizerv4<TInternalComputationValueType>
+::GetStopConditionDescription() const
+{
+  return m_StopConditionDescription.str();
+}
+
+template<typename TInternalComputationValueType>
+void
+PowellOptimizerv4<TInternalComputationValueType>
+::PrintSelf(std::ostream & os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  os << indent << "Metric Worst Possible Value " << m_MetricWorstPossibleValue << std::endl;
+  os << indent << "Catch GetValue Exception " << m_CatchGetValueException   << std::endl;
+  os << indent << "Space Dimension   " << m_SpaceDimension   << std::endl;
+  os << indent << "Maximum Iteration " << m_MaximumIteration << std::endl;
+  os << indent << "StepLength        " << m_StepLength       << std::endl;
+  os << indent << "StepTolerance     " << m_StepTolerance    << std::endl;
+  os << indent << "ValueTolerance    " << m_ValueTolerance   << std::endl;
+  os << indent << "LineOrigin        " << m_LineOrigin       << std::endl;
+  os << indent << "LineDirection     " << m_LineDirection    << std::endl;
+  os << indent << "Current Cost      " << m_CurrentCost      << std::endl;
+  os << indent << "Maximum Line Iteration " << m_MaximumLineIteration << std::endl;
+  os << indent << "Current Line Iteration " << m_CurrentLineIteration << std::endl;
+  os << indent << "Stop              " << m_Stop             << std::endl;
+}
+} // end of namespace itk
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h
index 13ef00b..90cb5bb 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.h
@@ -130,7 +130,6 @@ protected:
   /** The information about the previous step */
   MeasureType    m_PreviousValue;
   ParametersType m_PreviousPosition;
-  DerivativeType m_PreviousGradient;
 
   /** The best value so far and relevant information */
   MeasureType    m_BestValue;
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.hxx
index ed6f477..419e817 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.hxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkQuasiNewtonOptimizerv4.hxx
@@ -26,9 +26,13 @@ namespace itk
 
 template<typename TInternalComputationValueType>
 QuasiNewtonOptimizerv4Template<TInternalComputationValueType>
-::QuasiNewtonOptimizerv4Template()
+::QuasiNewtonOptimizerv4Template():
+  m_MaximumIterationsWithoutProgress(30),
+  m_PreviousValue(0.0),
+  m_BestValue(0.0),
+  m_BestPosition(0),
+  m_BestIteration(0)
 {
-  this->m_MaximumIterationsWithoutProgress = 30;
   this->m_LearningRate = NumericTraits<TInternalComputationValueType>::One;
 
   // m_MaximumNewtonStepSizeInPhysicalUnits is used for automatic learning
@@ -38,9 +42,10 @@ QuasiNewtonOptimizerv4Template<TInternalComputationValueType>
   this->m_MaximumNewtonStepSizeInPhysicalUnits = NumericTraits<TInternalComputationValueType>::Zero;
 
   /** Threader for Quasi-Newton method */
-  typedef QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate<TInternalComputationValueType>  OptimizerType;
-  typedef typename OptimizerType::Pointer                                                          OptimizerPointer;
-
+  typedef QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate<TInternalComputationValueType>
+    OptimizerType;
+  typedef typename OptimizerType::Pointer
+    OptimizerPointer;
   OptimizerPointer estimateNewtonStepThreader = OptimizerType::New();
 
   this->m_EstimateNewtonStepThreader = estimateNewtonStepThreader;
@@ -111,20 +116,20 @@ QuasiNewtonOptimizerv4Template<TInternalComputationValueType>
   if (this->GetCurrentIteration() == 0)
     {
       // initialize some information
-    m_PreviousValue = this->GetCurrentMetricValue();
-    m_PreviousPosition = this->GetCurrentPosition();
-    m_PreviousGradient = this->GetGradient();
+    this->m_PreviousValue = this->GetCurrentMetricValue();
+    this->m_PreviousPosition = this->GetCurrentPosition();
+    this->m_PreviousGradient = this->GetGradient();
 
-    m_BestValue = this->m_CurrentMetricValue;
-    m_BestPosition = this->m_CurrentPosition;
-    m_BestIteration = this->GetCurrentIteration();
+    this->m_BestValue = this->m_CurrentMetricValue;
+    this->m_BestPosition = this->m_CurrentPosition;
+    this->m_BestIteration = this->GetCurrentIteration();
     }
   else if (m_BestValue > this->m_CurrentMetricValue)
     {
       // store the best value and related information
-    m_BestValue = this->m_CurrentMetricValue;
-    m_BestPosition = this->m_CurrentPosition;
-    m_BestIteration = this->GetCurrentIteration();
+    this->m_BestValue = this->m_CurrentMetricValue;
+    this->m_BestPosition = this->m_CurrentPosition;
+    this->m_BestIteration = this->GetCurrentIteration();
     }
 
   if ( this->GetCurrentIteration() - m_BestIteration
@@ -170,9 +175,9 @@ QuasiNewtonOptimizerv4Template<TInternalComputationValueType>
   this->EstimateNewtonStep();
 
   /** Save for the next iteration */
-  m_PreviousValue = this->GetCurrentMetricValue();
-  m_PreviousPosition = this->GetCurrentPosition();
-  m_PreviousGradient = this->GetGradient();
+  this->m_PreviousValue = this->GetCurrentMetricValue();
+  this->m_PreviousPosition = this->GetCurrentPosition();
+  this->m_PreviousGradient = this->GetGradient();
 
   this->CombineGradientNewtonStep();
   this->ModifyCombinedNewtonStep();
@@ -268,7 +273,7 @@ QuasiNewtonOptimizerv4Template<TInternalComputationValueType>
       }
     }
 
-  if (vcl_abs(this->m_LearningRate - NumericTraits<TInternalComputationValueType>::One)
+  if (std::abs(this->m_LearningRate - NumericTraits<TInternalComputationValueType>::One)
       > 0.01)
     {
     this->m_NewtonStep *= this->m_LearningRate;
@@ -389,8 +394,8 @@ QuasiNewtonOptimizerv4Template<TInternalComputationValueType>
   TInternalComputationValueType dot_dg_dx = inner_product(dg, dx);
   TInternalComputationValueType dot_edg_dx = inner_product(edg, dx);
 
-  if (vcl_abs(dot_dg_dx) <= NumericTraits<TInternalComputationValueType>::epsilon()
-      || vcl_abs(dot_edg_dx) <= NumericTraits<TInternalComputationValueType>::epsilon())
+  if (std::abs(dot_dg_dx) <= NumericTraits<TInternalComputationValueType>::epsilon()
+      || std::abs(dot_edg_dx) <= NumericTraits<TInternalComputationValueType>::epsilon())
     {
     return false;
     }
@@ -412,7 +417,7 @@ QuasiNewtonOptimizerv4Template<TInternalComputationValueType>
   TInternalComputationValueType threshold
   = NumericTraits<TInternalComputationValueType>::epsilon();
 
-  if ( vcl_abs(vnl_determinant(newHessian)) <= threshold )
+  if ( std::abs(vnl_determinant(newHessian)) <= threshold )
     {
     return false;
     }
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx
index 667b43d..ee79065 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx
@@ -82,11 +82,11 @@ if (m_Metric.IsNull())
     itkExceptionMacro("RegistrationParameterScalesEstimator: the metric is NULL");
     }
 
-  if (this->m_Metric->GetMovingTransform() == NULL)
+  if (this->m_Metric->GetMovingTransform() == ITK_NULLPTR)
     {
     itkExceptionMacro("RegistrationParameterScalesEstimator: this->m_MovingTransform in the metric is NULL.");
     }
-  if (this->m_Metric->GetFixedTransform() == NULL)
+  if (this->m_Metric->GetFixedTransform() == ITK_NULLPTR)
     {
     itkExceptionMacro("RegistrationParameterScalesEstimator: this->m_FixedTransform in the metric is NULL.");
     }
@@ -290,9 +290,9 @@ void
 RegistrationParameterScalesEstimator< TMetric >
 ::ComputeSquaredJacobianNorms( const VirtualPointType  & point, ParametersType & squareNorms )
 {
-  JacobianType jacobian;
   const SizeValueType numPara = this->GetNumberOfLocalParameters();
   const SizeValueType dim = this->GetDimension();
+  JacobianType jacobian(dim,numPara);
 
   if (this->GetTransformForward())
     {
@@ -475,10 +475,10 @@ RegistrationParameterScalesEstimator< TMetric >
 
   const TransformBaseTemplate<typename TMetric::MeasureType> *transform = this->GetTransform();
 
-  if ( dynamic_cast< const MatrixOffsetTransformBaseType * >( transform ) != NULL
-    || dynamic_cast< const TranslationTransformType * >( transform ) != NULL
-    || dynamic_cast< const IdentityTransformType * >( transform ) != NULL
-    || dynamic_cast< const Rigid3DPerspectiveTransformType * >( transform ) != NULL
+  if ( dynamic_cast< const MatrixOffsetTransformBaseType * >( transform ) != ITK_NULLPTR
+    || dynamic_cast< const TranslationTransformType * >( transform ) != ITK_NULLPTR
+    || dynamic_cast< const IdentityTransformType * >( transform ) != ITK_NULLPTR
+    || dynamic_cast< const Rigid3DPerspectiveTransformType * >( transform ) != ITK_NULLPTR
     )
     {
     return true;
@@ -642,7 +642,7 @@ RegistrationParameterScalesEstimator< TMetric >
       }
     else
       {
-      FloatType ratio = 1 + vcl_log((FloatType)total/SizeOfSmallDomain);
+      FloatType ratio = 1 + std::log((FloatType)total/SizeOfSmallDomain);
       //ratio >= 1 since total/SizeOfSmallDomain > 1
 
       this->m_NumberOfRandomSamples = static_cast<int>(SizeOfSmallDomain * ratio);
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx
index 76859db..36ef8c0 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx
@@ -159,19 +159,31 @@ RegistrationParameterScalesFromJacobian< TMetric >
 
   itk::Array<FloatType> dTdt(dim);
 
+  JacobianType jacobianCache(dim,dim);
+  JacobianType jacobian(dim,
+                        (this->GetTransformForward() ?
+                         this->m_Metric->GetMovingTransform()->GetNumberOfParameters()
+                         : this->m_Metric->GetFixedTransform()->GetNumberOfParameters()));
+
+
   // checking each sample point
   for (SizeValueType c=0; c<numSamples; c++)
     {
     const VirtualPointType &point = this->m_SamplePoints[c];
 
-    JacobianType jacobian;
     if (this->GetTransformForward())
       {
-      this->m_Metric->GetMovingTransform()->ComputeJacobianWithRespectToParameters(point, jacobian);
+      this->m_Metric->GetMovingTransform()->
+        ComputeJacobianWithRespectToParametersCachedTemporaries(point,
+                                                                jacobian,
+                                                                jacobianCache);
       }
     else
       {
-      this->m_Metric->GetFixedTransform()->ComputeJacobianWithRespectToParameters(point, jacobian);
+      this->m_Metric->GetFixedTransform()->
+        ComputeJacobianWithRespectToParametersCachedTemporaries(point,
+                                                                jacobian,
+                                                                jacobianCache);
       }
 
     if( !this->IsDisplacementFieldTransform() )
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx
index 119e9ca..fbdc5b9 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx
@@ -142,9 +142,9 @@ RegistrationParameterScalesFromShiftBase< TMetric >
   FloatType maxStep = NumericTraits<FloatType>::Zero;
   for (typename ParametersType::SizeValueType p = 0; p < step.GetSize(); p++)
     {
-    if (maxStep < vcl_abs(step[p]))
+    if (maxStep < std::abs(step[p]))
       {
-      maxStep = vcl_abs(step[p]);
+      maxStep = std::abs(step[p]);
       }
     }
   if (maxStep <= NumericTraits<FloatType>::epsilon())
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.h
new file mode 100644
index 0000000..399e3d2
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.h
@@ -0,0 +1,150 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkRegularStepGradientDescentOptimizerv4_h
+#define __itkRegularStepGradientDescentOptimizerv4_h
+
+#include "itkGradientDescentOptimizerv4.h"
+#include <itkCompensatedSummation.h>
+
+namespace itk
+{
+  /** \class RegularStepGradientDescentOptimizerv4
+   *  \brief Regular Step Gradient descent optimizer.
+   *
+   *   This optimizer is a variant of gradient descent that attempts to prevent it
+   *   from taking steps that are too large. At each iteration, this optimizer
+   *   will take a step along the direction of the metric derivative. Each time the
+   *   direction of the derivative abruptly changes, the optimizer assumes that a
+   *   local extrema has been passed and reacts by reducing the step length by a
+   *   relaxation factor that is set to 0.5 by default.
+   *   The default value for the initial step length is 1, and this value can only
+   *   be changed manually via SetLearningRate() since this optimizer does not use
+   *   the ScaleEstimator to automatically estimate the learning rate.
+   *   Also note that unlike the previous version of ReuglarStepGradientDescentOptimizer,
+   *   ITKv4 does not have a "maximize/minimize" option to modify the effect of
+   *   the metric derivative. The assigned metric is assumed to return a parameter
+   *   derivative result that "improves" the optimization.
+   *
+   * \ingroup ITKOptimizersv4
+   */
+template<typename TInternalComputationValueType>
+class RegularStepGradientDescentOptimizerv4
+: public GradientDescentOptimizerv4Template<TInternalComputationValueType>
+{
+public:
+  /** Standard class typedefs. */
+  typedef RegularStepGradientDescentOptimizerv4                               Self;
+  typedef GradientDescentOptimizerv4Template<TInternalComputationValueType>   Superclass;
+  typedef SmartPointer< Self >                                                Pointer;
+  typedef SmartPointer< const Self >                                          ConstPointer;
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(RegularStepGradientDescentOptimizerv4, Superclass);
+
+  /** New macro for creation of through a Smart Pointer   */
+  itkNewMacro(Self);
+
+
+  /** It should be possible to derive the internal computation type from the class object. */
+  typedef TInternalComputationValueType                     InternalComputationValueType;
+
+  /** Derivative type */
+  typedef typename Superclass::DerivativeType               DerivativeType;
+
+  /** Metric type over which this class is templated */
+  typedef typename Superclass::MeasureType                  MeasureType;
+  typedef typename Superclass::IndexRangeType               IndexRangeType;
+  typedef typename Superclass::ScalesType                   ScalesType;
+  typedef typename Superclass::ParametersType               ParametersType;
+  typedef typename Superclass::StopConditionType            StopConditionType;
+
+  /** Compensated summation type */
+  typedef CompensatedSummation< InternalComputationValueType >   CompensatedSummationType;
+
+  /** Minimum step length (learning rate) value for convergence checking.
+   *  The step length is decreased by relaxation factor if the step is too
+   *  long, and the algorithm passes the local minimum.
+   *  When the step length value reaches a small value, it would be treated
+   *  as converged.
+   *
+   *  The default m_MinimumStepLength is set to 1e-4 to pass all
+   *  tests.
+   */
+  itkSetMacro(MinimumStepLength, TInternalComputationValueType);
+  itkGetConstReferenceMacro(MinimumStepLength, TInternalComputationValueType);
+
+  /** Set/Get relaxation factor value */
+  itkSetMacro(RelaxationFactor, TInternalComputationValueType);
+  itkGetConstReferenceMacro(RelaxationFactor, TInternalComputationValueType);
+
+  /** Set/Get gradient magnitude tolerance value */
+  itkSetMacro(GradientMagnitudeTolerance, TInternalComputationValueType);
+  itkGetConstReferenceMacro(GradientMagnitudeTolerance, TInternalComputationValueType);
+
+  /** Start and run the optimization */
+  virtual void StartOptimization( bool doOnlyInitialization = false ) ITK_OVERRIDE;
+
+  /** Estimate the learning rate based on the current gradient. */
+  virtual void EstimateLearningRate();
+
+protected:
+
+  /** Advance one Step following the gradient direction.
+   * Includes transform update. */
+  virtual void AdvanceOneStep(void) ITK_OVERRIDE;
+
+  /** Modify the input gradient over a given index range. */
+  virtual void ModifyGradientByScalesOverSubRange( const IndexRangeType& subrange ) ITK_OVERRIDE;
+  virtual void ModifyGradientByLearningRateOverSubRange( const IndexRangeType& subrange ) ITK_OVERRIDE;
+
+  /**
+   *  When the local minima is passed by taking a large step,
+   *  the step size is adjusted by the relaxation factor, so we
+   *  can take smaller steps toward the minimum point.
+   */
+  TInternalComputationValueType  m_RelaxationFactor;
+
+  /** Default constructor */
+  RegularStepGradientDescentOptimizerv4();
+
+  /** Destructor */
+  virtual ~RegularStepGradientDescentOptimizerv4();
+
+  virtual void PrintSelf( std::ostream & os, Indent indent ) const;
+
+  /** Minimum gradient step value for convergence checking */
+  TInternalComputationValueType  m_MinimumStepLength;
+
+  /** Minimum gradient magnitude value for convergence checking */
+  TInternalComputationValueType  m_GradientMagnitudeTolerance;
+
+  /** Current scale for learning rate */
+  MeasureType                  m_CurrentLearningRateRelaxation;
+
+private:
+  RegularStepGradientDescentOptimizerv4( const Self & ); //purposely not implemented
+  void operator=( const Self& ); //purposely not implemented
+};
+
+} // end namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "itkRegularStepGradientDescentOptimizerv4.hxx"
+#endif
+
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.hxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.hxx
new file mode 100644
index 0000000..99c57af
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkRegularStepGradientDescentOptimizerv4.hxx
@@ -0,0 +1,299 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkRegularStepGradientDescentOptimizerv4_hxx
+#define __itkRegularStepGradientDescentOptimizerv4_hxx
+
+#include "itkRegularStepGradientDescentOptimizerv4.h"
+
+namespace itk
+{
+
+template<typename TInternalComputationValueType>
+RegularStepGradientDescentOptimizerv4<TInternalComputationValueType>
+::RegularStepGradientDescentOptimizerv4():
+  m_RelaxationFactor( 0.5 ),
+  m_MinimumStepLength( 1e-4 ), // Initialize parameter for the convergence checker
+  m_GradientMagnitudeTolerance( 1e-4 ),
+  m_CurrentLearningRateRelaxation( 0 )
+{
+  this->m_DoEstimateLearningRateAtEachIteration = false;
+  this->m_DoEstimateLearningRateOnce = false;
+}
+
+template<typename TInternalComputationValueType>
+RegularStepGradientDescentOptimizerv4<TInternalComputationValueType>
+::~RegularStepGradientDescentOptimizerv4()
+{}
+
+template<typename TInternalComputationValueType>
+void
+RegularStepGradientDescentOptimizerv4<TInternalComputationValueType>
+::PrintSelf(std::ostream & os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+  os << indent << "Current learning rate relaxation: " << m_CurrentLearningRateRelaxation << std::endl;
+  os << indent << "Relaxation factor: " << this->m_RelaxationFactor << std::endl;
+  os << indent << "Minimum step length: " << this->m_MinimumStepLength << std::endl;
+  os << indent << "Gradient magnitude tolerance: " << this->m_GradientMagnitudeTolerance << std::endl;
+}
+
+template<typename TInternalComputationValueType>
+void
+RegularStepGradientDescentOptimizerv4<TInternalComputationValueType>
+::StartOptimization( bool doOnlyInitialization )
+{
+  this->m_UseConvergenceMonitoring = false;
+
+  /* Must call the grandparent version for basic validation and setup */
+  GradientDescentOptimizerBasev4Template<TInternalComputationValueType>::StartOptimization( doOnlyInitialization );
+
+  if( this->m_ReturnBestParametersAndValue )
+    {
+    this->m_BestParameters = this->GetCurrentPosition( );
+    this->m_CurrentBestValue = NumericTraits< MeasureType >::max();
+    }
+
+  const SizeValueType spaceDimension = this->m_Metric->GetNumberOfParameters();
+
+  this->m_Gradient = DerivativeType(spaceDimension);
+  this->m_PreviousGradient = DerivativeType(spaceDimension);
+  this->m_Gradient.Fill(0.0f);
+  this->m_PreviousGradient.Fill(0.0f);
+
+  // Reset the iterations and learning rate scale when the optimizer is started again.
+  this->m_CurrentLearningRateRelaxation = 1.0;
+  this->m_CurrentIteration = 0;
+
+  // validity check for the value of GradientMagnitudeTolerance
+  if ( m_GradientMagnitudeTolerance < 0.0 )
+    {
+    itkExceptionMacro(<< "Gradient magnitude tolerance must be"
+                         "greater or equal 0.0. Current value is " << m_GradientMagnitudeTolerance);
+    }
+
+  if( ! doOnlyInitialization )
+    {
+    this->ResumeOptimization();
+    }
+}
+
+template<typename TInternalComputationValueType>
+void
+RegularStepGradientDescentOptimizerv4<TInternalComputationValueType>
+::AdvanceOneStep()
+{
+  itkDebugMacro("AdvanceOneStep");
+
+  // Make sure the scales have been set properly
+  if ( this->m_Scales.size() != this->m_Gradient.Size() )
+    {
+    itkExceptionMacro(<< "The size of Scales is "
+                      << this->m_Scales.size()
+                      << ", but the NumberOfParameters for the CostFunction is "
+                      << this->m_Gradient.Size()
+                      << ".");
+    }
+
+  if ( this->m_RelaxationFactor < 0.0 )
+    {
+    itkExceptionMacro(<< "Relaxation factor must be positive. Current value is " << this->m_RelaxationFactor);
+    }
+
+  if ( this->m_RelaxationFactor >= 1.0 )
+    {
+    itkExceptionMacro(<< "Relaxation factor must less than 1.0. Current value is " << this->m_RelaxationFactor);
+    }
+
+  /* Begin threaded gradient modification.
+   * Scale gradient and previous gradient by scales.
+   * The m_Gradient and m_PreviousGradient variables are modified in-place. */
+  this->ModifyGradientByScales();
+
+  CompensatedSummationType compensatedSummation;
+  for( SizeValueType dim = 0; dim < this->m_Gradient.Size(); ++dim )
+    {
+    const double weighted = this->m_Gradient[dim];
+    compensatedSummation += weighted * weighted;
+    }
+  const double gradientMagnitude = vcl_sqrt( compensatedSummation.GetSum() );
+
+  if( gradientMagnitude < this->m_GradientMagnitudeTolerance )
+    {
+    this->m_StopCondition = Superclass::GRADIENT_MAGNITUDE_TOLEARANCE;
+    this->m_StopConditionDescription << "Gradient magnitude tolerance met after "
+                                      << this->m_CurrentIteration
+                                      << " iterations. Gradient magnitude ("
+                                      << gradientMagnitude
+                                      << ") is less than gradient magnitude tolerance ("
+                                      << this->m_GradientMagnitudeTolerance
+                                      << ").";
+    this->StopOptimization();
+    return;
+    }
+
+  compensatedSummation.ResetToZero();
+  for ( SizeValueType i = 0; i < this->m_Gradient.Size(); i++ )
+    {
+    const double weight1 = this->m_Gradient[i];
+    const double weight2 = this->m_PreviousGradient[i];
+    compensatedSummation += weight1 * weight2;
+    }
+  const double scalarProduct = compensatedSummation.GetSum();
+
+    // If there is a direction change
+  if ( scalarProduct < 0 )
+    {
+    this->m_CurrentLearningRateRelaxation *= this->m_RelaxationFactor;
+    }
+
+  const double stepLength = this->m_CurrentLearningRateRelaxation*this->m_LearningRate;
+
+  if ( stepLength < this->m_MinimumStepLength )
+    {
+    this->m_StopCondition = Superclass::STEP_TOO_SMALL;
+    this->m_StopConditionDescription << "Step too small after "
+                                  << this->m_CurrentIteration
+                                  << " iterations. Current step ("
+                                  << stepLength
+                                  << ") is less than minimum step ("
+                                  << this->m_MinimumStepLength
+                                  << ").";
+    this->StopOptimization();
+    return;
+    }
+
+  this->EstimateLearningRate();
+  this->ModifyGradientByLearningRate();
+  const double factor = NumericTraits<typename ScalesType::ValueType>::OneValue() / gradientMagnitude;
+
+  try
+    {
+    /* Pass graident to transform and let it do its own updating */
+    this->m_Metric->UpdateTransformParameters( this->m_Gradient, factor );
+    }
+  catch ( ExceptionObject & err )
+    {
+    this->m_StopCondition = Superclass::UPDATE_PARAMETERS_ERROR;
+    this->m_StopConditionDescription << "UpdateTransformParameters error";
+    this->StopOptimization();
+
+      // Pass exception to caller
+    throw err;
+    }
+
+  this->InvokeEvent( IterationEvent() );
+}
+
+template<typename TInternalComputationValueType>
+void
+RegularStepGradientDescentOptimizerv4<TInternalComputationValueType>
+::ModifyGradientByScalesOverSubRange( const IndexRangeType& subrange )
+{
+  const ScalesType& scales = this->GetScales();
+  const ScalesType& weights = this->GetWeights();
+
+  ScalesType factor( scales.Size() );
+
+  if( this->GetWeightsAreIdentity() )
+    {
+    for( SizeValueType i=0; i < factor.Size(); i++ )
+      {
+      factor[i] = NumericTraits<typename ScalesType::ValueType>::OneValue() / scales[i];
+      }
+    }
+  else
+    {
+    for( SizeValueType i=0; i < factor.Size(); i++ )
+      {
+      factor[i] = weights[i] / scales[i];
+      }
+    }
+
+  /* Loop over the range. It is inclusive. */
+  for ( IndexValueType j = subrange[0]; j <= subrange[1]; j++ )
+    {
+      // scales is checked during StartOptmization for values <=
+      // machine epsilon.
+      // Take the modulo of the index to handle gradients from transforms
+      // with local support. The gradient array stores the gradient of local
+      // parameters at each local index with linear packing.
+    IndexValueType index = j % scales.Size();
+    this->m_Gradient[j] = this->m_Gradient[j] * factor[index];
+    this->m_PreviousGradient[j] = this->m_PreviousGradient[j] * factor[index];
+    }
+}
+
+template<typename TInternalComputationValueType>
+void
+RegularStepGradientDescentOptimizerv4<TInternalComputationValueType>
+::ModifyGradientByLearningRateOverSubRange( const IndexRangeType& subrange )
+{
+  /* Loop over the range. It is inclusive. */
+  for ( IndexValueType j = subrange[0]; j <= subrange[1]; j++ )
+    {
+    this->m_Gradient[j] = this->m_Gradient[j] * this->m_CurrentLearningRateRelaxation*this->m_LearningRate;
+    }
+}
+
+/**
+* Estimate the learning rate.
+*/
+template<typename TInternalComputationValueType>
+void
+RegularStepGradientDescentOptimizerv4<TInternalComputationValueType>
+::EstimateLearningRate()
+{
+  if ( this->m_ScalesEstimator.IsNull() )
+    {
+    return;
+    }
+  if ( this->m_DoEstimateLearningRateAtEachIteration ||
+      (this->m_DoEstimateLearningRateOnce && this->m_CurrentIteration == 0) )
+    {
+    TInternalComputationValueType stepScale
+    = this->m_ScalesEstimator->EstimateStepScale(this->m_Gradient);
+
+    if (stepScale <= NumericTraits<TInternalComputationValueType>::epsilon())
+      {
+      this->m_LearningRate = NumericTraits<TInternalComputationValueType>::One;
+      }
+    else
+      {
+      this->m_LearningRate = this->m_MaximumStepSizeInPhysicalUnits / stepScale;
+      }
+    CompensatedSummationType compensatedSummation;
+    for( SizeValueType dim = 0; dim < this->m_Gradient.Size(); ++dim )
+      {
+      const double weighted = this->m_Gradient[dim];
+      compensatedSummation += weighted * weighted;
+      }
+    const double gradientMagnitude = std::sqrt( compensatedSummation.GetSum() );
+
+    //
+    // Specialized to keep the step size regularized this additional
+    // scale is needed to make the learning rate independent on the
+    // gradient magnitude.
+    //
+    this->m_LearningRate *= gradientMagnitude;
+
+    }
+}
+
+}//namespace itk
+
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkSingleValuedNonLinearVnlOptimizerv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkSingleValuedNonLinearVnlOptimizerv4.h
new file mode 100644
index 0000000..e32fb6c
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkSingleValuedNonLinearVnlOptimizerv4.h
@@ -0,0 +1,126 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkSingleValuedNonLinearVnlOptimizerv4_h
+#define __itkSingleValuedNonLinearVnlOptimizerv4_h
+
+#include "itkObjectToObjectOptimizerBase.h"
+#include "itkSingleValuedVnlCostFunctionAdaptorv4.h"
+#include "itkCommand.h"
+
+namespace itk
+{
+/** \class SingleValuedNonLinearVnlOptimizerv4
+ * \brief This is a base for the ITKv4 Optimization methods using
+ * the vnl library.
+ *
+ * It is an Adaptor class for optimizers provided by the vnl library.
+ *
+ * \ingroup ITKOptimizersv4
+ */
+class  SingleValuedNonLinearVnlOptimizerv4 :
+    public ObjectToObjectOptimizerBaseTemplate<double>
+{
+public:
+  /** Standard class typedefs. */
+  typedef SingleValuedNonLinearVnlOptimizerv4 Self;
+  typedef ObjectToObjectOptimizerBase         Superclass;
+  typedef SmartPointer< Self >                Pointer;
+  typedef SmartPointer< const Self >          ConstPointer;
+
+  /** Run-time type information (and related methods). */
+  itkTypeMacro(SingleValuedNonLinearVnlOptimizerv4, ObjectToObjectOptimizerBase)
+
+  /** Command observer that will interact with the ITKVNL cost-function
+   * adaptor in order to generate iteration events. This will allow to overcome
+   * the limitation of VNL optimizers not offering callbacks for every
+   * iteration */
+  typedef ReceptorMemberCommand< Self >   CommandType;
+
+  typedef Superclass::MetricType     MetricType;
+  typedef Superclass::DerivativeType DerivativeType;
+  typedef Superclass::ParametersType ParametersType;
+  typedef Superclass::ScalesType     ScalesType;
+
+  /** Stop condition return string type */
+  typedef Superclass::StopConditionReturnStringType StopConditionReturnStringType;
+
+  /** Stop condition internal string type */
+  typedef Superclass::StopConditionDescriptionType  StopConditionDescriptionType;
+
+  virtual void StartOptimization(bool doOnlyInitialization = false) ITK_OVERRIDE;
+
+  /** Set the metric (cost function). This method has to be overloaded
+   *  by derived classes because the CostFunctionAdaptor requires
+   *  to know the number of parameters at construction time. This
+   *  number of parameters is obtained at run-time from the itkObjectToObjectMetric.
+   *  As a consequence each derived optimizer should construct its own
+   *  CostFunctionAdaptor when overloading this method  */
+  virtual void SetMetric(MetricType *metric) = 0;
+
+  /** Return Cached Values. These method have the advantage of not triggering a
+   * recomputation of the metric value, but it has the disadvantage of returning
+   * a value that may not be the one corresponding to the current parameters. For
+   * GUI update purposes, this method is a good option.
+   * \note The metric value is cached in the base class, retrieved via GetValue(). */
+  itkGetConstReferenceMacro(CachedDerivative, DerivativeType);
+  itkGetConstReferenceMacro(CachedCurrentPosition, ParametersType);
+
+  /** Get the reason for termination */
+  virtual const StopConditionReturnStringType GetStopConditionDescription() const = 0;
+
+protected:
+  SingleValuedNonLinearVnlOptimizerv4();
+  virtual ~SingleValuedNonLinearVnlOptimizerv4();
+
+  typedef SingleValuedVnlCostFunctionAdaptorv4 CostFunctionAdaptorType;
+
+  void SetCostFunctionAdaptor(CostFunctionAdaptorType *adaptor);
+
+  const CostFunctionAdaptorType * GetCostFunctionAdaptor(void) const;
+
+  CostFunctionAdaptorType * GetCostFunctionAdaptor(void);
+
+  /** The purpose of this method is to get around the lack of
+   *  const-correctness in VNL cost-functions and optimizers */
+  CostFunctionAdaptorType * GetNonConstCostFunctionAdaptor(void) const;
+
+  /** Print out internal state */
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
+
+private:
+  /** The purpose of this method is to get around the lack of iteration reporting
+   * in VNL optimizers. By interfacing directly with the ITK cost function
+   * adaptor we are generating here Iteration Events. Note the iteration events
+   * here are produce PER EVALUATION of the metric, not per real iteration of the
+   * vnl optimizer. Optimizers that evaluate the metric multiple times at each
+   * iteration will generate a lot more of Iteration events here. */
+  void IterationReport(const EventObject & event);
+
+  SingleValuedNonLinearVnlOptimizerv4(const Self &); //purposely not implemented
+  void operator=(const Self &);                    //purposely not implemented
+
+  CostFunctionAdaptorType *m_CostFunctionAdaptor;
+
+  CommandType::Pointer m_Command;
+
+  mutable ParametersType m_CachedCurrentPosition;
+  mutable DerivativeType m_CachedDerivative;
+};
+} // end namespace itk
+
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkSingleValuedVnlCostFunctionAdaptorv4.h b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkSingleValuedVnlCostFunctionAdaptorv4.h
new file mode 100644
index 0000000..3b9dfef
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/include/itkSingleValuedVnlCostFunctionAdaptorv4.h
@@ -0,0 +1,129 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#ifndef __itkSingleValuedVnlCostFunctionAdaptorv4_h
+#define __itkSingleValuedVnlCostFunctionAdaptorv4_h
+
+#include "itkOptimizerParameters.h"
+#include "itkObjectToObjectMetricBase.h"
+#include "vnl/vnl_cost_function.h"
+
+namespace itk
+{
+/** \class SingleValuedVnlCostFunctionAdaptorv4
+ * \brief This class is an Adaptor that allows to pass
+ * itk::ObjectToObjectMetricBase objects to vnl_optimizers expecting
+ * a vnl_cost_function. For use in the ITKv4 registration framework.
+ *
+ * This class returns a single value.
+ *
+ * \ingroup ITKOptimizersv4
+ */
+class SingleValuedVnlCostFunctionAdaptorv4:
+  public vnl_cost_function
+{
+public:
+
+  /** InternalMeasureType typedef. */
+  typedef   double InternalMeasureType;
+
+  /** InternalParametersType typedef. */
+  typedef   vnl_vector< InternalMeasureType > InternalParametersType;
+
+  /** InternalGradientType typedef. */
+  typedef   vnl_vector< InternalMeasureType > InternalDerivativeType;
+
+  /** Parameters of the SingleValuedCostFunction */
+  typedef ObjectToObjectMetricBase::ParametersType ParametersType;
+
+  /** Derivatives of the SingleValuedCostFunction */
+  typedef ObjectToObjectMetricBase::DerivativeType DerivativeType;
+
+  /** Type of the SingleValuedCostFunction value */
+  typedef ObjectToObjectMetricBase::MeasureType MeasureType;
+
+  /** Scales typedef */
+  typedef OptimizerParameters< InternalMeasureType > ScalesType;
+
+  /** Constructor with size */
+  SingleValuedVnlCostFunctionAdaptorv4(unsigned int spaceDimension);
+
+  /** Set the CostFunction deriving from SingleValuedCostFunction */
+  void SetCostFunction(ObjectToObjectMetricBase *costFunction)
+  {
+    m_ObjectMetric = costFunction;
+  }
+
+  /** Get the CostFunction deriving from SingleValuedCostFunction */
+  const ObjectToObjectMetricBase * GetCostFunction(void) const
+  {
+    return m_ObjectMetric;
+  }
+
+  /**  Delegate computation of the value to the CostFunction. */
+  virtual InternalMeasureType f(const InternalParametersType & inparameters) ITK_OVERRIDE;
+
+  /**  Delegate computation of the gradient to the costFunction.  */
+  virtual void gradf(const InternalParametersType   & inparameters, InternalDerivativeType   & gradient) ITK_OVERRIDE;
+
+  /**  Delegate computation of value and gradient to the costFunction.     */
+  virtual void compute(const InternalParametersType & x, InternalMeasureType *f, InternalDerivativeType *g) ITK_OVERRIDE;
+
+  /**  Convert external derviative measures into internal type   */
+  void ConvertExternalToInternalGradient( const DerivativeType & input, InternalDerivativeType & output) const;
+
+  /** Set current parameters scaling. */
+  void SetScales(const ScalesType & scales);
+
+  /** This AddObserver method allows to simulate that this class derives from
+   * an itkObject for the purpose of reporting iteration events. The goal of
+   * this method is to allow ITK-vnl optimizer adaptors to get iteration events
+   * despite the fact that VNL does not provide callbacks. */
+  unsigned long AddObserver(const EventObject & event, Command *) const;
+
+  /** Return the value of the last evaluation to the value of the cost function.
+   *  Note that this method DOES NOT triggers a computation of the function or
+   *  the derivatives, it only returns previous values. Therefore the values here
+   *  are only valid after you invoke the f() or gradf() methods. */
+  itkGetConstReferenceMacro(CachedValue, MeasureType);
+
+  itkGetConstReferenceMacro(CachedDerivative, DerivativeType);
+
+  /** Return the parameters directly from the assigned metric. */
+  const ParametersType & GetCachedCurrentParameters() const;
+
+protected:
+
+  /** This method is intended to be called by the derived classes in order to
+   * notify of an iteration event to any Command/Observers */
+  void ReportIteration(const EventObject & event) const;
+
+private:
+
+  ObjectToObjectMetricBase::Pointer   m_ObjectMetric;
+  bool                                m_ScalesInitialized;
+  ScalesType                          m_Scales;
+  Object::Pointer                     m_Reporter;
+
+  mutable MeasureType    m_CachedValue;
+  mutable DerivativeType m_CachedDerivative;
+
+};  // end of Class CostFunction
+
+} // end namespace itk
+
+#endif
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/src/CMakeLists.txt b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/CMakeLists.txt
new file mode 100644
index 0000000..7329f7a
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/CMakeLists.txt
@@ -0,0 +1,14 @@
+set(ITKOptimizersv4_SRC
+  itkSingleValuedNonLinearVnlOptimizerv4.cxx
+  itkSingleValuedVnlCostFunctionAdaptorv4.cxx
+  itkLBFGSOptimizerv4.cxx
+  itkLBFGSBOptimizerv4.cxx
+  itkAmoebaOptimizerv4.cxx
+  )
+
+add_library(ITKOptimizersv4 ${ITKOptimizersv4_SRC})
+target_link_libraries(ITKOptimizersv4
+  ${ITKMetricsv4_LIBRARIES}
+  ${ITKOptimizers_LIBRARIES}
+  )
+itk_module_target(ITKOptimizersv4)
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx
new file mode 100644
index 0000000..48bf958
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkAmoebaOptimizerv4.cxx
@@ -0,0 +1,298 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+
+#include "itkAmoebaOptimizerv4.h"
+
+namespace itk
+{
+
+
+AmoebaOptimizerv4
+::AmoebaOptimizerv4() :
+  m_InitialSimplexDelta(1)
+{
+  this->m_NumberOfIterations      = 500;
+  this->m_ParametersConvergenceTolerance = 1e-8;
+  this->m_FunctionConvergenceTolerance   = 1e-4;
+  this->m_AutomaticInitialSimplex        = true;
+  this->m_InitialSimplexDelta.Fill( NumericTraits< ParametersType::ValueType >::One );
+  this->m_OptimizeWithRestarts = false;
+  this->m_VnlOptimizer = ITK_NULLPTR;
+}
+
+
+AmoebaOptimizerv4
+::~AmoebaOptimizerv4()
+{
+  delete m_VnlOptimizer;
+}
+
+
+const std::string
+AmoebaOptimizerv4
+::GetStopConditionDescription() const
+{
+  return this->m_StopConditionDescription.str();
+}
+
+
+void
+AmoebaOptimizerv4
+::PrintSelf( std::ostream & os, Indent indent ) const
+{
+  Superclass::PrintSelf(os, indent);
+  os << indent << "ParametersConvergenceTolerance: "
+     << this->m_ParametersConvergenceTolerance << std::endl;
+  os << indent << "FunctionConvergenceTolerance: "
+     << this->m_FunctionConvergenceTolerance << std::endl;
+  os << indent << "AutomaticInitialSimplex: "
+     << ( this->m_AutomaticInitialSimplex ? "On" : "Off" ) << std::endl;
+  os << indent << "InitialSimplexDelta: "
+     << this->m_InitialSimplexDelta << std::endl;
+}
+
+
+vnl_amoeba *
+AmoebaOptimizerv4
+::GetOptimizer() const
+{
+  return this->m_VnlOptimizer;
+}
+
+void
+AmoebaOptimizerv4::
+SetInitialSimplexDelta( ParametersType initialSimplexDelta,
+                        bool automaticInitialSimplex )
+{
+  this->m_InitialSimplexDelta = initialSimplexDelta;
+  this->m_AutomaticInitialSimplex = automaticInitialSimplex;
+  this->Modified();
+}
+
+
+void
+AmoebaOptimizerv4
+::SetMetric(MetricType *metric)
+{
+  this->m_Metric = metric;
+
+  //if cost function is NULL this will throw an exception when the pointer is dereferenced
+  const unsigned int numberOfParameters = metric->GetNumberOfParameters();
+
+  // assign to vnl cost-function adaptor
+  CostFunctionAdaptorType *adaptor = new CostFunctionAdaptorType( numberOfParameters );
+  adaptor->SetCostFunction( metric );
+  this->SetCostFunctionAdaptor( adaptor );
+  this->Modified();
+}
+
+
+void
+AmoebaOptimizerv4
+::StartOptimization(bool /* doOnlyInitialization */)
+{
+  // Perform some verification, check scales,
+  // pass settings to cost-function adaptor.
+  Superclass::StartOptimization();
+
+  //validate the settings (cost function is initialized, the size of its
+  //expected parameter vector matches the one we have etc...)
+  this->ValidateSettings();
+
+  ParametersType parameters = this->m_Metric->GetParameters();
+  unsigned int n = parameters.GetSize();
+  if( n == 0 )
+    {
+    itkExceptionMacro(<<"Optimizer parameters are not initialized.");
+    }
+
+  InternalParametersType delta( m_InitialSimplexDelta );
+
+  //start the actual work
+  this->InvokeEvent( StartEvent() );
+
+  //configure the vnl optimizer
+  CostFunctionAdaptorType *adaptor = GetNonConstCostFunctionAdaptor();
+  //get rid of previous instance of the internal optimizer and create a
+  //new one
+  delete m_VnlOptimizer;
+  m_VnlOptimizer = new vnl_amoeba( *adaptor );
+  m_VnlOptimizer->set_max_iterations( static_cast< int >( m_NumberOfIterations ) );
+  m_VnlOptimizer->set_x_tolerance(m_ParametersConvergenceTolerance);
+  m_VnlOptimizer->set_f_tolerance(m_FunctionConvergenceTolerance);
+
+  m_StopConditionDescription.str( "" );
+  m_StopConditionDescription << this->GetNameOfClass() << ": Running";
+
+  ParametersType bestPosition = parameters;
+
+  // Scale the initial parameters up if scales are defined.
+  // This compensates for later scaling them down in the cost function adaptor
+  // and at the end of this function.
+  const ScalesType & scales = GetScales();
+  if ( !this->GetScalesAreIdentity() )
+    {
+    for ( unsigned int i = 0; i < n; i++ )
+      {
+      parameters[i] *= scales[i];
+      }
+    }
+  //copy the automated initialization from vnl so that we have
+  //the same control as when the user provides the initial simplex.
+  //this also exposes the fact that there is an interaction between
+  //the parameter scaling and the initial simplex when using
+  //automated initialization - previously hidden inside vnl
+  if ( this->m_AutomaticInitialSimplex )
+    {
+    const double relativeDiameter = 0.05;
+    const double zeroTermDelta = 0.00025;
+    InternalParametersType automaticDelta(n);
+    for( unsigned int i = 0; i < n; i++ )
+      {
+      if( fabs( parameters[i] ) > zeroTermDelta )
+        {
+        automaticDelta[i] = relativeDiameter*parameters[i];
+        }
+      else
+        {
+        automaticDelta[i] = zeroTermDelta;
+        }
+      }
+    delta = automaticDelta;
+    }
+
+  this->m_VnlOptimizer->minimize( parameters, delta );
+  bestPosition = parameters;
+  double bestValue = adaptor->f( bestPosition );
+  //multiple restart heuristic
+  if( this->m_OptimizeWithRestarts )
+    {
+    this->m_CurrentIteration = static_cast<unsigned int>( m_VnlOptimizer->get_num_evaluations() );
+    bool converged = false;
+    unsigned int i=1;
+    while( !converged && ( this->m_CurrentIteration < m_NumberOfIterations ) )
+      {
+      this->m_VnlOptimizer->set_max_iterations(
+        static_cast< int >( this->m_NumberOfIterations - this->m_CurrentIteration ) );
+      parameters = bestPosition;
+      delta = delta*( 1.0/pow( 2.0, static_cast<double>(i) ) *
+                     (rand() > RAND_MAX/2 ? 1 : -1) );
+      m_VnlOptimizer->minimize( parameters, delta );
+      this->m_CurrentIteration += static_cast<unsigned int>
+                          (m_VnlOptimizer->get_num_evaluations());
+      double currentValue = adaptor->f( parameters );
+      // be consistent with the underlying vnl amoeba implementation
+      double maxAbs = 0.0;
+      for( unsigned j=0; j<n; j++ )
+        {
+        if( maxAbs< fabs( bestPosition[j] - parameters[j] ) )
+          {
+          maxAbs = fabs( bestPosition[j] - parameters[j] );
+          }
+        }
+      converged = fabs( bestValue - currentValue ) <
+                  this->m_FunctionConvergenceTolerance &&
+                  maxAbs < this->m_ParametersConvergenceTolerance;
+               //this comparison is valid because the
+               //adaptor is set to always return the function value
+               //corresponding to minimization
+      if( currentValue < bestValue )
+        {
+        bestValue = currentValue;
+        bestPosition = parameters;
+        }
+      i++;
+      }
+    }
+       // get the results, we scale the parameters down if scales are defined
+  if ( !this->GetScalesAreIdentity() )
+    {
+    for ( unsigned int i = 0; i < n; ++i )
+      {
+      bestPosition[i] /= scales[i];
+      }
+    }
+
+  this->m_Metric->SetParameters( bestPosition );
+
+  this->m_StopConditionDescription.str( "" );
+  this->m_StopConditionDescription << this->GetNameOfClass() << ": ";
+  if ( static_cast< unsigned int >( this->m_VnlOptimizer->get_num_evaluations() )
+       < this->m_NumberOfIterations )
+    {
+    this->m_StopConditionDescription << "Both parameters convergence tolerance ("
+                               << this->m_ParametersConvergenceTolerance
+                               << ") and function convergence tolerance ("
+                               << this->m_FunctionConvergenceTolerance
+                               << ") have been met in "
+                               << this->m_VnlOptimizer->get_num_evaluations()
+                               << " iterations.";
+    }
+  else
+    {
+    this->m_StopConditionDescription << "Maximum number of iterations exceeded."
+                                     << " Number of iterations is "
+                                     << this->m_NumberOfIterations;
+    }
+  this->InvokeEvent( EndEvent() );
+}
+
+
+void
+AmoebaOptimizerv4
+::ValidateSettings()
+{
+  //if we got here it is safe to get the number of parameters the cost
+  //function expects
+  ParametersType parameters = this->m_Metric->GetParameters();
+  unsigned int n = parameters.GetSize();
+
+  //the user gave us data to use for the initial simplex, check that it
+  //matches the number of parameters (simplex dimension is n+1 - the initial
+  //position and n vertices defined by adding m_InitialSimplexDelta[i] to
+  //the initial position
+  if( !m_AutomaticInitialSimplex )
+    {
+      if( m_InitialSimplexDelta.size() != n )
+      {
+      itkExceptionMacro(<<"cost function and simplex delta dimensions mismatch")
+      }
+    }
+
+  //check that the number of scale factors matches
+  if ( this->GetScalesInitialized() )
+    {
+    if( this->GetScales().Size() != n )
+      {
+      itkExceptionMacro(<<"cost function and scaling information dimensions mismatch")
+      }
+    }
+
+  //parameters' convergence tolerance has to be positive
+  if ( this->m_ParametersConvergenceTolerance < 0 )
+    {
+    itkExceptionMacro(<<"negative parameters convergence tolerance")
+    }
+  //function convergence tolerance has to be positive
+  if ( this->m_FunctionConvergenceTolerance < 0 )
+    {
+    itkExceptionMacro(<<"negative function convergence tolerance")
+    }
+}
+
+} // end namespace itk
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkLBFGSBOptimizerv4.cxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkLBFGSBOptimizerv4.cxx
new file mode 100644
index 0000000..9ab0061
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkLBFGSBOptimizerv4.cxx
@@ -0,0 +1,296 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#include "itkLBFGSBOptimizerv4.h"
+
+namespace itk
+{
+/** \class LBFGSBOptimizerHelperv4
+ * \brief Wrapper helper around vnl_lbfgsb.
+ *
+ * This class is used to translate iteration events, etc, from
+ * vnl_lbfgsb into iteration events in ITK.
+ */
+class LBFGSBOptimizerHelperv4:
+public LBFGSOptimizerBaseHelperv4<vnl_lbfgsb>
+{
+  public:
+  typedef LBFGSBOptimizerHelperv4                  Self;
+  typedef LBFGSOptimizerBaseHelperv4<vnl_lbfgsb>   Superclass;
+
+  /** Create with a reference to the ITK object */
+  LBFGSBOptimizerHelperv4(vnl_cost_function & f,
+                          LBFGSBOptimizerv4 * const itkObj);
+
+  protected:
+  /** Handle new iteration event */
+  virtual bool report_iter();
+};
+
+/** Create with a reference to the ITK object */
+LBFGSBOptimizerHelperv4
+::LBFGSBOptimizerHelperv4(vnl_cost_function & f, LBFGSBOptimizerv4 * const itkObj):
+  Superclass::LBFGSOptimizerBaseHelperv4(f, itkObj)
+{
+}
+
+/** Handle new iteration event */
+bool
+LBFGSBOptimizerHelperv4
+::report_iter()
+{
+  Superclass::report_iter();
+
+  m_ItkObj->m_InfinityNormOfProjectedGradient = this->get_inf_norm_projected_gradient();
+  m_ItkObj->InvokeEvent( IterationEvent() );
+  m_ItkObj->m_CurrentIteration = this->num_iterations_;
+
+    // Return true to terminate the optimization loop.
+  if ( this->num_iterations_ > m_ItkObj->m_MaximumNumberOfIterations )
+    {
+    return true;
+    }
+  else
+    {
+    return false;
+    }
+}
+//-------------------------------------------------------------------------
+
+LBFGSBOptimizerv4
+  ::LBFGSBOptimizerv4():
+  m_MaximumNumberOfCorrections(5),
+  m_InitialPosition(0),
+  m_LowerBound(0),
+  m_UpperBound(0),
+  m_BoundSelection(0)
+{
+}
+
+LBFGSBOptimizerv4
+::~LBFGSBOptimizerv4()
+{
+}
+
+void
+LBFGSBOptimizerv4
+::PrintSelf(std::ostream & os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+
+  os << indent << "InitialPosition: " << m_InitialPosition << std::endl;
+  os << indent << "CurrentPosition: " << this->GetCurrentPosition() << std::endl;
+
+  os << indent << "LowerBound: " << m_LowerBound << std::endl;
+  os << indent << "UpperBound: " << m_UpperBound << std::endl;
+  os << indent << "BoundSelection: " << m_BoundSelection << std::endl;
+
+  os << indent << "CostFunctionConvergenceFactor: "
+  << m_CostFunctionConvergenceFactor << std::endl;
+
+  os << indent << "MaximumNumberOfEvaluations: "
+  << m_MaximumNumberOfFunctionEvaluations << std::endl;
+
+  os << indent << "MaximumNumberOfCorrections: "
+  << m_MaximumNumberOfCorrections << std::endl;
+
+  os << indent << "Value: "
+  << this->GetValue() << std::endl;
+
+  os << indent << "InfinityNormOfProjectedGradient: "
+  << this->m_InfinityNormOfProjectedGradient << std::endl;
+
+  if ( this->m_VnlOptimizer )
+    {
+    os << indent << "Vnl LBFGSB Failure Code: "
+    << this->m_VnlOptimizer->get_failure_code() << std::endl;
+    }
+}
+
+void
+LBFGSBOptimizerv4
+::SetScales(const ScalesType &)
+{
+  std::cout << "WARNING: LBFGSB optimizer does not support scaling. All scales are set to one." << std::endl;
+  m_Scales.SetSize( this->m_Metric->GetNumberOfLocalParameters() );
+  m_Scales.Fill( NumericTraits<ScalesType::ValueType>::OneValue() );
+  this->m_ScalesAreIdentity = true;
+}
+
+void
+LBFGSBOptimizerv4
+::SetInitialPosition(const ParametersType & param)
+{
+  m_InitialPosition = param;
+  this->Modified();
+}
+
+void
+LBFGSBOptimizerv4
+::SetLowerBound(
+  const BoundValueType & value)
+{
+  this->m_LowerBound = value;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->set_lower_bound(m_LowerBound);
+    }
+  this->Modified();
+}
+
+void
+LBFGSBOptimizerv4
+::SetUpperBound(
+  const BoundValueType & value)
+{
+  this->m_UpperBound = value;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->set_upper_bound(m_UpperBound);
+    }
+  this->Modified();
+}
+
+void
+LBFGSBOptimizerv4
+::SetBoundSelection(
+  const BoundSelectionType & value)
+{
+  m_BoundSelection = value;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->set_bound_selection( m_BoundSelection );
+    }
+  this->Modified();
+}
+
+void
+LBFGSBOptimizerv4
+::SetCostFunctionConvergenceFactor(double value)
+{
+  if ( value < 0.0 )
+    {
+    itkExceptionMacro("Value " << value
+                      << " is too small for SetCostFunctionConvergenceFactor()"
+                      << "a typical range would be from 0.0 to 1e+12");
+    }
+  m_CostFunctionConvergenceFactor = value;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->set_cost_function_convergence_factor( m_CostFunctionConvergenceFactor );
+    }
+  this->Modified();
+}
+
+void
+LBFGSBOptimizerv4
+::SetMaximumNumberOfCorrections(unsigned int value)
+{
+  m_MaximumNumberOfCorrections = value;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->set_max_variable_metric_corrections( m_MaximumNumberOfCorrections );
+    }
+  this->Modified();
+}
+
+void
+LBFGSBOptimizerv4
+::SetMetric(MetricType *metric)
+{
+  Superclass::SetMetric( metric );
+
+  CostFunctionAdaptorType *adaptor = this->GetCostFunctionAdaptor();
+
+  m_VnlOptimizer.Reset();
+  m_VnlOptimizer.TakeOwnership( new InternalOptimizerType( *adaptor, this ) );
+
+  // set the optimizer parameters
+  m_VnlOptimizer->set_trace( m_Trace );
+  m_VnlOptimizer->set_lower_bound( m_LowerBound );
+  m_VnlOptimizer->set_upper_bound( m_UpperBound );
+  m_VnlOptimizer->set_bound_selection( m_BoundSelection );
+  m_VnlOptimizer->set_cost_function_convergence_factor( m_CostFunctionConvergenceFactor );
+  m_VnlOptimizer->set_projected_gradient_tolerance( m_GradientConvergenceTolerance );
+  m_VnlOptimizer->set_max_function_evals( static_cast< int >( m_MaximumNumberOfFunctionEvaluations ) );
+  m_VnlOptimizer->set_max_variable_metric_corrections( m_MaximumNumberOfCorrections );
+
+  m_OptimizerInitialized = true;
+
+  this->Modified();
+}
+
+void
+LBFGSBOptimizerv4
+::StartOptimization(bool /*doOnlyInitialization*/ )
+{
+  // Perform some verification, check scales,
+  // pass settings to cost-function adaptor.
+  Superclass::StartOptimization();
+
+  // Check if all the bounds parameters are the same size as the initial
+  // parameters.
+  unsigned int numberOfParameters = m_Metric->GetNumberOfParameters();
+
+  if ( this->GetInitialPosition().Size() < numberOfParameters )
+    {
+    std::cout << "Set the initial position of the optimizer:" << std::endl;
+    this->SetInitialPosition( m_Metric->GetParameters() );
+    }
+
+  if ( m_LowerBound.size() < numberOfParameters && !m_BoundSelection.is_zero() )
+    {
+    itkExceptionMacro(<< "LowerBound array does not have sufficient number of elements");
+    }
+
+  if ( m_UpperBound.size() < numberOfParameters && !m_BoundSelection.is_zero() )
+    {
+    itkExceptionMacro(<< "UppperBound array does not have sufficient number of elements");
+    }
+
+  if ( m_BoundSelection.size() < numberOfParameters )
+    {
+    itkExceptionMacro(<< "BoundSelection array does not have sufficient number of elements");
+    }
+
+  if(this->m_CostFunctionConvergenceFactor == 0.0 && this->m_GradientConvergenceTolerance == 0.0)
+    {
+    itkExceptionMacro("LBFGSB Optimizer cannot function if both CostFunctionConvergenceFactor"
+                      " and ProjectedGradienctTolerance are zero.");
+    }
+
+  ParametersType parameters( this->GetInitialPosition() );
+
+  this->InvokeEvent( StartEvent() );
+
+  // vnl optimizers return the solution by reference
+  // in the variable provided as initial position
+  m_VnlOptimizer->minimize(parameters);
+
+  if ( parameters.GetSize() != this->GetInitialPosition().Size() )
+    {
+    // set current position to initial position and throw an exception
+    this->m_Metric->SetParameters( this->GetInitialPosition() );
+    itkExceptionMacro(<< "Error occurred in optimization");
+    }
+
+  this->m_Metric->SetParameters( parameters );
+
+  this->InvokeEvent( EndEvent() );
+}
+
+} // end namespace itk
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkLBFGSOptimizerv4.cxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkLBFGSOptimizerv4.cxx
new file mode 100644
index 0000000..90b1acc
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkLBFGSOptimizerv4.cxx
@@ -0,0 +1,207 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#include "itkLBFGSOptimizerv4.h"
+
+namespace itk
+{
+LBFGSOptimizerv4
+  ::LBFGSOptimizerv4():
+  m_Verbose(false),
+  m_LineSearchAccuracy(0.9),
+  m_DefaultStepLength(1.0)
+{
+}
+
+LBFGSOptimizerv4
+::~LBFGSOptimizerv4()
+{
+}
+
+void
+LBFGSOptimizerv4
+::PrintSelf(std::ostream & os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+  os << indent << "LineSearchAccuracy: "
+     << m_LineSearchAccuracy << std::endl;
+  os << indent << "DefaultStepLength: "
+     << m_DefaultStepLength << std::endl;
+
+  if ( this->m_VnlOptimizer )
+    {
+    os << indent << "Vnl LBFGS Failure Code: "
+    << this->m_VnlOptimizer->get_failure_code() << std::endl;
+    }
+}
+
+void
+LBFGSOptimizerv4
+::VerboseOn()
+{
+  if ( m_Verbose == true )
+    {
+    return;
+    }
+
+  m_Verbose = true;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->set_verbose(true);
+    }
+
+  this->Modified();
+}
+
+void
+LBFGSOptimizerv4
+::VerboseOff()
+{
+  if ( m_Verbose == false )
+    {
+    return;
+    }
+
+  m_Verbose = false;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->set_verbose(false);
+    }
+
+  this->Modified();
+}
+
+void
+LBFGSOptimizerv4
+::SetLineSearchAccuracy(double f)
+{
+  if ( f == m_LineSearchAccuracy )
+    {
+    return;
+    }
+
+  m_LineSearchAccuracy = f;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->line_search_accuracy = m_LineSearchAccuracy;
+    }
+
+  this->Modified();
+}
+
+void
+LBFGSOptimizerv4
+::SetDefaultStepLength(double f)
+{
+  if ( f == m_DefaultStepLength )
+    {
+    return;
+    }
+
+  m_DefaultStepLength = f;
+  if ( m_OptimizerInitialized )
+    {
+    m_VnlOptimizer->default_step_length = m_DefaultStepLength;
+    }
+
+  this->Modified();
+}
+
+void
+LBFGSOptimizerv4
+::SetMetric(MetricType *metric)
+{
+  Superclass::SetMetric( metric );
+
+  // set the optimizer parameters
+  m_VnlOptimizer->set_trace( m_Trace );
+  m_VnlOptimizer->set_verbose( m_Verbose );
+  m_VnlOptimizer->set_max_function_evals( static_cast< int >( m_MaximumNumberOfFunctionEvaluations ) );
+  m_VnlOptimizer->set_g_tolerance( m_GradientConvergenceTolerance );
+  m_VnlOptimizer->line_search_accuracy = m_LineSearchAccuracy;
+  m_VnlOptimizer->default_step_length  = m_DefaultStepLength;
+  // set for debugging
+  //m_VnlOptimizer->set_check_derivatives( true );
+
+  m_OptimizerInitialized = true;
+
+  this->Modified();
+}
+
+void
+LBFGSOptimizerv4
+::StartOptimization(bool /* doOnlyInitialization */)
+{
+  // Perform some verification, check scales,
+  // pass settings to cost-function adaptor.
+  Superclass::StartOptimization();
+
+  // Note that it's tempting to use a reference to the parameters stored
+  // in the metric for efficiency.
+  ParametersType parameters = this->m_Metric->GetParameters();
+
+  if( parameters.GetSize() == 0 )
+    {
+    itkExceptionMacro(<<"Optimizer parameters are not initialized.");
+    }
+
+  // Scale the initial parameters up if scales are defined.
+  // This compensates for later scaling them down in "compute" function of
+  // the cost function adaptor and at the end of this function.
+  InternalParametersType vnlCompatibleParameters(parameters.GetSize());
+  const ScalesType & scales = this->GetScales();
+  for ( SizeValueType i = 0; i < parameters.GetSize(); ++i )
+    {
+    if( this->GetScalesAreIdentity() )
+      {
+      vnlCompatibleParameters[i] = parameters[i];
+      }
+    else
+      {
+      vnlCompatibleParameters[i] = parameters[i] * scales[i];
+      }
+    }
+
+  // vnl optimizers return the solution by reference
+  // in the variable provided as initial position.
+  // Also note that v4 registration always minimizes because v4 metrics return the negate value
+  // if the cost function should be maximized.
+  m_VnlOptimizer->minimize( vnlCompatibleParameters );
+
+  // Check if the output parameters are not null.
+  if ( vnlCompatibleParameters.size() != parameters.GetSize() )
+    {
+    itkExceptionMacro(<< "Error occurred in optimization. Optimized parameters and initial parameters are not the same size: "
+                      << vnlCompatibleParameters.size() << " vs. " << parameters.GetSize() );
+    }
+
+  // we scale the parameters down if scales are defined
+  for ( SizeValueType i = 0; i < vnlCompatibleParameters.size(); ++i )
+    {
+    if( this->GetScalesAreIdentity() )
+     {
+     parameters[i] = vnlCompatibleParameters[i];
+     }
+    else
+     {
+     parameters[i] = vnlCompatibleParameters[i] / scales[i];
+     }
+    }
+
+  this->m_Metric->SetParameters( parameters );
+}
+} // end namespace itk
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkSingleValuedNonLinearVnlOptimizerv4.cxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkSingleValuedNonLinearVnlOptimizerv4.cxx
new file mode 100644
index 0000000..2fca3df
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkSingleValuedNonLinearVnlOptimizerv4.cxx
@@ -0,0 +1,130 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#include "itkSingleValuedNonLinearVnlOptimizerv4.h"
+
+namespace itk
+{
+SingleValuedNonLinearVnlOptimizerv4
+::SingleValuedNonLinearVnlOptimizerv4()
+{
+  this->m_CostFunctionAdaptor = ITK_NULLPTR;
+  this->m_Command = CommandType::New();
+  this->m_Command->SetCallbackFunction(this,  &SingleValuedNonLinearVnlOptimizerv4::IterationReport);
+
+  this->m_CachedCurrentPosition.Fill( NumericTraits<DerivativeType::ValueType>::Zero );
+  this->m_CachedDerivative.Fill( NumericTraits<DerivativeType::ValueType>::Zero );
+}
+
+SingleValuedNonLinearVnlOptimizerv4
+::~SingleValuedNonLinearVnlOptimizerv4()
+{
+  if ( this->m_CostFunctionAdaptor )
+    {
+    delete this->m_CostFunctionAdaptor;
+    this->m_CostFunctionAdaptor = ITK_NULLPTR;
+    }
+}
+
+void
+SingleValuedNonLinearVnlOptimizerv4
+::StartOptimization(bool /* doOnlyInitialization */ )
+{
+  // Perform some verification, check scales.
+  Superclass::StartOptimization();
+
+  // Verify adaptor
+  if( this->m_CostFunctionAdaptor == ITK_NULLPTR )
+    {
+    itkExceptionMacro("CostFunctionAdaptor has not been set.");
+    }
+
+  // If the user provides the scales and they're not identity, then we set.
+  // Otherwise we don't set them for computation speed.
+  // These are managed at the optimizer level, but
+  // applied at the cost-function adaptor level because that's
+  // where the per-iteration results of the vnl optimizer are accessible.
+  if ( ! this->GetScalesAreIdentity() )
+    {
+    ScalesType scales = this->GetScales();
+    this->GetNonConstCostFunctionAdaptor()->SetScales(scales);
+    }
+}
+
+void
+SingleValuedNonLinearVnlOptimizerv4
+::SetCostFunctionAdaptor(CostFunctionAdaptorType *adaptor)
+{
+  if ( this->m_CostFunctionAdaptor == adaptor )
+    {
+    return;
+    }
+
+  if ( this->m_CostFunctionAdaptor )
+    {
+    delete this->m_CostFunctionAdaptor;
+    }
+
+  this->m_CostFunctionAdaptor = adaptor;
+
+  this->m_CostFunctionAdaptor->AddObserver(IterationEvent(), this->m_Command);
+}
+
+const SingleValuedNonLinearVnlOptimizerv4::CostFunctionAdaptorType *
+SingleValuedNonLinearVnlOptimizerv4
+::GetCostFunctionAdaptor(void) const
+{
+  return this->m_CostFunctionAdaptor;
+}
+
+SingleValuedNonLinearVnlOptimizerv4::CostFunctionAdaptorType *
+SingleValuedNonLinearVnlOptimizerv4
+::GetCostFunctionAdaptor(void)
+{
+  return this->m_CostFunctionAdaptor;
+}
+
+SingleValuedNonLinearVnlOptimizerv4::CostFunctionAdaptorType *
+SingleValuedNonLinearVnlOptimizerv4
+::GetNonConstCostFunctionAdaptor(void) const
+{
+  return this->m_CostFunctionAdaptor;
+}
+
+void
+SingleValuedNonLinearVnlOptimizerv4
+::IterationReport(const EventObject & event)
+{
+  const CostFunctionAdaptorType *adaptor = this->GetCostFunctionAdaptor();
+
+  this->m_CurrentMetricValue = adaptor->GetCachedValue();
+  this->m_CachedDerivative = adaptor->GetCachedDerivative();
+  this->m_CachedCurrentPosition = adaptor->GetCachedCurrentParameters();
+  this->InvokeEvent(event);
+}
+
+void
+SingleValuedNonLinearVnlOptimizerv4
+::PrintSelf(std::ostream & os, Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+  os << indent << "Cached Derivative: " << this->m_CachedDerivative << std::endl;
+  os << indent << "Cached current positiion: " << this->m_CachedCurrentPosition << std::endl;
+  os << "Command observer " << this->m_Command.GetPointer() << std::endl;
+  os << "Cost Function adaptor" << this->m_CostFunctionAdaptor << std::endl;
+}
+} // end namespace itk
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkSingleValuedVnlCostFunctionAdaptorv4.cxx b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkSingleValuedVnlCostFunctionAdaptorv4.cxx
new file mode 100644
index 0000000..6ffa939
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/src/itkSingleValuedVnlCostFunctionAdaptorv4.cxx
@@ -0,0 +1,194 @@
+/*=========================================================================
+ *
+ *  Copyright Insight Software Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0.txt
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *=========================================================================*/
+#include "itkSingleValuedVnlCostFunctionAdaptorv4.h"
+
+namespace itk
+{
+SingleValuedVnlCostFunctionAdaptorv4
+::SingleValuedVnlCostFunctionAdaptorv4(unsigned int spaceDimension):
+  vnl_cost_function(spaceDimension)
+{
+  m_ScalesInitialized = false;
+  m_Reporter = Object::New();
+  m_CachedValue = NumericTraits< MeasureType >::Zero;
+  m_CachedDerivative.Fill(0);
+}
+
+void
+SingleValuedVnlCostFunctionAdaptorv4
+::SetScales(const ScalesType & scales)
+{
+  m_Scales = scales;
+  m_ScalesInitialized = true;
+}
+
+SingleValuedVnlCostFunctionAdaptorv4::InternalMeasureType
+SingleValuedVnlCostFunctionAdaptorv4
+::f(const InternalParametersType & inparameters)
+{
+  if ( !m_ObjectMetric )
+    {
+    itkGenericExceptionMacro(
+      << "Attempt to use a SingleValuedVnlCostFunctionAdaptorv4 without any Metric plugge d in");
+    }
+
+  // Use scales if they are provided
+  ParametersType parameters( inparameters.size() );
+  if ( m_ScalesInitialized )
+    {
+    for ( SizeValueType i = 0; i < parameters.GetSize(); ++i )
+      {
+      parameters[i] = inparameters[i] / m_Scales[i];
+      }
+    }
+  else
+    {
+    parameters.SetData( const_cast< double * >( inparameters.data_block() ) );
+    }
+
+  this->m_ObjectMetric->SetParameters( parameters );
+  InternalMeasureType value = static_cast< InternalMeasureType >( m_ObjectMetric->GetValue() );
+
+  // Notify observers. This is used for overcoming the limitaion of VNL
+  // optimizers of not providing callbacks per iteration.
+  m_CachedValue = value;
+  this->ReportIteration( FunctionEvaluationIterationEvent() );
+
+  return value;
+}
+
+void
+SingleValuedVnlCostFunctionAdaptorv4
+::gradf(const InternalParametersType & inparameters, InternalDerivativeType & gradient)
+{
+  if ( !m_ObjectMetric )
+    {
+    itkGenericExceptionMacro("Attempt to use a SingleValuedVnlCostFunctionAdaptorv4 without any Metric plugged in");
+    }
+
+  // Use scales if they are provided
+  ParametersType parameters( inparameters.size() );
+  if ( m_ScalesInitialized )
+    {
+    for ( SizeValueType i = 0; i < parameters.GetSize(); ++i )
+      {
+      parameters[i] = inparameters[i] / m_Scales[i];
+      }
+    }
+  else
+    {
+    parameters.SetData( const_cast< double * >( inparameters.data_block() ) );
+    }
+
+  // Delegate computation of the gradient to the ObjectMetric
+  this->m_ObjectMetric->SetParameters( parameters );
+  this->m_ObjectMetric->GetDerivative( m_CachedDerivative );
+  // This will also scale gradient by user scales
+  this->ConvertExternalToInternalGradient( m_CachedDerivative, gradient );
+
+  // Notify observers. This is used for overcoming the limitaion of VNL
+  // optimizers of not providing callbacks per iteration.
+  // Note that m_CachedDerivative is already loaded in the GetDerivative()
+  // above.
+  this->ReportIteration( GradientEvaluationIterationEvent() );
+}
+
+void
+SingleValuedVnlCostFunctionAdaptorv4
+::compute(const InternalParametersType & x, InternalMeasureType *fun, InternalDerivativeType *g)
+{
+  // delegate the computation to the ObjectMetric
+  ParametersType parameters( x.size() );
+  double         measure;
+
+  if ( m_ScalesInitialized )
+    {
+    for ( SizeValueType i = 0; i < parameters.GetSize(); ++i )
+      {
+      parameters[i] = x[i] / m_Scales[i];
+      }
+    }
+  else
+    {
+    parameters.SetData( const_cast< double * >( x.data_block() ) );
+    }
+
+  this->m_ObjectMetric->SetParameters( parameters );
+  this->m_ObjectMetric->GetValueAndDerivative( measure, m_CachedDerivative );
+  if ( g ) // sometimes Vnl doesn't pass a valid pointer
+    {
+    this->ConvertExternalToInternalGradient(m_CachedDerivative, *g);
+    }
+  if ( fun ) // paranoids have longer lives...
+    {
+    *fun = static_cast< InternalMeasureType >( measure );
+    // Notify observers. This is used for overcoming the limitaion of VNL
+    // optimizers of not providing callbacks per iteration.
+    // Note that m_CachedDerivative is already loaded in the GetDerivative()
+    // above.
+    m_CachedValue = *fun;
+    }
+  this->ReportIteration( FunctionAndGradientEvaluationIterationEvent() );
+}
+
+void
+SingleValuedVnlCostFunctionAdaptorv4
+::ConvertExternalToInternalGradient(const DerivativeType & input, InternalDerivativeType & output) const
+{
+  // Convert external derviative measures into internal type
+  const unsigned int size = input.GetSize();
+
+  output = InternalDerivativeType(size);
+  for ( SizeValueType i = 0; i < size; ++i )
+    {
+     output[i] = -input[i]; // because v4 metrics return the negate of gradient
+
+    if ( m_ScalesInitialized )
+      {
+      output[i] /= m_Scales[i];
+      }
+    }
+}
+
+void
+SingleValuedVnlCostFunctionAdaptorv4
+::ReportIteration(const EventObject & event) const
+{
+  // This method reports iterations events. It is intended to
+  // help monitoring the progress of the optimization process.
+  this->m_Reporter->InvokeEvent(event);
+}
+
+unsigned long
+SingleValuedVnlCostFunctionAdaptorv4
+::AddObserver(const EventObject & event, Command *command) const
+{
+  // Connects a Command/Observer to the internal reporter class.
+  // This is useful for reporting iteration event to potential observers.
+  return m_Reporter->AddObserver(event, command);
+}
+
+const SingleValuedVnlCostFunctionAdaptorv4::ParametersType &
+SingleValuedVnlCostFunctionAdaptorv4
+::GetCachedCurrentParameters() const
+{
+  // Return the cached value of the parameters used for computing the function.
+  return this->m_ObjectMetric->GetParameters();
+}
+
+} // end namespace itk
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerBasev4.wrap b/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerBasev4.wrap
new file mode 100644
index 0000000..74f5a6c
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerBasev4.wrap
@@ -0,0 +1,7 @@
+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
+itk_wrap_include("itkGradientDescentOptimizerBasev4.h")
+itk_wrap_class("itk::GradientDescentOptimizerBasev4Template" POINTER)
+  foreach(t ${WRAP_ITK_REAL})
+    itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
+  endforeach(t)
+itk_end_wrap_class()
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap b/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap
index d53a176..3236448 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkGradientDescentOptimizerv4.wrap
@@ -1,3 +1,7 @@
-itk_wrap_simple_class("itk::ObjectToObjectOptimizerBase" POINTER)
-itk_wrap_simple_class("itk::GradientDescentOptimizerBasev4" POINTER)
-itk_wrap_simple_class("itk::GradientDescentOptimizerv4" POINTER)
+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
+itk_wrap_include("itkGradientDescentOptimizerv4.h")
+itk_wrap_class("itk::GradientDescentOptimizerv4Template" POINTER)
+  foreach(t ${WRAP_ITK_REAL})
+    itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
+  endforeach(t)
+itk_end_wrap_class()
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap b/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap
new file mode 100644
index 0000000..61b2c44
--- /dev/null
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkObjectToObjectOptimizerBase.wrap
@@ -0,0 +1,7 @@
+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
+itk_wrap_include("itkObjectToObjectOptimizerBase.h")
+itk_wrap_class("itk::ObjectToObjectOptimizerBaseTemplate" POINTER)
+  foreach(t ${WRAP_ITK_REAL})
+    itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
+  endforeach(t)
+itk_end_wrap_class()
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkOptimizerParameterScalesEstimator.wrap b/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkOptimizerParameterScalesEstimator.wrap
index efd6a8c..a647ee4 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkOptimizerParameterScalesEstimator.wrap
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkOptimizerParameterScalesEstimator.wrap
@@ -1 +1,7 @@
-itk_wrap_simple_class("itk::OptimizerParameterScalesEstimator" POINTER)
+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
+itk_wrap_include("itkOptimizerParameterScalesEstimator.h")
+itk_wrap_class("itk::OptimizerParameterScalesEstimatorTemplate" POINTER)
+  foreach(t ${WRAP_ITK_REAL})
+    itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
+  endforeach(t)
+itk_end_wrap_class()
diff --git a/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap b/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap
index 4a43dd4..7eed11c 100644
--- a/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap
+++ b/Utilities/ITK/Modules/Numerics/Optimizersv4/wrapping/itkQuasiNewtonOptimizerv4.wrap
@@ -1 +1,7 @@
-itk_wrap_simple_class("itk::QuasiNewtonOptimizerv4" POINTER)
+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
+itk_wrap_include("itkQuasiNewtonOptimizerv4.h")
+itk_wrap_class("itk::QuasiNewtonOptimizerv4Template" POINTER)
+  foreach(t ${WRAP_ITK_REAL})
+    itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
+  endforeach(t)
+itk_end_wrap_class()
diff --git a/Utilities/ITK/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h b/Utilities/ITK/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h
index 9b654f9..bdda186 100644
--- a/Utilities/ITK/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h
+++ b/Utilities/ITK/Modules/Numerics/Polynomials/include/itkMultivariateLegendrePolynomial.h
@@ -213,11 +213,12 @@ public:
   class SimpleForwardIterator
   {
 public:
-    SimpleForwardIterator (MultivariateLegendrePolynomial *polynomial)
+    SimpleForwardIterator (MultivariateLegendrePolynomial *polynomial) :
+      m_MultivariateLegendrePolynomial(polynomial),
+      m_Dimension  (m_MultivariateLegendrePolynomial->GetDimension()),
+      m_DomainSize (m_MultivariateLegendrePolynomial->GetDomainSize()),
+      m_IsAtEnd(false)
     {
-      m_MultivariateLegendrePolynomial = polynomial;
-      m_Dimension   = m_MultivariateLegendrePolynomial->GetDimension();
-      m_DomainSize  = m_MultivariateLegendrePolynomial->GetDomainSize();
       m_Index.resize(m_Dimension);
       std::fill(m_Index.begin(), m_Index.end(), 0);
     }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkChiSquareDistribution.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkChiSquareDistribution.h
index d587bc0..a3e9ffd 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkChiSquareDistribution.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkChiSquareDistribution.h
@@ -72,16 +72,16 @@ public:
 
   /** Return the number of parameters.  For a Chi-Square
    * distribution, the number of parameters is 1 (degrees of freedom) */
-  virtual SizeValueType GetNumberOfParameters() const { return 1; }
+  virtual SizeValueType GetNumberOfParameters() const ITK_OVERRIDE { return 1; }
 
   /** Evaluate the probability density function (pdf). The parameters
    * of the distribution are  assigned via SetParameters().  */
-  virtual double EvaluatePDF(double x) const;
+  virtual double EvaluatePDF(double x) const ITK_OVERRIDE;
 
   /** Evaluate the probability density function (pdf). The parameters
    * for the distribution are passed as a parameters vector. The
    * ordering of the parameters is (degrees of freedom). */
-  virtual double EvaluatePDF(double x, const ParametersType &) const;
+  virtual double EvaluatePDF(double x, const ParametersType &) const ITK_OVERRIDE;
 
   /** Evaluate the probability density function (pdf). The parameters
    * of the distribution are passed as separate parameters. */
@@ -89,12 +89,12 @@ public:
 
   /** Evaluate the cumulative distribution function (cdf). The parameters
    * of the distribution are  assigned via SetParameters().  */
-  virtual double EvaluateCDF(double x) const;
+  virtual double EvaluateCDF(double x) const ITK_OVERRIDE;
 
   /** Evaluate the cumulative distribution function (cdf). The parameters
    * for the distribution are passed as a parameters vector. The
    * ordering of the parameters is (degreesOfFreedom). */
-  virtual double EvaluateCDF(double x, const ParametersType &) const;
+  virtual double EvaluateCDF(double x, const ParametersType &) const ITK_OVERRIDE;
 
   /** Evaluate the cumulative distribution function (cdf). The parameters
    * of the distribution are passed as separate parameters. */
@@ -103,13 +103,13 @@ public:
   /** Evaluate the inverse cumulative distribution function (inverse
    * cdf).  Parameter p must be between 0.0 and 1.0. The parameters
    * of the distribution are  assigned via SetParameters().  */
-  virtual double EvaluateInverseCDF(double p) const;
+  virtual double EvaluateInverseCDF(double p) const ITK_OVERRIDE;
 
   /** Evaluate the inverse cumulative distribution function (inverse
    * cdf).  Parameter p must be between 0.0 and 1.0.  The parameters
    * for the distribution are passed as a parameters vector. The
    * ordering of the parameters is (degrees of freedom). */
-  virtual double EvaluateInverseCDF(double p, const ParametersType &) const;
+  virtual double EvaluateInverseCDF(double p, const ParametersType &) const ITK_OVERRIDE;
 
   /** Evaluate the inverse cumulative distribution function (inverse
    * cdf).  Parameter p must be between 0.0 and 1.0.  The parameters
@@ -125,16 +125,16 @@ public:
   virtual SizeValueType GetDegreesOfFreedom() const;
 
   /** Does the Chi-Square distribution have a mean? */
-  virtual bool HasMean() const { return true; }
+  virtual bool HasMean() const ITK_OVERRIDE { return true; }
 
   /** Get the mean of the distribution. */
-  virtual double GetMean() const;
+  virtual double GetMean() const ITK_OVERRIDE;
 
   /** Does the Chi-Square distribution have a variance? */
-  virtual bool HasVariance() const { return true; }
+  virtual bool HasVariance() const ITK_OVERRIDE { return true; }
 
   /** Get the variance of the distribution. */
-  virtual double GetVariance() const;
+  virtual double GetVariance() const ITK_OVERRIDE;
 
   /** Static method to evaluate the probability density function (pdf)
    * of a Chi-Square with a specified number of degrees of freedom. The
@@ -198,7 +198,7 @@ protected:
   ChiSquareDistribution(void);
   virtual ~ChiSquareDistribution(void) {}
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   ChiSquareDistribution(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.h
index 127618c..d9aac11 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.h
@@ -64,63 +64,67 @@ public:
   itkTypeMacro(CovarianceSampleFilter, ProcessObject);
   itkNewMacro(Self);
 
-  /** Length of a measurement vector */
-  typedef typename TSample::MeasurementVectorSizeType MeasurementVectorSizeType;
+  /** Type of each measurement vector in sample */
+  typedef typename SampleType::MeasurementVectorType                  MeasurementVectorType;
 
-  /** Measurement vector type */
-  typedef typename TSample::MeasurementVectorType MeasurementVectorType;
+  /** Type of the length of each measurement vector */
+  typedef typename SampleType::MeasurementVectorSizeType              MeasurementVectorSizeType;
 
-  /** Type of vector elements */
-  typedef typename TSample::MeasurementType                           MeasurementType;
-  typedef typename NumericTraits< MeasurementType >::RealType         MeasurementRealType;
+  /** Type of measurement vector component value */
+  typedef typename SampleType::MeasurementType                        MeasurementType;
 
-  /** Type of the measurement vector type */
+  /** Type of a measurement vector, holding floating point values */
   typedef typename NumericTraits< MeasurementVectorType >::RealType   MeasurementVectorRealType;
 
-  /** Typedef for Covariance output */
-  typedef VariableSizeMatrix< double > MatrixType;
+  /** Type of a floating point measurement component value */
+  typedef typename NumericTraits< MeasurementType >::RealType         MeasurementRealType;
+
 
-  /** Method to set/get the sample */
+  /** Method to set the sample */
   using Superclass::SetInput;
   void SetInput(const SampleType *sample);
 
+  /** Method to get the sample */
   const SampleType *  GetInput() const;
 
-  /** VariableSizeMatrix is not a DataObject, we need to decorate it to push it down
-   * a ProcessObject's pipeline */
-  typedef  SimpleDataObjectDecorator< MatrixType > MatrixDecoratedType;
-
-  /** MeasurementVector is not a DataObject, we need to decorate it to push it down
-   * a ProcessObject's pipeline */
-  typedef  SimpleDataObjectDecorator< MeasurementVectorRealType > MeasurementVectorDecoratedType;
 
-  typedef MeasurementVectorDecoratedType OutputType;
+  /** Type of covariance matrix output */
+  typedef VariableSizeMatrix< MeasurementRealType > MatrixType;
 
   /** Return the covariance matrix */
   const MatrixType GetCovarianceMatrix() const;
 
+  /** VariableSizeMatrix is not a DataObject, we need to decorate it to push it down
+   * a ProcessObject's pipeline */
+  typedef SimpleDataObjectDecorator< MatrixType > MatrixDecoratedType;
   const MatrixDecoratedType * GetCovarianceMatrixOutput() const;
 
+
   /** Return the mean vector */
   const MeasurementVectorRealType GetMean() const;
 
+  /** MeasurementVector is not a DataObject, we need to decorate it to push it down
+   * a ProcessObject's pipeline */
+  typedef SimpleDataObjectDecorator< MeasurementVectorRealType > MeasurementVectorDecoratedType;
   const MeasurementVectorDecoratedType * GetMeanOutput() const;
+  typedef MeasurementVectorDecoratedType                         OutputType;
+
 
   MeasurementVectorSizeType GetMeasurementVectorSize() const;
 
 protected:
   CovarianceSampleFilter();
   virtual ~CovarianceSampleFilter();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** DataObject pointer */
   typedef DataObject::Pointer DataObjectPointer;
 
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
 private:
   CovarianceSampleFilter(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx
index 20f6fad..d6dc0aa 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx
@@ -76,7 +76,7 @@ CovarianceSampleFilter< TSample >
     {
     MatrixType covarianceMatrix(measurementVectorSize, measurementVectorSize);
     covarianceMatrix.SetIdentity();
-    MatrixDecoratedType::Pointer decoratedCovarianceMatrix = MatrixDecoratedType::New();
+    typename MatrixDecoratedType::Pointer decoratedCovarianceMatrix = MatrixDecoratedType::New();
     decoratedCovarianceMatrix->Set(covarianceMatrix);
     return decoratedCovarianceMatrix.GetPointer();
     }
@@ -86,7 +86,7 @@ CovarianceSampleFilter< TSample >
     MeasurementVectorRealType mean;
     (void)mean; // for complainty pants : valgrind
     NumericTraits<MeasurementVectorRealType>::SetLength(mean, this->GetMeasurementVectorSize());
-    mean.Fill( NumericTraits< MeasurementRealType >::Zero );
+    // NumericTraits::SetLength also initializes array to zero
     typename MeasurementVectorDecoratedType::Pointer decoratedMean = MeasurementVectorDecoratedType::New();
     decoratedMean->Set( mean );
     return decoratedMean.GetPointer();
@@ -125,6 +125,7 @@ inline void
 CovarianceSampleFilter< TSample >
 ::GenerateData()
 {
+  // set up input / output
   const SampleType *input = this->GetInput();
 
   MeasurementVectorSizeType measurementVectorSize = input->GetMeasurementVectorSize();
@@ -133,47 +134,46 @@ CovarianceSampleFilter< TSample >
     itkDynamicCastInDebugMode< MatrixDecoratedType * >( this->ProcessObject::GetOutput(0) );
 
   MatrixType output = decoratedOutput->Get();
+  output.SetSize( measurementVectorSize, measurementVectorSize );
+  output.Fill( NumericTraits< typename MatrixType::ValueType >::Zero );
 
   MeasurementVectorDecoratedType *decoratedMeanOutput =
-    itkDynamicCastInDebugMode< MeasurementVectorDecoratedType * >(this->ProcessObject::GetOutput(1));
+    itkDynamicCastInDebugMode< MeasurementVectorDecoratedType * >( this->ProcessObject::GetOutput(1) );
 
-  output.SetSize(measurementVectorSize, measurementVectorSize);
-  output.Fill(0.0);
-
-  double totalFrequency = 0.0;
-
-  typename TSample::ConstIterator iter = input->Begin();
-  typename TSample::ConstIterator end = input->End();
-
-  MeasurementVectorRealType diff;
-  MeasurementVectorType measurements;
-
-  NumericTraits<MeasurementVectorRealType>::SetLength(diff, measurementVectorSize);
-  NumericTraits<MeasurementVectorType>::SetLength(measurements, measurementVectorSize);
-
-  typedef MeanSampleFilter< TSample > MeanFilterType;
+  // calculate mean
+  typedef MeanSampleFilter< SampleType > MeanFilterType;
   typename MeanFilterType::Pointer meanFilter = MeanFilterType::New();
 
   meanFilter->SetInput( input );
   meanFilter->Update();
 
-  const typename MeanFilterType::MeasurementVectorDecoratedType * decorator = meanFilter->GetOutput();
-  const typename MeanFilterType::MeasurementVectorRealType mean = decorator->Get();
-
+  const typename MeanFilterType::MeasurementVectorRealType mean = meanFilter->GetMean();
   decoratedMeanOutput->Set( mean );
 
-  iter = input->Begin();
+  // covariance algorithm
+  MeasurementVectorRealType diff;
+  NumericTraits<MeasurementVectorRealType>::SetLength( diff, measurementVectorSize );
+
+  typedef typename SampleType::TotalAbsoluteFrequencyType TotalFrequencyType;
+  TotalFrequencyType totalFrequency = NumericTraits< TotalFrequencyType >::Zero;
+
+  typename SampleType::ConstIterator iter =      input->Begin();
+  const typename SampleType::ConstIterator end = input->End();
 
   // fills the lower triangle and the diagonal cells in the covariance matrix
-  while ( iter != end )
+  for (; iter != end; ++iter )
     {
-    const double frequency = iter.GetFrequency();
+    const MeasurementVectorType & measurement = iter.GetMeasurementVector();
+
+    const typename SampleType::AbsoluteFrequencyType frequency = iter.GetFrequency();
     totalFrequency += frequency;
-    measurements = iter.GetMeasurementVector();
 
-    for ( unsigned int i = 0; i < measurementVectorSize; ++i )
+    for ( unsigned int dim = 0; dim < measurementVectorSize; ++dim )
       {
-      diff[i] = static_cast< MeasurementRealType >( measurements[i] ) - mean[i];
+      const MeasurementRealType component =
+        static_cast< MeasurementRealType >( measurement[dim] );
+
+      diff[dim] = ( component - mean[dim] );
       }
 
     // updates the covariance matrix
@@ -181,10 +181,10 @@ CovarianceSampleFilter< TSample >
       {
       for ( unsigned int col = 0; col < row + 1; ++col )
         {
-        output(row, col) += frequency * diff[row] * diff[col];
+        output(row, col) +=
+          ( static_cast< MeasurementRealType >( frequency ) * diff[row] * diff[col] );
         }
       }
-    ++iter;
     }
 
   // fills the upper triangle using the lower triangle
@@ -196,23 +196,21 @@ CovarianceSampleFilter< TSample >
       }
     }
 
-  if( totalFrequency - 1.0 > vnl_math::eps )
+  const double normalizationFactor =
+    ( static_cast< MeasurementRealType >( totalFrequency ) - 1.0 );
+
+  if( normalizationFactor > vnl_math::eps )
     {
-    const double factor = 1.0 / ( totalFrequency - 1.0 );
+    const double inverseNormalizationFactor = 1.0 / normalizationFactor;
 
-    for ( unsigned int col = 0; col < measurementVectorSize; ++col )
-      {
-      for ( unsigned int row = 0; row < measurementVectorSize; ++row )
-        {
-        output(col, row) *= factor;
-        }
-      }
-    decoratedOutput->Set(output);
+    output *= inverseNormalizationFactor;
     }
   else
     {
     itkExceptionMacro("Total Frequency was too close to 1.0. Value = " << totalFrequency );
     }
+
+  decoratedOutput->Set( output );
 }
 
 template< typename TSample >
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h
index 42b1d1c..9820dcd 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkDenseFrequencyContainer2.h
@@ -106,7 +106,7 @@ public:
 protected:
   DenseFrequencyContainer2();
   virtual ~DenseFrequencyContainer2() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   DenseFrequencyContainer2(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.hxx
index a214d48..7f2c8ce 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkEuclideanDistanceMetric.hxx
@@ -47,7 +47,7 @@ EuclideanDistanceMetric< TVector >
     sumOfSquares += temp * temp;
     }
 
-  const double distance = vcl_sqrt(sumOfSquares);
+  const double distance = std::sqrt(sumOfSquares);
 
   return distance;
 }
@@ -74,7 +74,7 @@ EuclideanDistanceMetric< TVector >
     sumOfSquares += temp * temp;
     }
 
-  const double distance = vcl_sqrt(sumOfSquares);
+  const double distance = std::sqrt(sumOfSquares);
 
   return distance;
 }
@@ -86,7 +86,7 @@ EuclideanDistanceMetric< TVector >
 {
   const double temp = a - b;
 
-  return vcl_abs(temp);
+  return std::abs(temp);
 }
 } // end of namespace Statistics
 } // end of namespace itk
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h
index e1d6a2c..667700f 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h
@@ -170,7 +170,7 @@ public:
 protected:
   ExpectationMaximizationMixtureModelEstimator();
   virtual ~ExpectationMaximizationMixtureModelEstimator() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   bool CalculateDensities();
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx
index 422746c..912e7d5 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx
@@ -27,15 +27,14 @@ namespace Statistics
 {
 template< typename TSample >
 ExpectationMaximizationMixtureModelEstimator< TSample >
-::ExpectationMaximizationMixtureModelEstimator()
+::ExpectationMaximizationMixtureModelEstimator() :
+  m_Sample(ITK_NULLPTR),
+  m_MaxIteration(100),
+  m_CurrentIteration(0),
+  m_TerminationCode(NOT_CONVERGED),
+  m_MembershipFunctionsObject           (MembershipFunctionVectorObjectType::New()),
+  m_MembershipFunctionsWeightArrayObject(MembershipFunctionsWeightsArrayObjectType::New())
 {
-  m_TerminationCode = NOT_CONVERGED;
-
-  m_MembershipFunctionsObject            = MembershipFunctionVectorObjectType::New();
-  m_MembershipFunctionsWeightArrayObject =
-    MembershipFunctionsWeightsArrayObjectType::New();
-  m_Sample = 0;
-  m_MaxIteration = 100;
 }
 
 template< typename TSample >
@@ -264,7 +263,7 @@ ExpectationMaximizationMixtureModelEstimator< TSample >
       // the log may blow up
       if( temp > NumericTraits<double>::epsilon() )
         {
-        logProportion = vcl_log( temp );
+        logProportion = std::log( temp );
         }
       else
         {
@@ -277,7 +276,7 @@ ExpectationMaximizationMixtureModelEstimator< TSample >
                GetWeight(measurementVectorIndex);
         if( temp > NumericTraits<double>::epsilon() )
           {
-          sum += temp * ( logProportion + vcl_log( temp ) );
+          sum += temp * ( logProportion + std::log( temp ) );
           }
         else
           {
@@ -306,7 +305,7 @@ ExpectationMaximizationMixtureModelEstimator< TSample >
     component->Update();
     if ( component->AreParametersModified() )
       {
-      return true;
+      updated = true;
       }
     }
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianDistribution.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianDistribution.h
index 7fc5d57..73769d7 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianDistribution.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianDistribution.h
@@ -75,16 +75,16 @@ public:
 
   /** Return the number of parameters.  For a univariate Gaussian,
    * this is 2 (mean, variance). */
-  virtual SizeValueType GetNumberOfParameters() const { return 2; }
+  virtual SizeValueType GetNumberOfParameters() const ITK_OVERRIDE { return 2; }
 
   /** Evaluate the probability density function (pdf). The parameters
    * of the distribution are  assigned via SetParameters().  */
-  virtual double EvaluatePDF(double x) const;
+  virtual double EvaluatePDF(double x) const ITK_OVERRIDE;
 
   /** Evaluate the probability density function (pdf). The parameters
    * for the distribution are passed as a parameters vector. The
    * ordering of the parameters is (mean, variance). */
-  virtual double EvaluatePDF(double x, const ParametersType &) const;
+  virtual double EvaluatePDF(double x, const ParametersType &) const ITK_OVERRIDE;
 
   /** Evaluate the probability density function (pdf). The parameters
    * of the distribution are passed as separate parameters. */
@@ -92,12 +92,12 @@ public:
 
   /** Evaluate the cumulative distribution function (cdf). The parameters
    * of the distribution are  assigned via SetParameters().  */
-  virtual double EvaluateCDF(double x) const;
+  virtual double EvaluateCDF(double x) const ITK_OVERRIDE;
 
   /** Evaluate the cumulative distribution function (cdf). The parameters
    * for the distribution are passed as a parameters vector. The
    * ordering of the parameters is (mean, variance). */
-  virtual double EvaluateCDF(double x, const ParametersType &) const;
+  virtual double EvaluateCDF(double x, const ParametersType &) const ITK_OVERRIDE;
 
   /** Evaluate the cumulative distribution function (cdf). The parameters
    * of the distribution are passed as separate parameters. */
@@ -106,13 +106,13 @@ public:
   /** Evaluate the inverse cumulative distribution function (inverse
    * cdf).  Parameter p must be between 0.0 and 1.0. The parameters
    * of the distribution are  assigned via SetParameters().  */
-  virtual double EvaluateInverseCDF(double p) const;
+  virtual double EvaluateInverseCDF(double p) const ITK_OVERRIDE;
 
   /** Evaluate the inverse cumulative distribution function (inverse
    * cdf).  Parameter p must be between 0.0 and 1.0.  The parameters
    * for the distribution are passed as a parameters vector. The
    * ordering of the parameters is (mean, variance). */
-  virtual double EvaluateInverseCDF(double p, const ParametersType &) const;
+  virtual double EvaluateInverseCDF(double p, const ParametersType &) const ITK_OVERRIDE;
 
   /** Evaluate the inverse cumulative distribution function (inverse
    * cdf).  Parameter p must be between 0.0 and 1.0.  The parameters
@@ -127,10 +127,10 @@ public:
 
   /** Get the mean of the Gaussian distribution. Defaults to 0.0. The
    * mean is stored in position 0 of the parameters vector. */
-  virtual double GetMean() const;
+  virtual double GetMean() const ITK_OVERRIDE;
 
   /** Does this distribution have a mean? */
-  virtual bool HasMean() const { return true; }
+  virtual bool HasMean() const ITK_OVERRIDE { return true; }
 
   /** Set the variance of the Gaussian distribution.  Defaults
    * to 1.0. The variance is stored in position 1 of the parameters
@@ -139,10 +139,10 @@ public:
 
   /** Get the variance of the Gaussian distribution. Defaults to
    * 1.0. The variance is stored in position 1 of the parameters vector. */
-  virtual double GetVariance() const;
+  virtual double GetVariance() const ITK_OVERRIDE;
 
   /** Does this distribution have a variance? */
-  virtual bool HasVariance() const { return true; }
+  virtual bool HasVariance() const ITK_OVERRIDE { return true; }
 
   /** Static method to evaluate the probability density function (pdf)
    * of a standardized (mean zero, unit variance) Gaussian. The static
@@ -233,7 +233,7 @@ protected:
   GaussianDistribution(void);
   virtual ~GaussianDistribution(void) {}
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   GaussianDistribution(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx
index b2c67e1..70e30ed 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx
@@ -31,7 +31,7 @@ GaussianMembershipFunction< TMeasurementVector >
   NumericTraits<MeanVectorType>::SetLength(m_Mean, this->GetMeasurementVectorSize());
   m_Mean.Fill( 0.0 );
 
-  m_PreFactor = 1.0 / vcl_sqrt(2.0 * vnl_math::pi); // default univariate
+  m_PreFactor = 1.0 / std::sqrt(2.0 * vnl_math::pi); // default univariate
 
   m_Covariance.SetSize(this->GetMeasurementVectorSize(), this->GetMeasurementVectorSize());
   m_Covariance.SetIdentity();
@@ -136,13 +136,13 @@ GaussianMembershipFunction< TMeasurementVector >
 
     // calculate coefficient C of multivariate gaussian
     m_PreFactor =
-      1.0 / ( vcl_sqrt(det) *
-        vcl_pow( vcl_sqrt(2.0 * vnl_math::pi),
+      1.0 / ( std::sqrt(det) *
+        std::pow( std::sqrt(2.0 * vnl_math::pi),
                static_cast< double >( this->GetMeasurementVectorSize() ) ) );
     }
   else
     {
-    const double aLargeDouble = vcl_pow(NumericTraits<double>::max(), 1.0/3.0)
+    const double aLargeDouble = std::pow(NumericTraits<double>::max(), 1.0/3.0)
       / (double) this->GetMeasurementVectorSize();
     m_InverseCovariance.SetIdentity();
     m_InverseCovariance *= aLargeDouble;
@@ -173,7 +173,7 @@ GaussianMembershipFunction< TMeasurementVector >
   double temp = dot_product( tempVector,
                              m_InverseCovariance.GetVnlMatrix() * tempVector );
 
-  temp = vcl_exp(-0.5 * temp);
+  temp = std::exp(-0.5 * temp);
 
   return m_PreFactor * temp;
 }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.hxx
index 8e691e5..6bcd3e9 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianMixtureModelComponent.hxx
@@ -177,7 +177,7 @@ GaussianMixtureModelComponent< TSample >
       }
     }
 
-  changes = vcl_sqrt(changes);
+  changes = std::sqrt(changes);
   return changes;
 }
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.hxx
index ed96703..ced22e1 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.hxx
@@ -69,7 +69,7 @@ GaussianRandomSpatialNeighborSubsampler<TSample, TRegion>
     {
     RealType randVar = this->m_RandomNumberGenerator->GetNormalVariate(mean,
                                                                        m_Variance);
-    randInt = static_cast<RandomIntType>(vcl_floor(randVar));
+    randInt = static_cast<RandomIntType>(std::floor(randVar));
     } while ((randInt < lowerBound) ||
              (randInt > upperBound));
   return randInt;
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogram.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogram.h
index 5647eae..3c7cd04 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogram.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogram.h
@@ -264,7 +264,11 @@ public:
 
   /** Increase the frequency of a measurement.  Frequency is
    * increased by the specified value. Returns false if the
-   * measurement is outside the bounds of the histogram. */
+   * measurement is outside the bounds of the histogram.
+   *
+   * \warning This function performs a dynamic allocation for the
+   * index length, and should not be used in tight per-pixel loops.
+   */
   bool IncreaseFrequencyOfMeasurement(
          const MeasurementVectorType & measurement,
          AbsoluteFrequencyType value);
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogram.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogram.hxx
index b067284..18bb97f 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogram.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogram.hxx
@@ -27,11 +27,13 @@ namespace Statistics
 {
 template< typename TMeasurement, typename TFrequencyContainer >
 Histogram< TMeasurement, TFrequencyContainer >
-::Histogram()
+::Histogram() :
+  m_Size(0),
+  m_OffsetTable(OffsetTableType(Superclass::GetMeasurementVectorSize() + 1)),
+  m_FrequencyContainer(FrequencyContainerType::New()),
+  m_NumberOfInstances(0),
+  m_ClipBinsAtEnds(true)
 {
-  this->m_ClipBinsAtEnds = true;
-  this->m_FrequencyContainer = FrequencyContainerType::New();
-  this->m_OffsetTable = OffsetTableType(this->GetMeasurementVectorSize() + 1);
   for ( unsigned int i = 0; i < this->GetMeasurementVectorSize() + 1; i++ )
     {
     this->m_OffsetTable[i] = itk::NumericTraits< InstanceIdentifier >::Zero;
@@ -741,8 +743,7 @@ Histogram< TMeasurement, TFrequencyContainer >
     os << this->m_OffsetTable[i] << "  ";
     }
   os << std::endl;
-  os << indent << "FrequencyContainerPointer: " << std::endl;
-  m_FrequencyContainer->Print( os,  indent.GetNextIndent() );
+  itkPrintSelfObjectMacro( FrequencyContainer );
 }
 
 template< typename TMeasurement, typename TFrequencyContainer >
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToEntropyImageFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToEntropyImageFilter.h
index e4dac1d..f94888b 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToEntropyImageFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToEntropyImageFilter.h
@@ -73,13 +73,13 @@ public:
       {
       const double p = static_cast< OutputPixelType >( A )
                        / static_cast< OutputPixelType >( m_TotalFrequency );
-      return static_cast< OutputPixelType >( ( -1 ) * p * vcl_log(p) / vcl_log(2.0) );
+      return static_cast< OutputPixelType >( ( -1 ) * p * std::log(p) / std::log(2.0) );
       }
     else
       {
       const double p = static_cast< OutputPixelType >( A + 1 )
                        / static_cast< OutputPixelType >( m_TotalFrequency );
-      return static_cast< OutputPixelType >( ( -1 ) * p * vcl_log(p) / vcl_log(2.0) );
+      return static_cast< OutputPixelType >( ( -1 ) * p * std::log(p) / std::log(2.0) );
       }
   }
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToLogProbabilityImageFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToLogProbabilityImageFilter.h
index 0e25cf8..faa3944 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToLogProbabilityImageFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToLogProbabilityImageFilter.h
@@ -66,15 +66,15 @@ public:
   {
     if ( A )
       {
-      return static_cast< OutputPixelType >( vcl_log( static_cast< OutputPixelType >( A )
+      return static_cast< OutputPixelType >( std::log( static_cast< OutputPixelType >( A )
                                                       / static_cast< OutputPixelType >( m_TotalFrequency ) )
-                                             / vcl_log(2.0) );
+                                             / std::log(2.0) );
       }
     else
       {   // Check for Log 0. Always assume that the frequency is atleast 1.
-      return static_cast< OutputPixelType >( vcl_log( static_cast< OutputPixelType >( A + 1 )
+      return static_cast< OutputPixelType >( std::log( static_cast< OutputPixelType >( A + 1 )
                                                       / static_cast< OutputPixelType >( m_TotalFrequency ) )
-                                             / vcl_log(2.0) );
+                                             / std::log(2.0) );
       }
   }
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h
index d733a6c..a5cc63c 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h
@@ -161,14 +161,14 @@ public:
 protected:
   HistogramToRunLengthFeaturesFilter();
   ~HistogramToRunLengthFeaturesFilter() {};
-  void PrintSelf(std::ostream& os, Indent indent) const;
+  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
 
   /** Make a DataObject to be used for output output. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType );
+  virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType ) ITK_OVERRIDE;
 
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
 private:
   HistogramToRunLengthFeaturesFilter(const Self&); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx
index 903ae1a..1004f00 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx
@@ -57,7 +57,7 @@ HistogramToRunLengthFeaturesFilter< THistogram>
 {
   if ( this->GetNumberOfInputs() < 1 )
     {
-    return 0;
+    return ITK_NULLPTR;
     }
   return itkDynamicCastInDebugMode<const HistogramType *>(this->ProcessObject::GetInput( 0 ) );
 }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h
index 97a3507..2f47a98 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h
@@ -204,14 +204,14 @@ public:
 protected:
   HistogramToTextureFeaturesFilter();
   ~HistogramToTextureFeaturesFilter() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Make a DataObject to be used for output output. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE;
 
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
 private:
   HistogramToTextureFeaturesFilter(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx
index f1781fd..c1689bd 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx
@@ -114,7 +114,7 @@ HistogramToTextureFeaturesFilter< THistogram >::GenerateData(void)
   MeasurementType haralickCorrelation = NumericTraits< MeasurementType >::Zero;
 
   double pixelVarianceSquared = pixelVariance * pixelVariance;
-  double log2 = vcl_log(2.0);
+  double log2 = std::log(2.0);
 
   typename RelativeFrequencyContainerType::const_iterator rFreqIterator =
     m_RelativeFrequencyContainer.begin();
@@ -132,15 +132,15 @@ HistogramToTextureFeaturesFilter< THistogram >::GenerateData(void)
 
     IndexType index = inputHistogram->GetIndex( hit.GetInstanceIdentifier() );
     energy += frequency * frequency;
-    entropy -= ( frequency > 0.0001 ) ? frequency *vcl_log(frequency) / log2:0;
+    entropy -= ( frequency > 0.0001 ) ? frequency *std::log(frequency) / log2:0;
     correlation += ( ( index[0] - pixelMean ) * ( index[1] - pixelMean ) * frequency )
                    / pixelVarianceSquared;
     inverseDifferenceMoment += frequency
                                / ( 1.0 + ( index[0] - index[1] ) * ( index[0] - index[1] ) );
     inertia += ( index[0] - index[1] ) * ( index[0] - index[1] ) * frequency;
-    clusterShade += vcl_pow( ( index[0] - pixelMean ) + ( index[1] - pixelMean ), 3 )
+    clusterShade += std::pow( ( index[0] - pixelMean ) + ( index[1] - pixelMean ), 3 )
                     * frequency;
-    clusterProminence += vcl_pow( ( index[0] - pixelMean ) + ( index[1] - pixelMean ), 4 )
+    clusterProminence += std::pow( ( index[0] - pixelMean ) + ( index[1] - pixelMean ), 4 )
                          * frequency;
     haralickCorrelation += index[0] * index[1] * frequency;
     }
@@ -229,7 +229,7 @@ HistogramToTextureFeaturesFilter< THistogram >::ComputeMeansAndVariances(double
       M(1) = x(1), M(k) = M(k-1) + (x(k) - M(k-1) ) / k
       S(1) = 0, S(k) = S(k-1) + (x(k) - M(k-1)) * (x(k) - M(k))
       for 2 <= k <= n, then
-      sigma = vcl_sqrt(S(n) / n) (or divide by n-1 for sample SD instead of
+      sigma = std::sqrt(S(n) / n) (or divide by n-1 for sample SD instead of
       population SD).
   */
   marginalMean = marginalSums[0];
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx
index eeb6650..f87d3a2 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageClassifierFilter.hxx
@@ -34,7 +34,7 @@ ImageClassifierFilter< TSample, TInputImage, TOutputImage >
   this->SetNumberOfRequiredOutputs(1);
 
   /** Initialize decision rule */
-  m_DecisionRule = NULL;
+  m_DecisionRule = ITK_NULLPTR;
 
   m_NumberOfClasses = 0;
 }
@@ -143,7 +143,7 @@ ImageClassifierFilter< TSample, TInputImage, TOutputImage >
     }
 
   MembershipFunctionsWeightsArrayType membershipFunctionsWeightsArray;
-  if ( membershipFunctionsWeightsArrayDecorated == NULL )
+  if ( membershipFunctionsWeightsArrayDecorated == ITK_NULLPTR )
     {
     // no weights array is set and hence all membership functions will have
     // equal
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx
index 82d16f5..bb56efe 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx
@@ -235,16 +235,17 @@ ImageToHistogramFilter< TImage >
 {
   // group the results in the output histogram
   HistogramType * hist = m_Histograms[0];
+  typename HistogramType::IndexType index;
   for( unsigned int i=1; i<m_Histograms.size(); i++ )
     {
     typedef typename HistogramType::ConstIterator         HistogramIterator;
-    typedef typename HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType;
 
     HistogramIterator hit = m_Histograms[i]->Begin();
     HistogramIterator end = m_Histograms[i]->End();
     while ( hit != end )
       {
-      hist->IncreaseFrequencyOfMeasurement( hit.GetMeasurementVector(), hit.GetFrequency() );
+      hist->GetIndex( hit.GetMeasurementVector(), index);
+      hist->IncreaseFrequencyOfIndex( index, hit.GetFrequency() );
       ++hit;
       }
     }
@@ -253,7 +254,7 @@ ImageToHistogramFilter< TImage >
   m_Histograms.clear();
   m_Minimums.clear();
   m_Maximums.clear();
-  m_Barrier = NULL;
+  m_Barrier = ITK_NULLPTR;
 }
 
 
@@ -298,11 +299,13 @@ ImageToHistogramFilter< TImage >
   inputIt.GoToBegin();
   HistogramMeasurementVectorType m( nbOfComponents );
 
+  typename HistogramType::IndexType index;
   while ( !inputIt.IsAtEnd() )
     {
     const PixelType & p = inputIt.Get();
     NumericTraits<PixelType>::AssignToArray( p, m );
-    m_Histograms[threadId]->IncreaseFrequencyOfMeasurement( m, 1 );
+    m_Histograms[threadId]->GetIndex( m, index );
+    m_Histograms[threadId]->IncreaseFrequencyOfIndex( index, 1 );
     ++inputIt;
     progress.CompletedPixel();  // potential exception thrown here
     }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h
index 7d9808d..cce79d5 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h
@@ -140,18 +140,17 @@ public:
   {
     friend class ImageToListSampleAdaptor;
 
-public:
+  public:
 
     ConstIterator(const ImageToListSampleAdaptor *adaptor)
     {
       *this = adaptor->Begin();
     }
 
-    ConstIterator(const ConstIterator & iter)
-    {
-      m_Iter = iter.m_Iter;
-      m_InstanceIdentifier = iter.m_InstanceIdentifier;
-    }
+    ConstIterator(const ConstIterator & iter) :
+      m_Iter(iter.m_Iter),
+      m_InstanceIdentifier(iter.m_InstanceIdentifier)
+    {}
 
     ConstIterator & operator=(const ConstIterator & iter)
     {
@@ -193,20 +192,17 @@ public:
       return ( m_Iter == it.m_Iter );
     }
 
-protected:
+  protected:
     // This method should only be available to the ListSample class
-    ConstIterator(
-      ImageConstIteratorType iter,
-      InstanceIdentifier iid)
-    {
-      m_Iter = iter;
-      m_InstanceIdentifier = iid;
-    }
+    ConstIterator(const ImageConstIteratorType & iter, InstanceIdentifier iid) :
+      m_Iter(iter),
+      m_InstanceIdentifier(iid)
+    {}
 
     // This method is purposely not implemented
     ConstIterator();
 
-private:
+  private:
     ImageConstIteratorType        m_Iter;
     mutable MeasurementVectorType m_MeasurementVectorCache;
     InstanceIdentifier            m_InstanceIdentifier;
@@ -216,16 +212,19 @@ private:
    *  \brief Iterator
    * \ingroup ITKStatistics
    */
-  class Iterator:public ConstIterator
+  class Iterator:
+    public ConstIterator
   {
     friend class ImageToListSampleAdaptor;
 
-public:
+  public:
 
-    Iterator(Self *adaptor):ConstIterator(adaptor)
+    Iterator(Self *adaptor) :
+      ConstIterator(adaptor)
     {}
 
-    Iterator(const Iterator & iter):ConstIterator(iter)
+    Iterator(const Iterator & iter):
+      ConstIterator(iter)
     {}
 
     Iterator & operator=(const Iterator & iter)
@@ -234,19 +233,20 @@ public:
       return *this;
     }
 
-protected:
+  protected:
     // To ensure const-correctness these method must not be in the public API.
     // The are purposly not implemented, since they should never be called.
     Iterator();
     Iterator(const Self *adaptor);
-    Iterator(ImageConstIteratorType iter, InstanceIdentifier iid);
+    Iterator(const ImageConstIteratorType & iter, InstanceIdentifier iid);
     Iterator(const ConstIterator & it);
     ConstIterator & operator=(const ConstIterator & it);
 
-    Iterator( ImageIteratorType iter, InstanceIdentifier iid):ConstIterator(iter, iid)
+    Iterator(const ImageIteratorType & iter, InstanceIdentifier iid) :
+      ConstIterator(iter, iid)
     {}
 
-private:
+  private:
   };
 
   /** returns an iterator that points to the beginning of the container */
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx
index 8a61b58..d9390cd 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx
@@ -28,7 +28,7 @@ template< typename TImage >
 ImageToListSampleAdaptor< TImage >
 ::ImageToListSampleAdaptor()
 {
-  m_Image = 0;
+  m_Image = ITK_NULLPTR;
 }
 
 template< typename TImage >
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.h
index 1f95b12..f2b2c92 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.h
@@ -114,23 +114,22 @@ public:
 protected:
   ImageToListSampleFilter();
   virtual ~ImageToListSampleFilter() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Standard itk::ProcessObject subclass method. */
   typedef DataObject::Pointer                           DataObjectPointer;
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
   /** This method causes the filter to generate its output. */
-  virtual void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** This method ensures that a mask image if specified has requested regions
    * that at least contain the input image's buffered region. */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
 
-  virtual void GenerateOutputInformation();
+  virtual void GenerateOutputInformation() ITK_OVERRIDE;
 
 private:
   ImageToListSampleFilter(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx
index b94c53e..7119054 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx
@@ -99,7 +99,7 @@ ImageToListSampleFilter< TImage, TMaskImage >
 {
   const ImageType *input = this->GetInput();
 
-  if ( input == NULL )
+  if ( input == ITK_NULLPTR )
     {
     itkExceptionMacro("Input image has not been set yet");
     }
@@ -128,7 +128,7 @@ ImageToListSampleFilter< TImage, TMaskImage >
     static_cast< ListSampleType * >( this->ProcessObject::GetOutput(0) );
 
   const ImageType *    input = this->GetInput();
-  const MaskImageType *maskImage = NULL;
+  const MaskImageType *maskImage = ITK_NULLPTR;
 
   // Verify whether the image and the mask have the same LargestPossibleRegion.
   // Otherwise, throw an exception.
@@ -194,7 +194,6 @@ template< typename TImage, typename TMaskImage >
 void
 ImageToListSampleFilter< TImage, TMaskImage >
 ::GenerateInputRequestedRegion()
-throw( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method. this should
   // copy the output requested region to the input requested region
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx
index 86a6f87..819477a 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx
@@ -25,19 +25,21 @@ namespace Statistics {
 
   template < typename TImage, typename TBoundaryCondition>
 ImageToNeighborhoodSampleAdaptor< TImage, TBoundaryCondition>
-::ImageToNeighborhoodSampleAdaptor()
+  ::ImageToNeighborhoodSampleAdaptor() :
+    m_Image(ITK_NULLPTR),
+    m_InstanceIdentifierInternal(0),
+    m_UseImageRegion(true)
 {
-  m_Image = 0;
   m_Radius.Fill(0);
+  m_NeighborIndexInternal.Fill(0);
+
   NeighborhoodIndexType start;
   NeighborhoodSizeType sz;
   start.Fill(0);
   sz.Fill(0);
   m_Region.SetIndex(start);
   m_Region.SetSize(sz);
-  m_UseImageRegion = true;
   this->SetMeasurementVectorSize(1);
-  m_NeighborIndexInternal.Fill(0);
 }
 
 template < typename TImage, typename TBoundaryCondition>
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx
index 8a88c21..8020174 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx
@@ -29,7 +29,7 @@ JointDomainImageToListSampleAdaptor< TImage >
 ::JointDomainImageToListSampleAdaptor()
 {
   m_NormalizationFactors.Fill(1.0f);
-  m_Image = 0;
+  m_Image = ITK_NULLPTR;
   m_UsePixelContainer = true;
 }
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTree.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTree.h
index ac93787..eb6d9f3 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTree.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTree.h
@@ -385,25 +385,25 @@ struct KdTreeTerminalNode:public KdTreeNode<TSample>
   /** Return the left tree pointer. Null for terminal nodes. */
   Superclass * Left()
   {
-    return 0;
+    return ITK_NULLPTR;
   }
 
   /** Return the right tree pointer. Null for terminal nodes. */
   Superclass * Right()
   {
-    return 0;
+    return ITK_NULLPTR;
   }
 
   /** Return the left tree const pointer. Null for terminal nodes. */
   const Superclass * Left() const
   {
-    return 0;
+    return ITK_NULLPTR;
   }
 
   /** Return the right tree const pointer. Null for terminal nodes. */
   const Superclass * Right() const
   {
-    return 0;
+    return ITK_NULLPTR;
   }
 
   /** Return the size of the node. */
@@ -535,7 +535,7 @@ public:
   {
   public:
     /** Constructor */
-    NearestNeighbors() {}
+    NearestNeighbors() : m_FarthestNeighborIndex(0) {}
 
     /** Destructor */
     ~NearestNeighbors() {}
@@ -674,7 +674,13 @@ public:
 
   /** Searches the k-nearest neighbors */
   void Search( const MeasurementVectorType &, unsigned int,
-    InstanceIdentifierVectorType & ) const;
+              InstanceIdentifierVectorType & ) const;
+
+  /** Searches the k-nearest neighbors and returns
+   *  the distance vector along with the distance measures.
+   */
+  void Search( const MeasurementVectorType &, unsigned int,
+    InstanceIdentifierVectorType &, std::vector<double> & ) const;
 
   /** Searches the neighbors fallen into a hypersphere */
   void Search( const MeasurementVectorType &, double,
@@ -721,7 +727,7 @@ protected:
   /** Destructor: deletes the root node and the empty terminal node. */
   virtual ~KdTree();
 
-  void PrintSelf( std::ostream & os, Indent indent ) const;
+  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
 
   /** search loop */
   int NearestNeighborSearchLoop( const KdTreeNodeType *,
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTree.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTree.hxx
index 875f467..f441534 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTree.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTree.hxx
@@ -27,12 +27,13 @@ namespace Statistics
 template<typename TSample>
 KdTreeNonterminalNode<TSample>
 ::KdTreeNonterminalNode( unsigned int partitionDimension,
-  MeasurementType partitionValue, Superclass *left, Superclass *right )
+                         MeasurementType partitionValue, Superclass *left, Superclass *right ) :
+  m_PartitionDimension(partitionDimension),
+  m_PartitionValue(partitionValue),
+  m_InstanceIdentifier(0),
+  m_Left(left),
+  m_Right(right)
 {
-  this->m_PartitionDimension = partitionDimension;
-  this->m_PartitionValue = partitionValue;
-  this->m_Left = left;
-  this->m_Right = right;
 }
 
 template<typename TSample>
@@ -81,8 +82,8 @@ KdTree<TSample>
   this->m_EmptyTerminalNode = new KdTreeTerminalNode<TSample>();
 
   this->m_DistanceMetric = DistanceMetricType::New();
-  this->m_Sample = 0;
-  this->m_Root = 0;
+  this->m_Sample = ITK_NULLPTR;
+  this->m_Root = ITK_NULLPTR;
   this->m_BucketSize = 16;
   this->m_MeasurementVectorSize = 0;
 }
@@ -91,7 +92,7 @@ template<typename TSample>
 KdTree<TSample>
 ::~KdTree()
 {
-  if( this->m_Root != 0 )
+  if( this->m_Root != ITK_NULLPTR )
     {
     this->DeleteNode( this->m_Root );
     }
@@ -106,7 +107,7 @@ KdTree<TSample>
   Superclass::PrintSelf( os, indent );
 
   os << indent << "Input Sample: ";
-  if( this->m_Sample != 0 )
+  if( this->m_Sample != ITK_NULLPTR )
     {
     os << this->m_Sample << std::endl;
     }
@@ -116,7 +117,7 @@ KdTree<TSample>
     }
   os << indent << "Bucket Size: " << this->m_BucketSize << std::endl;
   os << indent << "Root Node: ";
-  if( this->m_Root != 0 )
+  if( this->m_Root != ITK_NULLPTR )
     {
     os << this->m_Root << std::endl;
     }
@@ -146,12 +147,12 @@ KdTree<TSample>
     }
 
   // non-terminal node
-  if( node->Left() != 0 )
+  if( node->Left() != ITK_NULLPTR )
     {
     this->DeleteNode( node->Left() );
     }
 
-  if( node->Right() != 0 )
+  if( node->Right() != ITK_NULLPTR )
     {
     this->DeleteNode( node->Right() );
     }
@@ -183,7 +184,19 @@ template<typename TSample>
 void
 KdTree<TSample>
 ::Search( const MeasurementVectorType & query,
-  unsigned int numberOfNeighborsRequested, InstanceIdentifierVectorType &result ) const
+         unsigned int numberOfNeighborsRequested, InstanceIdentifierVectorType &result ) const
+{
+  // This function has two different signatures. The other signature, that returns the distances vector too,
+  // is called here; however, its distances vector is discarded.
+  std::vector<double> not_used_distances;
+  this->Search(query, numberOfNeighborsRequested, result, not_used_distances);
+}
+
+template<typename TSample>
+void
+KdTree<TSample>
+::Search( const MeasurementVectorType & query,
+  unsigned int numberOfNeighborsRequested, InstanceIdentifierVectorType &result, std::vector<double> &distances ) const
 {
   if( numberOfNeighborsRequested > this->Size() )
     {
@@ -204,16 +217,17 @@ KdTree<TSample>
 
   for(  unsigned int d = 0; d < this->m_MeasurementVectorSize; ++d )
     {
-    lowerBound[d] = static_cast< MeasurementType >( -vcl_sqrt(
+    lowerBound[d] = static_cast< MeasurementType >( -std::sqrt(
       -static_cast< double >( NumericTraits< MeasurementType >::
       NonpositiveMin() ) ) / 2.0 );
-    upperBound[d] = static_cast< MeasurementType >( vcl_sqrt(
+    upperBound[d] = static_cast< MeasurementType >( std::sqrt(
       static_cast<double >( NumericTraits< MeasurementType >::max() ) / 2.0 ) );
     }
   this->NearestNeighborSearchLoop( this->m_Root, query, lowerBound, upperBound,
     nearestNeighbors );
 
   result = nearestNeighbors.GetNeighbors();
+  distances = nearestNeighbors.GetDistances();
 }
 
 template<typename TSample>
@@ -349,10 +363,10 @@ KdTree<TSample>
 
   for(  unsigned int d = 0; d < this->m_MeasurementVectorSize; ++d )
     {
-    lowerBound[d] = static_cast<MeasurementType>( -vcl_sqrt(
+    lowerBound[d] = static_cast<MeasurementType>( -std::sqrt(
       -static_cast<double>( NumericTraits<MeasurementType>::
       NonpositiveMin() ) ) / 2.0 );
-    upperBound[d] = static_cast< MeasurementType >( vcl_sqrt(
+    upperBound[d] = static_cast< MeasurementType >( std::sqrt(
       static_cast<double>( NumericTraits< MeasurementType >::max() ) / 2.0 ) );
     }
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h
index e1a42dc..98ee1c5 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h
@@ -165,7 +165,7 @@ protected:
   KdTreeBasedKmeansEstimator();
   virtual ~KdTreeBasedKmeansEstimator() {}
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   void FillClusterLabels(KdTreeNodeType *node, int closestIndex);
 
@@ -176,7 +176,7 @@ protected:
   class CandidateVector
   {
 public:
-    CandidateVector() {}
+    CandidateVector() : m_MeasurementVectorSize(0) {}
 
     struct Candidate {
       CentroidType Centroid;
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx
index d2e8b9c..15695f1 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx
@@ -27,20 +27,19 @@ namespace Statistics
 {
 template< typename TKdTree >
 KdTreeBasedKmeansEstimator< TKdTree >
-::KdTreeBasedKmeansEstimator()
+::KdTreeBasedKmeansEstimator() :
+  m_CurrentIteration(0),
+  m_MaximumIteration(100),
+  m_CentroidPositionChanges(0.0),
+  m_CentroidPositionChangesThreshold(0.0),
+  m_KdTree(ITK_NULLPTR),
+  m_DistanceMetric(EuclideanDistanceMetric< ParameterType >::New()),
+  m_UseClusterLabels(false),
+  m_GenerateClusterLabels(false),
+  m_MeasurementVectorSize(0),
+  m_MembershipFunctionsObject(MembershipFunctionVectorObjectType::New())
 {
-  m_CentroidPositionChangesThreshold = 0.0;
-  m_KdTree = 0;
-  m_UseClusterLabels = false;
-  m_MaximumIteration = 100;
-  m_DistanceMetric = EuclideanDistanceMetric< ParameterType >::New();
-
-  m_MembershipFunctionsObject = MembershipFunctionVectorObjectType::New();
-
-  m_CentroidPositionChanges = 0.0;
   m_TempVertex.Fill(0.0);
-  m_CurrentIteration = 0;
-  m_MeasurementVectorSize = 0;
 }
 
 template< typename TKdTree >
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h
index 69efb0f..b413d91 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeGenerator.h
@@ -140,7 +140,7 @@ protected:
   /** Destructor */
   virtual ~KdTreeGenerator() {}
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Returns the smart pointer to the internal Subsample object. */
   SubsamplePointer GetSubsample()
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx
index 1c6f8c8..5dcbc58 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkKdTreeGenerator.hxx
@@ -28,7 +28,7 @@ template< typename TSample >
 KdTreeGenerator< TSample >
 ::KdTreeGenerator()
 {
-  m_SourceSample = 0;
+  m_SourceSample = ITK_NULLPTR;
   m_BucketSize = 16;
   m_Subsample = SubsampleType::New();
   m_MeasurementVectorSize = 0;
@@ -42,7 +42,7 @@ KdTreeGenerator< TSample >
   Superclass::PrintSelf(os, indent);
 
   os << indent << "Source Sample: ";
-  if ( m_SourceSample != 0 )
+  if ( m_SourceSample != ITK_NULLPTR )
     {
     os << m_SourceSample << std::endl;
     }
@@ -83,7 +83,7 @@ void
 KdTreeGenerator< TSample >
 ::GenerateData()
 {
-  if ( m_SourceSample == 0 )
+  if ( m_SourceSample == ITK_NULLPTR )
     {
     return;
     }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx
index 06f91a3..f5fd034 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx
@@ -124,7 +124,7 @@ MahalanobisDistanceMembershipFunction< TVector >
     // define the inverse to be diagonal with large values along the
     // diagonal. value chosen so (X-M)'inv(C)*(X-M) will usually stay
     // below NumericTraits<double>::max()
-    const double aLargeDouble = vcl_pow(NumericTraits<double>::max(), 1.0/3.0)
+    const double aLargeDouble = std::pow(NumericTraits<double>::max(), 1.0/3.0)
       / (double) this->GetMeasurementVectorSize();
     m_InverseCovariance.SetSize(this->GetMeasurementVectorSize(), this->GetMeasurementVectorSize());
     m_InverseCovariance.SetIdentity();
@@ -145,18 +145,22 @@ MahalanobisDistanceMembershipFunction< TVector >
   // Our inverse covariance is always well formed. When the covariance
   // is singular, we use a diagonal inverse covariance with a large diagnonal
 
-  // Compute ( y - mean )
-  vnl_vector< double > tempVector( measurementVectorSize );
-
-  for ( MeasurementVectorSizeType i = 0; i < measurementVectorSize; ++i )
+  // temp = ( y - mean )^t * InverseCovariance * ( y - mean )
+  //
+  // This is manually done to remove dynamic memory allocation:
+  // double temp = dot_product( tempVector,  m_InverseCovariance.GetVnlMatrix() * tempVector );
+  //
+  double temp = 0.0;
+  for (unsigned int r = 0; r < measurementVectorSize; ++r)
     {
-    tempVector[i] = measurement[i] - m_Mean[i];
+    double rowdot = 0.0;
+    for(unsigned int c = 0; c < measurementVectorSize; ++c)
+      {
+      rowdot += m_InverseCovariance(r, c) * ( measurement[c] - m_Mean[c] );
+      }
+    temp += rowdot * ( measurement[r] - m_Mean[r] );
     }
 
-  // temp = ( y - mean )^t * InverseCovariance * ( y - mean )
-  double temp = dot_product( tempVector,
-                             m_InverseCovariance.GetVnlMatrix() * tempVector );
-
   return temp;
 }
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx
index d462e0a..ece5358 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx
@@ -174,7 +174,7 @@ MahalanobisDistanceMetric< TVector >
 
   // Compute |y - mean | * inverse(cov) * |y - mean|^T
   double temp;
-  temp = vcl_sqrt( dot_product( tempMat.as_ref(), tempVec.as_ref() ) );
+  temp = std::sqrt( dot_product( tempMat.as_ref(), tempVec.as_ref() ) );
 
   return temp;
 }
@@ -208,7 +208,7 @@ MahalanobisDistanceMetric< TVector >
 
   // Compute |x1 - x2 | * inverse(cov) * |x1 - x2|^T
   double temp;
-  temp = vcl_sqrt( dot_product( tempMat.as_ref(), tempVec.as_ref() ) );
+  temp = std::sqrt( dot_product( tempMat.as_ref(), tempVec.as_ref() ) );
 
   return temp;
 }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.hxx
index 8f9b0f1..4c38031 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkManhattanDistanceMetric.hxx
@@ -43,7 +43,7 @@ ManhattanDistanceMetric< TVector >
 
   for ( unsigned int i = 0; i < measurementVectorSize; i++ )
     {
-    temp = vcl_abs(this->GetOrigin()[i] - x[i]);
+    temp = std::abs(this->GetOrigin()[i] - x[i]);
     distance += temp;
     }
   return distance;
@@ -65,7 +65,7 @@ ManhattanDistanceMetric< TVector >
   double temp, distance = NumericTraits< double >::Zero;
   for ( unsigned int i = 0; i < measurementVectorSize; i++ )
     {
-    temp = vcl_abs(x1[i] - x2[i]);
+    temp = std::abs(x1[i] - x2[i]);
     distance += temp;
     }
   return distance;
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaskedImageToHistogramFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaskedImageToHistogramFilter.hxx
index ff040de..2452b50 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaskedImageToHistogramFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaskedImageToHistogramFilter.hxx
@@ -86,13 +86,15 @@ MaskedImageToHistogramFilter< TImage, TMaskImage >
   HistogramMeasurementVectorType m( nbOfComponents );
   MaskPixelType maskValue = this->GetMaskValue();
 
+  typename HistogramType::IndexType index;
   while ( !inputIt.IsAtEnd() )
     {
     if( maskIt.Get() == maskValue )
       {
       const PixelType & p = inputIt.Get();
       NumericTraits<PixelType>::AssignToArray( p, m );
-      this->m_Histograms[threadId]->IncreaseFrequencyOfMeasurement( m, 1 );
+      this->m_Histograms[threadId]->GetIndex( m, index );
+      this->m_Histograms[threadId]->IncreaseFrequencyOfIndex( index, 1 );
       }
     ++inputIt;
     ++maskIt;
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaximumDecisionRule.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaximumDecisionRule.h
index e5743fd..da36f3e 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaximumDecisionRule.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaximumDecisionRule.h
@@ -62,7 +62,7 @@ public:
    * Evaluate the decision rule, returning the class label associated
    * with the largest discriminant score.
    */
-  virtual ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const;
+  virtual ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const ITK_OVERRIDE;
 
 protected:
   MaximumDecisionRule() {}
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaximumRatioDecisionRule.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaximumRatioDecisionRule.h
index 1af9524..d6eed36 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaximumRatioDecisionRule.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMaximumRatioDecisionRule.h
@@ -87,7 +87,7 @@ public:
    * assumed). Parameter to Evaluate() is the discriminant score in
    * the form of a likelihood \f$p(x|i)\f$.
    */
-  virtual ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const;
+  virtual ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const ITK_OVERRIDE;
 
   /** Set the prior probabilities used in evaluating
    * \f$p(x|i) p(i) > p(x|j) p(j)\f$. The likelihoods are set using
@@ -101,7 +101,7 @@ public:
 protected:
   MaximumRatioDecisionRule();
   virtual ~MaximumRatioDecisionRule() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   MaximumRatioDecisionRule(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeanSampleFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeanSampleFilter.h
index 935126f..c1efc8d 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeanSampleFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeanSampleFilter.h
@@ -45,7 +45,7 @@ namespace Statistics
  */
 
 template< typename TSample >
-class MeanSampleFilter:public ProcessObject
+class MeanSampleFilter : public ProcessObject
 {
 public:
   /**Standard class typedefs. */
@@ -59,45 +59,55 @@ public:
   itkTypeMacro(MeanSampleFilter, ProcessObject);
   itkNewMacro(Self);
 
-  /** Length of a measurement vector */
-  typedef unsigned int                                                MeasurementVectorSizeType;
-  typedef typename TSample::MeasurementVectorType                     MeasurementVectorType;
-  typedef typename TSample::MeasurementType                           MeasurementType;
-  typedef typename NumericTraits< MeasurementType >::RealType         MeasurementRealType;
+  /** Type of each measurement vector in sample */
+  typedef typename SampleType::MeasurementVectorType                  MeasurementVectorType;
+
+  /** Type of the length of each measurement vector */
+  typedef typename SampleType::MeasurementVectorSizeType              MeasurementVectorSizeType;
+
+  /** Type of measurement vector component value */
+  typedef typename SampleType::MeasurementType                        MeasurementType;
+
+  /** Type of a measurement vector, holding floating point values */
   typedef typename NumericTraits< MeasurementVectorType >::RealType   MeasurementVectorRealType;
 
-  /** Method to set/get the sample */
+  /** Type of a floating point measurement component value */
+  typedef typename NumericTraits< MeasurementType >::RealType         MeasurementRealType;
+
+
+  /** Method to set the sample */
   using Superclass::SetInput;
   void SetInput(const SampleType *sample);
 
-  const SampleType *  GetInput() const;
+  /** Method to get the sample */
+  const SampleType * GetInput() const;
 
-  /** MeasurementVector is not a DataObject, we need to decorate it to push it down
-   * a ProcessObject's pipeline */
-  typedef  SimpleDataObjectDecorator< MeasurementVectorRealType > MeasurementVectorDecoratedType;
-
-  typedef MeasurementVectorDecoratedType OutputType;
 
   /** Get the mean measurement vector */
+  const MeasurementVectorRealType GetMean() const;
+
+  /** MeasurementVector is not a DataObject, we need to decorate it to push it down
+   * a ProcessObject's pipeline */
+  typedef SimpleDataObjectDecorator< MeasurementVectorRealType > MeasurementVectorDecoratedType;
   const MeasurementVectorDecoratedType * GetOutput() const;
+  typedef MeasurementVectorDecoratedType                         OutputType;
 
-  const MeasurementVectorRealType GetMean() const;
 
   MeasurementVectorSizeType GetMeasurementVectorSize() const;
 
 protected:
   MeanSampleFilter();
   virtual ~MeanSampleFilter();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** DataObject pointer */
   typedef DataObject::Pointer DataObjectPointer;
 
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
 private:
   MeanSampleFilter(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx
index b18e2ed..887437b 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx
@@ -18,9 +18,12 @@
 #ifndef __itkMeanSampleFilter_hxx
 #define __itkMeanSampleFilter_hxx
 
-#include "itkMeasurementVectorTraits.h"
 #include "itkMeanSampleFilter.h"
 
+#include <vector>
+#include "itkCompensatedSummation.h"
+#include "itkMeasurementVectorTraits.h"
+
 namespace itk
 {
 namespace Statistics
@@ -72,7 +75,7 @@ MeanSampleFilter< TSample >
   MeasurementVectorRealType mean;
   (void)mean; // for complainty pants : valgrind
   NumericTraits<MeasurementVectorRealType>::SetLength( mean, this->GetMeasurementVectorSize() );
-  mean.Fill( NumericTraits< MeasurementRealType >::Zero );
+  // NumericTraits::SetLength also initializes array to zero
   typename MeasurementVectorDecoratedType::Pointer decoratedMean = MeasurementVectorDecoratedType::New();
   decoratedMean->Set( mean );
   return decoratedMean.GetPointer();
@@ -127,44 +130,43 @@ void
 MeanSampleFilter< TSample >
 ::GenerateData()
 {
+  // set up input / output
   const SampleType *input = this->GetInput();
 
-  MeasurementVectorSizeType measurementVectorSize =
+  const MeasurementVectorSizeType measurementVectorSize =
     input->GetMeasurementVectorSize();
 
   MeasurementVectorDecoratedType *decoratedOutput =
-    itkDynamicCastInDebugMode< MeasurementVectorDecoratedType * >(this->ProcessObject::GetOutput(0) );
+    itkDynamicCastInDebugMode< MeasurementVectorDecoratedType * >( this->ProcessObject::GetOutput(0) );
 
   MeasurementVectorRealType output = decoratedOutput->Get();
 
   NumericTraits<MeasurementVectorRealType>::SetLength( output, this->GetMeasurementVectorSize() );
 
-  typename TSample::ConstIterator iter = input->Begin();
-  typename TSample::ConstIterator end =  input->End();
-  double totalFrequency = 0.0;
+  // algorithm start
+  typedef CompensatedSummation< MeasurementRealType > MeasurementRealAccumulateType;
+  std::vector< MeasurementRealAccumulateType > sum( measurementVectorSize );
 
-  typedef typename NumericTraits<
-    MeasurementRealType >::AccumulateType MeasurementRealAccumulateType;
+  typedef typename SampleType::TotalAbsoluteFrequencyType TotalFrequencyType;
+  TotalFrequencyType totalFrequency = NumericTraits< TotalFrequencyType >::Zero;
 
-  Array< MeasurementRealAccumulateType > sum( measurementVectorSize );
-  sum.Fill( NumericTraits< MeasurementRealAccumulateType >::Zero );
+  typename SampleType::ConstIterator iter =      input->Begin();
+  const typename SampleType::ConstIterator end = input->End();
 
-  while ( iter != end )
+  for (; iter != end; ++iter )
     {
-    double frequency = iter.GetFrequency();
-    totalFrequency += frequency;
-
     const MeasurementVectorType & measurement = iter.GetMeasurementVector();
 
+    const typename SampleType::AbsoluteFrequencyType frequency = iter.GetFrequency();
+    totalFrequency += frequency;
+
     for ( unsigned int dim = 0; dim < measurementVectorSize; dim++ )
       {
       const MeasurementRealType component =
         static_cast< MeasurementRealType >( measurement[dim] );
 
-      sum[dim] += static_cast< MeasurementRealAccumulateType >( component * frequency );
+      sum[dim] += ( component * static_cast< MeasurementRealType >( frequency ) );
       }
-
-    ++iter;
     }
 
   // compute the mean if the total frequency is different from zero
@@ -172,7 +174,7 @@ MeanSampleFilter< TSample >
     {
     for ( unsigned int dim = 0; dim < measurementVectorSize; dim++ )
       {
-      output[dim] = static_cast< MeasurementRealType >( sum[dim] / totalFrequency );
+      output[dim] = ( sum[dim].GetSum() / static_cast< MeasurementRealType >( totalFrequency ) );
       }
     }
   else
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h
index 980520e..c05ee1b 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMeasurementVectorTraits.h
@@ -72,9 +72,9 @@ public:
     return ( len == 0 );
   }
 
-  template< typename TValueType1, unsigned int VLength, typename TValueType2, unsigned int VLength2 >
-  static MeasurementVectorLength Assert(const FixedArray< TValueType1, VLength > &,
-                                        const FixedArray< TValueType2, VLength2 > &,
+  template< typename TValue1, unsigned int VLength, typename TValue2, unsigned int VLength2 >
+  static MeasurementVectorLength Assert(const FixedArray< TValue1, VLength > &,
+                                        const FixedArray< TValue2, VLength2 > &,
                                         const char *errMsg = "Length Mismatch")
   {
     if ( VLength != VLength2 )
@@ -84,9 +84,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, unsigned int VLength, typename TValueType2, unsigned int VLength2 >
-  static MeasurementVectorLength Assert(const FixedArray< TValueType1, VLength > *,
-                                        const FixedArray< TValueType2, VLength2 > *,
+  template< typename TValue1, unsigned int VLength, typename TValue2, unsigned int VLength2 >
+  static MeasurementVectorLength Assert(const FixedArray< TValue1, VLength > *,
+                                        const FixedArray< TValue2, VLength2 > *,
                                         const char *errMsg = "Length Mismatch")
   {
     if ( VLength != VLength2 )
@@ -96,9 +96,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, typename TValueType2 >
-  static MeasurementVectorLength Assert(const Array< TValueType1 > & a,
-                                        const Array< TValueType2 > & b, const char *errMsg = "Length Mismatch")
+  template< typename TValue1, typename TValue2 >
+  static MeasurementVectorLength Assert(const Array< TValue1 > & a,
+                                        const Array< TValue2 > & b, const char *errMsg = "Length Mismatch")
   {
     if ( b.Size() != a.Size() )
       {
@@ -107,9 +107,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, typename TValueType2 >
-  static MeasurementVectorLength Assert(const Array< TValueType1 > *a,
-                                        const Array< TValueType2 > *b, const char *errMsg = "Length Mismatch")
+  template< typename TValue1, typename TValue2 >
+  static MeasurementVectorLength Assert(const Array< TValue1 > *a,
+                                        const Array< TValue2 > *b, const char *errMsg = "Length Mismatch")
   {
     if ( b->Size() != a->Size() )
       {
@@ -118,9 +118,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, typename TValueType2 >
-  static MeasurementVectorLength Assert(const VariableLengthVector< TValueType1 > & a,
-                                        const VariableLengthVector< TValueType2 > & b,
+  template< typename TValue1, typename TValue2 >
+  static MeasurementVectorLength Assert(const VariableLengthVector< TValue1 > & a,
+                                        const VariableLengthVector< TValue2 > & b,
                                         const char *errMsg = "Length Mismatch")
   {
     if ( b.Size() != a.Size() )
@@ -130,9 +130,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, typename TValueType2 >
-  static MeasurementVectorLength Assert(const VariableLengthVector< TValueType1 > *a,
-                                        const VariableLengthVector< TValueType2 > *b,
+  template< typename TValue1, typename TValue2 >
+  static MeasurementVectorLength Assert(const VariableLengthVector< TValue1 > *a,
+                                        const VariableLengthVector< TValue2 > *b,
                                         const char *errMsg = "Length Mismatch")
   {
     if ( b->Size() != a->Size() )
@@ -142,9 +142,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, typename TValueType2 >
-  static MeasurementVectorLength Assert(const std::vector< TValueType1 > & a,
-                                        const std::vector< TValueType2 > & b, const char *errMsg = "Length Mismatch")
+  template< typename TValue1, typename TValue2 >
+  static MeasurementVectorLength Assert(const std::vector< TValue1 > & a,
+                                        const std::vector< TValue2 > & b, const char *errMsg = "Length Mismatch")
   {
     if ( b.size() != a.size() )
       {
@@ -153,9 +153,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, typename TValueType2 >
-  static MeasurementVectorLength Assert(const std::vector< TValueType1 > *a,
-                                        const std::vector< TValueType2 > *b, const char *errMsg = "Length Mismatch")
+  template< typename TValue1, typename TValue2 >
+  static MeasurementVectorLength Assert(const std::vector< TValue1 > *a,
+                                        const std::vector< TValue2 > *b, const char *errMsg = "Length Mismatch")
   {
     if ( b->size() != a->size() )
       {
@@ -164,9 +164,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, unsigned int VLength, typename TValueType2 >
-  static MeasurementVectorLength Assert(const FixedArray< TValueType1, VLength > &,
-                                        const Array< TValueType2 > & b, const char *errMsg = "Length Mismatch")
+  template< typename TValue1, unsigned int VLength, typename TValue2 >
+  static MeasurementVectorLength Assert(const FixedArray< TValue1, VLength > &,
+                                        const Array< TValue2 > & b, const char *errMsg = "Length Mismatch")
   {
     if ( b.Size() == 0 )
       {
@@ -182,9 +182,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, unsigned int VLength, typename TValueType2 >
-  static MeasurementVectorLength Assert(const FixedArray< TValueType1, VLength > *,
-                                        const Array< TValueType2 > *b, const char *errMsg = "Length Mismatch")
+  template< typename TValue1, unsigned int VLength, typename TValue2 >
+  static MeasurementVectorLength Assert(const FixedArray< TValue1, VLength > *,
+                                        const Array< TValue2 > *b, const char *errMsg = "Length Mismatch")
   {
     if ( b->Size() == 0 )
       {
@@ -197,9 +197,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, unsigned int VLength, typename TValueType2 >
-  static MeasurementVectorLength Assert(const FixedArray< TValueType1, VLength > &,
-                                        const VariableLengthVector< TValueType2 > & b,
+  template< typename TValue1, unsigned int VLength, typename TValue2 >
+  static MeasurementVectorLength Assert(const FixedArray< TValue1, VLength > &,
+                                        const VariableLengthVector< TValue2 > & b,
                                         const char *errMsg = "Length Mismatch")
   {
     if ( b.Size() == 0 )
@@ -216,9 +216,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, unsigned int VLength, typename TValueType2 >
-  static MeasurementVectorLength Assert(const FixedArray< TValueType1, VLength > *,
-                                        const VariableLengthVector< TValueType2 > *b,
+  template< typename TValue1, unsigned int VLength, typename TValue2 >
+  static MeasurementVectorLength Assert(const FixedArray< TValue1, VLength > *,
+                                        const VariableLengthVector< TValue2 > *b,
                                         const char *errMsg = "Length Mismatch")
   {
     if ( b->Size() == 0 )
@@ -232,9 +232,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, unsigned int VLength, typename TValueType2 >
-  static MeasurementVectorLength Assert(const FixedArray< TValueType1, VLength > &,
-                                        const std::vector< TValueType2 > & b, const char *errMsg = "Length Mismatch")
+  template< typename TValue1, unsigned int VLength, typename TValue2 >
+  static MeasurementVectorLength Assert(const FixedArray< TValue1, VLength > &,
+                                        const std::vector< TValue2 > & b, const char *errMsg = "Length Mismatch")
   {
     if ( b.size() == 0 )
       {
@@ -250,9 +250,9 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, unsigned int VLength, typename TValueType2 >
-  static MeasurementVectorLength Assert(const FixedArray< TValueType1, VLength > *,
-                                        const std::vector< TValueType2 > *b, const char *errMsg = "Length Mismatch")
+  template< typename TValue1, unsigned int VLength, typename TValue2 >
+  static MeasurementVectorLength Assert(const FixedArray< TValue1, VLength > *,
+                                        const std::vector< TValue2 > *b, const char *errMsg = "Length Mismatch")
   {
     if ( b->size() == 0 )
       {
@@ -265,8 +265,8 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, unsigned int VLength >
-  static MeasurementVectorLength Assert(const FixedArray< TValueType1, VLength > &,
+  template< typename TValue1, unsigned int VLength >
+  static MeasurementVectorLength Assert(const FixedArray< TValue1, VLength > &,
                                         const MeasurementVectorLength l, const char *errMsg = "Length Mismatch")
   {
     if ( l == 0 )
@@ -280,8 +280,8 @@ public:
     return 0;
   }
 
-  template< typename TValueType1, unsigned int VLength >
-  static MeasurementVectorLength Assert(const FixedArray< TValueType1, VLength > *,
+  template< typename TValue1, unsigned int VLength >
+  static MeasurementVectorLength Assert(const FixedArray< TValue1, VLength > *,
                                         const MeasurementVectorLength l, const char *errMsg = "Length Mismatch")
   {
     if ( l == 0 )
@@ -295,8 +295,8 @@ public:
     return 0;
   }
 
-  template< typename TValueType >
-  static MeasurementVectorLength Assert(const Array< TValueType > & a,
+  template< typename TValue >
+  static MeasurementVectorLength Assert(const Array< TValue > & a,
                                         const MeasurementVectorLength l, const char *errMsg = "Length Mismatch")
   {
     if ( ( ( l != 0 ) && ( a.Size() != l ) ) || ( a.Size() == 0 ) )
@@ -310,8 +310,8 @@ public:
     return 0;
   }
 
-  template< typename TValueType >
-  static MeasurementVectorLength Assert(const Array< TValueType > *a,
+  template< typename TValue >
+  static MeasurementVectorLength Assert(const Array< TValue > *a,
                                         const MeasurementVectorLength l, const char *errMsg = "Length Mismatch")
   {
     if ( ( ( l != 0 ) && ( a->Size() != l ) ) || ( a->Size() == 0 ) )
@@ -325,8 +325,8 @@ public:
     return 0;
   }
 
-  template< typename TValueType >
-  static MeasurementVectorLength Assert(const VariableLengthVector< TValueType > & a,
+  template< typename TValue >
+  static MeasurementVectorLength Assert(const VariableLengthVector< TValue > & a,
                                         const MeasurementVectorLength l, const char *errMsg = "Length Mismatch")
   {
     if ( ( ( l != 0 ) && ( a.Size() != l ) ) || ( a.Size() == 0 ) )
@@ -340,8 +340,8 @@ public:
     return 0;
   }
 
-  template< typename TValueType >
-  static MeasurementVectorLength Assert(const VariableLengthVector< TValueType > *a,
+  template< typename TValue >
+  static MeasurementVectorLength Assert(const VariableLengthVector< TValue > *a,
                                         const MeasurementVectorLength l, const char *errMsg = "Length Mismatch")
   {
     if ( ( ( l != 0 ) && ( a->Size() != l ) ) || ( a->Size() == 0 ) )
@@ -355,8 +355,8 @@ public:
     return 0;
   }
 
-  template< typename TValueType >
-  static MeasurementVectorLength Assert(const std::vector< TValueType > & a,
+  template< typename TValue >
+  static MeasurementVectorLength Assert(const std::vector< TValue > & a,
                                         const MeasurementVectorLength l, const char *errMsg = "Length Mismatch")
   {
     if ( ( ( l != 0 ) && ( a.size() != l ) ) || ( a.size() == 0 ) )
@@ -370,8 +370,8 @@ public:
     return 0;
   }
 
-  template< typename TValueType >
-  static MeasurementVectorLength Assert(const std::vector< TValueType > *a,
+  template< typename TValue >
+  static MeasurementVectorLength Assert(const std::vector< TValue > *a,
                                         const MeasurementVectorLength l, const char *errMsg = "Length Mismatch")
   {
     if ( ( ( l != 0 ) && ( a->size() != l ) ) || ( a->size() == 0 ) )
@@ -391,8 +391,8 @@ public:
     m = v;
   }
 
-  template< typename TValueType, unsigned int VLength >
-  static void  Assign(FixedArray< TValueType, VLength > & m, const TValueType & v)
+  template< typename TValue, unsigned int VLength >
+  static void  Assign(FixedArray< TValue, VLength > & m, const TValue & v)
   {
     m[0] = v;
   }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMembershipSample.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMembershipSample.h
index 7c17701..08d45af 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMembershipSample.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMembershipSample.h
@@ -112,8 +112,8 @@ public:
    *   identifier, id. */
   unsigned int GetClassLabel(const InstanceIdentifier & id) const;
 
-  /** Gets the Subsample that includes only the instances that belongs
-   *   to the classLabel */
+  /** Gets the Subsample that includes only the instances that belong
+   *   to the classLabel. If classLabel does not exist, NULL is returned. */
   const ClassSampleType * GetClassSample(const ClassLabelType & classLabel) const;
 
   /** Gets the class labels that corresponding to the each instance in
@@ -136,7 +136,7 @@ public:
   TotalAbsoluteFrequencyType GetTotalFrequency() const;
 
   /** Method to graft another sample */
-  virtual void Graft(const DataObject *thatObject);
+  virtual void Graft(const DataObject *thatObject) ITK_OVERRIDE;
 
 //  void PrintSelf(std::ostream& os, Indent indent) const;
 
@@ -288,7 +288,7 @@ private:
 protected:
   MembershipSample();
   virtual ~MembershipSample() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   MembershipSample(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMembershipSample.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMembershipSample.hxx
index 0f00a5e..320caca 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMembershipSample.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMembershipSample.hxx
@@ -99,6 +99,10 @@ MembershipSample< TSample >
 ::GetClassSample(const ClassLabelType & classLabel) const
 {
   int classIndex = this->GetInternalClassLabel(classLabel);
+  if (classIndex < 0)
+    {
+    return NULL;
+    }
 
   return m_ClassSamples[classIndex];
 }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMinimumDecisionRule.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMinimumDecisionRule.h
index 87fd65d..7bf5f6f 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMinimumDecisionRule.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMinimumDecisionRule.h
@@ -60,7 +60,7 @@ public:
    * Evaluate the decision rule, returning the class label associated
    * with the smallest discriminant score.
    */
-  virtual ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const;
+  virtual ClassIdentifierType Evaluate(const MembershipVectorType & discriminantScores) const ITK_OVERRIDE;
 
 protected:
   MinimumDecisionRule() {}
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.h
index c6b2213..5e1c21d 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.h
@@ -131,7 +131,7 @@ public:
 protected:
   MixtureModelComponentBase();
   virtual ~MixtureModelComponentBase();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** stores the pointer to the membership function.
    * subclasses use this function to store their membership function
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx
index eeffa35..16e652f 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx
@@ -28,8 +28,8 @@ template< typename TSample >
 MixtureModelComponentBase< TSample >
 ::MixtureModelComponentBase()
 {
-  m_Sample = 0;
-  m_MembershipFunction = 0;
+  m_Sample = ITK_NULLPTR;
+  m_MembershipFunction = ITK_NULLPTR;
   m_MinimalParametersChange = 1.0e-06;
   m_ParametersModified = true;
 }
@@ -47,7 +47,7 @@ MixtureModelComponentBase< TSample >
   Superclass::PrintSelf(os, indent);
 
   os << indent << "Sample: ";
-  if ( m_Sample != 0 )
+  if ( m_Sample != ITK_NULLPTR )
     {
     os << m_Sample << std::endl;
     }
@@ -57,7 +57,7 @@ MixtureModelComponentBase< TSample >
     }
 
   os << indent << "Membership Function: ";
-  if ( m_MembershipFunction != 0 )
+  if ( m_MembershipFunction != ITK_NULLPTR )
     {
     os << m_MembershipFunction << std::endl;
     }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.hxx
index a7065c8..b6e40ab 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkNeighborhoodSampler.hxx
@@ -49,7 +49,7 @@ NeighborhoodSampler< TSample >
 
   const InputRadiusObjectType *radiusObject = this->GetRadiusInput();
 
-  if ( radiusObject == NULL )
+  if ( radiusObject == ITK_NULLPTR )
     {
     itkExceptionMacro("Radius input is missing");
     }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h
index d59e6cd..5e8c41f 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkNormalVariateGenerator.h
@@ -115,12 +115,12 @@ public:
   void Initialize(int randomSeed);
 
   /** get a variate using FastNorm function */
-  double GetVariate();
+  virtual double GetVariate() ITK_OVERRIDE;
 
 protected:
   NormalVariateGenerator();
   virtual ~NormalVariateGenerator();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** get a variate */
   double FastNorm(void);
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx
index fe1e5c0..910a1b0 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx
@@ -28,7 +28,7 @@ template< typename TPointSet >
 PointSetToListSampleAdaptor< TPointSet >
 ::PointSetToListSampleAdaptor()
 {
-  this->m_PointSet = 0;
+  this->m_PointSet = ITK_NULLPTR;
   this->SetMeasurementVectorSize( TPointSet::PointDimension );
 }
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkProbabilityDistribution.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkProbabilityDistribution.h
index d0383af..96a3e4a 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkProbabilityDistribution.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkProbabilityDistribution.h
@@ -155,7 +155,7 @@ public:
 protected:
   ProbabilityDistribution(void) {}
   virtual ~ProbabilityDistribution(void) {}
-  void PrintSelf(std::ostream & os, Indent indent) const
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
   {
     Superclass::PrintSelf(os, indent);
     os << indent << "Parameters: " << m_Parameters << std::endl;
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSample.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSample.h
index a076272..93b74a2 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSample.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSample.h
@@ -88,7 +88,7 @@ public:
    * sequential id for each measurement vector in a Sample subclass. */
   typedef typename MeasurementVectorTraits::InstanceIdentifier InstanceIdentifier;
 
-  /** Typedef for the length of each measurement vector */
+  /** Type of the length of each measurement vector */
   typedef unsigned int MeasurementVectorSizeType;
 
   /** Get the size of the sample (number of measurements) */
@@ -158,7 +158,7 @@ public:
   itkGetConstMacro(MeasurementVectorSize, MeasurementVectorSizeType);
 
   /** Method to graft another sample */
-  virtual void Graft(const DataObject *thatObject)
+  virtual void Graft(const DataObject *thatObject) ITK_OVERRIDE
   {
     this->Superclass::Graft(thatObject);
 
@@ -178,7 +178,7 @@ protected:
 
   virtual ~Sample() {}
 
-  void PrintSelf(std::ostream & os, Indent indent) const
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
   {
     Superclass::PrintSelf(os, indent);
     os << indent << "Length of measurement vectors in the sample: "
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.h
index 1eeeb89..734eb7f 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.h
@@ -128,13 +128,13 @@ public:
 protected:
   SampleClassifierFilter();
   virtual ~SampleClassifierFilter() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   SampleClassifierFilter(const Self &); //purposely not implemented
   void operator=(const Self &);         //purposely not implemented
 
   /** Starts the classification process */
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** Make a DataObject of the correct type to used as the specified
    * output. This method
@@ -144,7 +144,7 @@ protected:
    */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
 private:
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx
index d25aa19..cdc92bb 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx
@@ -36,7 +36,7 @@ SampleClassifierFilter< TSample >
   this->ProcessObject::SetNthOutput( 0, this->MakeOutput(0) );
 
   /** Initialize decision rule */
-  m_DecisionRule = NULL;
+  m_DecisionRule = ITK_NULLPTR;
 }
 
 template< typename TSample >
@@ -146,7 +146,7 @@ SampleClassifierFilter< TSample >
     }
 
   MembershipFunctionsWeightsArrayType membershipFunctionsWeightsArray;
-  if ( membershipFunctionsWeightsArrayDecorated == NULL )
+  if ( membershipFunctionsWeightsArrayDecorated == ITK_NULLPTR )
     {
     // no weights array is set and hence all membership functions will have
     // equal
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.h
index f5e2e5f..4d9ec37 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.h
@@ -136,7 +136,7 @@ protected:
   SampleToHistogramFilter();
   virtual ~SampleToHistogramFilter();
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Make a DataObject of the correct type to used as the specified
    * output. This method
@@ -146,10 +146,10 @@ protected:
    */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
   // Where the histogram is actually computed
-  virtual void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
 private:
   SampleToHistogramFilter(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx
index 7c9f72f..ef1241c 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx
@@ -143,12 +143,12 @@ SampleToHistogramFilter< TSample, THistogram >
   const InputHistogramSizeObjectType *histogramSizeObject =
     this->GetHistogramSizeInput();
 
-  if ( histogramSizeObject == NULL )
+  if ( histogramSizeObject == ITK_NULLPTR )
     {
     itkSpecializedExceptionMacro(MissingHistogramSizeInput);
     }
 
-  if ( marginalScaleObject == NULL )
+  if ( marginalScaleObject == ITK_NULLPTR )
     {
     itkSpecializedExceptionMacro(MissingHistogramMarginalScaleInput);
     }
@@ -274,12 +274,12 @@ SampleToHistogramFilter< TSample, THistogram >
     }
   else
     {
-    if ( binMaximumObject == NULL )
+    if ( binMaximumObject == ITK_NULLPTR )
       {
       itkSpecializedExceptionMacro(MissingHistogramBinMaximumInput);
       }
 
-    if ( binMinimumObject == NULL )
+    if ( binMinimumObject == ITK_NULLPTR )
       {
       itkSpecializedExceptionMacro(MissingHistogramBinMinimumInput);
       }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.h
index 102a068..8a67494 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.h
@@ -78,7 +78,7 @@ public:
 protected:
   SampleToSubsampleFilter();
   virtual ~SampleToSubsampleFilter();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Make a DataObject of the correct type to used as the specified
    * output. This method
@@ -88,7 +88,7 @@ protected:
    */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
 private:
   SampleToSubsampleFilter(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.h
index 79f28c5..f2c6005 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.h
@@ -102,15 +102,15 @@ public:
 protected:
   ScalarImageToCooccurrenceListSampleFilter();
   virtual ~ScalarImageToCooccurrenceListSampleFilter() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   typedef DataObject::Pointer                           DataObjectPointer;
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
   /** This method causes the filter to generate its output. */
-  virtual void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
 private:
   ScalarImageToCooccurrenceListSampleFilter(const Self &); //purposely not
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h
index 4ef9744..1f8a0db 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.h
@@ -172,7 +172,7 @@ public:
 protected:
   ScalarImageToCooccurrenceMatrixFilter();
   virtual ~ScalarImageToCooccurrenceMatrixFilter() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   virtual void FillHistogram(RadiusType radius, RegionType region);
 
@@ -183,10 +183,10 @@ protected:
 
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
   /** This method causes the filter to generate its output. */
-  virtual void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
 private:
   ScalarImageToCooccurrenceMatrixFilter(const Self &); //purposely not
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx
index 0484357..bf75ead 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx
@@ -173,7 +173,7 @@ ScalarImageToCooccurrenceMatrixFilter< TImageType,
   RadiusType radius;
   radius.Fill(minRadius);
 
-  const ImageType *maskImage = NULL;
+  const ImageType *maskImage = ITK_NULLPTR;
 
   // Check if a mask image has been provided
   //
@@ -183,7 +183,7 @@ ScalarImageToCooccurrenceMatrixFilter< TImageType,
     }
 
   // Now fill in the histogram
-  if ( maskImage != NULL )
+  if ( maskImage != ITK_NULLPTR )
     {
     this->FillHistogramWithMask(radius, input->GetRequestedRegion(), maskImage);
     }
@@ -230,6 +230,7 @@ ScalarImageToCooccurrenceMatrixFilter< TImageType,
       }
 
     typename OffsetVector::ConstIterator offsets;
+    typename HistogramType::IndexType index;
     for ( offsets = m_Offsets->Begin(); offsets != m_Offsets->End(); offsets++ )
       {
       bool            pixelInBounds;
@@ -253,11 +254,13 @@ ScalarImageToCooccurrenceMatrixFilter< TImageType,
 
       cooccur[0] = centerPixelIntensity;
       cooccur[1] = pixelIntensity;
-      output->IncreaseFrequencyOfMeasurement(cooccur, 1);
+      output->GetIndex( cooccur, index );
+      output->IncreaseFrequencyOfIndex( index, 1 );
 
       cooccur[1] = centerPixelIntensity;
       cooccur[0] = pixelIntensity;
-      output->IncreaseFrequencyOfMeasurement(cooccur, 1);
+      output->GetIndex( cooccur, index );
+      output->IncreaseFrequencyOfIndex( index, 1 );
       }
     }
 }
@@ -285,7 +288,7 @@ ScalarImageToCooccurrenceMatrixFilter< TImageType,
   maskNeighborIt = NeighborhoodIteratorType(radius, maskImage, region);
 
   MeasurementVectorType cooccur( output->GetMeasurementVectorSize() );
-
+  typename HistogramType::IndexType index;
   for ( neighborIt.GoToBegin(), maskNeighborIt.GoToBegin();
         !neighborIt.IsAtEnd(); ++neighborIt, ++maskNeighborIt )
     {
@@ -332,11 +335,14 @@ ScalarImageToCooccurrenceMatrixFilter< TImageType,
 
       cooccur[0] = centerPixelIntensity;
       cooccur[1] = pixelIntensity;
-      output->IncreaseFrequencyOfMeasurement(cooccur, 1);
+      output->GetIndex( cooccur, index );
+      output->IncreaseFrequencyOfIndex(index, 1);
+
 
       cooccur[1] = centerPixelIntensity;
       cooccur[0] = pixelIntensity;
-      output->IncreaseFrequencyOfMeasurement(cooccur, 1);
+      output->GetIndex( cooccur, index );
+      output->IncreaseFrequencyOfIndex(index, 1);
       }
     }
 }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.h
index 66d311f..1f5c768 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.h
@@ -91,7 +91,7 @@ public:
 protected:
   ScalarImageToHistogramGenerator();
   virtual ~ScalarImageToHistogramGenerator() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h
index 863aede..fb5ee0b 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.h
@@ -196,19 +196,19 @@ public:
 protected:
   ScalarImageToRunLengthFeaturesFilter();
   virtual ~ScalarImageToRunLengthFeaturesFilter() {}
-  void PrintSelf( std::ostream & os, Indent indent ) const;
+  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
 
   void FastCompute();
 
   void FullCompute();
 
   /** This method causes the filter to generate its output. */
-  virtual void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** Make a DataObject to be used for output output. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE;
 
 private:
   typename RunLengthMatrixFilterType::Pointer m_RunLengthMatrixGenerator;
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx
index 6df0a8c..51d127e 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthFeaturesFilter.hxx
@@ -168,7 +168,7 @@ ScalarImageToRunLengthFeaturesFilter<TImage, THistogramFrequencyContainer>
     M(1) = x(1), M(k) = M(k-1) + (x(k) - M(k-1) ) / k
     S(1) = 0, S(k) = S(k-1) + (x(k) - M(k-1)) * (x(k) - M(k))
     for 2 <= k <= n, then
-    sigma = vcl_sqrt(S(n) / n) (or divide by n-1 for sample SD instead of
+    sigma = std::sqrt(S(n) / n) (or divide by n-1 for sample SD instead of
     population SD).
   */
 
@@ -197,7 +197,7 @@ ScalarImageToRunLengthFeaturesFilter<TImage, THistogramFrequencyContainer>
     }
   for( featureNum = 0; featureNum < numFeatures; featureNum++ )
     {
-    tempFeatureDevs[featureNum] = vcl_sqrt( tempFeatureDevs[featureNum] /
+    tempFeatureDevs[featureNum] = std::sqrt( tempFeatureDevs[featureNum] /
       numOffsets );
 
     this->m_FeatureMeans->push_back( tempFeatureMeans[featureNum] );
@@ -320,7 +320,7 @@ ScalarImageToRunLengthFeaturesFilter<TImage, THistogramFrequencyContainer>
 {
   if ( this->GetNumberOfInputs() < 1 )
     {
-    return 0;
+    return ITK_NULLPTR;
     }
   return static_cast<const ImageType *>( this->ProcessObject::GetInput( 0 ) );
 }
@@ -354,7 +354,7 @@ ScalarImageToRunLengthFeaturesFilter<TImage, THistogramFrequencyContainer>
 {
   if ( this->GetNumberOfInputs() < 2 )
     {
-    return 0;
+    return ITK_NULLPTR;
     }
   return static_cast< const ImageType *>( this->ProcessObject::GetInput( 1 ) );
 }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h
index 88151c8..4e646b3 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.h
@@ -233,17 +233,17 @@ public:
 protected:
   ScalarImageToRunLengthMatrixFilter();
   virtual ~ScalarImageToRunLengthMatrixFilter() {};
-  void PrintSelf( std::ostream& os, Indent indent ) const;
+  virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
 
   /** Standard itk::ProcessObject subclass method. */
   typedef DataObject::Pointer DataObjectPointer;
 
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType idx );
+  virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType idx ) ITK_OVERRIDE;
 
   /** This method causes the filter to generate its output. */
-  virtual void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /**
    * Normalize the direction of the offset before it is applied.
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx
index 00e0af4..ae29ccf 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx
@@ -93,7 +93,7 @@ ScalarImageToRunLengthMatrixFilter<TImageType, THistogramFrequencyContainer>
 {
   if( this->GetNumberOfInputs() < 1 )
     {
-    return 0;
+    return ITK_NULLPTR;
     }
   return static_cast<const ImageType *>( this->ProcessObject::GetInput( 0 ) );
 }
@@ -105,7 +105,7 @@ ScalarImageToRunLengthMatrixFilter<TImageType, THistogramFrequencyContainer>
 {
   if( this->GetNumberOfInputs() < 2 )
     {
-    return 0;
+    return ITK_NULLPTR;
     }
   return static_cast<const ImageType *>( this->ProcessObject::GetInput( 1 ) );
 }
@@ -153,6 +153,7 @@ ScalarImageToRunLengthMatrixFilter<TImageType, THistogramFrequencyContainer>
   output->Initialize( size, this->m_LowerBound, this->m_UpperBound );
 
   MeasurementVectorType run( output->GetMeasurementVectorSize() );
+  typename HistogramType::IndexType hIndex;
 
   // Iterate over all of those pixels and offsets, adding each
   // distance/intensity pair to the histogram
@@ -270,7 +271,8 @@ ScalarImageToRunLengthMatrixFilter<TImageType, THistogramFrequencyContainer>
 
       if( run[1] >= this->m_MinDistance && run[1] <= this->m_MaxDistance )
         {
-        output->IncreaseFrequencyOfMeasurement( run, 1 );
+        output->GetIndex( run, hIndex );
+        output->IncreaseFrequencyOfIndex( hIndex, 1 );
 
         itkDebugStatement(typename HistogramType::IndexType tempMeasurementIndex;)
         itkDebugStatement(output->GetIndex(run,tempMeasurementIndex);)
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h
index ee9c2f2..fc1d321 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.h
@@ -198,19 +198,19 @@ public:
 protected:
   ScalarImageToTextureFeaturesFilter();
   virtual ~ScalarImageToTextureFeaturesFilter() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   void FastCompute();
 
   void FullCompute();
 
   /** This method causes the filter to generate its output. */
-  virtual void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** Make a DataObject to be used for output output. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType) ITK_OVERRIDE;
 
 private:
   typename CooccurrenceMatrixFilterType::Pointer m_GLCMGenerator;
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx
index 4cafebc..7304a82 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkScalarImageToTextureFeaturesFilter.hxx
@@ -145,7 +145,7 @@ ScalarImageToTextureFeaturesFilter< TImage, THistogramFrequencyContainer >::Full
     M(1) = x(1), M(k) = M(k-1) + (x(k) - M(k-1) ) / k
     S(1) = 0, S(k) = S(k-1) + (x(k) - M(k-1)) * (x(k) - M(k))
     for 2 <= k <= n, then
-    sigma = vcl_sqrt(S(n) / n) (or divide by n-1 for sample SD instead of
+    sigma = std::sqrt(S(n) / n) (or divide by n-1 for sample SD instead of
     population SD).
   */
 
@@ -174,7 +174,7 @@ ScalarImageToTextureFeaturesFilter< TImage, THistogramFrequencyContainer >::Full
     }
   for ( featureNum = 0; featureNum < numFeatures; featureNum++ )
     {
-    tempFeatureDevs[featureNum] = vcl_sqrt(tempFeatureDevs[featureNum] / numOffsets);
+    tempFeatureDevs[featureNum] = std::sqrt(tempFeatureDevs[featureNum] / numOffsets);
 
     m_FeatureMeans->push_back(tempFeatureMeans[featureNum]);
     m_FeatureStandardDeviations->push_back(tempFeatureDevs[featureNum]);
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h
index 108cc10..3f685c5 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSparseFrequencyContainer2.h
@@ -98,7 +98,7 @@ public:
 protected:
   SparseFrequencyContainer2();
   virtual ~SparseFrequencyContainer2() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   SparseFrequencyContainer2(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.h
index d6ff9c7..a3af83d 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.h
@@ -98,16 +98,16 @@ protected:
 
   StandardDeviationPerComponentSampleFilter();
   virtual ~StandardDeviationPerComponentSampleFilter();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** DataObject pointer */
   typedef DataObject::Pointer DataObjectPointer;
 
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   MeasurementVectorSizeType GetMeasurementVectorSize() const;
 
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx
index b0cd43c..6b0f014 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx
@@ -195,7 +195,7 @@ StandardDeviationPerComponentSampleFilter< TSample >
     mean[i] = meanValue;
     const double variance =
       ( sumOfSquares[i] - meanValue * meanValue * totalFrequency ) / ( totalFrequency - 1.0 );
-    standardDeviation[i] = vcl_sqrt(variance);
+    standardDeviation[i] = std::sqrt(variance);
     }
 
   decoratedStandardDeviationOutput->Set(standardDeviation);
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.h
index 88d756b..2a43fff 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.h
@@ -34,13 +34,29 @@ TSize FloorLog(TSize size);
 template< typename TValue >
 TValue MedianOfThree(const TValue a, const TValue b, const TValue c);
 
+/** Finds the minimum and maximum of each measurement value, over an interval
+ * within a sample.
+ *
+ * Samples are considered independently of each other.
+ *
+ * \param[in] sample An instance of TSample.
+ * \param[in] begin An iterator to the first measurement vector in sample to be
+ *                  considered.
+ * \param[in] end An iterator to the last measurement vector in sample to be
+ *                considered.
+ * \param[out] min A new measurement vector, with the minimum values.
+ * \param[out] max A new measurement vector, with the maximum values.
+ *
+ * \tparam TSample A subtype of Statistics::Sample.
+ */
 template< typename TSample >
 void FindSampleBound(const TSample * sample,
-                     typename TSample::ConstIterator begin,
-                     typename TSample::ConstIterator end,
+                     const typename TSample::ConstIterator & begin,
+                     const typename TSample::ConstIterator & end,
                      typename TSample::MeasurementVectorType & min,
                      typename TSample::MeasurementVectorType & max);
 
+/** The endIndex should points one point after the last elements. */
 template< typename TSubsample >
 void FindSampleBoundAndMean(const TSubsample * sample,
                             int beginIndex,
@@ -49,9 +65,10 @@ void FindSampleBoundAndMean(const TSubsample * sample,
                             typename TSubsample::MeasurementVectorType & max,
                             typename TSubsample::MeasurementVectorType & mean);
 
-/** The Partition algorithm performs partial sorting in a sample. Given a
- * partitionValue, the algorithm moves to the beginning of the sample all
- * MeasurementVectors whose component activeDimension is smaller than the
+/** The Partition algorithm performs partial sorting in a sample.
+ *
+ * Given a partitionValue, the algorithm moves to the beginning of the sample
+ * all MeasurementVectors whose component activeDimension is smaller than the
  * partitionValue. In this way, the sample is partially sorted in two groups.
  * First the group with activeDimension component smaller than the
  * partitionValue, then the group of MeasurementVectors with activeDimension
@@ -60,7 +77,15 @@ void FindSampleBoundAndMean(const TSubsample * sample,
  * Only the activeDimension components of the MeasurementVectors in the sample
  * will be considered by the algorithm. The Algorithm return an index in the
  * range of [beginIndex,endIndex] pointing to the element with activeDimension
- * component closest to the partitionValue. */
+ * component closest to the partitionValue.
+ *
+ * The endIndex should points one point after the last elements if multiple
+ * partitionValue exist in the sample the return index will points the middle
+ * of such values. Implemented following the description of the partition
+ * algorithm in the QuickSelect entry of the Wikipedia.
+ *
+ * \sa http://en.wikipedia.org/wiki/Selection_algorithm.
+ */
 template< typename TSubsample >
 int Partition(TSubsample *sample,
               unsigned int activeDimension,
@@ -68,13 +93,22 @@ int Partition(TSubsample *sample,
               const typename TSubsample::MeasurementType partitionValue);
 
 /** QuickSelect is an algorithm for finding the k-th largest element of a list.
+ *
  * In this case, only one of the components of the measurement vectors is
  * considered. This component is defined by the argument activeDimension. The
  * search is rectricted to the range between the index begin and end, also
- * passed as arguments. In this version, a guess value for the median index is
- * provided in the argument medianGuess. The algorithm returns the value of the
- * activeDimension component in the MeasurementVector located in the kth position.
- * http://en.wikipedia.org/wiki/Selection_algorithm */
+ * passed as arguments.
+ *
+ * The endIndex should point one point after the last elements. Note that kth
+ * is an index in a different scale than [beginIndex,endIndex]. For example,
+ * it is possible to feed this function with beginIndex=15, endIndex=23, and
+ * kth=3, since we can ask for the element 3rd in the range [15,23].
+ * In this version, a guess value for the median index is provided in the
+ * argument medianGuess. The algorithm returns the value of the activeDimension
+ * component in the MeasurementVector located in the kth position.
+ *
+ * \sa http://en.wikipedia.org/wiki/Selection_algorithm
+ */
 template< typename TSubsample >
 typename TSubsample::MeasurementType
 QuickSelect(TSubsample * sample,
@@ -84,11 +118,19 @@ QuickSelect(TSubsample * sample,
             typename TSubsample::MeasurementType medianGuess);
 
 /** QuickSelect is an algorithm for finding the k-th largest element of a list.
+ *
  * In this case, only one of the components of the measurement vectors is
  * considered. This component is defined by the argument activeDimension. The
  * search is rectricted to the range between the index begin and end, also
  * passed as arguments.
- * http://en.wikipedia.org/wiki/Selection_algorithm. */
+ *
+ * The endIndex should point one point after the last elements. Note that kth
+ * is an index in a different scale than [beginIndex,endIndex]. For example,
+ * it is possible to feed this function with beginIndex=15, endIndex=23, and
+ * kth=3, since we can ask for the element 3rd in the range [15,23].
+ *
+ * \sa http://en.wikipedia.org/wiki/Selection_algorithm.
+ */
 template< typename TSubsample >
 typename TSubsample::MeasurementType
 QuickSelect(TSubsample *sample,
@@ -97,11 +139,13 @@ QuickSelect(TSubsample *sample,
             int kth);
 
 /** NthElement is an algorithm for finding the n-th largest element of a list.
+ *
  * In this case, only one of the components of the measurement vectors is
  * considered. This component is defined by the argument activeDimension. The
  * search is restricted to the range between the index begin and end, also
  * passed as arguments. This algorithm was based on the procedure used in the STL
- * nth_element method. */
+ * nth_element method.
+ */
 template< typename TSubsample >
 typename TSubsample::MeasurementType
 NthElement(TSubsample *sample,
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx
index cfdcd86..ca47e6a 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkStatisticsAlgorithm.hxx
@@ -40,11 +40,6 @@ inline TSize FloorLog(TSize size)
   return k;
 }
 
-/** The endIndex should points one point after the last elements if multiple
- * partitionValue exist in the sample the return index will points the middle
- * of such values. Implemented following the description of the partition
- * algorithm in the QuickSelect entry of the Wikipedia.
- * http://en.wikipedia.org/wiki/Selection_algorithm. */
 template< typename TSubsample >
 inline int Partition(TSubsample *sample,
                      unsigned int activeDimension,
@@ -245,23 +240,23 @@ inline TValue MedianOfThree(const TValue a,
 
 template< typename TSample >
 inline void FindSampleBound(const TSample *sample,
-                            typename TSample::ConstIterator begin,
-                            typename TSample::ConstIterator end,
+                            const typename TSample::ConstIterator & begin,
+                            const typename TSample::ConstIterator & end,
                             typename TSample::MeasurementVectorType & min,
                             typename TSample::MeasurementVectorType & max)
 {
   typedef typename TSample::MeasurementVectorSizeType MeasurementVectorSizeType;
 
-  const MeasurementVectorSizeType Dimension = sample->GetMeasurementVectorSize();
-  if ( Dimension == 0 )
+  const MeasurementVectorSizeType measurementSize = sample->GetMeasurementVectorSize();
+  if ( measurementSize == 0 )
     {
     itkGenericExceptionMacro(
       << "Length of a sample's measurement vector hasn't been set.");
     }
   // Sanity check
-  MeasurementVectorTraits::Assert(max, Dimension,
+  MeasurementVectorTraits::Assert(max, measurementSize,
                                   "Length mismatch StatisticsAlgorithm::FindSampleBound");
-  MeasurementVectorTraits::Assert(min, Dimension,
+  MeasurementVectorTraits::Assert(min, measurementSize,
                                   "Length mismatch StatisticsAlgorithm::FindSampleBound");
 
   if ( sample->Size() == 0 )
@@ -271,33 +266,31 @@ inline void FindSampleBound(const TSample *sample,
        measurement vectors");
     }
 
-  unsigned int dimension;
-  typename TSample::MeasurementVectorType temp;
+  min = begin.GetMeasurementVector();
+  max = min;
 
-  min = max = temp = begin.GetMeasurementVector();
-  while ( true )
+  typename TSample::ConstIterator measurementItr = begin;
+  // increment measurementItr once, since min and max are already set to the 0th measurement
+  ++measurementItr;
+  for(; measurementItr != end; ++measurementItr )
     {
-    for ( dimension = 0; dimension < Dimension; dimension++ )
+    const typename TSample::MeasurementVectorType & currentMeasure =
+      measurementItr.GetMeasurementVector();
+
+    for ( MeasurementVectorSizeType dimension = 0; dimension < measurementSize; ++dimension )
       {
-      if ( temp[dimension] < min[dimension] )
+      if ( currentMeasure[dimension] < min[dimension] )
         {
-        min[dimension] = temp[dimension];
+        min[dimension] = currentMeasure[dimension];
         }
-      else if ( temp[dimension] > max[dimension] )
+      else if ( currentMeasure[dimension] > max[dimension] )
         {
-        max[dimension] = temp[dimension];
+        max[dimension] = currentMeasure[dimension];
         }
       }
-    ++begin;
-    if ( begin == end )
-      {
-      break;
-      }
-    temp = begin.GetMeasurementVector();
-    }   // end of while
+    }
 }
 
-/** The endIndex should points one point after the last elements. */
 template< typename TSubsample >
 inline void
 FindSampleBoundAndMean(const TSubsample *sample,
@@ -358,11 +351,6 @@ FindSampleBoundAndMean(const TSubsample *sample,
     }
 }
 
-/** The endIndex should point one point after the last elements.  Note that kth
- * is an index in a different scale than [beginIndex,endIndex].  For example,
- * it is possible to feed this function with beginIndex=15, endIndex=23, and
- * kth=3, since we can ask for the element 3rd in the range [15,23]. */
-
 template< typename TSubsample >
 inline typename TSubsample::MeasurementType
 QuickSelect(TSubsample *sample,
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsample.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsample.hxx
index aa40075..c293b76 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsample.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsample.hxx
@@ -30,7 +30,7 @@ template< typename TSample >
 Subsample< TSample >
 ::Subsample()
 {
-  m_Sample = 0;
+  m_Sample = ITK_NULLPTR;
   m_TotalFrequency = NumericTraits< AbsoluteFrequencyType >::Zero;
   m_ActiveDimension = 0;
 }
@@ -43,7 +43,7 @@ Subsample< TSample >
   Superclass::PrintSelf(os, indent);
 
   os << indent << "Sample: ";
-  if ( m_Sample != 0 )
+  if ( m_Sample != ITK_NULLPTR )
     {
     os << m_Sample << std::endl;
     }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsamplerBase.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsamplerBase.h
index 086e745..0527439 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsamplerBase.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsamplerBase.h
@@ -114,12 +114,12 @@ protected:
    * This does a complete copy of the subsampler state
    * to the new subsampler
    */
-  virtual typename LightObject::Pointer InternalClone() const;
+  virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE;
 
   SubsamplerBase();
   virtual ~SubsamplerBase() {};
 
-  virtual void PrintSelf(std::ostream& os, Indent indent) const;
+  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
 
   SampleConstPointer m_Sample;
   bool               m_RequestMaximumNumberOfResults;
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx
index 96a9694..c6e2a30 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkSubsamplerBase.hxx
@@ -26,7 +26,7 @@ template <typename TSample>
 SubsamplerBase<TSample>
 ::SubsamplerBase()
 {
-  m_Sample = NULL;
+  m_Sample = ITK_NULLPTR;
   m_RequestMaximumNumberOfResults = true;
   m_CanSelectQuery = true;
   m_Seed =  0;
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkTDistribution.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkTDistribution.h
index 619fefd..9c4388d 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkTDistribution.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkTDistribution.h
@@ -72,16 +72,16 @@ public:
 
   /** Return the number of parameters.  For a univariate Student-t
    * distribution, the number of parameters is 1 (degrees of freedom) */
-  virtual SizeValueType GetNumberOfParameters() const { return 1; }
+  virtual SizeValueType GetNumberOfParameters() const ITK_OVERRIDE { return 1; }
 
   /** Evaluate the probability density function (pdf). The parameters
    * of the distribution are  assigned via SetParameters().  */
-  virtual double EvaluatePDF(double x) const;
+  virtual double EvaluatePDF(double x) const ITK_OVERRIDE;
 
   /** Evaluate the probability density function (pdf). The parameters
    * for the distribution are passed as a parameters vector. The
    * ordering of the parameters is (degrees of freedom). */
-  virtual double EvaluatePDF(double x, const ParametersType &) const;
+  virtual double EvaluatePDF(double x, const ParametersType &) const ITK_OVERRIDE;
 
   /** Evaluate the probability density function (pdf). The parameters
    * of the distribution are passed as separate parameters. */
@@ -89,12 +89,12 @@ public:
 
   /** Evaluate the cumulative distribution function (cdf). The parameters
    * of the distribution are  assigned via SetParameters().  */
-  virtual double EvaluateCDF(double x) const;
+  virtual double EvaluateCDF(double x) const ITK_OVERRIDE;
 
   /** Evaluate the cumulative distribution function (cdf). The parameters
    * for the distribution are passed as a parameters vector. The
    * ordering of the parameters is (degreesOfFreedom). */
-  virtual double EvaluateCDF(double x, const ParametersType &) const;
+  virtual double EvaluateCDF(double x, const ParametersType &) const ITK_OVERRIDE;
 
   /** Evaluate the cumulative distribution function (cdf). The parameters
    * of the distribution are passed as separate parameters. */
@@ -103,13 +103,13 @@ public:
   /** Evaluate the inverse cumulative distribution function (inverse
    * cdf).  Parameter p must be between 0.0 and 1.0. The parameters
    * of the distribution are  assigned via SetParameters().  */
-  virtual double EvaluateInverseCDF(double p) const;
+  virtual double EvaluateInverseCDF(double p) const ITK_OVERRIDE;
 
   /** Evaluate the inverse cumulative distribution function (inverse
    * cdf).  Parameter p must be between 0.0 and 1.0.  The parameters
    * for the distribution are passed as a parameters vector. The
    * ordering of the parameters is (degrees of freedom). */
-  virtual double EvaluateInverseCDF(double p, const ParametersType &) const;
+  virtual double EvaluateInverseCDF(double p, const ParametersType &) const ITK_OVERRIDE;
 
   /** Evaluate the inverse cumulative distribution function (inverse
    * cdf).  Parameter p must be between 0.0 and 1.0.  The parameters
@@ -125,18 +125,18 @@ public:
   virtual SizeValueType GetDegreesOfFreedom() const;
 
   /** Does the Student-t distribution have a mean? */
-  virtual bool HasMean() const { return true; }
+  virtual bool HasMean() const ITK_OVERRIDE { return true; }
 
   /** Get the mean of the distribution. */
-  virtual double GetMean() const;
+  virtual double GetMean() const ITK_OVERRIDE;
 
   /** Does the Student-t distribution have a variance? Variance is
    * only defined for degrees of freedom greater than 2 */
-  virtual bool HasVariance() const;
+  virtual bool HasVariance() const ITK_OVERRIDE;
 
   /** Get the variance of the distribution. If the variance does not exist,
    * then quiet_NaN is returned. */
-  virtual double GetVariance() const;
+  virtual double GetVariance() const ITK_OVERRIDE;
 
   /** Static method to evaluate the probability density function (pdf)
    * of a Student-t with a specified number of degrees of freedom. The
@@ -200,7 +200,7 @@ protected:
   TDistribution(void);
   virtual ~TDistribution(void) {}
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   TDistribution(const Self &);  //purposely not implemented
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx
index f57ae79..d94efd4 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx
@@ -28,7 +28,7 @@ template<typename TVectorContainer>
 VectorContainerToListSampleAdaptor<TVectorContainer>
 ::VectorContainerToListSampleAdaptor()
 {
-  this->m_VectorContainer = 0;
+  this->m_VectorContainer = ITK_NULLPTR;
 }
 
 template<typename TVectorContainer>
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.h
index 542e704..4f2c588 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.h
@@ -54,27 +54,23 @@ public:
   itkTypeMacro(WeightedCovarianceSampleFilter, CovarianceSampleFilter);
   itkNewMacro(Self);
 
-  /** Traits derived from the base class */
+  /** Types derived from the base class */
   typedef typename Superclass::SampleType                     SampleType;
   typedef typename Superclass::MeasurementVectorType          MeasurementVectorType;
   typedef typename Superclass::MeasurementVectorSizeType      MeasurementVectorSizeType;
-  typedef typename Superclass::MeasurementVectorDecoratedType MeasurementVectorDecoratedType;
-  typedef typename Superclass::OutputType                     OutputType;
-  typedef typename Superclass::MeasurementRealType            MeasurementRealType;
+  typedef typename Superclass::MeasurementType                MeasurementType;
+
+  /** Types derived from the base class */
   typedef typename Superclass::MeasurementVectorRealType      MeasurementVectorRealType;
+  typedef typename Superclass::MeasurementRealType            MeasurementRealType;
 
-  /** Typedef for WeightedCovariance output */
-  typedef VariableSizeMatrix< double > MatrixType;
 
-  /** Weight calculation function typedef */
-  typedef FunctionBase< MeasurementVectorType, double > WeightingFunctionType;
+  /** Type of weight values */
+  typedef double WeightValueType;
 
-  /** VariableSizeMatrix is not a DataObject, we need to decorate it to push it down
-   * a ProcessObject's pipeline */
-  typedef  SimpleDataObjectDecorator< MatrixType > MatrixDecoratedType;
 
-  /** Array typedef for weights */
-  typedef Array< double > WeightArrayType;
+  /** Array type for weights */
+  typedef Array< WeightValueType > WeightArrayType;
 
   /** Type of DataObjects to use for the weight array type */
   typedef SimpleDataObjectDecorator< WeightArrayType > InputWeightArrayObjectType;
@@ -82,12 +78,25 @@ public:
   /** Method to set the input value of the weight array */
   itkSetGetDecoratedInputMacro(Weights, WeightArrayType);
 
+
+  /** Weight calculation function type */
+  typedef FunctionBase< MeasurementVectorType, WeightValueType > WeightingFunctionType;
+
   /** Type of DataObjects to use for Weight function */
   typedef DataObjectDecorator< WeightingFunctionType > InputWeightingFunctionObjectType;
 
-  /** Method to set the weighting function */
+  /** Method to set/get the weighting function */
   itkSetGetDecoratedObjectInputMacro(WeightingFunction, WeightingFunctionType);
 
+
+  /** Types derived from the base class */
+  typedef typename Superclass::MatrixType          MatrixType;
+  typedef typename Superclass::MatrixDecoratedType MatrixDecoratedType;
+
+  /** Types derived from the base class */
+  typedef typename Superclass::MeasurementVectorDecoratedType MeasurementVectorDecoratedType;
+  typedef typename Superclass::OutputType                     OutputType;
+
 protected:
   WeightedCovarianceSampleFilter();
   virtual ~WeightedCovarianceSampleFilter();
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx
index d9be072..05f5c77 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedCovarianceSampleFilter.hxx
@@ -29,7 +29,7 @@ template< typename TSample >
 WeightedCovarianceSampleFilter< TSample >
 ::WeightedCovarianceSampleFilter()
 {
-  this->ProcessObject::SetNthInput(1, NULL);
+  this->ProcessObject::SetNthInput(1, ITK_NULLPTR);
 }
 
 template< typename TSample >
@@ -58,7 +58,7 @@ WeightedCovarianceSampleFilter< TSample >
   const InputWeightingFunctionObjectType *functionObject =
     this->GetWeightingFunctionInput();
 
-  if ( functionObject != NULL )
+  if ( functionObject != ITK_NULLPTR )
     {
     this->ComputeCovarianceMatrixWithWeightingFunction();
     return;
@@ -68,7 +68,7 @@ WeightedCovarianceSampleFilter< TSample >
   const InputWeightArrayObjectType *weightArrayObject =
     this->GetWeightsInput();
 
-  if ( weightArrayObject != NULL )
+  if ( weightArrayObject != ITK_NULLPTR )
     {
     this->ComputeCovarianceMatrixWithWeights();
     return;
@@ -84,96 +84,100 @@ inline void
 WeightedCovarianceSampleFilter< TSample >
 ::ComputeCovarianceMatrixWithWeightingFunction()
 {
+  // set up input / output
   const SampleType *input = this->GetInput();
 
-  MeasurementVectorSizeType measurementVectorSize =
-    input->GetMeasurementVectorSize();
+  MeasurementVectorSizeType measurementVectorSize = input->GetMeasurementVectorSize();
 
   MatrixDecoratedType *decoratedOutput =
-    itkDynamicCastInDebugMode< MatrixDecoratedType * >(
-      this->ProcessObject::GetOutput(0) );
+    itkDynamicCastInDebugMode< MatrixDecoratedType * >( this->ProcessObject::GetOutput(0) );
 
   MatrixType output = decoratedOutput->Get();
+  output.SetSize( measurementVectorSize, measurementVectorSize );
+  output.Fill( NumericTraits< typename MatrixType::ValueType >::Zero );
 
   MeasurementVectorDecoratedType *decoratedMeanOutput =
-    itkDynamicCastInDebugMode< MeasurementVectorDecoratedType * >(
-      this->ProcessObject::GetOutput(1) );
+    itkDynamicCastInDebugMode< MeasurementVectorDecoratedType * >( this->ProcessObject::GetOutput(1) );
 
-  output.SetSize(measurementVectorSize, measurementVectorSize);
-  output.Fill(0.0);
+  // calculate mean
+  const WeightingFunctionType * const weightingFunction = this->GetWeightingFunction();
 
-  // if weighting function is specifed, use it to compute the mean
-  const InputWeightingFunctionObjectType *functionObject = this->GetWeightingFunctionInput();
-  const WeightingFunctionType *weightFunction = functionObject->Get();
-
-  typedef WeightedMeanSampleFilter< TSample >  WeightedMeanSampleFilterType;
-  typename WeightedMeanSampleFilterType::Pointer meanFilter = WeightedMeanSampleFilterType::New();
+  typedef WeightedMeanSampleFilter< SampleType > WeightedMeanFilterType;
+  typename WeightedMeanFilterType::Pointer meanFilter = WeightedMeanFilterType::New();
 
   meanFilter->SetInput( input );
-  meanFilter->SetWeightingFunction( weightFunction );
+  meanFilter->SetWeightingFunction( weightingFunction );
   meanFilter->Update();
 
-  const MeasurementVectorRealType mean = meanFilter->GetMean();
+  const typename WeightedMeanFilterType::MeasurementVectorRealType mean = meanFilter->GetMean();
+  decoratedMeanOutput->Set( mean );
 
+  // covariance algorithm
   MeasurementVectorRealType diff;
-  NumericTraits<MeasurementVectorRealType>::SetLength(diff, measurementVectorSize);
-  MeasurementVectorType measurements;
-  NumericTraits<MeasurementVectorType>::SetLength(measurements, measurementVectorSize);
+  NumericTraits<MeasurementVectorRealType>::SetLength( diff, measurementVectorSize );
 
-  double weight;
-  double totalWeight = 0.0;
-  double sumSquaredWeight = 0.0;
+  WeightValueType totalWeight = NumericTraits< WeightValueType >::Zero;
 
+  WeightValueType totalSquaredWeight = NumericTraits< WeightValueType >::Zero;
 
-  decoratedMeanOutput->Set( mean );
-
-  typename TSample::ConstIterator iter = input->Begin();
-  typename TSample::ConstIterator end = input->End();
+  typename SampleType::ConstIterator iter =      input->Begin();
+  const typename SampleType::ConstIterator end = input->End();
 
   // fills the lower triangle and the diagonal cells in the covariance matrix
-  while ( iter != end )
+  for (; iter != end; ++iter )
     {
-    measurements = iter.GetMeasurementVector();
-    weight = iter.GetFrequency() * weightFunction->Evaluate(measurements);
+    const MeasurementVectorType & measurement = iter.GetMeasurementVector();
+
+    const typename SampleType::AbsoluteFrequencyType frequency = iter.GetFrequency();
+
+    const WeightValueType rawWeight = weightingFunction->Evaluate( measurement );
+
+    const WeightValueType weight = ( rawWeight * static_cast< WeightValueType >( frequency ) );
     totalWeight += weight;
-    sumSquaredWeight += weight * weight;
-    for ( unsigned int i = 0; i < measurementVectorSize; ++i )
+    totalSquaredWeight += ( weight * weight );
+
+    for ( unsigned int dim = 0; dim < measurementVectorSize; ++dim )
       {
-      diff[i] = static_cast< MeasurementRealType >( measurements[i] ) - mean[i];
+      const MeasurementRealType component =
+        static_cast< MeasurementRealType >( measurement[dim] );
+
+      diff[dim] = ( component - mean[dim] );
       }
 
     // updates the covariance matrix
-    for ( unsigned int row = 0; row < measurementVectorSize; row++ )
+    for ( unsigned int row = 0; row < measurementVectorSize; ++row )
       {
-      for ( unsigned int col = 0; col < row + 1; col++ )
+      for ( unsigned int col = 0; col < row + 1; ++col )
         {
-        output(row, col) += weight * diff[row] * diff[col];
+        output(row, col) +=
+          ( static_cast< MeasurementRealType >( weight ) * diff[row] * diff[col] );
         }
       }
-    ++iter;
     }
 
   // fills the upper triangle using the lower triangle
-  for ( unsigned int row = 1; row < measurementVectorSize; row++ )
+  for ( unsigned int row = 1; row < measurementVectorSize; ++row )
     {
-    for ( unsigned int col = 0; col < row; col++ )
+    for ( unsigned int col = 0; col < row; ++col )
       {
       output(col, row) = output(row, col);
       }
     }
 
-  const double normalizationFactor = ( totalWeight - ( sumSquaredWeight / totalWeight ) );
+  const double normalizationFactor = ( totalWeight - ( totalSquaredWeight / totalWeight ) );
 
   if( normalizationFactor > vnl_math::eps )
     {
-    output /= normalizationFactor;
+    const double inverseNormalizationFactor = 1.0 / normalizationFactor;
+
+    output *= inverseNormalizationFactor;
     }
   else
     {
     itkExceptionMacro("Normalization factor was too close to zero. Value = " << normalizationFactor );
     }
 
-  decoratedOutput->Set(output);
+  decoratedOutput->Set( output );
 }
 
 template< typename TSample >
@@ -181,64 +185,66 @@ inline void
 WeightedCovarianceSampleFilter< TSample >
 ::ComputeCovarianceMatrixWithWeights()
 {
+  // set up input / output
   const SampleType *input = this->GetInput();
 
-  const MeasurementVectorSizeType measurementVectorSize =
-    input->GetMeasurementVectorSize();
+  MeasurementVectorSizeType measurementVectorSize = input->GetMeasurementVectorSize();
 
-  MatrixDecoratedType * const decoratedOutput =
-    itkDynamicCastInDebugMode< MatrixDecoratedType * >(
-      this->ProcessObject::GetOutput(0) );
+  MatrixDecoratedType *decoratedOutput =
+    itkDynamicCastInDebugMode< MatrixDecoratedType * >( this->ProcessObject::GetOutput(0) );
 
   MatrixType output = decoratedOutput->Get();
+  output.SetSize( measurementVectorSize, measurementVectorSize );
+  output.Fill( NumericTraits< typename MatrixType::ValueType >::Zero );
 
-  MeasurementVectorDecoratedType * const decoratedMeanOutput =
-    itkDynamicCastInDebugMode< MeasurementVectorDecoratedType * >(
-      this->ProcessObject::GetOutput(1) );
-
-  output.SetSize(measurementVectorSize, measurementVectorSize);
-  output.Fill(0.0);
+  MeasurementVectorDecoratedType *decoratedMeanOutput =
+    itkDynamicCastInDebugMode< MeasurementVectorDecoratedType * >( this->ProcessObject::GetOutput(1) );
 
-  const InputWeightArrayObjectType *weightArrayObject = this->GetWeightsInput();
-  const WeightArrayType weightArray = weightArrayObject->Get();
+  // calculate mean
+  const WeightArrayType & weightsArray = this->GetWeights();
 
-  typedef WeightedMeanSampleFilter< TSample >  WeightedMeanSampleFilterType;
-  typename WeightedMeanSampleFilterType::Pointer meanFilter = WeightedMeanSampleFilterType::New();
+  typedef WeightedMeanSampleFilter< SampleType > WeightedMeanFilterType;
+  typename WeightedMeanFilterType::Pointer meanFilter = WeightedMeanFilterType::New();
 
   meanFilter->SetInput( input );
-  meanFilter->SetWeights( weightArray );
+  meanFilter->SetWeights( weightsArray );
   meanFilter->Update();
 
-  const MeasurementVectorRealType mean = meanFilter->GetMean();
-
-  decoratedMeanOutput->Set(mean);
+  const typename WeightedMeanFilterType::MeasurementVectorRealType mean = meanFilter->GetMean();
+  decoratedMeanOutput->Set( mean );
 
+  // covariance algorithm
   MeasurementVectorRealType diff;
-  NumericTraits<MeasurementVectorRealType>::SetLength(diff, measurementVectorSize);
-  MeasurementVectorType measurements;
-  NumericTraits<MeasurementVectorType>::SetLength(measurements, measurementVectorSize);
+  NumericTraits<MeasurementVectorRealType>::SetLength( diff, measurementVectorSize );
 
-  double totalWeight = 0.0;
-  double sumSquaredWeight = 0.0;
+  WeightValueType totalWeight = NumericTraits< WeightValueType >::Zero;
 
-  unsigned int measurementVectorIndex = 0;
+  WeightValueType totalSquaredWeight = NumericTraits< WeightValueType >::Zero;
 
-  typename TSample::ConstIterator iter = input->Begin();
-  typename TSample::ConstIterator end = input->End();
+  typename SampleType::ConstIterator iter =      input->Begin();
+  const typename SampleType::ConstIterator end = input->End();
 
   // fills the lower triangle and the diagonal cells in the covariance matrix
-  measurementVectorIndex = 0;
-  while ( iter != end )
+  for ( unsigned int sampleVectorIndex = 0;
+        iter != end;
+        ++iter, ++sampleVectorIndex )
     {
-    const double weight = iter.GetFrequency() * ( weightArray )[measurementVectorIndex];
-    measurements = iter.GetMeasurementVector();
+    const MeasurementVectorType & measurement = iter.GetMeasurementVector();
+
+    const typename SampleType::AbsoluteFrequencyType frequency = iter.GetFrequency();
 
+    const WeightValueType rawWeight = weightsArray[sampleVectorIndex];
+
+    const WeightValueType weight = ( rawWeight * static_cast< WeightValueType >( frequency ) );
     totalWeight += weight;
-    sumSquaredWeight += weight * weight;
+    totalSquaredWeight += ( weight * weight );
 
-    for ( unsigned int i = 0; i < measurementVectorSize; ++i )
+    for ( unsigned int dim = 0; dim < measurementVectorSize; ++dim )
       {
-      diff[i] = static_cast< MeasurementRealType >( measurements[i] ) - mean[i];
+      const MeasurementRealType component =
+        static_cast< MeasurementRealType >( measurement[dim] );
+
+      diff[dim] = ( component - mean[dim] );
       }
 
     // updates the covariance matrix
@@ -246,11 +252,10 @@ WeightedCovarianceSampleFilter< TSample >
       {
       for ( unsigned int col = 0; col < row + 1; ++col )
         {
-        output(row, col) += weight * diff[row] * diff[col];
+        output(row, col) +=
+          ( static_cast< MeasurementRealType >( weight ) * diff[row] * diff[col] );
         }
       }
-    ++iter;
-    ++measurementVectorIndex;
     }
 
   // fills the upper triangle using the lower triangle
@@ -262,18 +267,20 @@ WeightedCovarianceSampleFilter< TSample >
       }
     }
 
-  const double normalizationFactor = ( totalWeight - ( sumSquaredWeight / totalWeight ) );
+  const double normalizationFactor = ( totalWeight - ( totalSquaredWeight / totalWeight ) );
 
   if( normalizationFactor > vnl_math::eps )
     {
-    output /= normalizationFactor;
+    const double inverseNormalizationFactor = 1.0 / normalizationFactor;
+
+    output *= inverseNormalizationFactor;
     }
   else
     {
     itkExceptionMacro("Normalization factor was too close to zero. Value = " << normalizationFactor );
     }
 
-  decoratedOutput->Set(output);
+  decoratedOutput->Set( output );
 }
 } // end of namespace Statistics
 } // end of namespace itk
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.h b/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.h
index 3f16d9f..efb230c 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.h
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.h
@@ -52,34 +52,45 @@ public:
   itkTypeMacro(WeightedMeanSampleFilter, MeanSampleFilter);
   itkNewMacro(Self);
 
-  /** Traits derived from the base class */
+  /** Types derived from the base class */
   typedef typename Superclass::SampleType                     SampleType;
-  typedef typename Superclass::MeasurementType                MeasurementType;
   typedef typename Superclass::MeasurementVectorType          MeasurementVectorType;
   typedef typename Superclass::MeasurementVectorSizeType      MeasurementVectorSizeType;
-  typedef typename Superclass::MeasurementVectorDecoratedType MeasurementVectorDecoratedType;
-  typedef typename Superclass::OutputType                     OutputType;
-  typedef typename Superclass::MeasurementRealType            MeasurementRealType;
+  typedef typename Superclass::MeasurementType                MeasurementType;
+
+  /** Types derived from the base class */
   typedef typename Superclass::MeasurementVectorRealType      MeasurementVectorRealType;
+  typedef typename Superclass::MeasurementRealType            MeasurementRealType;
+
 
-  /** Array typedef for weights */
-  typedef Array< double > WeightArrayType;
+  /** Type of weight values */
+  typedef double WeightValueType;
+
+
+  /** Array type for weights */
+  typedef Array< WeightValueType > WeightArrayType;
 
   /** Type of DataObjects to use for the weight array type */
   typedef SimpleDataObjectDecorator< WeightArrayType > InputWeightArrayObjectType;
 
-  /** Method to set the input value of the weight array */
+  /** Method to set/get the input value of the weight array */
   itkSetGetDecoratedInputMacro(Weights, WeightArrayType);
 
-  /** Weight calculation function typedef */
-  typedef FunctionBase< MeasurementVectorType, double > WeightingFunctionType;
+
+  /** Weight calculation function type */
+  typedef FunctionBase< MeasurementVectorType, WeightValueType > WeightingFunctionType;
 
   /** Type of DataObjects to use for Weight function */
   typedef DataObjectDecorator< WeightingFunctionType > InputWeightingFunctionObjectType;
 
-  /** Method to set the weighting function */
+  /** Method to set/get the weighting function */
   itkSetGetDecoratedObjectInputMacro(WeightingFunction, WeightingFunctionType);
 
+
+  /** Types derived from the base class */
+  typedef typename Superclass::MeasurementVectorDecoratedType MeasurementVectorDecoratedType;
+  typedef typename Superclass::OutputType                     OutputType;
+
 protected:
   WeightedMeanSampleFilter();
   virtual ~WeightedMeanSampleFilter();
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx b/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx
index 198702e..063155b 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/include/itkWeightedMeanSampleFilter.hxx
@@ -18,9 +18,12 @@
 #ifndef __itkWeightedMeanSampleFilter_hxx
 #define __itkWeightedMeanSampleFilter_hxx
 
-#include "itkMeasurementVectorTraits.h"
 #include "itkWeightedMeanSampleFilter.h"
 
+#include <vector>
+#include "itkCompensatedSummation.h"
+#include "itkMeasurementVectorTraits.h"
+
 namespace itk
 {
 namespace Statistics
@@ -29,7 +32,7 @@ template< typename TSample >
 WeightedMeanSampleFilter< TSample >
 ::WeightedMeanSampleFilter()
 {
-  this->ProcessObject::SetNthInput(1, NULL);
+  this->ProcessObject::SetNthInput(1, ITK_NULLPTR);
 }
 
 template< typename TSample >
@@ -58,7 +61,7 @@ WeightedMeanSampleFilter< TSample >
   const InputWeightingFunctionObjectType *functionObject =
     this->GetWeightingFunctionInput();
 
-  if ( functionObject != NULL )
+  if ( functionObject != ITK_NULLPTR )
     {
     this->ComputeMeanWithWeightingFunction();
     return;
@@ -68,7 +71,7 @@ WeightedMeanSampleFilter< TSample >
   const InputWeightArrayObjectType *weightArrayObject =
     this->GetWeightsInput();
 
-  if ( weightArrayObject != NULL )
+  if ( weightArrayObject != ITK_NULLPTR )
     {
     this->ComputeMeanWithWeights();
     return;
@@ -83,9 +86,10 @@ void
 WeightedMeanSampleFilter< TSample >
 ::ComputeMeanWithWeights()
 {
+  // set up input / output
   const SampleType *input = this->GetInput();
 
-  MeasurementVectorSizeType measurementVectorSize =
+  const MeasurementVectorSizeType measurementVectorSize =
     input->GetMeasurementVectorSize();
 
   MeasurementVectorDecoratedType *decoratedOutput =
@@ -96,51 +100,44 @@ WeightedMeanSampleFilter< TSample >
 
   NumericTraits<MeasurementVectorRealType>::SetLength( output, this->GetMeasurementVectorSize() );
 
-  //reset the output
-  for ( unsigned int dim = 0; dim < measurementVectorSize; dim++ )
-    {
-    output[dim] = NumericTraits< MeasurementRealType >::Zero;
-    }
-
-  typedef typename NumericTraits<
-    MeasurementRealType >::AccumulateType MeasurementRealAccumulateType;
+  // algorithm start
+  typedef CompensatedSummation< MeasurementRealType > MeasurementRealAccumulateType;
+  std::vector< MeasurementRealAccumulateType > sum( measurementVectorSize );
 
-  Array< MeasurementRealAccumulateType > sum( measurementVectorSize );
-  sum.Fill( NumericTraits< MeasurementRealAccumulateType >::Zero );
+  const WeightArrayType & weightsArray = this->GetWeights();
 
+  WeightValueType totalWeight = NumericTraits< WeightValueType >::Zero;
 
-  typename TSample::ConstIterator iter = input->Begin();
-  typename TSample::ConstIterator end =  input->End();
-  double totalWeight = 0.0;
-  double weight;
+  typename SampleType::ConstIterator iter = input->Begin();
+  typename SampleType::ConstIterator end =  input->End();
 
-  typename TSample::MeasurementVectorType measurements;
+  for ( unsigned int sampleVectorIndex = 0;
+        iter != end;
+        ++iter, ++sampleVectorIndex )
+    {
+    const MeasurementVectorType & measurement = iter.GetMeasurementVector();
 
-  const InputWeightArrayObjectType *weightArrayObject = this->GetWeightsInput();
-  const WeightArrayType             weightArray = weightArrayObject->Get();
+    const typename SampleType::AbsoluteFrequencyType frequency = iter.GetFrequency();
 
-  int measurementVectorIndex = 0;
+    const WeightValueType rawWeight = weightsArray[sampleVectorIndex];
 
-  while ( iter != end )
-    {
-    measurements = iter.GetMeasurementVector();
-    weight = iter.GetFrequency() * ( weightArray )[measurementVectorIndex];
+    const WeightValueType weight = ( rawWeight * static_cast< WeightValueType >( frequency ) );
     totalWeight += weight;
 
     for ( unsigned int dim = 0; dim < measurementVectorSize; dim++ )
       {
-      const MeasurementRealType component = static_cast< MeasurementRealType >( measurements[dim] );
-      sum[dim] += static_cast< MeasurementRealAccumulateType >( component * weight );
+      const MeasurementRealType component =
+        static_cast< MeasurementRealType >( measurement[dim] );
+
+      sum[dim] += ( component * weight );
       }
-    ++measurementVectorIndex;
-    ++iter;
     }
 
   if ( totalWeight > vnl_math::eps )
     {
     for ( unsigned int dim = 0; dim < measurementVectorSize; dim++ )
       {
-      output[dim] = static_cast< MeasurementRealType >( sum[dim] / totalWeight );
+      output[dim] = ( sum[dim].GetSum() / static_cast< MeasurementRealType >( totalWeight ) );
       }
     }
   else
@@ -148,7 +145,7 @@ WeightedMeanSampleFilter< TSample >
     itkExceptionMacro("Total weight was too close to zero. Value = " << totalWeight );
     }
 
-  decoratedOutput->Set(output);
+  decoratedOutput->Set( output );
 }
 
 template< typename TSample >
@@ -156,9 +153,10 @@ void
 WeightedMeanSampleFilter< TSample >
 ::ComputeMeanWithWeightingFunction()
 {
+  // set up input / output
   const SampleType *input = this->GetInput();
 
-  MeasurementVectorSizeType measurementVectorSize =
+  const MeasurementVectorSizeType measurementVectorSize =
     input->GetMeasurementVectorSize();
 
   MeasurementVectorDecoratedType *decoratedOutput =
@@ -169,47 +167,50 @@ WeightedMeanSampleFilter< TSample >
 
   NumericTraits<MeasurementVectorRealType>::SetLength( output, this->GetMeasurementVectorSize() );
 
-  //reset the output
-  for ( unsigned int dim = 0; dim < measurementVectorSize; dim++ )
-    {
-    output[dim] = NumericTraits< MeasurementRealType >::Zero;
-    }
+  // algorithm start
+  typedef CompensatedSummation< MeasurementRealType > MeasurementRealAccumulateType;
+  std::vector< MeasurementRealAccumulateType > sum( measurementVectorSize );
 
-  typename TSample::ConstIterator iter = input->Begin();
-  typename TSample::ConstIterator end =  input->End();
-  double totalWeight = 0.0;
-  double weight;
+  const WeightingFunctionType * const weightFunction = this->GetWeightingFunction();
 
-  typename TSample::MeasurementVectorType measurements;
+  WeightValueType totalWeight = NumericTraits< WeightValueType >::Zero;
 
-  // if weighting function is specifed, use it to compute the mean
-  const InputWeightingFunctionObjectType *functionObject =
-    this->GetWeightingFunctionInput();
-
-  const WeightingFunctionType *weightFunction = functionObject->Get();
+  typename SampleType::ConstIterator iter = input->Begin();
+  const typename SampleType::ConstIterator end = input->End();
 
-  while ( iter != end )
+  for (; iter != end; ++iter )
     {
-    measurements = iter.GetMeasurementVector();
-    weight =
-      iter.GetFrequency() * weightFunction->Evaluate(measurements);
+    const MeasurementVectorType & measurement = iter.GetMeasurementVector();
+
+    const typename SampleType::AbsoluteFrequencyType frequency = iter.GetFrequency();
+
+    const WeightValueType rawWeight = weightFunction->Evaluate( measurement );
+
+    const WeightValueType weight = ( rawWeight * static_cast< WeightValueType >( frequency ) );
     totalWeight += weight;
+
     for ( unsigned int dim = 0; dim < measurementVectorSize; dim++ )
       {
-      output[dim] += measurements[dim] * weight;
+      const MeasurementRealType component =
+        static_cast< MeasurementRealType >( measurement[dim] );
+
+      sum[dim] += ( component * weight );
       }
-    ++iter;
     }
 
-  if ( totalWeight != 0.0 )
+  if ( totalWeight > vnl_math::eps )
     {
     for ( unsigned int dim = 0; dim < measurementVectorSize; dim++ )
       {
-      output[dim] /= totalWeight;
+      output[dim] = ( sum[dim].GetSum() / static_cast< MeasurementRealType >( totalWeight ) );
       }
     }
+  else
+    {
+    itkExceptionMacro("Total weight was too close to zero. Value = " << totalWeight );
+    }
 
-  decoratedOutput->Set(output);
+  decoratedOutput->Set( output );
 }
 } // end of namespace Statistics
 } // end of namespace itk
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/src/itkChiSquareDistribution.cxx b/Utilities/ITK/Modules/Numerics/Statistics/src/itkChiSquareDistribution.cxx
index e211c45..00acfad 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/src/itkChiSquareDistribution.cxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/src/itkChiSquareDistribution.cxx
@@ -84,8 +84,8 @@ ChiSquareDistribution
 
   if ( x >= 0.0 )
     {
-    pdf = vcl_exp(-0.5 * x) * vcl_pow(x, dofon2 - 1.0)
-          / ( vcl_pow(2.0, dofon2) * dgamma_(&dofon2) );
+    pdf = std::exp(-0.5 * x) * std::pow(x, dofon2 - 1.0)
+          / ( std::pow(2.0, dofon2) * dgamma_(&dofon2) );
     }
 
   return pdf;
@@ -159,7 +159,7 @@ ChiSquareDistribution
   nx = GaussianDistribution::InverseCDF(p);
 
   double f = 2.0 / ( 9.0 * dof );
-  x = dof * vcl_pow(1.0 - f + nx * vcl_sqrt(f), 3.0);
+  x = dof * std::pow(1.0 - f + nx * std::sqrt(f), 3.0);
 
   // The approximation above is only accurate for large degrees of
   // freedom. We'll improve the approximation by a few Newton iterations.
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/src/itkGaussianDistribution.cxx b/Utilities/ITK/Modules/Numerics/Statistics/src/itkGaussianDistribution.cxx
index 957953f..7ca0959 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/src/itkGaussianDistribution.cxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/src/itkGaussianDistribution.cxx
@@ -162,7 +162,7 @@ double
 GaussianDistribution
 ::PDF(double x)
 {
-  return vnl_math::one_over_sqrt2pi * vcl_exp(-0.5 * x * x);
+  return vnl_math::one_over_sqrt2pi * std::exp(-0.5 * x * x);
 }
 
 double
@@ -171,8 +171,8 @@ GaussianDistribution
 {
   double xminusmean = x - mean;
 
-  return ( vnl_math::one_over_sqrt2pi / vcl_sqrt(variance) )
-         * vcl_exp(-0.5 * xminusmean * xminusmean / variance);
+  return ( vnl_math::one_over_sqrt2pi / std::sqrt(variance) )
+         * std::exp(-0.5 * xminusmean * xminusmean / variance);
 }
 
 double
@@ -205,7 +205,7 @@ GaussianDistribution
 ::CDF(double x, double mean, double variance)
 {
   // convert to zero mean unit variance
-  double u = ( x - mean ) / vcl_sqrt(variance);
+  double u = ( x - mean ) / std::sqrt(variance);
 
   return 0.5 * ( vnl_erf(vnl_math::sqrt1_2 * u) + 1.0 );
 }
@@ -252,7 +252,7 @@ GaussianDistribution
 
   /**  Step 1:  use 26.2.23 from Abramowitz and Stegun */
 
-  dt = vcl_sqrt( -2.0 * vcl_log(dp) );
+  dt = std::sqrt( -2.0 * std::log(dp) );
   dx = dt
        - ( ( .010328e+0 * dt + .802853e+0 ) * dt + 2.515517e+0 )
        / ( ( ( .001308e+0 * dt + .189269e+0 ) * dt + 1.432788e+0 ) * dt + 1.e+0 );
@@ -262,7 +262,7 @@ GaussianDistribution
   for ( newt = 0; newt < 3; newt++ )
     {
     dq  = 0.5e+0 * vnl_erfc(dx * vnl_math::sqrt1_2) - dp;
-    ddq = vcl_exp(-0.5e+0 * dx * dx) / 2.506628274631000e+0;
+    ddq = std::exp(-0.5e+0 * dx * dx) / 2.506628274631000e+0;
     dx  = dx + dq / ddq;
     }
 
@@ -295,7 +295,7 @@ GaussianDistribution
     {
     // apply the mean and variance to provide the value for the
     // prescribed Gaussian
-    x = x * vcl_sqrt(variance) + mean;
+    x = x * std::sqrt(variance) + mean;
     return x;
     }
 }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx b/Utilities/ITK/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx
index e6b2445..6d6c96d 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/src/itkNormalVariateGenerator.cxx
@@ -34,7 +34,7 @@ NormalVariateGenerator::NormalVariateGenerator()
   m_TLEN  = ( 8 * m_LEN );
   m_Vec1 = new int[m_TLEN];
 
-  m_Gausssave = 0;
+  m_Gausssave = ITK_NULLPTR;
   this->Initialize(0);
 }
 
@@ -89,11 +89,11 @@ void NormalVariateGenerator::Initialize(int randomSeed)
 //          Z = (sqrt (1/2TLEN)) * A * (B + n)
 //      where:
 //          B = C / A.
-//      We set m_Chic1 = A * vcl_sqrt(0.5 / TLEN),  m_Chic2 = B
+//      We set m_Chic1 = A * std::sqrt(0.5 / TLEN),  m_Chic2 = B
 
   fake = 1.0 + 0.125 / m_TLEN;   // This is A
-  m_Chic2 = vcl_sqrt(2.0 * m_TLEN  -  fake * fake) /  fake;
-  m_Chic1 = fake * vcl_sqrt(0.5 / m_TLEN);
+  m_Chic2 = std::sqrt(2.0 * m_TLEN  -  fake * fake) /  fake;
+  m_Chic1 = fake * std::sqrt(0.5 / m_TLEN);
 
   m_ActualRSD = 0.0;
 }
@@ -124,12 +124,12 @@ double NormalVariateGenerator::FastNorm(void)
   int    r;
   int    s;
   int    t;
-  int *  pa = 0;
-  int *  pb = 0;
-  int *  pc = 0;
-  int *  pd = 0;
+  int *  pa = ITK_NULLPTR;
+  int *  pb = ITK_NULLPTR;
+  int *  pc = ITK_NULLPTR;
+  int *  pd = ITK_NULLPTR;
   int *  pe;
-  int *  p0 = 0;
+  int *  p0 = ITK_NULLPTR;
   int    mtype;
   int    stype;
   double ts;
@@ -333,16 +333,16 @@ nextpair:
   m_Irs = ( m_Irs <= 0 ) ? ( ( m_Irs << 1 ) ^ 333556017 ) : ( m_Irs << 1 );
   r = m_Irs + m_Lseed;
   if ( r < 0 ) { r = ~r; }
-  tz = -2.0 * vcl_log( ( r + 0.5 ) * m_Rcons );   /* Sum of squares */
+  tz = -2.0 * std::log( ( r + 0.5 ) * m_Rcons );   /* Sum of squares */
   ts += tz;
-  tz = vcl_sqrt(tz / tr);
+  tz = std::sqrt(tz / tr);
   m_Vec1[p++] = (int)( m_Scale *  tx * tz );
   m_Vec1[p++] = (int)( m_Scale *  ty * tz );
   if ( p < m_TLEN ) { goto nextpair; }
   /*    Horrid, but good enough */
   /*    Calc correction factor to make sum of squares = TLEN    */
   ts = m_TLEN / ts;  /* Should be close to 1.0  */
-  tr = vcl_sqrt(ts);
+  tr = std::sqrt(ts);
   for ( p = 0; p < m_TLEN; p++ )
     {
     tx = m_Vec1[p] * tr;
@@ -358,7 +358,7 @@ recalcsumsq:
     ts += ( tx * tx );
     }
   /*    Now ts should be Scale*Scale*TLEN or thereabouts   */
-  ts = vcl_sqrt( ts / ( m_Scale * m_Scale * m_TLEN ) );
+  ts = std::sqrt( ts / ( m_Scale * m_Scale * m_TLEN ) );
   m_ActualRSD = 1.0 / ts;   /* Reciprocal of actual Standard Devtn */
   goto startpass;
 }
diff --git a/Utilities/ITK/Modules/Numerics/Statistics/src/itkTDistribution.cxx b/Utilities/ITK/Modules/Numerics/Statistics/src/itkTDistribution.cxx
index 9b0e981..fc3fa61 100644
--- a/Utilities/ITK/Modules/Numerics/Statistics/src/itkTDistribution.cxx
+++ b/Utilities/ITK/Modules/Numerics/Statistics/src/itkTDistribution.cxx
@@ -85,7 +85,7 @@ TDistribution
   double pdf;
 
   pdf = ( dgamma_(&dofplusoneon2) / dgamma_(&dofon2) )
-        / ( vcl_sqrt(dof * vnl_math::pi) * vcl_pow(1.0 + ( ( x * x ) / dof ), dofplusoneon2) );
+        / ( std::sqrt(dof * vnl_math::pi) * std::pow(1.0 + ( ( x * x ) / dof ), dofplusoneon2) );
 
   return pdf;
 }
@@ -189,10 +189,10 @@ TDistribution
   dof4 = dof * dof3;
 
   gaussX = GaussianDistribution::InverseCDF(p);
-  gaussX3 = vcl_pow(gaussX, 3.0);
-  gaussX5 = vcl_pow(gaussX, 5.0);
-  gaussX7 = vcl_pow(gaussX, 7.0);
-  gaussX9 = vcl_pow(gaussX, 9.0);
+  gaussX3 = std::pow(gaussX, 3.0);
+  gaussX5 = std::pow(gaussX, 5.0);
+  gaussX7 = std::pow(gaussX, 7.0);
+  gaussX9 = std::pow(gaussX, 9.0);
 
   x = gaussX
       + ( gaussX3 + gaussX ) / ( 4.0 * dof )
@@ -411,8 +411,6 @@ TDistribution
       << m_Parameters.size()
       << " parameters.");
     }
-
-  return NumericTraits< double >::quiet_NaN();
 }
 
 void
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx
index 5ee6545..029f869 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx
@@ -126,7 +126,7 @@ BlockMatchingImageFilter< TFixedImage, TMovingImage, TFeatures, TDisplacements,
       break;
     }
   itkExceptionMacro(<< "Bad output index " << idx );
-  return 0;
+  return ITK_NULLPTR;
 }
 
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkCenteredTransformInitializer.h b/Utilities/ITK/Modules/Registration/Common/include/itkCenteredTransformInitializer.h
index c807884..b5ff8d3 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkCenteredTransformInitializer.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkCenteredTransformInitializer.h
@@ -135,7 +135,7 @@ protected:
   CenteredTransformInitializer();
   ~CenteredTransformInitializer(){}
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   itkGetModifiableObjectMacro(Transform, TransformType);
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkCommandIterationUpdate.h b/Utilities/ITK/Modules/Registration/Common/include/itkCommandIterationUpdate.h
index 19ae7ea..785d642 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkCommandIterationUpdate.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkCommandIterationUpdate.h
@@ -57,12 +57,12 @@ public:
   /**
    * Execute method will print data at each iteration
    */
-  void Execute(itk::Object *caller, const itk::EventObject & event)
+  virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE
   {
     Execute( (const itk::Object *)caller, event);
   }
 
-  void Execute(const itk::Object *, const itk::EventObject & event)
+  virtual void Execute(const itk::Object *, const itk::EventObject & event) ITK_OVERRIDE
   {
     if( typeid( event ) == typeid( itk::StartEvent ) )
       {
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkCommandVnlIterationUpdate.h b/Utilities/ITK/Modules/Registration/Common/include/itkCommandVnlIterationUpdate.h
index 3740b5e..34863ca 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkCommandVnlIterationUpdate.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkCommandVnlIterationUpdate.h
@@ -57,12 +57,12 @@ public:
   /**
    * Execute method will print data at each iteration
    */
-  void Execute(itk::Object *caller, const itk::EventObject & event)
+  virtual void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE
   {
     Execute( (const itk::Object *)caller, event);
   }
 
-  void Execute(const itk::Object * itkNotUsed(caller), const itk::EventObject & event)
+  virtual void Execute(const itk::Object * itkNotUsed(caller), const itk::EventObject & event) ITK_OVERRIDE
   {
     if( typeid( event ) == typeid( itk::StartEvent ) )
       {
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx
index 4ae2665..98526c1 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkCompareHistogramImageToImageMetric.hxx
@@ -26,11 +26,11 @@ namespace itk
 template< typename TFixedImage, typename TMovingImage >
 CompareHistogramImageToImageMetric< TFixedImage, TMovingImage >::CompareHistogramImageToImageMetric()
 {
-  m_TrainingFixedImage        = 0; // has to be provided by the user.
-  m_TrainingMovingImage       = 0; // has to be provided by the user.
-  m_TrainingTransform         = 0; // has to be provided by the user.
-  m_TrainingInterpolator      = 0; // has to be provided by the user.
-  m_TrainingHistogram         = 0; // either provided by the user or created
+  m_TrainingFixedImage        = ITK_NULLPTR; // has to be provided by the user.
+  m_TrainingMovingImage       = ITK_NULLPTR; // has to be provided by the user.
+  m_TrainingTransform         = ITK_NULLPTR; // has to be provided by the user.
+  m_TrainingInterpolator      = ITK_NULLPTR; // has to be provided by the user.
+  m_TrainingHistogram         = ITK_NULLPTR; // either provided by the user or created
 }
 
 template< typename TFixedImage, typename TMovingImage >
@@ -111,6 +111,7 @@ throw ( ExceptionObject )
   TrainingFixedIteratorType;
   typename FixedImageType::IndexType index;
   typename FixedImageType::RegionType fixedRegion;
+  typename HistogramType::IndexType hIndex;
 
   TrainingFixedIteratorType ti(this->m_TrainingFixedImage,
                                this->m_TrainingFixedImageRegion);
@@ -144,7 +145,9 @@ throw ( ExceptionObject )
         sample.SetSize(2);
         sample[0] = TrainingFixedValue;
         sample[1] = TrainingMovingValue;
-        this->m_TrainingHistogram->IncreaseFrequencyOfMeasurement(sample, 1);
+
+        this->m_TrainingHistogram->GetIndex( sample, hIndex );
+        this->m_TrainingHistogram->IncreaseFrequencyOfIndex( hIndex, 1 );
         }
       }
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx
index 1941961..37ce2c9 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx
@@ -32,7 +32,7 @@ CorrelationCoefficientHistogramImageToImageMetric< TFixedImage, TMovingImage >
   const MeasureType varianceY  = this->VarianceY(histogram);
   const MeasureType covariance = this->Covariance(histogram);
 
-  return vcl_fabs( covariance / ( vcl_sqrt(varianceX) * vcl_sqrt(varianceY) ) );
+  return std::fabs( covariance / ( std::sqrt(varianceX) * std::sqrt(varianceY) ) );
 }
 
 template< typename TFixedImage, typename TMovingImage >
@@ -87,10 +87,10 @@ CorrelationCoefficientHistogramImageToImageMetric< TFixedImage, TMovingImage >
     {
     varX += static_cast< double >( histogram.GetFrequency(i, 0) )
             / histogram.GetTotalFrequency()
-            * vcl_pow(histogram.GetMeasurement(i, 0), 2);
+            * std::pow(histogram.GetMeasurement(i, 0), 2);
     }
 
-  return varX - vcl_pow(MeanX(histogram), 2);
+  return varX - std::pow(MeanX(histogram), 2);
 }
 
 template< typename TFixedImage, typename TMovingImage >
@@ -105,10 +105,10 @@ CorrelationCoefficientHistogramImageToImageMetric< TFixedImage, TMovingImage >
     {
     varY += static_cast< double >( histogram.GetFrequency(i, 1) )
             / histogram.GetTotalFrequency()
-            * vcl_pow(histogram.GetMeasurement(i, 1), 2);
+            * std::pow(histogram.GetMeasurement(i, 1), 2);
     }
 
-  return varY - vcl_pow(MeanY(histogram), 2);
+  return varY - std::pow(MeanY(histogram), 2);
 }
 
 template< typename TFixedImage, typename TMovingImage >
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx
index 9da946b..9f90143 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx
@@ -230,7 +230,7 @@ DisplacementFieldTransformParametersAdaptor<TTransform>
   newDisplacementField->Update();
   newDisplacementField->DisconnectPipeline();
 
-  typename DisplacementFieldType::Pointer newInverseDisplacementField = NULL;
+  typename DisplacementFieldType::Pointer newInverseDisplacementField = ITK_NULLPTR;
   if( this->m_Transform->GetInverseDisplacementField() )
     {
     typename LinearInterpolatorType::Pointer inverseInterpolator = LinearInterpolatorType::New();
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx
index 0a65f1e..abe9d56 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkEuclideanDistancePointMetric.hxx
@@ -28,7 +28,7 @@ template< typename TFixedPointSet, typename TMovingPointSet, typename TDistanceM
 EuclideanDistancePointMetric< TFixedPointSet, TMovingPointSet, TDistanceMap >
 ::EuclideanDistancePointMetric()
 {
-  m_DistanceMap = 0;
+  m_DistanceMap = ITK_NULLPTR;
 
   // when set to true it will be a bit faster, but it will result in minimizing
   // the sum of distances^4 instead of the sum of distances^2
@@ -121,7 +121,7 @@ EuclideanDistancePointMetric< TFixedPointSet, TMovingPointSet, TDistanceMap >
 
         if ( !m_ComputeSquaredDistance )
           {
-          dist = vcl_sqrt(dist);
+          dist = std::sqrt(dist);
           }
 
         if ( dist < minimumDistance )
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx
index 8e8a794..6bfb24e 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkGradientDifferenceImageToImageMetric.hxx
@@ -38,7 +38,7 @@ GradientDifferenceImageToImageMetric< TFixedImage, TMovingImage >
 {
   unsigned int iDimension;
 
-  m_TransformMovingImageFilter = 0;
+  m_TransformMovingImageFilter = ITK_NULLPTR;
 
   for ( iDimension = 0; iDimension < FixedImageDimension; iDimension++ )
     {
@@ -265,7 +265,10 @@ GradientDifferenceImageToImageMetric< TFixedImage, TMovingImage >
       ++iterate;
       }
 
-    m_Variance[iDimension] /= nPixels;
+    if (nPixels > 0)
+      {
+      m_Variance[iDimension] /= nPixels;
+      }
     }
 }
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx
index 4f85a28..2e02b9a 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx
@@ -277,6 +277,7 @@ HistogramImageToImageMetric< TFixedImage, TMovingImage >
 
   typename FixedImageType::IndexType index;
   typename FixedImageType::RegionType fixedRegion;
+  typename HistogramType::IndexType hIndex;
 
   fixedRegion = this->GetFixedImageRegion();
   FixedIteratorType ti(fixedImage, fixedRegion);
@@ -326,7 +327,9 @@ HistogramImageToImageMetric< TFixedImage, TMovingImage >
         sample.SetSize(2);
         sample[0] = fixedValue;
         sample[1] = movingValue;
-        histogram.IncreaseFrequencyOfMeasurement(sample, 1);
+
+        histogram.GetIndex( sample, hIndex );
+        histogram.IncreaseFrequencyOfIndex( hIndex, 1 );
         }
       }
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethod.h b/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethod.h
index adc46bb..d3a1738 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethod.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethod.h
@@ -186,11 +186,11 @@ public:
    * output. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
   /** Method to return the latest modified time of this object or
    * any of its cached ivars */
-  ModifiedTimeType GetMTime() const;
+  virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE;
 
 #ifdef ITKV3_COMPATIBILITY
   /** Method that initiates the registration. This will Initialize and ensure
@@ -214,10 +214,10 @@ public:
 protected:
   ImageRegistrationMethod();
   virtual ~ImageRegistrationMethod() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
   /** Method invoked by the pipeline in order to trigger the computation of
    * the registration. */
-  void  GenerateData();
+  virtual void  GenerateData() ITK_OVERRIDE;
 
   /** Provides derived classes with the ability to set this private var */
   itkSetMacro(LastTransformParameters, ParametersType);
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx
index 4ff7b9e..112820f 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx
@@ -31,12 +31,12 @@ ImageRegistrationMethod< TFixedImage, TMovingImage >
 {
   this->SetNumberOfRequiredOutputs(1);    // for the Transform
 
-  m_FixedImage   = 0; // has to be provided by the user.
-  m_MovingImage  = 0; // has to be provided by the user.
-  m_Transform    = 0; // has to be provided by the user.
-  m_Interpolator = 0; // has to be provided by the user.
-  m_Metric       = 0; // has to be provided by the user.
-  m_Optimizer    = 0; // has to be provided by the user.
+  m_FixedImage   = ITK_NULLPTR; // has to be provided by the user.
+  m_MovingImage  = ITK_NULLPTR; // has to be provided by the user.
+  m_Transform    = ITK_NULLPTR; // has to be provided by the user.
+  m_Interpolator = ITK_NULLPTR; // has to be provided by the user.
+  m_Metric       = ITK_NULLPTR; // has to be provided by the user.
+  m_Optimizer    = ITK_NULLPTR; // has to be provided by the user.
 
   m_InitialTransformParameters = ParametersType(1);
   m_LastTransformParameters = ParametersType(1);
@@ -312,7 +312,7 @@ ImageRegistrationMethod< TFixedImage, TMovingImage >
       break;
     default:
       itkExceptionMacro("MakeOutput request for an output number larger than the expected number of outputs");
-      return 0;
+      return ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethodImageSource.h b/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethodImageSource.h
index 4aee71a..89aa96e 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethodImageSource.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkImageRegistrationMethodImageSource.h
@@ -125,7 +125,7 @@ void GenerateImages( const typename MovingImageType::SizeType & size )
     d += displacement;
     const double x = d[0];
     const double y = d[1];
-    const double value = 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) );
+    const double value = 200.0 * std::exp( - ( x*x + y*y )/(s*s) );
     ri.Set( static_cast<typename MovingImageType::PixelType>(value) );
     ++ri;
   }
@@ -138,7 +138,7 @@ void GenerateImages( const typename MovingImageType::SizeType & size )
     d = p-center;
     const double x = d[0];
     const double y = d[1];
-    const double value = 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) );
+    const double value = 200.0 * std::exp( - ( x*x + y*y )/(s*s) );
     ti.Set( static_cast<typename FixedImageType::PixelType>(value) );
     ++ti;
   }
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkImageToImageMetric.h b/Utilities/ITK/Modules/Registration/Common/include/itkImageToImageMetric.h
index 05ca62b..9259589 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkImageToImageMetric.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkImageToImageMetric.h
@@ -209,7 +209,7 @@ public:
   void SetTransformParameters(const ParametersType & parameters) const;
 
   /** Return the number of parameters required by the Transform */
-  unsigned int GetNumberOfParameters(void) const
+  virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE
   {
     return m_Transform->GetNumberOfParameters();
   }
@@ -318,7 +318,7 @@ protected:
   ImageToImageMetric();
   virtual ~ImageToImageMetric();
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** \class FixedImageSamplePoint
    * A fixed image spatial sample consists of the fixed domain point
@@ -469,14 +469,14 @@ public:
                               MovingImagePointType & mappedPoint,
                               bool & sampleWithinSupportRegion,
                               double & movingImageValue,
-                              ThreadIdType threadID) const;
+                              ThreadIdType threadId) const;
 
   virtual void TransformPointWithDerivatives(unsigned int sampleNumber,
                                              MovingImagePointType & mappedPoint,
                                              bool & sampleWithinSupportRegion,
                                              double & movingImageValue,
                                              ImageDerivativesType & gradient,
-                                             ThreadIdType threadID) const;
+                                             ThreadIdType threadId) const;
 
   /** Boolean to indicate if the interpolator BSpline. */
   bool m_InterpolatorIsBSpline;
@@ -489,7 +489,7 @@ public:
   /** Compute image derivatives at a point. */
   virtual void ComputeImageDerivatives(const MovingImagePointType & mappedPoint,
                                        ImageDerivativesType & gradient,
-                                       ThreadIdType threadID) const;
+                                       ThreadIdType threadId) const;
 
   /**
    * Types and variables related to multi-threading
@@ -517,20 +517,20 @@ public:
 
   static ITK_THREAD_RETURN_TYPE  GetValueMultiThreadedPostProcess(void *arg);
 
-  virtual inline void       GetValueThread(ThreadIdType threadID) const;
+  virtual inline void       GetValueThread(ThreadIdType threadId) const;
 
   virtual inline void       GetValueThreadPreProcess(
-    ThreadIdType itkNotUsed(threadID),
+    ThreadIdType itkNotUsed(threadId),
     bool itkNotUsed(withinSampleThread) ) const
   {}
   virtual inline bool       GetValueThreadProcessSample(
-    ThreadIdType itkNotUsed(threadID),
+    ThreadIdType itkNotUsed(threadId),
     SizeValueType itkNotUsed(fixedImageSample),
     const MovingImagePointType & itkNotUsed(mappedPoint),
     double itkNotUsed(movingImageValue) ) const
   { return false; }
   virtual inline void       GetValueThreadPostProcess(
-    ThreadIdType itkNotUsed(threadID),
+    ThreadIdType itkNotUsed(threadId),
     bool itkNotUsed(withinSampleThread) ) const
   {}
 
@@ -546,21 +546,21 @@ public:
 
   static ITK_THREAD_RETURN_TYPE GetValueAndDerivativeMultiThreadedPostProcess(void *arg);
 
-  virtual inline void  GetValueAndDerivativeThread(ThreadIdType threadID) const;
+  virtual inline void  GetValueAndDerivativeThread(ThreadIdType threadId) const;
 
   virtual inline void  GetValueAndDerivativeThreadPreProcess(
-    ThreadIdType itkNotUsed(threadID),
+    ThreadIdType itkNotUsed(threadId),
     bool itkNotUsed(withinSampleThread) ) const
   {}
   virtual inline bool  GetValueAndDerivativeThreadProcessSample(
-    ThreadIdType itkNotUsed(threadID),
+    ThreadIdType itkNotUsed(threadId),
     SizeValueType itkNotUsed(fixedImageSample),
     const MovingImagePointType & itkNotUsed(mappedPoint),
     double itkNotUsed(movingImageValue),
     const ImageDerivativesType & itkNotUsed(movingImageGradientValue) ) const
   { return false; }
   virtual inline void  GetValueAndDerivativeThreadPostProcess(
-    ThreadIdType itkNotUsed(threadID),
+    ThreadIdType itkNotUsed(threadId),
     bool itkNotUsed(withinSampleThread) ) const
   {}
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkImageToImageMetric.hxx
index ae0c80f..f436adb 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkImageToImageMetric.hxx
@@ -42,19 +42,19 @@ ImageToImageMetric< TFixedImage, TMovingImage >
 
   m_NumberOfPixelsCounted(0),
 
-  m_FixedImage(0), // has to be provided by the user.
-  m_MovingImage(0), // has to be provided by the user.
+  m_FixedImage(ITK_NULLPTR), // has to be provided by the user.
+  m_MovingImage(ITK_NULLPTR), // has to be provided by the user.
 
-  m_Transform(NULL), // has to be provided by the user.
-  m_ThreaderTransform(NULL), // constructed at initialization.
+  m_Transform(ITK_NULLPTR), // has to be provided by the user.
+  m_ThreaderTransform(ITK_NULLPTR), // constructed at initialization.
 
-  m_Interpolator(0), // has to be provided by the user.
+  m_Interpolator(ITK_NULLPTR), // has to be provided by the user.
 
   m_ComputeGradient(true), // metric computes gradient by default
-  m_GradientImage(NULL),   // computed at initialization
+  m_GradientImage(ITK_NULLPTR),   // computed at initialization
 
-  m_FixedImageMask(0),
-  m_MovingImageMask(0),
+  m_FixedImageMask(ITK_NULLPTR),
+  m_MovingImageMask(ITK_NULLPTR),
 
   m_NumberOfThreads(1),
 
@@ -66,7 +66,7 @@ ImageToImageMetric< TFixedImage, TMovingImage >
   m_TransformIsBSpline(false),
   m_NumBSplineWeights(0),
 
-  m_BSplineTransform(NULL),
+  m_BSplineTransform(ITK_NULLPTR),
   m_BSplineTransformWeightsArray(),
   m_BSplineTransformIndicesArray(),
   m_BSplinePreTransformPointsArray(0),
@@ -76,15 +76,15 @@ ImageToImageMetric< TFixedImage, TMovingImage >
   m_UseCachingOfBSplineWeights(true),
   m_BSplineTransformWeights(),
   m_BSplineTransformIndices(),
-  m_ThreaderBSplineTransformWeights(NULL),
-  m_ThreaderBSplineTransformIndices(NULL),
+  m_ThreaderBSplineTransformWeights(ITK_NULLPTR),
+  m_ThreaderBSplineTransformIndices(ITK_NULLPTR),
 
   m_InterpolatorIsBSpline(false),
-  m_BSplineInterpolator(NULL),
-  m_DerivativeCalculator(NULL),
+  m_BSplineInterpolator(ITK_NULLPTR),
+  m_DerivativeCalculator(ITK_NULLPTR),
 
   m_Threader(MultiThreaderType::New()),
-  m_ThreaderNumberOfMovingImageSamples(NULL),
+  m_ThreaderNumberOfMovingImageSamples(ITK_NULLPTR),
   m_WithinThreadPreProcess(false),
   m_WithinThreadPostProcess(false)
 {
@@ -107,16 +107,16 @@ ImageToImageMetric< TFixedImage, TMovingImage >
 ::~ImageToImageMetric()
 {
   delete[] m_ThreaderNumberOfMovingImageSamples;
-  m_ThreaderNumberOfMovingImageSamples = NULL;
+  m_ThreaderNumberOfMovingImageSamples = ITK_NULLPTR;
 
   delete[] m_ThreaderTransform;
-  m_ThreaderTransform = NULL;
+  m_ThreaderTransform = ITK_NULLPTR;
 
   delete[] this->m_ThreaderBSplineTransformWeights;
-  this->m_ThreaderBSplineTransformWeights = NULL;
+  this->m_ThreaderBSplineTransformWeights = ITK_NULLPTR;
 
   delete[] this->m_ThreaderBSplineTransformIndices;
-  this->m_ThreaderBSplineTransformIndices = NULL;
+  this->m_ThreaderBSplineTransformIndices = ITK_NULLPTR;
 }
 
 /**
@@ -433,7 +433,7 @@ throw ( ExceptionObject )
 
     m_DerivativeCalculator->SetInputImage(this->m_MovingImage);
 
-    m_BSplineInterpolator = NULL;
+    m_BSplineInterpolator = ITK_NULLPTR;
     itkDebugMacro("Interpolator is not BSpline");
     }
   else
@@ -442,7 +442,7 @@ throw ( ExceptionObject )
     m_BSplineInterpolator->SetNumberOfThreads(m_NumberOfThreads);
     m_BSplineInterpolator->UseImageDirectionOn();
 
-    m_DerivativeCalculator = NULL;
+    m_DerivativeCalculator = ITK_NULLPTR;
     itkDebugMacro("Interpolator is BSpline");
     }
 
@@ -463,7 +463,7 @@ throw ( ExceptionObject )
   if ( !testPtr2 )
     {
     m_TransformIsBSpline = false;
-    m_BSplineTransform = NULL;
+    m_BSplineTransform = ITK_NULLPTR;
     itkDebugMacro("Transform is not BSplineDeformable");
     }
   else
@@ -484,10 +484,10 @@ throw ( ExceptionObject )
     this->m_BSplineTransformIndices.SetSize(1);
 
     delete[] this->m_ThreaderBSplineTransformWeights;
-    this->m_ThreaderBSplineTransformWeights = NULL;
+    this->m_ThreaderBSplineTransformWeights = ITK_NULLPTR;
 
     delete[] this->m_ThreaderBSplineTransformIndices;
-    this->m_ThreaderBSplineTransformIndices = NULL;
+    this->m_ThreaderBSplineTransformIndices = ITK_NULLPTR;
 
     if ( this->m_UseCachingOfBSplineWeights )
       {
@@ -893,14 +893,14 @@ ImageToImageMetric< TFixedImage, TMovingImage >
                  MovingImagePointType & mappedPoint,
                  bool & sampleOk,
                  double & movingImageValue,
-                 ThreadIdType threadID) const
+                 ThreadIdType threadId) const
 {
   sampleOk = true;
   TransformType *transform;
 
-  if ( threadID > 0 )
+  if ( threadId > 0 )
     {
-    transform = this->m_ThreaderTransform[threadID - 1];
+    transform = this->m_ThreaderTransform[threadId - 1];
     }
   else
     {
@@ -949,10 +949,10 @@ ImageToImageMetric< TFixedImage, TMovingImage >
       BSplineTransformWeightsType *   weightsHelper;
       BSplineTransformIndexArrayType *indicesHelper;
 
-      if ( threadID > 0 )
+      if ( threadId > 0 )
         {
-        weightsHelper = &( this->m_ThreaderBSplineTransformWeights[threadID - 1] );
-        indicesHelper = &( this->m_ThreaderBSplineTransformIndices[threadID - 1] );
+        weightsHelper = &( this->m_ThreaderBSplineTransformWeights[threadId - 1] );
+        indicesHelper = &( this->m_ThreaderBSplineTransformIndices[threadId - 1] );
         }
       else
         {
@@ -984,7 +984,7 @@ ImageToImageMetric< TFixedImage, TMovingImage >
       sampleOk = sampleOk && m_BSplineInterpolator->IsInsideBuffer(mappedPoint);
       if ( sampleOk )
         {
-        movingImageValue = m_BSplineInterpolator->Evaluate(mappedPoint, threadID);
+        movingImageValue = m_BSplineInterpolator->Evaluate(mappedPoint, threadId);
         }
       }
     else
@@ -1011,15 +1011,15 @@ ImageToImageMetric< TFixedImage, TMovingImage >
                                 bool & sampleOk,
                                 double & movingImageValue,
                                 ImageDerivativesType & movingImageGradient,
-                                ThreadIdType threadID) const
+                                ThreadIdType threadId) const
 {
   TransformType *transform;
 
   sampleOk = true;
 
-  if ( threadID > 0 )
+  if ( threadId > 0 )
     {
-    transform = this->m_ThreaderTransform[threadID - 1];
+    transform = this->m_ThreaderTransform[threadId - 1];
     }
   else
     {
@@ -1068,10 +1068,10 @@ ImageToImageMetric< TFixedImage, TMovingImage >
       BSplineTransformWeightsType *   weightsHelper;
       BSplineTransformIndexArrayType *indicesHelper;
 
-      if ( threadID > 0 )
+      if ( threadId > 0 )
         {
-        weightsHelper = &( this->m_ThreaderBSplineTransformWeights[threadID - 1] );
-        indicesHelper = &( this->m_ThreaderBSplineTransformIndices[threadID - 1] );
+        weightsHelper = &( this->m_ThreaderBSplineTransformWeights[threadId - 1] );
+        indicesHelper = &( this->m_ThreaderBSplineTransformIndices[threadId - 1] );
         }
       else
         {
@@ -1106,7 +1106,7 @@ ImageToImageMetric< TFixedImage, TMovingImage >
         this->m_BSplineInterpolator->EvaluateValueAndDerivative(mappedPoint,
                                                                 movingImageValue,
                                                                 movingImageGradient,
-                                                                threadID);
+                                                                threadId);
         }
       }
     else
@@ -1115,7 +1115,7 @@ ImageToImageMetric< TFixedImage, TMovingImage >
       sampleOk = sampleOk && m_Interpolator->IsInsideBuffer(mappedPoint);
       if ( sampleOk )
         {
-        this->ComputeImageDerivatives(mappedPoint, movingImageGradient, threadID);
+        this->ComputeImageDerivatives(mappedPoint, movingImageGradient, threadId);
         movingImageValue = this->m_Interpolator->Evaluate(mappedPoint);
         }
       }
@@ -1132,13 +1132,13 @@ void
 ImageToImageMetric< TFixedImage, TMovingImage >
 ::ComputeImageDerivatives(const MovingImagePointType & mappedPoint,
                           ImageDerivativesType & gradient,
-                          ThreadIdType threadID) const
+                          ThreadIdType threadId) const
 {
   if ( m_InterpolatorIsBSpline )
     {
     // Computed moving image gradient using derivative BSpline kernel.
     gradient = m_BSplineInterpolator->EvaluateDerivative(mappedPoint,
-                                                         threadID);
+                                                         threadId);
     }
   else
     {
@@ -1182,9 +1182,9 @@ ImageToImageMetric< TFixedImage, TMovingImage >
                                const_cast< void * >( static_cast< const void * >( &m_ThreaderParameter ) ) );
   m_Threader->SingleMethodExecute();
 
-  for ( ThreadIdType threadID = 0; threadID < m_NumberOfThreads - 1; threadID++ )
+  for ( ThreadIdType threadId = 0; threadId < m_NumberOfThreads - 1; threadId++ )
     {
-    this->m_NumberOfPixelsCounted += m_ThreaderNumberOfMovingImageSamples[threadID];
+    this->m_NumberOfPixelsCounted += m_ThreaderNumberOfMovingImageSamples[threadId];
     }
 }
 
@@ -1206,15 +1206,15 @@ ITK_THREAD_RETURN_TYPE
 ImageToImageMetric< TFixedImage, TMovingImage >
 ::GetValueMultiThreadedPreProcess(void *arg)
 {
-  ThreadIdType                threadID;
+  ThreadIdType                threadId;
   MultiThreaderParameterType *mtParam;
 
-  threadID = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
+  threadId = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
 
   mtParam = (MultiThreaderParameterType *)
             ( ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->UserData );
 
-  mtParam->metric->GetValueThreadPreProcess(threadID, false);
+  mtParam->metric->GetValueThreadPreProcess(threadId, false);
 
   return ITK_THREAD_RETURN_VALUE;
 }
@@ -1227,15 +1227,15 @@ ITK_THREAD_RETURN_TYPE
 ImageToImageMetric< TFixedImage, TMovingImage >
 ::GetValueMultiThreaded(void *arg)
 {
-  ThreadIdType                threadID;
+  ThreadIdType                threadId;
   MultiThreaderParameterType *mtParam;
 
-  threadID = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
+  threadId = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
 
   mtParam = (MultiThreaderParameterType *)
             ( ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->UserData );
 
-  mtParam->metric->GetValueThread(threadID);
+  mtParam->metric->GetValueThread(threadId);
 
   return ITK_THREAD_RETURN_VALUE;
 }
@@ -1248,15 +1248,15 @@ ITK_THREAD_RETURN_TYPE
 ImageToImageMetric< TFixedImage, TMovingImage >
 ::GetValueMultiThreadedPostProcess(void *arg)
 {
-  ThreadIdType                threadID;
+  ThreadIdType                threadId;
   MultiThreaderParameterType *mtParam;
 
-  threadID = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
+  threadId = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
 
   mtParam = (MultiThreaderParameterType *)
             ( ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->UserData );
 
-  mtParam->metric->GetValueThreadPostProcess(threadID, false);
+  mtParam->metric->GetValueThreadPostProcess(threadId, false);
 
   return ITK_THREAD_RETURN_VALUE;
 }
@@ -1264,15 +1264,15 @@ ImageToImageMetric< TFixedImage, TMovingImage >
 template< typename TFixedImage, typename TMovingImage  >
 void
 ImageToImageMetric< TFixedImage, TMovingImage >
-::GetValueThread(ThreadIdType threadID) const
+::GetValueThread(ThreadIdType threadId) const
 {
   // Figure out how many samples to process
   int chunkSize = m_NumberOfFixedImageSamples / m_NumberOfThreads;
 
   // Skip to this thread's samples to process
-  unsigned int fixedImageSample = threadID * chunkSize;
+  unsigned int fixedImageSample = threadId * chunkSize;
 
-  if ( threadID == m_NumberOfThreads - 1 )
+  if ( threadId == m_NumberOfThreads - 1 )
     {
     chunkSize = m_NumberOfFixedImageSamples
                 - ( ( m_NumberOfThreads - 1 )
@@ -1282,7 +1282,7 @@ ImageToImageMetric< TFixedImage, TMovingImage >
 
   if ( m_WithinThreadPreProcess )
     {
-    this->GetValueThreadPreProcess(threadID, true);
+    this->GetValueThreadPreProcess(threadId, true);
     }
 
   // Process the samples
@@ -1294,12 +1294,12 @@ ImageToImageMetric< TFixedImage, TMovingImage >
     double               movingImageValue;
     // Get moving image value
     this->TransformPoint(fixedImageSample, mappedPoint, sampleOk, movingImageValue,
-                         threadID);
+                         threadId);
 
     if ( sampleOk )
       {
       // CALL USER FUNCTION
-      if ( GetValueThreadProcessSample(threadID, fixedImageSample,
+      if ( GetValueThreadProcessSample(threadId, fixedImageSample,
                                        mappedPoint, movingImageValue) )
         {
         ++numSamples;
@@ -1307,9 +1307,9 @@ ImageToImageMetric< TFixedImage, TMovingImage >
       }
     }
 
-  if ( threadID > 0 )
+  if ( threadId > 0 )
     {
-    m_ThreaderNumberOfMovingImageSamples[threadID - 1] = numSamples;
+    m_ThreaderNumberOfMovingImageSamples[threadId - 1] = numSamples;
     }
   else
     {
@@ -1318,7 +1318,7 @@ ImageToImageMetric< TFixedImage, TMovingImage >
 
   if ( m_WithinThreadPostProcess )
     {
-    this->GetValueThreadPostProcess(threadID, true);
+    this->GetValueThreadPostProcess(threadId, true);
     }
 }
 
@@ -1345,9 +1345,9 @@ ImageToImageMetric< TFixedImage, TMovingImage >
                                const_cast< void * >( static_cast< const void * >( &m_ThreaderParameter ) ) );
   m_Threader->SingleMethodExecute();
 
-  for ( ThreadIdType threadID = 0; threadID < m_NumberOfThreads - 1; threadID++ )
+  for ( ThreadIdType threadId = 0; threadId < m_NumberOfThreads - 1; threadId++ )
     {
-    this->m_NumberOfPixelsCounted += m_ThreaderNumberOfMovingImageSamples[threadID];
+    this->m_NumberOfPixelsCounted += m_ThreaderNumberOfMovingImageSamples[threadId];
     }
 }
 
@@ -1369,15 +1369,15 @@ ITK_THREAD_RETURN_TYPE
 ImageToImageMetric< TFixedImage, TMovingImage >
 ::GetValueAndDerivativeMultiThreadedPreProcess(void *arg)
 {
-  ThreadIdType                threadID;
+  ThreadIdType                threadId;
   MultiThreaderParameterType *mtParam;
 
-  threadID = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
+  threadId = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
 
   mtParam = (MultiThreaderParameterType *)
             ( ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->UserData );
 
-  mtParam->metric->GetValueAndDerivativeThreadPreProcess(threadID, false);
+  mtParam->metric->GetValueAndDerivativeThreadPreProcess(threadId, false);
 
   return ITK_THREAD_RETURN_VALUE;
 }
@@ -1390,15 +1390,15 @@ ITK_THREAD_RETURN_TYPE
 ImageToImageMetric< TFixedImage, TMovingImage >
 ::GetValueAndDerivativeMultiThreaded(void *arg)
 {
-  ThreadIdType                threadID;
+  ThreadIdType                threadId;
   MultiThreaderParameterType *mtParam;
 
-  threadID = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
+  threadId = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
 
   mtParam = (MultiThreaderParameterType *)
             ( ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->UserData );
 
-  mtParam->metric->GetValueAndDerivativeThread(threadID);
+  mtParam->metric->GetValueAndDerivativeThread(threadId);
 
   return ITK_THREAD_RETURN_VALUE;
 }
@@ -1411,15 +1411,15 @@ ITK_THREAD_RETURN_TYPE
 ImageToImageMetric< TFixedImage, TMovingImage >
 ::GetValueAndDerivativeMultiThreadedPostProcess(void *arg)
 {
-  ThreadIdType                threadID;
+  ThreadIdType                threadId;
   MultiThreaderParameterType *mtParam;
 
-  threadID = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
+  threadId = ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->ThreadID;
 
   mtParam = (MultiThreaderParameterType *)
             ( ( (MultiThreaderType::ThreadInfoStruct *)( arg ) )->UserData );
 
-  mtParam->metric->GetValueAndDerivativeThreadPostProcess(threadID, false);
+  mtParam->metric->GetValueAndDerivativeThreadPostProcess(threadId, false);
 
   return ITK_THREAD_RETURN_VALUE;
 }
@@ -1427,15 +1427,15 @@ ImageToImageMetric< TFixedImage, TMovingImage >
 template< typename TFixedImage, typename TMovingImage  >
 void
 ImageToImageMetric< TFixedImage, TMovingImage >
-::GetValueAndDerivativeThread(ThreadIdType threadID) const
+::GetValueAndDerivativeThread(ThreadIdType threadId) const
 {
   // Figure out how many samples to process
   int chunkSize = m_NumberOfFixedImageSamples / m_NumberOfThreads;
 
   // Skip to this thread's samples to process
-  unsigned int fixedImageSample = threadID * chunkSize;
+  unsigned int fixedImageSample = threadId * chunkSize;
 
-  if ( threadID == m_NumberOfThreads - 1 )
+  if ( threadId == m_NumberOfThreads - 1 )
     {
     chunkSize = m_NumberOfFixedImageSamples
                 - ( ( m_NumberOfThreads - 1 )
@@ -1446,7 +1446,7 @@ ImageToImageMetric< TFixedImage, TMovingImage >
 
   if ( m_WithinThreadPreProcess )
     {
-    this->GetValueAndDerivativeThreadPreProcess(threadID, true);
+    this->GetValueAndDerivativeThreadPreProcess(threadId, true);
     }
 
   // Process the samples
@@ -1459,12 +1459,12 @@ ImageToImageMetric< TFixedImage, TMovingImage >
     // Get moving image value
     TransformPointWithDerivatives(fixedImageSample, mappedPoint, sampleOk,
                                   movingImageValue, movingImageGradientValue,
-                                  threadID);
+                                  threadId);
 
     if ( sampleOk )
       {
       // CALL USER FUNCTION
-      if ( this->GetValueAndDerivativeThreadProcessSample(threadID,
+      if ( this->GetValueAndDerivativeThreadProcessSample(threadId,
                                                           fixedImageSample,
                                                           mappedPoint,
                                                           movingImageValue,
@@ -1475,9 +1475,9 @@ ImageToImageMetric< TFixedImage, TMovingImage >
       }
     }
 
-  if ( threadID > 0 )
+  if ( threadId > 0 )
     {
-    m_ThreaderNumberOfMovingImageSamples[threadID - 1] = numSamples;
+    m_ThreaderNumberOfMovingImageSamples[threadId - 1] = numSamples;
     }
   else
     {
@@ -1486,7 +1486,7 @@ ImageToImageMetric< TFixedImage, TMovingImage >
 
   if ( m_WithinThreadPostProcess )
     {
-    this->GetValueAndDerivativeThreadPostProcess(threadID, true);
+    this->GetValueAndDerivativeThreadPostProcess(threadId, true);
     }
 }
 
@@ -1575,13 +1575,13 @@ void
 ImageToImageMetric< TFixedImage, TMovingImage >
 ::SynchronizeTransforms() const
 {
-  for ( ThreadIdType threadID = 0; threadID < m_NumberOfThreads - 1; threadID++ )
+  for ( ThreadIdType threadId = 0; threadId < m_NumberOfThreads - 1; threadId++ )
     {
     /** Set the fixed parameters first. Some transforms have parameters which depend on
         the values of the fixed parameters. For instance, the BSplineTransform
         checks the grid size (part of the fixed parameters) before setting the parameters. */
-    this->m_ThreaderTransform[threadID]->SetFixedParameters( this->m_Transform->GetFixedParameters() );
-    this->m_ThreaderTransform[threadID]->SetParameters( this->m_Transform->GetParameters() );
+    this->m_ThreaderTransform[threadId]->SetFixedParameters( this->m_Transform->GetFixedParameters() );
+    this->m_ThreaderTransform[threadId]->SetParameters( this->m_Transform->GetParameters() );
     }
 }
 } // end namespace itk
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h b/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h
index 7679812..92fd892 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.h
@@ -168,7 +168,7 @@ protected:
   virtual ~ImageToSpatialObjectMetric() {}
   ImageToSpatialObjectMetric(const Self &) {}
   void operator=(const Self &) {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   MeasureType              m_MatchMeasure;
   DerivativeType           m_MatchMeasureDerivatives;
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx
index 18d83ed..6bbba44 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectMetric.hxx
@@ -25,12 +25,13 @@ namespace itk
 /** Constructor */
 template< typename TFixedImage, typename TMovingSpatialObject >
 ImageToSpatialObjectMetric< TFixedImage, TMovingSpatialObject >
-::ImageToSpatialObjectMetric()
+::ImageToSpatialObjectMetric():
+  m_MatchMeasure(0)
 {
-  m_FixedImage          = 0; // has to be provided by the user.
-  m_MovingSpatialObject = 0; // has to be provided by the user.
-  m_Transform           = 0; // has to be provided by the user.
-  m_Interpolator        = 0; // has to be provided by the user.
+  m_FixedImage          = ITK_NULLPTR; // has to be provided by the user.
+  m_MovingSpatialObject = ITK_NULLPTR; // has to be provided by the user.
+  m_Transform           = ITK_NULLPTR; // has to be provided by the user.
+  m_Interpolator        = ITK_NULLPTR; // has to be provided by the user.
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h b/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h
index 967eba2..82f2778 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.h
@@ -174,11 +174,11 @@ public:
    * output. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
   /** Method to return the latest modified time of this object or
    * any of its cached ivars */
-  ModifiedTimeType GetMTime() const;
+  virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE;
 
 #ifdef ITKV3_COMPATIBILITY
   // StartRegistration is an old API from before
@@ -198,11 +198,11 @@ public:
 protected:
   ImageToSpatialObjectRegistrationMethod();
   virtual ~ImageToSpatialObjectRegistrationMethod() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Method invoked by the pipeline in order to trigger the computation of
    * the registration. */
-  void  GenerateData();
+  virtual void  GenerateData() ITK_OVERRIDE;
 
   /** Initialize by setting the interconnects between the components. */
   void Initialize()
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx
index 09a3e56..5a64df1 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx
@@ -29,12 +29,12 @@ ImageToSpatialObjectRegistrationMethod< TFixedImage, TMovingSpatialObject >
 {
   this->SetNumberOfRequiredOutputs(1);    // for the Transform
 
-  m_FixedImage   = 0;          // has to be provided by the user.
-  m_MovingSpatialObject   = 0; // has to be provided by the user.
-  m_Transform    = 0;          // has to be provided by the user.
-  m_Interpolator = 0;          // has to be provided by the user.
-  m_Metric       = 0;          // has to be provided by the user.
-  m_Optimizer    = 0;          // has to be provided by the user.
+  m_FixedImage   = ITK_NULLPTR;          // has to be provided by the user.
+  m_MovingSpatialObject   = ITK_NULLPTR; // has to be provided by the user.
+  m_Transform    = ITK_NULLPTR;          // has to be provided by the user.
+  m_Interpolator = ITK_NULLPTR;          // has to be provided by the user.
+  m_Metric       = ITK_NULLPTR;          // has to be provided by the user.
+  m_Optimizer    = ITK_NULLPTR;          // has to be provided by the user.
 
   m_InitialTransformParameters = ParametersType(1);
   m_LastTransformParameters = ParametersType(1);
@@ -200,7 +200,7 @@ ImageToSpatialObjectRegistrationMethod< TFixedImage, TMovingSpatialObject >
       break;
     default:
       itkExceptionMacro("MakeOutput request for an output number larger than the expected number of outputs");
-      return 0;
+      return ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx
index 2287f74..3583744 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx
@@ -211,7 +211,10 @@ KappaStatisticImageToImageMetric<TFixedImage, TMovingImage>
   int movingArea = 0;
   int intersection = 0;
 
-  TransformJacobianType jacobian;
+  TransformJacobianType jacobian(TFixedImage::ImageDimension,
+                                 this->m_Transform->GetNumberOfParameters());
+  TransformJacobianType jacobianCache(TFixedImage::ImageDimension,
+                                      TFixedImage::ImageDimension);
 
   ti.GoToBegin();
   while( !ti.IsAtEnd() )
@@ -255,8 +258,10 @@ KappaStatisticImageToImageMetric<TFixedImage, TMovingImage>
         intersection++;
         }
 
-      this->m_Transform->ComputeJacobianWithRespectToParameters(
-        inputPoint, jacobian);
+      this->m_Transform->
+        ComputeJacobianWithRespectToParametersCachedTemporaries(inputPoint,
+                                                                jacobian,
+                                                                jacobianCache);
 
       this->m_NumberOfPixelsCounted++;
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.h b/Utilities/ITK/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.h
index 4709ae0..e9a1314 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.h
@@ -41,7 +41,7 @@ namespace itk
  *  pp. 525 - 532.
  *
  *  The metric is given by KL(P_test||P_train)
- *  = Sum_{i1,i2} P_test(i1,i2) vcl_log(P_test(i1,i2)/P_train(i1,i2))
+ *  = Sum_{i1,i2} P_test(i1,i2) std::log(P_test(i1,i2)/P_train(i1,i2))
  *  where P_test and P_train are probabilities given my normalized
  *  histograms, and i1 and i2 are the intensity bins in the histogram.
  *
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.hxx
index 3553b47..c8fbd4b 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkKullbackLeiblerCompareHistogramImageToImageMetric.hxx
@@ -68,7 +68,7 @@ KullbackLeiblerCompareHistogramImageToImageMetric< TFixedImage, \
     double TrainingFreq = training_it.GetFrequency() + m_Epsilon;
     double MeasuredFreq = measured_it.GetFrequency() + m_Epsilon;
 
-    KullbackLeibler += MeasuredFreq * vcl_log(MeasuredFreq / TrainingFreq);
+    KullbackLeibler += MeasuredFreq * std::log(MeasuredFreq / TrainingFreq);
 
     ++measured_it;
     ++training_it;
@@ -91,7 +91,7 @@ KullbackLeiblerCompareHistogramImageToImageMetric< TFixedImage, \
                                      + this->GetHistogramSize()[0] * this->GetHistogramSize()[1] * m_Epsilon;
 
   KullbackLeibler = KullbackLeibler / static_cast< MeasureType >( AdjustedTotalMeasuredFreq )
-                    - vcl_log(AdjustedTotalMeasuredFreq / AdjustedTotalTrainingFreq);
+                    - std::log(AdjustedTotalMeasuredFreq / AdjustedTotalTrainingFreq);
 
   return KullbackLeibler;
 }
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h b/Utilities/ITK/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h
index 1dd1f23..fda3234 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.h
@@ -91,8 +91,6 @@ namespace itk
  *
  * Notes:
  * 1. This class returns the negative mutual information value.
- * 2. This class in not thread safe due the private data structures
- *     used to the store the sampled points and the marginal and joint pdfs.
  *
  * References:
  * [1] "Nonrigid multimodality image registration"
@@ -227,9 +225,9 @@ public:
    */
   const typename JointPDFType::Pointer GetJointPDF () const
     {
-    if( this->m_MMIMetricPerThreadVariables == NULL )
+    if( this->m_MMIMetricPerThreadVariables == ITK_NULLPTR )
       {
-      return JointPDFType::Pointer(NULL);
+      return JointPDFType::Pointer(ITK_NULLPTR);
       }
     return this->m_MMIMetricPerThreadVariables[0].JointPDF;
     }
@@ -242,9 +240,9 @@ public:
    */
   const typename JointPDFDerivativesType::Pointer GetJointPDFDerivatives () const
     {
-    if( this->m_MMIMetricPerThreadVariables == NULL )
+    if( this->m_MMIMetricPerThreadVariables == ITK_NULLPTR )
       {
-      return JointPDFDerivativesType::Pointer(NULL);
+      return JointPDFDerivativesType::Pointer(ITK_NULLPTR);
       }
     return this->m_MMIMetricPerThreadVariables[0].JointPDFDerivatives;
     }
@@ -279,22 +277,22 @@ private:
   void ComputeFixedImageParzenWindowIndices( FixedImageSampleContainer & samples);
 
   /** Compute PDF derivative contribution for each parameter. */
-  void ComputePDFDerivatives(ThreadIdType threadID, unsigned int sampleNumber, int movingImageParzenWindowIndex,
+  void ComputePDFDerivatives(ThreadIdType threadId, unsigned int sampleNumber, int movingImageParzenWindowIndex,
                                      const ImageDerivativesType
                                      &  movingImageGradientValue,
                                      PDFValueType cubicBSplineDerivativeValue) const;
 
-  virtual void GetValueThreadPreProcess(ThreadIdType threadID, bool withinSampleThread) const;
-  virtual void GetValueThreadPostProcess(ThreadIdType threadID, bool withinSampleThread) const;
+  virtual void GetValueThreadPreProcess(ThreadIdType threadId, bool withinSampleThread) const;
+  virtual void GetValueThreadPostProcess(ThreadIdType threadId, bool withinSampleThread) const;
   //NOTE:  The signature in base class requires that movingImageValue is of type double
-  virtual bool GetValueThreadProcessSample(ThreadIdType threadID, SizeValueType fixedImageSample,
+  virtual bool GetValueThreadProcessSample(ThreadIdType threadId, SizeValueType fixedImageSample,
                                                   const MovingImagePointType & mappedPoint,
                                                   double movingImageValue) const;
 
-  virtual void GetValueAndDerivativeThreadPreProcess( ThreadIdType threadID, bool withinSampleThread) const;
-  virtual void GetValueAndDerivativeThreadPostProcess( ThreadIdType threadID, bool withinSampleThread) const;
+  virtual void GetValueAndDerivativeThreadPreProcess( ThreadIdType threadId, bool withinSampleThread) const;
+  virtual void GetValueAndDerivativeThreadPostProcess( ThreadIdType threadId, bool withinSampleThread) const;
   //NOTE:  The signature in base class requires that movingImageValue is of type double
-  virtual bool GetValueAndDerivativeThreadProcessSample(ThreadIdType threadID, SizeValueType fixedImageSample,
+  virtual bool GetValueAndDerivativeThreadProcessSample(ThreadIdType threadId, SizeValueType fixedImageSample,
                                                                const MovingImagePointType & mappedPoint,
                                                                double movingImageValue, const ImageDerivativesType &
                                                                movingImageGradientValue) const;
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx
index 27a8f7d..d0f157d 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx
@@ -39,20 +39,22 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
   m_NumberOfHistogramBins(50),
   m_MovingImageNormalizedMin(0.0),
   m_FixedImageNormalizedMin(0.0),
+  m_FixedImageTrueMin(0.0),
+  m_FixedImageTrueMax(0.0),
   m_MovingImageTrueMin(0.0),
   m_MovingImageTrueMax(0.0),
   m_FixedImageBinSize(0.0),
   m_MovingImageBinSize(0.0),
 
-  m_CubicBSplineKernel(NULL),
-  m_CubicBSplineDerivativeKernel(NULL),
+  m_CubicBSplineKernel(ITK_NULLPTR),
+  m_CubicBSplineDerivativeKernel(ITK_NULLPTR),
 
   m_PRatioArray(0,0),
 
   // Initialize memory
   m_MovingImageMarginalPDF(0),
 
-  m_MMIMetricPerThreadVariables(NULL),
+  m_MMIMetricPerThreadVariables(ITK_NULLPTR),
 
   m_UseExplicitPDFDerivatives(true),
   m_ImplicitDerivativesSecondPass(false)
@@ -125,46 +127,70 @@ throw ( ExceptionObject )
      * in computing the range of intensity values.
      */
 
-    this->m_FixedImageTrueMin = vcl_numeric_limits<typename TFixedImage::PixelType>::max();
-    this->m_FixedImageTrueMax = vcl_numeric_limits<typename TFixedImage::PixelType>::min();
-    this->m_MovingImageTrueMin = vcl_numeric_limits<typename TMovingImage::PixelType>::max();
-    this->m_MovingImageTrueMax = vcl_numeric_limits<typename TMovingImage::PixelType>::min();
+    this->m_FixedImageTrueMin = std::numeric_limits<typename TFixedImage::PixelType>::max();
+    this->m_FixedImageTrueMax = std::numeric_limits<typename TFixedImage::PixelType>::min();
+    this->m_MovingImageTrueMin = std::numeric_limits<typename TMovingImage::PixelType>::max();
+    this->m_MovingImageTrueMax = std::numeric_limits<typename TMovingImage::PixelType>::min();
 
     // We need to make robust measures only over the requested mask region
     itk::ImageRegionConstIteratorWithIndex<TFixedImage> fi(this->m_FixedImage, this->m_FixedImage->GetBufferedRegion() );
-    while( !fi.IsAtEnd() )
-      {
-      typename TFixedImage::PointType fixedSpacePhysicalPoint;
-      this->m_FixedImage->TransformIndexToPhysicalPoint(fi.GetIndex(), fixedSpacePhysicalPoint);
-      // A null mask implies entire space is to be used.
-      if( this->m_FixedImageMask.IsNull()
-          || this->m_FixedImageMask->IsInside(fixedSpacePhysicalPoint)
-          )
+    const bool fixedMaskIsPresent = !(this->m_FixedImageMask.IsNull());
+      if( fixedMaskIsPresent )
         {
-        const typename TFixedImage::PixelType currValue = fi.Get();
-        this->m_FixedImageTrueMin = (m_FixedImageTrueMin < currValue) ? this->m_FixedImageTrueMin : currValue;
-        this->m_FixedImageTrueMax = (m_FixedImageTrueMax > currValue) ? this->m_FixedImageTrueMax : currValue;
+        typename TFixedImage::PointType fixedSpacePhysicalPoint;
+        while( !fi.IsAtEnd() )
+          {
+          this->m_FixedImage->TransformIndexToPhysicalPoint(fi.GetIndex(), fixedSpacePhysicalPoint);
+          const bool shouldCheckPixelIntensity = this->m_FixedImageMask->IsInside( fixedSpacePhysicalPoint  );
+          if( shouldCheckPixelIntensity )
+            {
+            const PDFValueType & currValue = fi.Get();
+            this->m_FixedImageTrueMin = std::min(m_FixedImageTrueMin, currValue);
+            this->m_FixedImageTrueMax = std::max(m_FixedImageTrueMax, currValue);
+            }
+          ++fi;
+          }
+        }
+      else
+        {
+        while( !fi.IsAtEnd() )
+          {
+          const PDFValueType & currValue = fi.Get();
+          this->m_FixedImageTrueMin = std::min(m_FixedImageTrueMin, currValue);
+          this->m_FixedImageTrueMax = std::max(m_FixedImageTrueMax, currValue);
+          ++fi;
+          }
         }
-      ++fi;
-      }
 
       {
       itk::ImageRegionConstIteratorWithIndex<TMovingImage> mi(this->m_MovingImage,
                                                               this->m_MovingImage->GetBufferedRegion() );
-      while( !mi.IsAtEnd() )
+      const bool movingMaskIsPresent = !(this->m_MovingImageMask.IsNull());
+      if( movingMaskIsPresent )
         {
         typename TMovingImage::PointType movingSpacePhysicalPoint;
-        this->m_MovingImage->TransformIndexToPhysicalPoint(mi.GetIndex(), movingSpacePhysicalPoint);
-        // A null mask implies entire space is to be used.
-        if( this->m_MovingImageMask.IsNull()
-            || this->m_MovingImageMask->IsInside(movingSpacePhysicalPoint)
-            )
+        while( !mi.IsAtEnd() )
+          {
+          this->m_MovingImage->TransformIndexToPhysicalPoint(mi.GetIndex(), movingSpacePhysicalPoint);
+          const bool shouldCheckPixelIntensity = this->m_MovingImageMask->IsInside(movingSpacePhysicalPoint);
+          if( shouldCheckPixelIntensity )
+            {
+            const PDFValueType & currValue = mi.Get();
+            this->m_MovingImageTrueMin = std::min(m_MovingImageTrueMin, currValue);
+            this->m_MovingImageTrueMax = std::max(m_MovingImageTrueMax, currValue);
+            }
+          ++mi;
+          }
+        }
+      else
+        {
+        while( !mi.IsAtEnd() )
           {
-          const typename TMovingImage::PixelType currValue = mi.Get();
-          this->m_MovingImageTrueMin = (m_MovingImageTrueMin < currValue) ? this->m_MovingImageTrueMin : currValue;
-          this->m_MovingImageTrueMax = (m_MovingImageTrueMax > currValue) ? this->m_MovingImageTrueMax : currValue;
+          const PDFValueType & currValue = mi.Get();
+          this->m_MovingImageTrueMin = std::min(m_MovingImageTrueMin, currValue);
+          this->m_MovingImageTrueMax = std::max(m_MovingImageTrueMax, currValue);
+          ++mi;
           }
-        ++mi;
         }
       }
 
@@ -218,10 +244,10 @@ throw ( ExceptionObject )
 
     {
     const int binRange = this->m_NumberOfHistogramBins / this->m_NumberOfThreads;
-    for( ThreadIdType threadID = 0; threadID < this->m_NumberOfThreads; threadID++ )
+    for( ThreadIdType threadId = 0; threadId < this->m_NumberOfThreads; threadId++ )
       {
-      this->m_MMIMetricPerThreadVariables[threadID].JointPDFStartBin = threadID * binRange;
-      this->m_MMIMetricPerThreadVariables[threadID].JointPDFEndBin = ( threadID + 1 ) * binRange - 1;
+      this->m_MMIMetricPerThreadVariables[threadId].JointPDFStartBin = threadId * binRange;
+      this->m_MMIMetricPerThreadVariables[threadId].JointPDFEndBin = ( threadId + 1 ) * binRange - 1;
 
       }
     // Ensure that the last EndBin range contains the last histogram bin
@@ -259,13 +285,13 @@ throw ( ExceptionObject )
      * Allocate memory for the joint PDF and joint PDF derivatives.
      * The joint PDF and joint PDF derivatives are store as itk::Image.
      */
-    for( ThreadIdType threadID = 0; threadID < this->m_NumberOfThreads; ++threadID )
+    for( ThreadIdType threadId = 0; threadId < this->m_NumberOfThreads; ++threadId )
       {
-      this->m_MMIMetricPerThreadVariables[threadID].JointPDF = JointPDFType::New();
-      this->m_MMIMetricPerThreadVariables[threadID].JointPDF->SetRegions(jointPDFRegion);
-      this->m_MMIMetricPerThreadVariables[threadID].JointPDF->SetOrigin(origin);
-      this->m_MMIMetricPerThreadVariables[threadID].JointPDF->SetSpacing(spacing);
-      this->m_MMIMetricPerThreadVariables[threadID].JointPDF->Allocate();
+      this->m_MMIMetricPerThreadVariables[threadId].JointPDF = JointPDFType::New();
+      this->m_MMIMetricPerThreadVariables[threadId].JointPDF->SetRegions(jointPDFRegion);
+      this->m_MMIMetricPerThreadVariables[threadId].JointPDF->SetOrigin(origin);
+      this->m_MMIMetricPerThreadVariables[threadId].JointPDF->SetSpacing(spacing);
+      this->m_MMIMetricPerThreadVariables[threadId].JointPDF->Allocate();
       }
     }
 
@@ -301,11 +327,11 @@ throw ( ExceptionObject )
         }
 
       // Set the regions and allocate
-      for( ThreadIdType threadID = 0; threadID < this->m_NumberOfThreads; threadID++ )
+      for( ThreadIdType threadId = 0; threadId < this->m_NumberOfThreads; threadId++ )
         {
-        this->m_MMIMetricPerThreadVariables[threadID].JointPDFDerivatives = JointPDFDerivativesType::New();
-        this->m_MMIMetricPerThreadVariables[threadID].JointPDFDerivatives->SetRegions( jointPDFDerivativesRegion);
-        this->m_MMIMetricPerThreadVariables[threadID].JointPDFDerivatives->Allocate();
+        this->m_MMIMetricPerThreadVariables[threadId].JointPDFDerivatives = JointPDFDerivativesType::New();
+        this->m_MMIMetricPerThreadVariables[threadId].JointPDFDerivatives->SetRegions( jointPDFDerivativesRegion);
+        this->m_MMIMetricPerThreadVariables[threadId].JointPDFDerivatives->Allocate();
         }
       }
     }
@@ -313,10 +339,10 @@ throw ( ExceptionObject )
     {
     // Deallocate the memory that may have been allocated for
     // previous runs of the metric.
-    for( ThreadIdType threadID = 0; threadID < this->m_NumberOfThreads; ++threadID )
+    for( ThreadIdType threadId = 0; threadId < this->m_NumberOfThreads; ++threadId )
       {
       // Not needed if this->m_UseExplicitPDFDerivatives=false
-      this->m_MMIMetricPerThreadVariables[threadID].JointPDFDerivatives = NULL;
+      this->m_MMIMetricPerThreadVariables[threadId].JointPDFDerivatives = ITK_NULLPTR;
       }
 
     /** Allocate memory for helper array that will contain the pRatios
@@ -326,10 +352,10 @@ throw ( ExceptionObject )
     this->m_PRatioArray.SetSize(this->m_NumberOfHistogramBins, this->m_NumberOfHistogramBins);
     this->m_PRatioArray.Fill(0.0);
 
-    for( ThreadIdType threadID = 0; threadID < this->m_NumberOfThreads; threadID++ )
+    for( ThreadIdType threadId = 0; threadId < this->m_NumberOfThreads; threadId++ )
       {
-      this->m_MMIMetricPerThreadVariables[threadID].MetricDerivative.SetSize( this->GetNumberOfParameters() );
-      this->m_MMIMetricPerThreadVariables[threadID].MetricDerivative.Fill(NumericTraits<MeasureType>::Zero);
+      this->m_MMIMetricPerThreadVariables[threadId].MetricDerivative.SetSize( this->GetNumberOfParameters() );
+      this->m_MMIMetricPerThreadVariables[threadId].MetricDerivative.Fill(NumericTraits<MeasureType>::Zero);
       }
     }
   /**
@@ -388,21 +414,21 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 template <typename TFixedImage, typename TMovingImage>
 inline void
 MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
-::GetValueThreadPreProcess(ThreadIdType threadID,
+::GetValueThreadPreProcess(ThreadIdType threadId,
                            bool withinSampleThread) const
 {
-  this->Superclass::GetValueThreadPreProcess(threadID, withinSampleThread);
+  this->Superclass::GetValueThreadPreProcess(threadId, withinSampleThread);
 
-  this->m_MMIMetricPerThreadVariables[threadID].JointPDF->FillBuffer(0.0F);
+  this->m_MMIMetricPerThreadVariables[threadId].JointPDF->FillBuffer(0.0F);
 
-  this->m_MMIMetricPerThreadVariables[threadID].FixedImageMarginalPDF = std::vector<PDFValueType>(
+  this->m_MMIMetricPerThreadVariables[threadId].FixedImageMarginalPDF = std::vector<PDFValueType>(
       m_NumberOfHistogramBins, 0.0F);
 }
 
 template <typename TFixedImage, typename TMovingImage>
 inline bool
 MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
-::GetValueThreadProcessSample(ThreadIdType threadID,
+::GetValueThreadProcessSample(ThreadIdType threadId,
                               SizeValueType fixedImageSample,
                               const MovingImagePointType & itkNotUsed(mappedPoint),
                               double movingImageValue) const
@@ -445,11 +471,11 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 
   const unsigned int fixedImageParzenWindowIndex = this->m_FixedImageSamples[fixedImageSample].valueIndex;
 
-  this->m_MMIMetricPerThreadVariables[threadID].FixedImageMarginalPDF[fixedImageParzenWindowIndex] += 1;
+  this->m_MMIMetricPerThreadVariables[threadId].FixedImageMarginalPDF[fixedImageParzenWindowIndex] += 1;
 
   // Pointer to affected bin to be updated
-  JointPDFValueType *pdfPtr = this->m_MMIMetricPerThreadVariables[threadID].JointPDF->GetBufferPointer()
-    + ( fixedImageParzenWindowIndex * this->m_MMIMetricPerThreadVariables[threadID].JointPDF->GetOffsetTable()[1] );
+  JointPDFValueType *pdfPtr = this->m_MMIMetricPerThreadVariables[threadId].JointPDF->GetBufferPointer()
+    + ( fixedImageParzenWindowIndex * this->m_MMIMetricPerThreadVariables[threadId].JointPDF->GetOffsetTable()[1] );
 
   // Move the pointer to the first affected bin
   int pdfMovingIndex = static_cast<int>( movingImageParzenWindowIndex ) - 1;
@@ -471,15 +497,15 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 template <typename TFixedImage, typename TMovingImage>
 inline void
 MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
-::GetValueThreadPostProcess( ThreadIdType threadID,
+::GetValueThreadPostProcess( ThreadIdType threadId,
                              bool itkNotUsed(withinSampleThread) ) const
 {
   const int maxI = this->m_NumberOfHistogramBins
-    * ( this->m_MMIMetricPerThreadVariables[threadID].JointPDFEndBin-
-        this->m_MMIMetricPerThreadVariables[threadID].JointPDFStartBin + 1 );
+    * ( this->m_MMIMetricPerThreadVariables[threadId].JointPDFEndBin-
+        this->m_MMIMetricPerThreadVariables[threadId].JointPDFStartBin + 1 );
 
   const unsigned int tPdfPtrOffset =
-    ( this->m_MMIMetricPerThreadVariables[threadID].JointPDFStartBin *
+    ( this->m_MMIMetricPerThreadVariables[threadId].JointPDFStartBin *
      this->m_MMIMetricPerThreadVariables[0].JointPDF->GetOffsetTable()[1] );
   JointPDFValueType * const pdfPtrStart = this->m_MMIMetricPerThreadVariables[0].JointPDF->GetBufferPointer() +
     tPdfPtrOffset;
@@ -499,8 +525,8 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
       }
     }
 
-  for( int i = this->m_MMIMetricPerThreadVariables[threadID].JointPDFStartBin;
-       i <= this->m_MMIMetricPerThreadVariables[threadID].JointPDFEndBin; i++ )
+  for( int i = this->m_MMIMetricPerThreadVariables[threadId].JointPDFStartBin;
+       i <= this->m_MMIMetricPerThreadVariables[threadId].JointPDFEndBin; i++ )
     {
     PDFValueType PDFacc = this->m_MMIMetricPerThreadVariables[0].FixedImageMarginalPDF[i];
     for( unsigned int t = 1; t < this->m_NumberOfThreads; t++ )
@@ -513,11 +539,11 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
   // Sum of this threads domain into the
   // this->m_MMIMetricPerThreadVariables[].JointPDFSum
   // that covers that part of the domain.
-  this->m_MMIMetricPerThreadVariables[threadID].JointPDFSum = 0.0;
+  this->m_MMIMetricPerThreadVariables[threadId].JointPDFSum = 0.0;
   JointPDFValueType const * pdfPtr = pdfPtrStart;
   for( int i = 0; i < maxI; i++ )
     {
-    this->m_MMIMetricPerThreadVariables[threadID].JointPDFSum += *( pdfPtr++ );
+    this->m_MMIMetricPerThreadVariables[threadId].JointPDFSum += *( pdfPtr++ );
     }
 
 }
@@ -537,9 +563,9 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
   // MUST BE CALLED TO INITIATE PROCESSING
   this->GetValueMultiThreadedPostProcessInitiate();
   // Consolidate to the first element in the vector
-  for( ThreadIdType threadID = 1; threadID < this->m_NumberOfThreads; threadID++ )
+  for( ThreadIdType threadId = 1; threadId < this->m_NumberOfThreads; threadId++ )
     {
-    this->m_MMIMetricPerThreadVariables[0].JointPDFSum += this->m_MMIMetricPerThreadVariables[threadID].JointPDFSum;
+    this->m_MMIMetricPerThreadVariables[0].JointPDFSum += this->m_MMIMetricPerThreadVariables[threadId].JointPDFSum;
     }
   if( this->m_MMIMetricPerThreadVariables[0].JointPDFSum < itk::NumericTraits< PDFValueType >::epsilon() )
     {
@@ -612,13 +638,13 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
       const PDFValueType jointPDFValue = *( jointPDFPtr );
 
       // check for non-zero bin contribution
-      const PDFValueType closeToZero = vcl_numeric_limits<PDFValueType>::epsilon();
+      const PDFValueType closeToZero = std::numeric_limits<PDFValueType>::epsilon();
       if( jointPDFValue > closeToZero &&  movingImagePDFValue > closeToZero )
         {
-        const PDFValueType pRatio = vcl_log(jointPDFValue / movingImagePDFValue);
+        const PDFValueType pRatio = std::log(jointPDFValue / movingImagePDFValue);
         if( fixedImagePDFValue > closeToZero )
           {
-          sum += jointPDFValue * ( pRatio - vcl_log(fixedImagePDFValue) );
+          sum += jointPDFValue * ( pRatio - std::log(fixedImagePDFValue) );
           }
         } // end if-block to check non-zero bin contribution
       }   // end for-loop over moving index
@@ -630,22 +656,22 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 template <typename TFixedImage, typename TMovingImage>
 inline void
 MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
-::GetValueAndDerivativeThreadPreProcess( ThreadIdType threadID,
+::GetValueAndDerivativeThreadPreProcess( ThreadIdType threadId,
                                          bool itkNotUsed(withinSampleThread) ) const
 {
-  this->m_MMIMetricPerThreadVariables[threadID].FixedImageMarginalPDF = std::vector<PDFValueType>(
+  this->m_MMIMetricPerThreadVariables[threadId].FixedImageMarginalPDF = std::vector<PDFValueType>(
       m_NumberOfHistogramBins, 0.0F);
-  this->m_MMIMetricPerThreadVariables[threadID].JointPDF->FillBuffer(0.0F);
+  this->m_MMIMetricPerThreadVariables[threadId].JointPDF->FillBuffer(0.0F);
   if( this->m_UseExplicitPDFDerivatives )
     {
-    this->m_MMIMetricPerThreadVariables[threadID].JointPDFDerivatives->FillBuffer(0.0F);
+    this->m_MMIMetricPerThreadVariables[threadId].JointPDFDerivatives->FillBuffer(0.0F);
     }
 }
 
 template <typename TFixedImage, typename TMovingImage>
 inline bool
 MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
-::GetValueAndDerivativeThreadProcessSample(ThreadIdType threadID,
+::GetValueAndDerivativeThreadProcessSample(ThreadIdType threadId,
                                            SizeValueType fixedImageSample,
                                            const MovingImagePointType & itkNotUsed(mappedPoint),
                                            double movingImageValue,
@@ -694,7 +720,7 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
   // Since a zero-order BSpline (box car) kernel is used for
   // the fixed image marginal pdf, we need only increment the
   // fixedImageParzenWindowIndex by value of 1.0.
-  this->m_MMIMetricPerThreadVariables[threadID].FixedImageMarginalPDF[fixedImageParzenWindowIndex] += 1;
+  this->m_MMIMetricPerThreadVariables[threadId].FixedImageMarginalPDF[fixedImageParzenWindowIndex] += 1;
 
   /**
     * The region of support of the parzen window determines which bins
@@ -712,7 +738,7 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
     static_cast<PDFValueType>( movingImageParzenWindowTerm );
 
   // Pointer to affected bin to be updated
-  JointPDFValueType *pdfPtr = this->m_MMIMetricPerThreadVariables[threadID].JointPDF->GetBufferPointer()
+  JointPDFValueType *pdfPtr = this->m_MMIMetricPerThreadVariables[threadId].JointPDF->GetBufferPointer()
     + ( fixedImageParzenWindowIndex * this->m_NumberOfHistogramBins )
     + pdfMovingIndex;
 
@@ -727,7 +753,7 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
           movingImageParzenWindowArg);
 
       // Compute PDF derivative contribution.
-      this->ComputePDFDerivatives(threadID,
+      this->ComputePDFDerivatives(threadId,
                                   fixedImageSample,
                                   pdfMovingIndex,
                                   movingImageGradientValue,
@@ -744,23 +770,23 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 template <typename TFixedImage, typename TMovingImage>
 inline void
 MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
-::GetValueAndDerivativeThreadPostProcess(ThreadIdType threadID,
+::GetValueAndDerivativeThreadPostProcess(ThreadIdType threadId,
                                          bool withinSampleThread) const
 {
-  this->GetValueThreadPostProcess(threadID, withinSampleThread);
+  this->GetValueThreadPostProcess(threadId, withinSampleThread);
 
   if( this->m_UseExplicitPDFDerivatives )
     {
     const unsigned int rowSize = this->m_NumberOfParameters * this->m_NumberOfHistogramBins;
 
     const unsigned int maxI =
-      rowSize * ( this->m_MMIMetricPerThreadVariables[threadID].JointPDFEndBin
-                  - this->m_MMIMetricPerThreadVariables[threadID].JointPDFStartBin + 1 );
+      rowSize * ( this->m_MMIMetricPerThreadVariables[threadId].JointPDFEndBin
+                  - this->m_MMIMetricPerThreadVariables[threadId].JointPDFStartBin + 1 );
 
     JointPDFDerivativesValueType *const pdfDPtrStart =
       this->m_MMIMetricPerThreadVariables[0].JointPDFDerivatives->GetBufferPointer()
-      + ( this->m_MMIMetricPerThreadVariables[threadID].JointPDFStartBin * rowSize );
-    const unsigned int tPdfDPtrOffset = this->m_MMIMetricPerThreadVariables[threadID].JointPDFStartBin *  rowSize;
+      + ( this->m_MMIMetricPerThreadVariables[threadId].JointPDFStartBin * rowSize );
+    const unsigned int tPdfDPtrOffset = this->m_MMIMetricPerThreadVariables[threadId].JointPDFStartBin *  rowSize;
     for( unsigned int t = 1; t < this->m_NumberOfThreads; t++ )
       {
       JointPDFDerivativesValueType *      pdfDPtr = pdfDPtrStart;
@@ -813,9 +839,9 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
   else
     {
     this->m_PRatioArray.Fill(0.0);
-    for( ThreadIdType threadID = 0; threadID < this->m_NumberOfThreads; threadID++ )
+    for( ThreadIdType threadId = 0; threadId < this->m_NumberOfThreads; threadId++ )
       {
-      this->m_MMIMetricPerThreadVariables[threadID].MetricDerivative.Fill(NumericTraits<MeasureType>::Zero);
+      this->m_MMIMetricPerThreadVariables[threadId].MetricDerivative.Fill(NumericTraits<MeasureType>::Zero);
       }
     this->m_ImplicitDerivativesSecondPass = false;
     }
@@ -828,9 +854,9 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 
   // CALL IF DOING THREADED POST PROCESSING
   this->GetValueAndDerivativeMultiThreadedPostProcessInitiate();
-  for( ThreadIdType threadID = 1; threadID < this->m_NumberOfThreads; threadID++ )
+  for( ThreadIdType threadId = 1; threadId < this->m_NumberOfThreads; threadId++ )
     {
-    this->m_MMIMetricPerThreadVariables[0].JointPDFSum += this->m_MMIMetricPerThreadVariables[threadID].JointPDFSum;
+    this->m_MMIMetricPerThreadVariables[0].JointPDFSum += this->m_MMIMetricPerThreadVariables[threadId].JointPDFSum;
     }
   if( this->m_MMIMetricPerThreadVariables[0].JointPDFSum < itk::NumericTraits< PDFValueType >::epsilon() )
     {
@@ -900,14 +926,14 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
       const PDFValueType jointPDFValue = *( jointPDFPtr );
 
       // check for non-zero bin contribution
-      const PDFValueType closeToZero = vcl_numeric_limits<PDFValueType>::epsilon();
+      const PDFValueType closeToZero = std::numeric_limits<PDFValueType>::epsilon();
       if( jointPDFValue > closeToZero &&  movingImagePDFValue > closeToZero )
         {
-        const PDFValueType pRatio = vcl_log(jointPDFValue / movingImagePDFValue);
+        const PDFValueType pRatio = std::log(jointPDFValue / movingImagePDFValue);
 
         if( fixedImagePDFValue > closeToZero )
           {
-          sum += jointPDFValue * ( pRatio - vcl_log(fixedImagePDFValue) );
+          sum += jointPDFValue * ( pRatio - std::log(fixedImagePDFValue) );
           }
 
         if( this->m_UseExplicitPDFDerivatives )
@@ -981,7 +1007,7 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 template <typename TFixedImage, typename TMovingImage>
 void
 MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
-::ComputePDFDerivatives(ThreadIdType threadID,
+::ComputePDFDerivatives(ThreadIdType threadId,
                         unsigned int sampleNumber,
                         int pdfMovingIndex,
                         const ImageDerivativesType & movingImageGradientValue,
@@ -994,13 +1020,13 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 
   const int pdfFixedIndex = this->m_FixedImageSamples[sampleNumber].valueIndex;
 
-  JointPDFDerivativesValueType *derivPtr=0;
+  JointPDFDerivativesValueType *derivPtr=ITK_NULLPTR;
 
   if( this->m_UseExplicitPDFDerivatives )
     {
-    derivPtr = this->m_MMIMetricPerThreadVariables[threadID].JointPDFDerivatives->GetBufferPointer()
-      + ( pdfFixedIndex  * this->m_MMIMetricPerThreadVariables[threadID].JointPDFDerivatives->GetOffsetTable()[2] )
-      + ( pdfMovingIndex * this->m_MMIMetricPerThreadVariables[threadID].JointPDFDerivatives->GetOffsetTable()[1] );
+    derivPtr = this->m_MMIMetricPerThreadVariables[threadId].JointPDFDerivatives->GetBufferPointer()
+      + ( pdfFixedIndex  * this->m_MMIMetricPerThreadVariables[threadId].JointPDFDerivatives->GetOffsetTable()[2] )
+      + ( pdfMovingIndex * this->m_MMIMetricPerThreadVariables[threadId].JointPDFDerivatives->GetOffsetTable()[1] );
     }
   else
     {
@@ -1021,9 +1047,9 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
     // For instance, Register and UnRegister have mutex locks around
     // the reference counts.
     TransformType *transform;
-    if( threadID > 0 )
+    if( threadId > 0 )
       {
-      transform = this->m_ThreaderTransform[threadID - 1];
+      transform = this->m_ThreaderTransform[threadId - 1];
       }
     else
       {
@@ -1032,7 +1058,7 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 
     // Compute the transform Jacobian.
     // Should pre-compute
-    typename TransformType::JacobianType &jacobian = this->m_MMIMetricPerThreadVariables[threadID].Jacobian;
+    typename TransformType::JacobianType &jacobian = this->m_MMIMetricPerThreadVariables[threadId].Jacobian;
     transform->ComputeJacobianWithRespectToParameters( this->m_FixedImageSamples[sampleNumber].point, jacobian);
     for( unsigned int mu = 0; mu < this->m_NumberOfParameters; mu++ )
       {
@@ -1051,18 +1077,18 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
         }
       else
         {
-        this->m_MMIMetricPerThreadVariables[threadID].MetricDerivative[mu] += precomputedWeight *
+        this->m_MMIMetricPerThreadVariables[threadId].MetricDerivative[mu] += precomputedWeight *
           derivativeContribution;
         }
       }
     }
   else
     {
-    const WeightsValueType *weights = NULL;
-    const IndexValueType *  indices = NULL;
+    const WeightsValueType *weights = ITK_NULLPTR;
+    const IndexValueType *  indices = ITK_NULLPTR;
 
-    BSplineTransformWeightsType *   weightsHelper = NULL;
-    BSplineTransformIndexArrayType *indicesHelper = NULL;
+    BSplineTransformWeightsType *   weightsHelper = ITK_NULLPTR;
+    BSplineTransformIndexArrayType *indicesHelper = ITK_NULLPTR;
 
     if( this->m_UseCachingOfBSplineWeights )
       {
@@ -1077,10 +1103,10 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
       }
     else
       {
-      if( threadID > 0 )
+      if( threadId > 0 )
         {
-        weightsHelper = &( this->m_ThreaderBSplineTransformWeights[threadID - 1] );
-        indicesHelper = &( this->m_ThreaderBSplineTransformIndices[threadID - 1] );
+        weightsHelper = &( this->m_ThreaderBSplineTransformWeights[threadId - 1] );
+        indicesHelper = &( this->m_ThreaderBSplineTransformIndices[threadId - 1] );
         }
       else
         {
@@ -1122,7 +1148,7 @@ MattesMutualInformationImageToImageMetric<TFixedImage, TMovingImage>
           }
         else
           {
-          this->m_MMIMetricPerThreadVariables[threadID].MetricDerivative[parameterIndex] += precomputedWeight *
+          this->m_MMIMetricPerThreadVariables[threadId].MetricDerivative[parameterIndex] += precomputedWeight *
             derivativeContribution;
           }
         } // end mu for loop
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx
index 2c77e24..cb8a3f9 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMeanReciprocalSquareDifferencePointSetToImageMetric.hxx
@@ -57,12 +57,10 @@ MeanReciprocalSquareDifferencePointSetToImageMetric<TFixedPointSet, TMovingImage
   MeasureType measure = NumericTraits<MeasureType>::Zero;
 
   this->m_NumberOfPixelsCounted = 0;
-  double lambdaSquared = vcl_pow(this->m_Lambda, 2);
+  double lambdaSquared = std::pow(this->m_Lambda, 2);
 
   this->SetTransformParameters(parameters);
 
-  typedef  typename NumericTraits<MeasureType>::AccumulateType AccumulateType;
-
   while( pointItr != pointEnd && pointDataItr != pointDataEnd )
     {
     InputPointType inputPoint;
@@ -119,12 +117,10 @@ MeanReciprocalSquareDifferencePointSetToImageMetric<TFixedPointSet, TMovingImage
 
   this->m_NumberOfPixelsCounted = 0;
 
-  double lambdaSquared = vcl_pow(this->m_Lambda, 2);
+  double lambdaSquared = std::pow(this->m_Lambda, 2);
 
   this->SetTransformParameters(parameters);
 
-  typedef  typename NumericTraits<MeasureType>::AccumulateType AccumulateType;
-
   const unsigned int ParametersDimension = this->GetNumberOfParameters();
   derivative = DerivativeType(ParametersDimension);
   derivative.Fill(NumericTraits<typename DerivativeType::ValueType>::Zero);
@@ -135,7 +131,8 @@ MeanReciprocalSquareDifferencePointSetToImageMetric<TFixedPointSet, TMovingImage
   PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin();
   PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End();
 
-  TransformJacobianType jacobian;
+  TransformJacobianType jacobian(TMovingImage::ImageDimension,this->m_Transform->GetNumberOfParameters());
+  TransformJacobianType jacobianCache(TMovingImage::ImageDimension, TMovingImage::ImageDimension);
 
   while( pointItr != pointEnd && pointDataItr != pointDataEnd )
     {
@@ -154,7 +151,9 @@ MeanReciprocalSquareDifferencePointSetToImageMetric<TFixedPointSet, TMovingImage
       const RealType diffSquared = diff * diff;
 
       // Now compute the derivatives
-      this->m_Transform->ComputeJacobianWithRespectToParameters(inputPoint, jacobian);
+      this->m_Transform->ComputeJacobianWithRespectToParametersCachedTemporaries(inputPoint,
+                                                                                 jacobian,
+                                                                                 jacobianCache);
 
       // Get the gradient by NearestNeighboorInterpolation:
       // which is equivalent to round up the point components.
@@ -178,7 +177,7 @@ MeanReciprocalSquareDifferencePointSetToImageMetric<TFixedPointSet, TMovingImage
           // Will it be computationally more efficient to instead calculate the
           // derivative using finite differences ?
           sum -= jacobian(dim, par)
-            * gradient[dim] / ( vcl_pow(lambdaSquared + diffSquared, 2) );
+            * gradient[dim] / ( std::pow(lambdaSquared + diffSquared, 2) );
           }
         derivative[par] += diff * sum;
         }
@@ -226,9 +225,7 @@ MeanReciprocalSquareDifferencePointSetToImageMetric<TFixedPointSet, TMovingImage
   MeasureType measure = NumericTraits<MeasureType>::Zero;
 
   this->SetTransformParameters(parameters);
-  double lambdaSquared = vcl_pow(this->m_Lambda, 2);
-
-  typedef  typename NumericTraits<MeasureType>::AccumulateType AccumulateType;
+  double lambdaSquared = std::pow(this->m_Lambda, 2);
 
   const unsigned int ParametersDimension = this->GetNumberOfParameters();
   derivative = DerivativeType(ParametersDimension);
@@ -240,6 +237,10 @@ MeanReciprocalSquareDifferencePointSetToImageMetric<TFixedPointSet, TMovingImage
   PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin();
   PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End();
 
+  TransformJacobianType jacobian(TMovingImage::ImageDimension,
+                                 this->m_Transform->GetNumberOfParameters());
+  TransformJacobianType jacobianCache(TMovingImage::ImageDimension,
+                                      TMovingImage::ImageDimension);
   while( pointItr != pointEnd && pointDataItr != pointDataEnd )
     {
     InputPointType inputPoint;
@@ -255,8 +256,9 @@ MeanReciprocalSquareDifferencePointSetToImageMetric<TFixedPointSet, TMovingImage
       this->m_NumberOfPixelsCounted++;
 
       // Now compute the derivatives
-      TransformJacobianType jacobian;
-      this->m_Transform->ComputeJacobianWithRespectToParameters(inputPoint, jacobian);
+      this->m_Transform->ComputeJacobianWithRespectToParametersCachedTemporaries(inputPoint,
+                                                                                 jacobian,
+                                                                                 jacobianCache);
 
       const RealType diff = movingValue - fixedValue;
       const RealType diffSquared = diff * diff;
@@ -282,7 +284,7 @@ MeanReciprocalSquareDifferencePointSetToImageMetric<TFixedPointSet, TMovingImage
         for( unsigned int dim = 0; dim < Self::FixedPointSetDimension; dim++ )
           {
           sum -= jacobian(dim, par) * gradient[dim]
-            * vcl_pow(lambdaSquared + diffSquared, 2);
+            * std::pow(lambdaSquared + diffSquared, 2);
           }
         derivative[par] += diff * sum;
         }
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx
index 9c8f1e6..b684c82 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquareRegistrationFunction.hxx
@@ -44,8 +44,8 @@ MeanSquareRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
   m_TimeStep = 1.0;
   m_DenominatorThreshold = 1e-9;
   m_IntensityDifferenceThreshold = 0.001;
-  this->SetMovingImage(NULL);
-  this->SetFixedImage(NULL);
+  this->SetMovingImage(ITK_NULLPTR);
+  this->SetFixedImage(ITK_NULLPTR);
   m_FixedImageGradientCalculator = GradientCalculatorType::New();
 
   typename DefaultInterpolatorType::Pointer interp =
@@ -146,7 +146,7 @@ MeanSquareRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
   if ( normalizemetric )
     {
     denominator = speedValue * speedValue * fixedGradientSquaredMagnitude;
-    denominator = vcl_sqrt(denominator);
+    denominator = std::sqrt(denominator);
     }
   if ( denominator == 0 )
     {
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h b/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h
index 9f4a63e..b62bacb 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.h
@@ -114,12 +114,12 @@ private:
   //purposely not implemented
   void operator=(const Self &);
 
-  inline bool GetValueThreadProcessSample(ThreadIdType threadID,
+  inline bool GetValueThreadProcessSample(ThreadIdType threadId,
                                           SizeValueType fixedImageSample,
                                           const MovingImagePointType & mappedPoint,
                                           double movingImageValue) const;
 
-  inline bool GetValueAndDerivativeThreadProcessSample(ThreadIdType threadID,
+  inline bool GetValueAndDerivativeThreadProcessSample(ThreadIdType threadId,
                                                        SizeValueType fixedImageSample,
                                                        const MovingImagePointType & mappedPoint,
                                                        double movingImageValue,
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx
index da6e749..843e478 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx
@@ -36,7 +36,7 @@ MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>
 {
   this->SetComputeGradient(true);
 
-  m_PerThread = NULL;
+  m_PerThread = ITK_NULLPTR;
   this->m_WithinThreadPreProcess = false;
   this->m_WithinThreadPostProcess = false;
 
@@ -51,7 +51,7 @@ MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>
 ::~MeanSquaresImageToImageMetric()
 {
   delete[] m_PerThread;
-  m_PerThread = NULL;
+  m_PerThread = ITK_NULLPTR;
 }
 
 /**
@@ -81,23 +81,23 @@ throw ( ExceptionObject )
 
   m_PerThread = new AlignedPerThreadType[this->m_NumberOfThreads];
 
-  for( ThreadIdType threadID = 0; threadID < this->m_NumberOfThreads; threadID++ )
+  for( ThreadIdType threadId = 0; threadId < this->m_NumberOfThreads; threadId++ )
     {
-    m_PerThread[threadID].m_MSEDerivative.SetSize(this->m_NumberOfParameters);
+    m_PerThread[threadId].m_MSEDerivative.SetSize(this->m_NumberOfParameters);
     }
 }
 
 template <typename TFixedImage, typename TMovingImage>
 inline bool
 MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>
-::GetValueThreadProcessSample(ThreadIdType threadID,
+::GetValueThreadProcessSample(ThreadIdType threadId,
                               SizeValueType fixedImageSample,
                               const MovingImagePointType & itkNotUsed(mappedPoint),
                               double movingImageValue) const
 {
   double diff = movingImageValue - this->m_FixedImageSamples[fixedImageSample].value;
 
-  m_PerThread[threadID].m_MSE += diff * diff;
+  m_PerThread[threadId].m_MSE += diff * diff;
 
   return true;
 }
@@ -153,7 +153,7 @@ MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>
 template <typename TFixedImage, typename TMovingImage>
 inline bool
 MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>
-::GetValueAndDerivativeThreadProcessSample(ThreadIdType threadID,
+::GetValueAndDerivativeThreadProcessSample(ThreadIdType threadId,
                                            SizeValueType fixedImageSample,
                                            const MovingImagePointType & itkNotUsed(mappedPoint),
                                            double movingImageValue,
@@ -162,7 +162,7 @@ MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>
 {
   double diff = movingImageValue - this->m_FixedImageSamples[fixedImageSample].value;
 
-  AlignedPerThreadType &threadS =  m_PerThread[threadID];
+  AlignedPerThreadType &threadS =  m_PerThread[threadId];
 
   threadS.m_MSE += diff * diff;
 
@@ -176,9 +176,9 @@ MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>
   // the reference counts.
   TransformType *transform;
 
-  if( threadID > 0 )
+  if( threadId > 0 )
     {
-    transform = this->m_ThreaderTransform[threadID - 1];
+    transform = this->m_ThreaderTransform[threadId - 1];
     }
   else
     {
@@ -232,9 +232,9 @@ MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>
   memset( derivative.data_block(),
           0,
           this->m_NumberOfParameters * sizeof( double ) );
-  for( ThreadIdType threadID = 0; threadID < this->m_NumberOfThreads; threadID++ )
+  for( ThreadIdType threadId = 0; threadId < this->m_NumberOfThreads; threadId++ )
     {
-    memset( m_PerThread[threadID].m_MSEDerivative.data_block(),
+    memset( m_PerThread[threadId].m_MSEDerivative.data_block(),
             0,
             this->m_NumberOfParameters * sizeof( double ) );
     }
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx
index 5959ba6..9d95c25 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMeanSquaresPointSetToImageMetric.hxx
@@ -59,7 +59,6 @@ MeanSquaresPointSetToImageMetric<TFixedPointSet, TMovingImage>
 
   this->SetTransformParameters(parameters);
 
-  typedef  typename NumericTraits<MeasureType>::AccumulateType AccumulateType;
 
   while( pointItr != pointEnd && pointDataItr != pointDataEnd )
     {
@@ -118,8 +117,6 @@ MeanSquaresPointSetToImageMetric<TFixedPointSet, TMovingImage>
 
   this->SetTransformParameters(parameters);
 
-  typedef  typename NumericTraits<MeasureType>::AccumulateType AccumulateType;
-
   const unsigned int ParametersDimension = this->GetNumberOfParameters();
   derivative = DerivativeType(ParametersDimension);
   derivative.Fill(NumericTraits<typename DerivativeType::ValueType>::Zero);
@@ -130,6 +127,10 @@ MeanSquaresPointSetToImageMetric<TFixedPointSet, TMovingImage>
   PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin();
   PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End();
 
+  TransformJacobianType jacobian(TMovingImage::ImageDimension,
+                                 this->m_Transform->GetNumberOfParameters());
+  TransformJacobianType jacobianCache(TMovingImage::ImageDimension,TMovingImage::ImageDimension);
+
   while( pointItr != pointEnd && pointDataItr != pointDataEnd )
     {
     InputPointType inputPoint;
@@ -146,8 +147,9 @@ MeanSquaresPointSetToImageMetric<TFixedPointSet, TMovingImage>
       const RealType diff = movingValue - fixedValue;
 
       // Now compute the derivatives
-      TransformJacobianType jacobian;
-      this->m_Transform->ComputeJacobianWithRespectToParameters(inputPoint, jacobian);
+      this->m_Transform->ComputeJacobianWithRespectToParametersCachedTemporaries(inputPoint,
+                                                                                 jacobian,
+                                                                                 jacobianCache);
 
       // Get the gradient by NearestNeighboorInterpolation:
       // which is equivalent to round up the point components.
@@ -217,8 +219,6 @@ MeanSquaresPointSetToImageMetric<TFixedPointSet, TMovingImage>
 
   this->SetTransformParameters(parameters);
 
-  typedef  typename NumericTraits<MeasureType>::AccumulateType AccumulateType;
-
   const unsigned int ParametersDimension = this->GetNumberOfParameters();
   derivative = DerivativeType(ParametersDimension);
   derivative.Fill(NumericTraits<typename DerivativeType::ValueType>::Zero);
@@ -229,6 +229,10 @@ MeanSquaresPointSetToImageMetric<TFixedPointSet, TMovingImage>
   PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin();
   PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End();
 
+  TransformJacobianType jacobian(TMovingImage::ImageDimension,
+                                 this->m_Transform->GetNumberOfParameters());
+  TransformJacobianType jacobianCache(TMovingImage::ImageDimension,TMovingImage::ImageDimension);
+
   while( pointItr != pointEnd && pointDataItr != pointDataEnd )
     {
     InputPointType inputPoint;
@@ -244,8 +248,9 @@ MeanSquaresPointSetToImageMetric<TFixedPointSet, TMovingImage>
       this->m_NumberOfPixelsCounted++;
 
       // Now compute the derivatives
-      TransformJacobianType jacobian;
-      this->m_Transform->ComputeJacobianWithRespectToParameters(inputPoint, jacobian);
+      this->m_Transform->ComputeJacobianWithRespectToParametersCachedTemporaries(inputPoint,
+                                                                                 jacobian,
+                                                                                 jacobianCache);
 
       const RealType diff = movingValue - fixedValue;
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h b/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h
index c155eb6..0b3d1ab 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.h
@@ -207,11 +207,11 @@ public:
    * output. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
   /** Method to return the latest modified time of this object or
    * any of its cached ivars */
-  ModifiedTimeType GetMTime() const;
+  virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE;
 
 #ifdef ITKV3_COMPATIBILITY
   // StartRegistration is an old API from before
@@ -231,11 +231,11 @@ public:
 protected:
   MultiResolutionImageRegistrationMethod();
   virtual ~MultiResolutionImageRegistrationMethod() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Method invoked by the pipeline in order to trigger the computation of
    * the registration. */
-  void  GenerateData();
+  virtual void  GenerateData() ITK_OVERRIDE;
 
   /** Initialize by setting the interconnects between the components.
       This method is executed at every level of the pyramid with the
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx
index 863eee7..6193b1b 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx
@@ -32,12 +32,12 @@ MultiResolutionImageRegistrationMethod< TFixedImage, TMovingImage >
 {
   this->SetNumberOfRequiredOutputs(1);    // for the Transform
 
-  m_FixedImage   = 0; // has to be provided by the user.
-  m_MovingImage  = 0; // has to be provided by the user.
-  m_Transform    = 0; // has to be provided by the user.
-  m_Interpolator = 0; // has to be provided by the user.
-  m_Metric       = 0; // has to be provided by the user.
-  m_Optimizer    = 0; // has to be provided by the user.
+  m_FixedImage   = ITK_NULLPTR; // has to be provided by the user.
+  m_MovingImage  = ITK_NULLPTR; // has to be provided by the user.
+  m_Transform    = ITK_NULLPTR; // has to be provided by the user.
+  m_Interpolator = ITK_NULLPTR; // has to be provided by the user.
+  m_Metric       = ITK_NULLPTR; // has to be provided by the user.
+  m_Optimizer    = ITK_NULLPTR; // has to be provided by the user.
 
   // Use MultiResolutionPyramidImageFilter as the default
   // image pyramids.
@@ -274,14 +274,14 @@ MultiResolutionImageRegistrationMethod< TFixedImage, TMovingImage >
       const float scaleFactor = static_cast< float >( schedule[level][dim] );
 
       size[dim] = static_cast< typename SizeType::SizeValueType >(
-        vcl_floor(static_cast< float >( inputSize[dim] ) / scaleFactor) );
+        std::floor(static_cast< float >( inputSize[dim] ) / scaleFactor) );
       if ( size[dim] < 1 )
         {
         size[dim] = 1;
         }
 
       start[dim] = static_cast< typename IndexType::IndexValueType >(
-        vcl_ceil(static_cast< float >( inputStart[dim] ) / scaleFactor) );
+        std::ceil(static_cast< float >( inputStart[dim] ) / scaleFactor) );
       }
     m_FixedImageRegionPyramid[level].SetSize(size);
     m_FixedImageRegionPyramid[level].SetIndex(start);
@@ -351,7 +351,7 @@ MultiResolutionImageRegistrationMethod< TFixedImage, TMovingImage >
     // Invoke an iteration event.
     // This allows a UI to reset any of the components between
     // resolution level.
-    this->InvokeEvent( IterationEvent() );
+    this->InvokeEvent( MultiResolutionIterationEvent() );
 
     // Check if there has been a stop request
     if ( m_Stop )
@@ -474,7 +474,7 @@ MultiResolutionImageRegistrationMethod< TFixedImage, TMovingImage >
       break;
     default:
       itkExceptionMacro("MakeOutput request for an output number larger than the expected number of outputs");
-      return 0;
+      return ITK_NULLPTR;
     }
 }
 } // end namespace itk
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx
index e079950..6845f7f 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMultiResolutionPyramidImageFilter.hxx
@@ -407,11 +407,11 @@ MultiResolutionPyramidImageFilter< TInputImage, TOutputImage >
       outputSpacing[idim] = inputSpacing[idim] * shrinkFactor;
 
       outputSize[idim] = static_cast< SizeValueType >(
-        vcl_floor(static_cast< double >( inputSize[idim] ) / shrinkFactor) );
+        std::floor(static_cast< double >( inputSize[idim] ) / shrinkFactor) );
       if ( outputSize[idim] < 1 ) { outputSize[idim] = 1; }
 
       outputStartIndex[idim] = static_cast< IndexValueType >(
-        vcl_ceil(static_cast< double >( inputStartIndex[idim] ) / shrinkFactor) );
+        std::ceil(static_cast< double >( inputStartIndex[idim] ) / shrinkFactor) );
       }
     //Now compute the new shifted origin for the updated levels;
     const typename OutputImageType::PointType::VectorType outputOriginOffset =
@@ -499,11 +499,11 @@ MultiResolutionPyramidImageFilter< TInputImage, TOutputImage >
         double factor = static_cast< double >( m_Schedule[ilevel][idim] );
 
         outputSize[idim] = static_cast< SizeValueType >(
-          vcl_floor(static_cast< double >( baseSize[idim] ) / factor) );
+          std::floor(static_cast< double >( baseSize[idim] ) / factor) );
         if ( outputSize[idim] < 1 ) { outputSize[idim] = 1; }
 
         outputIndex[idim] = static_cast< IndexValueType >(
-          vcl_ceil(static_cast< double >( baseIndex[idim] ) / factor) );
+          std::ceil(static_cast< double >( baseIndex[idim] ) / factor) );
         }
 
       outputRegion.SetIndex(outputIndex);
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.hxx
index c10ed95..2a05417 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMutualInformationHistogramImageToImageMetric.hxx
@@ -43,11 +43,11 @@ MutualInformationHistogramImageToImageMetric< TFixedImage, TMovingImage >
       static_cast< HistogramFrequencyRealType >( histogram.GetFrequency(i, 0) );
     if ( freq > 0 )
       {
-      entropyX += freq * vcl_log(freq);
+      entropyX += freq * std::log(freq);
       }
     }
 
-  entropyX = -entropyX / static_cast< MeasureType >( totalFreq ) + vcl_log(totalFreq);
+  entropyX = -entropyX / static_cast< MeasureType >( totalFreq ) + std::log(totalFreq);
 
   for ( unsigned int i = 0; i < this->GetHistogramSize()[1]; i++ )
     {
@@ -55,11 +55,11 @@ MutualInformationHistogramImageToImageMetric< TFixedImage, TMovingImage >
       static_cast< HistogramFrequencyRealType >( histogram.GetFrequency(i, 1) );
     if ( freq > 0 )
       {
-      entropyY += freq * vcl_log(freq);
+      entropyY += freq * std::log(freq);
       }
     }
 
-  entropyY = -entropyY / static_cast< MeasureType >( totalFreq ) + vcl_log(totalFreq);
+  entropyY = -entropyY / static_cast< MeasureType >( totalFreq ) + std::log(totalFreq);
 
   HistogramIteratorType it = histogram.Begin();
   HistogramIteratorType end = histogram.End();
@@ -69,13 +69,13 @@ MutualInformationHistogramImageToImageMetric< TFixedImage, TMovingImage >
       static_cast< HistogramFrequencyRealType >( it.GetFrequency() );
     if ( freq > 0 )
       {
-      jointEntropy += freq * vcl_log(freq);
+      jointEntropy += freq * std::log(freq);
       }
     ++it;
     }
 
   jointEntropy = -jointEntropy
-                 / static_cast< MeasureType >( totalFreq ) + vcl_log(totalFreq);
+                 / static_cast< MeasureType >( totalFreq ) + std::log(totalFreq);
 
   return entropyX + entropyY - jointEntropy;
 }
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx
index e4d6825..64f987f 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx
@@ -257,21 +257,21 @@ MutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 
     if( dSumFixed.GetSum() > 0.0 )
       {
-      dLogSumFixed -= vcl_log( dSumFixed.GetSum() );
+      dLogSumFixed -= std::log( dSumFixed.GetSum() );
       }
     if( dSumMoving.GetSum() > 0.0 )
       {
-      dLogSumMoving -= vcl_log( dSumMoving.GetSum() );
+      dLogSumMoving -= std::log( dSumMoving.GetSum() );
       }
     if( dSumJoint.GetSum() > 0.0 )
       {
-      dLogSumJoint -= vcl_log( dSumJoint.GetSum() );
+      dLogSumJoint -= std::log( dSumJoint.GetSum() );
       }
     } // end of sample B loop
 
   double nsamp   = double(m_NumberOfSpatialSamples);
 
-  double threshold = -0.5 *nsamp *vcl_log(m_MinProbability);
+  double threshold = -0.5 *nsamp *std::log(m_MinProbability);
   if( dLogSumMoving.GetSum() > threshold || dLogSumFixed.GetSum() > threshold
       || dLogSumJoint.GetSum() > threshold  )
     {
@@ -282,7 +282,7 @@ MutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 
   MeasureType measure = dLogSumFixed.GetSum() + dLogSumMoving.GetSum() - dLogSumJoint.GetSum();
   measure /= nsamp;
-  measure += vcl_log(nsamp);
+  measure += std::log(nsamp);
 
   return measure;
 }
@@ -376,15 +376,15 @@ MutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 
     if( dSumFixed.GetSum() > 0.0 )
       {
-      dLogSumFixed -= vcl_log( dSumFixed.GetSum() );
+      dLogSumFixed -= std::log( dSumFixed.GetSum() );
       }
     if( dDenominatorMoving.GetSum() > 0.0 )
       {
-      dLogSumMoving -= vcl_log( dDenominatorMoving.GetSum() );
+      dLogSumMoving -= std::log( dDenominatorMoving.GetSum() );
       }
     if( dDenominatorJoint.GetSum() > 0.0 )
       {
-      dLogSumJoint -= vcl_log( dDenominatorJoint.GetSum() );
+      dLogSumJoint -= std::log( dDenominatorJoint.GetSum() );
       }
 
     /** get the image derivative for this B sample */
@@ -423,7 +423,7 @@ MutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 
   double nsamp    = double(m_NumberOfSpatialSamples);
 
-  double threshold = -0.5 *nsamp *vcl_log(m_MinProbability);
+  double threshold = -0.5 *nsamp *std::log(m_MinProbability);
   if( dLogSumMoving.GetSum() > threshold || dLogSumFixed.GetSum() > threshold
       || dLogSumJoint.GetSum() > threshold  )
     {
@@ -434,7 +434,7 @@ MutualInformationImageToImageMetric<TFixedImage, TMovingImage>
 
   value  = dLogSumFixed.GetSum() + dLogSumMoving.GetSum() - dLogSumJoint.GetSum();
   value /= nsamp;
-  value += vcl_log(nsamp);
+  value += std::log(nsamp);
 
   derivative /= nsamp;
   derivative /= vnl_math_sqr(m_MovingImageStandardDeviation);
@@ -486,7 +486,6 @@ MutualInformationImageToImageMetric<TFixedImage, TMovingImage>
     return;
     }
 
-  typedef typename TransformType::JacobianType JacobianType;
   this->m_Transform->ComputeJacobianWithRespectToParameters(point, jacobian);
 
   unsigned int numberOfParameters = this->m_Transform->GetNumberOfParameters();
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx
index 3c7710a..41ba79c 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedCorrelationImageToImageMetric.hxx
@@ -114,7 +114,7 @@ NormalizedCorrelationImageToImageMetric<TFixedImage, TMovingImage>
     sfm -= ( sf * sm / this->m_NumberOfPixelsCounted );
     }
 
-  const RealType denom = -1.0 * vcl_sqrt(sff * smm);
+  const RealType denom = -1.0 * std::sqrt(sff * smm);
 
   if( this->m_NumberOfPixelsCounted > 0 && denom != 0.0 )
     {
@@ -220,7 +220,9 @@ NormalizedCorrelationImageToImageMetric<TFixedImage, TMovingImage>
     ++ti;
     }
 
-  TransformJacobianType jacobian;
+  TransformJacobianType jacobian(TFixedImage::ImageDimension,
+                                 this->m_Transform->GetNumberOfParameters());
+  TransformJacobianType jacobianCache(TFixedImage::ImageDimension,TFixedImage::ImageDimension);
 
   // Compute contributions to derivatives
   ti.GoToBegin();
@@ -250,7 +252,9 @@ NormalizedCorrelationImageToImageMetric<TFixedImage, TMovingImage>
       const RealType movingValue  = this->m_Interpolator->Evaluate(transformedPoint);
       const RealType fixedValue     = ti.Get();
 
-      this->m_Transform->ComputeJacobianWithRespectToParameters(inputPoint, jacobian);
+      this->m_Transform->ComputeJacobianWithRespectToParametersCachedTemporaries(inputPoint,
+                                                                                 jacobian,
+                                                                                 jacobianCache);
 
       // Get the gradient by NearestNeighboorInterpolation:
       // which is equivalent to round up the point components.
@@ -296,7 +300,7 @@ NormalizedCorrelationImageToImageMetric<TFixedImage, TMovingImage>
     sfm -= ( sf * sm / this->m_NumberOfPixelsCounted );
     }
 
-  const RealType denom = -1.0 * vcl_sqrt(sff * smm);
+  const RealType denom = -1.0 * std::sqrt(sff * smm);
 
   if( this->m_NumberOfPixelsCounted > 0 && denom != 0.0 )
     {
@@ -409,6 +413,9 @@ NormalizedCorrelationImageToImageMetric<TFixedImage, TMovingImage>
     ++ti;
     }
 
+  TransformJacobianType jacobianCache(TFixedImage::ImageDimension,TFixedImage::ImageDimension);
+  TransformJacobianType jacobian(TFixedImage::ImageDimension,
+                                 this->m_Transform->GetNumberOfParameters());
   // Compute contributions to derivatives
   ti.GoToBegin();
   while( !ti.IsAtEnd() )
@@ -437,8 +444,9 @@ NormalizedCorrelationImageToImageMetric<TFixedImage, TMovingImage>
       const RealType movingValue  = this->m_Interpolator->Evaluate(transformedPoint);
       const RealType fixedValue     = ti.Get();
 
-      TransformJacobianType jacobian;
-      this->m_Transform->ComputeJacobianWithRespectToParameters(inputPoint, jacobian);
+      this->m_Transform->ComputeJacobianWithRespectToParametersCachedTemporaries(inputPoint,
+                                                                                 jacobian,
+                                                                                 jacobianCache);
 
       // Get the gradient by NearestNeighboorInterpolation:
       // which is equivalent to round up the point components.
@@ -483,7 +491,7 @@ NormalizedCorrelationImageToImageMetric<TFixedImage, TMovingImage>
     sfm -= ( sf * sm / this->m_NumberOfPixelsCounted );
     }
 
-  const RealType denom = -1.0 * vcl_sqrt(sff * smm);
+  const RealType denom = -1.0 * std::sqrt(sff * smm);
 
   if( this->m_NumberOfPixelsCounted > 0 && denom != 0.0 )
     {
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx
index 4f6f297..97114bf 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedCorrelationPointSetToImageMetric.hxx
@@ -101,7 +101,7 @@ NormalizedCorrelationPointSetToImageMetric<TFixedPointSet, TMovingImage>
     sfm -= ( sf * sm / this->m_NumberOfPixelsCounted );
     }
 
-  const RealType denom = -1.0 * vcl_sqrt(sff * smm);
+  const RealType denom = -1.0 * std::sqrt(sff * smm);
 
   if( this->m_NumberOfPixelsCounted > 0 && denom != 0.0 )
     {
@@ -169,7 +169,9 @@ NormalizedCorrelationPointSetToImageMetric<TFixedPointSet, TMovingImage>
   PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin();
   PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End();
 
-  TransformJacobianType jacobian;
+  TransformJacobianType jacobian(TMovingImage::ImageDimension,
+                                 this->m_Transform->GetNumberOfParameters());
+  TransformJacobianType jacobianCache(TMovingImage::ImageDimension,TMovingImage::ImageDimension);
 
   while( pointItr != pointEnd && pointDataItr != pointDataEnd )
     {
@@ -195,7 +197,9 @@ NormalizedCorrelationPointSetToImageMetric<TFixedPointSet, TMovingImage>
       this->m_NumberOfPixelsCounted++;
 
       // Now compute the derivatives
-      this->m_Transform->ComputeJacobianWithRespectToParameters(inputPoint, jacobian);
+      this->m_Transform->ComputeJacobianWithRespectToParametersCachedTemporaries(inputPoint,
+                                                                                 jacobian,
+                                                                                 jacobianCache);
 
       // Get the gradient by NearestNeighboorInterpolation:
       // which is equivalent to round up the point components.
@@ -244,7 +248,7 @@ NormalizedCorrelationPointSetToImageMetric<TFixedPointSet, TMovingImage>
       }
     }
 
-  const RealType denom = -1.0 * vcl_sqrt(sff * smm);
+  const RealType denom = -1.0 * std::sqrt(sff * smm);
 
   if( this->m_NumberOfPixelsCounted > 0 && denom != 0.0 )
     {
@@ -316,6 +320,10 @@ NormalizedCorrelationPointSetToImageMetric<TFixedPointSet, TMovingImage>
   PointDataIterator pointDataItr = fixedPointSet->GetPointData()->Begin();
   PointDataIterator pointDataEnd = fixedPointSet->GetPointData()->End();
 
+  TransformJacobianType jacobian(TMovingImage::ImageDimension,
+                                 this->m_Transform->GetNumberOfParameters());
+  TransformJacobianType jacobianCache(TMovingImage::ImageDimension,TMovingImage::ImageDimension);
+
   while( pointItr != pointEnd && pointDataItr != pointDataEnd )
     {
     InputPointType inputPoint;
@@ -340,8 +348,9 @@ NormalizedCorrelationPointSetToImageMetric<TFixedPointSet, TMovingImage>
       this->m_NumberOfPixelsCounted++;
 
       // Now compute the derivatives
-      TransformJacobianType jacobian;
-      this->m_Transform->ComputeJacobianWithRespectToParameters(inputPoint, jacobian);
+      this->m_Transform->ComputeJacobianWithRespectToParametersCachedTemporaries(inputPoint,
+                                                                                 jacobian,
+                                                                                 jacobianCache);
 
       // Get the gradient by NearestNeighboorInterpolation:
       // which is equivalent to round up the point components.
@@ -390,7 +399,7 @@ NormalizedCorrelationPointSetToImageMetric<TFixedPointSet, TMovingImage>
       }
     }
 
-  const RealType denom = -1.0 * vcl_sqrt(sff * smm);
+  const RealType denom = -1.0 * std::sqrt(sff * smm);
 
   if( this->m_NumberOfPixelsCounted > 0 && denom != 0.0 )
     {
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.hxx
index f5ef872..4895799 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkNormalizedMutualInformationHistogramImageToImageMetric.hxx
@@ -46,11 +46,11 @@ NormalizedMutualInformationHistogramImageToImageMetric< TFixedImage, \
 
     if ( freq > 0 )
       {
-      entropyX += freq * vcl_log(freq);
+      entropyX += freq * std::log(freq);
       }
     }
 
-  entropyX = -entropyX / static_cast< MeasureType >( totalFreq ) + vcl_log(totalFreq);
+  entropyX = -entropyX / static_cast< MeasureType >( totalFreq ) + std::log(totalFreq);
 
   for ( unsigned int i = 0; i < this->GetHistogramSize()[1]; i++ )
     {
@@ -59,11 +59,11 @@ NormalizedMutualInformationHistogramImageToImageMetric< TFixedImage, \
 
     if ( freq > 0 )
       {
-      entropyY += freq * vcl_log(freq);
+      entropyY += freq * std::log(freq);
       }
     }
 
-  entropyY = -entropyY / static_cast< MeasureType >( totalFreq ) + vcl_log(totalFreq);
+  entropyY = -entropyY / static_cast< MeasureType >( totalFreq ) + std::log(totalFreq);
 
   HistogramIteratorType it = histogram.Begin();
   HistogramIteratorType end = histogram.End();
@@ -74,13 +74,13 @@ NormalizedMutualInformationHistogramImageToImageMetric< TFixedImage, \
 
     if ( freq > 0 )
       {
-      jointEntropy += freq * vcl_log(freq);
+      jointEntropy += freq * std::log(freq);
       }
     ++it;
     }
 
   jointEntropy = -jointEntropy / static_cast< MeasureType >( totalFreq )
-                 + vcl_log(totalFreq);
+                 + std::log(totalFreq);
 
   return ( entropyX + entropyY ) / jointEntropy;
 }
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPDEDeformableRegistrationFunction.h b/Utilities/ITK/Modules/Registration/Common/include/itkPDEDeformableRegistrationFunction.h
index d8c066c..6bfa5c9 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPDEDeformableRegistrationFunction.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPDEDeformableRegistrationFunction.h
@@ -112,9 +112,9 @@ public:
 protected:
   PDEDeformableRegistrationFunction()
   {
-    m_MovingImage = NULL;
-    m_FixedImage = NULL;
-    m_DisplacementField = NULL;
+    m_MovingImage = ITK_NULLPTR;
+    m_FixedImage = ITK_NULLPTR;
+    m_DisplacementField = ITK_NULLPTR;
     m_Energy = 0.0;
     m_NormalizeGradient = true;
     m_GradientStep = 1.0;
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageMetric.h b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageMetric.h
index 1e93682..a0b4f1e 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageMetric.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageMetric.h
@@ -158,7 +158,7 @@ public:
   itkGetConstReferenceMacro(ComputeGradient, bool);
 
   /** Return the number of parameters required by the Transform */
-  unsigned int GetNumberOfParameters(void) const
+  virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE
   { return m_Transform->GetNumberOfParameters(); }
 
   /** Initialize the Metric by making sure that all the components
@@ -169,7 +169,7 @@ public:
 protected:
   PointSetToImageMetric();
   virtual ~PointSetToImageMetric() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   mutable SizeValueType m_NumberOfPixelsCounted;
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx
index 969920e..6709651 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageMetric.hxx
@@ -29,13 +29,13 @@ template< typename TFixedPointSet, typename TMovingImage >
 PointSetToImageMetric< TFixedPointSet, TMovingImage >
 ::PointSetToImageMetric()
 {
-  m_FixedPointSet = 0;         // has to be provided by the user.
-  m_MovingImage   = 0;         // has to be provided by the user.
-  m_Transform     = 0;         // has to be provided by the user.
-  m_Interpolator  = 0;         // has to be provided by the user.
+  m_FixedPointSet = ITK_NULLPTR;         // has to be provided by the user.
+  m_MovingImage   = ITK_NULLPTR;         // has to be provided by the user.
+  m_Transform     = ITK_NULLPTR;         // has to be provided by the user.
+  m_Interpolator  = ITK_NULLPTR;         // has to be provided by the user.
   m_ComputeGradient = true;    // metric computes gradient by default
   m_NumberOfPixelsCounted = 0; // initialize to zero
-  m_GradientImage = NULL;      // computed at initialization
+  m_GradientImage = ITK_NULLPTR;      // computed at initialization
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h
index 0e8c59d..9f5f880 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.h
@@ -156,11 +156,11 @@ public:
    * output. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
   /** Method to return the latest modified time of this object or
    * any of its cached ivars */
-  ModifiedTimeType GetMTime() const;
+  virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE;
 
 #ifdef ITKV3_COMPATIBILITY
   /** Method that initiates the registration. */
@@ -181,11 +181,11 @@ public:
 protected:
   PointSetToImageRegistrationMethod();
   virtual ~PointSetToImageRegistrationMethod() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Method invoked by the pipeline in order to trigger the computation of
    * the registration. */
-  void  GenerateData();
+  virtual void  GenerateData() ITK_OVERRIDE;
 
 private:
   PointSetToImageRegistrationMethod(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx
index 30e0950..b2d4ae3 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx
@@ -31,12 +31,12 @@ PointSetToImageRegistrationMethod< TFixedPointSet, TMovingImage >
 {
   this->SetNumberOfRequiredOutputs(1);    // for the Transform
 
-  m_FixedPointSet   = 0; // has to be provided by the user.
-  m_MovingImage     = 0; // has to be provided by the user.
-  m_Transform       = 0; // has to be provided by the user.
-  m_Interpolator    = 0; // has to be provided by the user.
-  m_Metric          = 0; // has to be provided by the user.
-  m_Optimizer       = 0; // has to be provided by the user.
+  m_FixedPointSet   = ITK_NULLPTR; // has to be provided by the user.
+  m_MovingImage     = ITK_NULLPTR; // has to be provided by the user.
+  m_Transform       = ITK_NULLPTR; // has to be provided by the user.
+  m_Interpolator    = ITK_NULLPTR; // has to be provided by the user.
+  m_Metric          = ITK_NULLPTR; // has to be provided by the user.
+  m_Optimizer       = ITK_NULLPTR; // has to be provided by the user.
 
   m_InitialTransformParameters = ParametersType(1);
   m_LastTransformParameters = ParametersType(1);
@@ -215,7 +215,7 @@ PointSetToImageRegistrationMethod< TFixedPointSet, TMovingImage >
       break;
     default:
       itkExceptionMacro("MakeOutput request for an output number larger than the expected number of outputs");
-      return 0;
+      return ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetMetric.h b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetMetric.h
index 7419f04..f4776a8 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetMetric.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetMetric.h
@@ -114,7 +114,7 @@ public:
   void SetTransformParameters(const ParametersType & parameters) const;
 
   /** Return the number of parameters required by the Transform */
-  unsigned int GetNumberOfParameters(void) const
+  virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE
   { return m_Transform->GetNumberOfParameters(); }
 
   /** Initialize the Metric by making sure that all the components
@@ -125,7 +125,7 @@ public:
 protected:
   PointSetToPointSetMetric();
   virtual ~PointSetToPointSetMetric() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   FixedPointSetConstPointer m_FixedPointSet;
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx
index 8121c0c..6786d76 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetMetric.hxx
@@ -27,9 +27,9 @@ template< typename TFixedPointSet, typename TMovingPointSet >
 PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet >
 ::PointSetToPointSetMetric()
 {
-  m_FixedPointSet = 0;    // has to be provided by the user.
-  m_MovingPointSet   = 0; // has to be provided by the user.
-  m_Transform     = 0;    // has to be provided by the user.
+  m_FixedPointSet = ITK_NULLPTR;    // has to be provided by the user.
+  m_MovingPointSet   = ITK_NULLPTR; // has to be provided by the user.
+  m_Transform     = ITK_NULLPTR;    // has to be provided by the user.
 }
 
 /** Set the parameters that define a unique transform */
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h
index 88c6d2b..8def77a 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.h
@@ -146,11 +146,11 @@ public:
    * output. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
   /** Method to return the latest modified time of this object or
    * any of its cached ivars */
-  ModifiedTimeType GetMTime() const;
+  virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE;
 
 #ifdef ITKV3_COMPATIBILITY
   /** Method that initiates the registration. This will Initialize and ensure
@@ -174,11 +174,11 @@ public:
 protected:
   PointSetToPointSetRegistrationMethod();
   virtual ~PointSetToPointSetRegistrationMethod() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Method invoked by the pipeline in order to trigger the computation of
    * the registration. */
-  void  GenerateData();
+  virtual void  GenerateData() ITK_OVERRIDE;
 
 private:
   PointSetToPointSetRegistrationMethod(const Self &); //purposely not
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx
index 8c65593..e5c5142 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx
@@ -31,11 +31,11 @@ PointSetToPointSetRegistrationMethod< TFixedPointSet, TMovingPointSet >
 {
   this->SetNumberOfRequiredOutputs(1);    // for the Transform
 
-  m_FixedPointSet   = 0; // has to be provided by the user.
-  m_MovingPointSet  = 0; // has to be provided by the user.
-  m_Transform       = 0; // has to be provided by the user.
-  m_Metric          = 0; // has to be provided by the user.
-  m_Optimizer       = 0; // has to be provided by the user.
+  m_FixedPointSet   = ITK_NULLPTR; // has to be provided by the user.
+  m_MovingPointSet  = ITK_NULLPTR; // has to be provided by the user.
+  m_Transform       = ITK_NULLPTR; // has to be provided by the user.
+  m_Metric          = ITK_NULLPTR; // has to be provided by the user.
+  m_Optimizer       = ITK_NULLPTR; // has to be provided by the user.
 
   m_InitialTransformParameters = ParametersType(1);
   m_LastTransformParameters = ParametersType(1);
@@ -204,7 +204,7 @@ PointSetToPointSetRegistrationMethod< TFixedPointSet, TMovingPointSet >
       break;
     default:
       itkExceptionMacro("MakeOutput request for an output number larger than the expected number of outputs");
-      return 0;
+      return ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h
index b1aba2b..b30ed17 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.h
@@ -103,7 +103,7 @@ public:
 protected:
   PointSetToSpatialObjectDemonsRegistration();
   virtual ~PointSetToSpatialObjectDemonsRegistration() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   PointSetToSpatialObjectDemonsRegistration(const Self &); //purposely not
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx
index 492c3b5..b38ad32 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPointSetToSpatialObjectDemonsRegistration.hxx
@@ -29,8 +29,8 @@ template< typename TFixedPointSet, typename TMovingSpatialObject >
 PointSetToSpatialObjectDemonsRegistration< TFixedPointSet, TMovingSpatialObject >
 ::PointSetToSpatialObjectDemonsRegistration()
 {
-  m_FixedPointSet           = 0; // has to be provided by the user.
-  m_MovingSpatialObject     = 0; // has to be provided by the user.
+  m_FixedPointSet           = ITK_NULLPTR; // has to be provided by the user.
+  m_MovingSpatialObject     = ITK_NULLPTR; // has to be provided by the user.
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkPointsLocator.h b/Utilities/ITK/Modules/Registration/Common/include/itkPointsLocator.h
index ad38c48..79b905b 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkPointsLocator.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkPointsLocator.h
@@ -112,7 +112,7 @@ public:
 protected:
   PointsLocator();
   ~PointsLocator();
-  virtual void PrintSelf(std::ostream& os, Indent indent) const;
+  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
 
 private:
   PointsLocator( const Self& ); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx
index b07ce34..c8b1723 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkRecursiveMultiResolutionPyramidImageFilter.hxx
@@ -347,14 +347,14 @@ RecursiveMultiResolutionPyramidImageFilter< TInputImage, TOutputImage >
       requestedIndex[idim] += radius[idim];
 
       // take into account shrink component
-      requestedSize[idim] = static_cast< SizeValueType >( vcl_floor(
+      requestedSize[idim] = static_cast< SizeValueType >( std::floor(
                                                             static_cast< double >( requestedSize[idim] )
                                                             / static_cast< double >( factors[idim] ) ) );
       if ( requestedSize[idim] < 1 )
         {
         requestedSize[idim] = 1;
         }
-      requestedIndex[idim] = static_cast< IndexValueType >( vcl_ceil(
+      requestedIndex[idim] = static_cast< IndexValueType >( std::ceil(
                                                               static_cast< double >( requestedIndex[idim] )
                                                               / static_cast< double >( factors[idim] ) ) );
       }
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h b/Utilities/ITK/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h
index f758926..f12ad93 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkSimpleMultiResolutionImageRegistrationUI.h
@@ -30,7 +30,8 @@ template <typename TRegistrator>
 class SimpleMultiResolutionImageRegistrationUI
 {
 public:
-  SimpleMultiResolutionImageRegistrationUI( TRegistrator * ptr )
+  SimpleMultiResolutionImageRegistrationUI( TRegistrator * ptr ):
+    m_Tag(0)
     {
 
     if ( !ptr ) return;
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.hxx b/Utilities/ITK/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.hxx
index e42e347..86e32c9 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.hxx
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.hxx
@@ -38,7 +38,7 @@ TimeVaryingBSplineVelocityFieldTransformParametersAdaptor<TTransform>
 
   this->m_RequiredTransformDomainOrigin.Fill( 0.0 );
   this->m_RequiredTransformDomainDirection.SetIdentity();
-  this->m_RequiredTransformDomainSize.Fill( 1.0 );
+  this->m_RequiredTransformDomainSize.Fill( 1 );
   this->m_RequiredTransformDomainSpacing.Fill( 0.0 );
   this->m_RequiredTransformDomainMeshSize.Fill( 1 );
 
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkTransformParametersAdaptor.h b/Utilities/ITK/Modules/Registration/Common/include/itkTransformParametersAdaptor.h
index 8397734..9fb3e5c 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkTransformParametersAdaptor.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkTransformParametersAdaptor.h
@@ -19,6 +19,7 @@
 #define __itkTransformParametersAdaptor_h
 
 #include "itkTransformParametersAdaptorBase.h"
+#include "itkTransform.h"
 
 namespace itk
 {
@@ -52,13 +53,13 @@ namespace itk
  */
 template<typename TTransform>
 class TransformParametersAdaptor
-: public TransformParametersAdaptorBase<TTransform>
+: public TransformParametersAdaptorBase< Transform<typename TTransform::ScalarType, TTransform::InputSpaceDimension, TTransform::OutputSpaceDimension> >
 {
 public:
 
   /** Standard class typedefs. */
   typedef TransformParametersAdaptor                     Self;
-  typedef TransformParametersAdaptorBase<TTransform>     Superclass;
+  typedef TransformParametersAdaptorBase<Transform<typename TTransform::ScalarType, TTransform::InputSpaceDimension, TTransform::OutputSpaceDimension> >     Superclass;
   typedef SmartPointer<Self>                             Pointer;
   typedef SmartPointer<const Self>                       ConstPointer;
 
@@ -66,14 +67,23 @@ public:
   itkTypeMacro( TransformParametersAdaptor, TransformParametersAdaptorBase );
 
   /** Typedefs associated with the transform */
+
+  typedef typename Superclass::TransformBaseType         TransformBaseType;
   typedef TTransform                                     TransformType;
-  typedef typename Superclass::TransformPointer          TransformPointer;
-  typedef typename Superclass::ParametersType            ParametersType;
+  typedef typename TransformType::Pointer                TransformPointer;
+  typedef typename TransformType::ParametersType         ParametersType;
   typedef typename Superclass::ParametersValueType       ParametersValueType;
 
   /** Set the transform to be adapted */
   itkSetObjectMacro( Transform, TransformType );
 
+  virtual void SetTransform( TransformBaseType * _arg, void * )
+    {
+      TransformType *tx = dynamic_cast<TransformType *>(_arg);
+      itkAssertOrThrowMacro( tx != ITK_NULLPTR, "Unable to convert Transform to require concrete transform!" );
+      this->SetTransform(tx);
+    }
+
   /** New macro for creation of through the object factory. */
   itkNewMacro( Self );
 
@@ -90,13 +100,13 @@ protected:
   TransformParametersAdaptor() {}
   ~TransformParametersAdaptor() {}
 
-  void PrintSelf( std::ostream & os, Indent itkNotUsed( indent ) ) const
+  void PrintSelf( std::ostream & os, Indent indent ) const
   {
-    os << "Fixed parameters: " << this->m_RequiredFixedParameters << std::endl;
+    Superclass::PrintSelf( os, indent );
+    itkPrintSelfObjectMacro( Transform );
   }
 
   TransformPointer                           m_Transform;
-  ParametersType                             m_RequiredFixedParameters;
 
 private:
   TransformParametersAdaptor( const Self & ); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Registration/Common/include/itkTransformParametersAdaptorBase.h b/Utilities/ITK/Modules/Registration/Common/include/itkTransformParametersAdaptorBase.h
index 80e1445..3e91099 100644
--- a/Utilities/ITK/Modules/Registration/Common/include/itkTransformParametersAdaptorBase.h
+++ b/Utilities/ITK/Modules/Registration/Common/include/itkTransformParametersAdaptorBase.h
@@ -67,13 +67,14 @@ public:
   itkTypeMacro( TransformParametersAdaptorBase, Object );
 
   /** Typedefs associated with the transform */
-  typedef TTransform                                     TransformType;
-  typedef typename TransformType::Pointer                TransformPointer;
-  typedef typename TransformType::ParametersType         ParametersType;
+  typedef TTransform                                     TransformBaseType;
+  typedef typename TransformBaseType::Pointer            TransformBasePointer;
+  typedef typename TransformBaseType::ParametersType     ParametersType;
   typedef typename ParametersType::ValueType             ParametersValueType;
 
-  /** Set the transform to be adapted */
-  itkSetObjectMacro( Transform, TransformType );
+  // note: the void pointer is use to ensure this method has lower
+  // overloaded priority and avoid an ambiguous overloaded method
+  virtual void SetTransform( TransformBaseType *_arg, void * priorityLower = ITK_NULLPTR ) = 0;
 
   /** Set the fixed parameters */
   itkSetMacro( RequiredFixedParameters, ParametersType );
@@ -88,13 +89,12 @@ protected:
   TransformParametersAdaptorBase() {}
   ~TransformParametersAdaptorBase() {}
 
-  void PrintSelf( std::ostream & os, Indent indent ) const
+  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE
   {
-    this->m_Transform->Print( os, indent );
+    Superclass::PrintSelf( os, indent );
     os << "Fixed parameters" << this->m_RequiredFixedParameters << std::endl;
   }
 
-  TransformPointer                           m_Transform;
   ParametersType                             m_RequiredFixedParameters;
 
 private:
diff --git a/Utilities/ITK/Modules/Registration/Common/wrapping/itkBlockMatchingImageFilter.wrap b/Utilities/ITK/Modules/Registration/Common/wrapping/itkBlockMatchingImageFilter.wrap
index 55eace4..99589f6 100644
--- a/Utilities/ITK/Modules/Registration/Common/wrapping/itkBlockMatchingImageFilter.wrap
+++ b/Utilities/ITK/Modules/Registration/Common/wrapping/itkBlockMatchingImageFilter.wrap
@@ -1,3 +1,7 @@
-itk_wrap_class("itk::BlockMatchingImageFilter" POINTER_WITH_2_SUPERCLASSES)
-  itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3)
-itk_end_wrap_class()
+itk_wrap_filter_dims(has_d_3 3)
+
+if(has_d_3)
+  itk_wrap_class("itk::BlockMatchingImageFilter" POINTER_WITH_2_SUPERCLASSES)
+    itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 3)
+  itk_end_wrap_class()
+endif(has_d_3)
diff --git a/Utilities/ITK/Modules/Registration/Common/wrapping/itkCenteredVersorTransformInitializer.wrap b/Utilities/ITK/Modules/Registration/Common/wrapping/itkCenteredVersorTransformInitializer.wrap
index b9a0ba8..346f41d 100644
--- a/Utilities/ITK/Modules/Registration/Common/wrapping/itkCenteredVersorTransformInitializer.wrap
+++ b/Utilities/ITK/Modules/Registration/Common/wrapping/itkCenteredVersorTransformInitializer.wrap
@@ -1,4 +1,7 @@
-itk_wrap_class("itk::CenteredVersorTransformInitializer" POINTER)
-   # the superclass use a class which support only dim=3
-   itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 3)
-itk_end_wrap_class()
+itk_wrap_filter_dims(has_d_3 3)
+
+if(has_d_3)
+  itk_wrap_class("itk::CenteredVersorTransformInitializer" POINTER)
+    itk_wrap_image_filter("${WRAP_ITK_SCALAR}" 2 3)
+  itk_end_wrap_class()
+endif(has_d_3)
diff --git a/Utilities/ITK/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx b/Utilities/ITK/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx
index 52e8893..38808f6 100644
--- a/Utilities/ITK/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx
+++ b/Utilities/ITK/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.hxx
@@ -297,7 +297,7 @@ GPUDemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
     {
     m_Metric = m_SumOfSquaredDifference /
       static_cast<double>( m_NumberOfPixelsProcessed );
-    m_RMSChange = vcl_sqrt( m_SumOfSquaredChange /
+    m_RMSChange = std::sqrt( m_SumOfSquaredChange /
                             static_cast<double>( m_NumberOfPixelsProcessed ) );
     }
 }
@@ -415,7 +415,7 @@ GPUDemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
     {
     m_Metric = m_SumOfSquaredDifference
                / static_cast< double >( m_NumberOfPixelsProcessed );
-    m_RMSChange = vcl_sqrt( m_SumOfSquaredChange
+    m_RMSChange = std::sqrt( m_SumOfSquaredChange
                             / static_cast< double >( m_NumberOfPixelsProcessed ) );
     }
   m_MetricCalculationLock.Unlock();
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h
index 7a5c52e..73c28b6 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h
@@ -143,7 +143,9 @@ public:
   } ScanParametersType;
 
 protected:
-  ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader() {}
+  ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader() :
+    m_ANTSAssociate(ITK_NULLPTR)
+  {}
 
   /**
    * Dense threader and sparse threader invoke different in multi-threading. This class uses overloaded
@@ -216,7 +218,7 @@ protected:
          const MovingImageGradientType &   itkNotUsed(mappedMovingImageGradient),
          MeasureType &                     itkNotUsed(metricValueReturn),
          DerivativeType &                  itkNotUsed(localDerivativeReturn),
-         const ThreadIdType                itkNotUsed(threadID) ) const
+         const ThreadIdType                itkNotUsed(threadId) ) const
      {
         itkExceptionMacro("ProcessPoint should never be reached in ANTS CC metric threader class.");
      }
@@ -250,12 +252,12 @@ protected:
    * UpdateQueuesAtBeginningOfLine or \c UpdateQueuesToNextScanWindow. */
   void UpdateQueues(const ScanIteratorType &scanIt,
     ScanMemType &scanMem, const ScanParametersType &scanParameters,
-    const ThreadIdType threadID) const;
+    const ThreadIdType threadId) const;
 
   void UpdateQueuesAtBeginningOfLine(
     const ScanIteratorType &scanIt, ScanMemType &scanMem,
     const ScanParametersType &scanParameters,
-    const ThreadIdType threadID) const;
+    const ThreadIdType threadId) const;
 
   /** Increment the iterator and check to see if we're at the end of the
    * line.  If so, go to the next line.  Otherwise, add the
@@ -263,19 +265,19 @@ protected:
   void UpdateQueuesToNextScanWindow(
     const ScanIteratorType &scanIt, ScanMemType &scanMem,
     const ScanParametersType &scanParameters,
-    const ThreadIdType threadID) const;
+    const ThreadIdType threadId) const;
 
   /** Test to see if there are any voxels we need to handle in the current
    * window. */
   bool ComputeInformationFromQueues(
     const ScanIteratorType &scanIt, ScanMemType &scanMem,
     const ScanParametersType &scanParameters,
-    const ThreadIdType threadID) const;
+    const ThreadIdType threadId) const;
 
   void ComputeMovingTransformDerivative(
     const ScanIteratorType &scanIt, ScanMemType &scanMem,
     const ScanParametersType &scanParameters, DerivativeType &deriv,
-    MeasureType &local_cc, const ThreadIdType threadID) const;
+    MeasureType &local_cc, const ThreadIdType threadId) const;
 
 private:
   ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader( const Self & ); // purposely not implemented
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx
index 09bd4a1..1a02ff2 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx
@@ -33,7 +33,7 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TD
 {
   /* Store the casted pointer to avoid dynamic casting in tight loops. */
   this->m_ANTSAssociate = dynamic_cast< TNeighborhoodCorrelationMetric * >( this->m_Associate );
-  if( this->m_ANTSAssociate == NULL )
+  if( this->m_ANTSAssociate == ITK_NULLPTR )
     {
     itkExceptionMacro("Dynamic casting of associate pointer failed.");
     }
@@ -112,7 +112,7 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TD
     /* call base method */
     /* Store the casted pointer to avoid dynamic casting in tight loops. */
     this->m_ANTSAssociate = dynamic_cast< TNeighborhoodCorrelationMetric * >( this->m_Associate );
-    if( this->m_ANTSAssociate == NULL )
+    if( this->m_ANTSAssociate == ITK_NULLPTR )
       {
       itkExceptionMacro("Dynamic casting of associate pointer failed.");
       }
@@ -503,10 +503,15 @@ ANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TD
       }
 
     /* Use a pre-allocated jacobian object for efficiency */
-    JacobianType & jacobian = this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobian;
+    typedef JacobianType & JacobianReferenceType;
+    JacobianReferenceType jacobian = this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobian;
+    JacobianReferenceType jacobianPositional = this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobianPositional;
 
     /** For dense transforms, this returns identity */
-    this->m_Associate->GetMovingTransform()->ComputeJacobianWithRespectToParameters( scanMem.virtualPoint, jacobian );
+    this->m_Associate->GetMovingTransform()->
+      ComputeJacobianWithRespectToParametersCachedTemporaries(scanMem.virtualPoint,
+                                                              jacobian,
+                                                              jacobianPositional);
 
     NumberOfParametersType numberOfLocalParameters = this->m_Associate->GetMovingTransform()->GetNumberOfLocalParameters();
 
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.hxx
index f8129d3..6c1f827 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.hxx
@@ -25,15 +25,17 @@ namespace itk
 
 template <typename TFixedImage, typename TMovingImage, typename TVirtualImage, typename TInternalComputationValueType, typename TMetricTraits>
 CorrelationImageToImageMetricv4<TFixedImage,TMovingImage,TVirtualImage, TInternalComputationValueType, TMetricTraits>
-::CorrelationImageToImageMetricv4()
+::CorrelationImageToImageMetricv4() :
+  m_AverageFix(0.0),
+  m_AverageMov(0.0)
 {
-  // We have our own GetValueAndDerivativeThreader's that we want
-  // ImageToImageMetricv4 to use.
-  this->m_DenseGetValueAndDerivativeThreader  = CorrelationDenseGetValueAndDerivativeThreaderType::New();
-  this->m_SparseGetValueAndDerivativeThreader = CorrelationSparseGetValueAndDerivativeThreaderType::New();
+  this->m_DenseGetValueAndDerivativeThreader =
+    CorrelationDenseGetValueAndDerivativeThreaderType::New();
+  this->m_SparseGetValueAndDerivativeThreader =
+    CorrelationSparseGetValueAndDerivativeThreaderType::New();
 
-  this->m_HelperDenseThreader  = CorrelationHelperDenseThreaderType::New();
-  this->m_HelperSparseThreader = CorrelationHelperSparseThreaderType::New();
+  m_HelperDenseThreader = CorrelationHelperDenseThreaderType::New();
+  m_HelperSparseThreader = CorrelationHelperSparseThreaderType::New();
 
   if( this->m_MovingTransform->GetTransformCategory() == MovingTransformType::DisplacementField )
     {
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h
index 2801650..9460452 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h
@@ -110,7 +110,7 @@ protected:
         const MovingImageGradientType &   mappedMovingImageGradient,
         MeasureType &                     metricValueReturn,
         DerivativeType &                  localDerivativeReturn,
-        const ThreadIdType                threadID ) const;
+        const ThreadIdType                threadId ) const;
 
 private:
   CorrelationImageToImageMetricv4GetValueAndDerivativeThreader( const Self & ); // purposely not implemented
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx
index ff2f415..ae22f44 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.hxx
@@ -25,10 +25,10 @@ namespace itk
 
 template<typename TDomainPartitioner, typename TImageToImageMetric, typename TCorrelationMetric>
 CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric>
-::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader():
-  m_CorrelationMetricValueDerivativePerThreadVariables( NULL )
-{
-}
+::CorrelationImageToImageMetricv4GetValueAndDerivativeThreader() :
+  m_CorrelationMetricValueDerivativePerThreadVariables( ITK_NULLPTR ),
+  m_CorrelationAssociate( ITK_NULLPTR )
+{}
 
 
 template<typename TDomainPartitioner, typename TImageToImageMetric, typename TCorrelationMetric>
@@ -48,7 +48,7 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner
 
   /* Store the casted pointer to avoid dynamic casting in tight loops. */
   this->m_CorrelationAssociate = dynamic_cast<TCorrelationMetric *>(this->m_Associate);
-  if( this->m_CorrelationAssociate == NULL )
+  if( this->m_CorrelationAssociate == ITK_NULLPTR )
     {
     itkExceptionMacro("Dynamic casting of associate pointer failed.");
     }
@@ -56,10 +56,11 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner
   /* This size always comes from the moving image */
   const NumberOfParametersType globalDerivativeSize = this->GetCachedNumberOfParameters();
 
+  const ThreadIdType numThreadsUsed = this->GetNumberOfThreadsUsed();
   // set size
   delete[] m_CorrelationMetricValueDerivativePerThreadVariables;
-  m_CorrelationMetricValueDerivativePerThreadVariables = new AlignedCorrelationMetricValueDerivativePerThreadStruct[ this->GetNumberOfThreadsUsed() ];
-  for (ThreadIdType i = 0; i < this->GetNumberOfThreadsUsed(); i++)
+  m_CorrelationMetricValueDerivativePerThreadVariables = new AlignedCorrelationMetricValueDerivativePerThreadStruct[ numThreadsUsed ];
+  for (ThreadIdType i = 0; i < numThreadsUsed; ++i)
     {
     this->m_CorrelationMetricValueDerivativePerThreadVariables[i].fdm.SetSize(globalDerivativeSize);
     this->m_CorrelationMetricValueDerivativePerThreadVariables[i].mdm.SetSize(globalDerivativeSize);
@@ -67,7 +68,7 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner
 
   //---------------------------------------------------------------
   // Set initial values.
-  for (ThreadIdType i = 0; i < this->GetNumberOfThreadsUsed(); i++)
+  for (ThreadIdType i = 0; i < numThreadsUsed; ++i)
     {
     m_CorrelationMetricValueDerivativePerThreadVariables[i].fm = NumericTraits<InternalComputationValueType>::Zero;
     m_CorrelationMetricValueDerivativePerThreadVariables[i].f2 = NumericTraits<InternalComputationValueType>::Zero;
@@ -89,11 +90,12 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader<TDomainPartitioner,
 
   /* This size always comes from the moving image */
   const NumberOfParametersType globalDerivativeSize = this->GetCachedNumberOfParameters();
+  const ThreadIdType numThreadsUsed = this->GetNumberOfThreadsUsed();
 
   /* Store the number of valid points the enclosing class \c
    * m_NumberOfValidPoints by collecting the valid points per thread. */
   this->m_CorrelationAssociate->m_NumberOfValidPoints = NumericTraits<SizeValueType>::Zero;
-  for (ThreadIdType i = 0; i < this->GetNumberOfThreadsUsed(); i++)
+  for (ThreadIdType i = 0; i < numThreadsUsed; ++i)
     {
     this->m_CorrelationAssociate->m_NumberOfValidPoints += this->m_GetValueAndDerivativePerThreadVariables[i].NumberOfValidPoints;
     }
@@ -112,7 +114,7 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader<TDomainPartitioner,
   InternalComputationValueType fm = NumericTraits<InternalComputationValueType>::Zero;
   InternalComputationValueType f2 = NumericTraits<InternalComputationValueType>::Zero;
   InternalComputationValueType m2 = NumericTraits<InternalComputationValueType>::Zero;
-  for (ThreadIdType threadId = 0; threadId < this->GetNumberOfThreadsUsed(); ++threadId)
+  for (ThreadIdType threadId = 0; threadId < numThreadsUsed; ++threadId)
     {
     fm += this->m_CorrelationMetricValueDerivativePerThreadVariables[threadId].fm;
     m2 += this->m_CorrelationMetricValueDerivativePerThreadVariables[threadId].m2;
@@ -140,7 +142,7 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader<TDomainPartitioner,
 
     const InternalComputationValueType fc = static_cast<InternalComputationValueType>( 2.0 );
 
-    for (ThreadIdType i = 0; i < this->GetNumberOfThreadsUsed(); i++)
+    for (ThreadIdType i = 0; i < numThreadsUsed; ++i)
       {
       fdm += this->m_CorrelationMetricValueDerivativePerThreadVariables[i].fdm;
       mdm += this->m_CorrelationMetricValueDerivativePerThreadVariables[i].mdm;
@@ -265,7 +267,7 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader<TDomainPartitioner,
                 const MovingImageGradientType &    movingImageGradient,
                 MeasureType &                      itkNotUsed(metricValueReturn),
                 DerivativeType &                   itkNotUsed(localDerivativeReturn),
-                const ThreadIdType                 threadID) const
+                const ThreadIdType                 threadId) const
 {
 
   /*
@@ -278,7 +280,7 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader<TDomainPartitioner,
   const InternalComputationValueType & f1 = fixedImageValue - this->m_CorrelationAssociate->m_AverageFix;
   const InternalComputationValueType & m1 = movingImageValue - this->m_CorrelationAssociate->m_AverageMov;
 
-  AlignedCorrelationMetricValueDerivativePerThreadStruct & cumsum = this->m_CorrelationMetricValueDerivativePerThreadVariables[threadID];
+  AlignedCorrelationMetricValueDerivativePerThreadStruct & cumsum = this->m_CorrelationMetricValueDerivativePerThreadVariables[threadId];
   cumsum.f += f1;
   cumsum.m += m1;
   cumsum.f2 += f1 * f1;
@@ -289,10 +291,14 @@ CorrelationImageToImageMetricv4GetValueAndDerivativeThreader<TDomainPartitioner,
     {
     /* Use a pre-allocated jacobian object for efficiency */
     typedef typename TImageToImageMetric::JacobianType & JacobianReferenceType;
-    JacobianReferenceType jacobian = this->m_GetValueAndDerivativePerThreadVariables[threadID].MovingTransformJacobian;
+    JacobianReferenceType jacobian = this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobian;
+    JacobianReferenceType jacobianPositional = this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobianPositional;
 
     /** For dense transforms, this returns identity */
-    this->m_CorrelationAssociate->GetMovingTransform()->ComputeJacobianWithRespectToParameters(virtualPoint, jacobian);
+    this->m_CorrelationAssociate->GetMovingTransform()->
+      ComputeJacobianWithRespectToParametersCachedTemporaries(virtualPoint,
+                                                              jacobian,
+                                                              jacobianPositional);
 
     for (unsigned int par = 0; par < this->m_CorrelationAssociate->GetNumberOfLocalParameters(); par++)
       {
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx
index c406321..1ce3d7e 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.hxx
@@ -25,10 +25,10 @@ namespace itk
 
 template<typename TDomainPartitioner, typename TImageToImageMetric, typename TCorrelationMetric>
 CorrelationImageToImageMetricv4HelperThreader< TDomainPartitioner, TImageToImageMetric, TCorrelationMetric>
-::CorrelationImageToImageMetricv4HelperThreader():
-  m_CorrelationMetricPerThreadVariables( NULL )
-{
-}
+::CorrelationImageToImageMetricv4HelperThreader() :
+  m_CorrelationMetricPerThreadVariables( ITK_NULLPTR ),
+  m_CorrelationAssociate( ITK_NULLPTR )
+{}
 
 
 template<typename TDomainPartitioner, typename TImageToImageMetric, typename TCorrelationMetric>
@@ -49,12 +49,13 @@ CorrelationImageToImageMetricv4HelperThreader< TDomainPartitioner, TImageToImage
   /* Store the casted pointer to avoid dynamic casting in tight loops. */
   this->m_CorrelationAssociate = dynamic_cast<TCorrelationMetric *>(this->m_Associate);
 
+  const ThreadIdType numThreadsUsed = this->GetNumberOfThreadsUsed();
   delete[] this->m_CorrelationMetricPerThreadVariables;
-  this->m_CorrelationMetricPerThreadVariables = new AlignedCorrelationMetricPerThreadStruct[ this->GetNumberOfThreadsUsed() ];
+  this->m_CorrelationMetricPerThreadVariables = new AlignedCorrelationMetricPerThreadStruct[ numThreadsUsed ];
 
     //---------------------------------------------------------------
     // Set initial values.
-  for (ThreadIdType i = 0; i < this->GetNumberOfThreadsUsed(); i++)
+  for (ThreadIdType i = 0; i < numThreadsUsed; ++i)
     {
     this->m_CorrelationMetricPerThreadVariables[i].FixSum = NumericTraits<InternalComputationValueType>::Zero;
     this->m_CorrelationMetricPerThreadVariables[i].MovSum = NumericTraits<InternalComputationValueType>::Zero;
@@ -72,7 +73,9 @@ CorrelationImageToImageMetricv4HelperThreader<TDomainPartitioner,
    * m_NumberOfValidPoints by collecting the valid points per thread. */
   this->m_CorrelationAssociate->m_NumberOfValidPoints = NumericTraits<SizeValueType>::Zero;
 
-  for (ThreadIdType i = 0; i < this->GetNumberOfThreadsUsed(); i++)
+  const ThreadIdType numThreadsUsed = this->GetNumberOfThreadsUsed();
+
+  for (ThreadIdType i = 0; i < numThreadsUsed; ++i)
     {
     this->m_CorrelationAssociate->m_NumberOfValidPoints += this->m_GetValueAndDerivativePerThreadVariables[i].NumberOfValidPoints;
     }
@@ -86,7 +89,7 @@ CorrelationImageToImageMetricv4HelperThreader<TDomainPartitioner,
   InternalComputationValueType sumF = NumericTraits<InternalComputationValueType>::Zero;
   InternalComputationValueType sumM = NumericTraits<InternalComputationValueType>::Zero;
 
-  for (ThreadIdType threadId = 0; threadId < this->GetNumberOfThreadsUsed(); ++threadId)
+  for (ThreadIdType threadId = 0; threadId < numThreadsUsed; ++threadId)
     {
     sumF += this->m_CorrelationMetricPerThreadVariables[threadId].FixSum;
     sumM += this->m_CorrelationMetricPerThreadVariables[threadId].MovSum;
@@ -100,7 +103,7 @@ template<typename TDomainPartitioner, typename TImageToImageMetric, typename TCo
 bool
 CorrelationImageToImageMetricv4HelperThreader<TDomainPartitioner,
 TImageToImageMetric, TCorrelationMetric>
-::ProcessVirtualPoint( const VirtualIndexType & itkNotUsed(virtualIndex), const VirtualPointType & virtualPoint, const ThreadIdType threadID )
+::ProcessVirtualPoint( const VirtualIndexType & itkNotUsed(virtualIndex), const VirtualPointType & virtualPoint, const ThreadIdType threadId )
 {
   FixedImagePointType         mappedFixedPoint;
   FixedImagePixelType         mappedFixedPixelValue;
@@ -148,8 +151,8 @@ TImageToImageMetric, TCorrelationMetric>
   /* Do the specific calculations for values */
   try
     {
-    this->m_CorrelationMetricPerThreadVariables[threadID].FixSum += mappedFixedPixelValue;
-    this->m_CorrelationMetricPerThreadVariables[threadID].MovSum += mappedMovingPixelValue;
+    this->m_CorrelationMetricPerThreadVariables[threadId].FixSum += mappedFixedPixelValue;
+    this->m_CorrelationMetricPerThreadVariables[threadId].MovSum += mappedMovingPixelValue;
     }
   catch( ExceptionObject & exc )
     {
@@ -160,7 +163,7 @@ TImageToImageMetric, TCorrelationMetric>
     }
   if( pointIsValid )
     {
-    this->m_GetValueAndDerivativePerThreadVariables[threadID].NumberOfValidPoints++;
+    this->m_GetValueAndDerivativePerThreadVariables[threadId].NumberOfValidPoints++;
     }
 
   return pointIsValid;
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h
index 57e8ac6..471b505 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h
@@ -64,7 +64,9 @@ public:
   typedef typename Superclass::ImageDimensionType           ImageDimensionType;
 
 protected:
-  DemonsImageToImageMetricv4GetValueAndDerivativeThreader() {}
+  DemonsImageToImageMetricv4GetValueAndDerivativeThreader() :
+    m_DemonsAssociate(ITK_NULLPTR)
+  {}
 
   /** Overload.
    *  Get pointer to metric object.
@@ -85,7 +87,7 @@ protected:
         const MovingImageGradientType &   mappedMovingImageGradient,
         MeasureType &                     metricValueReturn,
         DerivativeType &                  localDerivativeReturn,
-        const ThreadIdType                threadID ) const;
+        const ThreadIdType                threadId ) const;
 
 private:
   DemonsImageToImageMetricv4GetValueAndDerivativeThreader( const Self & ); // purposely not implemented
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx
index dcba9dc..8f0fab3 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.hxx
@@ -31,7 +31,7 @@ DemonsImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TIm
 
   /* Store the casted pointer to avoid dynamic casting in tight loops. */
   this->m_DemonsAssociate = dynamic_cast<TDemonsMetric*>( this->m_Associate );
-  if( this->m_DemonsAssociate == NULL )
+  if( this->m_DemonsAssociate == ITK_NULLPTR )
     {
     itkExceptionMacro("Dynamic casting of associate pointer failed.");
     }
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.h
index db89619..444cfd2 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.h
@@ -38,15 +38,17 @@ namespace itk
  *
  * \ingroup ITKMetricsv4
  */
-template<typename TFixedPointSet, typename TMovingPointSet = TFixedPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet = TFixedPointSet,
+  class TInternalComputationValueType = double>
 class EuclideanDistancePointSetToPointSetMetricv4:
-  public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+  public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 {
 public:
 
   /** Standard class typedefs. */
   typedef EuclideanDistancePointSetToPointSetMetricv4                  Self;
-  typedef PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>  Superclass;
+  typedef PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet,
+    TInternalComputationValueType>                                     Superclass;
   typedef SmartPointer<Self>                                           Pointer;
   typedef SmartPointer<const Self>                                     ConstPointer;
 
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.hxx
index cc19c99..0770f16 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkEuclideanDistancePointSetToPointSetMetricv4.hxx
@@ -24,23 +24,23 @@ namespace itk
 {
 
 /** Constructor */
-template<typename TFixedPointSet, typename TMovingPointSet>
-EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::EuclideanDistancePointSetToPointSetMetricv4()
 {
 }
 
 /** Destructor */
-template<typename TFixedPointSet, typename TMovingPointSet>
-EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::~EuclideanDistancePointSetToPointSetMetricv4()
 {
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
-typename EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+typename EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::MeasureType
-EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetLocalNeighborhoodValue( const PointType & point, const PixelType & itkNotUsed( pixel ) ) const
 {
   PointType closestPoint;
@@ -53,9 +53,9 @@ EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
   return distance;
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetLocalNeighborhoodValueAndDerivative( const PointType & point,
   MeasureType &measure, LocalDerivativeType & localDerivative, const PixelType & itkNotUsed( pixel ) ) const
 {
@@ -70,9 +70,9 @@ EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
 }
 
 /** PrintSelf method */
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+EuclideanDistancePointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::PrintSelf( std::ostream & os, Indent indent ) const
 {
   Superclass::PrintSelf( os, indent );
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h
index 564067e..d17d800 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.h
@@ -40,15 +40,17 @@ namespace itk
  *
  * \ingroup ITKMetricsv4
  */
-template<typename TFixedPointSet, typename TMovingPointSet = TFixedPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet = TFixedPointSet,
+  class TInternalComputationValueType = double>
 class ExpectationBasedPointSetToPointSetMetricv4:
-  public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+  public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 {
 public:
 
   /** Standard class typedefs. */
   typedef ExpectationBasedPointSetToPointSetMetricv4                   Self;
-  typedef PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>  Superclass;
+  typedef PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet,
+    TInternalComputationValueType>                                     Superclass;
   typedef SmartPointer<Self>                                           Pointer;
   typedef SmartPointer<const Self>                                     ConstPointer;
 
@@ -105,7 +107,7 @@ public:
 
   /** Clone method will clone the existing instance of this type,
    *  including its internal member variables. */
-  virtual ::itk::LightObject::Pointer Clone( void ) const;
+  virtual typename LightObject::Pointer InternalClone() const;
 
 protected:
   ExpectationBasedPointSetToPointSetMetricv4();
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.hxx
index a7e84db..e123012 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkExpectationBasedPointSetToPointSetMetricv4.hxx
@@ -24,24 +24,26 @@
 namespace itk {
 
 /** Constructor */
-template<typename TFixedPointSet, typename TMovingPointSet>
-ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::ExpectationBasedPointSetToPointSetMetricv4() :
   m_PointSetSigma( 1.0 ),
+  m_PreFactor( 0.0 ),
+  m_Denominator( 0.0 ),
   m_EvaluationKNeighborhood( 50 )
 {
 }
 
 /** Destructor */
-template<typename TFixedPointSet, typename TMovingPointSet>
-ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::~ExpectationBasedPointSetToPointSetMetricv4()
 {
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::Initialize( void ) throw ( ExceptionObject )
 {
   Superclass::Initialize();
@@ -50,14 +52,14 @@ ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
     {
     itkExceptionMacro("m_PointSetSigma is too small. <= epsilon");
     }
-  this->m_PreFactor = 1.0 / ( vcl_sqrt( 2 * vnl_math::pi ) * this->m_PointSetSigma );
+  this->m_PreFactor = 1.0 / ( std::sqrt( 2 * vnl_math::pi ) * this->m_PointSetSigma );
   this->m_Denominator = 2.0 * vnl_math_sqr( this->m_PointSetSigma );
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
-typename ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+typename ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::MeasureType
-ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetLocalNeighborhoodValue( const PointType & point, const PixelType & itkNotUsed( pixel ) ) const
 {
   MeasureType localValue = NumericTraits<MeasureType>::Zero;
@@ -69,15 +71,15 @@ ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
     {
     PointType neighbor = this->m_MovingTransformedPointSet->GetPoint( *it );
     const MeasureType distance = point.SquaredEuclideanDistanceTo( neighbor );
-    localValue -= this->m_PreFactor * vcl_exp( -distance / this->m_Denominator );
+    localValue -= this->m_PreFactor * std::exp( -distance / this->m_Denominator );
     }
 
   return localValue;
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetLocalNeighborhoodValueAndDerivative( const PointType & point,
   MeasureType &measure, LocalDerivativeType &localDerivative, const PixelType & itkNotUsed( pixel ) ) const
 {
@@ -100,11 +102,11 @@ ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
     {
     PointType neighbor = this->m_MovingTransformedPointSet->GetPoint( *it );
     const MeasureType distance = point.SquaredEuclideanDistanceTo( neighbor );
-    measureValues[it - neighborhood.begin()] = -this->m_PreFactor * vcl_exp( -distance / this->m_Denominator );
+    measureValues[it - neighborhood.begin()] = -this->m_PreFactor * std::exp( -distance / this->m_Denominator );
     measure += measureValues[it - neighborhood.begin()];
     }
 
-  if ( vcl_fabs(measure) <= NumericTraits<MeasureType>::epsilon() )
+  if ( std::fabs(measure) <= NumericTraits<MeasureType>::epsilon() )
     {
     return;
     }
@@ -118,7 +120,7 @@ ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
 
   const MeasureType distance = point.SquaredEuclideanDistanceTo( weightedPoint );
 
-  const MeasureType weight = this->m_PreFactor * vcl_exp( -distance / this->m_Denominator ) / -measure;
+  const MeasureType weight = this->m_PreFactor * std::exp( -distance / this->m_Denominator ) / -measure;
 
   VectorType force = ( weightedPoint - point ) * weight;
 
@@ -128,27 +130,23 @@ ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
     }
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
-::itk::LightObject::Pointer
-ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
-::Clone( void ) const
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+typename LightObject::Pointer
+ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
+::InternalClone( void ) const
 {
-  ::itk::LightObject::Pointer smartPtr;
-  Pointer copyPtr = Self::New();
+  typename Self::Pointer rval = Self::New();
+  rval->SetMovingPointSet( this->m_MovingPointSet );
+  rval->SetFixedPointSet( this->m_FixedPointSet );
+  rval->SetPointSetSigma( this->m_PointSetSigma );
+  rval->SetEvaluationKNeighborhood( this->m_EvaluationKNeighborhood );
 
-  copyPtr->m_MovingPointSet = this->m_MovingPointSet;
-  copyPtr->m_FixedPointSet = this->m_FixedPointSet;
-  copyPtr->m_PointSetSigma = this->m_PointSetSigma;
-  copyPtr->m_EvaluationKNeighborhood = this->m_EvaluationKNeighborhood;
-
-  smartPtr = static_cast<Pointer>( copyPtr );
-
-  return smartPtr;
+  return rval.GetPointer();
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+ExpectationBasedPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::PrintSelf( std::ostream& os, Indent indent ) const
 {
   Superclass::PrintSelf( os, indent );
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx
index a18759f..8a6069d 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.hxx
@@ -74,7 +74,7 @@ ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage, TInternalComputat
   this->m_NumberOfSkippedFixedSampledPoints = 0;
 
   this->m_Value = NumericTraits<MeasureType>::max();
-  this->m_DerivativeResult = NULL;
+  this->m_DerivativeResult = ITK_NULLPTR;
   this->m_ComputeDerivative = false;
 }
 
@@ -161,13 +161,13 @@ ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage, TInternalComputat
   if( ! this->m_UseFixedImageGradientFilter )
     {
     itkDebugMacro("Initialize FixedImageGradientCalculator");
-    this->m_FixedImageGradientImage = NULL;
+    this->m_FixedImageGradientImage = ITK_NULLPTR;
     this->m_FixedImageGradientCalculator->SetInputImage(this->m_FixedImage);
     }
   if( ! this->m_UseMovingImageGradientFilter )
     {
     itkDebugMacro("Initialize MovingImageGradientCalculator");
-    this->m_MovingImageGradientImage = NULL;
+    this->m_MovingImageGradientImage = ITK_NULLPTR;
     this->m_MovingImageGradientCalculator->SetInputImage(this->m_MovingImage);
     }
 
@@ -599,54 +599,13 @@ ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage, TInternalComputat
      << indent << "UseFloatingPointCorrection: " << this->GetUseFloatingPointCorrection() << std::endl
      << indent << "FloatingPointCorrectionResolution: " << this->GetFloatingPointCorrectionResolution() << std::endl;
 
-  if( this->GetFixedImage() != NULL )
-    {
-    os << indent << "FixedImage: " << this->GetFixedImage() << std::endl;
-    }
-  else
-    {
-    os << indent << "FixedImage is NULL." << std::endl;
-    }
-  if( this->GetMovingImage() != NULL )
-    {
-    os << indent << "MovingImage: " << this->GetMovingImage() << std::endl;
-    }
-  else
-    {
-    os << indent << "MovingImage is NULL." << std::endl;
-    }
-  if( this->GetFixedTransform() != NULL )
-    {
-    os << indent << "FixedTransform: " << this->GetFixedTransform() << std::endl;
-    }
-  else
-    {
-    os << indent << "FixedTransform is NULL." << std::endl;
-    }
-  if( this->GetMovingTransform() != NULL )
-    {
-    os << indent << "MovingTransform: " << this->GetMovingTransform() << std::endl;
-    }
-  else
-    {
-    os << indent << "MovingTransform is NULL." << std::endl;
-    }
-  if( this->GetFixedImageMask() != NULL )
-    {
-    os << indent << "FixedImageMask: " << this->GetFixedImageMask() << std::endl;
-    }
-  else
-    {
-    os << indent << "FixedImageMask is NULL." << std::endl;
-    }
-  if( this->GetMovingImageMask() != NULL )
-    {
-    os << indent << "MovingImageMask: " << this->GetMovingImageMask() << std::endl;
-    }
-  else
-    {
-    os << indent << "MovingImageMask is NULL." << std::endl;
-    }
+  itkPrintSelfObjectMacro( FixedImage );
+  itkPrintSelfObjectMacro( MovingImage );
+  itkPrintSelfObjectMacro( FixedTransform );
+  itkPrintSelfObjectMacro( MovingTransform );
+  itkPrintSelfObjectMacro( FixedImageMask );
+  itkPrintSelfObjectMacro( MovingImageMask );
+
 }
 
 }//namespace itk
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx
index bc6ad9d..3534e9f 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.hxx
@@ -30,14 +30,12 @@ ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitione
 ::ThreadedExecution ( const DomainType & imageSubRegion,
                       const ThreadIdType threadId )
 {
-  VirtualPointType virtualPoint;
-  VirtualIndexType virtualIndex;
   typename VirtualImageType::ConstPointer virtualImage = this->m_Associate->GetVirtualImage();
   typedef ImageRegionConstIteratorWithIndex< VirtualImageType > IteratorType;
-  IteratorType it( virtualImage, imageSubRegion );
-  for( it.GoToBegin(); !it.IsAtEnd(); ++it )
+  VirtualPointType virtualPoint;
+  for( IteratorType it( virtualImage, imageSubRegion ); !it.IsAtEnd(); ++it )
     {
-    virtualIndex = it.GetIndex();
+    const VirtualIndexType & virtualIndex = it.GetIndex();
     virtualImage->TransformIndexToPhysicalPoint( virtualIndex, virtualPoint );
     this->ProcessVirtualPoint( virtualIndex, virtualPoint, threadId );
     }
@@ -49,16 +47,15 @@ ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerParti
 ::ThreadedExecution ( const DomainType & indexSubRange,
                       const ThreadIdType threadId )
 {
-  VirtualPointType virtualPoint;
-  VirtualIndexType virtualIndex;
-  typename VirtualImageType::ConstPointer virtualImage = this->m_Associate->GetVirtualImage();
   typename TImageToImageMetricv4::VirtualPointSetType::ConstPointer virtualSampledPointSet = this->m_Associate->GetVirtualSampledPointSet();
   typedef typename TImageToImageMetricv4::VirtualPointSetType::MeshTraits::PointIdentifier ElementIdentifierType;
   const ElementIdentifierType begin = indexSubRange[0];
   const ElementIdentifierType end   = indexSubRange[1];
+  VirtualIndexType virtualIndex;
+  typename VirtualImageType::ConstPointer virtualImage = this->m_Associate->GetVirtualImage();
   for( ElementIdentifierType i = begin; i <= end; ++i )
     {
-    virtualPoint = virtualSampledPointSet->GetPoint( i );
+    const VirtualPointType & virtualPoint = virtualSampledPointSet->GetPoint( i );
     virtualImage->TransformPhysicalPointToIndex( virtualPoint, virtualIndex );
     this->ProcessVirtualPoint( virtualIndex, virtualPoint, threadId );
     }
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h
index fbea2e6..f5ce909 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h
@@ -138,7 +138,7 @@ protected:
    * Results must be returned by derived classes in:
    *   \param metricValueReturn
    *   \param localDerivativeReturn
-   * \param threadID may be used as needed, for example to access any per-thread
+   * \param threadId may be used as needed, for example to access any per-thread
    * data cached during pre-processing by the derived class.
    * \warning  This is called from the threader, and thus must be thread-safe.
    */
@@ -153,14 +153,14 @@ protected:
         const MovingImageGradientType &   mappedMovingImageGradient,
         MeasureType &                     metricValueReturn,
         DerivativeType &                  localDerivativeReturn,
-        const ThreadIdType                threadID ) const = 0;
+        const ThreadIdType                threadId ) const = 0;
 
 
   /** Store derivative result from a single point calculation.
    * \warning If this method is overridden or otherwise not used
    * in a derived class, be sure to *accumulate* results. */
   virtual void StorePointDerivativeResult( const VirtualIndexType & virtualIndex,
-                                           const ThreadIdType threadID );
+                                           const ThreadIdType threadId );
 
   struct GetValueAndDerivativePerThreadStruct
     {
@@ -177,6 +177,7 @@ protected:
     /** Pre-allocated transform jacobian objects, for use as needed by dervied
      * classes for efficiency. */
     JacobianType                 MovingTransformJacobian;
+    JacobianType                 MovingTransformJacobianPositional;
     };
   itkPadStruct( ITK_CACHE_LINE_ALIGNMENT, GetValueAndDerivativePerThreadStruct,
                                             PaddedGetValueAndDerivativePerThreadStruct);
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx
index beb4ea6..eb15587 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.hxx
@@ -27,7 +27,9 @@ namespace itk
 template< typename TDomainPartitioner, typename TImageToImageMetricv4 >
 ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >
 ::ImageToImageMetricv4GetValueAndDerivativeThreaderBase():
-  m_GetValueAndDerivativePerThreadVariables( NULL )
+  m_GetValueAndDerivativePerThreadVariables( ITK_NULLPTR ),
+  m_CachedNumberOfParameters( 0 ),
+  m_CachedNumberOfLocalParameters( 0 )
 {
 }
 
@@ -45,19 +47,27 @@ ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImag
 {
   //---------------------------------------------------------------
   // Resize the per thread memory objects.
+  //-----------------------------------------------------------------
+  // Cache some values
+  this->m_CachedNumberOfParameters      = this->m_Associate->GetNumberOfParameters();
+  this->m_CachedNumberOfLocalParameters = this->m_Associate->GetNumberOfLocalParameters();
 
   /* Per-thread results */
+  const ThreadIdType numThreadsUsed = this->GetNumberOfThreadsUsed();
   delete[] m_GetValueAndDerivativePerThreadVariables;
-  this->m_GetValueAndDerivativePerThreadVariables = new AlignedGetValueAndDerivativePerThreadStruct[ this->GetNumberOfThreadsUsed() ];
+  this->m_GetValueAndDerivativePerThreadVariables = new AlignedGetValueAndDerivativePerThreadStruct[ numThreadsUsed ];
 
   if( this->m_Associate->GetComputeDerivative() )
     {
-    for (ThreadIdType i=0; i<this->GetNumberOfThreadsUsed(); ++i)
+    for (ThreadIdType i = 0; i < numThreadsUsed; ++i)
       {
       /* Allocate intermediary per-thread storage used to get results from
        * derived classes */
-      this->m_GetValueAndDerivativePerThreadVariables[i].LocalDerivatives.SetSize( this->m_Associate->GetNumberOfLocalParameters() );
-      this->m_GetValueAndDerivativePerThreadVariables[i].MovingTransformJacobian.SetSize( this->m_Associate->VirtualImageDimension, this->m_Associate->GetNumberOfLocalParameters() );
+      this->m_GetValueAndDerivativePerThreadVariables[i].LocalDerivatives.SetSize( this->m_CachedNumberOfLocalParameters );
+      this->m_GetValueAndDerivativePerThreadVariables[i].MovingTransformJacobian.SetSize(
+        this->m_Associate->VirtualImageDimension, this->m_CachedNumberOfLocalParameters );
+      this->m_GetValueAndDerivativePerThreadVariables[i].MovingTransformJacobianPositional.SetSize(
+        this->m_Associate->VirtualImageDimension, this->m_Associate->VirtualImageDimension );
       if ( this->m_Associate->m_MovingTransform->GetTransformCategory() == MovingTransformType::DisplacementField )
         {
         /* For transforms with local support, e.g. displacement field,
@@ -73,7 +83,7 @@ ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImag
         {
         itkDebugMacro("ImageToImageMetricv4::Initialize: transform does NOT have local support\n");
         /* This size always comes from the moving image */
-        const NumberOfParametersType globalDerivativeSize = this->m_Associate->GetNumberOfParameters();
+        const NumberOfParametersType globalDerivativeSize = this->m_CachedNumberOfParameters;
         /* Global transforms get a separate derivatives container for each thread
          * that holds the result over a particular image region.
          * Use a CompensatedSummation value to provide for better consistency between
@@ -85,7 +95,7 @@ ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImag
 
   //---------------------------------------------------------------
   // Set initial values.
-  for (ThreadIdType thread = 0; thread<this->GetNumberOfThreadsUsed(); thread++)
+  for (ThreadIdType thread = 0; thread < numThreadsUsed; ++thread)
     {
     this->m_GetValueAndDerivativePerThreadVariables[thread].NumberOfValidPoints = NumericTraits< SizeValueType >::Zero;
     this->m_GetValueAndDerivativePerThreadVariables[thread].Measure = NumericTraits< InternalComputationValueType >::Zero;
@@ -96,18 +106,13 @@ ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImag
         /* Be sure to init to 0 here, because the threader may not use
          * all the threads if the region is better split into fewer
          * subregions. */
-        for( NumberOfParametersType p = 0; p < this->m_Associate->GetNumberOfParameters(); p++ )
+        for( NumberOfParametersType p = 0; p < this->m_CachedNumberOfParameters; p++ )
           {
           this->m_GetValueAndDerivativePerThreadVariables[thread].CompensatedDerivatives[p].ResetToZero();
           }
         }
       }
     }
-
-  //-----------------------------------------------------------------
-  // Cache some values
- this->m_CachedNumberOfParameters      = this->m_Associate->GetNumberOfParameters();
- this->m_CachedNumberOfLocalParameters = this->m_Associate->GetNumberOfLocalParameters();
 }
 
 template< typename TDomainPartitioner, typename TImageToImageMetricv4 >
@@ -115,10 +120,11 @@ void
 ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImageToImageMetricv4 >
 ::AfterThreadedExecution()
 {
+  const ThreadIdType numThreadsUsed = this->GetNumberOfThreadsUsed();
   /* Store the number of valid points the enclosing class \c
    * m_NumberOfValidPoints by collecting the valid points per thread. */
   this->m_Associate->m_NumberOfValidPoints = NumericTraits< SizeValueType >::Zero;
-  for (ThreadIdType i=0; i<this->GetNumberOfThreadsUsed(); i++)
+  for (ThreadIdType i = 0; i < numThreadsUsed; ++i)
     {
     this->m_Associate->m_NumberOfValidPoints += this->m_GetValueAndDerivativePerThreadVariables[i].NumberOfValidPoints;
     }
@@ -134,7 +140,7 @@ ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImag
         /* Use a compensated sum to be ready for when there is a very large number of threads */
         CompensatedDerivativeValueType sum;
         sum.ResetToZero();
-        for (ThreadIdType i=0; i<this->GetNumberOfThreadsUsed(); i++)
+        for (ThreadIdType i=0; i<numThreadsUsed; i++)
           {
           sum += this->m_GetValueAndDerivativePerThreadVariables[i].CompensatedDerivatives[p].GetSum();
           }
@@ -150,7 +156,7 @@ ImageToImageMetricv4GetValueAndDerivativeThreaderBase< TDomainPartitioner, TImag
     {
     this->m_Associate->m_Value = NumericTraits<MeasureType>::Zero;
     /* Accumulate the metric value from threads and store the average. */
-    for(ThreadIdType threadId = 0; threadId < this->GetNumberOfThreadsUsed(); ++threadId )
+    for(ThreadIdType threadId = 0; threadId < numThreadsUsed; ++threadId )
       {
       this->m_Associate->m_Value += this->m_GetValueAndDerivativePerThreadVariables[threadId].Measure;
       }
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h
index ce96296..f480723 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.h
@@ -67,14 +67,15 @@ namespace itk {
  * \ingroup ITKMetricsv4
  */
 
-template<typename TPointSet>
+template<typename TPointSet, class TInternalComputationValueType = double>
 class JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4 :
-    public PointSetToPointSetMetricv4<TPointSet, TPointSet>
+    public PointSetToPointSetMetricv4<TPointSet, TPointSet, TInternalComputationValueType>
 {
 public:
   /** Standard class typedefs. */
   typedef JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4 Self;
-  typedef PointSetToPointSetMetricv4<TPointSet, TPointSet>     Superclass;
+  typedef PointSetToPointSetMetricv4<TPointSet, TPointSet,
+    TInternalComputationValueType>                             Superclass;
   typedef SmartPointer<Self>                                   Pointer;
   typedef SmartPointer<const Self>                             ConstPointer;
 
@@ -202,21 +203,22 @@ public:
   /** Get the noise kernel sigma for the anistropic covariances. */
   itkGetConstMacro( KernelSigma, RealType );
 
-  virtual MeasureType GetLocalNeighborhoodValue( const PointType & point, const PixelType & pixel = 0 ) const;
+  virtual MeasureType GetLocalNeighborhoodValue( const PointType & point,
+    const PixelType & pixel = 0 ) const;
 
-  virtual void GetLocalNeighborhoodValueAndDerivative( const PointType &, MeasureType &, LocalDerivativeType &, const PixelType & pixel = 0 ) const;
+  virtual void GetLocalNeighborhoodValueAndDerivative( const PointType &, MeasureType &,
+    LocalDerivativeType &, const PixelType & pixel = 0 ) const;
 
   /** Clone method will clone the existing instance of this type,
    *  including its internal member variables. */
-  virtual ::itk::LightObject::Pointer Clone( void ) const;
+  virtual typename LightObject::Pointer InternalClone() const;
 
 protected:
   JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4();
   ~JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4();
 
-  virtual void InitializeForIteration( void ) const;
-
-  void ComputeValueAndDerivative( const PointType & samplePoint, MeasureType &value, LocalDerivativeType &derivativeReturn, bool calcValue, bool calcDerivative ) const;
+  void ComputeValueAndDerivative( const PointType & samplePoint, MeasureType & value,
+    LocalDerivativeType &derivativeReturn, bool calcValue, bool calcDerivative ) const;
 
   void PrintSelf( std::ostream& os, Indent indent ) const;
 
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx
index ce11345..c45f103 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx
@@ -23,29 +23,32 @@
 namespace itk {
 
 /** Constructor */
-template<typename TPointSet>
-JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
+template<typename TPointSet, class TInternalComputationValueType>
+JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet, TInternalComputationValueType>
 ::JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4() :
   m_UseAnisotropicCovariances( false ),
   m_PointSetSigma( static_cast<RealType>( 1.0 ) ),
   m_KernelSigma( static_cast<RealType>( 10.0 ) ),
   m_CovarianceKNeighborhood( static_cast<unsigned int>( 5 ) ),
   m_EvaluationKNeighborhood( static_cast<unsigned int>( 50 ) ),
-  m_Alpha( static_cast<RealType>(1.0) )
+  m_Alpha( static_cast<RealType>(1.0) ),
+  m_TotalNumberOfPoints(0),
+  m_Prefactor0(0.0),
+  m_Prefactor1(0.0)
 {
 }
 
 /** Destructor */
-template<typename TPointSet>
-JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
+template<typename TPointSet, class TInternalComputationValueType>
+JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet, TInternalComputationValueType>
 ::~JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4()
 {
 }
 
 /** Initialize the metric */
-template<typename TPointSet>
+template<typename TPointSet, class TInternalComputationValueType>
 void
-JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
+JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet, TInternalComputationValueType>
 ::Initialize( void ) throw ( ExceptionObject )
 {
   Superclass::Initialize();
@@ -55,41 +58,20 @@ JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
   this->m_FixedDensityFunction->SetKernelSigma( this->m_KernelSigma );
   this->m_FixedDensityFunction->SetRegularizationSigma( this->m_PointSetSigma );
   this->m_FixedDensityFunction->SetNormalize( true );
-
   this->m_FixedDensityFunction->SetUseAnisotropicCovariances( this->m_UseAnisotropicCovariances );
-
   this->m_FixedDensityFunction->SetCovarianceKNeighborhood( this->m_CovarianceKNeighborhood );
-
   this->m_FixedDensityFunction->SetEvaluationKNeighborhood( this->m_EvaluationKNeighborhood );
-
   this->m_FixedDensityFunction->SetInputPointSet( this->m_FixedTransformedPointSet );
 
   // Initialize the moving density function
   this->m_MovingDensityFunction = DensityFunctionType::New();
   this->m_MovingDensityFunction->SetKernelSigma( this->m_KernelSigma );
   this->m_MovingDensityFunction->SetRegularizationSigma( this->m_PointSetSigma );
-
   this->m_MovingDensityFunction->SetNormalize( true );
-
   this->m_MovingDensityFunction->SetUseAnisotropicCovariances( this->m_UseAnisotropicCovariances );
-
   this->m_MovingDensityFunction->SetCovarianceKNeighborhood( this->m_CovarianceKNeighborhood );
-
   this->m_MovingDensityFunction->SetEvaluationKNeighborhood( this->m_EvaluationKNeighborhood );
-
   this->m_MovingDensityFunction->SetInputPointSet( this->m_MovingTransformedPointSet );
-}
-
-template<typename TPointSet>
-void
-JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
-::InitializeForIteration() const
-{
-  Superclass::InitializeForIteration();
-  if( this->m_NumberOfValidPoints == 0 )
-    {
-    itkExceptionMacro("There are no fixed points within the virtual domain.");
-    }
 
   // Pre-calc some values for efficiency
   this->m_TotalNumberOfPoints = static_cast<RealType>( this->m_NumberOfValidPoints + this->m_MovingDensityFunction->GetInputPointSet()->GetNumberOfPoints() );
@@ -101,10 +83,10 @@ JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
   this->m_Prefactor1 = 1.0 / ( this->m_TotalNumberOfPoints * this->m_TotalNumberOfPoints );
 }
 
-template<typename TPointSet>
-typename JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
+template<typename TPointSet, class TInternalComputationValueType>
+typename JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet, TInternalComputationValueType>
 ::MeasureType
-JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
+JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet, TInternalComputationValueType>
 ::GetLocalNeighborhoodValue( const PointType & point, const PixelType & itkNotUsed( pixel ) ) const
 {
   MeasureType value;
@@ -114,19 +96,21 @@ JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
 }
 
 /** Get both the match Measure and the Derivative Measure  */
-template<typename TPointSet>
+template<typename TPointSet, class TInternalComputationValueType>
 void
-JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
+JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet, TInternalComputationValueType>
 ::GetLocalNeighborhoodValueAndDerivative( const PointType & point, MeasureType & value, LocalDerivativeType & derivative, const PixelType & itkNotUsed( pixel ) ) const
 {
   this->ComputeValueAndDerivative( point, value, derivative, true, true );
 }
 
-template<typename TPointSet>
+template<typename TPointSet, class TInternalComputationValueType>
 void
-JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
+JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet, TInternalComputationValueType>
 ::ComputeValueAndDerivative( const PointType & samplePoint, MeasureType & value, LocalDerivativeType & derivativeReturn, bool calcValue, bool calcDerivative ) const
 {
+
+
   if( calcDerivative )
     {
     derivativeReturn.Fill( NumericTraits<DerivativeValueType>::Zero );
@@ -151,18 +135,18 @@ JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
     RealType realOne = NumericTraits<RealType>::One;
     if( this->m_Alpha == realOne )
       {
-      value = ( vcl_log( probabilityStar ) );
+      value = ( std::log( probabilityStar ) );
       }
     else
       {
-      value = -realOne * ( vcl_pow( probabilityStar, static_cast<RealType>( this->m_Alpha - realOne ) ) );
+      value = -realOne * ( std::pow( probabilityStar, static_cast<RealType>( this->m_Alpha - realOne ) ) );
       }
     value *= this->m_Prefactor0;
     }
 
   if( calcDerivative )
     {
-    RealType probabilityStarFactor = vcl_pow( probabilityStar, static_cast<RealType>( 2.0 - this->m_Alpha ) );
+    RealType probabilityStarFactor = std::pow( probabilityStar, static_cast<RealType>( 2.0 - this->m_Alpha ) );
 
     typename DensityFunctionType::NeighborsIdentifierType neighbors;
     this->m_MovingDensityFunction->GetPointsLocator()->FindClosestNPoints( samplePoint, this->m_EvaluationKNeighborhood, neighbors );
@@ -197,37 +181,33 @@ JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
       DerivativeValueType factor = this->m_Prefactor1 * gaussian / probabilityStarFactor;
       for( unsigned int i = 0; i < PointDimension; i++ )
         {
-        derivativeReturn[i] -= diffMean[i] * factor;
+        derivativeReturn[i] += diffMean[i] * factor;
         }
       }
     }
 }
 
-template<typename TPointSet>
-::itk::LightObject::Pointer
-JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
-::Clone() const
+template<typename TPointSet, class TInternalComputationValueType>
+typename LightObject::Pointer
+JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet, TInternalComputationValueType>
+::InternalClone( void ) const
 {
-  ::itk::LightObject::Pointer smartPtr;
-  Pointer copyPtr = Self::New();
-
-  copyPtr->m_MovingPointSet = this->m_MovingPointSet;
-  copyPtr->m_FixedPointSet = this->m_FixedPointSet;
-  copyPtr->m_Alpha = this->m_Alpha;
-  copyPtr->m_PointSetSigma = this->m_PointSetSigma;
-  copyPtr->m_KernelSigma = this->m_KernelSigma;
-  copyPtr->m_CovarianceKNeighborhood = this->m_CovarianceKNeighborhood;
-  copyPtr->m_EvaluationKNeighborhood = this->m_EvaluationKNeighborhood;
-  copyPtr->m_UseAnisotropicCovariances = this->m_UseAnisotropicCovariances;
-
-  smartPtr = static_cast<Pointer>( copyPtr );
-
-  return smartPtr;
+  typename Self::Pointer rval = Self::New();
+  rval->SetMovingPointSet( this->m_MovingPointSet );
+  rval->SetFixedPointSet( this->m_FixedPointSet );
+  rval->SetPointSetSigma( this->m_PointSetSigma );
+  rval->SetEvaluationKNeighborhood( this->m_EvaluationKNeighborhood );
+  rval->SetAlpha( this->m_Alpha );
+  rval->SetKernelSigma( this->m_KernelSigma );
+  rval->SetCovarianceKNeighborhood( this->m_CovarianceKNeighborhood );
+  rval->SetUseAnisotropicCovariances( this->m_UseAnisotropicCovariances );
+
+  return rval.GetPointer();
 }
 
-template<typename TPointSet>
+template<typename TPointSet, class TInternalComputationValueType>
 void
-JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet>
+JensenHavrdaCharvatTsallisPointSetToPointSetMetricv4<TPointSet, TInternalComputationValueType>
 ::PrintSelf( std::ostream& os, Indent indent ) const
 {
   Superclass::PrintSelf( os, indent );
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx
index 10c25e9..9d4543c 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreaderBase.hxx
@@ -28,7 +28,7 @@ namespace itk
 template< typename TDomainPartitioner, typename TJointHistogramMetric >
 JointHistogramMutualInformationComputeJointPDFThreaderBase< TDomainPartitioner, TJointHistogramMetric >
 ::JointHistogramMutualInformationComputeJointPDFThreaderBase():
-  m_JointHistogramMIPerThreadVariables( NULL )
+  m_JointHistogramMIPerThreadVariables( ITK_NULLPTR )
 {
 }
 
@@ -44,9 +44,10 @@ void
 JointHistogramMutualInformationComputeJointPDFThreaderBase< TDomainPartitioner, TJointHistogramMetric >
 ::BeforeThreadedExecution()
 {
+  const ThreadIdType numThreadsUsed = this->GetNumberOfThreadsUsed();
   delete[] this->m_JointHistogramMIPerThreadVariables;
-  this->m_JointHistogramMIPerThreadVariables = new AlignedJointHistogramMIPerThreadStruct[ this->GetNumberOfThreadsUsed() ];
-  for( ThreadIdType i = 0; i < this->GetNumberOfThreadsUsed(); ++i )
+  this->m_JointHistogramMIPerThreadVariables = new AlignedJointHistogramMIPerThreadStruct[ numThreadsUsed ];
+  for( ThreadIdType i = 0; i < numThreadsUsed; ++i )
     {
     if( this->m_JointHistogramMIPerThreadVariables[i].JointHistogram.IsNull() )
       {
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h
index 03714c8..ece59ad 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.h
@@ -60,6 +60,7 @@ public:
   typedef typename Superclass::MeasureType             MeasureType;
   typedef typename Superclass::DerivativeType          DerivativeType;
   typedef typename Superclass::DerivativeValueType     DerivativeValueType;
+  typedef typename Superclass::JacobianType            JacobianType;
 
   typedef TJointHistogramMetric                                             JointHistogramMetricType;
   typedef typename JointHistogramMetricType::InternalComputationValueType   InternalComputationValueType;
@@ -67,7 +68,6 @@ public:
   typedef typename JointHistogramMetricType::MarginalPDFInterpolatorType    MarginalPDFInterpolatorType;
   typedef typename JointHistogramMetricType::JointPDFInterpolatorPointer    JointPDFInterpolatorPointer;
   typedef typename JointHistogramMetricType::MarginalPDFInterpolatorPointer MarginalPDFInterpolatorPointer;
-  typedef typename JointHistogramMetricType::FixedTransformJacobianType     FixedTransformJacobianType;
   typedef typename JointHistogramMetricType::NumberOfParametersType         NumberOfParametersType;
   typedef typename JointHistogramMetricType::JointPDFType                   JointPDFType;
   typedef typename JointHistogramMetricType::MarginalPDFType                MarginalPDFType;
@@ -96,19 +96,19 @@ protected:
         const MovingImageGradientType &   mappedMovingImageGradient,
         MeasureType &                     metricValueReturn,
         DerivativeType &                  localDerivativeReturn,
-        const ThreadIdType                threadID ) const;
+        const ThreadIdType                threadId ) const;
 
   inline InternalComputationValueType ComputeFixedImageMarginalPDFDerivative(
                                         const MarginalPDFPointType & margPDFpoint,
-                                        const ThreadIdType threadID ) const;
+                                        const ThreadIdType threadId ) const;
 
   inline InternalComputationValueType ComputeMovingImageMarginalPDFDerivative(
                                         const MarginalPDFPointType & margPDFpoint,
-                                        const ThreadIdType threadID ) const;
+                                        const ThreadIdType threadId ) const;
 
   inline InternalComputationValueType ComputeJointPDFDerivative(
                                           const JointPDFPointType & jointPDFpoint,
-                                          const ThreadIdType threadID,
+                                          const ThreadIdType threadId,
                                           const SizeValueType ind ) const;
   struct JointHistogramMIPerThreadStruct
     {
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx
index d6b73ae..b9e88e1 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationGetValueAndDerivativeThreader.hxx
@@ -25,10 +25,10 @@ namespace itk
 
 template< typename TDomainPartitioner, typename TImageToImageMetric, typename TJointHistogramMetric >
 JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TJointHistogramMetric >
-::JointHistogramMutualInformationGetValueAndDerivativeThreader():
-  m_JointHistogramMIPerThreadVariables( NULL )
-{
-}
+::JointHistogramMutualInformationGetValueAndDerivativeThreader() :
+  m_JointHistogramMIPerThreadVariables( ITK_NULLPTR ),
+  m_JointAssociate( ITK_NULLPTR )
+{}
 
 
 template< typename TDomainPartitioner, typename TImageToImageMetric, typename TJointHistogramMetric >
@@ -48,15 +48,16 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner
 
   /* Store the casted pointer to avoid dynamic casting in tight loops. */
   this->m_JointAssociate = dynamic_cast< TJointHistogramMetric * >( this->m_Associate );
-  if( this->m_JointAssociate == NULL )
+  if( this->m_JointAssociate == ITK_NULLPTR )
     {
     itkExceptionMacro("Dynamic casting of associate pointer failed.");
     }
 
+  const ThreadIdType numThreadsUsed = this->GetNumberOfThreadsUsed();
   delete[] this->m_JointHistogramMIPerThreadVariables;
-  this->m_JointHistogramMIPerThreadVariables = new AlignedJointHistogramMIPerThreadStruct[ this->GetNumberOfThreadsUsed() ];
+  this->m_JointHistogramMIPerThreadVariables = new AlignedJointHistogramMIPerThreadStruct[ numThreadsUsed ];
 
-  for( ThreadIdType i = 0; i < this->GetNumberOfThreadsUsed(); ++i )
+  for( ThreadIdType i = 0; i < numThreadsUsed; ++i )
     {
     if( this->m_JointHistogramMIPerThreadVariables[i].JointPDFInterpolator.IsNull() )
       {
@@ -141,7 +142,7 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner
   if( jointPDFValue > eps &&  movingImagePDFValue > eps )
     {
     const InternalComputationValueType pRatio =
-                            vcl_log(jointPDFValue)-vcl_log(movingImagePDFValue);
+                            std::log(jointPDFValue)-std::log(movingImagePDFValue);
     const InternalComputationValueType & term1 = dJPDF*pRatio;
     const InternalComputationValueType & term2 = this->m_JointAssociate->m_Log2 * dMmPDF * jointPDFValue / movingImagePDFValue;
     scalingfactor =  ( term2 - term1 );
@@ -152,11 +153,15 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner
     }
 
   /* Use a pre-allocated jacobian object for efficiency */
-  FixedTransformJacobianType & jacobian =
-    const_cast< FixedTransformJacobianType &   >(this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobian);
+  typedef JacobianType & JacobianReferenceType;
+  JacobianReferenceType jacobian = this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobian;
+  JacobianReferenceType jacobianPositional = this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobianPositional;
 
   /** For dense transforms, this returns identity */
-  this->m_JointAssociate->m_MovingTransform->ComputeJacobianWithRespectToParameters( virtualPoint, jacobian );
+  this->m_JointAssociate->GetMovingTransform()->
+    ComputeJacobianWithRespectToParametersCachedTemporaries(virtualPoint,
+                                                            jacobian,
+                                                            jacobianPositional);
 
   for ( NumberOfParametersType par = 0; par < this->GetCachedNumberOfLocalParameters(); par++ )
     {
@@ -174,7 +179,7 @@ template< typename TDomainPartitioner, typename TImageToImageMetric, typename TJ
 typename JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TJointHistogramMetric >::InternalComputationValueType
 JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TJointHistogramMetric >
 ::ComputeFixedImageMarginalPDFDerivative( const MarginalPDFPointType & margPDFpoint,
-                                          const ThreadIdType threadID ) const
+                                          const ThreadIdType threadId ) const
 {
   InternalComputationValueType offset = 0.5*this->m_JointPDFSpacing[0];
   InternalComputationValueType eps = this->m_JointPDFSpacing[0];
@@ -201,8 +206,8 @@ JointHistogramMutualInformationGetValueAndDerivativeThreader< TDomainPartitioner
   InternalComputationValueType delta = rightpoint[0]-leftpoint[0];
   if ( delta > NumericTraits< InternalComputationValueType >::Zero )
     {
-    InternalComputationValueType deriv = this->m_ThreaderFixedImageMarginalPDFInterpolator[threadID]->Evaluate(rightpoint) -
-      this->m_ThreaderFixedImageMarginalPDFInterpolator[threadID]->Evaluate(leftpoint);
+    InternalComputationValueType deriv = this->m_ThreaderFixedImageMarginalPDFInterpolator[threadId]->Evaluate(rightpoint) -
+      this->m_ThreaderFixedImageMarginalPDFInterpolator[threadId]->Evaluate(leftpoint);
     return deriv/delta;
     }
   else
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx
index 33bd82d..29ed2f7 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx
@@ -29,7 +29,8 @@ namespace itk
 
 template <typename TFixedImage, typename TMovingImage, typename TVirtualImage, typename TInternalComputationValueType, typename TMetricTraits>
 JointHistogramMutualInformationImageToImageMetricv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType, TMetricTraits>
-::JointHistogramMutualInformationImageToImageMetricv4()
+::JointHistogramMutualInformationImageToImageMetricv4():
+  m_JointHistogramTotalCount(0)
 {
   // Initialize histogram properties
   this->m_NumberOfHistogramBins = 20;
@@ -41,7 +42,7 @@ JointHistogramMutualInformationImageToImageMetricv4<TFixedImage,TMovingImage,TVi
   this->m_MovingImageBinSize    = NumericTraits< TInternalComputationValueType >::Zero;
   this->m_Padding = 2;
   this->m_JointPDFSum = NumericTraits< TInternalComputationValueType >::Zero;
-  this->m_Log2 = vcl_log(2.0);
+  this->m_Log2 = std::log(2.0);
   this->m_VarianceForJointPDFSmoothing = 1.5;
 
   // We have our own GetValueAndDerivativeThreader's that we want
@@ -70,13 +71,13 @@ JointHistogramMutualInformationImageToImageMetricv4<TFixedImage,TMovingImage,TVi
   /** Get the fixed and moving image true max's and mins.
    *  Initialize them to the PixelType min and max. */
   this->m_FixedImageTrueMin =
-                    vcl_numeric_limits<typename TFixedImage::PixelType>::max();
+                    std::numeric_limits<typename TFixedImage::PixelType>::max();
   this->m_FixedImageTrueMax =
-                    vcl_numeric_limits<typename TFixedImage::PixelType>::min();
+                    std::numeric_limits<typename TFixedImage::PixelType>::min();
   this->m_MovingImageTrueMin =
-                    vcl_numeric_limits<typename TMovingImage::PixelType>::max();
+                    std::numeric_limits<typename TMovingImage::PixelType>::max();
   this->m_MovingImageTrueMax =
-                    vcl_numeric_limits<typename TMovingImage::PixelType>::min();
+                    std::numeric_limits<typename TMovingImage::PixelType>::min();
 
   /** Iterate through the fixed image and set the true
    *  max and min for the fixed image. */
@@ -350,7 +351,7 @@ JointHistogramMutualInformationImageToImageMetricv4<TFixedImage,TMovingImage,TVi
         if (pxy / denom > eps )
           {
           //the classic mi calculation
-          local_mi = pxy * vcl_log( pxy / denom );
+          local_mi = pxy * std::log( pxy / denom );
           }
         }
       total_mi += local_mi;
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h
index 2eb3fd7..1c3b040 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.h
@@ -49,15 +49,17 @@ namespace itk
  *
  * \ingroup ITKMetricsv4
  */
-template<typename TFixedPointSet, typename TMovingPointSet = TFixedPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet = TFixedPointSet,
+  class TInternalComputationValueType = double>
 class LabeledPointSetToPointSetMetricv4:
-  public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+  public PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 {
 public:
 
   /** Standard class typedefs. */
   typedef LabeledPointSetToPointSetMetricv4                            Self;
-  typedef PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>  Superclass;
+  typedef PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet,
+    TInternalComputationValueType>                                     Superclass;
   typedef SmartPointer<Self>                                           Pointer;
   typedef SmartPointer<const Self>                                     ConstPointer;
 
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx
index 7d2dc0e..1516415 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkLabeledPointSetToPointSetMetricv4.hxx
@@ -28,8 +28,8 @@ namespace itk
 {
 
 /** Constructor */
-template<typename TFixedPointSet, typename TMovingPointSet>
-LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::LabeledPointSetToPointSetMetricv4()
 {
   typedef EuclideanDistancePointSetToPointSetMetricv4<FixedPointSetType, MovingPointSetType> DefaultMetricType;
@@ -40,15 +40,15 @@ LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
 }
 
 /** Destructor */
-template<typename TFixedPointSet, typename TMovingPointSet>
-LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::~LabeledPointSetToPointSetMetricv4()
 {
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::Initialize( void ) throw ( ExceptionObject )
 {
   Superclass::Initialize();
@@ -67,6 +67,10 @@ LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
   for( it = this->m_CommonPointSetLabels.begin(); it != this->m_CommonPointSetLabels.end(); ++it )
     {
     typename PointSetMetricType::Pointer metricPtr = dynamic_cast<PointSetMetricType *>( this->m_PointSetMetric->Clone().GetPointer() );
+    if( metricPtr.IsNull() )
+      {
+      itkExceptionMacro( "The metric pointer clone is NULL." );
+      }
 
     FixedPointSetPointer fixedPointSet = this->GetLabeledFixedPointSet( *it );
     MovingPointSetPointer movingPointSet = this->GetLabeledMovingPointSet( *it );
@@ -79,10 +83,10 @@ LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
     }
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
-typename LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+typename LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::MeasureType
-LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetLocalNeighborhoodValue( const PointType & point, const LabelType & label ) const
 {
   typename LabelSetType::const_iterator labelIt = std::find( this->m_CommonPointSetLabels.begin(), this->m_CommonPointSetLabels.end(), label );
@@ -98,9 +102,9 @@ LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
     }
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetLocalNeighborhoodValueAndDerivative( const PointType & point,
   MeasureType &measure, LocalDerivativeType & localDerivative, const LabelType & label ) const
 {
@@ -116,9 +120,9 @@ LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
     }
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
-typename LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>::FixedPointSetPointer
-LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+typename LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>::FixedPointSetPointer
+LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetLabeledFixedPointSet( const LabelType label ) const
 {
   typename FixedPointSetType::Pointer fixedPointSet = FixedPointSetType::New();
@@ -141,9 +145,9 @@ LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
   return fixedPointSet;
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
-typename LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>::MovingPointSetPointer
-LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+typename LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>::MovingPointSetPointer
+LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetLabeledMovingPointSet( const LabelType label ) const
 {
   typename MovingPointSetType::Pointer movingPointSet = MovingPointSetType::New();
@@ -166,9 +170,9 @@ LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
   return movingPointSet;
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::DetermineCommonPointSetLabels()
 {
   this->m_FixedPointSetLabels.clear();
@@ -225,9 +229,9 @@ LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
 }
 
 /** PrintSelf method */
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+LabeledPointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::PrintSelf( std::ostream & os, Indent indent ) const
 {
   Superclass::PrintSelf( os, indent );
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx
index 1de3776..6f5c6f9 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx
@@ -28,7 +28,7 @@ namespace itk
 template <typename TPointSet, typename TOutput, typename TCoordRep>
 ManifoldParzenWindowsPointSetFunction<TPointSet, TOutput, TCoordRep>
 ::ManifoldParzenWindowsPointSetFunction() :
-  m_PointsLocator( NULL ),
+  m_PointsLocator( ITK_NULLPTR ),
   m_CovarianceKNeighborhood( 5 ),
   m_EvaluationKNeighborhood( 50 ),
   m_RegularizationSigma( 1.0 ),
@@ -167,7 +167,7 @@ TOutput
 ManifoldParzenWindowsPointSetFunction<TPointSet, TOutput, TCoordRep>
 ::Evaluate( const InputPointType &point ) const
 {
-  if( this->GetInputPointSet() == NULL )
+  if( this->GetInputPointSet() == ITK_NULLPTR )
     {
     itkExceptionMacro( "The input point set has not been specified." );
     }
@@ -212,7 +212,7 @@ ManifoldParzenWindowsPointSetFunction<TPointSet, TOutput, TCoordRep>
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h
index 7019a59..8638b22 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h
@@ -170,7 +170,7 @@ public:
     {
     if( this->m_ThreaderJointPDF.size() == 0 )
       {
-      return typename JointPDFType::Pointer(NULL);
+      return typename JointPDFType::Pointer(ITK_NULLPTR);
       }
     return this->m_ThreaderJointPDF[0];
     }
@@ -185,7 +185,7 @@ public:
     {
     if( this->m_ThreaderJointPDFDerivatives.size() == 0 )
       {
-      return typename JointPDFDerivativesType::Pointer(NULL);
+      return typename JointPDFDerivativesType::Pointer(ITK_NULLPTR);
       }
     return this->m_ThreaderJointPDFDerivatives[0];
     }
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx
index 49a3456..60cbf7c 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx
@@ -29,13 +29,15 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
   m_NumberOfHistogramBins(50),
   m_MovingImageNormalizedMin(0.0),
   m_FixedImageNormalizedMin(0.0),
+  m_FixedImageTrueMin(0.0),
+  m_FixedImageTrueMax(0.0),
   m_MovingImageTrueMin(0.0),
   m_MovingImageTrueMax(0.0),
   m_FixedImageBinSize(0.0),
   m_MovingImageBinSize(0.0),
 
-  m_CubicBSplineKernel(NULL),
-  m_CubicBSplineDerivativeKernel(NULL),
+  m_CubicBSplineKernel(ITK_NULLPTR),
+  m_CubicBSplineDerivativeKernel(ITK_NULLPTR),
 
   m_PRatioArray(0),
 
@@ -90,10 +92,10 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
    * in computing the range of intensity values.
    */
 
-  this->m_FixedImageTrueMin = vcl_numeric_limits<typename TFixedImage::PixelType>::max();
-  this->m_FixedImageTrueMax = vcl_numeric_limits<typename TFixedImage::PixelType>::min();
-  this->m_MovingImageTrueMin = vcl_numeric_limits<typename TMovingImage::PixelType>::max();
-  this->m_MovingImageTrueMax = vcl_numeric_limits<typename TMovingImage::PixelType>::min();
+  this->m_FixedImageTrueMin = std::numeric_limits<typename TFixedImage::PixelType>::max();
+  this->m_FixedImageTrueMax = std::numeric_limits<typename TFixedImage::PixelType>::min();
+  this->m_MovingImageTrueMin = std::numeric_limits<typename TMovingImage::PixelType>::max();
+  this->m_MovingImageTrueMax = std::numeric_limits<typename TMovingImage::PixelType>::min();
 
   // We need to make robust measures only over the requested mask region
   itk::ImageRegionConstIteratorWithIndex<TFixedImage> fi(this->m_FixedImage, this->m_FixedImage->GetBufferedRegion() );
@@ -184,9 +186,9 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
 ::ComputeResults() const
 {
   // Collect some results
-  for( ThreadIdType threadID = 1; threadID < this->GetNumberOfThreadsUsed(); threadID++ )
+  for( ThreadIdType threadId = 1, lastThread = this->GetNumberOfThreadsUsed(); threadId < lastThread; ++threadId )
     {
-    this->m_ThreaderJointPDFSum[0] += this->m_ThreaderJointPDFSum[threadID];
+    this->m_ThreaderJointPDFSum[0] += this->m_ThreaderJointPDFSum[threadId];
     }
   if( this->m_ThreaderJointPDFSum[0] < itk::NumericTraits< PDFValueType >::epsilon() )
     {
@@ -196,14 +198,14 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
   std::fill(this->m_MovingImageMarginalPDF.begin(), this->m_MovingImageMarginalPDF.end(), 0.0F);
 
   PDFValueType       totalMassOfPDF = 0.0;
-  for( unsigned int i = 0; i < this->m_NumberOfHistogramBins; i++ )
+  for( unsigned int i = 0; i < this->m_NumberOfHistogramBins; ++i )
     {
     totalMassOfPDF += this->m_ThreaderFixedImageMarginalPDF[0][i];
     }
 
   const PDFValueType normalizationFactor = 1.0 / this->m_ThreaderJointPDFSum[0];
   JointPDFValueType *pdfPtr = this->m_ThreaderJointPDF[0]->GetBufferPointer();
-  for( unsigned int i = 0; i < this->m_NumberOfHistogramBins; i++ )
+  for( unsigned int i = 0; i < this->m_NumberOfHistogramBins; ++i )
     {
     PDFValueType * movingMarginalPtr = &(m_MovingImageMarginalPDF[0]);
     for( unsigned int j = 0; j < this->m_NumberOfHistogramBins; j++ )
@@ -213,7 +215,7 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
       }
     }
 
-  SizeValueType numberOfPoints = this->GetNumberOfDomainPoints();
+  const SizeValueType numberOfPoints = this->GetNumberOfDomainPoints();
 
   if( this->GetNumberOfValidPoints() < numberOfPoints / 16 )
     {
@@ -230,7 +232,7 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
     {
     itkExceptionMacro("Fixed image marginal PDF summed to zero");
     }
-  for( unsigned int bin = 0; bin < this->m_NumberOfHistogramBins; bin++ )
+  for( unsigned int bin = 0; bin < this->m_NumberOfHistogramBins; ++bin )
     {
     this->m_ThreaderFixedImageMarginalPDF[0][bin] /= totalMassOfPDF;
     }
@@ -247,6 +249,7 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
 
   const PDFValueType nFactor = 1.0 / ( this->m_MovingImageBinSize * this->GetNumberOfValidPoints() );
 
+  static const PDFValueType closeToZero = std::numeric_limits<PDFValueType>::epsilon();
   for( unsigned int fixedIndex = 0; fixedIndex < this->m_NumberOfHistogramBins; ++fixedIndex )
     {
     const PDFValueType fixedImagePDFValue = this->m_ThreaderFixedImageMarginalPDF[0][fixedIndex];
@@ -256,16 +259,15 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
       const PDFValueType jointPDFValue = *( jointPDFPtr );
 
       // check for non-zero bin contribution
-      static const PDFValueType closeToZero = vcl_numeric_limits<PDFValueType>::epsilon();
       if( ! (jointPDFValue > closeToZero &&  movingImagePDFValue > closeToZero) )
         {
         continue;
         }
-      const PDFValueType pRatio = vcl_log(jointPDFValue / movingImagePDFValue);
+      const PDFValueType pRatio = std::log(jointPDFValue / movingImagePDFValue);
 
       if( fixedImagePDFValue > closeToZero )
         {
-        sum += jointPDFValue * ( pRatio - vcl_log(fixedImagePDFValue) );
+        sum += jointPDFValue * ( pRatio - std::log(fixedImagePDFValue) );
         }
 
       if( this->GetComputeDerivative() )
@@ -278,7 +280,9 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
           JointPDFValueType const * derivPtr = this->m_ThreaderJointPDFDerivatives[0]->GetBufferPointer()
             + ( fixedIndex  * this->m_ThreaderJointPDFDerivatives[0]->GetOffsetTable()[2] )
             + ( movingIndex * this->m_ThreaderJointPDFDerivatives[0]->GetOffsetTable()[1] );
-          for( unsigned int parameter = 0; parameter < this->GetNumberOfLocalParameters(); ++parameter, derivPtr++ )
+          for( unsigned int parameter = 0, lastParameter = this->GetNumberOfLocalParameters();
+               parameter < lastParameter;
+               ++parameter, derivPtr++ )
             {
             // Ref: eqn 23 of Thevenaz & Unser paper [3]
             (*(this->m_DerivativeResult))[parameter] += ( *derivPtr ) * pRatio;
@@ -288,7 +292,7 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
           {
           // Collect the pRatio per pdf indecies.
           // Will be applied subsequently to local-support derivative
-          OffsetValueType index = movingIndex + (fixedIndex * this->m_NumberOfHistogramBins);
+          const OffsetValueType index = movingIndex + (fixedIndex * this->m_NumberOfHistogramBins);
           this->m_PRatioArray[index] = pRatio * nFactor;
           }
         }
@@ -301,15 +305,15 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
     {
     if( this->HasLocalSupport() )
       {
-      for( SizeValueType i = 0; i < this->m_DerivativeResult->Size(); i++ )
+      for( SizeValueType i = 0, derivativeSize = this->m_DerivativeResult->Size(); i < derivativeSize; ++i )
         {
-        for( SizeValueType bin = 0; bin < 4; bin++ )
+        for( SizeValueType bin = 0; bin < 4; ++bin )
           {
           // Increment the m_JointPdfIndex1DArray index by bin in order to recover
           // the pRatio at the moving indecies used for each portion of the derivative.
           // Note: in old v3 metric ComputeDerivatives, derivativeContribution is subtracted in global case,
           // but added in "local" (implicit) case. These operations have been switched to minimize the metric.
-          SizeValueType pRatioIndex = this->m_JointPdfIndex1DArray[i] + bin;
+          const SizeValueType pRatioIndex = this->m_JointPdfIndex1DArray[i] + bin;
           (*(this->m_DerivativeResult))[i] -= m_LocalDerivativeByParzenBin[bin][i] * this->m_PRatioArray[pRatioIndex];
           }
         }
@@ -332,25 +336,26 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
   // code used by GetValue and GetValueAndDerivative.
   // Should be threaded. But if modified to do so, should probably not be threaded
   // separately, but rather as a part of all post-processing.
-  for( ThreadIdType threadID = 0; threadID < this->GetNumberOfThreadsUsed(); threadID++ )
+  for( ThreadIdType threadId = 0, localNumberOfThreadsUsed = this->GetNumberOfThreadsUsed();
+       threadId < localNumberOfThreadsUsed; ++threadId )
     {
-    const int maxI = this->m_NumberOfHistogramBins * ( this->m_ThreaderJointPDFEndBin[threadID] - this->m_ThreaderJointPDFStartBin[threadID] + 1 );
+    const int histogramBlockSize = this->m_NumberOfHistogramBins * ( this->m_ThreaderJointPDFEndBin[threadId] - this->m_ThreaderJointPDFStartBin[threadId] + 1 );
 
-    const unsigned int tPdfPtrOffset = ( this->m_ThreaderJointPDFStartBin[threadID] * this->m_ThreaderJointPDF[0]->GetOffsetTable()[1] );
+    const unsigned int tPdfPtrOffset = ( this->m_ThreaderJointPDFStartBin[threadId] * this->m_ThreaderJointPDF[0]->GetOffsetTable()[1] );
     JointPDFValueType * const pdfPtrStart = this->m_ThreaderJointPDF[0]->GetBufferPointer() + tPdfPtrOffset;
 
     // The PDF domain is chunked based on thread.  Each thread consolodates independent parts of the PDF.
-    for( unsigned int t = 1; t < this->GetNumberOfThreadsUsed(); t++ )
+    for( unsigned int t = 1; t < localNumberOfThreadsUsed; ++t )
       {
       JointPDFValueType *                 pdfPtr = pdfPtrStart;
       JointPDFValueType const *          tPdfPtr = this->m_ThreaderJointPDF[t]->GetBufferPointer() + tPdfPtrOffset;
-      JointPDFValueType const * const tPdfPtrEnd = tPdfPtr + maxI;
-      // for(i=0; i < maxI; i++)
+      JointPDFValueType const * const tPdfPtrEnd = tPdfPtr + histogramBlockSize;
+      // for(i=0; i < histogramBlockSize; i++)
       while( tPdfPtr < tPdfPtrEnd )
         {
         *( pdfPtr++ ) += *( tPdfPtr++ );
         }
-      for( int i = this->m_ThreaderJointPDFStartBin[threadID]; i <= this->m_ThreaderJointPDFEndBin[threadID]; i++ )
+      for( int i = this->m_ThreaderJointPDFStartBin[threadId], endBin= this->m_ThreaderJointPDFEndBin[threadId]; i <= endBin; ++i )
         {
         this->m_ThreaderFixedImageMarginalPDF[0][i] += this->m_ThreaderFixedImageMarginalPDF[t][i];
         }
@@ -358,11 +363,11 @@ MattesMutualInformationImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualI
     // Sum of this threads domain into the this->m_ThreaderJointPDFSum that covers that part of the domain.
     PDFValueType                    jointPDFSum = 0.0;
     JointPDFValueType const * pdfPtr = pdfPtrStart;
-    for( int i = 0; i < maxI; i++ )
+    for( int i = 0; i < histogramBlockSize; i++ )
       {
       jointPDFSum += *( pdfPtr++ );
       }
-    this->m_ThreaderJointPDFSum[threadID] = jointPDFSum;
+    this->m_ThreaderJointPDFSum[threadId] = jointPDFSum;
   }
 }
 
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h
index ed88337..071cf9e 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h
@@ -82,7 +82,9 @@ public:
   typedef typename TMattesMutualInformationMetric::JacobianType             JacobianType;
 
 protected:
-  MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader() {}
+  MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader() :
+    m_MattesAssociate(ITK_NULLPTR)
+  {}
 
   virtual void BeforeThreadedExecution();
 
@@ -102,14 +104,20 @@ protected:
         const MovingImageGradientType &   mappedMovingImageGradient,
         MeasureType &                     metricValueReturn,
         DerivativeType &                  localDerivativeReturn,
-        const ThreadIdType                threadID ) const;
+        const ThreadIdType                threadId ) const;
 
-  /** Compute PDF derivative contribution for each parameter. */
-  virtual void ComputePDFDerivatives(const ThreadIdType &    threadID,
+  /** Compute PDF derivative contribution for each parameter of a global support transform type. */
+  virtual void ComputePDFDerivativesGlobalSupportTransform(const ThreadIdType &    threadId,
                              const OffsetValueType &         fixedImageParzenWindowIndex,
                              const JacobianType &            jacobian,
                              const OffsetValueType &         pdfMovingIndex,
                              const MovingImageGradientType & movingGradient,
+                             const PDFValueType &            cubicBSplineDerivativeValue) const;
+
+  /** Compute PDF derivative contribution for each parameter of a displacement field. */
+  virtual void ComputePDFDerivativesLocalSupportTransform(
+                             const JacobianType &            jacobian,
+                             const MovingImageGradientType & movingGradient,
                              const PDFValueType &            cubicBSplineDerivativeValue,
                              DerivativeValueType *           localSupportDerivativeResultPtr) const;
 
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.hxx
index efb53fe..7cf6f43 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.hxx
@@ -38,7 +38,7 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
 
   /* Store the casted pointer to avoid dynamic casting in tight loops. */
   this->m_MattesAssociate = dynamic_cast<TMattesMutualInformationMetric*>(this->m_Associate);
-  if( this->m_MattesAssociate == NULL )
+  if( this->m_MattesAssociate == ITK_NULLPTR )
     {
     itkExceptionMacro("Dynamic casting of associate pointer failed.");
     }
@@ -49,23 +49,25 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
    * Allocate memory for the marginal PDF and initialize values
    * to zero. The marginal PDFs are stored as std::vector.
    */
+  const ThreadIdType mattesAssociateNumThreadsUsed = this->m_MattesAssociate->GetNumberOfThreadsUsed();
   this->m_MattesAssociate->m_MovingImageMarginalPDF.resize(this->m_MattesAssociate->m_NumberOfHistogramBins, 0.0F);
-  this->m_MattesAssociate->m_ThreaderFixedImageMarginalPDF.resize(this->m_MattesAssociate->GetNumberOfThreadsUsed(),
+  this->m_MattesAssociate->m_ThreaderFixedImageMarginalPDF.resize(mattesAssociateNumThreadsUsed,
                                          std::vector<PDFValueType>(this->m_MattesAssociate->m_NumberOfHistogramBins, 0.0F) );
 
-  this->m_MattesAssociate->m_ThreaderJointPDFStartBin.resize( this->GetNumberOfThreadsUsed() );
-  this->m_MattesAssociate->m_ThreaderJointPDFEndBin.resize(this->GetNumberOfThreadsUsed() );
-  const OffsetValueType binRange = this->m_MattesAssociate->m_NumberOfHistogramBins / this->GetNumberOfThreadsUsed();
-  for( ThreadIdType threadID = 0; threadID < this->GetNumberOfThreadsUsed(); threadID++ )
+  const ThreadIdType localNumberOfThreadsUsed = this->GetNumberOfThreadsUsed();
+  this->m_MattesAssociate->m_ThreaderJointPDFStartBin.resize( localNumberOfThreadsUsed );
+  this->m_MattesAssociate->m_ThreaderJointPDFEndBin.resize(localNumberOfThreadsUsed );
+  const OffsetValueType binRange = this->m_MattesAssociate->m_NumberOfHistogramBins / localNumberOfThreadsUsed;
+  for( ThreadIdType threadId = 0; threadId < localNumberOfThreadsUsed; ++threadId )
     {
-    this->m_MattesAssociate->m_ThreaderJointPDFStartBin[threadID] = threadID * binRange;
-    this->m_MattesAssociate->m_ThreaderJointPDFEndBin[threadID] = ( threadID + 1 ) * binRange - 1;
+    this->m_MattesAssociate->m_ThreaderJointPDFStartBin[threadId] = threadId * binRange;
+    this->m_MattesAssociate->m_ThreaderJointPDFEndBin[threadId] = ( threadId + 1 ) * binRange - 1;
     }
   // Ensure that the last EndBin range contains the last histogram bin
-  this->m_MattesAssociate->m_ThreaderJointPDFStartBin[this->GetNumberOfThreadsUsed() - 1] = ( this->GetNumberOfThreadsUsed() - 1 ) * binRange;
-  this->m_MattesAssociate->m_ThreaderJointPDFEndBin[this->GetNumberOfThreadsUsed() - 1] = this->m_MattesAssociate->m_NumberOfHistogramBins - 1;
+  this->m_MattesAssociate->m_ThreaderJointPDFStartBin[localNumberOfThreadsUsed - 1] = ( localNumberOfThreadsUsed - 1 ) * binRange;
+  this->m_MattesAssociate->m_ThreaderJointPDFEndBin[localNumberOfThreadsUsed - 1] = this->m_MattesAssociate->m_NumberOfHistogramBins - 1;
 
-  this->m_MattesAssociate->m_ThreaderJointPDFSum.resize(this->GetNumberOfThreadsUsed());
+  this->m_MattesAssociate->m_ThreaderJointPDFSum.resize(localNumberOfThreadsUsed);
 
   JointPDFRegionType jointPDFRegion;
   // For the joint PDF define a region starting from {0,0}
@@ -92,14 +94,14 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
    * Allocate memory for the joint PDF and joint PDF derivatives.
    * The joint PDF and joint PDF derivatives are store as itk::Image.
    */
-  this->m_MattesAssociate->m_ThreaderJointPDF.resize(this->GetNumberOfThreadsUsed());
-  for( ThreadIdType threadID = 0; threadID < this->GetNumberOfThreadsUsed(); ++threadID )
+  this->m_MattesAssociate->m_ThreaderJointPDF.resize(localNumberOfThreadsUsed);
+  for( ThreadIdType threadId = 0; threadId < localNumberOfThreadsUsed; ++threadId )
     {
-    this->m_MattesAssociate->m_ThreaderJointPDF[threadID] = JointPDFType::New();
-    this->m_MattesAssociate->m_ThreaderJointPDF[threadID]->SetRegions(jointPDFRegion);
-    this->m_MattesAssociate->m_ThreaderJointPDF[threadID]->SetOrigin(origin);
-    this->m_MattesAssociate->m_ThreaderJointPDF[threadID]->SetSpacing(spacing);
-    this->m_MattesAssociate->m_ThreaderJointPDF[threadID]->Allocate();
+    this->m_MattesAssociate->m_ThreaderJointPDF[threadId] = JointPDFType::New();
+    this->m_MattesAssociate->m_ThreaderJointPDF[threadId]->SetRegions(jointPDFRegion);
+    this->m_MattesAssociate->m_ThreaderJointPDF[threadId]->SetOrigin(origin);
+    this->m_MattesAssociate->m_ThreaderJointPDF[threadId]->SetSpacing(spacing);
+    this->m_MattesAssociate->m_ThreaderJointPDF[threadId]->Allocate();
     }
 
   //
@@ -125,7 +127,7 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
       this->m_MattesAssociate->m_LocalDerivativeByParzenBin.resize(4);
       // The first container cannot point to the existing derivative result object
       // for efficiency, because of multi-variate metric.
-      for( SizeValueType n = 0; n<4; n++ )
+      for( SizeValueType n = 0; n < 4; ++n )
         {
         this->m_MattesAssociate->m_LocalDerivativeByParzenBin[n].SetSize( this->m_MattesAssociate->GetNumberOfParameters() );
         // Initialize to zero because we accumulate, and so skipped points will behave properly
@@ -157,13 +159,13 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
       jointPDFDerivativesRegion.SetIndex(jointPDFDerivativesIndex);
       jointPDFDerivativesRegion.SetSize(jointPDFDerivativesSize);
 
-      this->m_MattesAssociate->m_ThreaderJointPDFDerivatives.resize(this->GetNumberOfThreadsUsed());
+      this->m_MattesAssociate->m_ThreaderJointPDFDerivatives.resize(localNumberOfThreadsUsed);
       // Set the regions and allocate
-      for( ThreadIdType threadID = 0; threadID < this->GetNumberOfThreadsUsed(); threadID++ )
+      for( ThreadIdType threadId = 0; threadId < localNumberOfThreadsUsed; ++threadId )
         {
-        this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadID] = JointPDFDerivativesType::New();
-        this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadID]->SetRegions( jointPDFDerivativesRegion);
-        this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadID]->Allocate();
+        this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadId] = JointPDFDerivativesType::New();
+        this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadId]->SetRegions( jointPDFDerivativesRegion);
+        this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadId]->Allocate();
         }
       }
     }
@@ -176,16 +178,15 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
 
   /* This block of code is from MattesMutualImageToImageMetric::GetValueAndDerivativeThreadPreProcess */
 
-  for( ThreadIdType threadID = 0; threadID < this->GetNumberOfThreadsUsed(); threadID++ )
+  const bool createPerThreadDerivativesBuffers = this->m_MattesAssociate->GetComputeDerivative()
+       && ( ! this->m_MattesAssociate->HasLocalSupport() );
+  for( ThreadIdType threadId = 0; threadId < localNumberOfThreadsUsed; ++threadId )
     {
-    std::fill( this->m_MattesAssociate->m_ThreaderFixedImageMarginalPDF[threadID].begin(), this->m_MattesAssociate->m_ThreaderFixedImageMarginalPDF[threadID].end(), 0.0F);
-    this->m_MattesAssociate->m_ThreaderJointPDF[threadID]->FillBuffer(0.0F);
-    if( this->m_MattesAssociate->GetComputeDerivative() )
+    std::fill( this->m_MattesAssociate->m_ThreaderFixedImageMarginalPDF[threadId].begin(), this->m_MattesAssociate->m_ThreaderFixedImageMarginalPDF[threadId].end(), 0.0F);
+    this->m_MattesAssociate->m_ThreaderJointPDF[threadId]->FillBuffer(0.0F);
+    if( createPerThreadDerivativesBuffers )
       {
-      if( ! this->m_MattesAssociate->HasLocalSupport() )
-        {
-        this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadID]->FillBuffer(0.0F);
-        }
+      this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadId]->FillBuffer(0.0F);
       }
     }
 }
@@ -204,8 +205,9 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
                 const MovingImageGradientType &    movingImageGradient,
                 MeasureType &,
                 DerivativeType &,
-                const ThreadIdType                 threadID) const
+                const ThreadIdType                 threadId) const
 {
+  const bool doComputeDerivative = this->m_MattesAssociate->GetComputeDerivative();
   /**
    * Compute this sample's contribution to the marginal
    *   and joint distributions.
@@ -221,7 +223,7 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
     }
 
   // Determine parzen window arguments (see eqn 6 of Mattes paper [2]).
-  PDFValueType movingImageParzenWindowTerm = movingImageValue / this->m_MattesAssociate->m_MovingImageBinSize - this->m_MattesAssociate->m_MovingImageNormalizedMin;
+  const PDFValueType movingImageParzenWindowTerm = movingImageValue / this->m_MattesAssociate->m_MovingImageBinSize - this->m_MattesAssociate->m_MovingImageNormalizedMin;
   OffsetValueType movingImageParzenWindowIndex = static_cast<OffsetValueType>( movingImageParzenWindowTerm );
 
   // Make sure the extreme values are in valid bins
@@ -237,7 +239,7 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
       movingImageParzenWindowIndex = nindex;
       }
     }
-  // Move the pointer to the fist affected bin
+  // Move the pointer to the first affected bin
   OffsetValueType pdfMovingIndex = static_cast<OffsetValueType>( movingImageParzenWindowIndex ) - 1;
   const OffsetValueType pdfMovingIndexMax = static_cast<OffsetValueType>( movingImageParzenWindowIndex ) + 2;
 
@@ -246,7 +248,7 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
   // Since a zero-order BSpline (box car) kernel is used for
   // the fixed image marginal pdf, we need only increment the
   // fixedImageParzenWindowIndex by value of 1.0.
-  this->m_MattesAssociate->m_ThreaderFixedImageMarginalPDF[threadID][fixedImageParzenWindowIndex] += 1;
+  this->m_MattesAssociate->m_ThreaderFixedImageMarginalPDF[threadId][fixedImageParzenWindowIndex] += 1;
 
   /**
     * The region of support of the parzen window determines which bins
@@ -262,64 +264,75 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
   PDFValueType movingImageParzenWindowArg = static_cast<PDFValueType>( pdfMovingIndex ) - static_cast<PDFValueType>( movingImageParzenWindowTerm );
 
   // Pointer to affected bin to be updated
-  JointPDFValueType *pdfPtr = this->m_MattesAssociate->m_ThreaderJointPDF[threadID]->GetBufferPointer()
+  JointPDFValueType *pdfPtr = this->m_MattesAssociate->m_ThreaderJointPDF[threadId]->GetBufferPointer()
                               + ( fixedImageParzenWindowIndex * this->m_MattesAssociate->m_NumberOfHistogramBins ) + pdfMovingIndex;
 
   OffsetValueType localDerivativeOffset = 0;
   // Store the pdf indecies for this point.
   // Just store the starting pdfMovingIndex and we'll iterate later
   // over the next four to collect results.
-  if( this->m_MattesAssociate->GetComputeDerivative() )
+  if( doComputeDerivative && ( this->m_MattesAssociate->HasLocalSupport() ) )
     {
-    if( this->m_MattesAssociate->HasLocalSupport() )
+    const OffsetValueType jointPdfIndex1D = pdfMovingIndex + (fixedImageParzenWindowIndex * this->m_MattesAssociate->m_NumberOfHistogramBins);
+    localDerivativeOffset = this->m_MattesAssociate->ComputeParameterOffsetFromVirtualIndex( virtualIndex, this->GetCachedNumberOfLocalParameters() );
+    for (NumberOfParametersType i=0, numLocalParameters = this->GetCachedNumberOfLocalParameters();
+      i < numLocalParameters; ++i)
       {
-      OffsetValueType jointPdfIndex1D = pdfMovingIndex + (fixedImageParzenWindowIndex * this->m_MattesAssociate->m_NumberOfHistogramBins);
-      localDerivativeOffset = this->m_MattesAssociate->ComputeParameterOffsetFromVirtualIndex( virtualIndex, this->GetCachedNumberOfLocalParameters() );
-      for (NumberOfParametersType i=0; i < this->GetCachedNumberOfLocalParameters(); i++)
-        {
-        this->m_MattesAssociate->m_JointPdfIndex1DArray[localDerivativeOffset + i] = jointPdfIndex1D;
-        }
+      this->m_MattesAssociate->m_JointPdfIndex1DArray[localDerivativeOffset + i] = jointPdfIndex1D;
       }
     }
 
   // Compute the transform Jacobian.
   typedef JacobianType & JacobianReferenceType;
-  JacobianReferenceType jacobian = this->m_GetValueAndDerivativePerThreadVariables[threadID].MovingTransformJacobian;
-  if( this->m_MattesAssociate->GetComputeDerivative() )
+  JacobianReferenceType jacobian = this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobian;
+  if( doComputeDerivative )
     {
-    this->m_MattesAssociate->GetMovingTransform()->ComputeJacobianWithRespectToParameters( virtualPoint, jacobian);
+    JacobianReferenceType jacobianPositional = this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobianPositional;
+    this->m_MattesAssociate->GetMovingTransform()->
+      ComputeJacobianWithRespectToParametersCachedTemporaries(virtualPoint,
+                                                              jacobian,
+                                                              jacobianPositional);
     }
 
   SizeValueType movingParzenBin = 0;
 
+  const bool transformIsDisplacement = this->m_MattesAssociate->m_MovingTransform->GetTransformCategory() == MovingTransformType::DisplacementField;
   while( pdfMovingIndex <= pdfMovingIndexMax )
     {
-    PDFValueType val = static_cast<PDFValueType>( this->m_MattesAssociate->m_CubicBSplineKernel ->Evaluate( movingImageParzenWindowArg) );
+    const PDFValueType val = static_cast<PDFValueType>( this->m_MattesAssociate->m_CubicBSplineKernel ->Evaluate( movingImageParzenWindowArg) );
     *( pdfPtr++ ) += val;
 
-    if( this->m_MattesAssociate->GetComputeDerivative() )
+    if( doComputeDerivative )
       {
       // Compute the cubicBSplineDerivative for later repeated use.
       const PDFValueType cubicBSplineDerivativeValue = this->m_MattesAssociate->m_CubicBSplineDerivativeKernel->Evaluate(movingImageParzenWindowArg);
 
-      // Pointer to local derivative partial result container.
-      // Not used with global support transforms.
-      DerivativeValueType * localSupportDerivativeResultPtr = NULL;
 
-    if( this->m_MattesAssociate->m_MovingTransform->GetTransformCategory() == MovingTransformType::DisplacementField )
-      {
-      // ptr to where the derivative result should go, for efficiency
-      localSupportDerivativeResultPtr = &( this->m_MattesAssociate->m_LocalDerivativeByParzenBin[movingParzenBin][localDerivativeOffset] );
-      }
-
-      // Compute PDF derivative contribution.
-      this->ComputePDFDerivatives(threadID,
-                                  fixedImageParzenWindowIndex,
-                                  jacobian,
-                                  pdfMovingIndex,
-                                  movingImageGradient,
-                                  cubicBSplineDerivativeValue,
-                                  localSupportDerivativeResultPtr);
+      if( transformIsDisplacement )
+        {
+        // Pointer to local derivative partial result container.
+        // Not used with global support transforms.
+        // ptr to where the derivative result should go, for efficiency
+        DerivativeValueType * localSupportDerivativeResultPtr =
+          &( this->m_MattesAssociate->m_LocalDerivativeByParzenBin[movingParzenBin][localDerivativeOffset] );
+        // Compute PDF derivative contribution.
+
+        this->ComputePDFDerivativesLocalSupportTransform(
+          jacobian,
+          movingImageGradient,
+          cubicBSplineDerivativeValue,
+          localSupportDerivativeResultPtr);
+        }
+      else
+        {
+        // Compute PDF derivative contribution.
+        this->ComputePDFDerivativesGlobalSupportTransform(threadId,
+          fixedImageParzenWindowIndex,
+          jacobian,
+          pdfMovingIndex,
+          movingImageGradient,
+          cubicBSplineDerivativeValue);
+        }
       }
 
     movingImageParzenWindowArg += 1.0;
@@ -328,57 +341,63 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
     }
 
   // have to do this here since we're returning false
-  this->m_GetValueAndDerivativePerThreadVariables[threadID].NumberOfValidPoints++;
+  this->m_GetValueAndDerivativePerThreadVariables[threadId].NumberOfValidPoints++;
 
   // Return false to avoid the storage of results in parent class.
   return false;
 }
 
-/**
- * ComputePDFDerivative
- */
 template< typename TDomainPartitioner, typename TImageToImageMetric, typename TMattesMutualInformationMetric >
 void
 MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TMattesMutualInformationMetric >
-::ComputePDFDerivatives(const ThreadIdType &            threadID,
+::ComputePDFDerivativesGlobalSupportTransform(const ThreadIdType &            threadId,
                         const OffsetValueType &         fixedImageParzenWindowIndex,
                         const JacobianType &            jacobian,
                         const OffsetValueType &         pdfMovingIndex,
                         const MovingImageGradientType & movingImageGradient,
-                        const PDFValueType &            cubicBSplineDerivativeValue,
-                        DerivativeValueType *           localSupportDerivativeResultPtr) const
+                        const PDFValueType &            cubicBSplineDerivativeValue) const
 {
   // Update bins in the PDF derivatives for the current intensity pair
-
   const OffsetValueType pdfFixedIndex = fixedImageParzenWindowIndex;
 
-  JointPDFDerivativesValueType *derivPtr=0;
-  if( this->m_MattesAssociate->m_MovingTransform->GetTransformCategory() != MovingTransformType::DisplacementField )
-    {
-    derivPtr = this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadID]->GetBufferPointer()
-      + ( pdfFixedIndex  * this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadID]->GetOffsetTable()[2] )
-      + ( pdfMovingIndex * this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadID]->GetOffsetTable()[1] );
-    }
+  JointPDFDerivativesValueType *derivPtr = this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadId]->GetBufferPointer()
+      + ( pdfFixedIndex  * this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadId]->GetOffsetTable()[2] )
+      + ( pdfMovingIndex * this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[threadId]->GetOffsetTable()[1] );
 
-  for( NumberOfParametersType mu = 0; mu < this->GetCachedNumberOfLocalParameters(); mu++ )
+  for( NumberOfParametersType mu = 0, maxElement=this->GetCachedNumberOfLocalParameters(); mu < maxElement; ++mu )
     {
     PDFValueType innerProduct = 0.0;
-    for( SizeValueType dim = 0; dim < this->m_MattesAssociate->MovingImageDimension; dim++ )
+    for( SizeValueType dim = 0, lastDim = this->m_MattesAssociate->MovingImageDimension; dim < lastDim; ++dim )
       {
       innerProduct += jacobian[dim][mu] * movingImageGradient[dim];
       }
 
     const PDFValueType derivativeContribution = innerProduct * cubicBSplineDerivativeValue;
-    if( this->m_MattesAssociate->m_MovingTransform->GetTransformCategory() == MovingTransformType::DisplacementField )
-      {
-      *( localSupportDerivativeResultPtr ) += derivativeContribution;
-      localSupportDerivativeResultPtr++;
-      }
-    else
+    *( derivPtr ) -= derivativeContribution;
+    ++derivPtr;
+    }
+}
+
+template< typename TDomainPartitioner, typename TImageToImageMetric, typename TMattesMutualInformationMetric >
+void
+MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TMattesMutualInformationMetric >
+::ComputePDFDerivativesLocalSupportTransform(
+                        const JacobianType &            jacobian,
+                        const MovingImageGradientType & movingImageGradient,
+                        const PDFValueType &            cubicBSplineDerivativeValue,
+                        DerivativeValueType *           localSupportDerivativeResultPtr) const
+{
+  for( NumberOfParametersType mu = 0, maxElement=this->GetCachedNumberOfLocalParameters(); mu < maxElement; ++mu )
+    {
+    PDFValueType innerProduct = 0.0;
+    for( SizeValueType dim = 0, lastDim = this->m_MattesAssociate->MovingImageDimension; dim < lastDim; ++dim )
       {
-      *( derivPtr ) -= derivativeContribution;
-      ++derivPtr;
+      innerProduct += jacobian[dim][mu] * movingImageGradient[dim];
       }
+
+    const PDFValueType derivativeContribution = innerProduct * cubicBSplineDerivativeValue;
+    *( localSupportDerivativeResultPtr ) += derivativeContribution;
+    localSupportDerivativeResultPtr++;
     }
 }
 
@@ -387,6 +406,7 @@ void
 MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner, TImageToImageMetric, TMattesMutualInformationMetric >
 ::AfterThreadedExecution()
 {
+  const ThreadIdType localNumberOfThreadsUsed = this->GetNumberOfThreadsUsed();
   /* NOTE: It is not worth threading this method. Profiling shows that post-processing
    * time of images with real-world sizes is too insignificant to register in
    * the profiler. */
@@ -395,9 +415,9 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
    * m_NumberOfValidPoints by collecting the valid points per thread.
    * We do this here because we're skipping Superclass::AfterThreadedExecution*/
   this->m_MattesAssociate->m_NumberOfValidPoints = NumericTraits< SizeValueType >::Zero;
-  for (ThreadIdType i=0; i<this->GetNumberOfThreadsUsed(); i++)
+  for (ThreadIdType threadId = 0; threadId < localNumberOfThreadsUsed; ++threadId)
     {
-    this->m_MattesAssociate->m_NumberOfValidPoints += this->m_GetValueAndDerivativePerThreadVariables[i].NumberOfValidPoints;
+    this->m_MattesAssociate->m_NumberOfValidPoints += this->m_GetValueAndDerivativePerThreadVariables[threadId].NumberOfValidPoints;
     }
 
   /* Porting: This code is from
@@ -406,40 +426,41 @@ MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader< TDomai
   /* Post-processing that is common the GetValue and GetValueAndDerivative */
   this->m_MattesAssociate->GetValueCommonAfterThreadedExecution();
 
-  if( this->m_MattesAssociate->GetComputeDerivative() )
+  if( this->m_MattesAssociate->GetComputeDerivative() && ( ! this->m_MattesAssociate->HasLocalSupport() ) )
     {
-    if( ! this->m_MattesAssociate->HasLocalSupport() )
+    const NumberOfParametersType rowSize = this->GetCachedNumberOfLocalParameters() * this->m_MattesAssociate->m_NumberOfHistogramBins;
+    /* See note above about threading. */
+
+    // This entire block of code is used to accumulate the per-thread buffers into 1 thread.
+    for( ThreadIdType threadId = 0; threadId < localNumberOfThreadsUsed; ++threadId )
       {
-      /* See note above about threading. */
-      for( ThreadIdType threadID = 0; threadID < this->GetNumberOfThreadsUsed(); threadID++ )
-        {
-        const NumberOfParametersType rowSize = this->GetCachedNumberOfLocalParameters() * this->m_MattesAssociate->m_NumberOfHistogramBins;
+      // For this thread, how many histogram elements are there?
+      const SizeValueType histogramBlockSize = rowSize * ( this->m_MattesAssociate->m_ThreaderJointPDFEndBin[threadId] - this->m_MattesAssociate->m_ThreaderJointPDFStartBin[threadId] + 1 );
+
+      JointPDFDerivativesValueType *const accumulatorPdfDPtrStart = this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[0]->GetBufferPointer()
+        + ( this->m_MattesAssociate->m_ThreaderJointPDFStartBin[threadId] * rowSize );
 
-        const SizeValueType maxI = rowSize * ( this->m_MattesAssociate->m_ThreaderJointPDFEndBin[threadID] - this->m_MattesAssociate->m_ThreaderJointPDFStartBin[threadID] + 1 );
+      const SizeValueType tempThreadPdfDPtrOffset = this->m_MattesAssociate->m_ThreaderJointPDFStartBin[threadId] *  rowSize;
 
-        JointPDFDerivativesValueType *const pdfDPtrStart = this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[0]->GetBufferPointer()
-          + ( this->m_MattesAssociate->m_ThreaderJointPDFStartBin[threadID] * rowSize );
-        const SizeValueType tPdfDPtrOffset = this->m_MattesAssociate->m_ThreaderJointPDFStartBin[threadID] *  rowSize;
-        for( SizeValueType t = 1; t < this->GetNumberOfThreadsUsed(); t++ )
+      for( SizeValueType t = 1; t < localNumberOfThreadsUsed; ++t )
+        {
+        JointPDFDerivativesValueType * accumulatorPdfDPtr = accumulatorPdfDPtrStart;
+        JointPDFDerivativesValueType const * tempThreadPdfDPtr = this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[t]->GetBufferPointer() + tempThreadPdfDPtrOffset;
+        JointPDFDerivativesValueType const * const tempThreadPdfDPtrEnd = tempThreadPdfDPtr + histogramBlockSize;
+        // for(i = 0; i < histogramBlockSize; i++)
+        while( tempThreadPdfDPtr < tempThreadPdfDPtrEnd )
           {
-          JointPDFDerivativesValueType *      pdfDPtr = pdfDPtrStart;
-          JointPDFDerivativesValueType const *tPdfDPtr = this->m_MattesAssociate->m_ThreaderJointPDFDerivatives[t]->GetBufferPointer() + tPdfDPtrOffset;
-          JointPDFDerivativesValueType const * const tPdfDPtrEnd = tPdfDPtr + maxI;
-          // for(i = 0; i < maxI; i++)
-          while( tPdfDPtr < tPdfDPtrEnd )
-            {
-            *( pdfDPtr++ ) += *( tPdfDPtr++ );
-            }
+          *( accumulatorPdfDPtr++ ) += *( tempThreadPdfDPtr++ );
           }
+        }
 
-        const PDFValueType nFactor = 1.0 / ( this->m_MattesAssociate->m_MovingImageBinSize * this->m_MattesAssociate->GetNumberOfValidPoints() );
+      const PDFValueType nFactor = 1.0 / ( this->m_MattesAssociate->m_MovingImageBinSize * this->m_MattesAssociate->GetNumberOfValidPoints() );
 
-        JointPDFDerivativesValueType *             pdfDPtr = pdfDPtrStart;
-        JointPDFDerivativesValueType const * const tPdfDPtrEnd = pdfDPtrStart + maxI;
-        while( pdfDPtr < tPdfDPtrEnd )
-          {
-          *( pdfDPtr++ ) *= nFactor;
-          }
+      JointPDFDerivativesValueType *             accumulatorPdfDPtr = accumulatorPdfDPtrStart;
+      JointPDFDerivativesValueType const * const tempThreadPdfDPtrEnd = accumulatorPdfDPtrStart + histogramBlockSize;
+      while( accumulatorPdfDPtr < tempThreadPdfDPtrEnd )
+        {
+        *( accumulatorPdfDPtr++ ) *= nFactor;
         }
       }
     }
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h
index e003616..b581380 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h
@@ -78,7 +78,7 @@ protected:
         const MovingImageGradientType &   mappedMovingImageGradient,
         MeasureType &                     metricValueReturn,
         DerivativeType &                  localDerivativeReturn,
-        const ThreadIdType                threadID ) const;
+        const ThreadIdType                threadId ) const;
 
 private:
   MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader( const Self & ); // purposely not implemented
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.hxx
index 903e0ae..9eeb689 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.hxx
@@ -37,7 +37,7 @@ MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner
                 const MovingImageGradientType &    movingImageGradient,
                 MeasureType &                      metricValueReturn,
                 DerivativeType &                   localDerivativeReturn,
-                const ThreadIdType                 threadID) const
+                const ThreadIdType                 threadId) const
 {
   /** Only the voxelwise contribution given the point pairs. */
   FixedImagePixelType diff = fixedImageValue - movingImageValue;
@@ -57,10 +57,14 @@ MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader< TDomainPartitioner
 
   /* Use a pre-allocated jacobian object for efficiency */
   typedef typename TImageToImageMetric::JacobianType & JacobianReferenceType;
-  JacobianReferenceType jacobian = this->m_GetValueAndDerivativePerThreadVariables[threadID].MovingTransformJacobian;
+  JacobianReferenceType jacobian = this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobian;
+  JacobianReferenceType jacobianPositional = this->m_GetValueAndDerivativePerThreadVariables[threadId].MovingTransformJacobianPositional;
 
   /** For dense transforms, this returns identity */
-  this->m_Associate->GetMovingTransform()->ComputeJacobianWithRespectToParameters( virtualPoint, jacobian );
+  this->m_Associate->GetMovingTransform()->
+    ComputeJacobianWithRespectToParametersCachedTemporaries(virtualPoint,
+                                                            jacobian,
+                                                            jacobianPositional);
 
   for ( unsigned int par = 0; par < this->GetCachedNumberOfLocalParameters(); par++ )
     {
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx
index 32ca8d7..7b0c57c 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.hxx
@@ -32,7 +32,7 @@ ObjectToObjectMultiMetricv4<TFixedDimension, TMovingDimension, TVirtualImage, TI
   this->m_MetricQueue.clear();
 
   //We want the moving transform to be NULL by default
-  this->m_MovingTransform = NULL;
+  this->m_MovingTransform = ITK_NULLPTR;
 }
 
 /** Destructor */
@@ -146,7 +146,7 @@ ObjectToObjectMultiMetricv4<TFixedDimension, TMovingDimension, TVirtualImage, TI
   this->m_MetricValueArray.SetSize( this->GetNumberOfMetrics() );
 
   /* Verify the same transform is in all metrics. */
-  const MovingTransformType * firstTransform = NULL;
+  const MovingTransformType * firstTransform = ITK_NULLPTR;
   for (SizeValueType j = 0; j < this->GetNumberOfMetrics(); j++)
     {
     const MovingTransformType * transform = this->m_MetricQueue[j]->GetMovingTransform();
@@ -154,7 +154,7 @@ ObjectToObjectMultiMetricv4<TFixedDimension, TMovingDimension, TVirtualImage, TI
     // optimized, and it must be the same as in other metrics.
     typedef CompositeTransform<typename MovingTransformType::ScalarType, TFixedDimension> CompositeType;
     const CompositeType * composite = dynamic_cast<const CompositeType*>(transform);
-    if( composite != NULL )
+    if( composite != ITK_NULLPTR )
       {
       SizeValueType count = 0;
       for( size_t n = 0; n < composite->GetNumberOfTransforms(); n++ )
@@ -360,7 +360,7 @@ ObjectToObjectMultiMetricv4<TFixedDimension, TMovingDimension, TVirtualImage, TI
   for (SizeValueType i = 0; i < this->GetNumberOfMetrics(); i++)
     {
     os << indent << "~~~ Metric " << i << " ~~~" << std::endl;
-    this->m_MetricQueue[i]->Print(os, indent );
+    this->m_MetricQueue[i]->Print(os, indent.GetNextIndent() );
     }
 }
 
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetFunction.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetFunction.hxx
index 97edd05..c44e278 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetFunction.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetFunction.hxx
@@ -30,7 +30,7 @@ template <typename TInputPointSet, typename TOutput, typename TCoordRep>
 PointSetFunction<TInputPointSet, TOutput, TCoordRep>
 ::PointSetFunction()
 {
-  this->m_PointSet = NULL;
+  this->m_PointSet = ITK_NULLPTR;
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h
index 5706bc1..bd8f04c 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h
@@ -66,17 +66,22 @@ namespace itk
  * \ingroup ITKMetricsv4
  */
 
-template<typename TFixedPointSet,  typename TMovingPointSet>
+template<typename TFixedPointSet,  typename TMovingPointSet,
+  class TInternalComputationValueType = double>
 class PointSetToPointSetMetricv4
-: public ObjectToObjectMetric<TFixedPointSet::PointDimension, TMovingPointSet::PointDimension>
+: public ObjectToObjectMetric<TFixedPointSet::PointDimension, TMovingPointSet::PointDimension,
+   Image<TInternalComputationValueType, TFixedPointSet::PointDimension>, TInternalComputationValueType>
 {
 public:
 
   /** Standard class typedefs. */
-  typedef PointSetToPointSetMetricv4                                                            Self;
-  typedef ObjectToObjectMetric<TFixedPointSet::PointDimension, TMovingPointSet::PointDimension> Superclass;
-  typedef SmartPointer<Self>                                                                    Pointer;
-  typedef SmartPointer<const Self>                                                              ConstPointer;
+  typedef PointSetToPointSetMetricv4                                        Self;
+  typedef ObjectToObjectMetric<TFixedPointSet::PointDimension,
+    TMovingPointSet::PointDimension,
+    Image<TInternalComputationValueType, TFixedPointSet::PointDimension>,
+    TInternalComputationValueType>                                          Superclass;
+  typedef SmartPointer<Self>                                                Pointer;
+  typedef SmartPointer<const Self>                                          ConstPointer;
 
   /** Run-time type information (and related methods). */
   itkTypeMacro( PointSetToPointSetMetricv4, ObjectToObjectMetric );
@@ -173,13 +178,14 @@ public:
 
   /** Get/Set the fixed pointset.  */
   itkSetConstObjectMacro( FixedPointSet, FixedPointSetType );
-  itkGetConstObjectMacro(FixedPointSet, FixedPointSetType );
+  itkGetConstObjectMacro( FixedPointSet, FixedPointSetType );
 
   /** Get the moving transformed point set.  */
-  itkGetModifiableObjectMacro(FixedTransformedPointSet, FixedTransformedPointSetType );
+  itkGetModifiableObjectMacro( FixedTransformedPointSet, FixedTransformedPointSetType );
 
   /** Get/Set the moving point set.  */
   itkSetConstObjectMacro( MovingPointSet, MovingPointSetType );
+  itkGetConstObjectMacro( MovingPointSet, MovingPointSetType );
 
   /** Get the moving transformed point set.  */
   itkGetModifiableObjectMacro(MovingTransformedPointSet, MovingTransformedPointSetType );
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx
index 352c7e2..bac203a 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.hxx
@@ -25,19 +25,19 @@ namespace itk
 {
 
 /** Constructor */
-template<typename TFixedPointSet, typename TMovingPointSet>
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::PointSetToPointSetMetricv4()
 {
-  this->m_FixedPointSet = NULL;    // has to be provided by the user.
-  this->m_MovingPointSet = NULL;    // has to be provided by the user.
+  this->m_FixedPointSet = ITK_NULLPTR;    // has to be provided by the user.
+  this->m_MovingPointSet = ITK_NULLPTR;    // has to be provided by the user.
 
-  this->m_FixedTransformedPointSet = NULL;
-  this->m_MovingTransformedPointSet = NULL;
-  this->m_VirtualTransformedPointSet = NULL;
+  this->m_FixedTransformedPointSet = ITK_NULLPTR;
+  this->m_MovingTransformedPointSet = ITK_NULLPTR;
+  this->m_VirtualTransformedPointSet = ITK_NULLPTR;
 
-  this->m_FixedTransformedPointsLocator = NULL;
-  this->m_MovingTransformedPointsLocator = NULL;
+  this->m_FixedTransformedPointsLocator = ITK_NULLPTR;
+  this->m_MovingTransformedPointsLocator = ITK_NULLPTR;
 
   this->m_MovingTransformPointLocatorsNeedInitialization = false;
   this->m_FixedTransformPointLocatorsNeedInitialization = false;
@@ -54,16 +54,16 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
 }
 
 /** Destructor */
-template<typename TFixedPointSet, typename TMovingPointSet>
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::~PointSetToPointSetMetricv4()
 {
 }
 
 /** Initialize the metric */
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::Initialize( void ) throw ( ExceptionObject )
 {
   if ( !this->m_FixedPointSet )
@@ -124,9 +124,9 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
   this->InitializePointSets();
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::InitializePointSets() const
 {
   this->TransformMovingPointSet();
@@ -134,9 +134,9 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
   this->InitializePointsLocators();
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::InitializeForIteration() const
 {
   this->InitializePointSets();
@@ -148,17 +148,17 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
     }
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 SizeValueType
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetNumberOfComponents() const
 {
   return this->m_FixedTransformedPointSet->GetNumberOfPoints();
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
-typename PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>::MeasureType
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+typename PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>::MeasureType
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetValue() const
 {
   this->InitializeForIteration();
@@ -207,26 +207,26 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
   return value;
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetDerivative( DerivativeType & derivative ) const
 {
   MeasureType value = NumericTraits<MeasureType>::Zero;
   this->CalculateValueAndDerivative( value, derivative, false );
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetValueAndDerivative( MeasureType & value, DerivativeType & derivative ) const
 {
   this->CalculateValueAndDerivative( value, derivative, true );
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::CalculateValueAndDerivative( MeasureType & value, DerivativeType & derivative, bool calculateValue ) const
 {
   this->InitializeForIteration();
@@ -235,6 +235,7 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
 
   value = NumericTraits<MeasureType>::Zero;
   MovingTransformJacobianType  jacobian( MovingPointDimension, this->GetNumberOfLocalParameters() );
+  MovingTransformJacobianType  jacobianPositional( MovingPointDimension, MovingPointDimension );
 
   DerivativeType localTransformDerivative( this->GetNumberOfLocalParameters() );
   localTransformDerivative.Fill( NumericTraits<DerivativeValueType>::Zero );
@@ -286,7 +287,10 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
       // Reset to zero since we're not accumulating in the local-support case.
       localTransformDerivative.Fill( NumericTraits<DerivativeValueType>::Zero );
       }
-    this->GetMovingTransform()->ComputeJacobianWithRespectToParameters( virtualIt.Value(), jacobian );
+    this->GetMovingTransform()->
+      ComputeJacobianWithRespectToParametersCachedTemporaries(virtualIt.Value(),
+                                                              jacobian,
+                                                              jacobianPositional);
     for ( NumberOfParametersType par = 0; par < this->GetNumberOfLocalParameters(); par++ )
       {
       for( DimensionType d = 0; d < PointDimension; ++d )
@@ -317,9 +321,9 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
   this->m_Value = value;
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 SizeValueType
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::CalculateNumberOfValidFixedPoints() const
 {
   // Determine the number of valid fixed points, using
@@ -337,9 +341,9 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
   return numberOfValidPoints;
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::StorePointDerivative( const VirtualPointType & virtualPoint, const DerivativeType & pointDerivative, DerivativeType & field ) const
 {
   // Update derivative field at some index.
@@ -365,10 +369,10 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
     }
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
-typename PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+typename PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::LocalDerivativeType
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetLocalNeighborhoodDerivative( const PointType & point, const PixelType & pixel ) const
 {
   MeasureType measure;
@@ -377,9 +381,9 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
   return localDerivative;
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::TransformMovingPointSet() const
 {
   // Transform the moving point set with the moving transform.
@@ -404,9 +408,9 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
     }
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::TransformFixedAndCreateVirtualPointSet() const
 {
   // Transform the fixed point set through the virtual domain, and into the moving domain
@@ -439,9 +443,9 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
     }
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
-const typename PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>::VirtualPointSetType *
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
+const typename PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>::VirtualPointSetType *
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::GetVirtualTransformedPointSet( void ) const
 {
   // First make sure the virtual point set is current.
@@ -449,9 +453,9 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
   return this->m_VirtualTransformedPointSet.GetPointer();
 }
 
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::InitializePointsLocators() const
 {
   if( this->m_FixedTransformPointLocatorsNeedInitialization )
@@ -484,9 +488,9 @@ PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
 }
 
 /** PrintSelf */
-template<typename TFixedPointSet, typename TMovingPointSet>
+template<typename TFixedPointSet, typename TMovingPointSet, class TInternalComputationValueType>
 void
-PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet>
+PointSetToPointSetMetricv4<TFixedPointSet, TMovingPointSet, TInternalComputationValueType>
 ::PrintSelf( std::ostream & os, Indent indent ) const
 {
   Superclass::PrintSelf( os, indent );
diff --git a/Utilities/ITK/Modules/Registration/Metricsv4/itk-module.cmake b/Utilities/ITK/Modules/Registration/Metricsv4/itk-module.cmake
index 2da45b9..5b52322 100644
--- a/Utilities/ITK/Modules/Registration/Metricsv4/itk-module.cmake
+++ b/Utilities/ITK/Modules/Registration/Metricsv4/itk-module.cmake
@@ -6,6 +6,7 @@ itk_module(ITKMetricsv4
     ITKOptimizersv4
   TEST_DEPENDS
     ITKTestKernel
+    ITKOptimizersv4
   DESCRIPTION
     "${DOCUMENTATION}"
 )
diff --git a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx
index 2db1192..2759868 100644
--- a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx
+++ b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkCurvatureRegistrationFilter.hxx
@@ -176,9 +176,9 @@ CurvatureRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField, TIma
     for ( unsigned int idx = 0; idx < m_FixedImageDimensions[dim]; ++idx )
       {
 #ifdef SLOW_DCT
-      m_DiagonalElements[dim][idx] = -2 + 2 * vcl_cos(vnl_math::pi * idx / m_FixedImageDimensions[dim]);
+      m_DiagonalElements[dim][idx] = -2 + 2 * std::cos(vnl_math::pi * idx / m_FixedImageDimensions[dim]);
 #else
-      m_DiagonalElements[dim][idx] = -2 + 2 * vcl_cos(vnl_math::pi * ( idx + 1 ) / m_FixedImageDimensions[dim]);
+      m_DiagonalElements[dim][idx] = -2 + 2 * std::cos(vnl_math::pi * ( idx + 1 ) / m_FixedImageDimensions[dim]);
 #endif
       }
     }
diff --git a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx
index bd86261..2ba6096 100644
--- a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx
+++ b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkDemonsRegistrationFunction.hxx
@@ -43,8 +43,8 @@ DemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
   m_TimeStep = 1.0;
   m_DenominatorThreshold = 1e-9;
   m_IntensityDifferenceThreshold = 0.001;
-  this->SetMovingImage(NULL);
-  this->SetFixedImage(NULL);
+  this->SetMovingImage(ITK_NULLPTR);
+  this->SetFixedImage(ITK_NULLPTR);
   //m_FixedImageSpacing.Fill( 1.0 );
   //m_FixedImageOrigin.Fill( 0.0 );
   m_Normalizer = 1.0;
@@ -273,7 +273,7 @@ DemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacementField >
     {
     m_Metric = m_SumOfSquaredDifference
                / static_cast< double >( m_NumberOfPixelsProcessed );
-    m_RMSChange = vcl_sqrt( m_SumOfSquaredChange
+    m_RMSChange = std::sqrt( m_SumOfSquaredChange
                             / static_cast< double >( m_NumberOfPixelsProcessed ) );
     }
   m_MetricCalculationLock.Unlock();
diff --git a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx
index 1a88293..2056f53 100644
--- a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx
+++ b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFunction.hxx
@@ -294,7 +294,7 @@ FastSymmetricForcesDemonsRegistrationFunction< TFixedImage, TMovingImage, TDispl
     {
     m_Metric = m_SumOfSquaredDifference
                / static_cast< double >( m_NumberOfPixelsProcessed );
-    m_RMSChange = vcl_sqrt( m_SumOfSquaredChange
+    m_RMSChange = std::sqrt( m_SumOfSquaredChange
                             / static_cast< double >( m_NumberOfPixelsProcessed ) );
     }
   m_MetricCalculationLock.Unlock();
diff --git a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx
index efd08e4..e48d607 100644
--- a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx
+++ b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkLevelSetMotionRegistrationFunction.hxx
@@ -44,8 +44,8 @@ LevelSetMotionRegistrationFunction< TFixedImage, TMovingImage, TDisplacementFiel
   m_GradientMagnitudeThreshold = 1e-9;
   m_IntensityDifferenceThreshold = 0.001;
   m_GradientSmoothingStandardDeviations = 1.0;
-  this->SetMovingImage(NULL);
-  this->SetFixedImage(NULL);
+  this->SetMovingImage(ITK_NULLPTR);
+  this->SetFixedImage(ITK_NULLPTR);
 
   typename DefaultInterpolatorType::Pointer interp =
     DefaultInterpolatorType::New();
@@ -362,7 +362,7 @@ LevelSetMotionRegistrationFunction< TFixedImage, TMovingImage, TDisplacementFiel
       }
     gradientMagnitude += vnl_math_sqr(gradient[j]);
     }
-  gradientMagnitude = vcl_sqrt(gradientMagnitude);
+  gradientMagnitude = std::sqrt(gradientMagnitude);
 
   /**
    * Compute Update.
@@ -451,7 +451,7 @@ LevelSetMotionRegistrationFunction< TFixedImage, TMovingImage, TDisplacementFiel
     {
     m_Metric = m_SumOfSquaredDifference
                / static_cast< double >( m_NumberOfPixelsProcessed );
-    m_RMSChange = vcl_sqrt( m_SumOfSquaredChange
+    m_RMSChange = std::sqrt( m_SumOfSquaredChange
                             / static_cast< double >( m_NumberOfPixelsProcessed ) );
     }
   m_MetricCalculationLock.Unlock();
diff --git a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx
index 913c789..735f5af 100644
--- a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx
+++ b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkMultiResolutionPDEDeformableRegistration.hxx
@@ -44,7 +44,7 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme
   m_MovingImagePyramid  = MovingImagePyramidType::New();
   m_FixedImagePyramid     = FixedImagePyramidType::New();
   m_FieldExpander     = FieldExpanderType::New();
-  m_InitialDisplacementField = NULL;
+  m_InitialDisplacementField = ITK_NULLPTR;
 
   m_NumberOfLevels = 3;
   m_NumberOfIterations.SetSize(m_NumberOfLevels);
@@ -262,7 +262,7 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme
   unsigned int fixedLevel = vnl_math_min( (int)m_CurrentLevel,
                                           (int)m_FixedImagePyramid->GetNumberOfLevels() );
 
-  DisplacementFieldPointer tempField = NULL;
+  DisplacementFieldPointer tempField = ITK_NULLPTR;
 
   DisplacementFieldPointer inputPtr =
     const_cast< DisplacementFieldType * >( this->GetInput(0) );
@@ -318,7 +318,7 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme
     m_FieldExpander->SetOutputDirection( fi->GetDirection() );
 
     m_FieldExpander->UpdateLargestPossibleRegion();
-    m_FieldExpander->SetInput(NULL);
+    m_FieldExpander->SetInput(ITK_NULLPTR);
     tempField = m_FieldExpander->GetOutput();
     tempField->DisconnectPipeline();
     }
@@ -329,7 +329,7 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme
     {
     if ( tempField.IsNull() )
       {
-      m_RegistrationFilter->SetInitialDisplacementField(NULL);
+      m_RegistrationFilter->SetInitialDisplacementField(ITK_NULLPTR);
       }
     else
       {
@@ -348,7 +348,7 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme
       m_FieldExpander->SetOutputDirection( fi->GetDirection() );
 
       m_FieldExpander->UpdateLargestPossibleRegion();
-      m_FieldExpander->SetInput(NULL);
+      m_FieldExpander->SetInput(ITK_NULLPTR);
       tempField = m_FieldExpander->GetOutput();
       tempField->DisconnectPipeline();
 
@@ -386,7 +386,7 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme
                                (int)m_FixedImagePyramid->GetNumberOfLevels() );
 
     // Invoke an iteration event.
-    this->InvokeEvent( IterationEvent() );
+    this->InvokeEvent( MultiResolutionIterationEvent() );
 
     // We can release data from pyramid which are no longer required.
     if ( movingLevel > 0 )
@@ -427,9 +427,9 @@ MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDisplaceme
     }
 
   // Release memory
-  m_FieldExpander->SetInput(NULL);
+  m_FieldExpander->SetInput(ITK_NULLPTR);
   m_FieldExpander->GetOutput()->ReleaseData();
-  m_RegistrationFilter->SetInput(NULL);
+  m_RegistrationFilter->SetInput(ITK_NULLPTR);
   m_RegistrationFilter->GetOutput()->ReleaseData();
 }
 
diff --git a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx
index 32cca04..92c6e0e 100644
--- a/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx
+++ b/Utilities/ITK/Modules/Registration/PDEDeformable/include/itkSymmetricForcesDemonsRegistrationFunction.hxx
@@ -39,8 +39,8 @@ SymmetricForcesDemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacem
   m_TimeStep = 1.0;
   m_DenominatorThreshold = 1e-9;
   m_IntensityDifferenceThreshold = 0.001;
-  this->SetMovingImage(NULL);
-  this->SetFixedImage(NULL);
+  this->SetMovingImage(ITK_NULLPTR);
+  this->SetFixedImage(ITK_NULLPTR);
   m_FixedImageSpacing.Fill(1.0);
   m_Normalizer = 0.0;
   m_FixedImageGradientCalculator = GradientCalculatorType::New();
@@ -317,7 +317,7 @@ SymmetricForcesDemonsRegistrationFunction< TFixedImage, TMovingImage, TDisplacem
     {
     m_Metric = m_SumOfSquaredDifference
                / static_cast< double >( m_NumberOfPixelsProcessed );
-    m_RMSChange = vcl_sqrt( m_SumOfSquaredChange
+    m_RMSChange = std::sqrt( m_SumOfSquaredChange
                             / static_cast< double >( m_NumberOfPixelsProcessed ) );
     }
   m_MetricCalculationLock.Unlock();
diff --git a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h
index 8b510ba..dbc1baf 100644
--- a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h
+++ b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h
@@ -25,13 +25,6 @@
 
 namespace itk
 {
-//Forward-declare these because of module dependency conflict.
-//They will soon be moved to a different module, at which
-// time this can be removed.
-template <unsigned int VDimension, typename TDataHolder>
-class ImageToData;
-template <typename TDataHolder>
-class Array1DToData;
 
 /** \class BSplineSyNImageRegistrationMethod
  * \brief Interface method for the performing greedy B-spline SyN image registration.
@@ -90,6 +83,7 @@ public:
 
   typedef typename Superclass::NumberOfIterationsArrayType            NumberOfIterationsArrayType;
 
+  typedef typename Superclass::InitialTransformType                   InitialTransformType;
   typedef TOutputTransform                                            OutputTransformType;
   typedef typename OutputTransformType::Pointer                       OutputTransformPointer;
   typedef typename OutputTransformType::ScalarType                    RealType;
diff --git a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx
index 9084e76..1d435a2 100644
--- a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx
+++ b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.hxx
@@ -79,7 +79,6 @@ BSplineSyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
 ::StartOptimization()
 {
   const DisplacementVectorType zeroVector( 0.0 );
-  typedef ImageDuplicator<DisplacementFieldType> DisplacementFieldDuplicatorType;
 
   typename VirtualImageType::ConstPointer virtualDomainImage;
   typename MovingImageMaskType::ConstPointer movingImageMask;
@@ -115,21 +114,22 @@ BSplineSyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
       }
     }
 
+  InitialTransformType* fixedInitialTransform = const_cast<InitialTransformType*>(this->GetFixedInitialTransform());
+
   // Monitor the convergence
   typedef itk::Function::WindowConvergenceMonitoringFunction<RealType> ConvergenceMonitoringType;
   typename ConvergenceMonitoringType::Pointer convergenceMonitoring = ConvergenceMonitoringType::New();
   convergenceMonitoring->SetWindowSize( this->m_ConvergenceWindowSize );
 
-  typedef IdentityTransform<RealType, ImageDimension> IdentityTransformType;
-  typename IdentityTransformType::Pointer identityTransform;
-  identityTransform = IdentityTransformType::New();
-
   IterationReporter reporter( this, 0, 1 );
 
   while( this->m_CurrentIteration++ < this->m_NumberOfIterationsPerLevel[this->m_CurrentLevel] && !this->m_IsConverged )
     {
     typename CompositeTransformType::Pointer fixedComposite = CompositeTransformType::New();
-    fixedComposite->AddTransform( this->m_FixedInitialTransform );
+    if ( fixedInitialTransform != ITK_NULLPTR )
+      {
+      fixedComposite->AddTransform( fixedInitialTransform );
+      }
     fixedComposite->AddTransform( this->m_FixedToMiddleTransform->GetInverseTransform() );
     fixedComposite->FlattenTransformQueue();
     fixedComposite->SetOnlyMostRecentTransformToOptimizeOn();
@@ -170,7 +170,7 @@ BSplineSyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
     fixedComposer->Update();
 
     DisplacementFieldPointer fixedToMiddleSmoothTotalFieldTmp = this->BSplineSmoothDisplacementField( fixedComposer->GetOutput(),
-      this->m_FixedToMiddleTransform->GetNumberOfControlPointsForTheTotalField(), NULL );
+      this->m_FixedToMiddleTransform->GetNumberOfControlPointsForTheTotalField(), ITK_NULLPTR );
 
     typename ComposerType::Pointer movingComposer = ComposerType::New();
     movingComposer->SetDisplacementField( movingToMiddleSmoothUpdateField );
@@ -178,7 +178,7 @@ BSplineSyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
     movingComposer->Update();
 
     DisplacementFieldPointer movingToMiddleSmoothTotalFieldTmp = this->BSplineSmoothDisplacementField( movingComposer->GetOutput(),
-      this->m_MovingToMiddleTransform->GetNumberOfControlPointsForTheTotalField(), NULL );
+      this->m_MovingToMiddleTransform->GetNumberOfControlPointsForTheTotalField(), ITK_NULLPTR );
 
     // Iteratively estimate the inverse fields.
 
@@ -384,7 +384,7 @@ BSplineSyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
   importer->SetDirection( virtualDomainImage->GetDirection() );
   importer->Update();
 
-  typename WeightedMaskImageType::Pointer weightedMask = NULL;
+  typename WeightedMaskImageType::Pointer weightedMask = ITK_NULLPTR;
 
   if( mask )
     {
@@ -424,7 +424,7 @@ BSplineSyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
       {
       localNorm += vnl_math_sqr( vector[d] / spacing[d] );
       }
-    localNorm = vcl_sqrt( localNorm );
+    localNorm = std::sqrt( localNorm );
 
     if( localNorm > maxNorm )
       {
diff --git a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h
index 2b1eda5..110bdf6 100644
--- a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h
+++ b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h
@@ -28,7 +28,7 @@
 #include "itkImageToImageMetricv4.h"
 #include "itkShrinkImageFilter.h"
 #include "itkTransform.h"
-#include "itkTransformParametersAdaptor.h"
+#include "itkTransformParametersAdaptorBase.h"
 
 #include <vector>
 
@@ -85,7 +85,10 @@ namespace itk
  *
  * \ingroup ITKRegistrationMethodsv4
  */
-template<typename TFixedImage, typename TMovingImage, typename TOutputTransform, typename TVirtualImage = TFixedImage>
+template<typename TFixedImage,
+         typename TMovingImage,
+         typename TOutputTransform=Transform<double, TFixedImage::ImageDimension,  TFixedImage::ImageDimension >,
+         typename TVirtualImage = TFixedImage>
 class ImageRegistrationMethodv4
 :public ProcessObject
 {
@@ -140,6 +143,9 @@ public:
    */
   typedef DataObjectDecorator<OutputTransformType>                    DecoratedOutputTransformType;
   typedef typename DecoratedOutputTransformType::Pointer              DecoratedOutputTransformPointer;
+  typedef DataObjectDecorator<InitialTransformType>                   DecoratedInitialTransformType;
+  typedef typename DecoratedInitialTransformType::Pointer             DecoratedInitialTransformPointer;
+
 
   typedef ShrinkImageFilter<FixedImageType, VirtualImageType>         ShrinkFilterType;
   typedef typename ShrinkFilterType::ShrinkFactorsType                ShrinkFactorsPerDimensionContainerType;
@@ -150,7 +156,7 @@ public:
   typedef Array<RealType>                                             MetricSamplingPercentageArrayType;
 
   /** Transform adaptor typedefs */
-  typedef TransformParametersAdaptor<OutputTransformType>             TransformParametersAdaptorType;
+  typedef TransformParametersAdaptorBase<InitialTransformType>        TransformParametersAdaptorType;
   typedef typename TransformParametersAdaptorType::Pointer            TransformParametersAdaptorPointer;
   typedef std::vector<TransformParametersAdaptorPointer>              TransformParametersAdaptorsContainerType;
 
@@ -221,12 +227,27 @@ public:
   itkGetConstMacro( MetricSamplingPercentagePerLevel, MetricSamplingPercentageArrayType );
 
   /** Set/Get the initial fixed transform. */
-  itkSetObjectMacro( FixedInitialTransform, InitialTransformType );
-  itkGetModifiableObjectMacro( FixedInitialTransform, InitialTransformType );
+  itkSetGetDecoratedObjectInputMacro( FixedInitialTransform, InitialTransformType );
 
   /** Set/Get the initial moving transform. */
-  itkSetObjectMacro( MovingInitialTransform, InitialTransformType );
-  itkGetModifiableObjectMacro( MovingInitialTransform, InitialTransformType );
+  itkSetGetDecoratedObjectInputMacro( MovingInitialTransform, InitialTransformType );
+
+  /** Set/Get the initial transform to be optimized
+   *
+   * This transform is composed with the MovingInitialTransform to
+   * specify the initial transformation from the moving image to
+   * the virtual image. It is used for the default parameters, and can
+   * be use to specify the transform type.
+   *
+   * If the filter has "InPlace" set then this transform will be the
+   * output transform object or "grafted" to the output. Otherwise,
+   * this InitialTransform will be deep copied or "cloned" to the
+   * output.
+   *
+   * If this parameter is not set then a default constructed output
+   * transform is used.
+   */
+  itkSetGetDecoratedObjectInputMacro(InitialTransform, InitialTransformType);
 
   /** Set/Get the transform adaptors. */
   void SetTransformParametersAdaptorsPerLevel( TransformParametersAdaptorsContainerType & );
@@ -303,11 +324,18 @@ public:
   /** Make a DataObject of the correct type to be used as the specified output. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType );
+  virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType ) ITK_OVERRIDE;
 
   /** Returns the transform resulting from the registration process  */
+  virtual DecoratedOutputTransformType * GetOutput();
   virtual const DecoratedOutputTransformType * GetOutput() const;
 
+  virtual DecoratedOutputTransformType * GetTransformOutput() { return this->GetOutput(); }
+  virtual const DecoratedOutputTransformType * GetTransformOutput() const { return this->GetOutput(); }
+
+  virtual OutputTransformType * GetModifiableTransform();
+  virtual const OutputTransformType * GetTransform() const;
+
   /** Get the current level.  This is a helper function for reporting observations. */
   itkGetConstMacro( CurrentLevel, SizeValueType );
 
@@ -323,6 +351,14 @@ public:
    /** Get the current convergence state per level.  This is a helper function for reporting observations. */
    itkGetConstReferenceMacro( IsConverged, bool );
 
+  /** Request that the InitialTransform be grafted onto the output,
+   * there by not creating a copy.
+   */
+  itkSetMacro(InPlace, bool);
+  itkGetConstMacro(InPlace, bool);
+  itkBooleanMacro(InPlace);
+
+
 #ifdef ITKV3_COMPATIBILITY
   /** Method that initiates the registration. This will Initialize and ensure
    * that all inputs the registration needs are in place, via a call to
@@ -345,10 +381,12 @@ public:
 protected:
   ImageRegistrationMethodv4();
   virtual ~ImageRegistrationMethodv4();
-  virtual void PrintSelf( std::ostream & os, Indent indent ) const;
+  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
 
   /** Perform the registration. */
-  virtual void  GenerateData();
+  virtual void  GenerateData() ITK_OVERRIDE;
+
+  virtual void AllocateOutputs();
 
   /** Initialize by setting the interconnects between the components. */
   virtual void InitializeRegistrationAtEachLevel( const SizeValueType );
@@ -380,18 +418,33 @@ protected:
   SmoothingSigmasArrayType                                        m_SmoothingSigmasPerLevel;
   bool                                                            m_SmoothingSigmasAreSpecifiedInPhysicalUnits;
 
-  InitialTransformPointer                                         m_MovingInitialTransform;
-  InitialTransformPointer                                         m_FixedInitialTransform;
-
   TransformParametersAdaptorsContainerType                        m_TransformParametersAdaptorsPerLevel;
 
   CompositeTransformPointer                                       m_CompositeTransform;
 
+  //TODO: m_OutputTransform should be removed and replaced with a named input parameter for
+  //      the pipeline  --- Along with many other fixes
   OutputTransformPointer                                          m_OutputTransform;
 
+
 private:
   ImageRegistrationMethodv4( const Self & );   //purposely not implemented
-  void operator=( const Self & );                  //purposely not implemented
+  void operator=( const Self & );              //purposely not implemented
+
+  bool                                                            m_InPlace;
+
+  // helper function to create the right kind of concrete transform
+  template<typename TTransform>
+  static void MakeOutputTransform(SmartPointer<TTransform> &ptr)
+    {
+      ptr = TTransform::New();
+    }
+
+  static void MakeOutputTransform(SmartPointer<InitialTransformType> &ptr)
+    {
+      ptr = itk::IdentityTransform<RealType, ImageDimension>::New().GetPointer();
+    }
+
 };
 } // end namespace itk
 
diff --git a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx
index bfd4935..5e632c6 100644
--- a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx
+++ b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx
@@ -39,7 +39,21 @@ template<typename TFixedImage, typename TMovingImage, typename TTransform, typen
 ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
 ::ImageRegistrationMethodv4()
 {
-  this->SetNumberOfRequiredOutputs( 1 );
+  ProcessObject::SetNumberOfRequiredOutputs(1);
+  Self::SetPrimaryOutputName("Transform");
+
+  // indexed input are alternating fixed and moving images
+  Self::SetPrimaryInputName("Fixed");
+  Self::AddRequiredInputName("Moving",1);
+  ProcessObject::SetNumberOfRequiredInputs(2);
+
+  // optional named inputs
+  Self::SetInput("InitialTransform", ITK_NULLPTR);
+  Self::SetInput("FixedInitialTransform", ITK_NULLPTR);
+  Self::SetInput("MovingInitialTransform", ITK_NULLPTR);
+
+
+  Self::ReleaseDataBeforeUpdateFlagOff();
 
   this->m_CurrentLevel = 0;
   this->m_CurrentIteration = 0;
@@ -49,15 +63,11 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
   this->m_NumberOfFixedImages = 0;
   this->m_NumberOfMovingImages = 0;
 
-  this->m_CompositeTransform = CompositeTransformType::New();
-
-  typedef IdentityTransform<RealType, ImageDimension> IdentityTransformType;
+  Self::ReleaseDataBeforeUpdateFlagOff();
 
-  typename IdentityTransformType::Pointer defaultFixedInitialTransform = IdentityTransformType::New();
-  this->m_FixedInitialTransform = defaultFixedInitialTransform;
+  this->m_InPlace = true;
 
-  typename IdentityTransformType::Pointer defaultMovingInitialTransform = IdentityTransformType::New();
-  this->m_MovingInitialTransform = defaultMovingInitialTransform;
+  this->m_CompositeTransform = CompositeTransformType::New();
 
   typedef MattesMutualInformationImageToImageMetricv4<FixedImageType, MovingImageType, VirtualImageType, RealType> DefaultMetricType;
   typename DefaultMetricType::Pointer mutualInformationMetric = DefaultMetricType::New();
@@ -82,11 +92,11 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
   this->m_OptimizerWeights.SetSize( 0 );
   this->m_OptimizerWeightsAreIdentity = true;
 
-  this->m_OutputTransform = OutputTransformType::New();
 
-  DecoratedOutputTransformPointer transformDecorator = DecoratedOutputTransformType::New().GetPointer();
-  transformDecorator->Set( this->m_OutputTransform );
+  DecoratedOutputTransformPointer transformDecorator =
+        itkDynamicCastInDebugMode< DecoratedOutputTransformType * >( this->MakeOutput(0).GetPointer() );
   this->ProcessObject::SetNthOutput( 0, transformDecorator );
+  this->m_OutputTransform = transformDecorator->GetModifiable();
 
   // By default we set up a 3-level image registration.
 
@@ -200,7 +210,7 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
       for( unsigned int i = 0; i < this->m_OptimizerWeights.Size(); i++ )
         {
         OptimizerWeightsValueType difference =
-          vcl_fabs( NumericTraits<OptimizerWeightsValueType>::OneValue() - this->m_OptimizerWeights[i] );
+          std::fabs( NumericTraits<OptimizerWeightsValueType>::OneValue() - this->m_OptimizerWeights[i] );
         if( difference > tolerance  )
           {
           this->m_OptimizerWeightsAreIdentity = false;
@@ -227,7 +237,7 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
     itkExceptionMacro( "The number of fixed and moving images is not equal." );
     }
 
-  SizeValueType numberOfImagePairs = static_cast<unsigned int>( 0.5 * this->GetNumberOfInputs() );
+  SizeValueType numberOfImagePairs = static_cast<unsigned int>( 0.5 * this->GetNumberOfIndexedInputs() );
 
   if( numberOfImagePairs == 0 )
     {
@@ -264,12 +274,15 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
     itkExceptionMacro( "The image metric is not present." );
     }
 
+  InitialTransformType* movingInitialTransform = const_cast<InitialTransformType*>(this->GetMovingInitialTransform());
+  InitialTransformType* fixedInitialTransform = const_cast<InitialTransformType*>(this->GetFixedInitialTransform());
+
   this->m_CurrentIteration = 0;
   this->m_CurrentMetricValue = 0.0;
   this->m_CurrentConvergenceValue = 0.0;
   this->m_IsConverged = false;
 
-  this->InvokeEvent( InitializeEvent() );
+  this->InvokeEvent( MultiResolutionIterationEvent() );
 
   // For each level, we adapt the current transform.  For many transforms, e.g.
   // affine, the base transform adaptor does not do anything.  However, in the
@@ -289,13 +302,22 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
     {
     this->m_CompositeTransform->ClearTransformQueue();
 
-    // If the moving initial transform is a composite transform, unroll
-    // it into m_CompositeTransform.  This is a temporary fix to accommodate
-    // the lack of support for calculating the jacobian in the composite
-    // transform.
+    // Since we cannot instantiate a null object from an abstract class, we need to initialize the moving
+    // initial transform as an identity transform.
+    // Nevertheless, we do not need add this transform to the composite transform when it is only an
+    // identity transform. Simply by not setting that, we can save lots of time in jacobian computations
+    // of the composite transform since we can avoid some matrix multiplications.
+
+    // Skip adding an IdentityTransform to the m_CompositeTransform
+    if( movingInitialTransform != ITK_NULLPTR &&
+      std::string(movingInitialTransform->GetNameOfClass() ) != std::string("IdentityTransform") )
+      {
+      this->m_CompositeTransform->AddTransform( movingInitialTransform );
+      }
 
-    this->m_CompositeTransform->AddTransform( this->m_MovingInitialTransform );
     this->m_CompositeTransform->AddTransform( this->m_OutputTransform );
+    // If the moving initial transform is a composite transform, unroll
+    // it into m_CompositeTransform.
     this->m_CompositeTransform->FlattenTransformQueue();
 
     if( this->m_OptimizerWeights.Size() > 0 )
@@ -317,7 +339,16 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
   typename MultiMetricType::Pointer multiMetric2 = dynamic_cast<MultiMetricType *>( this->m_Metric.GetPointer() );
   if( multiMetric2 )
     {
-    multiMetric2->SetFixedTransform( this->m_FixedInitialTransform );
+    if ( fixedInitialTransform )
+      {
+      multiMetric2->SetFixedTransform( fixedInitialTransform );
+      }
+    else
+      {
+      typedef IdentityTransform<RealType, ImageDimension> IdentityTransformType;
+      typename IdentityTransformType::Pointer defaultFixedInitialTransform = IdentityTransformType::New();
+      multiMetric2->SetFixedTransform( defaultFixedInitialTransform );
+      }
     multiMetric2->SetMovingTransform( this->m_CompositeTransform );
     multiMetric2->SetVirtualDomainFromImage( shrinkFilter->GetOutput() );
     for( unsigned int n = 0; n < multiMetric2->GetNumberOfMetrics(); n++ )
@@ -338,7 +369,16 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
     typename ImageMetricType::Pointer imageMetric = dynamic_cast<ImageMetricType *>( this->m_Metric.GetPointer() );
     if( imageMetric.IsNotNull() )
       {
-      imageMetric->SetFixedTransform( this->m_FixedInitialTransform );
+      if ( fixedInitialTransform )
+        {
+         imageMetric->SetFixedTransform( fixedInitialTransform );
+        }
+      else
+        {
+        typedef IdentityTransform<RealType, ImageDimension> IdentityTransformType;
+        typename IdentityTransformType::Pointer defaultFixedInitialTransform = IdentityTransformType::New();
+        imageMetric->SetFixedTransform( defaultFixedInitialTransform );
+        }
       imageMetric->SetMovingTransform( this->m_CompositeTransform );
       imageMetric->SetVirtualDomainFromImage( shrinkFilter->GetOutput() );
       }
@@ -439,6 +479,80 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
     }
 }
 
+
+template<typename TFixedImage, typename TMovingImage, typename TTransform, typename TVirtualImage>
+void
+ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
+::AllocateOutputs()
+{
+  const DecoratedInitialTransformType * decoratedInitialTransform = this->GetInitialTransformInput();
+  DecoratedOutputTransformType *decoratedOutputTransform = this->GetOutput();
+
+  if ( decoratedInitialTransform )
+    {
+    const InitialTransformType * initialTransform = decoratedInitialTransform->Get();
+
+    if ( initialTransform )
+      {
+      if ( this->GetInPlace() )
+        {
+        // graft the input to the output which may fail if the types
+        // aren't compatible.
+        decoratedOutputTransform->Graft( decoratedInitialTransform );
+
+        if ( decoratedOutputTransform->Get() )
+          {
+          this->m_OutputTransform = decoratedOutputTransform->GetModifiable();
+
+          // This is generally done in the ReleaseInputs methods,
+          // however we do not need it again
+          const_cast<DecoratedInitialTransformType *>(decoratedInitialTransform)->ReleaseData();
+
+          // successful in-place grafting
+          itkDebugMacro("inplace allocation of output transform");
+          return;
+          }
+        }
+
+      const OutputTransformType * initialAsOutputTransform = dynamic_cast<const OutputTransformType*>( initialTransform );
+
+      if ( initialAsOutputTransform )
+        {
+        // Clone performs a deep copy of the parameters and composition
+        this->m_OutputTransform = initialAsOutputTransform->Clone();
+        decoratedOutputTransform->Set(this->m_OutputTransform);
+
+        // successful deep copy from initial to output
+        itkDebugMacro("clone copy allocation of output transform");
+        return;
+        }
+      else
+        {
+        itkExceptionMacro("Unable to convert InitialTransform input to the OutputTransform type");
+        }
+
+      }
+    }
+
+  // fallback allocation and initialization
+
+
+  // initialize to identity? what happens if we re-run with optimized values?
+  itkDebugMacro("fallback allocation of output transform");
+
+  if ( !decoratedOutputTransform->Get() )
+    {
+    // the output decorated component is null, allocate
+    OutputTransformPointer ptr;
+    Self::MakeOutputTransform(ptr);
+    decoratedOutputTransform->Set(ptr);
+    }
+
+  this->m_OutputTransform = this->GetModifiableTransform();
+
+}
+
+
 /*
  * Start the registration
  */
@@ -447,6 +561,7 @@ void
 ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
 ::GenerateData()
 {
+  this->AllocateOutputs();
   for( this->m_CurrentLevel = 0; this->m_CurrentLevel < this->m_NumberOfLevels; this->m_CurrentLevel++ )
     {
     this->InitializeRegistrationAtEachLevel( this->m_CurrentLevel );
@@ -507,8 +622,7 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
     this->m_TransformParametersAdaptorsPerLevel.clear();
     for( SizeValueType level = 0; level < this->m_NumberOfLevels; level++ )
       {
-      typename TransformParametersAdaptorType::Pointer transformParametersAdaptor = TransformParametersAdaptorType::New();
-      this->m_TransformParametersAdaptorsPerLevel.push_back( transformParametersAdaptor.GetPointer() );
+      this->m_TransformParametersAdaptorsPerLevel.push_back( ITK_NULLPTR );
       }
 
     for( unsigned int level = 0; level < this->m_NumberOfLevels; ++level )
@@ -591,7 +705,7 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
       {
       case REGULAR:
         {
-        const unsigned long sampleCount = static_cast<unsigned long>( vcl_ceil( 1.0 / this->m_MetricSamplingPercentagePerLevel[this->m_CurrentLevel] ) );
+        const unsigned long sampleCount = static_cast<unsigned long>( std::ceil( 1.0 / this->m_MetricSamplingPercentagePerLevel[this->m_CurrentLevel] ) );
         unsigned long count = sampleCount; //Start at sampleCount to keep behavior backwards identical, using first element.
         ImageRegionConstIteratorWithIndex<VirtualDomainImageType> It( virtualImage, virtualDomainRegion );
         for( It.GoToBegin(); !It.IsAtEnd(); ++It )
@@ -663,8 +777,9 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
 ::PrintSelf( std::ostream & os, Indent indent ) const
 {
   Superclass::PrintSelf( os, indent );
+  Indent indent2 = indent.GetNextIndent();
 
-  os << "Number of levels = " << this->m_NumberOfLevels << std::endl;
+  os << indent << "Number of levels = " << this->m_NumberOfLevels << std::endl;
 
   for( unsigned int level = 0; level < this->m_NumberOfLevels; ++level )
     {
@@ -675,11 +790,11 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
 
   if( this->m_SmoothingSigmasAreSpecifiedInPhysicalUnits == true )
     {
-    os << indent << indent << "Smoothing sigmas are specified in physical units." << std::endl;
+    os << indent2 << "Smoothing sigmas are specified in physical units." << std::endl;
     }
   else
     {
-    os << indent << indent << "Smoothing sigmas are specified in voxel units." << std::endl;
+    os << indent2 << "Smoothing sigmas are specified in voxel units." << std::endl;
     }
 
   if( this->m_OptimizerWeights.Size() > 0 )
@@ -695,12 +810,22 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
     os << this->m_MetricSamplingPercentagePerLevel[i] << " ";
     }
   os << std::endl;
+
+  os << indent << "InPlace: " << ( m_InPlace ? "On" : "Off" ) << std::endl;
 }
 
 /*
  *  Get output transform
  */
 template<typename TFixedImage, typename TMovingImage, typename TTransform, typename TVirtualImage>
+typename ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>::DecoratedOutputTransformType *
+ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
+::GetOutput()
+{
+  return static_cast<DecoratedOutputTransformType *>( this->ProcessObject::GetOutput( 0 ) );
+}
+
+template<typename TFixedImage, typename TMovingImage, typename TTransform, typename TVirtualImage>
 const typename ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>::DecoratedOutputTransformType *
 ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
 ::GetOutput() const
@@ -709,6 +834,28 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
 }
 
 template<typename TFixedImage, typename TMovingImage, typename TTransform, typename TVirtualImage>
+typename ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>::OutputTransformType *
+ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
+::GetModifiableTransform()
+{
+  DecoratedOutputTransformType * temp = this->GetOutput();
+  // required outputs of process object should always exits
+  itkAssertInDebugAndIgnoreInReleaseMacro( temp != ITK_NULLPTR );
+  return temp->GetModifiable();
+}
+
+template<typename TFixedImage, typename TMovingImage, typename TTransform, typename TVirtualImage>
+const typename ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>::OutputTransformType *
+ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
+::GetTransform() const
+{
+  const  DecoratedOutputTransformType * temp = this->GetOutput();
+  // required outputs of process object should always exits
+  itkAssertInDebugAndIgnoreInReleaseMacro( temp != ITK_NULLPTR );
+  return temp->Get();
+}
+
+template<typename TFixedImage, typename TMovingImage, typename TTransform, typename TVirtualImage>
 DataObject::Pointer
 ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
 ::MakeOutput( DataObjectPointerArraySizeType output )
@@ -716,11 +863,16 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage>
   switch ( output )
     {
     case 0:
-      return DecoratedOutputTransformType::New().GetPointer();
-      break;
+      {
+      OutputTransformPointer ptr;
+      Self::MakeOutputTransform(ptr);
+      DecoratedOutputTransformPointer transformDecorator =  DecoratedOutputTransformType::New();
+      transformDecorator->Set( ptr );
+      return transformDecorator.GetPointer();
+      }
     default:
       itkExceptionMacro("MakeOutput request for an output number larger than the expected number of outputs");
-      return 0;
+      return ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h
index dc430cd..64e86c3 100644
--- a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h
+++ b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h
@@ -24,13 +24,6 @@
 
 namespace itk
 {
-//Forward-declare these because of module dependency conflict.
-//They will soon be moved to a different module, at which
-// time this can be removed.
-template <unsigned int VDimension, typename TDataHolder>
-class ImageToData;
-template <typename TDataHolder>
-class Array1DToData;
 
 /** \class SyNImageRegistrationMethod
  * \brief Interface method for the performing greedy SyN image registration.
@@ -107,6 +100,7 @@ public:
   typedef typename ImageMetricType::FixedImageMaskType                FixedImageMaskType;
   typedef typename ImageMetricType::MovingImageMaskType               MovingImageMaskType;
 
+  typedef typename Superclass::InitialTransformType                   InitialTransformType;
   typedef TOutputTransform                                            OutputTransformType;
   typedef typename OutputTransformType::Pointer                       OutputTransformPointer;
   typedef typename OutputTransformType::ScalarType                    RealType;
diff --git a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.hxx b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.hxx
index 1411eb6..99c8d22 100644
--- a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.hxx
+++ b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.hxx
@@ -130,7 +130,6 @@ SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
 ::StartOptimization()
 {
   const DisplacementVectorType zeroVector( 0.0 );
-  typedef ImageDuplicator<DisplacementFieldType> DisplacementFieldDuplicatorType;
   typename VirtualImageType::ConstPointer virtualDomainImage;
   typename MultiMetricType::Pointer multiMetric = dynamic_cast<MultiMetricType *>( this->m_Metric.GetPointer() );
   if( multiMetric )
@@ -142,21 +141,22 @@ SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
     virtualDomainImage = dynamic_cast<ImageMetricType *>( this->m_Metric.GetPointer() )->GetVirtualImage();
     }
 
+  InitialTransformType* fixedInitialTransform = const_cast<InitialTransformType*>(this->GetFixedInitialTransform());
+
   // Monitor the convergence
   typedef itk::Function::WindowConvergenceMonitoringFunction<RealType> ConvergenceMonitoringType;
   typename ConvergenceMonitoringType::Pointer convergenceMonitoring = ConvergenceMonitoringType::New();
   convergenceMonitoring->SetWindowSize( this->m_ConvergenceWindowSize );
 
-  typedef IdentityTransform<RealType, ImageDimension> IdentityTransformType;
-  typename IdentityTransformType::Pointer identityTransform;
-  identityTransform = IdentityTransformType::New();
-
   IterationReporter reporter( this, 0, 1 );
 
   while( this->m_CurrentIteration++ < this->m_NumberOfIterationsPerLevel[this->m_CurrentLevel] && !this->m_IsConverged )
     {
     typename CompositeTransformType::Pointer fixedComposite = CompositeTransformType::New();
-    fixedComposite->AddTransform( this->m_FixedInitialTransform );
+    if ( fixedInitialTransform != ITK_NULLPTR )
+      {
+      fixedComposite->AddTransform( fixedInitialTransform );
+      }
     fixedComposite->AddTransform( this->m_FixedToMiddleTransform->GetInverseTransform() );
     fixedComposite->FlattenTransformQueue();
     fixedComposite->SetOnlyMostRecentTransformToOptimizeOn();
@@ -173,9 +173,9 @@ SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
     MeasureType movingMetricValue = 0.0;
 
     DisplacementFieldPointer fixedToMiddleSmoothUpdateField = this->ComputeUpdateField(
-      this->m_FixedSmoothImages, fixedComposite, this->m_MovingSmoothImages, movingComposite, NULL, movingMetricValue );
+      this->m_FixedSmoothImages, fixedComposite, this->m_MovingSmoothImages, movingComposite, ITK_NULLPTR, movingMetricValue );
     DisplacementFieldPointer movingToMiddleSmoothUpdateField = this->ComputeUpdateField(
-      this->m_MovingSmoothImages, movingComposite, this->m_FixedSmoothImages, fixedComposite, NULL, fixedMetricValue );
+      this->m_MovingSmoothImages, movingComposite, this->m_FixedSmoothImages, fixedComposite, ITK_NULLPTR, fixedMetricValue );
 
     if ( this->m_AverageMidPointGradients )
       {
@@ -406,7 +406,7 @@ SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
       {
       localNorm += vnl_math_sqr( vector[d] / spacing[d] );
       }
-    localNorm = vcl_sqrt( localNorm );
+    localNorm = std::sqrt( localNorm );
 
     if( localNorm > maxNorm )
       {
@@ -550,6 +550,8 @@ void
 SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
 ::GenerateData()
 {
+  this->AllocateOutputs();
+
   for( this->m_CurrentLevel = 0; this->m_CurrentLevel < this->m_NumberOfLevels; this->m_CurrentLevel++ )
     {
     this->InitializeRegistrationAtEachLevel( this->m_CurrentLevel );
@@ -580,9 +582,7 @@ SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform>
   this->m_OutputTransform->SetDisplacementField( composer->GetOutput() );
   this->m_OutputTransform->SetInverseDisplacementField( inverseComposer->GetOutput() );
 
-  DecoratedOutputTransformPointer transformDecorator = DecoratedOutputTransformType::New().GetPointer();
-  transformDecorator->Set( this->m_OutputTransform );
-  this->ProcessObject::SetNthOutput( 0, transformDecorator );
+  this->GetTransformOutput()->Set(this->m_OutputTransform);
 }
 
 /*
diff --git a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h
index b254cb1..6bbd325 100644
--- a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h
+++ b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h
@@ -26,13 +26,6 @@
 
 namespace itk
 {
-//Forward-declare these because of module dependency conflict.
-//They will soon be moved to a different module, at which
-// time this can be removed.
-template <unsigned int VDimension, typename TDataHolder>
-class ImageToData;
-template <typename TDataHolder>
-class Array1DToData;
 
 /** \class TimeVaryingBSplineVelocityFieldImageRegistrationMethod
  * \brief Interface method for the current registration framework
diff --git a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx
index 6d9d54d..753ed95 100644
--- a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx
+++ b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.hxx
@@ -153,7 +153,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod<TFixedImage, TMovingImage
   this->m_OutputTransform->SetVelocityFieldSize( sampledVelocityFieldSize );
   this->m_OutputTransform->IntegrateVelocityField();
 
-  typename TimeVaryingWeightedMaskImageType::Pointer timeVaryingFixedWeightedMaskImage = NULL;
+  typename TimeVaryingWeightedMaskImageType::Pointer timeVaryingFixedWeightedMaskImage = ITK_NULLPTR;
   if( fixedImageMask )
     {
     timeVaryingFixedWeightedMaskImage = TimeVaryingWeightedMaskImageType::New();
@@ -444,7 +444,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod<TFixedImage, TMovingImage
     const typename VirtualImageType::IndexType virtualDomainIndex = virtualDomainImage->GetLargestPossibleRegion().GetIndex();
     const typename VirtualImageType::SizeType virtualDomainSize = virtualDomainImage->GetLargestPossibleRegion().GetSize();
 
-    typename MaskImageType::ConstPointer maskImage = NULL;
+    typename MaskImageType::ConstPointer maskImage = ITK_NULLPTR;
     if( fixedImageMask )
       {
       typename ImageMaskSpatialObjectType::Pointer imageMask = dynamic_cast<ImageMaskSpatialObjectType *>( const_cast<FixedImageMaskType *>( fixedImageMask.GetPointer() ) );
@@ -559,7 +559,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod<TFixedImage, TMovingImage
 
     TimeVaryingVelocityFieldControlPointLatticePointer updateControlPointLattice = bspliner->GetPhiLattice();
 
-    TimeVaryingVelocityFieldPointer velocityField = NULL;
+    TimeVaryingVelocityFieldPointer velocityField = ITK_NULLPTR;
     if( this->GetDebug() )
       {
       velocityField = bspliner->GetOutput();
@@ -581,6 +581,15 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod<TFixedImage, TMovingImage
     if( this->m_CurrentConvergenceValue < this->m_ConvergenceThreshold )
       {
       this->m_IsConverged = true;
+      }
+
+    if( this->m_IsConverged || this->m_CurrentIteration >= this->m_NumberOfIterationsPerLevel[this->m_CurrentLevel] )
+      {
+
+      // Once we finish by convergence or exceeding number of iterations,
+      // we need to reset the transform by resetting the time bounds to the
+      // full range [0,1] and integrating the velocity field to get the
+      // forward and inverse displacement fields.
 
       this->m_OutputTransform->SetLowerTimeBound( 0 );
       this->m_OutputTransform->SetUpperTimeBound( 1.0 );
@@ -637,6 +646,9 @@ void
 TimeVaryingBSplineVelocityFieldImageRegistrationMethod<TFixedImage, TMovingImage, TTransform>
 ::GenerateData()
 {
+
+  this->AllocateOutputs();
+
   for( this->m_CurrentLevel = 0; this->m_CurrentLevel < this->m_NumberOfLevels; this->m_CurrentLevel++ )
     {
     this->InitializeRegistrationAtEachLevel( this->m_CurrentLevel );
@@ -652,9 +664,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod<TFixedImage, TMovingImage
     this->m_CompositeTransform->AddTransform( this->m_OutputTransform );
     }
 
-  DecoratedOutputTransformPointer transformDecorator = DecoratedOutputTransformType::New().GetPointer();
-  transformDecorator->Set( this->m_OutputTransform );
-  this->ProcessObject::SetNthOutput( 0, transformDecorator );
+  this->GetTransformOutput()->Set(this->m_OutputTransform);
 }
 
 /*
diff --git a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h
index 1471e8b..2c88a1c 100644
--- a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h
+++ b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.h
@@ -25,14 +25,6 @@
 namespace itk
 {
 
-// Forward-declare these because of module dependency conflict.
-// They will soon be moved to a different module, at which
-// time this can be removed.
-template <unsigned int VDimension, typename TDataHolder>
-class ImageToData;
-template <typename TDataHolder>
-class Array1DToData;
-
 /** \class TimeVaryingVelocityFieldImageRegistrationMethodv4
  * \brief Interface method for the current registration framework
  * using the time varying velocity field transform.
diff --git a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx
index 228d889..783cd8b 100644
--- a/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx
+++ b/Utilities/ITK/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingVelocityFieldImageRegistrationMethodv4.hxx
@@ -334,6 +334,15 @@ TimeVaryingVelocityFieldImageRegistrationMethodv4<TFixedImage, TMovingImage, TOu
     if( this->m_CurrentConvergenceValue < this->m_ConvergenceThreshold )
       {
       this->m_IsConverged = true;
+      }
+
+    if( this->m_IsConverged || this->m_CurrentIteration >= this->m_NumberOfIterationsPerLevel[this->m_CurrentLevel] )
+      {
+
+      // Once we finish by convergence or exceeding number of iterations,
+      // we need to reset the transform by resetting the time bounds to the
+      // full range [0,1] and integrating the velocity field to get the
+      // forward and inverse displacement fields.
 
       this->m_OutputTransform->SetLowerTimeBound( 0 );
       this->m_OutputTransform->SetUpperTimeBound( 1.0 );
@@ -390,6 +399,9 @@ void
 TimeVaryingVelocityFieldImageRegistrationMethodv4<TFixedImage, TMovingImage, TOutputTransform>
 ::GenerateData()
 {
+
+  this->AllocateOutputs();
+
   for( this->m_CurrentLevel = 0; this->m_CurrentLevel < this->m_NumberOfLevels; this->m_CurrentLevel++ )
     {
     this->InitializeRegistrationAtEachLevel( this->m_CurrentLevel );
@@ -405,9 +417,7 @@ TimeVaryingVelocityFieldImageRegistrationMethodv4<TFixedImage, TMovingImage, TOu
     this->m_CompositeTransform->AddTransform( this->m_OutputTransform );
     }
 
-  DecoratedOutputTransformPointer transformDecorator = DecoratedOutputTransformType::New().GetPointer();
-  transformDecorator->Set( this->m_OutputTransform );
-  this->ProcessObject::SetNthOutput( 0, transformDecorator );
+  this->GetTransformOutput()->Set(this->m_OutputTransform);
 }
 
 /*
diff --git a/Utilities/ITK/Modules/Remote/AnalyzeObjectMapIO.remote.cmake b/Utilities/ITK/Modules/Remote/AnalyzeObjectMapIO.remote.cmake
new file mode 100644
index 0000000..372a492
--- /dev/null
+++ b/Utilities/ITK/Modules/Remote/AnalyzeObjectMapIO.remote.cmake
@@ -0,0 +1,5 @@
+itk_fetch_module(AnalyzeObjectMapIO
+  "AnalyzeObjectMapIO plugin for ITK. From Insight Journal article with handle: http://hdl.handle.net/1926/593"
+  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/itkAnalyzeObjectMap.git
+  GIT_TAG ea14a5547de995c3f2c7f10948a3df2091de3034
+  )
diff --git a/Utilities/ITK/Modules/Remote/FDFImageIO.remote.cmake b/Utilities/ITK/Modules/Remote/FDFImageIO.remote.cmake
new file mode 100644
index 0000000..cb7f2ba
--- /dev/null
+++ b/Utilities/ITK/Modules/Remote/FDFImageIO.remote.cmake
@@ -0,0 +1,5 @@
+itk_fetch_module(FDFImageIO
+  "FDFImageIO plugin for ITK. Authors Gleen Pierce/Nick Tustison/Kent Williams"
+  GIT_REPOSITORY http://github.com/InsightSoftwareConsortium/itkFDFImageIO.git
+  GIT_TAG df4888e4f843c18605da1229c28553933994ddbd
+  )
diff --git a/Utilities/ITK/Modules/Remote/IOSTL.remote.cmake b/Utilities/ITK/Modules/Remote/IOSTL.remote.cmake
new file mode 100644
index 0000000..aa4cc21
--- /dev/null
+++ b/Utilities/ITK/Modules/Remote/IOSTL.remote.cmake
@@ -0,0 +1,7 @@
+# Contact: Luis Ibanez <luis.ibanez at kitware.com>
+itk_fetch_module(IOSTL
+  "This module contains classes for reading and writing QuadEdgeMeshes using
+  the STL (STereoLithography)file format. http://hdl.handle.net/10380/3452"
+  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKSTLMeshIO.git
+  GIT_TAG 933359a5fd1bac792a3c0af5f4e05e291e153677
+  )
diff --git a/Utilities/ITK/Modules/Remote/LesionSizingToolkit.remote.cmake b/Utilities/ITK/Modules/Remote/LesionSizingToolkit.remote.cmake
index a3e431b..0bbdc44 100644
--- a/Utilities/ITK/Modules/Remote/LesionSizingToolkit.remote.cmake
+++ b/Utilities/ITK/Modules/Remote/LesionSizingToolkit.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(LesionSizingToolkit
   "Framework for determining the sizes of lesions in medical images."
   GIT_REPOSITORY http://public.kitware.com/LesionSizingToolkit.git
-  GIT_TAG  c03168c0ff69386d7f59b00b46875273852068c7
+  GIT_TAG fd9cfcef3bb4f7678bc50ecbe6ad51c6998cc3db
   )
diff --git a/Utilities/ITK/Modules/Remote/MGHIO.remote.cmake b/Utilities/ITK/Modules/Remote/MGHIO.remote.cmake
index fb52f58..e0a050c 100644
--- a/Utilities/ITK/Modules/Remote/MGHIO.remote.cmake
+++ b/Utilities/ITK/Modules/Remote/MGHIO.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(MGHIO
   "MGHIO ImageIO plugin for ITK"
   GIT_REPOSITORY https://github.com/Slicer/itkMGHImageIO.git
-  GIT_TAG d43fc18d3023a8eba2bdc50cae8adf1f77160c67
+  GIT_TAG f4e475c47f5c246b1ebf0529e052f65b73c7d13d
   )
diff --git a/Utilities/ITK/Modules/Remote/SCIFIO.remote.cmake b/Utilities/ITK/Modules/Remote/SCIFIO.remote.cmake
index 52fd2b6..5dde18d 100644
--- a/Utilities/ITK/Modules/Remote/SCIFIO.remote.cmake
+++ b/Utilities/ITK/Modules/Remote/SCIFIO.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(SCIFIO
   "SCIFIO (Bioformats) ImageIO plugin for ITK"
   GIT_REPOSITORY https://github.com/scifio/scifio-imageio.git
-  GIT_TAG 3e76055918e70c8e97730d1e321ec59f15007f4c
+  GIT_TAG da6edd6bcefd8f107a3ed34ed663bfc69b3dc167
   )
diff --git a/Utilities/ITK/Modules/Remote/SkullStrip.remote.cmake b/Utilities/ITK/Modules/Remote/SkullStrip.remote.cmake
new file mode 100644
index 0000000..11ed169
--- /dev/null
+++ b/Utilities/ITK/Modules/Remote/SkullStrip.remote.cmake
@@ -0,0 +1,5 @@
+itk_fetch_module(SkullStrip
+  "A class to perform automatic skull-stripping for neuroimage analysis."
+  GIT_REPOSITORY https://github.com/lorensen/skullStrip.git
+  GIT_TAG master
+  )
diff --git a/Utilities/ITK/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake b/Utilities/ITK/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
index 3692941..957c71b 100644
--- a/Utilities/ITK/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
+++ b/Utilities/ITK/Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
@@ -2,5 +2,5 @@
 itk_fetch_module(SmoothingRecursiveYvvGaussianFilter
   "GPU and CPU Young & Van Vliet Recursive Gaussian Smoothing Filter: http://hdl.handle.net/10380/3425"
   GIT_REPOSITORY https://github.com/Inria-Asclepios/SmoothingRecursiveYvvGaussianFilter
-  GIT_TAG d66cc15f97f98a6ecbf6e6ef8a5b52615ffb883e
+  GIT_TAG b3b6cab4848b4ad88b31384ada303ea2eeb663e4
   )
diff --git a/Utilities/ITK/Modules/Remote/SphinxExamples.remote.cmake b/Utilities/ITK/Modules/Remote/SphinxExamples.remote.cmake
new file mode 100644
index 0000000..82e4839
--- /dev/null
+++ b/Utilities/ITK/Modules/Remote/SphinxExamples.remote.cmake
@@ -0,0 +1,7 @@
+# Contact: Matt McCormick <matt.mccormick at kitware.com>
+itk_fetch_module(SphinxExamples
+  "This module builds the examples found at http://itk.org/ITKExamples/"
+  GIT_REPOSITORY http://itk.org/ITKExamples.git
+  # 2014-06-19
+  GIT_TAG e256071ab7e813fc5c8c3875d591c8625e766fd1
+  )
diff --git a/Utilities/ITK/Modules/Remote/SplitComponents.remote.cmake b/Utilities/ITK/Modules/Remote/SplitComponents.remote.cmake
new file mode 100644
index 0000000..d618b31
--- /dev/null
+++ b/Utilities/ITK/Modules/Remote/SplitComponents.remote.cmake
@@ -0,0 +1,9 @@
+# Contact: Matt McCormick <matt.mccormick at kitware.com>
+itk_fetch_module(SplitComponents
+"This module contains filter called
+itk::SplitComponentsImageFilter.  This filter generates component images from an
+itk::Image of, for example, itk::Vector, itk::CovariantVector, or
+itk::SymmetricSecondRankTensor. http://hdl.handle.net/10380/3230"
+  GIT_REPOSITORY https://github.com/thewtex/ITKSplitComponents/
+  GIT_TAG 9747f758d63ba957923c268123b1124e4e2cb075
+  )
diff --git a/Utilities/ITK/Modules/Remote/VariationalRegistration.remote.cmake b/Utilities/ITK/Modules/Remote/VariationalRegistration.remote.cmake
new file mode 100644
index 0000000..26b7eba
--- /dev/null
+++ b/Utilities/ITK/Modules/Remote/VariationalRegistration.remote.cmake
@@ -0,0 +1,9 @@
+# Insight Journal Handle: http://hdl.handle.net/10380/3460
+# Contact: Alexander Schmidt-Richberg <a.schmidt-richberg at imperial.ac.uk>
+#          Jan Ehrhardt <ehrhardt at imi.uni-luebeck.de>
+#          Rene Werner <r.werner at uke.de>
+itk_fetch_module(VariationalRegistration
+  "A module to perform variational image registration. http://hdl.handle.net/10380/3460"
+  GIT_REPOSITORY https://github.com/VariationalRegistration/VariationalRegistration.git
+  GIT_TAG bd3ae2f8a37f76dc1700e7369e8edb03c31ff6dd
+  )
diff --git a/Utilities/ITK/Modules/Remote/WikiExamples.remote.cmake b/Utilities/ITK/Modules/Remote/WikiExamples.remote.cmake
new file mode 100644
index 0000000..ba1eed7
--- /dev/null
+++ b/Utilities/ITK/Modules/Remote/WikiExamples.remote.cmake
@@ -0,0 +1,13 @@
+#
+# ITK WikiExamples
+#  This remote module require a VTK build
+#  The following CMake variable must be set for the ITK build
+#
+# Check for requires cmake variables
+
+itk_fetch_module(WikiExamples
+  "A collection of examples that illustrate how to use ITK."
+  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKWikiExamples.git
+# June 17, 2014
+  GIT_TAG 3d2213fb7475adbd1522f0e3a5e1747aa4dfe4f4
+  )
diff --git a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCell.h b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCell.h
index e33de4f..b939079 100644
--- a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCell.h
+++ b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCell.h
@@ -56,7 +56,7 @@ public:
 
   virtual void Mitosis(void);
 
-  virtual void Apoptosis(void);
+  virtual void Apoptosis(void) ITK_OVERRIDE;
 
   virtual void ReceptorsReading(void);
 
diff --git a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCell.hxx b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCell.hxx
index e3693e1..968655d 100644
--- a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCell.hxx
+++ b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCell.hxx
@@ -32,7 +32,8 @@ namespace bio
  */
 template< unsigned int NSpaceDimension >
 Cell< NSpaceDimension >
-::Cell()
+::Cell() :
+  m_Aggregate(ITK_NULLPTR)
 {
   m_Force.Fill(0.0f);
 
@@ -64,8 +65,8 @@ Cell< NSpaceDimension >
 
   // Broad compensation for Volume distribution among daugthers.
   // The type of root should depend on the Dimension...
-  siblingA->m_Radius   = m_Radius / vcl_sqrt(2.0f);
-  siblingB->m_Radius   = m_Radius / vcl_sqrt(2.0f);
+  siblingA->m_Radius   = m_Radius / std::sqrt(2.0f);
+  siblingB->m_Radius   = m_Radius / std::sqrt(2.0f);
 
   // Update Teleomeres
   siblingA->m_Generation = m_Generation + 1;
@@ -85,8 +86,8 @@ Cell< NSpaceDimension >
   siblingB->m_Genome = m_GenomeCopy;
 
   // Mark that the genome pointer is not owned by this cell anymore.
-  m_Genome     = NULL;
-  m_GenomeCopy = NULL;
+  m_Genome     = ITK_NULLPTR;
+  m_GenomeCopy = ITK_NULLPTR;
 
   // Register both daughter cells with the CellularAggregate.
   CellularAggregateBase *aggregate = this->GetCellularAggregate();
@@ -188,7 +189,7 @@ Cell< NSpaceDimension >
   if ( m_ChemoAttractantLevel > ChemoAttractantLowThreshold
        && m_ChemoAttractantLevel < ChemoAttractantHighThreshold   )
     {
-    double factor = 1.0 / vcl_pow( m_Radius, (double)( NSpaceDimension ) );
+    double factor = 1.0 / std::pow( m_Radius, (double)( NSpaceDimension ) );
     m_Force += force;
     m_Pressure += force.GetNorm() * factor;
     }
diff --git a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.h b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.h
index 63b67d0..9b5b34c 100644
--- a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.h
+++ b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.h
@@ -128,9 +128,9 @@ public:
 
   virtual void Add(CellBase *cell, const VectorType & perturbation);
 
-  virtual void Add(CellBase *cellA, CellBase *cellB, double perturbationLength);
+  virtual void Add(CellBase *cellA, CellBase *cellB, double perturbationLength) ITK_OVERRIDE;
 
-  virtual void Remove(CellBase *cell);
+  virtual void Remove(CellBase *cell) ITK_OVERRIDE;
 
   virtual void GetVoronoi(IdentifierType cellId, VoronoiRegionAutoPointer &) const;
 
@@ -141,7 +141,7 @@ public:
   virtual SubstratesVector & GetSubstrates(void);
 
   virtual SubstrateValueType GetSubstrateValue(IdentifierType cellId,
-                                               unsigned int substrateId) const;
+                                               unsigned int substrateId) const ITK_OVERRIDE;
 
   virtual void KillAll(void);
 
@@ -151,7 +151,7 @@ protected:
   CellularAggregate(const Self &);
   void operator=(const Self &);
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   virtual void ComputeForces(void);
 
diff --git a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.hxx b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.hxx
index 2b215e8..feff31c 100644
--- a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.hxx
+++ b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregate.hxx
@@ -453,7 +453,7 @@ CellularAggregate< NSpaceDimension >
       {
       const IdentifierType cell2Id = ( *neighbor );
 
-      BioCellType *cell2 = 0;
+      BioCellType *cell2 = ITK_NULLPTR;
       PointType    position2;
 
       if ( !m_Mesh->GetPoint(cell2Id, &position2) )
@@ -506,7 +506,7 @@ CellularAggregate< NSpaceDimension >
 
     PointsConstIterator point2It   = beginPoints;
 
-    BioCellType *cell1 = 0;
+    BioCellType *cell1 = ITK_NULLPTR;
 
     IdentifierType cell1Id = point1It.Index();
     m_Mesh->GetPointData(cell1Id, &cell1);
@@ -627,7 +627,6 @@ CellularAggregate< NSpaceDimension >
   SubstratePointer substrate = m_Substrates[substrateId];
 
   typename SubstrateType::IndexType index;
-  typedef typename SubstrateType::IndexType::IndexValueType IndexValueType;
 
   substrate->TransformPhysicalPointToIndex(cellPosition, index);
 
diff --git a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregateBase.h b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregateBase.h
index 9dcadaf..bb09d23 100644
--- a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregateBase.h
+++ b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioCellularAggregateBase.h
@@ -66,7 +66,7 @@ protected:
   CellularAggregateBase();
   virtual ~CellularAggregateBase();
   CellularAggregateBase(const Self &);
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 };
 } // end namespace bio
 } // end namespace itk
diff --git a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioGenome.h b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioGenome.h
index 58a838e..832b983 100644
--- a/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioGenome.h
+++ b/Utilities/ITK/Modules/Segmentation/BioCell/include/itkBioGenome.h
@@ -26,7 +26,7 @@
 
 #include <map>
 #include <string>
-#include "vcl_cmath.h"
+#include <cmath>
 
 namespace itk
 {
@@ -65,7 +65,7 @@ public:
    *  be used for gene network computations.  */
   static double Sigmoide(double threshold, double slant, double value)
   {
-    return vcl_atan( ( value - threshold ) / slant ) / 3.1416 + 0.5001;
+    return std::atan( ( value - threshold ) / slant ) / 3.1416 + 0.5001;
   }
 
 private:
diff --git a/Utilities/ITK/Modules/Segmentation/BioCell/src/itkBioCellBase.cxx b/Utilities/ITK/Modules/Segmentation/BioCell/src/itkBioCellBase.cxx
index d38fdfe..9bffe94 100644
--- a/Utilities/ITK/Modules/Segmentation/BioCell/src/itkBioCellBase.cxx
+++ b/Utilities/ITK/Modules/Segmentation/BioCell/src/itkBioCellBase.cxx
@@ -64,8 +64,8 @@ CellBase::ColorType CellBase:: StarvingColor;
 CellBase
 ::CellBase()
 {
-  m_Genome      = NULL;
-  m_GenomeCopy  = NULL;
+  m_Genome      = ITK_NULLPTR;
+  m_GenomeCopy  = ITK_NULLPTR;
 
   m_Radius      = DefaultRadius;
   m_Color       = DefaultColor;
@@ -107,9 +107,9 @@ CellBase
 ::~CellBase()
 {
   delete m_Genome;
-  m_Genome = NULL;
+  m_Genome = ITK_NULLPTR;
   delete m_GenomeCopy;
-  m_GenomeCopy = NULL;
+  m_GenomeCopy = ITK_NULLPTR;
 }
 
 /**
@@ -132,9 +132,9 @@ CellBase
 ::Apoptosis(void)
 {
   delete m_Genome;
-  m_Genome = NULL;
+  m_Genome = ITK_NULLPTR;
   delete m_GenomeCopy;
-  m_GenomeCopy = NULL;
+  m_GenomeCopy = ITK_NULLPTR;
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx
index 2a33195..4d96cdb 100644
--- a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkBayesianClassifierImageFilter.hxx
@@ -46,7 +46,7 @@ BayesianClassifierImageFilter< TInputVectorImage, TLabelsType,
   m_UserProvidedSmoothingFilter = false;
   this->SetNumberOfRequiredOutputs(2);
   m_NumberOfSmoothingIterations = 0;
-  m_SmoothingFilter = NULL;
+  m_SmoothingFilter = ITK_NULLPTR;
   PosteriorsImagePointer p =
     static_cast< PosteriorsImageType * >( this->MakeOutput(1).GetPointer() );
   this->SetNthOutput( 1, p.GetPointer() );
@@ -174,7 +174,7 @@ BayesianClassifierImageFilter< TInputVectorImage, TLabelsType,
     const PriorsImageType *priorsImage =
       dynamic_cast< const PriorsImageType * >( this->GetInput(1) );
 
-    if ( priorsImage == NULL )
+    if ( priorsImage == ITK_NULLPTR )
       {
       itkExceptionMacro("Second input type does not correspond to expected Priors Image Type");
       }
@@ -182,7 +182,7 @@ BayesianClassifierImageFilter< TInputVectorImage, TLabelsType,
     PosteriorsImageType *posteriorsImage =
       dynamic_cast< PosteriorsImageType * >( this->GetPosteriorImage() );
 
-    if ( posteriorsImage == NULL )
+    if ( posteriorsImage == ITK_NULLPTR )
       {
       itkExceptionMacro("Second output type does not correspond to expected Posteriors Image Type");
       }
@@ -219,7 +219,7 @@ BayesianClassifierImageFilter< TInputVectorImage, TLabelsType,
     PosteriorsImageType *posteriorsImage =
       dynamic_cast< PosteriorsImageType * >( this->GetPosteriorImage() );
 
-    if ( posteriorsImage == NULL )
+    if ( posteriorsImage == ITK_NULLPTR )
       {
       itkExceptionMacro("Second output type does not correspond to expected Posteriors Image Type");
       }
@@ -365,7 +365,7 @@ BayesianClassifierImageFilter< TInputVectorImage, TLabelsType,
   PosteriorsImageType *posteriorsImage =
     dynamic_cast< PosteriorsImageType * >( this->GetPosteriorImage() );
 
-  if ( posteriorsImage == NULL )
+  if ( posteriorsImage == ITK_NULLPTR )
     {
     itkExceptionMacro("Second output type does not correspond to expected Posteriors Image Type");
     }
diff --git a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx
index 922b180..89e6c53 100644
--- a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkBayesianClassifierInitializationImageFilter.hxx
@@ -41,7 +41,7 @@ BayesianClassifierInitializationImageFilter< TInputImage, TProbabilityPrecisionT
   m_UserSuppliesMembershipFunctions(false),
   m_NumberOfClasses(0)
 {
-  m_MembershipFunctionContainer = NULL;
+  m_MembershipFunctionContainer = ITK_NULLPTR;
 }
 
 // GenerateOutputInformation method. Here we force update on the entire input
diff --git a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkClassifierBase.h b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkClassifierBase.h
index 6bdb841..970e0e5 100644
--- a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkClassifierBase.h
+++ b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkClassifierBase.h
@@ -150,7 +150,7 @@ public:
 protected:
   ClassifierBase();
   ~ClassifierBase();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** The real classification logic implementaion. All the subclasses
    * of this class should implement this method. */
diff --git a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkClassifierBase.hxx b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkClassifierBase.hxx
index fc20a1c..7855200 100644
--- a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkClassifierBase.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkClassifierBase.hxx
@@ -28,7 +28,7 @@ ClassifierBase< TDataContainer >
 ::ClassifierBase()
 {
   m_NumberOfClasses = 0;
-  m_DecisionRule = 0;
+  m_DecisionRule = ITK_NULLPTR;
   m_MembershipFunctions.resize(0);
 }
 
diff --git a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.hxx b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.hxx
index b3696c4..a8e4ab3 100644
--- a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageClassifierBase.hxx
@@ -161,7 +161,6 @@ ImageClassifierBase< TInputImage, TClassifiedImage >
 
   this->SetClassifiedImage(classifiedImage);
 
-  typedef typename TClassifiedImage::IndexType myIndex;
   typename TClassifiedImage::IndexType classifiedImageIndex;
   classifiedImageIndex.Fill(0);
 
diff --git a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx
index 00a4f87..fbbe204 100644
--- a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx
@@ -26,7 +26,7 @@ template< typename TInputImage,
           typename TTrainingImage >
 ImageGaussianModelEstimator< TInputImage, TMembershipFunction, TTrainingImage >
 ::ImageGaussianModelEstimator(void):
-  m_Covariance(NULL)
+  m_Covariance(ITK_NULLPTR)
 {}
 
 template< typename TInputImage,
diff --git a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx
index 87ff6a3..47f997e 100644
--- a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageKmeansModelEstimator.hxx
@@ -615,12 +615,12 @@ ImageKmeansModelEstimator< TInputImage, TMembershipFunction >
   double       muloffset;
   double       rand_num;
 
-  addoffset = m_OffsetAdd / vcl_pow(2.0, (double)scale);
-  muloffset = m_OffsetMultiply / vcl_pow(2.0, (double)scale);
+  addoffset = m_OffsetAdd / std::pow(2.0, (double)scale);
+  muloffset = m_OffsetMultiply / std::pow(2.0, (double)scale);
 
   for ( i = 0; i < m_VectorDimension; i++ )
     {
-    srand( (unsigned)time(NULL) );
+    srand( (unsigned)time(ITK_NULLPTR) );
     rand_num = ( rand() ) / ( (double)RAND_MAX );
 
     if ( oldCodeword[i] == 0.0 )
@@ -628,7 +628,7 @@ ImageKmeansModelEstimator< TInputImage, TMembershipFunction >
       newCodeword[i] = addoffset * rand_num;
       }
 
-    else if ( vcl_fabs(oldCodeword[i]) < 0.9 * addoffset )
+    else if ( std::fabs(oldCodeword[i]) < 0.9 * addoffset )
       {
       newCodeword[i] = oldCodeword[i];
 
diff --git a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageModelEstimatorBase.h b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageModelEstimatorBase.h
index 2793650..8a875df 100644
--- a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageModelEstimatorBase.h
+++ b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkImageModelEstimatorBase.h
@@ -131,9 +131,9 @@ public:
 protected:
   ImageModelEstimatorBase();
   ~ImageModelEstimatorBase();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
-  virtual void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
 private:
 
diff --git a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.hxx
index 448fffd..b62285d 100644
--- a/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Classifiers/include/itkScalarImageKmeansImageFilter.hxx
@@ -106,7 +106,6 @@ ScalarImageKmeansImageFilter< TInputImage, TOutputImage >
   this->m_FinalMeans = estimator->GetParameters();
 
   typedef typename InputImageType::RegionType RegionType;
-  typedef typename InputImageType::SizeType   SizeType;
 
   // Now classify the samples
   DecisionRuleType::Pointer decisionRule = DecisionRuleType::New();
diff --git a/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx
index a419659..053068a 100644
--- a/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentFunctorImageFilter.hxx
@@ -37,7 +37,7 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask
 
   InputPixelType        value, neighborValue;
   OutputPixelType       label, originalLabel, neighborLabel;
-  OutputPixelType       maxLabel = NumericTraits< OutputPixelType >::Zero;
+  OutputPixelType       maxLabel = NumericTraits< OutputPixelType >::ZeroValue();
   const OutputPixelType maxPossibleLabel = NumericTraits< OutputPixelType >::max();
 
   typename TOutputImage::Pointer output = this->GetOutput();
@@ -49,7 +49,7 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask
 
   // Set up the boundary condition to be zero padded (used on output image)
   ConstantBoundaryCondition< TOutputImage > BC;
-  BC.SetConstant(NumericTraits< OutputPixelType >::Zero);
+  BC.SetConstant(NumericTraits< OutputPixelType >::ZeroValue());
 
   // Neighborhood iterators.  Let's use a shaped neighborhood so we can
   // restrict the access to face connected neighbors. These iterators
@@ -119,10 +119,10 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask
     oit.GoToBegin();
     while ( !mit.IsAtEnd() )
       {
-      if ( mit.Get() == NumericTraits< MaskPixelType >::Zero )
+      if ( mit.Get() == NumericTraits< MaskPixelType >::ZeroValue() )
         {
         // mark pixel as unlabeled
-        oit.Set(NumericTraits< OutputPixelType >::Zero);
+        oit.Set(NumericTraits< OutputPixelType >::ZeroValue());
         }
 
       ++mit;
@@ -146,7 +146,7 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask
     originalLabel = label;
 
     // If the pixel is not background
-    if ( label != NumericTraits< OutputPixelType >::Zero )
+    if ( label != NumericTraits< OutputPixelType >::ZeroValue() )
       {
       // loop over the "previous" neighbors to find labels.  this loop
       // may establish one or more new equivalence classes
@@ -160,7 +160,7 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask
 
         // if the previous pixel has a label, verify equivalence or
         // establish a new equivalence
-        if ( neighborLabel != NumericTraits< OutputPixelType >::Zero )
+        if ( neighborLabel != NumericTraits< OutputPixelType >::ZeroValue() )
           {
           // see if current pixel is connected to its neighbor
           neighborValue = isIt.Get();
@@ -228,7 +228,7 @@ ConnectedComponentFunctorImageFilter< TInputImage, TOutputImage, TFunctor, TMask
     {
     label = oit.Get();
     // if pixel has a label, write out the final equivalence
-    if ( label != NumericTraits< OutputPixelType >::Zero )
+    if ( label != NumericTraits< OutputPixelType >::ZeroValue() )
       {
       oit.Set( eqTable->Lookup(label) );
       }
diff --git a/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx
index ccfd4ce..a31c7ec 100644
--- a/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.hxx
@@ -407,9 +407,9 @@ ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >
 ::AfterThreadedGenerateData()
 {
   m_NumberOfLabels.clear();
-  m_Barrier = NULL;
+  m_Barrier = ITK_NULLPTR;
   m_LineMap.clear();
-  m_Input = NULL;
+  m_Input = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TOutputImage, typename TMaskImage >
diff --git a/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h b/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h
index 72176c6..3cc5e1d 100644
--- a/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h
+++ b/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.h
@@ -89,7 +89,8 @@ public:
                ImageToImageFilter);
 
   /** Typedef to describe the type of pixel. */
-  typedef typename TInputImage::PixelType PixelType;
+  typedef typename TInputImage::PixelType  PixelType;
+  typedef typename TOutputImage::PixelType OutputPixelType;
 
   /** The pixel type must support comparison operators. */
   itkConceptMacro( PixelTypeComparable, ( Concept::Comparable< PixelType > ) );
@@ -215,8 +216,9 @@ private:
   unsigned int m_MinimumObjectSizeInPixels;
 
   // Binary threshold variables
-  PixelType m_OutsideValue;
-  PixelType m_InsideValue;
+  OutputPixelType m_OutsideValue;
+  OutputPixelType m_InsideValue;
+
   PixelType m_LowerBoundary;
   PixelType m_UpperBoundary;
 
diff --git a/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.hxx
index 533b27e..d6ad090 100644
--- a/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkThresholdMaximumConnectedComponentsImageFilter.hxx
@@ -59,10 +59,10 @@ ThresholdMaximumConnectedComponentsImageFilter< TInputImage, TOutputImage >
 
   // Initialize values for the theshold filters
   // Default. Use ITK set macro "SetOutsideValue" to change
-  m_OutsideValue = static_cast< PixelType >( minLabel );
+  m_OutsideValue = static_cast< OutputPixelType >( minLabel );
 
   // Default. Use ITK set macro "SetInsideValue" to change
-  m_InsideValue  = static_cast< PixelType >( maxLabel );
+  m_InsideValue  = static_cast< OutputPixelType >( maxLabel );
 
   m_LowerBoundary = m_ThresholdValue;
 
@@ -212,10 +212,10 @@ ThresholdMaximumConnectedComponentsImageFilter< TInputImage, TOutputImage >
   Superclass::PrintSelf(os, indent);
 
   os << indent << "InsideValue: "
-     << static_cast< typename NumericTraits< PixelType >::PrintType >(
+     << static_cast< typename NumericTraits< OutputPixelType >::PrintType >(
     m_InsideValue ) << std::endl;
   os << indent << "OutsideValue: "
-     << static_cast< typename NumericTraits< PixelType >::PrintType >(
+     << static_cast< typename NumericTraits< OutputPixelType >::PrintType >(
     m_OutsideValue ) << std::endl;
   os << indent << "Lower: "
      << static_cast< typename NumericTraits< PixelType >::PrintType >(
diff --git a/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h b/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h
index de85cf5..f45309f 100644
--- a/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h
+++ b/Utilities/ITK/Modules/Segmentation/ConnectedComponents/include/itkVectorConnectedComponentImageFilter.h
@@ -51,7 +51,7 @@ class SimilarVectorsFunctor
 {
 public:
   SimilarVectorsFunctor()
-  { m_Threshold = itk::NumericTraits< typename TInput::ValueType >::Zero; }
+  { m_Threshold = itk::NumericTraits< typename TInput::ValueType >::ZeroValue(); }
 
   ~SimilarVectorsFunctor() {}
 
@@ -72,7 +72,7 @@ public:
   bool operator()(const TInput & a, const TInput & b) const
   {
     typedef typename NumericTraits<typename TInput::ValueType>::RealType RealValueType;
-    RealValueType dotProduct = NumericTraits<RealValueType>::Zero;
+    RealValueType dotProduct = NumericTraits<RealValueType>::ZeroValue();
     for ( unsigned int i = 0; i < NumericTraits<TInput>::GetLength(a); ++i)
       {
       dotProduct += a[i]*b[i];
diff --git a/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.hxx b/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.hxx
index ef3fda8..847870a 100644
--- a/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DBalloonForceFilter.hxx
@@ -72,9 +72,9 @@ DeformableSimplexMesh3DBalloonForceFilter< TInputMesh, TOutputMesh >
   coord[1] = static_cast< GradientIndexValueType >( data->pos[1] );
   coord[2] = static_cast< GradientIndexValueType >( data->pos[2] );
 
-  coord2[0] = static_cast< GradientIndexValueType >( vcl_ceil(data->pos[0]) );
-  coord2[1] = static_cast< GradientIndexValueType >( vcl_ceil(data->pos[1]) );
-  coord2[2] = static_cast< GradientIndexValueType >( vcl_ceil(data->pos[2]) );
+  coord2[0] = static_cast< GradientIndexValueType >( std::ceil(data->pos[0]) );
+  coord2[1] = static_cast< GradientIndexValueType >( std::ceil(data->pos[1]) );
+  coord2[2] = static_cast< GradientIndexValueType >( std::ceil(data->pos[2]) );
 
   tmp_co_1[0] = coord2[0];
   tmp_co_1[1] = coord[1];
diff --git a/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx b/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx
index b4f6da8..c64bace 100644
--- a/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx
@@ -66,7 +66,7 @@ DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >
   this->ProcessObject::SetNumberOfRequiredOutputs(1);
   this->ProcessObject::SetNthOutput( 0, output.GetPointer() );
 
-  this->m_Data = NULL;
+  this->m_Data = ITK_NULLPTR;
 }
 
 template< typename TInputMesh, typename TOutputMesh >
@@ -150,7 +150,7 @@ DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >
     IdentifierType       idx = pointItr.Index();
     data = this->m_Data->GetElement(idx);
     delete data->neighborSet;
-    data->neighborSet = NULL;
+    data->neighborSet = ITK_NULLPTR;
     pointItr++;
     }
 
@@ -294,10 +294,10 @@ DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >
     double tmpNormalProd = dot_product( tmp.GetVnlVector(), data->normal.GetVnlVector() );
 
     double sinphi =  2 *data->circleRadius *D *vnl_math_sgn(tmpNormalProd);
-    double phi = vcl_asin(sinphi);
+    double phi = std::asin(sinphi);
 
     data->phi = phi;
-    data->meanCurvature = vcl_abs(sinphi / data->circleRadius);
+    data->meanCurvature = std::abs(sinphi / data->circleRadius);
     tmp = data->pos - data->neighbors[0];
 
     //compute the foot of p projection of p onto the triangle spanned by its
@@ -374,7 +374,7 @@ DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >
   eps1Diff = epsRef[0] - eps[0];
   eps2Diff = epsRef[1] - eps[1];
   eps3Diff = epsRef[2] - eps[2];
-  //    diffAbsSum = vcl_abs(eps1Diff)+vcl_abs(eps2Diff)+vcl_abs(eps3Diff);
+  //    diffAbsSum = std::abs(eps1Diff)+std::abs(eps2Diff)+std::abs(eps3Diff);
 
   tangentForce.SetVnlVector(eps1Diff * ( data->neighbors[0] ).GetVnlVector()
                               + eps2Diff * ( data->neighbors[1] ).GetVnlVector()
@@ -423,9 +423,9 @@ DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >
   coord[1] = static_cast< GradientIndexValueType >( data->pos[1] );
   coord[2] = static_cast< GradientIndexValueType >( data->pos[2] );
 
-  coord2[0] = static_cast< GradientIndexValueType >( vcl_ceil(data->pos[0]) );
-  coord2[1] = static_cast< GradientIndexValueType >( vcl_ceil(data->pos[1]) );
-  coord2[2] = static_cast< GradientIndexValueType >( vcl_ceil(data->pos[2]) );
+  coord2[0] = static_cast< GradientIndexValueType >( std::ceil(data->pos[0]) );
+  coord2[1] = static_cast< GradientIndexValueType >( std::ceil(data->pos[1]) );
+  coord2[2] = static_cast< GradientIndexValueType >( std::ceil(data->pos[2]) );
 
   tmp_co_1[0] = coord2[0];
   tmp_co_1[1] = coord[1];
@@ -583,7 +583,7 @@ double DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >
   double r2 = r * r;
   double d2 = d * d;
   double r2Minusd2 = r2 - d2;
-  double tanPhi = vcl_tan(phi);
+  double tanPhi = std::tan(phi);
 
   double eps = 1.0;
 
@@ -595,7 +595,7 @@ double DeformableSimplexMesh3DFilter< TInputMesh, TOutputMesh >
   double tmpSqr = r2 + r2Minusd2 * tanPhi * tanPhi;
   if ( tmpSqr > 0 )
     {
-    double denom = eps * ( vcl_sqrt(tmpSqr) + r );
+    double denom = eps * ( std::sqrt(tmpSqr) + r );
     if ( denom != 0 )
       {
       L = ( r2Minusd2 * tanPhi ) / denom;
diff --git a/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx b/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx
index 643e446..0738701 100644
--- a/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.hxx
@@ -32,7 +32,7 @@ DeformableSimplexMesh3DGradientConstraintForceFilter< TInputMesh, TOutputMesh >
 ::DeformableSimplexMesh3DGradientConstraintForceFilter()
 {
   m_Range = 1;
-  m_StartVoxel = NULL;
+  m_StartVoxel = ITK_NULLPTR;
 }
 
 template< typename TInputMesh, typename TOutputMesh >
@@ -58,7 +58,7 @@ DeformableSimplexMesh3DGradientConstraintForceFilter< TInputMesh, TOutputMesh >
 ::Clear()
 {
   delete m_StartVoxel;
-  m_StartVoxel = 0;
+  m_StartVoxel = ITK_NULLPTR;
   std::vector< ImageVoxel * >::iterator it;
   for ( it = m_Positive.begin(); it != m_Positive.end(); it++ )
     {
@@ -363,7 +363,7 @@ DeformableSimplexMesh3DGradientConstraintForceFilter< TInputMesh, TOutputMesh >
     }
   else
     {
-    m_StartVoxel = 0;
+    m_StartVoxel = ITK_NULLPTR;
     }
 
   // now fun begins try to use all the above
@@ -384,7 +384,7 @@ DeformableSimplexMesh3DGradientConstraintForceFilter< TInputMesh, TOutputMesh >
     vec_for[2] = gradient3[2];
     // check magnitude
 
-    mag = vcl_sqrt( dot_product( vec_for.GetVnlVector(), vec_for.GetVnlVector() ) );
+    mag = std::sqrt( dot_product( vec_for.GetVnlVector(), vec_for.GetVnlVector() ) );
     if ( mag > max )
       {
       max =  mag;
diff --git a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx
index a375870..caff0b4 100644
--- a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx
@@ -28,7 +28,8 @@ KLMRegionGrowImageFilter< TInputImage, TOutputImage >
   m_NumberOfRegions(0),
   m_InternalLambda(0),
   m_InitialNumberOfRegions(0),
-  m_BorderCandidate(NULL),
+  m_TotalBorderLength(0.0),
+  m_BorderCandidate(ITK_NULLPTR),
   m_InitialRegionArea(0)
 {
   m_InitialRegionMean.set_size(InputImageVectorDimension);
@@ -702,8 +703,8 @@ KLMRegionGrowImageFilter< TInputImage, TOutputImage >
 
   // Remove any duplicate borders found during SpliceRegionBorders:
   // lambda = -1.0,  pRegion1 and pRegion2 = NULL
-  while ( m_BorderCandidate->m_Pointer->GetRegion1() == NULL
-          || m_BorderCandidate->m_Pointer->GetRegion2() == NULL )
+  while ( m_BorderCandidate->m_Pointer->GetRegion1() == ITK_NULLPTR
+          || m_BorderCandidate->m_Pointer->GetRegion2() == ITK_NULLPTR )
     {
     m_BordersDynamicPointer.erase(m_BordersDynamicPointer.end() - 1);
 
diff --git a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h
index 653752c..df8ef1b 100644
--- a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h
+++ b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationBorder.h
@@ -179,7 +179,7 @@ protected:
   ~KLMSegmentationBorder();
 
   /** Print self identity */
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   KLMSegmentationBorder(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h
index 2aa68d4..6afc944 100644
--- a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h
+++ b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkKLMSegmentationRegion.h
@@ -215,7 +215,7 @@ public:
 protected:
   KLMSegmentationRegion();
   ~KLMSegmentationRegion();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   KLMSegmentationRegion(const Self &); // purposely not implemented
diff --git a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationBorder.h b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationBorder.h
index e042d4c..f162d61 100644
--- a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationBorder.h
+++ b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationBorder.h
@@ -70,7 +70,7 @@ public:
 protected:
   SegmentationBorder();
   ~SegmentationBorder();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   SegmentationBorder(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h
index 9b984bf..d72de8f 100644
--- a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h
+++ b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/include/itkSegmentationRegion.h
@@ -78,7 +78,7 @@ public:
 protected:
   SegmentationRegion();
   ~SegmentationRegion();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   SegmentationRegion(const Self &); //purposely not implemented
diff --git a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationBorder.cxx b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationBorder.cxx
index 28f78cc..e576c96 100644
--- a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationBorder.cxx
+++ b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationBorder.cxx
@@ -23,8 +23,8 @@ KLMSegmentationBorder
 ::KLMSegmentationBorder(void)
 {
   m_Lambda = 0.0;
-  m_Region1 = 0;
-  m_Region2 = 0;
+  m_Region1 = ITK_NULLPTR;
+  m_Region2 = ITK_NULLPTR;
 }
 
 KLMSegmentationBorder
diff --git a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx
index bbd2fd3..cc0b15d 100644
--- a/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx
+++ b/Utilities/ITK/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx
@@ -97,7 +97,7 @@ void
 KLMSegmentationRegion
 ::DeleteRegionBorder(KLMSegmentationBorder *pBorderCandidate)
 {
-  if ( pBorderCandidate == NULL )
+  if ( pBorderCandidate == ITK_NULLPTR )
     {
     itkExceptionMacro(<< "Null pointer to segmentation region border");
     }
@@ -130,7 +130,7 @@ void
 KLMSegmentationRegion
 ::PushBackRegionBorder(KLMSegmentationBorder *pBorderCandidate)
 {
-  if ( pBorderCandidate == NULL )
+  if ( pBorderCandidate == ITK_NULLPTR )
     {
     itkExceptionMacro(<< "Null pointer to segmentation region border");
     }
@@ -141,7 +141,7 @@ void
 KLMSegmentationRegion
 ::PushFrontRegionBorder(KLMSegmentationBorder *pBorderCandidate)
 {
-  if ( pBorderCandidate == NULL )
+  if ( pBorderCandidate == ITK_NULLPTR )
     {
     itkExceptionMacro(<< "Null pointer to segmentation region border");
     }
@@ -153,7 +153,7 @@ KLMSegmentationRegion
 ::InsertRegionBorder(KLMSegmentationBorder *pBorderCandidate)
 {
   // Ensure that the border candidate is not a null pointer
-  if ( pBorderCandidate == NULL )
+  if ( pBorderCandidate == ITK_NULLPTR )
     {
     itkExceptionMacro(<< "Null pointer to segmentation region border");
     }
@@ -209,7 +209,7 @@ KLMSegmentationRegion
                      KLMSegmentationBorder *pBorderCandidate)
 {
   // Ensure that the border candidate is not a null pointer
-  if ( pBorderCandidate == NULL )
+  if ( pBorderCandidate == ITK_NULLPTR )
     {
     itkExceptionMacro(<< "Null pointer to segmentation region border");
     }
@@ -379,8 +379,8 @@ KLMSegmentationRegion
         } // end else
 
       // Nullify the duplicate border so it can be identified and removed.
-      ( *thatRegionBordersIt )->SetRegion1(NULL);
-      ( *thatRegionBordersIt )->SetRegion2(NULL);
+      ( *thatRegionBordersIt )->SetRegion1(ITK_NULLPTR);
+      ( *thatRegionBordersIt )->SetRegion2(ITK_NULLPTR);
       ( *thatRegionBordersIt )->SetLambda(-1.0);
 
       thisRegionBordersIt++;
diff --git a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.h b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.h
index 0a5ac95..20736eb 100644
--- a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.h
+++ b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.h
@@ -103,8 +103,7 @@ public:
    * in order to inform the pipeline execution model.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
 #ifdef ITK_USE_CONCEPT_CHECKING
   // Begin concept checking
diff --git a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.hxx
index 92338d1..5357687 100644
--- a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkBinaryMedianImageFilter.hxx
@@ -44,7 +44,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 BinaryMedianImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
diff --git a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.hxx
index cae9e9b..aa73b6b 100644
--- a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.hxx
@@ -21,6 +21,7 @@
 #include "itkLabelVotingImageFilter.h"
 
 #include "itkImageRegionIterator.h"
+#include "itkProgressReporter.h"
 
 #include "vnl/vnl_math.h"
 
@@ -104,8 +105,10 @@ template< typename TInputImage, typename TOutputImage >
 void
 LabelVotingImageFilter< TInputImage, TOutputImage >
 ::ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread,
-                        ThreadIdType itkNotUsed(threadId) )
+                        ThreadIdType threadId )
 {
+  ProgressReporter progress( this, threadId, outputRegionForThread.GetNumberOfPixels() );
+
   typedef ImageRegionConstIterator< TInputImage > IteratorType;
   typedef ImageRegionIterator< TOutputImage >     OutIteratorType;
 
@@ -159,6 +162,7 @@ LabelVotingImageFilter< TInputImage, TOutputImage >
           }
         }
       }
+    progress.CompletedPixel();
     }
 
   delete[] it;
diff --git a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h
index cf4d87a..b6be982 100644
--- a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h
+++ b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkMultiLabelSTAPLEImageFilter.h
@@ -27,6 +27,7 @@
 #include "vector"
 #include "itkArray.h"
 #include "itkArray2D.h"
+#include "itkNumericTraits.h"
 
 namespace itk
 {
@@ -256,12 +257,15 @@ public:
   }
 
 protected:
-  MultiLabelSTAPLEImageFilter()
+  MultiLabelSTAPLEImageFilter() :
+    m_TotalLabelCount(0),
+    m_LabelForUndecidedPixels(NumericTraits<OutputPixelType>::Zero),
+    m_HasLabelForUndecidedPixels(false),
+    m_HasPriorProbabilities(false),
+    m_HasMaximumNumberOfIterations(false),
+    m_MaximumNumberOfIterations(0),
+    m_TerminationUpdateThreshold(1e-5)
   {
-    this->m_HasLabelForUndecidedPixels = false;
-    this->m_HasPriorProbabilities = false;
-    this->m_HasMaximumNumberOfIterations = false;
-    this->m_TerminationUpdateThreshold = 1e-5;
   }
   virtual ~MultiLabelSTAPLEImageFilter() {}
 
diff --git a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.h b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.h
index 4d5e6e9..82dd194 100644
--- a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.h
+++ b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.h
@@ -103,8 +103,7 @@ public:
    * in order to inform the pipeline execution model.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
-  virtual void GenerateInputRequestedRegion()
-  throw( InvalidRequestedRegionError );
+  virtual void GenerateInputRequestedRegion();
 
 #ifdef ITK_USE_CONCEPT_CHECKING
   // Begin concept checking
diff --git a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.hxx
index e4ebb24..d7792e5 100644
--- a/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LabelVoting/include/itkVotingBinaryImageFilter.hxx
@@ -45,7 +45,6 @@ template< typename TInputImage, typename TOutputImage >
 void
 VotingBinaryImageFilter< TInputImage, TOutputImage >
 ::GenerateInputRequestedRegion()
-throw ( InvalidRequestedRegionError )
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.hxx
index 771cfd8..8589202 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkBinaryMaskToNarrowBandPointSetFilter.hxx
@@ -130,7 +130,7 @@ BinaryMaskToNarrowBandPointSetFilter< TInputImage, TOutputMesh >
     {
     const NodeType & node = nodeItr.Value();
     const float      distance = node.GetValue();
-    if ( vcl_fabs(distance) < m_BandWidth )
+    if ( std::fabs(distance) < m_BandWidth )
       {
       image->TransformIndexToPhysicalPoint(node.GetIndex(), point);
       points->push_back(point);
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx
index 8c5cef2..0d07af0 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCollidingFrontsImageFilter.hxx
@@ -29,8 +29,8 @@ template< typename TInputImage, typename TOutputImage >
 CollidingFrontsImageFilter< TInputImage, TOutputImage >
 ::CollidingFrontsImageFilter()
 {
-  m_SeedPoints1 = NULL;
-  m_SeedPoints2 = NULL;
+  m_SeedPoints1 = ITK_NULLPTR;
+  m_SeedPoints2 = ITK_NULLPTR;
   m_StopOnTargets = false;
   m_ApplyConnectivity = true;
   m_NegativeEpsilon = -1E-6;
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h
index 4dad6b4..5f05096 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetFunction.h
@@ -113,15 +113,15 @@ public:
   virtual void Initialize(const RadiusType & r);
 
 protected:
-  CurvesLevelSetFunction()
+  CurvesLevelSetFunction() :
+    m_Center(0),
+    m_DerivativeSigma(1.0)
   {
     //Curvature term is the minimal curvature.
     this->UseMinimalCurvatureOn();
     this->SetAdvectionWeight(NumericTraits< ScalarValueType >::One);
     this->SetPropagationWeight(NumericTraits< ScalarValueType >::One);
     this->SetCurvatureWeight(NumericTraits< ScalarValueType >::One);
-
-    m_DerivativeSigma = 1.0;
   }
 
   virtual ~CurvesLevelSetFunction() {}
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetImageFilter.hxx
index 8f15298..5c51173 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkCurvesLevelSetImageFilter.hxx
@@ -45,8 +45,7 @@ CurvesLevelSetImageFilter< TInputImage, TFeatureImage, TOutputType >
 ::PrintSelf(std::ostream & os, Indent indent) const
 {
   Superclass::PrintSelf(os, indent);
-  os << indent << "CurvesFunction: \n";
-  m_CurvesFunction->Print( os, indent.GetNextIndent() );
+  itkPrintSelfObjectMacro( CurvesFunction );
 }
 
 template< typename TInputImage, typename TFeatureImage, typename TOutputType >
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx
index 8f26b61..1b48e96 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx
@@ -74,7 +74,7 @@ ExtensionVelocitiesImageFilter< TLevelSet, TAuxValue, VAuxDimension >
 {
   if ( idx >= VAuxDimension || this->GetNumberOfIndexedInputs() < idx + 2 )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   return dynamic_cast< AuxImageType * >(
@@ -92,7 +92,7 @@ ExtensionVelocitiesImageFilter< TLevelSet, TAuxValue, VAuxDimension >
 {
   if ( idx >= VAuxDimension || this->GetNumberOfIndexedOutputs() < idx + 2 )
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   return itkDynamicCastInDebugMode< AuxImageType * >(this->ProcessObject::GetOutput(idx + 1) );
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.hxx
index 6c6bb24..4139e0e 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkGeodesicActiveContourShapePriorLevelSetFunction.hxx
@@ -20,6 +20,7 @@
 
 #include "itkGeodesicActiveContourShapePriorLevelSetFunction.h"
 #include "itkGradientRecursiveGaussianImageFilter.h"
+#include "itkGradientImageFilter.h"
 #include "itkImageAlgorithm.h"
 
 namespace itk
@@ -46,18 +47,44 @@ template< typename TImageType, typename TFeatureImageType >
 void GeodesicActiveContourShapePriorLevelSetFunction< TImageType, TFeatureImageType >
 ::CalculateAdvectionImage()
 {
-  /* compoute the gradient of the feature image. */
-  typedef GradientRecursiveGaussianImageFilter< FeatureImageType, VectorImageType >
-  DerivativeFilterType;
 
-  typename DerivativeFilterType::Pointer derivative = DerivativeFilterType::New();
-  derivative->SetInput( this->GetFeatureImage() );
-  derivative->SetSigma(m_DerivativeSigma);
-  derivative->Update();
+  typename VectorImageType::Pointer gradientImage;
+
+  if ( m_DerivativeSigma != NumericTraits< float >::Zero )
+  {
+    /* compute the gradient of the feature image. */
+    typedef GradientRecursiveGaussianImageFilter< FeatureImageType, VectorImageType >
+    DerivativeFilterType;
+
+    typename DerivativeFilterType::Pointer derivative = DerivativeFilterType::New();
+    derivative->SetInput( this->GetFeatureImage() );
+    derivative->SetSigma( m_DerivativeSigma );
+    derivative->Update();
+
+    gradientImage = derivative->GetOutput();
+  }
+  else
+  {
+    typedef GradientImageFilter< FeatureImageType > DerivativeFilterType;
+
+    typename DerivativeFilterType::Pointer derivative = DerivativeFilterType::New();
+    derivative->SetInput( this->GetFeatureImage() );
+    derivative->SetUseImageSpacingOn();
+    derivative->Update();
+
+    typedef typename DerivativeFilterType::OutputImageType                      DerivativeOutputImageType;
+    typedef VectorCastImageFilter< DerivativeOutputImageType, VectorImageType > GradientCasterType;
+
+    typename GradientCasterType::Pointer caster = GradientCasterType::New();
+    caster->SetInput( derivative->GetOutput() );
+    caster->Update();
+
+    gradientImage = caster->GetOutput();
+  }
 
   /* copy negative gradient into the advection image. */
   ImageRegionIterator< VectorImageType >
-  dit( derivative->GetOutput(), this->GetFeatureImage()->GetRequestedRegion() );
+  dit( gradientImage, this->GetFeatureImage()->GetRequestedRegion() );
   ImageRegionIterator< VectorImageType >
   ait( this->GetAdvectionImage(), this->GetFeatureImage()->GetRequestedRegion() );
 
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx
index 7e0efb2..a535a79 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx
@@ -28,7 +28,7 @@ ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >
 ::ImplicitManifoldNormalVectorFilter()
 {
   this->SetPrecomputeFlag(true);
-  m_NormalFunction = 0;
+  m_NormalFunction = ITK_NULLPTR;
 
   // set defaults for parameters
   m_IsoLevelLow  = NumericTraits< NodeValueType >::Zero;
@@ -113,7 +113,7 @@ ImplicitManifoldNormalVectorFilter< TInputImage, TSparseOutputImage >
       }
     else
       {
-      output->SetPixel(index, 0);
+      output->SetPixel(index, ITK_NULLPTR);
       }
     ++it;
     }
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h
index 3281673..8b6cded 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.h
@@ -290,13 +290,15 @@ public:
   }
 
 protected:
-  LevelSetFunction()
+  LevelSetFunction() :
+    m_Center(0),
+    m_UseMinimalCurvature(false),
+    m_EpsilonMagnitude(static_cast< ScalarValueType >( 1.0e-5 )),
+    m_AdvectionWeight(NumericTraits< ScalarValueType >::Zero),
+    m_PropagationWeight(NumericTraits< ScalarValueType >::Zero),
+    m_CurvatureWeight(NumericTraits< ScalarValueType >::Zero),
+    m_LaplacianSmoothingWeight(NumericTraits< ScalarValueType >::Zero)
   {
-    m_EpsilonMagnitude = static_cast< ScalarValueType >( 1.0e-5 );
-    m_AdvectionWeight = m_PropagationWeight =
-                          m_CurvatureWeight = m_LaplacianSmoothingWeight =
-                                                NumericTraits< ScalarValueType >::Zero;
-    m_UseMinimalCurvature = false;
   }
 
   virtual ~LevelSetFunction() {}
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.hxx
index 644b169..2875ba5 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.hxx
@@ -57,7 +57,7 @@ LevelSetFunction< TImageType >
   const FloatOffsetType & itkNotUsed(offset), GlobalDataStruct *gd)
 {
   unsigned int          i, j, n;
-  ScalarValueType       gradMag = vcl_sqrt(gd->m_GradMagSqr);
+  ScalarValueType       gradMag = std::sqrt(gd->m_GradMagSqr);
   ScalarValueType       Pgrad[ImageDimension][ImageDimension];
   ScalarValueType       tmp_matrix[ImageDimension][ImageDimension];
   const ScalarValueType ZERO = NumericTraits< ScalarValueType >::Zero;
@@ -150,7 +150,7 @@ LevelSetFunction< TImageType >
     {
     discriminant = 0.0;
     }
-  discriminant = vcl_sqrt(discriminant);
+  discriminant = std::sqrt(discriminant);
   return  ( mean_curve - discriminant );
 }
 
@@ -434,7 +434,7 @@ LevelSetFunction< TImageType >
       vnl_math_max( gd->m_MaxPropagationChange,
                     vnl_math_abs(propagation_term) );
 
-    propagation_term *= vcl_sqrt(propagation_gradient);
+    propagation_term *= std::sqrt(propagation_gradient);
     }
   else { propagation_term = ZERO; }
 
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx
index 1c2180f..845a692 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx
@@ -166,9 +166,9 @@ LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >
   NodeType *      targetnode = m_SparseTargetImage->GetPixel (idx);
   ScalarValueType refitterm, cv, tcv;
 
-  if ( ( targetnode == 0 ) || ( targetnode->m_CurvatureFlag == false ) )
+  if ( ( targetnode == ITK_NULLPTR ) || ( targetnode->m_CurvatureFlag == false ) )
     {
-    if ( targetnode == 0 )
+    if ( targetnode == ITK_NULLPTR )
       {
       itkExceptionMacro(<< "required node has null pointer\n");
       }
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h
index 0de0ee2..0279bae 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.h
@@ -133,7 +133,7 @@ public:
 protected:
   LevelSetNeighborhoodExtractor();
   ~LevelSetNeighborhoodExtractor(){}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   typename LevelSetImageType::PixelType GetLargeValue() const
   { return m_LargeValue; }
@@ -145,7 +145,7 @@ protected:
 
   virtual double CalculateDistance(IndexType & index);
 
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   bool GetLastPointIsInside() const
   { return m_LastPointIsInside; }
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx
index 96143fc..d1aa98d 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetNeighborhoodExtractor.hxx
@@ -32,19 +32,19 @@ namespace itk
  */
 template< typename TLevelSet >
 LevelSetNeighborhoodExtractor< TLevelSet >
-::LevelSetNeighborhoodExtractor()
+::LevelSetNeighborhoodExtractor() :
+  m_LevelSetValue(0.0),
+  m_InsidePoints(ITK_NULLPTR),
+  m_OutsidePoints(ITK_NULLPTR),
+  m_InputLevelSet(ITK_NULLPTR),
+  m_NarrowBanding(false),
+  m_NarrowBandwidth(12.0),
+  m_InputNarrowBand(ITK_NULLPTR),
+  m_LargeValue(NumericTraits< PixelType >::max()),
+  m_LastPointIsInside(false)
 {
-  m_LevelSetValue = 0.0;
-  m_InsidePoints = 0;
-  m_OutsidePoints = 0;
-  m_InputLevelSet = 0;
-
-  m_LargeValue = NumericTraits< PixelType >::max();
   m_NodesUsed.resize(SetDimension);
 
-  m_NarrowBanding = false;
-  m_NarrowBandwidth = 12.0;
-  m_InputNarrowBand = 0;
   for ( unsigned int i = 0; i < SetDimension; ++i )
     {
     m_ImageSize[i] = 0;
@@ -320,7 +320,7 @@ LevelSetNeighborhoodExtractor< TLevelSet >
     return m_LargeValue;
     }
 
-  distance = vcl_sqrt(1.0 / distance);
+  distance = std::sqrt(1.0 / distance);
   centerNode.SetValue(distance);
 
   if ( inside )
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h
index 74d5053..235c45a 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.h
@@ -107,7 +107,7 @@ public:
   {
     if ( idx >= VAuxDimension )
       {
-      return NULL;
+      return ITK_NULLPTR;
       }
     else
       {
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx
index bae2fd6..566b354 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkLevelSetVelocityNeighborhoodExtractor.hxx
@@ -31,11 +31,11 @@ template< typename TLevelSet, typename TAuxValue,
 LevelSetVelocityNeighborhoodExtractor< TLevelSet, TAuxValue, VAuxDimension >
 ::LevelSetVelocityNeighborhoodExtractor()
 {
-  m_AuxInsideValues = 0;
-  m_AuxOutsideValues = 0;
+  m_AuxInsideValues = ITK_NULLPTR;
+  m_AuxOutsideValues = ITK_NULLPTR;
   for ( unsigned int i = 0; i < VAuxDimension; ++i )
     {
-    m_AuxImage[i] = 0;
+    m_AuxImage[i] = ITK_NULLPTR;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx
index 221956b..d7015a0 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNarrowBandLevelSetImageFilter.hxx
@@ -40,7 +40,7 @@ NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, TOu
   this->SetNumberOfRequiredInputs(2);
   //this->SetNarrowBandInnerRadius();
   //this->SetNarrowBandTotalRadius();
-  m_SegmentationFunction = 0;
+  m_SegmentationFunction = ITK_NULLPTR;
 
   m_IsoFilter = IsoFilterType::New();
   m_ChamferFilter = ChamferFilterType::New();
@@ -77,7 +77,7 @@ void
 NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, TOutputImage >
 ::GenerateData()
 {
-  if ( m_SegmentationFunction == 0 )
+  if ( m_SegmentationFunction == ITK_NULLPTR )
         { itkExceptionMacro("No finite difference function was specified."); }
 
   // A positive speed value causes surface expansion, the opposite of the
@@ -137,8 +137,8 @@ NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, TOu
   m_ChamferFilter->Update();
 
   this->GraftOutput( m_ChamferFilter->GetOutput() );
-  m_IsoFilter->SetInput(NULL);
-  m_ChamferFilter->SetInput(NULL);
+  m_IsoFilter->SetInput(ITK_NULLPTR);
+  m_ChamferFilter->SetInput(ITK_NULLPTR);
 }
 } // end namespace itk
 
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.h b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.h
index 9866f66..6532fc1 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.h
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.h
@@ -143,7 +143,7 @@ protected:
   {
     // the slow exp function could be replaced with a lookup table
     if ( v <= 0.0 ) { return NumericTraits< NodeValueType >::One; }
-    else { return static_cast< NodeValueType >( vcl_exp(m_FluxStopConstant * v) ); }
+    else { return static_cast< NodeValueType >( std::exp(m_FluxStopConstant * v) ); }
   }
 
 private:
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx
index dedaa7d..54077dc 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx
@@ -38,8 +38,8 @@ NormalVectorDiffusionFunction< TSparseImageType >
   this->SetRadius(r);
   this->SetTimeStep( static_cast< TimeStepType >( 0.5 / ImageDimension ) );
   m_NormalProcessType = 0;
-  m_ConductanceParameter = NumericTraits< NodeValueType >::Zero;
-  m_FluxStopConstant = NumericTraits< NodeValueType >::Zero;
+  m_ConductanceParameter = NumericTraits< NodeValueType >::ZeroValue();
+  m_FluxStopConstant = NumericTraits< NodeValueType >::ZeroValue();
 }
 
 template< typename TSparseImageType >
@@ -84,11 +84,11 @@ NormalVectorDiffusionFunction< TSparseImageType >
   for ( i = 0; i < ImageDimension; i++ ) // flux offset axis
     {
     PreviousNode = it.GetPrevious (i);
-    if ( PreviousNode == 0 )
+    if ( PreviousNode == ITK_NULLPTR )
       {
       for ( j = 0; j < ImageDimension; j++ )
         {
-        CenterNode->m_Flux[i][j] = NumericTraits< NodeValueType >::Zero;
+        CenterNode->m_Flux[i][j] = NumericTraits< NodeValueType >::ZeroValue();
         }
       }
     else
@@ -100,7 +100,7 @@ NormalVectorDiffusionFunction< TSparseImageType >
           {
           // compute differences (j-axis) in line with center pixel
           OtherNode = it.GetPrevious (j);
-          if ( OtherNode == 0 )
+          if ( OtherNode == ITK_NULLPTR )
             {
             NegativeSidePixel[0] = CenterPixel;
             }
@@ -109,7 +109,7 @@ NormalVectorDiffusionFunction< TSparseImageType >
             NegativeSidePixel[0] = OtherNode->m_Data;
             }
           OtherNode = it.GetNext (j);
-          if ( OtherNode == 0 )
+          if ( OtherNode == ITK_NULLPTR )
             {
             PositiveSidePixel[0] = CenterPixel;
             }
@@ -120,7 +120,7 @@ NormalVectorDiffusionFunction< TSparseImageType >
 
           // compute derivative (j-axis) offset from center pixel on i-axis
           OtherNode = it.GetPixel (center - stride[i] - stride[j]);
-          if ( OtherNode == 0 )
+          if ( OtherNode == ITK_NULLPTR )
             {
             NegativeSidePixel[1] = PreviousPixel;
             }
@@ -129,7 +129,7 @@ NormalVectorDiffusionFunction< TSparseImageType >
             NegativeSidePixel[1] = OtherNode->m_Data;
             }
           OtherNode = it.GetPixel (center - stride[i] + stride[j]);
-          if ( OtherNode == 0 )
+          if ( OtherNode == ITK_NULLPTR )
             {
             PositiveSidePixel[1] = PreviousPixel;
             }
@@ -151,7 +151,7 @@ NormalVectorDiffusionFunction< TSparseImageType >
       // now compute the intrinsic derivative
       for ( j = 0; j < ImageDimension; j++ ) // component axis
         {
-        DotProduct = NumericTraits< NodeValueType >::Zero;
+        DotProduct = NumericTraits< NodeValueType >::ZeroValue();
         for ( k = 0; k < ImageDimension; k++ ) // derivative axis
           {
           DotProduct += ( gradient[k][j] * CenterNode->m_ManifoldNormal[i][k] );
@@ -190,11 +190,11 @@ NormalVectorDiffusionFunction< TSparseImageType >
 
   const NeighborhoodScalesType neighborhoodScales = this->ComputeNeighborhoodScales();
 
-  change = NumericTraits< NormalVectorType >::Zero;
+  change = NumericTraits< NormalVectorType >::ZeroValue();
   for ( i = 0; i < ImageDimension; i++ ) // flux offset axis
     {
     NextNode = it.GetNext (i);
-    if ( NextNode == 0 )
+    if ( NextNode == ITK_NULLPTR )
       {
       change -= CenterNode->m_Flux[i] * neighborhoodScales[i];
       }
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorFunctionBase.h b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorFunctionBase.h
index bf20c74..b0f5440 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorFunctionBase.h
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkNormalVectorFunctionBase.h
@@ -83,7 +83,7 @@ public:
   typedef typename NodeType::NodeDataType NormalVectorType;
 
   /** Globaldata methods are not needed in this class. */
-  virtual void * GetGlobalDataPointer() const { return 0; }
+  virtual void * GetGlobalDataPointer() const { return ITK_NULLPTR; }
   virtual void ReleaseGlobalDataPointer(void *) const {}
 
   /** For the global time step, we return the time step parameter. */
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx
index a74cd8a..b87b60a 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx
@@ -128,19 +128,24 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
 
 template< typename TInputImage, typename TOutputImage >
 ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
-::ParallelSparseFieldLevelSetImageFilter()
+::ParallelSparseFieldLevelSetImageFilter() :
+  m_ConstantGradientValue(1.0),
+  m_NumberOfLayers(ImageDimension),
+  m_IsoSurfaceValue(m_ValueZero),
+  m_NumOfThreads(0),
+  m_SplitAxis(0),
+  m_ZSize(0),
+  m_BoundaryChanged(false),
+  m_Boundary(ITK_NULLPTR),
+  m_GlobalZHistogram(ITK_NULLPTR),
+  m_MapZToThreadNumber(ITK_NULLPTR),
+  m_ZCumulativeFrequency(ITK_NULLPTR),
+  m_Data(ITK_NULLPTR),
+  m_Stop(false),
+  m_InterpolateSurfaceLocation(true),
+  m_BoundsCheckingActive(false)
 {
-  m_IsoSurfaceValue = m_ValueZero;
-  m_NumberOfLayers = ImageDimension;
   this->SetRMSChange( static_cast< double >( m_ValueOne ) );
-  m_InterpolateSurfaceLocation = true;
-  m_BoundsCheckingActive = false;
-  m_ConstantGradientValue = 1.0;
-  m_GlobalZHistogram = 0;
-  m_ZCumulativeFrequency = 0;
-  m_MapZToThreadNumber = 0;
-  m_Boundary = 0;
-  m_Data = 0;
 }
 
 template< typename TInputImage, typename TOutputImage >
@@ -545,7 +550,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
         length += dx_backward * dx_backward;
         }
       }
-    length = vcl_sqrt(length) + MIN_NORM;
+    length = std::sqrt(length) + MIN_NORM;
     distance = shiftedIt.GetCenterPixel() / length;
 
     m_OutputImage->SetPixel( activeIt->m_Index,
@@ -716,7 +721,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
     }
 
   // deallocate the shifted-image
-  m_ShiftedImage = 0;
+  m_ShiftedImage = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TOutputImage >
@@ -974,16 +979,16 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
 
   // Delete data structures used for load distribution and balancing.
   delete[] m_GlobalZHistogram;
-  m_GlobalZHistogram = 0;
+  m_GlobalZHistogram = ITK_NULLPTR;
   delete[] m_ZCumulativeFrequency;
-  m_ZCumulativeFrequency = 0;
+  m_ZCumulativeFrequency = ITK_NULLPTR;
   delete[] m_MapZToThreadNumber;
-  m_MapZToThreadNumber = 0;
+  m_MapZToThreadNumber = ITK_NULLPTR;
   delete[] m_Boundary;
-  m_Boundary = 0;
+  m_Boundary = ITK_NULLPTR;
 
   // Deallocate the status image.
-  m_StatusImage = 0;
+  m_StatusImage = ITK_NULLPTR;
 
   // Remove the barrier from the system.
   //  m_Barrier->Remove ();
@@ -994,7 +999,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
     for ( i = 0; i < 2 * static_cast< unsigned int >( m_NumberOfLayers ) + 1; i++ )
       {
       // return all the nodes in layer i to the main node pool
-      LayerNodeType *  nodePtr = 0;
+      LayerNodeType *  nodePtr = ITK_NULLPTR;
       LayerPointerType layerPtr = m_Layers[i];
       while ( !layerPtr->Empty() )
         {
@@ -1010,7 +1015,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
     m_Layers.clear();
     }
 
-  if ( m_Data != 0 )
+  if ( m_Data != ITK_NULLPTR )
     {
     // Deallocate the thread local data structures.
     for ( ThreadIdType ThreadId = 0; ThreadId < m_NumOfThreads; ThreadId++ )
@@ -1019,10 +1024,10 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
 
       delete[] m_Data[ThreadId].m_ZHistogram;
 
-      if ( m_Data[ThreadId].globalData != 0 )
+      if ( m_Data[ThreadId].globalData != ITK_NULLPTR )
         {
         this->GetDifferenceFunction()->ReleaseGlobalDataPointer (m_Data[ThreadId].globalData);
-        m_Data[ThreadId].globalData = 0;
+        m_Data[ThreadId].globalData = ITK_NULLPTR;
         }
 
       // 1. delete nodes on the thread layers
@@ -1102,7 +1107,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
 
     delete[] m_Data;
     } // if m_data != 0
-  m_Data = 0;
+  m_Data = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TOutputImage >
@@ -1197,13 +1202,13 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
 
     if ( ThreadId == 0 )
       {
-      str->Filter->m_StatusImage = 0;
+      str->Filter->m_StatusImage = ITK_NULLPTR;
       str->Filter->m_StatusImage = str->Filter->m_StatusImageTemp;
-      str->Filter->m_StatusImageTemp = 0;
+      str->Filter->m_StatusImageTemp = ITK_NULLPTR;
 
-      str->Filter->m_OutputImage = 0;
+      str->Filter->m_OutputImage = ITK_NULLPTR;
       str->Filter->m_OutputImage = str->Filter->m_OutputImageTemp;
-      str->Filter->m_OutputImageTemp = 0;
+      str->Filter->m_OutputImageTemp = ITK_NULLPTR;
       //
       str->Filter->GraftOutput(str->Filter->m_OutputImage);
       }
@@ -1246,7 +1251,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
         unsigned int count = str->Filter->m_Data[0].m_Count;
         if ( count != 0 )
           {
-          str->Filter->SetRMSChange( static_cast< double >( vcl_sqrt(
+          str->Filter->SetRMSChange( static_cast< double >( std::sqrt(
                                                               ( static_cast< float >( str->Filter->GetRMSChange() ) )
                                                               / count) ) );
           }
@@ -1276,7 +1281,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
             }
           if ( count != 0 )
             {
-            str->Filter->SetRMSChange( static_cast< double >( vcl_sqrt( ( static_cast< float >( str->Filter->
+            str->Filter->SetRMSChange( static_cast< double >( std::sqrt( ( static_cast< float >( str->Filter->
                                                                                                 m_RMSChange ) )
                                                                         / count ) ) );
             }
@@ -2665,7 +2670,7 @@ ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
   for ( ThreadId = 0; ThreadId < m_NumOfThreads; ThreadId++ )
     {
     os << indent << "ThreadId: " << ThreadId << std::endl;
-    if ( m_Data != 0 )
+    if ( m_Data != ITK_NULLPTR )
       {
       for ( i = 0; i < m_Data[ThreadId].m_Layers.size(); i++ )
         {
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx
index 59fff45..ca56997 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx
@@ -39,8 +39,8 @@ ReinitializeLevelSetImageFilter< TLevelSet >
   m_NarrowBanding = false;
   m_InputNarrowBandwidth = 12.0;
   m_OutputNarrowBandwidth = 12.0;
-  m_InputNarrowBand = NULL;
-  m_OutputNarrowBand = NULL;
+  m_InputNarrowBand = ITK_NULLPTR;
+  m_OutputNarrowBand = ITK_NULLPTR;
 }
 
 /*
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx
index d2b5aaa..cb17025 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.hxx
@@ -39,7 +39,7 @@ SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >
 {
   this->SetNumberOfRequiredInputs(2);
   this->SetNumberOfLayers(TInputImage::ImageDimension);
-  m_SegmentationFunction = 0;
+  m_SegmentationFunction = ITK_NULLPTR;
   m_AutoGenerateSpeedAdvection = true;
   this->SetIsoSurfaceValue(NumericTraits< ValueType >::Zero);
 
@@ -73,7 +73,7 @@ void
 SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >
 ::GenerateData()
 {
-  if ( m_SegmentationFunction == 0 )
+  if ( m_SegmentationFunction == ITK_NULLPTR )
     {
     itkExceptionMacro("No finite difference function was specified.");
     }
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.hxx
index c33a3c0..fcd62a3 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapeDetectionLevelSetImageFilter.hxx
@@ -42,8 +42,7 @@ ShapeDetectionLevelSetImageFilter< TInputImage, TFeatureImage, TOutputType >
 ::PrintSelf(std::ostream & os, Indent indent) const
 {
   Superclass::PrintSelf(os, indent);
-  os << indent << "ShapeDetectionFunction: " << std::endl;
-  m_ShapeDetectionFunction.GetPointer()->Print( os, indent.GetNextIndent() );
+  itkPrintSelfObjectMacro( ShapeDetectionFunction );
 }
 
 template< typename TInputImage, typename TFeatureImage, typename TOutputType >
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h
index 9f29333..71f8972 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.h
@@ -106,15 +106,15 @@ public:
 
   /** This method returns the value of the cost function corresponding
     * to the specified parameters.    */
-  virtual MeasureType GetValue(const ParametersType & parameters) const;
+  virtual MeasureType GetValue(const ParametersType & parameters) const ITK_OVERRIDE;
 
   /** This method returns the derivative of the cost function corresponding
     * to the specified parameters.   */
-  virtual void GetDerivative(const ParametersType &, DerivativeType &) const
+  virtual void GetDerivative(const ParametersType &, DerivativeType &) const ITK_OVERRIDE
   { itkExceptionMacro(<< "This function is currently not supported."); }
 
   /** Return the number of parameters. */
-  virtual unsigned int GetNumberOfParameters(void) const
+  virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE
   { return m_ShapeFunction->GetNumberOfParameters(); }
 
   /** Compute the inside term component of the MAP cost function.
@@ -142,7 +142,7 @@ protected:
   ShapePriorMAPCostFunctionBase();
   virtual ~ShapePriorMAPCostFunctionBase() {}
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   ShapeFunctionPointer m_ShapeFunction;
   NodeContainerPointer m_ActiveRegion;
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx
index f588b8f..41ccd06 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx
@@ -29,9 +29,9 @@ template< typename TFeatureImage, typename TOutputPixel >
 ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >
 ::ShapePriorMAPCostFunctionBase()
 {
-  m_ShapeFunction = NULL;
-  m_ActiveRegion  = NULL;
-  m_FeatureImage  = NULL;
+  m_ShapeFunction = ITK_NULLPTR;
+  m_ActiveRegion  = ITK_NULLPTR;
+  m_FeatureImage  = ITK_NULLPTR;
 }
 
 /**
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx
index 55d5c82..dd5ee24 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx
@@ -29,7 +29,7 @@ template< typename TImageType, typename TFeatureImageType >
 ShapePriorSegmentationLevelSetFunction< TImageType, TFeatureImageType >
 ::ShapePriorSegmentationLevelSetFunction()
 {
-  m_ShapeFunction = NULL;
+  m_ShapeFunction = ITK_NULLPTR;
   m_ShapePriorWeight = NumericTraits< ScalarValueType >::Zero;
 }
 
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx
index 91602f6..d0bac65 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx
@@ -40,10 +40,10 @@ template< typename TInputImage, typename TFeatureImage, typename TOutputPixelTyp
 ShapePriorSegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >
 ::ShapePriorSegmentationLevelSetImageFilter()
 {
-  m_ShapeFunction = NULL;
-  m_Optimizer = NULL;
-  m_CostFunction = NULL;
-  m_ShapePriorSegmentationFunction = NULL;
+  m_ShapeFunction = ITK_NULLPTR;
+  m_Optimizer = ITK_NULLPTR;
+  m_CostFunction = ITK_NULLPTR;
+  m_ShapePriorSegmentationFunction = ITK_NULLPTR;
 }
 
 template< typename TInputImage, typename TFeatureImage, typename TOutputPixelType >
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h
index de8f0e9..d4ae03d 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.h
@@ -233,7 +233,7 @@ public:
       processing band. */
   unsigned int GetMinimumNumberOfLayers() const
   {
-    return (int)vcl_ceil( m_CurvatureBandWidth
+    return (int)std::ceil( m_CurvatureBandWidth
                           + itkGetStaticConstMacro(ImageDimension) );
   }
 
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx
index 01abeb2..120bece 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldFourthOrderLevelSetImageFilter.hxx
@@ -41,7 +41,7 @@ SparseFieldFourthOrderLevelSetImageFilter< TInputImage, TOutputImage >
 ::SparseFieldFourthOrderLevelSetImageFilter()
 {
   m_RefitIteration = 0;
-  m_LevelSetFunction = 0;
+  m_LevelSetFunction = ITK_NULLPTR;
   m_ConvergenceFlag = false;
 
   this->SetIsoSurfaceValue(0);
@@ -122,7 +122,7 @@ SparseFieldFourthOrderLevelSetImageFilter< TInputImage, TOutputImage >
         position -= stride[k];
         }
       }
-    if ( it.GetPixel (position) == 0 )
+    if ( it.GetPixel (position) == ITK_NULLPTR )
       {
       flag = true;
       }
@@ -186,7 +186,7 @@ SparseFieldFourthOrderLevelSetImageFilter< TInputImage, TOutputImage >
       }
     else
       {
-      if ( node != 0 )
+      if ( node != ITK_NULLPTR )
         {
         node->m_CurvatureFlag = false;
         }
@@ -211,7 +211,7 @@ SparseFieldFourthOrderLevelSetImageFilter< TInputImage, TOutputImage >
   while ( layerIt != this->m_Layers[0]->End() )
     {
     node = im->GetPixel(layerIt->m_Value);
-    if ( ( node == 0 )
+    if ( ( node == ITK_NULLPTR )
          || ( node->m_CurvatureFlag == false ) )
       {
       //level set touching edge of normal band
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h
index f5d2852..78a2b29 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.h
@@ -32,11 +32,11 @@ namespace itk
  * lists of indices and other values.
  * \ingroup ITKLevelSets
  */
-template< typename TValueType >
+template< typename TValue >
 class SparseFieldLevelSetNode
 {
 public:
-  TValueType               m_Value;
+  TValue               m_Value;
   SparseFieldLevelSetNode *Next;
   SparseFieldLevelSetNode *Previous;
 };
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx
index 1041b24..e42e282 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx
@@ -128,16 +128,18 @@ SparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
 
 template< typename TInputImage, typename TOutputImage >
 SparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
-::SparseFieldLevelSetImageFilter()
+::SparseFieldLevelSetImageFilter() :
+  m_ConstantGradientValue(1.0),
+  m_NumberOfLayers(2),
+  m_IsoSurfaceValue(m_ValueZero),
+  m_InterpolateSurfaceLocation(true),
+  m_InputImage(ITK_NULLPTR),
+  m_OutputImage(ITK_NULLPTR),
+  m_BoundsCheckingActive(false)
 {
-  m_IsoSurfaceValue = m_ValueZero;
-  m_NumberOfLayers = 2;
   m_LayerNodeStore = LayerNodeStorageType::New();
   m_LayerNodeStore->SetGrowthStrategyToExponential();
   this->SetRMSChange( static_cast< double >( m_ValueZero ) );
-  m_InterpolateSurfaceLocation = true;
-  m_BoundsCheckingActive = false;
-  m_ConstantGradientValue = 1.0;
 }
 
 template< typename TInputImage, typename TOutputImage >
@@ -482,7 +484,7 @@ SparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
     }
   else
     {
-    this->SetRMSChange( static_cast< double >( vcl_sqrt( (double)( rms_change_accumulator
+    this->SetRMSChange( static_cast< double >( std::sqrt( (double)( rms_change_accumulator
                                                                    / static_cast< ValueType >( counter ) ) ) ) );
     }
 }
@@ -871,7 +873,7 @@ SparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
         length += dx_backward * dx_backward;
         }
       }
-    length = vcl_sqrt( (double)length ) + MIN_NORM;
+    length = std::sqrt( (double)length ) + MIN_NORM;
     distance = shiftedIt.GetCenterPixel() / length;
 
     output->SetPixel( activeIt->m_Value,
@@ -1192,8 +1194,7 @@ SparseFieldLevelSetImageFilter< TInputImage, TOutputImage >
 
   unsigned int i;
   os << indent << "m_IsoSurfaceValue: " << m_IsoSurfaceValue << std::endl;
-  os << indent << "m_LayerNodeStore: " << std::endl;
-  m_LayerNodeStore->Print( os, indent.GetNextIndent() );
+  itkPrintSelfObjectMacro( LayerNodeStore );
   os << indent << "m_BoundsCheckingActive: " << m_BoundsCheckingActive;
   for ( i = 0; i < m_Layers.size(); i++ )
     {
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.hxx b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.hxx
index 5713977..ec1df61 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSets/include/itkVectorThresholdSegmentationLevelSetFunction.hxx
@@ -38,7 +38,7 @@ void VectorThresholdSegmentationLevelSetFunction< TImageType, TFeatureImageType
   ScalarValueType threshold;
   for ( fit.GoToBegin(), sit.GoToBegin(); !fit.IsAtEnd(); ++sit, ++fit )
     {
-    threshold = m_Threshold - vcl_sqrt( m_Mahalanobis->Evaluate( fit.Get() ) );
+    threshold = m_Threshold - std::sqrt( m_Mahalanobis->Evaluate( fit.Get() ) );
     sit.Set( static_cast< ScalarValueType >( threshold ) );
     }
 }
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx
index e94d803..23f91d5 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx
@@ -139,7 +139,7 @@ BinaryImageToLevelSetImageAdaptor<
   this->m_LevelSet->SetLabelMap( this->m_LabelMap );
 
   // release the memory
-  this->m_InternalImage = NULL;
+  this->m_InternalImage = ITK_NULLPTR;
 }
 
 template< typename TInput, typename TOutput >
@@ -463,7 +463,7 @@ void BinaryImageToLevelSetImageAdaptor< TInput, ShiSparseLevelSetImage< TInput::
   FindActiveLayer();
 
   this->m_LevelSet->SetLabelMap( this->m_LabelMap );
-  this->m_InternalImage = NULL;
+  this->m_InternalImage = ITK_NULLPTR;
 }
 
 
@@ -622,7 +622,7 @@ void BinaryImageToLevelSetImageAdaptor< TInput,MalcolmSparseLevelSetImage< TInpu
   this->CreateMinimalInterface();
 
   this->m_LevelSet->SetLabelMap( this->m_LabelMap );
-  this->m_InternalImage = NULL;
+  this->m_InternalImage = ITK_NULLPTR;
 }
 
 template< typename TInput >
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx
index 9c8f5b5..72062a2 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx
@@ -710,20 +710,7 @@ DiscreteLevelSetImage< TOutput, VDimension >
 {
   Superclass::CopyInformation( data );
 
-  const Self *LevelSet = NULL;
-
-  try
-    {
-    LevelSet = dynamic_cast< const Self * >( data );
-    }
-  catch ( ... )
-    {
-    // LevelSet could not be cast back down
-    itkExceptionMacro( << "itk::DiscreteLevelSetImage::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( Self * ).name() );
-    }
-
+  const Self *LevelSet = dynamic_cast< const Self * >( data );
   if ( !LevelSet )
     {
     // pointer could not be cast back down
@@ -740,19 +727,7 @@ DiscreteLevelSetImage< TOutput, VDimension >
 ::Graft( const DataObject* data )
 {
   Superclass::Graft( data );
-  const Self *LevelSet = NULL;
-
-  try
-    {
-    LevelSet = dynamic_cast< const Self* >( data );
-    }
-  catch( ... )
-    {
-    // image could not be cast back down
-    itkExceptionMacro( << "itk::DiscreteLevelSetImage::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                         << typeid( Self * ).name() );
-    }
+  const Self *LevelSet = dynamic_cast< const Self* >( data );
 
   if ( !LevelSet )
     {
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h
index 9d38798..ae05ecb 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.h
@@ -178,26 +178,26 @@ public:
   itkGetConstMacro(MaximumNumberOfRegions, RegionType);
 
   /** Initialize the level set function */
-  virtual void Initialize();
+  virtual void Initialize() ITK_OVERRIDE;
 
   /** Methods to manage streaming. */
-  virtual void UpdateOutputInformation();
+  virtual void UpdateOutputInformation() ITK_OVERRIDE;
 
-  virtual void SetRequestedRegionToLargestPossibleRegion();
+  virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE;
 
-  virtual void CopyInformation(const DataObject *data);
+  virtual void CopyInformation(const DataObject *data) ITK_OVERRIDE;
 
-  virtual void Graft(const DataObject *data);
+  virtual void Graft(const DataObject *data) ITK_OVERRIDE;
 
-  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion();
+  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE;
 
-  virtual bool VerifyRequestedRegion();
+  virtual bool VerifyRequestedRegion() ITK_OVERRIDE;
 
   /** Set the requested region from this data object to match the requested
    * region of the data object passed in as a parameter.  This method
    * implements the API from DataObject. The data object parameter must be
    * castable to a PointSet. */
-  virtual void SetRequestedRegion( const DataObject *data);
+  virtual void SetRequestedRegion( const DataObject *data) ITK_OVERRIDE;
 
   /** Set/Get the Requested region */
   virtual void SetRequestedRegion(const RegionType & region);
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx
index cb0ee71..df326a9 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx
@@ -28,8 +28,13 @@ namespace itk
 
 template< typename TInput, unsigned int VDimension, typename TOutput, typename TDomain >
 LevelSetBase< TInput, VDimension, TOutput, TDomain >
-::LevelSetBase()
-  {}
+::LevelSetBase() :
+  m_MaximumNumberOfRegions(0),
+  m_NumberOfRegions(0),
+  m_RequestedNumberOfRegions(0),
+  m_BufferedRegion(0),
+  m_RequestedRegion(0)
+{}
 
 // ----------------------------------------------------------------------------
 template< typename TInput, unsigned int VDimension, typename TOutput, typename TDomain >
@@ -208,19 +213,7 @@ void
 LevelSetBase< TInput, VDimension, TOutput, TDomain >
 ::CopyInformation(const DataObject *data)
 {
-  const LevelSetBase *levelSet = NULL;
-
-  try
-    {
-    levelSet = dynamic_cast< const LevelSetBase * >( data );
-    }
-  catch ( ... )
-    {
-    // pointer could not be cast back down
-    itkExceptionMacro( << "itk::LevelSetBase::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( LevelSetBase * ).name() );
-    }
+  const LevelSetBase *levelSet = dynamic_cast< const LevelSetBase * >( data );
 
   if ( !levelSet )
     {
@@ -247,19 +240,7 @@ LevelSetBase< TInput, VDimension, TOutput, TDomain >
   // Copy Meta Data
   this->CopyInformation(data);
 
-  const Self * levelSet = NULL;
-
-  try
-    {
-    levelSet = dynamic_cast< const Self * >( data );
-    }
-  catch ( ... )
-    {
-    // pointer could not be cast back down
-    itkExceptionMacro( << "itk::LevelSetBase::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( Self * ).name() );
-    }
+  const Self * levelSet = dynamic_cast< const Self * >( data );
 
   if ( !levelSet )
     {
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx
index e364905..5436cea 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx
@@ -100,7 +100,7 @@ LevelSetContainerBase< TIdentifier, TLevelSet >
     }
   else
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 }
 
@@ -151,7 +151,7 @@ LevelSetContainerBase< TIdentifier, TLevelSet >
 
   if( it != m_Container.end() )
     {
-    it->second = NULL;
+    it->second = ITK_NULLPTR;
     m_Container.erase( it );
 
     this->Modified();
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx
index f697724..d08bfd9 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx
@@ -77,7 +77,7 @@ LevelSetDenseImage< TImage >
 {
   Superclass::Initialize();
 
-  this->m_Image = NULL;
+  this->m_Image = ITK_NULLPTR;
 }
 
 // ----------------------------------------------------------------------------
@@ -88,19 +88,7 @@ LevelSetDenseImage< TImage >
 {
   Superclass::CopyInformation( data );
 
-  const Self *LevelSet = NULL;
-
-  try
-    {
-    LevelSet = dynamic_cast< const Self * >( data );
-    }
-  catch ( ... )
-    {
-    // LevelSet could not be cast back down
-    itkExceptionMacro( << "itk::LevelSetDenseImage::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( Self * ).name() );
-    }
+  const Self *LevelSet = dynamic_cast< const Self * >( data );
 
   if ( !LevelSet )
     {
@@ -118,19 +106,7 @@ LevelSetDenseImage< TImage >
 ::Graft( const DataObject* data )
 {
   Superclass::Graft( data );
-  const Self *LevelSet = NULL;
-
-  try
-    {
-    LevelSet = dynamic_cast< const Self* >( data );
-    }
-  catch( ... )
-    {
-    // image could not be cast back down
-    itkExceptionMacro( << "itk::LevelSetDenseImage::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                         << typeid( Self * ).name() );
-    }
+  const Self *LevelSet = dynamic_cast< const Self* >( data );
 
   if ( !LevelSet )
     {
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx
index 0cae2a1..96cd7ba 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx
@@ -29,8 +29,8 @@ LevelSetDomainMapImageFilter< TInputImage, TOutputImage >
 {
   this->Superclass::SetNumberOfRequiredInputs ( 1 );
   this->Superclass::SetNumberOfRequiredOutputs ( 1 );
-  this->m_InputImage = 0;
-  this->m_OutputImage = 0;
+  this->m_InputImage = ITK_NULLPTR;
+  this->m_OutputImage = ITK_NULLPTR;
 }
 
 
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx
index d45c5c7..f2b4799 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImageWithKdTree.hxx
@@ -25,7 +25,7 @@ namespace itk
 template< typename TImage >
 LevelSetDomainPartitionImageWithKdTree< TImage >
 ::LevelSetDomainPartitionImageWithKdTree() :
-  m_KdTree(NULL), m_NumberOfNeighbors( 10 )
+  m_KdTree(ITK_NULLPTR), m_NumberOfNeighbors( 10 )
 {
 }
 
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx
index a35a930..5187e3d 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseExternalTerm.hxx
@@ -29,8 +29,8 @@ LevelSetEquationChanAndVeseExternalTerm< TInput, TLevelSetContainer >
 {
   this->m_TermName = "External Chan And Vese term";
   this->m_RequiredData.insert( "Value" );
-  this->m_DomainMapImageFilter = 0;
-  this->m_CacheImage = 0;
+  this->m_DomainMapImageFilter = ITK_NULLPTR;
+  this->m_CacheImage = ITK_NULLPTR;
 }
 
 template< typename TInput, typename TLevelSetContainer >
@@ -58,7 +58,7 @@ void LevelSetEquationChanAndVeseExternalTerm< TInput, TLevelSetContainer >
 
   if( this->m_LevelSetContainer->HasDomainMap() )
     {
-    if(this->m_DomainMapImageFilter == 0)
+    if(this->m_DomainMapImageFilter == ITK_NULLPTR)
       {
       this->m_DomainMapImageFilter = this->m_LevelSetContainer->GetModifiableDomainMapFilter();
       this->m_CacheImage = this->m_DomainMapImageFilter->GetOutput();
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx
index a087881..65c225e 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx
@@ -30,8 +30,8 @@ LevelSetEquationOverlapPenaltyTerm< TInput, TLevelSetContainer >
 {
   this->m_TermName = "Overlap term";
   this->m_RequiredData.insert( "" );
-  this->m_DomainMapImageFilter = 0;
-  this->m_CacheImage = 0;
+  this->m_DomainMapImageFilter = ITK_NULLPTR;
+  this->m_CacheImage = ITK_NULLPTR;
 }
 
 template< typename TInput, typename TLevelSetContainer >
@@ -98,7 +98,7 @@ void LevelSetEquationOverlapPenaltyTerm< TInput, TLevelSetContainer >
 
   if( this->m_LevelSetContainer->HasDomainMap() )
     {
-    if(this->m_DomainMapImageFilter == 0)
+    if(this->m_DomainMapImageFilter == ITK_NULLPTR)
       {
       this->m_DomainMapImageFilter = this->m_LevelSetContainer->GetModifiableDomainMapFilter();
       this->m_CacheImage = this->m_DomainMapImageFilter->GetOutput();
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx
index 6a428bd..2713431 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.hxx
@@ -27,7 +27,8 @@ namespace itk
 
 template< typename TEquationContainer, typename TImage >
 LevelSetEvolution< TEquationContainer, LevelSetDenseImage< TImage > >
-::LevelSetEvolution()
+::LevelSetEvolution() :
+  m_IdListToProcessWhenThreading(ITK_NULLPTR)
 {
   this->m_SplitLevelSetComputeIterationThreader  = SplitLevelSetComputeIterationThreaderType::New();
   this->m_SplitDomainMapComputeIterationThreader = SplitDomainMapComputeIterationThreaderType::New();
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.hxx
index 16e306c..3b0df28 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.hxx
@@ -38,7 +38,7 @@ LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImage< TImage >, Threaded
 {
   this->m_RMSChangeAccumulatorPerThread.resize( this->GetNumberOfThreadsUsed() );
 
-  for( ThreadIdType ii = 0; ii < this->GetNumberOfThreadsUsed(); ++ii )
+  for( ThreadIdType ii = 0, maxThreads = this->GetNumberOfThreadsUsed(); ii < maxThreads; ++ii )
     {
     this->m_RMSChangeAccumulatorPerThread[ii].ResetToZero();
     }
@@ -66,10 +66,9 @@ LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImage< TImage >, Threaded
   levelSetImageIt.GoToBegin();
   levelSetUpdateImageIt.GoToBegin();
 
-  LevelSetOutputRealType p;
   while( !levelSetImageIt.IsAtEnd() )
     {
-    p = this->m_Associate->m_Dt * levelSetUpdateImageIt.Get();
+    const LevelSetOutputRealType & p = this->m_Associate->m_Dt * levelSetUpdateImageIt.Get();
     levelSetImageIt.Set( levelSetImageIt.Get() + p );
 
     this->m_RMSChangeAccumulatorPerThread[threadId] += p*p;
@@ -84,7 +83,7 @@ void
 LevelSetEvolutionUpdateLevelSetsThreader< LevelSetDenseImage< TImage >, ThreadedImageRegionPartitioner< TImage::ImageDimension >, TLevelSetEvolution >
 ::AfterThreadedExecution()
 {
-  for( ThreadIdType ii = 0; ii < this->GetNumberOfThreadsUsed(); ++ii )
+  for( ThreadIdType ii = 0, maxThreads = this->GetNumberOfThreadsUsed(); ii < maxThreads; ++ii )
     {
     this->m_Associate->m_RMSChangeAccumulator += this->m_RMSChangeAccumulatorPerThread[ii].GetSum();
     }
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx
index 471158f..0786097 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx
@@ -113,19 +113,7 @@ LevelSetQuadEdgeMesh< TMesh >::CopyInformation(const DataObject *data)
 {
   Superclass::CopyInformation( data );
 
-  const Self *levelSet = NULL;
-
-  try
-    {
-    levelSet = dynamic_cast< const Self * >( data );
-    }
-  catch ( ... )
-    {
-    // levelSet could not be cast back down
-    itkExceptionMacro( << "itk::LevelSetQuadEdgeMesh::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( Self * ).name() );
-    }
+  const Self *levelSet = dynamic_cast< const Self * >( data );
 
   if ( !levelSet )
     {
@@ -141,19 +129,7 @@ void
 LevelSetQuadEdgeMesh< TMesh >::Graft( const DataObject* data )
 {
   Superclass::Graft( data );
-  const Self *levelSet = NULL;
-
-  try
-    {
-    levelSet = dynamic_cast< const Self* >( data );
-    }
-  catch( ... )
-    {
-    // mesh could not be cast back down
-    itkExceptionMacro( << "itk::LevelSetQuadEdgeMesh::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( Self * ).name() );
-    }
+  const Self *levelSet = dynamic_cast< const Self* >( data );
 
   if ( !levelSet )
     {
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx
index 4c4ca99..91751e4 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx
@@ -81,19 +81,7 @@ LevelSetSparseImage< TOutput, VDimension >
 ::Graft( const DataObject* data )
 {
   Superclass::Graft( data );
-  const Self *LevelSet = 0;
-
-  try
-    {
-    LevelSet = dynamic_cast< const Self* >( data );
-    }
-  catch( ... )
-    {
-    // mesh could not be cast back down
-    itkExceptionMacro( << "itk::MalcolmSparseLevelSet::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( Self * ).name() );
-    }
+  const Self *LevelSet = dynamic_cast< const Self* >( data );
 
   if ( !LevelSet )
     {
@@ -157,7 +145,7 @@ LevelSetSparseImage< TOutput, VDimension >
 {
   Superclass::Initialize();
 
-  this->m_LabelMap = 0;
+  this->m_LabelMap = ITK_NULLPTR;
   this->InitializeLayers();
   this->InitializeInternalLabelList();
 }
@@ -170,18 +158,7 @@ LevelSetSparseImage< TOutput, VDimension >
 {
   Superclass::CopyInformation( data );
 
-  const Self *LevelSet = NULL;
-  try
-    {
-    LevelSet = dynamic_cast< const Self* >( data );
-    }
-  catch( ... )
-    {
-    // LevelSet could not be cast back down
-    itkExceptionMacro( << "itk::MalcolmSparseLevelSet::CopyInformation() cannot cast "
-                       << typeid( data ).name() << " to "
-                       << typeid( Self * ).name() );
-    }
+  const Self *LevelSet = dynamic_cast< const Self* >( data );
 
   if ( !LevelSet )
     {
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx
index 11b8ada..afad4e8 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx
@@ -76,7 +76,6 @@ MalcolmSparseLevelSetImage< VDimension >::Evaluate( const InputType& inputPixel
       itkGenericExceptionMacro( <<"status "
                                 << static_cast< int >( status )
                                 << " should be 1 or -1" );
-      return PlusOneLayer();
       }
     }
 }
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx
index a8e8f5a..a2841f7 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx
@@ -76,7 +76,6 @@ ShiSparseLevelSetImage< VDimension >
       itkGenericExceptionMacro( <<"status "
                                 << static_cast< int >( status )
                                 << " should be 3 or -3" );
-      return static_cast<OutputType>( this->PlusThreeLayer() );
       }
     }
 }
diff --git a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx
index 2174b2a..da06d08 100644
--- a/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx
+++ b/Utilities/ITK/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx
@@ -77,7 +77,6 @@ WhitakerSparseLevelSetImage< TOutput, VDimension >
         itkGenericExceptionMacro( <<"status "
                                   << static_cast< int >( status )
                                   << " should be 3 or -3" );
-        return static_cast<OutputType>( this->PlusThreeLayer() );
         }
       }
     }
diff --git a/Utilities/ITK/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx
index a35dd06..c464b0c 100644
--- a/Utilities/ITK/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx
@@ -32,10 +32,10 @@ MRFImageFilter< TInputImage, TClassifiedImage >
   m_TotalNumberOfPixelsInInputImage(1),
   m_ErrorTolerance(0.2),
   m_SmoothingFactor(1),
-  m_ClassProbability(0),
+  m_ClassProbability(ITK_NULLPTR),
   m_NumberOfIterations(0),
   m_StopCondition(MaximumNumberOfIterations),
-  m_ClassifierPtr(0)
+  m_ClassifierPtr(ITK_NULLPTR)
 {
   if ( (int)InputImageDimension != (int)ClassifiedImageDimension )
     {
diff --git a/Utilities/ITK/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx b/Utilities/ITK/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx
index 2d45e0a..5e84f33 100644
--- a/Utilities/ITK/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkRGBGibbsPriorFilter.hxx
@@ -32,19 +32,19 @@ namespace itk
 template< typename TInputImage, typename TClassifiedImage >
 RGBGibbsPriorFilter< TInputImage, TClassifiedImage >
 ::RGBGibbsPriorFilter(void):
-  m_InputImage(0),
-  m_TrainingImage(0),
-  m_LabelledImage(0),
+  m_InputImage(ITK_NULLPTR),
+  m_TrainingImage(ITK_NULLPTR),
+  m_LabelledImage(ITK_NULLPTR),
   m_NumberOfClasses(0),
   m_MaximumNumberOfIterations(10),
-  m_ClassifierPtr(0),
+  m_ClassifierPtr(ITK_NULLPTR),
   m_BoundaryGradient(7),
   m_BoundaryWeight(1),
   m_GibbsPriorWeight(1),
   m_StartRadius(10),
   m_RecursiveNumber(0),
-  m_LabelStatus(0),
-  m_MediumImage(0),
+  m_LabelStatus(ITK_NULLPTR),
+  m_MediumImage(ITK_NULLPTR),
   m_Temp(0),
   m_ImageWidth(0),
   m_ImageHeight(0),
@@ -53,8 +53,8 @@ RGBGibbsPriorFilter< TInputImage, TClassifiedImage >
   m_ObjectLabel(1),
   m_VecDim(0),
   m_LowPoint(),
-  m_Region(NULL),
-  m_RegionCount(NULL),
+  m_Region(ITK_NULLPTR),
+  m_RegionCount(ITK_NULLPTR),
   m_CliqueWeight_1(0.0),
   m_CliqueWeight_2(0.0),
   m_CliqueWeight_3(0.0),
@@ -348,7 +348,7 @@ RGBGibbsPriorFilter< TInputImage, TClassifiedImage >
       {
       difenergy = energy[label] - energy[1 - label];
       double rand_num = (double)( rand() / 32768.0 );
-      double energy_num = (double)( vcl_exp( (double)( difenergy * 0.5 * size / ( 2 * size - m_Temp ) ) ) );
+      double energy_num = (double)( std::exp( (double)( difenergy * 0.5 * size / ( 2 * size - m_Temp ) ) ) );
       if ( rand_num < energy_num )
         {
         m_LabelledImage->SetPixel(offsetIndex3D, 1 - label);
diff --git a/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx
index 9390822..df6850d 100644
--- a/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx
@@ -244,8 +244,8 @@ ConfidenceConnectedImageFilter< TInputImage, TOutputImage >
     m_Variance  = ( sumOfSquares - ( sum * sum / double(num) ) ) / ( double(num) - 1.0 );
     }
 
-  lower = m_Mean - m_Multiplier *vcl_sqrt(m_Variance);
-  upper = m_Mean + m_Multiplier *vcl_sqrt(m_Variance);
+  lower = m_Mean - m_Multiplier *std::sqrt(m_Variance);
+  upper = m_Mean + m_Multiplier *std::sqrt(m_Variance);
 
   // Find the highest and lowest seed intensity.
   InputRealType lowestSeedIntensity = itk::NumericTraits< InputImagePixelType >::max();
@@ -299,7 +299,7 @@ ConfidenceConnectedImageFilter< TInputImage, TOutputImage >
 
   itkDebugMacro(
     << "\nLower intensity = " << lower << ", Upper intensity = " << upper << "\nmean = " << m_Mean
-    << " , vcl_sqrt(variance) = " << vcl_sqrt(m_Variance) );
+    << " , std::sqrt(variance) = " << std::sqrt(m_Variance) );
 
   // Segment the image, the iterator walks the output image (so Set()
   // writes into the output image), starting at the seed point.  As
@@ -355,15 +355,15 @@ ConfidenceConnectedImageFilter< TInputImage, TOutputImage >
                      << ", Upper intensity = " << upper
                      << "\nmean = " << m_Mean
                      << ", variance = " << m_Variance
-                     << " , vcl_sqrt(variance) = " << vcl_sqrt(m_Variance) );
+                     << " , std::sqrt(variance) = " << std::sqrt(m_Variance) );
       itkDebugMacro(<< "\nsum = " << sum
                     << ", sumOfSquares = "
                     << sumOfSquares << "\nnumberOfSamples = "
                     << numberOfSamples);
       break;
       }
-    lower = m_Mean - m_Multiplier *vcl_sqrt(m_Variance);
-    upper = m_Mean + m_Multiplier *vcl_sqrt(m_Variance);
+    lower = m_Mean - m_Multiplier *std::sqrt(m_Variance);
+    upper = m_Mean + m_Multiplier *std::sqrt(m_Variance);
 
     // Adjust lower and upper to always contain the seed's intensity, otherwise,
     // no pixels will be
@@ -394,7 +394,7 @@ ConfidenceConnectedImageFilter< TInputImage, TOutputImage >
                    << ", Upper intensity = " << upper
                    << "\nmean = " << m_Mean
                    << ", variance = " << m_Variance
-                   << " , vcl_sqrt(variance) = " << vcl_sqrt(m_Variance) );
+                   << " , std::sqrt(variance) = " << std::sqrt(m_Variance) );
     itkDebugMacro(<< "\nsum = " << sum << ", sumOfSquares = " << sumOfSquares << "\nnum = " << numberOfSamples);
 
     // Rerun the segmentation, the iterator walks the output image,
diff --git a/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.h b/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.h
index 7bb5957..cf66b63 100644
--- a/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.h
+++ b/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.h
@@ -84,7 +84,6 @@ public:
   /** Run-time type information (and related methods).  */
   itkTypeMacro(IsolatedConnectedImageFilter,
                ImageToImageFilter);
-
   typedef TInputImage                           InputImageType;
   typedef typename InputImageType::Pointer      InputImagePointer;
   typedef typename InputImageType::ConstPointer InputImageConstPointer;
@@ -105,27 +104,34 @@ public:
 
   void PrintSelf(std::ostream & os, Indent indent) const;
 
-  /** Set seed point 1. This seed will be isolated from Seed2 (if possible).
+  /** Add seed point 1. This seed will be isolated from Seed2 (if possible).
+   *  All pixels connected to this seed will be replaced with ReplaceValue. */
+  void AddSeed1(const IndexType & seed);
+
+#if ! defined ( ITK_FUTURE_LEGACY_REMOVE )
+  /** \deprecated
+   * Set seed point 1. This seed will be isolated from Seed2 (if possible).
    *  All pixels connected to this seed will be replaced with ReplaceValue.
-   *  This method is deprecated, please use AddSeed() */
+   *  This method is deprecated, please use AddSeed1(). */
   void SetSeed1(const IndexType & seed);
+#endif
 
   /** Clear all the seeds1. */
   void ClearSeeds1();
 
-  /** Add seed point 1. */
-  void AddSeed1(const IndexType & seed);
+  /** Add seed point 2. This seed will be isolated from Seed1 (if possible). */
+  void AddSeed2(const IndexType & seed);
 
-  /** Set seed point 2. This seed will be isolated from Seed1 (if possible).
-   *  This method is deprecated, please use AddSeed() */
+#if ! defined ( ITK_FUTURE_LEGACY_REMOVE )
+  /** \deprecated
+   * Set seed point 2. This seed will be isolated from Seed1 (if possible).
+   *  This method is deprecated, please use AddSeed2(). */
   void SetSeed2(const IndexType & seed);
+#endif
 
   /** Clear all the seeds2. */
   void ClearSeeds2();
 
-  /** Add seed point 2. */
-  void AddSeed2(const IndexType & seed);
-
   /** Method to access seed container */
   virtual const SeedsContainerType &GetSeeds1() const;
   virtual const SeedsContainerType &GetSeeds2() const;
@@ -140,7 +146,9 @@ public:
   itkSetMacro(Upper, InputImagePixelType);
   itkGetConstReferenceMacro(Upper, InputImagePixelType);
 
-  /** Set/Get the limit on the upper threshold value. The default is
+#if ! defined ( ITK_FUTURE_LEGACY_REMOVE )
+  /** \deprecated
+   * Set/Get the limit on the upper threshold value. The default is
       the max() for the InputPixelType.  These methods have been
       deprecated.  Please use Set/Get Upper instead. */
   void SetUpperValueLimit(InputImagePixelType upperValue)
@@ -152,6 +160,7 @@ public:
   {
     return this->GetUpper();
   }
+#endif
 
   /** Set/Get the precision required for the intensity threshold
    * value. The default is 1. */
diff --git a/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx
index f5425b7..b80e10b 100644
--- a/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx
@@ -99,6 +99,20 @@ IsolatedConnectedImageFilter< TInputImage, TOutputImage >
   output->SetRequestedRegionToLargestPossibleRegion();
 }
 
+/** Add seed point 1. This seed will be isolated from Seed2 (if possible). */
+template< typename TInputImage, typename TOutputImage >
+void
+IsolatedConnectedImageFilter< TInputImage, TOutputImage >
+::AddSeed1(const IndexType & seed)
+{
+  this->m_Seeds1.push_back(seed);
+  this->Modified();
+}
+
+#if ! defined ( ITK_FUTURE_LEGACY_REMOVE )
+/** \deprecated
+ * Set seed point 1. This seed will be isolated from Seed2 (if possible).
+ *  This method is deprecated, please use AddSeed1() */
 template< typename TInputImage, typename TOutputImage >
 void
 IsolatedConnectedImageFilter< TInputImage, TOutputImage >
@@ -107,6 +121,7 @@ IsolatedConnectedImageFilter< TInputImage, TOutputImage >
   this->ClearSeeds1();
   this->AddSeed1(seed);
 }
+#endif
 
 /** Clear all the seeds1. */
 template< typename TInputImage, typename TOutputImage >
@@ -121,18 +136,20 @@ IsolatedConnectedImageFilter< TInputImage, TOutputImage >
     }
 }
 
-/** Add seed point 1. */
+/** Add seed point 2. This seed will be isolated from Seed1 (if possible). */
 template< typename TInputImage, typename TOutputImage >
 void
 IsolatedConnectedImageFilter< TInputImage, TOutputImage >
-::AddSeed1(const IndexType & seed)
+::AddSeed2(const IndexType & seed)
 {
-  this->m_Seeds1.push_back(seed);
+  this->m_Seeds2.push_back(seed);
   this->Modified();
 }
 
-/** Set seed point 2. This seed will be isolated from Seed1 (if possible).
- *  This method is deprecated, please use AddSeed() */
+#if ! defined ( ITK_FUTURE_LEGACY_REMOVE )
+/** \deprecated
+ * Set seed point 2. This seed will be isolated from Seed1 (if possible).
+ *  This method is deprecated, please use AddSeed2() */
 template< typename TInputImage, typename TOutputImage >
 void
 IsolatedConnectedImageFilter< TInputImage, TOutputImage >
@@ -141,6 +158,7 @@ IsolatedConnectedImageFilter< TInputImage, TOutputImage >
   this->ClearSeeds2();
   this->AddSeed2(seed);
 }
+#endif
 
 /** Clear all the seeds2. */
 template< typename TInputImage, typename TOutputImage >
@@ -173,16 +191,6 @@ IsolatedConnectedImageFilter< TInputImage, TOutputImage >
   return this->m_Seeds2;
 }
 
-/** Add seed point 2. */
-template< typename TInputImage, typename TOutputImage >
-void
-IsolatedConnectedImageFilter< TInputImage, TOutputImage >
-::AddSeed2(const IndexType & seed)
-{
-  this->m_Seeds2.push_back(seed);
-  this->Modified();
-}
-
 template< typename TInputImage, typename TOutputImage >
 void
 IsolatedConnectedImageFilter< TInputImage, TOutputImage >
@@ -231,8 +239,8 @@ IsolatedConnectedImageFilter< TInputImage, TOutputImage >
     // two sets of seeds.
     const unsigned int maximumIterationsInBinarySearch =
       static_cast< unsigned int >(
-        vcl_log( ( static_cast< float >( upper ) - static_cast< float >( lower ) )
-                 / static_cast< float >( m_IsolatedValueTolerance ) )  / vcl_log(2.0) );
+        std::log( ( static_cast< float >( upper ) - static_cast< float >( lower ) )
+                 / static_cast< float >( m_IsolatedValueTolerance ) )  / std::log(2.0) );
 
     progressWeight = 1.0f / static_cast< float >( maximumIterationsInBinarySearch + 2 );
     cumulatedProgress = 0.0f;
@@ -298,8 +306,8 @@ IsolatedConnectedImageFilter< TInputImage, TOutputImage >
     // two sets of seeds.
     const unsigned int maximumIterationsInBinarySearch =
       static_cast< unsigned int >(
-        vcl_log( ( static_cast< float >( upper ) - static_cast< float >( lower ) )
-                 / static_cast< float >( m_IsolatedValueTolerance ) )  / vcl_log(2.0) );
+        std::log( ( static_cast< float >( upper ) - static_cast< float >( lower ) )
+                 / static_cast< float >( m_IsolatedValueTolerance ) )  / std::log(2.0) );
 
     progressWeight = 1.0f / static_cast< float >( maximumIterationsInBinarySearch + 2 );
     cumulatedProgress = 0.0f;
diff --git a/Utilities/ITK/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx b/Utilities/ITK/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx
index a528f47..9555a3f 100644
--- a/Utilities/ITK/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx
+++ b/Utilities/ITK/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx
@@ -33,7 +33,7 @@ PCAShapeSignedDistanceFunction< TCoordRep, VSpaceDimension, TImage >
   m_NumberOfPrincipalComponents = 0;
   m_NumberOfTransformParameters = 0;
 
-  m_MeanImage = NULL;
+  m_MeanImage = ITK_NULLPTR;
   m_PrincipalComponentImages.resize(0);
   m_PrincipalComponentStandardDeviations.SetSize(0);
 
@@ -55,7 +55,7 @@ PCAShapeSignedDistanceFunction< TCoordRep, VSpaceDimension, TImage >
 {
   m_NumberOfPrincipalComponents = n;
 
-  m_PrincipalComponentImages.resize(n, NULL);
+  m_PrincipalComponentImages.resize(n, ITK_NULLPTR);
   m_PrincipalComponentStandardDeviations.SetSize(n);
   m_PrincipalComponentStandardDeviations.Fill(1.0);
 
diff --git a/Utilities/ITK/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.hxx b/Utilities/ITK/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.hxx
index 0dbba2b..3dd4c0c 100644
--- a/Utilities/ITK/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.hxx
+++ b/Utilities/ITK/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.hxx
@@ -83,7 +83,7 @@ SphereSignedDistanceFunction< TCoordRep, VSpaceDimension >
     output += vnl_math_sqr( ( point[j] - m_Translation[j] ) );
     }
 
-  output = vcl_sqrt(output) - m_Radius;
+  output = std::sqrt(output) - m_Radius;
 
   return output;
 }
diff --git a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h
index d9f2e0a..12c9508 100644
--- a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h
+++ b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.h
@@ -33,7 +33,7 @@ namespace itk
  * \brief Implement the Sweep Line Algorithm for the construction of the
  *        2D Voronoi Diagram.
  *
- * Detailed informations of this method can be found in:
+ * Detailed information on this method can be found in:
  * "A sweepline algorithm for Voronoi diagrams."
  * S. Fortune, Algorithmica 2, 153-174, 1987.
  *
@@ -41,10 +41,9 @@ namespace itk
  * (1) Size of the region.
  * (2) Seed points coordinates. These coordinates can also be randomly set.
  *
- * Template parameters for VoronoiDiagram2DGenerator:
+ * \tparam TCoordType The type associated with the coordination of the seeds
+ * and the resulting vertices.
  *
- * TCoordType: the type associated with the coordination of the seeds and the
- *  resulting vertices.
  * \ingroup ITKVoronoi
  */
 template< typename TCoordType >
@@ -77,16 +76,20 @@ public:
   /** Get the number of seed points. */
   itkGetConstMacro(NumberOfSeeds, unsigned int);
 
-  /** Input the seeds information, will overwrite if seeds already
-   * exists. */
+  /** Set the seed points.
+   *
+   * Specify the number of seeds as "num". Will overwrite if seeds already
+   * exists.
+   */
   void SetSeeds(int num, SeedsIterator begin);
 
-  /** Add more seeds at one time. */
+  /** Add more seeds. Specify the number of seeds to be added as "num". */
   void AddSeeds(int num, SeedsIterator begin);
 
+  /** Add one seed. */
   void AddOneSeed(PointType);
 
-  /** Sort the seeds by ____. */
+  /** Sort the seeds with their y, then x, coordinates. */
   void SortSeeds(void);
 
   /** Produce the output information. */
@@ -95,12 +98,15 @@ public:
   /** Update the Voronoi Diagram after adding seed(s). */
   void UpdateDiagram(void);
 
-  /** The boundary that enclose the whole voronoi diagram. */
+  /** Set the rectangle that encloses the whole Voronoi Diagram. */
   void SetBoundary(PointType vorsize);
 
   void SetOrigin(PointType vorsize);
 
-  /** Set the seeds points randomly. */
+  /** Set the seeds points randomly.
+   *
+   * Specify the number of seeds as "num".
+   */
   void SetRandomSeeds(int num);
 
   /** Return the given indexed seed. */
@@ -123,46 +129,64 @@ private:
   OutputType   m_OutputVD;
   SeedsType    m_Seeds;
 
+  /** Compare point coordinates in the y direction. */
   static bool comp(PointType arg1, PointType arg2);
 
   /** \class FortuneSite
-   * Small data structures for Fortune's Method
-   * and some public variables/methods not for external access.
+   * \brief Small data structures for Fortune's Method and some public
+   * variables/methods not for external access.
+   *
    * \ingroup ITKVoronoi
    */
   class FortuneSite;
   class FortuneEdge;
   class FortuneHalfEdge;
 
-  /** All private nested classes must be friend classes to work with SunOS-CC compiler.
-   * If not, the private nested classes will not be able to access each other. */
+  // All private nested classes must be friend classes to work with SunOS-CC
+  // compiler. If not, the private nested classes will not be able to access
+  // each other.
   friend class FortuneSite;
   friend class FortuneEdge;
   friend class FortuneHalfEdge;
 
   class FortuneSite
   {
-public:
+  public:
     PointType m_Coord;
     int       m_Sitenbr;
-    FortuneSite():m_Sitenbr( NumericTraits< int >::max() ) { m_Coord.Fill( NumericTraits< CoordRepType >::max() ); }
+
+    FortuneSite() :
+      m_Sitenbr( NumericTraits< int >::max() )
+    {
+      m_Coord.Fill( NumericTraits< CoordRepType >::max() );
+    }
+
     ~FortuneSite(){}
   };
 
   class FortuneEdge
   {
-public:
+  public:
     float        m_A, m_B, m_C;    // explicit line function: Ax + By = C;
     FortuneSite *m_Ep[2];
     FortuneSite *m_Reg[2];
     int          m_Edgenbr;
-    FortuneEdge():m_A(0.0), m_B(0.0), m_C(0.0) { m_Ep[0] = m_Ep[1] = m_Reg[0] = m_Reg[1] = 0; }
+
+    FortuneEdge() :
+      m_A(0.0),
+      m_B(0.0),
+      m_C(0.0),
+      m_Edgenbr(0)
+    {
+      m_Ep[0] = m_Ep[1] = m_Reg[0] = m_Reg[1] = ITK_NULLPTR;
+    }
+
     ~FortuneEdge(){}
   };
 
   class FortuneHalfEdge
   {
-public:
+  public:
     FortuneHalfEdge *m_Left;
     FortuneHalfEdge *m_Right;
     FortuneEdge *    m_Edge;
@@ -170,15 +194,28 @@ public:
     FortuneSite *    m_Vert;
     double           m_Ystar;
     FortuneHalfEdge *m_Next;
-    FortuneHalfEdge():m_Left(0), m_Right(0), m_Edge(0), m_RorL(false), m_Vert(0), m_Ystar(0.0), m_Next(0) {}
-    FortuneHalfEdge(const FortuneHalfEdge & edge):m_Left(edge.m_Left),
+
+    FortuneHalfEdge() :
+      m_Left(ITK_NULLPTR),
+      m_Right(ITK_NULLPTR),
+      m_Edge(ITK_NULLPTR),
+      m_RorL(false),
+      m_Vert(ITK_NULLPTR),
+      m_Ystar(0.0),
+      m_Next(ITK_NULLPTR)
+    {}
+
+    FortuneHalfEdge(const FortuneHalfEdge & edge) :
+      m_Left(edge.m_Left),
       m_Right(edge.m_Right),
       m_Edge(edge.m_Edge),
       m_RorL(edge.m_RorL),
       m_Vert(edge.m_Vert),
       m_Ystar(edge.m_Ystar),
-      m_Next(edge.m_Next) {}
-    ~FortuneHalfEdge(){}
+      m_Next(edge.m_Next)
+    {}
+
+    ~FortuneHalfEdge() {}
   };
 
   double m_Pxmin;
@@ -205,6 +242,9 @@ public:
   FortuneEdge                m_DELETED;
   std::vector< FortuneSite > m_SeedSites;
 
+  /** Methods to convert the result from Fortune Algorithm into itkMesh
+   * structure.
+   */
   bool differentPoint(PointType p1, PointType p2);
 
   bool almostsame(CoordRepType p1, CoordRepType p2);
@@ -223,6 +263,10 @@ public:
 
   FortuneHalfEdge * ELgethash(int b);
 
+  /** Generate Voronoi Diagram using Fortune's Method. (Sweep Line)
+   *
+   * Information is stored in m_VertexList, m_EdgeList and m_LineList.
+   */
   bool right_of(FortuneHalfEdge *el, PointType *p);
 
   FortuneSite * getRightReg(FortuneHalfEdge *he);
diff --git a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx
index 27ae0ca..9dcb5fa 100644
--- a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx
@@ -29,13 +29,24 @@ const double NUMERIC_TOLERENCE = 1.0e-10;
 const double DIFF_TOLERENCE = 0.001;
 
 template< typename TCoordRepType >
-VoronoiDiagram2DGenerator< TCoordRepType >::VoronoiDiagram2DGenerator()
-{
-  m_NumberOfSeeds = 0;
-  m_Pxmin = 0;
-  m_Pymin = 0;
-  m_OutputVD = this->GetOutput();
-}
+VoronoiDiagram2DGenerator< TCoordRepType >::VoronoiDiagram2DGenerator() :
+  m_NumberOfSeeds( 0 ),
+  m_OutputVD( this->GetOutput() ),
+  m_Pxmin( 0.0 ),
+  m_Pxmax( 0.0 ),
+  m_Pymin( 0.0 ),
+  m_Pymax( 0.0 ),
+  m_Deltax( 0.0 ),
+  m_Deltay( 0.0 ),
+  m_SqrtNSites( 0.0 ),
+  m_PQcount( 0 ),
+  m_PQmin( 0 ),
+  m_PQhashsize( 0 ),
+  m_Nedges( 0 ),
+  m_Nvert( 0 ),
+  m_BottomSite( ITK_NULLPTR ),
+  m_ELhashsize( 0 )
+{}
 
 template< typename TCoordRepType >
 VoronoiDiagram2DGenerator< TCoordRepType >::
@@ -51,7 +62,6 @@ VoronoiDiagram2DGenerator< TCoordRepType >::PrintSelf(std::ostream & os, Indent
      << m_NumberOfSeeds << std::endl;
 }
 
-/* Set random seed points. Specify the number of seeds as "num". */
 template< typename TCoordRepType >
 void
 VoronoiDiagram2DGenerator< TCoordRepType >::SetRandomSeeds(int num)
@@ -70,7 +80,6 @@ VoronoiDiagram2DGenerator< TCoordRepType >::SetRandomSeeds(int num)
   m_NumberOfSeeds = num;
 }
 
-/* Set the seed points. Specify the number of seeds as "num". */
 template< typename TCoordRepType >
 void
 VoronoiDiagram2DGenerator< TCoordRepType >::SetSeeds(int num,  SeedsIterator begin)
@@ -84,7 +93,6 @@ VoronoiDiagram2DGenerator< TCoordRepType >::SetSeeds(int num,  SeedsIterator beg
   m_NumberOfSeeds = num;
 }
 
-/* Set the rectangle that encloses the Voronoi Diagram. */
 template< typename TCoordRepType >
 void
 VoronoiDiagram2DGenerator< TCoordRepType >::SetBoundary(PointType vorsize)
@@ -103,16 +111,19 @@ VoronoiDiagram2DGenerator< TCoordRepType >::SetOrigin(PointType vorsize)
   m_OutputVD->SetOrigin(vorsize);
 }
 
-/* Compare point coordinates  in the y direction. */
 template< typename TCoordRepType >
 bool
 VoronoiDiagram2DGenerator< TCoordRepType >::comp(PointType arg1, PointType arg2)
 {
-  if ( arg1[1] < arg2[1] ) { return 1; }
+  if ( arg1[1] < arg2[1] )
+    {
+    return 1;
+    }
   else if ( arg1[1] > arg2[1] )
     {
     return 0;
     }
+  // arg1[1] == arg2[1]
   else if ( arg1[0] < arg2[0] )
     {
     return 1;
@@ -121,10 +132,13 @@ VoronoiDiagram2DGenerator< TCoordRepType >::comp(PointType arg1, PointType arg2)
     {
     return 0;
     }
-  else { return 1; }
+  // arg1[0] == arg2[0]
+  else
+    {
+    return 0;
+    }
 }
 
-/* Sort the seeds with their y coordinates. */
 template< typename TCoordRepType >
 void
 VoronoiDiagram2DGenerator< TCoordRepType >::SortSeeds(void)
@@ -132,10 +146,9 @@ VoronoiDiagram2DGenerator< TCoordRepType >::SortSeeds(void)
   std::sort(m_Seeds.begin(), m_Seeds.end(), comp);
 }
 
-/* Add seeds. Specify the number of seeds to be added as "num". */
 template< typename TCoordRepType >
 void
-VoronoiDiagram2DGenerator< TCoordRepType >::AddSeeds(int num,  SeedsIterator begin)
+VoronoiDiagram2DGenerator< TCoordRepType >::AddSeeds(int num, SeedsIterator begin)
 {
   SeedsIterator ii(begin);
 
@@ -146,7 +159,6 @@ VoronoiDiagram2DGenerator< TCoordRepType >::AddSeeds(int num,  SeedsIterator beg
   m_NumberOfSeeds += num;
 }
 
-/* Add one seed. */
 template< typename TCoordRepType >
 void
 VoronoiDiagram2DGenerator< TCoordRepType >::AddOneSeed(PointType inputSeed)
@@ -183,9 +195,6 @@ VoronoiDiagram2DGenerator< TCoordRepType >::UpdateDiagram(void)
   this->GenerateData();
 }
 
-/** Methods to convert the result from Fortune Algorithm into
- * itkMesh structure. */
-
 template< typename TCoordRepType >
 bool
 VoronoiDiagram2DGenerator< TCoordRepType >::differentPoint(PointType p1, PointType p2)
@@ -437,10 +446,6 @@ VoronoiDiagram2DGenerator< TCoordRepType >::ConstructDiagram(void)
   delete[] rawEdges;
 }
 
-/**
- * Generate Voronoi Diagram using Fortune's Method. (Sweep Line)
- * Infomations are stored in m_VertexList, m_EdgeList and m_LineList. */
-
 template< typename TCoordRepType >
 bool
 VoronoiDiagram2DGenerator< TCoordRepType >::right_of(FortuneHalfEdge *el, PointType *p)
@@ -496,15 +501,15 @@ VoronoiDiagram2DGenerator< TCoordRepType >::createHalfEdge(FortuneHalfEdge *task
 {
   task->m_Edge = e;
   task->m_RorL = pm;
-  task->m_Next = NULL;
-  task->m_Vert = NULL;
+  task->m_Next = ITK_NULLPTR;
+  task->m_Vert = ITK_NULLPTR;
 }
 
 template< typename TCoordRepType >
 void
 VoronoiDiagram2DGenerator< TCoordRepType >::PQshowMin(PointType *answer)
 {
-  while ( ( m_PQHash[m_PQmin].m_Next ) == NULL )
+  while ( ( m_PQHash[m_PQmin].m_Next ) == ITK_NULLPTR )
     {
     m_PQmin += 1;
     }
@@ -518,7 +523,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::deletePQ(FortuneHalfEdge *task)
 {
   FortuneHalfEdge *last;
 
-  if ( ( task->m_Vert ) != NULL )
+  if ( ( task->m_Vert ) != ITK_NULLPTR )
     {
     last = &( m_PQHash[PQbucket(task)] );
     while ( ( last->m_Next ) != task )
@@ -527,7 +532,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::deletePQ(FortuneHalfEdge *task)
       }
     last->m_Next = ( task->m_Next );
     m_PQcount--;
-    task->m_Vert = NULL;
+    task->m_Vert = ITK_NULLPTR;
     }
 }
 
@@ -571,7 +576,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::insertPQ(FortuneHalfEdge *he, Fortun
   FortuneHalfEdge *last = &( m_PQHash[PQbucket(he)] );
   FortuneHalfEdge *enext;
 
-  while ( ( ( enext = ( last->m_Next ) ) != NULL )
+  while ( ( ( enext = ( last->m_Next ) ) != ITK_NULLPTR )
           && ( ( ( he->m_Ystar ) > ( enext->m_Ystar ) )
                || ( ( ( he->m_Ystar ) == ( enext->m_Ystar ) )
                     && ( ( v->m_Coord[0] ) > ( enext->m_Vert->m_Coord[0] ) ) ) ) )
@@ -590,7 +595,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::dist(FortuneSite *s1, FortuneSite *s
   double dx = ( s1->m_Coord[0] ) - ( s2->m_Coord[0] );
   double dy = ( s1->m_Coord[1] ) - ( s2->m_Coord[1] );
 
-  return ( vcl_sqrt(dx * dx + dy * dy) );
+  return ( std::sqrt(dx * dx + dy * dy) );
 }
 
 template< typename TCoordRepType >
@@ -599,14 +604,14 @@ VoronoiDiagram2DGenerator< TCoordRepType >::ELgethash(int b)
 {
   if ( ( b < 0 ) || ( b >= static_cast< int >( m_ELhashsize ) ) )
     {
-    return ( NULL );
+    return ( ITK_NULLPTR );
     }
   FortuneHalfEdge *he = m_ELHash[b];
-  if ( he == NULL )
+  if ( he == ITK_NULLPTR )
     {
     return ( he );
     }
-  if ( he->m_Edge == NULL )
+  if ( he->m_Edge == ITK_NULLPTR )
     {
     return ( he );
     }
@@ -614,9 +619,9 @@ VoronoiDiagram2DGenerator< TCoordRepType >::ELgethash(int b)
     {
     return ( he );
     }
-  m_ELHash[b] = NULL;
+  m_ELHash[b] = ITK_NULLPTR;
 
-  return ( NULL );
+  return ( ITK_NULLPTR );
 }
 
 template< typename TCoordRepType >
@@ -635,12 +640,12 @@ VoronoiDiagram2DGenerator< TCoordRepType >::findLeftHE(PointType *p)
     bucket = static_cast< int >( m_ELhashsize ) - 1;
     }
   FortuneHalfEdge *he = ELgethash(bucket);
-  if ( he == NULL )
+  if ( he == ITK_NULLPTR )
     {
     for ( i = 1; 1; i++ )
       {
-      if ( ( he = ELgethash(bucket - i) ) != NULL ) { break; }
-      if ( ( he = ELgethash(bucket + i) ) != NULL ) { break; }
+      if ( ( he = ELgethash(bucket - i) ) != ITK_NULLPTR ) { break; }
+      if ( ( he = ELgethash(bucket + i) ) != ITK_NULLPTR ) { break; }
       }
     }
 
@@ -673,7 +678,7 @@ template< typename TCoordRepType >
 typename VoronoiDiagram2DGenerator< TCoordRepType >::FortuneSite *
 VoronoiDiagram2DGenerator< TCoordRepType >::getRightReg(FortuneHalfEdge *he)
 {
-  if ( ( he->m_Edge ) == NULL )
+  if ( ( he->m_Edge ) == ITK_NULLPTR )
     {
     return ( m_BottomSite );
     }
@@ -691,7 +696,7 @@ template< typename TCoordRepType >
 typename VoronoiDiagram2DGenerator< TCoordRepType >::FortuneSite *
 VoronoiDiagram2DGenerator< TCoordRepType >::getLeftReg(FortuneHalfEdge *he)
 {
-  if ( ( he->m_Edge ) == NULL )
+  if ( ( he->m_Edge ) == ITK_NULLPTR )
     {
     return ( m_BottomSite );
     }
@@ -721,8 +726,8 @@ VoronoiDiagram2DGenerator< TCoordRepType >::bisect(FortuneEdge *answer, FortuneS
 {
   answer->m_Reg[0] = s1;
   answer->m_Reg[1] = s2;
-  answer->m_Ep[0] = NULL;
-  answer->m_Ep[1] = NULL;
+  answer->m_Ep[0] = ITK_NULLPTR;
+  answer->m_Ep[1] = ITK_NULLPTR;
 
   double dx = ( s2->m_Coord[0] ) - ( s1->m_Coord[0] );
   double dy = ( s2->m_Coord[1] ) - ( s1->m_Coord[1] );
@@ -759,12 +764,12 @@ VoronoiDiagram2DGenerator< TCoordRepType >::intersect(FortuneSite *newV, Fortune
   FortuneHalfEdge *saveHE;
   FortuneEdge *    saveE;
 
-  if ( e1 == NULL )
+  if ( e1 == ITK_NULLPTR )
     {
     newV->m_Sitenbr = -1;
     return;
     }
-  if ( e2 == NULL )
+  if ( e2 == ITK_NULLPTR )
     {
     newV->m_Sitenbr = -2;
     return;
@@ -825,7 +830,7 @@ template< typename TCoordRepType >
 void
 VoronoiDiagram2DGenerator< TCoordRepType >::clip_line(FortuneEdge *task)
 {
-/* clip line */
+  /* clip line */
   FortuneSite *s1;
   FortuneSite *s2;
   double       x1, y1, x2, y2;
@@ -845,7 +850,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::clip_line(FortuneEdge *task)
   int id2;
   if ( ( task->m_A ) == 1.0 )
     {
-    if ( ( s1 != NULL ) && ( ( s1->m_Coord[1] ) > m_Pymin ) )
+    if ( ( s1 != ITK_NULLPTR ) && ( ( s1->m_Coord[1] ) > m_Pymin ) )
       {
       y1 = s1->m_Coord[1];
       if ( y1 > m_Pymax )
@@ -862,7 +867,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::clip_line(FortuneEdge *task)
       id1 = -1;
       }
 
-    if ( ( s2 != NULL ) && ( ( s2->m_Coord[1] ) < m_Pymax ) )
+    if ( ( s2 != ITK_NULLPTR ) && ( ( s2->m_Coord[1] ) < m_Pymax ) )
       {
       y2 = s2->m_Coord[1];
       if ( y2 < m_Pymin )
@@ -914,7 +919,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::clip_line(FortuneEdge *task)
     }
   else
     {
-    if ( ( s1 != NULL ) && ( ( s1->m_Coord[0] ) > m_Pxmin ) )
+    if ( ( s1 != ITK_NULLPTR ) && ( ( s1->m_Coord[0] ) > m_Pxmin ) )
       {
       x1 = s1->m_Coord[0];
       if ( x1 > m_Pxmax )
@@ -930,7 +935,7 @@ VoronoiDiagram2DGenerator< TCoordRepType >::clip_line(FortuneEdge *task)
       y1 = ( task->m_C ) - ( task->m_A ) * x1;
       id1 = -1;
       }
-    if ( ( s2 != NULL ) && ( ( s2->m_Coord[0] ) < m_Pxmax ) )
+    if ( ( s2 != ITK_NULLPTR ) && ( ( s2->m_Coord[0] ) < m_Pxmax ) )
       {
       x2 = s2->m_Coord[0];
       if ( x2 < m_Pxmin )
@@ -1022,7 +1027,7 @@ void
 VoronoiDiagram2DGenerator< TCoordRepType >::makeEndPoint(FortuneEdge *task, bool lr, FortuneSite *ends)
 {
   task->m_Ep[lr] = ends;
-  if ( ( task->m_Ep[1 - lr] ) == NULL )
+  if ( ( task->m_Ep[1 - lr] ) == ITK_NULLPTR )
     {
     return;
     }
@@ -1043,13 +1048,13 @@ VoronoiDiagram2DGenerator< TCoordRepType >::GenerateVDFortune(void)
     m_SeedSites[i].m_Coord = m_Seeds[i];
     m_SeedSites[i].m_Sitenbr = i;
     }
-/* Initialize Boundary. */
+  /* Initialize Boundary. */
   m_Pxmax = m_VorBoundary[0];
   m_Pymax = m_VorBoundary[1];
 
   m_Deltay = m_Pymax - m_Pymin;
   m_Deltax = m_Pxmax - m_Pxmin;
-  m_SqrtNSites = vcl_sqrt( (float)( m_NumberOfSeeds + 4 ) );
+  m_SqrtNSites = std::sqrt( (float)( m_NumberOfSeeds + 4 ) );
 
   /* Initialize outputLists. */
   m_Nedges = 0;
@@ -1065,20 +1070,20 @@ VoronoiDiagram2DGenerator< TCoordRepType >::GenerateVDFortune(void)
   m_PQHash.resize(m_PQhashsize);
   for ( i = 0; i < m_PQhashsize; i++ )
     {
-    m_PQHash[i].m_Next = NULL;
+    m_PQHash[i].m_Next = ITK_NULLPTR;
     }
   m_ELhashsize = (int)( 2 * m_SqrtNSites );
   m_ELHash.resize(m_ELhashsize);
   for ( i = 0; i < m_ELhashsize; i++ )
     {
-    m_ELHash[i] = NULL;
+    m_ELHash[i] = ITK_NULLPTR;
     }
-  createHalfEdge(&( m_ELleftend ), NULL, 0);
-  createHalfEdge(&( m_ELrightend ), NULL, 0);
-  m_ELleftend.m_Left = NULL;
+  createHalfEdge(&( m_ELleftend ), ITK_NULLPTR, 0);
+  createHalfEdge(&( m_ELrightend ), ITK_NULLPTR, 0);
+  m_ELleftend.m_Left = ITK_NULLPTR;
   m_ELleftend.m_Right = &( m_ELrightend );
   m_ELrightend.m_Left = &( m_ELleftend );
-  m_ELrightend.m_Right = NULL;
+  m_ELrightend.m_Right = ITK_NULLPTR;
   m_ELHash[0] = &( m_ELleftend );
   m_ELHash[m_ELhashsize - 1] = &( m_ELrightend );
 
diff --git a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.hxx
index 936598a..23fbd65 100644
--- a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiPartitioningImageFilter.hxx
@@ -187,7 +187,7 @@ VoronoiPartitioningImageFilter< TInputImage, TOutputImage >
   double savevar;
   if ( num > 1 )
     {
-    savevar = vcl_sqrt( ( addpp - ( addp * addp ) / static_cast< double >( num ) )
+    savevar = std::sqrt( ( addpp - ( addp * addp ) / static_cast< double >( num ) )
                         / ( static_cast< double >( num ) - 1.0 ) );
     }
   else
@@ -195,7 +195,7 @@ VoronoiPartitioningImageFilter< TInputImage, TOutputImage >
     savevar = -1;
     }
 
-  return ( savevar >= 0 && vcl_sqrt(savevar) < m_SigmaThreshold );
+  return ( savevar >= 0 && std::sqrt(savevar) < m_SigmaThreshold );
 }
 
 template< typename TInputImage, typename TOutputImage >
diff --git a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.hxx
index 61f93ba..30be6bf 100644
--- a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilter.hxx
@@ -81,7 +81,7 @@ VoronoiSegmentationImageFilter< TInputImage, TOutputImage, TBinaryPriorImage >
   if ( num > 1 )
     {
     savemean = addp / num;
-    saveSTD = vcl_sqrt( ( addpp - ( addp * addp ) / ( num ) ) / ( num - 1 ) );
+    saveSTD = std::sqrt( ( addpp - ( addp * addp ) / ( num ) ) / ( num - 1 ) );
     }
   else
     {
@@ -90,7 +90,7 @@ VoronoiSegmentationImageFilter< TInputImage, TOutputImage, TBinaryPriorImage >
     }
 
   //   // jvm - Mahalanobis distance
-  //   if (savevar > 0 && vcl_fabs(savemean - m_Mean) / m_Var < 2.5)
+  //   if (savevar > 0 && std::fabs(savemean - m_Mean) / m_Var < 2.5)
   //     return true;
   //   else
   //     return false;
@@ -197,12 +197,12 @@ VoronoiSegmentationImageFilter< TInputImage, TOutputImage, TBinaryPriorImage >
     }
 
   m_Mean = addp / num;
-  m_STD = vcl_sqrt( ( addpp - ( addp * addp ) / num ) / ( num - 1 ) );
+  m_STD = std::sqrt( ( addpp - ( addp * addp ) / num ) / ( num - 1 ) );
   float b_Mean = addb / numb;
 
   if ( this->GetUseBackgroundInAPrior() )
     {
-    m_MeanTolerance = vcl_fabs(m_Mean - b_Mean) * this->GetMeanDeviation();
+    m_MeanTolerance = std::fabs(m_Mean - b_Mean) * this->GetMeanDeviation();
     }
   else
     {
diff --git a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx
index f03882b..42fa02d 100644
--- a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationImageFilterBase.hxx
@@ -29,20 +29,21 @@ namespace itk
 /* Constructor: setting the default parameter values. */
 template< typename TInputImage, typename TOutputImage, typename TBinaryPriorImage >
 VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage >
-::VoronoiSegmentationImageFilterBase()
+::VoronoiSegmentationImageFilterBase() :
+  m_NumberOfSeeds(200),
+  m_MinRegion(20),
+  m_Steps(0),
+  m_LastStepSeeds(0),
+  m_NumberOfSeedsToAdded(0),
+  m_NumberOfBoundary(0),
+  m_MeanDeviation(0.8),
+  m_UseBackgroundInAPrior(false),
+  m_OutputBoundary(false),
+  m_InteractiveSegmentation(false),
+  m_WorkingVD(VoronoiDiagram::New()),
+  m_VDGenerator(VoronoiDiagramGenerator::New())
 {
   m_Size.Fill(0);
-  m_MinRegion = 20;
-  m_Steps = 0;
-  m_LastStepSeeds = 0;
-  m_NumberOfSeeds = 200;
-  m_NumberOfSeedsToAdded = 0;
-  m_MeanDeviation = 0.8;
-  m_UseBackgroundInAPrior = false;
-  m_OutputBoundary = false;
-  m_InteractiveSegmentation = false;
-  m_WorkingVD = VoronoiDiagram::New();
-  m_VDGenerator = VoronoiDiagramGenerator::New();
 }
 
 /* Destructor. */
@@ -125,7 +126,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
   rightP = vertlist.back();
 
   double beginy = currP[1];
-  int    intbeginy = (int)vcl_ceil(beginy);
+  int    intbeginy = (int)std::ceil(beginy);
   idx[1] = intbeginy;
   double leftendy = leftP[1];
   double rightendy = rightP[1];
@@ -169,7 +170,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
     rightDx = ( rightP[0] - endx ) / ( rightP[1] - beginy );
     }
 
-  int intendy = (int)vcl_floor(endy);
+  int intendy = (int)std::floor(endy);
   if ( intbeginy > intendy )
     { //no scanline
     if ( RorL )
@@ -191,7 +192,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
       {
       beginx = leftP[0];
       }
-    for ( i = static_cast< int >( vcl_ceil(beginx) ); i <= static_cast< int >( vcl_floor(endx) ); i++ )
+    for ( i = static_cast< int >( std::ceil(beginx) ); i <= static_cast< int >( std::floor(endx) ); i++ )
       {
       idx[0] = i;
       ( *PixelPool ).push_back(idx);
@@ -205,7 +206,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
     beginx += offset * leftDx;
     while ( idx[1] <= intendy )
       {
-      for ( i = static_cast< int >( vcl_ceil(beginx) ); i <= static_cast< int >( vcl_floor(endx) ); i++ )
+      for ( i = static_cast< int >( std::ceil(beginx) ); i <= static_cast< int >( std::floor(endx) ); i++ )
         {
         idx[0] = i;
         ( *PixelPool ).push_back(idx);
@@ -271,8 +272,8 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
       endy = leftendy;
       }
 
-    intendy = (int)vcl_floor(endy);
-    intbeginy = (int)vcl_ceil(beginy);
+    intendy = (int)std::floor(endy);
+    intbeginy = (int)std::ceil(beginy);
 
     if ( intbeginy > intendy )
       { //no scanline
@@ -292,7 +293,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
       beginx += offset * leftDx;
       while ( idx[1] <= intendy )
         {
-        for ( i = static_cast< int >( vcl_ceil(beginx) ); i <= static_cast< int >( vcl_floor(endx) ); i++ )
+        for ( i = static_cast< int >( std::ceil(beginx) ); i <= static_cast< int >( std::floor(endx) ); i++ )
           {
           idx[0] = i;
           ( *PixelPool ).push_back(idx);
@@ -315,8 +316,8 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
     beginy = leftP[1];
     endy = rightP[1];
     }
-  intbeginy = (int)vcl_ceil(beginy);
-  intendy = (int)vcl_floor(endy);
+  intbeginy = (int)std::ceil(beginy);
+  intendy = (int)std::floor(endy);
   if ( intbeginy <= intendy )
     {
     if ( RorL )
@@ -350,7 +351,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
     endx += offset * rightDx;
     while ( idx[1] <= intendy )
       {
-      for ( i = static_cast< int >( vcl_ceil(beginx) ); i <= static_cast< int >( vcl_floor(endx) ); i++ )
+      for ( i = static_cast< int >( std::ceil(beginx) ); i <= static_cast< int >( std::floor(endx) ); i++ )
         {
         idx[0] = i;
         ( *PixelPool ).push_back(idx);
@@ -689,7 +690,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
   rightP = vertlist.back();
 
   double beginy = currP[1];
-  int    intbeginy = (int)vcl_ceil(beginy);
+  int    intbeginy = (int)std::ceil(beginy);
   idx[1] = intbeginy;
   double leftendy = leftP[1];
   double rightendy = rightP[1];
@@ -731,7 +732,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
     {
     rightDx = ( rightP[0] - endx ) / ( rightP[1] - beginy );
     }
-  int intendy = (int)vcl_floor(endy);
+  int intendy = (int)std::floor(endy);
   if ( intbeginy > intendy )
     { //no scanline
     if ( RorL )
@@ -753,7 +754,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
       {
       beginx = leftP[0];
       }
-    for ( i = static_cast< int >( vcl_ceil(beginx) ); i <= static_cast< int >( vcl_floor(endx) ); i++ )
+    for ( i = static_cast< int >( std::ceil(beginx) ); i <= static_cast< int >( std::floor(endx) ); i++ )
       {
       idx[0] = i;
       output->SetPixel(idx, color);
@@ -767,7 +768,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
     beginx += offset * leftDx;
     while ( idx[1] <= intendy )
       {
-      for ( i = static_cast< int >( vcl_ceil(beginx) ); i <= static_cast< int >( vcl_floor(endx) ); i++ )
+      for ( i = static_cast< int >( std::ceil(beginx) ); i <= static_cast< int >( std::floor(endx) ); i++ )
         {
         idx[0] = i;
         output->SetPixel(idx, color);
@@ -833,8 +834,8 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
       endy = leftendy;
       }
 
-    intendy = (int)vcl_floor(endy);
-    intbeginy = (int)vcl_ceil(beginy);
+    intendy = (int)std::floor(endy);
+    intbeginy = (int)std::ceil(beginy);
 
     if ( intbeginy > intendy )
       { //no scanline
@@ -854,7 +855,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
       beginx += offset * leftDx;
       while ( idx[1] <= intendy )
         {
-        for ( i = static_cast< int >( vcl_ceil(beginx) ); i <= static_cast< int >( vcl_floor(endx) ); i++ )
+        for ( i = static_cast< int >( std::ceil(beginx) ); i <= static_cast< int >( std::floor(endx) ); i++ )
           {
           idx[0] = i;
           output->SetPixel(idx, color);
@@ -877,8 +878,8 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
     beginy = leftP[1];
     endy = rightP[1];
     }
-  intbeginy = (int)vcl_ceil(beginy);
-  intendy = (int)vcl_floor(endy);
+  intbeginy = (int)std::ceil(beginy);
+  intendy = (int)std::floor(endy);
   if ( intbeginy <= intendy )
     {
     if ( RorL )
@@ -912,7 +913,7 @@ VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage
     endx += offset * rightDx;
     while ( idx[1] <= intendy )
       {
-      for ( i = static_cast< int >( vcl_ceil(beginx) ); i <= static_cast< int >( vcl_floor(endx) ); i++ )
+      for ( i = static_cast< int >( std::ceil(beginx) ); i <= static_cast< int >( std::floor(endx) ); i++ )
         {
         idx[0] = i;
         output->SetPixel(idx, color);
diff --git a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx
index 1088471..16014fe 100644
--- a/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Voronoi/include/itkVoronoiSegmentationRGBImageFilter.hxx
@@ -62,7 +62,7 @@ VoronoiSegmentationRGBImageFilter< TInputImage, TOutputImage >::SetMeanPercentEr
   for ( unsigned int i = 0; i < 6; i++ )
     {
     m_MeanPercentError[i] = x[i];
-    m_MeanTolerance[i] = vcl_fabs(x[i] * m_Mean[i]);
+    m_MeanTolerance[i] = std::fabs(x[i] * m_Mean[i]);
     }
 }
 
@@ -132,22 +132,22 @@ VoronoiSegmentationRGBImageFilter< TInputImage, TOutputImage >
     X =  0.607 * ipixel[0] + 0.174 * ipixel[1] + 0.201 * ipixel[2];
     Y =  0.299 * ipixel[0] + 0.587 * ipixel[1] + 0.114 * ipixel[2];
     Z =  0.066 * ipixel[1] + 1.117 * ipixel[2];
-    X = vcl_pow( ( X / X0 ), 0.3333 );
-    Y = vcl_pow( ( Y / Y0 ), 0.3333 );
-    Z = vcl_pow( ( Z / Z0 ), 0.3333 );
+    X = std::pow( ( X / X0 ), 0.3333 );
+    Y = std::pow( ( Y / Y0 ), 0.3333 );
+    Z = std::pow( ( Z / Z0 ), 0.3333 );
     L = 116 * Y - 16;
     a = 500 * ( X - Y );
     b = 200 * ( Y - Z );
 
     if ( b != 0.0 )
       {
-      wpixel[3] = vcl_atan2(b, a);     //H
+      wpixel[3] = std::atan2(b, a);     //H
       }
     else
       {
       wpixel[3] = 0;
       }
-    wpixel[4] = vcl_sqrt(a * a + b * b); //C
+    wpixel[4] = std::sqrt(a * a + b * b); //C
     wpixel[5] = L;                       //V
     wit.Set(wpixel);
     ++wit;
@@ -181,7 +181,7 @@ VoronoiSegmentationRGBImageFilter< TInputImage, TOutputImage >::TestHomogeneity(
     for ( i = 0; i < 6; i++ )
       {
       savemean[i] = addp[i] / num;
-      saveSTD[i] = vcl_sqrt( ( addpp[i] - ( addp[i] * addp[i] ) / ( num ) ) / ( num - 1 ) );
+      saveSTD[i] = std::sqrt( ( addpp[i] - ( addp[i] * addp[i] ) / ( num ) ) / ( num - 1 ) );
       }
     }
   else
@@ -320,21 +320,57 @@ VoronoiSegmentationRGBImageFilter< TInputImage, TOutputImage >::TakeAPrior(const
   for ( unsigned int i = 0; i < 6; i++ )
     {
     m_Mean[i] = objaddp[i] / objnum;
-    m_STD[i] = vcl_sqrt( ( objaddpp[i] - ( objaddp[i] * objaddp[i] ) / objnum ) / ( objnum - 1 ) );
+    m_STD[i] = std::sqrt( ( objaddpp[i] - ( objaddp[i] * objaddp[i] ) / objnum ) / ( objnum - 1 ) );
     m_STDTolerance[i] = m_STD[i] * m_STDPercentError[i];
-    b_Mean[i] = bkgaddp[i] / bkgnum;
-    b_STD[i] = vcl_sqrt( ( bkgaddpp[i] - ( bkgaddp[i] * bkgaddp[i] ) / bkgnum ) / ( bkgnum - 1 ) );
-    diffMean[i] = ( b_Mean[i] - m_Mean[i] ) / m_Mean[i];
-    if ( diffMean[i] < 0 ) { diffMean[i] = -diffMean[i]; }
-    diffSTD[i] = ( b_STD[i] - m_STD[i] ) / m_STD[i];
-    if ( diffSTD[i] < 0 ) { diffSTD[i] = -diffSTD[i]; }
+    if (bkgnum > 0)
+      {
+      b_Mean[i] = bkgaddp[i] / bkgnum;
+      }
+    else
+      {
+      b_Mean[i] = 0.0;
+      }
+    if (bkgnum > 1)
+      {
+      b_STD[i] =
+        std::sqrt( ( bkgaddpp[i] - ( bkgaddp[i] * bkgaddp[i] ) / bkgnum )
+                   / ( bkgnum - 1 ) );
+      }
+    else
+      {
+      b_STD[i] = 0.0;
+      }
+    if (m_Mean[i] != 0.0)
+      {
+      diffMean[i] = ( b_Mean[i] - m_Mean[i] ) / m_Mean[i];
+      }
+    else
+      {
+      diffMean[i] = 0.0;
+      }
+    if ( diffMean[i] < 0 )
+      {
+      diffMean[i] = -diffMean[i];
+      }
+    if (m_STD[i] != 0.0)
+      {
+      diffSTD[i] = ( b_STD[i] - m_STD[i] ) / m_STD[i];
+      }
+    else
+      {
+      diffSTD[i] = 0.0;
+      }
+    if ( diffSTD[i] < 0 )
+      {
+      diffSTD[i] = -diffSTD[i];
+      }
     if ( this->GetUseBackgroundInAPrior() )
       {
       m_MeanTolerance[i] = diffMean[i] * m_Mean[i] * this->GetMeanDeviation();
       }
     else
       {
-      m_MeanTolerance[i] = vcl_fabs(m_Mean[i] * m_MeanPercentError[i]);
+      m_MeanTolerance[i] = std::fabs(m_Mean[i] * m_MeanPercentError[i]);
       }
     }
 
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.hxx b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.hxx
index 453f5e4..9753044 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkIsolatedWatershedImageFilter.hxx
@@ -123,8 +123,8 @@ IsolatedWatershedImageFilter< TInputImage, TOutputImage >
 
   const unsigned int maximumIterationsInBinarySearch =
     static_cast< unsigned int >(
-      vcl_log( ( static_cast< float >( upper ) - static_cast< float >( lower ) )
-               / static_cast< float >( m_IsolatedValueTolerance ) )  / vcl_log(2.0) );
+      std::log( ( static_cast< float >( upper ) - static_cast< float >( lower ) )
+               / static_cast< float >( m_IsolatedValueTolerance ) )  / std::log(2.0) );
 
   const float progressWeight = 1.0f / static_cast< float >( maximumIterationsInBinarySearch + 2 );
   float       cumulatedProgress = 0.0f;
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkOneWayEquivalencyTable.h b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkOneWayEquivalencyTable.h
index a2cc406..461e96f 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkOneWayEquivalencyTable.h
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkOneWayEquivalencyTable.h
@@ -129,7 +129,7 @@ protected:
   OneWayEquivalencyTable(const Self &); // purposely not implemented
   void operator=(const Self &);         // purposely not implemented
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   HashTableType m_HashMap;
 };
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.h b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.h
index 8f525fd..e931e30 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.h
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedBoundary.h
@@ -200,7 +200,7 @@ protected:
   virtual ~Boundary() {}
   Boundary(const Self &) {}
   void operator=(const Self &) {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** The Nx2 matrix of faces of this boundary.   */
   std::vector< std::pair< FacePointer, FacePointer > > m_Faces;
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h
index 9c641b0..b541ff2 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h
@@ -111,12 +111,12 @@ public:
   }
 
   /** Standard non-threaded pipeline method */
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** Standard itk::ProcessObject subclass method. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
 protected:
   BoundaryResolver():m_Face(0)
@@ -131,10 +131,10 @@ protected:
   virtual ~BoundaryResolver() {}
   BoundaryResolver(const Self &) {}
   void operator=(const Self &) {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   unsigned short m_Face;
-  void GenerateOutputRequestedRegion(DataObject *output);
+  virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE;
 };
 } // end namespace watershed
 } // end namespace itk
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.h b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.h
index 6ee1936..3439482 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.h
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.h
@@ -106,12 +106,12 @@ public:
   }
 
   /** Standard non-threaded pipeline method */
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** Standard itk::ProcessObject subclass method. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
 protected:
   EquivalenceRelabeler()
@@ -125,11 +125,11 @@ protected:
   virtual ~EquivalenceRelabeler() {}
   EquivalenceRelabeler(const Self &) {}
   void operator=(const Self &) {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
-  void GenerateOutputRequestedRegion(DataObject *output);
+  virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE;
 
-  void GenerateInputRequestedRegion();
+  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
 };
 } // end namespace watershed
 } // end namespace itk
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h
index e41365a..ab49fd3 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedMiniPipelineProgressCommand.h
@@ -42,9 +42,9 @@ public:
   itkNewMacro(Self);
 
   /** Standard Command virtual methods */
-  void Execute(Object *caller, const EventObject & event);
+  virtual void Execute(Object *caller, const EventObject & event) ITK_OVERRIDE;
 
-  void Execute(const Object *caller, const EventObject & event);
+  virtual void Execute(const Object *caller, const EventObject & event) ITK_OVERRIDE;
 
   /** Set/Get the filter whose UpdateProgress will be set by this
    * command object */
@@ -63,10 +63,10 @@ public:
   itkGetConstMacro(NumberOfFilters, double);
 
 protected:
-  WatershedMiniPipelineProgressCommand():m_Count(0.0), m_Filter(NULL),
+  WatershedMiniPipelineProgressCommand():m_Count(0.0), m_Filter(ITK_NULLPTR),
     m_NumberOfFilters(1.0) {}
   virtual ~WatershedMiniPipelineProgressCommand() {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
   double         m_Count;
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.h b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.h
index ed0d284..d0f9efc 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.h
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.h
@@ -88,7 +88,7 @@ public:
   /** Standard itk::ProcessObject subclass method. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
   /** Set/Get the input image */
   void SetInputImage(ImageType *img)
@@ -127,7 +127,7 @@ public:
   }
 
   /** Standard non-threaded pipeline method */
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** Set/Get the percentage of the maximum saliency level
    * to merge to. */
@@ -144,12 +144,12 @@ protected:
   virtual ~Relabeler() {}
   Relabeler(const Self &) {}
   void operator=(const Self &) {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   double m_FloodLevel;
-  void GenerateOutputRequestedRegion(DataObject *output);
+  virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE;
 
-  void GenerateInputRequestedRegion();
+  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
 };
 } // end namespace watershed
 } // end namespace itk
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h
index 615c06e..4425bb8 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTable.h
@@ -112,7 +112,7 @@ public:
   {
     Iterator result = m_HashMap.find(a);
 
-    if ( result == m_HashMap.end() ) { return 0; }
+    if ( result == m_HashMap.end() ) { return ITK_NULLPTR; }
     else { return &( ( *result ).second ); }
   }
 
@@ -203,7 +203,9 @@ public:
   }
 
 protected:
-  SegmentTable() {}
+  SegmentTable() :
+    m_MaximumDepth(0)
+  {}
   virtual ~SegmentTable() {}
 
   HashMapType m_HashMap;
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h
index cad29a2..f3fe998 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTree.h
@@ -157,14 +157,14 @@ public:
 
   /** Standard DataObject routine to initialize.  Returns the segment
    * tree to a default state, deallocating memory. */
-  void Initialize();
+  virtual void Initialize() ITK_OVERRIDE;
 
 protected:
   SegmentTree() {}
   virtual ~SegmentTree() {}
   SegmentTree(const Self &) {}
   void operator=(const Self &) {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   DequeType m_Deque;
 };
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h
index e91234d..55681ef 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h
@@ -140,7 +140,7 @@ public:
   }
 
   /** Standard non-threaded itk pipeline method */
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** Get/Set a boolean flag indicating whether or not to pre-merge the
     segments marked  as equivalent in the EquivalencyTable.  This is only
@@ -190,14 +190,14 @@ public:
   /** Standard itk::ProcessObject subclass method. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
 protected:
   SegmentTreeGenerator();
   virtual ~SegmentTreeGenerator() {}
   SegmentTreeGenerator(const Self &) {}
   void operator=(const Self &) {}
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Generates an initial list of all potentential merges in
    * the segment table.   */
@@ -210,9 +210,9 @@ protected:
   void MergeEquivalencies();
 
   /** Methods required by the itk pipeline */
-  void GenerateOutputRequestedRegion(DataObject *output);
+  virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE;
 
-  void GenerateInputRequestedRegion();
+  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
 
 private:
   bool   m_Merge;
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx
index 80e2eab..df8ca70 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx
@@ -430,7 +430,7 @@ void SegmentTreeGenerator< TScalar >
   typename SegmentTableType::segment_t * from_seg = segments->Lookup(FROM);
   typename SegmentTableType::segment_t * to_seg   = segments->Lookup(TO);
 
-  if ( from_seg == 0 || to_seg == 0 )
+  if ( from_seg == ITK_NULLPTR || to_seg == ITK_NULLPTR )
     {
     itkGenericExceptionMacro (
       <<
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h
index da99754..887584c 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.h
@@ -172,7 +172,7 @@ public:
   { this->ProcessObject::SetNthOutput(2, b); }
 
   /** Standard non-threaded pipeline execution method. */
-  void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** This method is necessary until the streaming mechanisms of the Itk
    * pipeline are full fleshed out.  It is only used for streaming
@@ -199,7 +199,7 @@ public:
   /** Standard itk::ProcessObject subclass method. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
   /** Gets/Sets the initial label (IdentifierType integer value) used
    * by the labeling algorithm.  Only necessary for streaming applications. */
@@ -267,7 +267,7 @@ protected:
   Segmenter();
   Segmenter(const Self &) {}
   virtual ~Segmenter();
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   void operator=(const Self &) {}
 
@@ -278,11 +278,11 @@ protected:
   /** This method asks for an image region that is one pixel larger
    * at each boundary than the region being processed.  This single pixel
    * expansion represents an overlap with adjacent image chunks   */
-  void GenerateInputRequestedRegion();
+  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
 
-  void GenerateOutputRequestedRegion(DataObject *output);
+  virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE;
 
-  void UpdateOutputInformation();
+  virtual void UpdateOutputInformation() ITK_OVERRIDE;
 
   /**  Allocates boundary structure information and sets the
    * boundary data to null values.   */
diff --git a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx
index 3ecc961..7c823cc 100644
--- a/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx
+++ b/Utilities/ITK/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx
@@ -325,7 +325,6 @@ void Segmenter< TInputImage >
   ImageRegionIterator< OutputImageType >                   labelIt;
 
   typename BoundaryType::face_t::Pointer face;
-  typedef typename BoundaryType::flat_hash_t flats_t;
   typename BoundaryType::flat_hash_t           * flats;
   typename BoundaryType::flat_hash_t::iterator flats_it;
   typename BoundaryType::flat_region_t flr;
@@ -953,7 +952,7 @@ void Segmenter< TInputImage >
     // and update its minimum value if necessary.
     segment_ptr = segments->Lookup(segment_label);
     edge_table_entry_ptr = edgeHash.find(segment_label);
-    if ( segment_ptr == 0 ) // This segment not yet identified.
+    if ( segment_ptr == ITK_NULLPTR ) // This segment not yet identified.
       {                     // So add it to the table.
       temp_segment.min = searchIt.GetPixel(hoodCenter);
       segments->Add(segment_label, temp_segment);
@@ -1016,7 +1015,7 @@ void Segmenter< TInputImage >
     {
     // Lookup the corresponding segment entry
     segment_ptr = segments->Lookup( ( *edge_table_entry_ptr ).first );
-    if ( segment_ptr == 0 )
+    if ( segment_ptr == ITK_NULLPTR )
       {
       itkGenericExceptionMacro (<< "UpdateSegmentTable:: An unexpected and fatal error has occurred.");
       }
@@ -1252,7 +1251,7 @@ Segmenter< TInputImage >
     {
     return BoundaryType::New().GetPointer();
     }
-  else { return 0; }
+  else { return ITK_NULLPTR; }
 }
 
 template< typename TInputImage >
@@ -1354,8 +1353,8 @@ Segmenter< TInputImage >
   m_CurrentLabel = 1;
   m_DoBoundaryAnalysis = false;
   m_SortEdgeLists = true;
-  m_Connectivity.direction = 0;
-  m_Connectivity.index = 0;
+  m_Connectivity.direction = ITK_NULLPTR;
+  m_Connectivity.index = ITK_NULLPTR;
   typename OutputImageType::Pointer img =
     static_cast< OutputImageType * >( this->MakeOutput(0).GetPointer() );
   typename SegmentTableType::Pointer st =
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/UpdateDoubleConversionFromGoogle.sh b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/UpdateDoubleConversionFromGoogle.sh
index b3daaad..64db70b 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/UpdateDoubleConversionFromGoogle.sh
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/UpdateDoubleConversionFromGoogle.sh
@@ -25,8 +25,8 @@ fi
 # EDIT THIS SCRIPT to change the hash tag at which to begin the
 # next update...
 #
-# This merge done April 30 2013
-git branch DoubleConversion-upstream 0447797f4afab5c5
+# This merge done April 28, 2014
+git branch DoubleConversion-upstream 1feae55e5af21e36
 
 #
 # Make a temp directory to handle the import of the upstream source
@@ -53,13 +53,16 @@ git clone https://code.google.com/p/double-conversion/
 # recover the upstream commit date.
 cd double-conversion
 upstream_date="$(git log -n 1 --format='%cd')"
+upstream_sha="$(git rev-parse HEAD)"
 cd ..
 
 #
 # Check to see if LICENSE file changed -- if changed, fix in a separate
 # commit.
-if [ ! diff double-conversion/LICENSE ../Modules/ThirdParty/DoubleConversion/LICENSE ]
+if  diff double-conversion/LICENSE ../Modules/ThirdParty/DoubleConversion/src/LICENSE
 then
+    echo LICENSE file unchanged
+else
     echo The double-conversion LICENSE file has changed.  Please
     echo add the change in a separate commit by hand and run this script again.
     exit 1
@@ -77,7 +80,12 @@ git add --all
 GIT_AUTHOR_NAME='Google double-conversion Maintainers' \
 GIT_AUTHOR_EMAIL='floitsch at google.com' \
 GIT_AUTHOR_DATE="${upstream_date}" \
-git commit -q -m "Google double-conversion (reduced)"
+git commit -q -m "Google double-conversion (reduced)
+
+This corresponds to commit hash
+  ${upstream_sha}
+from Google repository
+  http://code.google.com/p/double-conversion"
 
 #
 # push to the DoubleConversion-upstream branch in the
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/CMakeLists.txt b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/CMakeLists.txt
index fe0936f..697026d 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/CMakeLists.txt
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/CMakeLists.txt
@@ -30,21 +30,14 @@ endif()
 itk_module_target(itkdouble-conversion NO_INSTALL)
 
 #
-# associates the list of headers with the library
-# for the purposes of installation/import into other projects
-#
 # install command to set up library install
 # given the above PUBLIC_HEADER property set, this
 # pulls along all the header files with the library.
-if(NOT ITK_INSTALL_NO_LIBRARIES)
-  install(TARGETS itkdouble-conversion
-    EXPORT ${ITKDoubleConversion-targets}
-    RUNTIME DESTINATION "${ITKDoubleConversion_INSTALL_RUNTIME_DIR}" COMPONENT Applications
-    LIBRARY DESTINATION "${ITKDoubleConversion_INSTALL_LIBRARY_DIR}" COMPONENT Libraries
-    ARCHIVE DESTINATION "${ITKDoubleConversion_INSTALL_LIBRARY_DIR}" COMPONENT Development)
-endif()
+install(TARGETS itkdouble-conversion
+  EXPORT ${ITKDoubleConversion-targets}
+  RUNTIME DESTINATION "${ITKDoubleConversion_INSTALL_RUNTIME_DIR}" COMPONENT Applications
+  LIBRARY DESTINATION "${ITKDoubleConversion_INSTALL_LIBRARY_DIR}" COMPONENT Libraries
+  ARCHIVE DESTINATION "${ITKDoubleConversion_INSTALL_LIBRARY_DIR}" COMPONENT Development)
 
-if(NOT ITK_INSTALL_NO_DEVELOPMENT)
-  install(FILES ${headers}
-    DESTINATION "${ITKDoubleConversion_INSTALL_INCLUDE_DIR}" COMPONENT Development)
-endif()
+install(FILES ${headers}
+  DESTINATION "${ITKDoubleConversion_INSTALL_INCLUDE_DIR}" COMPONENT Development)
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/bignum-dtoa.cc b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/bignum-dtoa.cc
index b6c2e85..f1ad7a5 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/bignum-dtoa.cc
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/bignum-dtoa.cc
@@ -192,13 +192,13 @@ static void GenerateShortestDigits(Bignum* numerator, Bignum* denominator,
     delta_plus = delta_minus;
   }
   *length = 0;
-  while (true) {
+  for (;;) {
     uint16_t digit;
     digit = numerator->DivideModuloIntBignum(*denominator);
     ASSERT(digit <= 9);  // digit is a uint16_t and therefore always positive.
     // digit = numerator / denominator (integer division).
     // numerator = numerator % denominator.
-    buffer[(*length)++] = digit + '0';
+    buffer[(*length)++] = static_cast<char>(digit + '0');
 
     // Can we stop already?
     // If the remainder of the division is less than the distance to the lower
@@ -282,7 +282,7 @@ static void GenerateShortestDigits(Bignum* numerator, Bignum* denominator,
 // exponent (decimal_point), when rounding upwards.
 static void GenerateCountedDigits(int count, int* decimal_point,
                                   Bignum* numerator, Bignum* denominator,
-                                  Vector<char>(buffer), int* length) {
+                                  Vector<char> buffer, int* length) {
   ASSERT(count >= 0);
   for (int i = 0; i < count - 1; ++i) {
     uint16_t digit;
@@ -290,7 +290,7 @@ static void GenerateCountedDigits(int count, int* decimal_point,
     ASSERT(digit <= 9);  // digit is a uint16_t and therefore always positive.
     // digit = numerator / denominator (integer division).
     // numerator = numerator % denominator.
-    buffer[i] = digit + '0';
+    buffer[i] = static_cast<char>(digit + '0');
     // Prepare for next iteration.
     numerator->Times10();
   }
@@ -300,7 +300,8 @@ static void GenerateCountedDigits(int count, int* decimal_point,
   if (Bignum::PlusCompare(*numerator, *numerator, *denominator) >= 0) {
     digit++;
   }
-  buffer[count - 1] = digit + '0';
+  ASSERT(digit <= 10);
+  buffer[count - 1] = static_cast<char>(digit + '0');
   // Correct bad digits (in case we had a sequence of '9's). Propagate the
   // carry until we hat a non-'9' or til we reach the first digit.
   for (int i = count - 1; i > 0; --i) {
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/bignum.cc b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/bignum.cc
index dc8a2a6..2743d67 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/bignum.cc
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/bignum.cc
@@ -40,6 +40,7 @@ Bignum::Bignum()
 
 template<typename S>
 static int BitSize(S value) {
+  (void) value;  // Mark variable as used.
   return 8 * sizeof(value);
 }
 
@@ -122,9 +123,8 @@ void Bignum::AssignDecimalString(Vector<const char> value) {
 static int HexCharValue(char c) {
   if ('0' <= c && c <= '9') return c - '0';
   if ('a' <= c && c <= 'f') return 10 + c - 'a';
-  if ('A' <= c && c <= 'F') return 10 + c - 'A';
-  UNREACHABLE();
-  return 0;  // To make compiler happy.
+  ASSERT('A' <= c && c <= 'F');
+  return 10 + c - 'A';
 }
 
 
@@ -505,9 +505,10 @@ uint16_t Bignum::DivideModuloIntBignum(const Bignum& other) {
     // is big. This function is implemented for doubleToString where
     // the result should be small (less than 10).
     ASSERT(other.bigits_[other.used_digits_ - 1] >= ((1 << kBigitSize) / 16));
+    ASSERT(bigits_[used_digits_ - 1] < 0x10000);
     // Remove the multiples of the first digit.
     // Example this = 23 and other equals 9. -> Remove 2 multiples.
-    result += bigits_[used_digits_ - 1];
+    result += static_cast<uint16_t>(bigits_[used_digits_ - 1]);
     SubtractTimes(other, bigits_[used_digits_ - 1]);
   }
 
@@ -523,13 +524,15 @@ uint16_t Bignum::DivideModuloIntBignum(const Bignum& other) {
     // Shortcut for easy (and common) case.
     int quotient = this_bigit / other_bigit;
     bigits_[used_digits_ - 1] = this_bigit - other_bigit * quotient;
-    result += quotient;
+    ASSERT(quotient < 0x10000);
+    result += static_cast<uint16_t>(quotient);
     Clamp();
     return result;
   }
 
   int division_estimate = this_bigit / (other_bigit + 1);
-  result += division_estimate;
+  ASSERT(division_estimate < 0x10000);
+  result += static_cast<uint16_t>(division_estimate);
   SubtractTimes(other, division_estimate);
 
   if (other_bigit * (division_estimate + 1) > this_bigit) {
@@ -560,8 +563,8 @@ static int SizeInHexChars(S number) {
 
 static char HexCharOfValue(int value) {
   ASSERT(0 <= value && value <= 16);
-  if (value < 10) return value + '0';
-  return value - 10 + 'A';
+  if (value < 10) return static_cast<char>(value + '0');
+  return static_cast<char>(value - 10 + 'A');
 }
 
 
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/cached-powers.cc b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/cached-powers.cc
index c676429..d1359ff 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/cached-powers.cc
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/cached-powers.cc
@@ -152,6 +152,7 @@ void PowersOfTenCache::GetCachedPowerForBinaryExponentRange(
   ASSERT(0 <= index && index < kCachedPowersLength);
   CachedPower cached_power = kCachedPowers[index];
   ASSERT(min_exponent <= cached_power.binary_exponent);
+  (void) max_exponent;  // Mark variable as used.
   ASSERT(cached_power.binary_exponent <= max_exponent);
   *decimal_exponent = cached_power.decimal_exponent;
   *power = DiyFp(cached_power.significand, cached_power.binary_exponent);
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/double-conversion.cc b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/double-conversion.cc
index 5f2738a..addb362 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/double-conversion.cc
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/double-conversion.cc
@@ -348,7 +348,6 @@ static BignumDtoaMode DtoaToBignumDtoaMode(
     case DoubleToStringConverter::PRECISION: return BIGNUM_DTOA_PRECISION;
     default:
       UNREACHABLE();
-      return BIGNUM_DTOA_SHORTEST;  // To silence compiler.
   }
 }
 
@@ -403,8 +402,8 @@ void DoubleToStringConverter::DoubleToAscii(double v,
                              vector, length, point);
       break;
     default:
-      UNREACHABLE();
       fast_worked = false;
+      UNREACHABLE();
   }
   if (fast_worked) return;
 
@@ -417,8 +416,9 @@ void DoubleToStringConverter::DoubleToAscii(double v,
 
 // Consumes the given substring from the iterator.
 // Returns false, if the substring does not match.
-static bool ConsumeSubString(const char** current,
-                             const char* end,
+template <class Iterator>
+static bool ConsumeSubString(Iterator* current,
+                             Iterator end,
                              const char* substring) {
   ASSERT(**current == *substring);
   for (substring++; *substring != '\0'; substring++) {
@@ -440,10 +440,36 @@ static bool ConsumeSubString(const char** current,
 const int kMaxSignificantDigits = 772;
 
 
+static const char kWhitespaceTable7[] = { 32, 13, 10, 9, 11, 12 };
+static const int kWhitespaceTable7Length = ARRAY_SIZE(kWhitespaceTable7);
+
+
+static const uc16 kWhitespaceTable16[] = {
+  160, 8232, 8233, 5760, 6158, 8192, 8193, 8194, 8195,
+  8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279
+};
+static const int kWhitespaceTable16Length = ARRAY_SIZE(kWhitespaceTable16);
+
+
+static bool isWhitespace(int x) {
+  if (x < 128) {
+    for (int i = 0; i < kWhitespaceTable7Length; i++) {
+      if (kWhitespaceTable7[i] == x) return true;
+    }
+  } else {
+    for (int i = 0; i < kWhitespaceTable16Length; i++) {
+      if (kWhitespaceTable16[i] == x) return true;
+    }
+  }
+  return false;
+}
+
+
 // Returns true if a nonspace found and false if the end has reached.
-static inline bool AdvanceToNonspace(const char** current, const char* end) {
+template <class Iterator>
+static inline bool AdvanceToNonspace(Iterator* current, Iterator end) {
   while (*current != end) {
-    if (**current != ' ') return true;
+    if (!isWhitespace(**current)) return true;
     ++*current;
   }
   return false;
@@ -462,26 +488,50 @@ static double SignedZero(bool sign) {
 }
 
 
+// Returns true if 'c' is a decimal digit that is valid for the given radix.
+//
+// The function is small and could be inlined, but VS2012 emitted a warning
+// because it constant-propagated the radix and concluded that the last
+// condition was always true. By moving it into a separate function the
+// compiler wouldn't warn anymore.
+static bool IsDecimalDigitForRadix(int c, int radix) {
+  return '0' <= c && c <= '9' && (c - '0') < radix;
+}
+
+// Returns true if 'c' is a character digit that is valid for the given radix.
+// The 'a_character' should be 'a' or 'A'.
+//
+// The function is small and could be inlined, but VS2012 emitted a warning
+// because it constant-propagated the radix and concluded that the first
+// condition was always false. By moving it into a separate function the
+// compiler wouldn't warn anymore.
+static bool IsCharacterDigitForRadix(int c, int radix, char a_character) {
+  return radix > 10 && c >= a_character && c < a_character + radix - 10;
+}
+
+
 // Parsing integers with radix 2, 4, 8, 16, 32. Assumes current != end.
-template <int radix_log_2>
-static double RadixStringToIeee(const char* current,
-                                const char* end,
+template <int radix_log_2, class Iterator>
+static double RadixStringToIeee(Iterator* current,
+                                Iterator end,
                                 bool sign,
                                 bool allow_trailing_junk,
                                 double junk_string_value,
                                 bool read_as_double,
-                                const char** trailing_pointer) {
-  ASSERT(current != end);
+                                bool* result_is_junk) {
+  ASSERT(*current != end);
 
   const int kDoubleSize = Double::kSignificandSize;
   const int kSingleSize = Single::kSignificandSize;
   const int kSignificandSize = read_as_double? kDoubleSize: kSingleSize;
 
+  *result_is_junk = true;
+
   // Skip leading 0s.
-  while (*current == '0') {
-    ++current;
-    if (current == end) {
-      *trailing_pointer = end;
+  while (**current == '0') {
+    ++(*current);
+    if (*current == end) {
+      *result_is_junk = false;
       return SignedZero(sign);
     }
   }
@@ -492,14 +542,14 @@ static double RadixStringToIeee(const char* current,
 
   do {
     int digit;
-    if (*current >= '0' && *current <= '9' && *current < '0' + radix) {
-      digit = static_cast<char>(*current) - '0';
-    } else if (radix > 10 && *current >= 'a' && *current < 'a' + radix - 10) {
-      digit = static_cast<char>(*current) - 'a' + 10;
-    } else if (radix > 10 && *current >= 'A' && *current < 'A' + radix - 10) {
-      digit = static_cast<char>(*current) - 'A' + 10;
+    if (IsDecimalDigitForRadix(**current, radix)) {
+      digit = static_cast<char>(**current) - '0';
+    } else if (IsCharacterDigitForRadix(**current, radix, 'a')) {
+      digit = static_cast<char>(**current) - 'a' + 10;
+    } else if (IsCharacterDigitForRadix(**current, radix, 'A')) {
+      digit = static_cast<char>(**current) - 'A' + 10;
     } else {
-      if (allow_trailing_junk || !AdvanceToNonspace(&current, end)) {
+      if (allow_trailing_junk || !AdvanceToNonspace(current, end)) {
         break;
       } else {
         return junk_string_value;
@@ -523,14 +573,14 @@ static double RadixStringToIeee(const char* current,
       exponent = overflow_bits_count;
 
       bool zero_tail = true;
-      while (true) {
-        ++current;
-        if (current == end || !isDigit(*current, radix)) break;
-        zero_tail = zero_tail && *current == '0';
+      for (;;) {
+        ++(*current);
+        if (*current == end || !isDigit(**current, radix)) break;
+        zero_tail = zero_tail && **current == '0';
         exponent += radix_log_2;
       }
 
-      if (!allow_trailing_junk && AdvanceToNonspace(&current, end)) {
+      if (!allow_trailing_junk && AdvanceToNonspace(current, end)) {
         return junk_string_value;
       }
 
@@ -552,13 +602,13 @@ static double RadixStringToIeee(const char* current,
       }
       break;
     }
-    ++current;
-  } while (current != end);
+    ++(*current);
+  } while (*current != end);
 
   ASSERT(number < ((int64_t)1 << kSignificandSize));
   ASSERT(static_cast<int64_t>(static_cast<double>(number)) == number);
 
-  *trailing_pointer = current;
+  *result_is_junk = false;
 
   if (exponent == 0) {
     if (sign) {
@@ -573,13 +623,14 @@ static double RadixStringToIeee(const char* current,
 }
 
 
+template <class Iterator>
 double StringToDoubleConverter::StringToIeee(
-    const char* input,
+    Iterator input,
     int length,
-    int* processed_characters_count,
-    bool read_as_double) const {
-  const char* current = input;
-  const char* end = input + length;
+    bool read_as_double,
+    int* processed_characters_count) const {
+  Iterator current = input;
+  Iterator end = input + length;
 
   *processed_characters_count = 0;
 
@@ -600,7 +651,7 @@ double StringToDoubleConverter::StringToIeee(
 
   if (allow_leading_spaces || allow_trailing_spaces) {
     if (!AdvanceToNonspace(&current, end)) {
-      *processed_characters_count = current - input;
+      *processed_characters_count = static_cast<int>(current - input);
       return empty_string_value_;
     }
     if (!allow_leading_spaces && (input != current)) {
@@ -626,7 +677,7 @@ double StringToDoubleConverter::StringToIeee(
   if (*current == '+' || *current == '-') {
     sign = (*current == '-');
     ++current;
-    const char* next_non_space = current;
+    Iterator next_non_space = current;
     // Skip following spaces (if allowed).
     if (!AdvanceToNonspace(&next_non_space, end)) return junk_string_value_;
     if (!allow_spaces_after_sign && (current != next_non_space)) {
@@ -649,7 +700,7 @@ double StringToDoubleConverter::StringToIeee(
       }
 
       ASSERT(buffer_pos == 0);
-      *processed_characters_count = current - input;
+      *processed_characters_count = static_cast<int>(current - input);
       return sign ? -Double::Infinity() : Double::Infinity();
     }
   }
@@ -668,7 +719,7 @@ double StringToDoubleConverter::StringToIeee(
       }
 
       ASSERT(buffer_pos == 0);
-      *processed_characters_count = current - input;
+      *processed_characters_count = static_cast<int>(current - input);
       return sign ? -Double::NaN() : Double::NaN();
     }
   }
@@ -677,7 +728,7 @@ double StringToDoubleConverter::StringToIeee(
   if (*current == '0') {
     ++current;
     if (current == end) {
-      *processed_characters_count = current - input;
+      *processed_characters_count = static_cast<int>(current - input);
       return SignedZero(sign);
     }
 
@@ -690,17 +741,17 @@ double StringToDoubleConverter::StringToIeee(
         return junk_string_value_;  // "0x".
       }
 
-      const char* tail_pointer = NULL;
-      double result = RadixStringToIeee<4>(current,
+      bool result_is_junk;
+      double result = RadixStringToIeee<4>(&current,
                                            end,
                                            sign,
                                            allow_trailing_junk,
                                            junk_string_value_,
                                            read_as_double,
-                                           &tail_pointer);
-      if (tail_pointer != NULL) {
-        if (allow_trailing_spaces) AdvanceToNonspace(&tail_pointer, end);
-        *processed_characters_count = tail_pointer - input;
+                                           &result_is_junk);
+      if (!result_is_junk) {
+        if (allow_trailing_spaces) AdvanceToNonspace(&current, end);
+        *processed_characters_count = static_cast<int>(current - input);
       }
       return result;
     }
@@ -709,7 +760,7 @@ double StringToDoubleConverter::StringToIeee(
     while (*current == '0') {
       ++current;
       if (current == end) {
-        *processed_characters_count = current - input;
+        *processed_characters_count = static_cast<int>(current - input);
         return SignedZero(sign);
       }
     }
@@ -757,7 +808,7 @@ double StringToDoubleConverter::StringToIeee(
       while (*current == '0') {
         ++current;
         if (current == end) {
-          *processed_characters_count = current - input;
+          *processed_characters_count = static_cast<int>(current - input);
           return SignedZero(sign);
         }
         exponent--;  // Move this 0 into the exponent.
@@ -855,16 +906,17 @@ double StringToDoubleConverter::StringToIeee(
 
   if (octal) {
     double result;
-    const char* tail_pointer = NULL;
-    result = RadixStringToIeee<3>(buffer,
+    bool result_is_junk;
+    char* start = buffer;
+    result = RadixStringToIeee<3>(&start,
                                   buffer + buffer_pos,
                                   sign,
                                   allow_trailing_junk,
                                   junk_string_value_,
                                   read_as_double,
-                                  &tail_pointer);
-    ASSERT(tail_pointer != NULL);
-    *processed_characters_count = current - input;
+                                  &result_is_junk);
+    ASSERT(!result_is_junk);
+    *processed_characters_count = static_cast<int>(current - input);
     return result;
   }
 
@@ -882,8 +934,42 @@ double StringToDoubleConverter::StringToIeee(
   } else {
     converted = Strtof(Vector<const char>(buffer, buffer_pos), exponent);
   }
-  *processed_characters_count = current - input;
+  *processed_characters_count = static_cast<int>(current - input);
   return sign? -converted: converted;
 }
 
+
+double StringToDoubleConverter::StringToDouble(
+    const char* buffer,
+    int length,
+    int* processed_characters_count) const {
+  return StringToIeee(buffer, length, true, processed_characters_count);
+}
+
+
+double StringToDoubleConverter::StringToDouble(
+    const uc16* buffer,
+    int length,
+    int* processed_characters_count) const {
+  return StringToIeee(buffer, length, true, processed_characters_count);
+}
+
+
+float StringToDoubleConverter::StringToFloat(
+    const char* buffer,
+    int length,
+    int* processed_characters_count) const {
+  return static_cast<float>(StringToIeee(buffer, length, false,
+                                         processed_characters_count));
+}
+
+
+float StringToDoubleConverter::StringToFloat(
+    const uc16* buffer,
+    int length,
+    int* processed_characters_count) const {
+  return static_cast<float>(StringToIeee(buffer, length, false,
+                                         processed_characters_count));
+}
+
 }  // namespace double_conversion
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/double-conversion.h b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/double-conversion.h
index 1c3387d..6bdfa8d 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/double-conversion.h
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/double-conversion.h
@@ -415,9 +415,10 @@ class StringToDoubleConverter {
   //          junk, too.
   //  - ALLOW_TRAILING_JUNK: ignore trailing characters that are not part of
   //      a double literal.
-  //  - ALLOW_LEADING_SPACES: skip over leading spaces.
-  //  - ALLOW_TRAILING_SPACES: ignore trailing spaces.
-  //  - ALLOW_SPACES_AFTER_SIGN: ignore spaces after the sign.
+  //  - ALLOW_LEADING_SPACES: skip over leading whitespace, including spaces,
+  //                          new-lines, and tabs.
+  //  - ALLOW_TRAILING_SPACES: ignore trailing whitespace.
+  //  - ALLOW_SPACES_AFTER_SIGN: ignore whitespace after the sign.
   //       Ex: StringToDouble("-   123.2") -> -123.2.
   //           StringToDouble("+   123.2") -> 123.2
   //
@@ -502,19 +503,24 @@ class StringToDoubleConverter {
   // in the 'processed_characters_count'. Trailing junk is never included.
   double StringToDouble(const char* buffer,
                         int length,
-                        int* processed_characters_count) const {
-    return StringToIeee(buffer, length, processed_characters_count, true);
-  }
+                        int* processed_characters_count) const;
+
+  // Same as StringToDouble above but for 16 bit characters.
+  double StringToDouble(const uc16* buffer,
+                        int length,
+                        int* processed_characters_count) const;
 
   // Same as StringToDouble but reads a float.
   // Note that this is not equivalent to static_cast<float>(StringToDouble(...))
   // due to potential double-rounding.
   float StringToFloat(const char* buffer,
                       int length,
-                      int* processed_characters_count) const {
-    return static_cast<float>(StringToIeee(buffer, length,
-                                           processed_characters_count, false));
-  }
+                      int* processed_characters_count) const;
+
+  // Same as StringToFloat above but for 16 bit characters.
+  float StringToFloat(const uc16* buffer,
+                      int length,
+                      int* processed_characters_count) const;
 
  private:
   const int flags_;
@@ -523,10 +529,11 @@ class StringToDoubleConverter {
   const char* const infinity_symbol_;
   const char* const nan_symbol_;
 
-  double StringToIeee(const char* buffer,
+  template <class Iterator>
+  double StringToIeee(Iterator start_pointer,
                       int length,
-                      int* processed_characters_count,
-                      bool read_as_double) const;
+                      bool read_as_double,
+                      int* processed_characters_count) const;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(StringToDoubleConverter);
 };
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/fast-dtoa.cc b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/fast-dtoa.cc
index 1a0f823..6135038 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/fast-dtoa.cc
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/fast-dtoa.cc
@@ -248,10 +248,7 @@ static void BiggestPowerTen(uint32_t number,
   // Note: kPowersOf10[i] == 10^(i-1).
   exponent_plus_one_guess++;
   // We don't have any guarantees that 2^number_bits <= number.
-  // TODO(floitsch): can we change the 'while' into an 'if'? We definitely see
-  // number < (2^number_bits - 1), but I haven't encountered
-  // number < (2^number_bits - 2) yet.
-  while (number < kSmallPowersOfTen[exponent_plus_one_guess]) {
+  if (number < kSmallPowersOfTen[exponent_plus_one_guess]) {
     exponent_plus_one_guess--;
   }
   *power = kSmallPowersOfTen[exponent_plus_one_guess];
@@ -350,7 +347,8 @@ static bool DigitGen(DiyFp low,
   // that is smaller than integrals.
   while (*kappa > 0) {
     int digit = integrals / divisor;
-    buffer[*length] = '0' + digit;
+    ASSERT(digit <= 9);
+    buffer[*length] = static_cast<char>('0' + digit);
     (*length)++;
     integrals %= divisor;
     (*kappa)--;
@@ -379,13 +377,14 @@ static bool DigitGen(DiyFp low,
   ASSERT(one.e() >= -60);
   ASSERT(fractionals < one.f());
   ASSERT(UINT64_2PART_C(0xFFFFFFFF, FFFFFFFF) / 10 >= one.f());
-  while (true) {
+  for (;;) {
     fractionals *= 10;
     unit *= 10;
     unsafe_interval.set_f(unsafe_interval.f() * 10);
     // Integer division by one.
     int digit = static_cast<int>(fractionals >> -one.e());
-    buffer[*length] = '0' + digit;
+    ASSERT(digit <= 9);
+    buffer[*length] = static_cast<char>('0' + digit);
     (*length)++;
     fractionals &= one.f() - 1;  // Modulo by one.
     (*kappa)--;
@@ -459,7 +458,8 @@ static bool DigitGenCounted(DiyFp w,
   // that is smaller than 'integrals'.
   while (*kappa > 0) {
     int digit = integrals / divisor;
-    buffer[*length] = '0' + digit;
+    ASSERT(digit <= 9);
+    buffer[*length] = static_cast<char>('0' + digit);
     (*length)++;
     requested_digits--;
     integrals %= divisor;
@@ -492,7 +492,8 @@ static bool DigitGenCounted(DiyFp w,
     w_error *= 10;
     // Integer division by one.
     int digit = static_cast<int>(fractionals >> -one.e());
-    buffer[*length] = '0' + digit;
+    ASSERT(digit <= 9);
+    buffer[*length] = static_cast<char>('0' + digit);
     (*length)++;
     requested_digits--;
     fractionals &= one.f() - 1;  // Modulo by one.
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/fixed-dtoa.cc b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/fixed-dtoa.cc
index 45f910c..aef65fd 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/fixed-dtoa.cc
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/fixed-dtoa.cc
@@ -133,7 +133,7 @@ static void FillDigits32(uint32_t number, Vector<char> buffer, int* length) {
   while (number != 0) {
     int digit = number % 10;
     number /= 10;
-    buffer[(*length) + number_length] = '0' + digit;
+    buffer[(*length) + number_length] = static_cast<char>('0' + digit);
     number_length++;
   }
   // Exchange the digits.
@@ -150,7 +150,7 @@ static void FillDigits32(uint32_t number, Vector<char> buffer, int* length) {
 }
 
 
-static void FillDigits64FixedLength(uint64_t number, int /* requested_length */,
+static void FillDigits64FixedLength(uint64_t number,
                                     Vector<char> buffer, int* length) {
   const uint32_t kTen7 = 10000000;
   // For efficiency cut the number into 3 uint32_t parts, and print those.
@@ -253,7 +253,8 @@ static void FillFractionals(uint64_t fractionals, int exponent,
       fractionals *= 5;
       point--;
       int digit = static_cast<int>(fractionals >> point);
-      buffer[*length] = '0' + digit;
+      ASSERT(digit <= 9);
+      buffer[*length] = static_cast<char>('0' + digit);
       (*length)++;
       fractionals -= static_cast<uint64_t>(digit) << point;
     }
@@ -274,7 +275,8 @@ static void FillFractionals(uint64_t fractionals, int exponent,
       fractionals128.Multiply(5);
       point--;
       int digit = fractionals128.DivModPowerOf2(point);
-      buffer[*length] = '0' + digit;
+      ASSERT(digit <= 9);
+      buffer[*length] = static_cast<char>('0' + digit);
       (*length)++;
     }
     if (fractionals128.BitAt(point - 1) == 1) {
@@ -358,7 +360,7 @@ bool FastFixedDtoa(double v,
       remainder = (dividend % divisor) << exponent;
     }
     FillDigits32(quotient, buffer, length);
-    FillDigits64FixedLength(remainder, divisor_power, buffer, length);
+    FillDigits64FixedLength(remainder, buffer, length);
     *decimal_point = *length;
   } else if (exponent >= 0) {
     // 0 <= exponent <= 11
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/ieee.h b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/ieee.h
index 839dc47..661141d 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/ieee.h
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/ieee.h
@@ -256,6 +256,8 @@ class Double {
     return (significand & kSignificandMask) |
         (biased_exponent << kPhysicalSignificandSize);
   }
+
+  DISALLOW_COPY_AND_ASSIGN(Double);
 };
 
 class Single {
@@ -391,6 +393,8 @@ class Single {
   static const uint32_t kNaN = 0x7FC00000;
 
   const uint32_t d32_;
+
+  DISALLOW_COPY_AND_ASSIGN(Single);
 };
 
 }  // namespace double_conversion
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/strtod.cc b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/strtod.cc
index 9758989..3471756 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/strtod.cc
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/strtod.cc
@@ -137,6 +137,7 @@ static void TrimAndCut(Vector<const char> buffer, int exponent,
   Vector<const char> right_trimmed = TrimTrailingZeros(left_trimmed);
   exponent += left_trimmed.length() - right_trimmed.length();
   if (right_trimmed.length() > kMaxSignificantDecimalDigits) {
+    (void) space_size;  // Mark variable as used.
     ASSERT(space_size >= kMaxSignificantDecimalDigits);
     CutToMaxSignificantDigits(right_trimmed, exponent,
                               buffer_copy_space, updated_exponent);
@@ -263,7 +264,6 @@ static DiyFp AdjustmentPowerOfTen(int exponent) {
     case 7: return DiyFp(UINT64_2PART_C(0x98968000, 00000000), -40);
     default:
       UNREACHABLE();
-      return DiyFp(0, 0);
   }
 }
 
@@ -515,6 +515,7 @@ float Strtof(Vector<const char> buffer, int exponent) {
     double double_next2 = Double(double_next).NextDouble();
     f4 = static_cast<float>(double_next2);
   }
+  (void) f2;  // Mark variable as used.
   ASSERT(f1 <= f2 && f2 <= f3 && f3 <= f4);
 
   // If the guess doesn't lie near a single-precision boundary we can simply
diff --git a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/utils.h b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/utils.h
index e3a3a37..b0938ef 100644
--- a/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/utils.h
+++ b/Utilities/ITK/Modules/ThirdParty/DoubleConversion/src/double-conversion/utils.h
@@ -33,7 +33,8 @@
 
 #include <assert.h>
 #ifndef ASSERT
-#define ASSERT(condition)      (assert(condition))
+#define ASSERT(condition)         \
+    assert(condition);
 #endif
 #ifndef UNIMPLEMENTED
 #define UNIMPLEMENTED() (abort())
@@ -60,7 +61,7 @@
     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
     defined(__SH4__) || defined(__alpha__) || \
     defined(_MIPS_ARCH_MIPS32R2) || \
-    defined(_AARCH64EL_)
+    defined(__AARCH64EL__)
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
 #elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
 #if defined(_WIN32)
@@ -73,6 +74,11 @@
 #error Target architecture was not detected as supported by Double-Conversion.
 #endif
 
+#if defined(__GNUC__)
+#define DOUBLE_CONVERSION_UNUSED __attribute__((unused))
+#else
+#define DOUBLE_CONVERSION_UNUSED
+#endif
 
 #if defined(_WIN32) && !defined(__MINGW32__)
 
@@ -92,6 +98,8 @@ typedef unsigned __int64 uint64_t;
 
 #endif
 
+typedef uint16_t uc16;
+
 // The following macro works on both 32 and 64-bit platforms.
 // Usage: instead of writing 0x1234567890123456
 //      write UINT64_2PART_C(0x12345678,90123456);
@@ -298,7 +306,8 @@ template <class Dest, class Source>
 inline Dest BitCast(const Source& source) {
   // Compile time assertion: sizeof(Dest) == sizeof(Source)
   // A compile error here means your Dest and Source have different sizes.
-  typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1];
+  DOUBLE_CONVERSION_UNUSED
+      typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1];
 
   Dest dest;
   memmove(&dest, &source, sizeof(dest));
diff --git a/Utilities/ITK/Modules/ThirdParty/Expat/CMakeLists.txt b/Utilities/ITK/Modules/ThirdParty/Expat/CMakeLists.txt
index 8791cc4..61f694e 100644
--- a/Utilities/ITK/Modules/ThirdParty/Expat/CMakeLists.txt
+++ b/Utilities/ITK/Modules/ThirdParty/Expat/CMakeLists.txt
@@ -1,10 +1,22 @@
 project(ITKExpat)
 set(ITKExpat_THIRD_PARTY 1)
 
-set(ITKExpat_INCLUDE_DIRS
+option(ITK_USE_SYSTEM_EXPAT "Use system-installed expat" OFF)
+mark_as_advanced(ITK_USE_SYSTEM_EXPAT)
+
+if(ITK_USE_SYSTEM_EXPAT)
+  find_package(EXPAT REQUIRED)
+  set(ITKExpat_INCLUDE_DIRS ${ITKExpat_BINARY_DIR}/src )
+  set(ITKExpat_SYSTEM_INCLUDE_DIRS "${EXPAT_INCLUDE_DIR}")
+  set(ITKExpat_LIBRARIES "${EXPAT_LIBRARY}")
+  set(ITKExpat_NO_SRC 1)
+else()
+  set(ITKExpat_INCLUDE_DIRS
   ${ITKExpat_BINARY_DIR}/src/expat
   ${ITKExpat_SOURCE_DIR}/src/expat
   )
 set(ITKExpat_LIBRARIES ITKEXPAT)
 
+endif()
+
 itk_module_impl()
diff --git a/Utilities/ITK/Modules/ThirdParty/Expat/src/expat/CMakeLists.txt b/Utilities/ITK/Modules/ThirdParty/Expat/src/expat/CMakeLists.txt
index 167d051..14329c5 100644
--- a/Utilities/ITK/Modules/ThirdParty/Expat/src/expat/CMakeLists.txt
+++ b/Utilities/ITK/Modules/ThirdParty/Expat/src/expat/CMakeLists.txt
@@ -28,19 +28,15 @@ IF(ITK_LIBRARY_PROPERTIES)
   SET_TARGET_PROPERTIES(ITKEXPAT PROPERTIES ${ITK_LIBRARY_PROPERTIES})
 ENDIF(ITK_LIBRARY_PROPERTIES)
 
-IF(NOT ITK_INSTALL_NO_LIBRARIES)
-  INSTALL(TARGETS ITKEXPAT
-    EXPORT ${ITK3P_INSTALL_EXPORT_NAME}
-    RUNTIME DESTINATION ${ITK3P_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries
-    LIBRARY DESTINATION ${ITK3P_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries
-    ARCHIVE DESTINATION ${ITK3P_INSTALL_ARCHIVE_DIR} COMPONENT Development
-    )
-ENDIF(NOT ITK_INSTALL_NO_LIBRARIES)
-
-IF(NOT ITK_INSTALL_NO_DEVELOPMENT)
-  INSTALL(FILES
-    ${ITK3P_EXPAT_BINARY_DIR}/expatDllConfig.h
-    ${ITK3P_EXPAT_SOURCE_DIR}/expat.h
-    DESTINATION ${ITK3P_INSTALL_INCLUDE_DIR} # TODO: itk_expat.h #include "itkexpat/expat.h"
-    COMPONENT Development)
-ENDIF(NOT ITK_INSTALL_NO_DEVELOPMENT)
+INSTALL(TARGETS ITKEXPAT
+  EXPORT ${ITK3P_INSTALL_EXPORT_NAME}
+  RUNTIME DESTINATION ${ITK3P_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries
+  LIBRARY DESTINATION ${ITK3P_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries
+  ARCHIVE DESTINATION ${ITK3P_INSTALL_ARCHIVE_DIR} COMPONENT Development
+  )
+
+INSTALL(FILES
+  ${ITK3P_EXPAT_BINARY_DIR}/expatDllConfig.h
+  ${ITK3P_EXPAT_SOURCE_DIR}/expat.h
+  DESTINATION ${ITK3P_INSTALL_INCLUDE_DIR} # TODO: itk_expat.h #include "itkexpat/expat.h"
+  COMPONENT Development)
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/CMakeLists.txt b/Utilities/ITK/Modules/ThirdParty/KWSys/src/CMakeLists.txt
index b112815..75b8ccd 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/CMakeLists.txt
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/CMakeLists.txt
@@ -18,6 +18,7 @@ set(KWSYS_INSTALL_DOC_DIR ${ITK_INSTALL_DOC_DIR})
 set(KWSYS_INSTALL_EXPORT_NAME ${ITKKWSys-targets})
 set(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME RuntimeLibraries)
 set(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT Development)
+set(KWSYS_PROPERTIES_CXX MACOSX_RPATH 1)
 
 add_subdirectory(KWSys)
 itk_module_target(${KWSYS_NAMESPACE} NO_INSTALL)
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/CMakeLists.txt b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/CMakeLists.txt
index c2b377d..5e6a226 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/CMakeLists.txt
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/CMakeLists.txt
@@ -85,6 +85,9 @@
 # written.
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
+IF(POLICY CMP0025)
+  CMAKE_POLICY(SET CMP0025 NEW)
+ENDIF()
 
 #-----------------------------------------------------------------------------
 # If a namespace is not specified, use "kwsys" and enable testing.
@@ -296,6 +299,13 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX)
   ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
   IF(CMAKE_SYSTEM MATCHES "HP-UX")
     SET(KWSYS_PLATFORM_CXX_TEST_EXTRA_FLAGS "+p")
+    IF(CMAKE_CXX_COMPILER_ID MATCHES "HP")
+      # it is known that version 3.85 fails and 6.25 works without these flags
+      IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)
+        # use new C++ library and improved template support
+        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA +hpxstd98")
+      ENDIF()
+    ENDIF()
   ENDIF(CMAKE_SYSTEM MATCHES "HP-UX")
 ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
 
@@ -682,6 +692,7 @@ IF(KWSYS_USE_SystemInformation)
     # usually it's in libc but on FreeBSD
     # it's in libexecinfo
     FIND_LIBRARY(EXECINFO_LIB "execinfo")
+    MARK_AS_ADVANCED(EXECINFO_LIB)
     IF (NOT EXECINFO_LIB)
       SET(EXECINFO_LIB "")
     ENDIF()
@@ -1073,6 +1084,11 @@ IF(MSVC OR (WIN32 AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$"))
     )
 ENDIF()
 
+IF(WIN32)
+  # Help enforce the use of wide Windows apis.
+  ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
+ENDIF()
+
 IF(KWSYS_USE_String)
   # Activate code in "String.c".  See the comment in the source.
   SET_SOURCE_FILES_PROPERTIES(String.c PROPERTIES
@@ -1133,6 +1149,11 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
         testEncoding
         )
     ENDIF(KWSYS_STL_HAS_WSTRING)
+    IF(KWSYS_USE_FStream)
+      SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS}
+        testFStream
+        )
+    ENDIF(KWSYS_USE_FStream)
     IF(KWSYS_USE_SystemInformation)
       SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} testSystemInformation)
     ENDIF(KWSYS_USE_SystemInformation)
@@ -1214,6 +1235,9 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
     # Some Apple compilers produce bad optimizations in this source.
     IF(APPLE AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|LLVM)$")
       SET_SOURCE_FILES_PROPERTIES(testProcess.c PROPERTIES COMPILE_FLAGS -O0)
+    ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "XL")
+      # Tell IBM XL not to warn about our test infinite loop
+      SET_PROPERTY(SOURCE testProcess.c PROPERTY COMPILE_FLAGS -qsuppress=1500-010)
     ENDIF()
 
     # Test SharedForward
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/Encoding.hxx.in b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/Encoding.hxx.in
index 60a4a8e..aba4175 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/Encoding.hxx.in
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/Encoding.hxx.in
@@ -14,6 +14,7 @@
 
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
 #include <@KWSYS_NAMESPACE@/stl/string>
+#include <@KWSYS_NAMESPACE@/stl/vector>
 
 /* Define these macros temporarily to keep the code readable.  */
 #if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE at _NAME_IS_KWSYS
@@ -25,6 +26,36 @@ namespace @KWSYS_NAMESPACE@
 class @KWSYS_NAMESPACE at _EXPORT Encoding
 {
 public:
+
+  // Container class for argc/argv.
+  class CommandLineArguments
+  {
+    public:
+      // On Windows, get the program command line arguments
+      // in this Encoding module's 8 bit encoding.
+      // On other platforms the given argc/argv is used, and
+      // to be consistent, should be the argc/argv from main().
+      static CommandLineArguments Main(int argc, char const* const* argv);
+
+      // Construct CommandLineArguments with the given
+      // argc/argv.  It is assumed that the string is already
+      // in the encoding used by this module.
+      CommandLineArguments(int argc, char const* const* argv);
+
+      // Construct CommandLineArguments with the given
+      // argc and wide argv.  This is useful if wmain() is used.
+      CommandLineArguments(int argc, wchar_t const* const* argv);
+      ~CommandLineArguments();
+      CommandLineArguments(const CommandLineArguments&);
+      CommandLineArguments& operator=(const CommandLineArguments&);
+
+      int argc() const;
+      char const* const* argv() const;
+
+    protected:
+      std::vector<char*> argv_;
+  };
+
   /**
    * Convert between char and wchar_t
    */
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/EncodingC.c b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/EncodingC.c
index a36eecc..cda78e2 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/EncodingC.c
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/EncodingC.c
@@ -68,7 +68,7 @@ size_t kwsysEncoding_wcstombs(char* dest, const wchar_t* str, size_t n)
 char* kwsysEncoding_DupToNarrow(const wchar_t* str)
 {
   char* ret = NULL;
-  size_t length = kwsysEncoding_wcstombs(0, str, 0);
+  size_t length = kwsysEncoding_wcstombs(0, str, 0) + 1;
   if(length > 0)
     {
     ret = malloc(length);
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/EncodingCXX.cxx b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/EncodingCXX.cxx
index aebc148..251a56d 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/EncodingCXX.cxx
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/EncodingCXX.cxx
@@ -29,6 +29,7 @@
 #endif
 
 #include <stdlib.h>
+#include <string.h>
 
 #ifdef _MSC_VER
 # pragma warning (disable: 4786)
@@ -42,6 +43,101 @@
 namespace KWSYS_NAMESPACE
 {
 
+Encoding::CommandLineArguments
+Encoding::CommandLineArguments::Main(int argc, char const* const* argv)
+{
+#ifdef _WIN32
+  (void) argc;
+  (void) argv;
+
+  int ac;
+  LPWSTR* w_av = CommandLineToArgvW(GetCommandLineW(), &ac);
+
+  std::vector<std::string> av1(ac);
+  std::vector<char const*> av2(ac);
+  for(int i=0; i<ac; i++)
+    {
+    av1[i] = ToNarrow(w_av[i]);
+    av2[i] = av1[i].c_str();
+    }
+  LocalFree(w_av);
+  return CommandLineArguments(ac, &av2[0]);
+#else
+  return CommandLineArguments(argc, argv);
+#endif
+}
+
+Encoding::CommandLineArguments::CommandLineArguments(int ac,
+                                                     char const* const* av)
+{
+  this->argv_.resize(ac+1);
+  for(int i=0; i<ac; i++)
+    {
+    this->argv_[i] = strdup(av[i]);
+    }
+  this->argv_[ac] = 0;
+}
+
+Encoding::CommandLineArguments::CommandLineArguments(int ac,
+                                                     wchar_t const* const* av)
+{
+  this->argv_.resize(ac+1);
+  for(int i=0; i<ac; i++)
+    {
+    this->argv_[i] = kwsysEncoding_DupToNarrow(av[i]);
+    }
+  this->argv_[ac] = 0;
+}
+
+Encoding::CommandLineArguments::~CommandLineArguments()
+{
+  for(size_t i=0; i<this->argv_.size(); i++)
+    {
+    free(argv_[i]);
+    }
+}
+
+Encoding::CommandLineArguments::
+  CommandLineArguments(const CommandLineArguments& other)
+{
+  this->argv_.resize(other.argv_.size());
+  for(size_t i=0; i<this->argv_.size(); i++)
+    {
+    this->argv_[i] = other.argv_[i] ? strdup(other.argv_[i]) : 0;
+    }
+}
+
+Encoding::CommandLineArguments&
+Encoding::CommandLineArguments::operator=(const CommandLineArguments& other)
+{
+  if(this != &other)
+    {
+    size_t i;
+    for(i=0; i<this->argv_.size(); i++)
+      {
+      free(this->argv_[i]);
+      }
+
+    this->argv_.resize(other.argv_.size());
+    for(i=0; i<this->argv_.size(); i++)
+      {
+      this->argv_[i] = other.argv_[i] ? strdup(other.argv_[i]) : 0;
+      }
+    }
+
+  return *this;
+}
+
+int Encoding::CommandLineArguments::argc() const
+{
+  return static_cast<int>(this->argv_.size() - 1);
+}
+
+char const* const* Encoding::CommandLineArguments::argv() const
+{
+  return &this->argv_[0];
+}
+
 #if KWSYS_STL_HAS_WSTRING
 
 kwsys_stl::wstring Encoding::ToWide(const kwsys_stl::string& str)
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/FStream.cxx b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/FStream.cxx
new file mode 100644
index 0000000..018652c
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/FStream.cxx
@@ -0,0 +1,76 @@
+/*============================================================================
+  KWSys - Kitware System Library
+  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include "kwsysPrivate.h"
+#include KWSYS_HEADER(FStream.hxx)
+
+// Work-around CMake dependency scanning limitation.  This must
+// duplicate the above list of headers.
+#if 0
+# include "FStream.hxx.in"
+#endif
+
+namespace KWSYS_NAMESPACE
+{
+namespace FStream
+{
+
+BOM ReadBOM(std::istream& in)
+{
+  if(!in.good())
+    {
+    return BOM_None;
+    }
+  unsigned long orig = in.tellg();
+  unsigned char bom[4];
+  in.read(reinterpret_cast<char*>(bom), 2);
+  if(!in.good())
+    {
+    in.seekg(orig);
+    return BOM_None;
+    }
+  if(bom[0] == 0xEF && bom[1] == 0xBB)
+    {
+    in.read(reinterpret_cast<char*>(bom+2), 1);
+    if(in.good() && bom[2] == 0xBF)
+      {
+      return BOM_UTF8;
+      }
+    }
+  else if(bom[0] == 0xFE && bom[1] == 0xFF)
+    {
+    return BOM_UTF16BE;
+    }
+  else if(bom[0] == 0x00 && bom[1] == 0x00)
+    {
+    in.read(reinterpret_cast<char*>(bom+2), 2);
+    if(in.good() && bom[2] == 0xFE && bom[3] == 0xFF)
+      {
+      return BOM_UTF32BE;
+      }
+    }
+  else if(bom[0] == 0xFF && bom[1] == 0xFE)
+    {
+    unsigned long p = in.tellg();
+    in.read(reinterpret_cast<char*>(bom+2), 2);
+    if(in.good() && bom[2] == 0x00 && bom[3] == 0x00)
+      {
+      return BOM_UTF32LE;
+      }
+    in.seekg(p);
+    return BOM_UTF16LE;
+    }
+  in.seekg(orig);
+  return BOM_None;
+}
+
+} // FStream namespace
+} //KWSYS_NAMESPACE
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/FStream.hxx.in b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/FStream.hxx.in
index 8170fb3..45425ff 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/FStream.hxx.in
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/FStream.hxx.in
@@ -25,8 +25,9 @@ namespace @KWSYS_NAMESPACE@
       typedef std::basic_filebuf<CharType,Traits> my_base_type;
       basic_filebuf *open(char const *s,std::ios_base::openmode mode)
       {
-        my_base_type::open(Encoding::ToWide(s).c_str(), mode);
-        return this;
+        return static_cast<basic_filebuf*>(
+          my_base_type::open(Encoding::ToWide(s).c_str(), mode)
+          );
       }
   };
 
@@ -81,7 +82,7 @@ namespace @KWSYS_NAMESPACE@
 
     internal_buffer_type *rdbuf() const
     {
-      return buf_.get();
+      return buf_;
     }
 
     ~basic_ifstream()
@@ -160,13 +161,28 @@ class basic_ofstream : public std::basic_ostream<CharType,Traits>
   typedef basic_ofstream<char> ofstream;
 
 #else
-  using @KWSYS_NAMESPACE at _ios_namespace::basic_filebuf;
   using @KWSYS_NAMESPACE at _ios_namespace::ofstream;
   using @KWSYS_NAMESPACE at _ios_namespace::ifstream;
 #endif
 
+  namespace FStream
+  {
+    enum BOM
+    {
+      BOM_None,
+      BOM_UTF8,
+      BOM_UTF16BE,
+      BOM_UTF16LE,
+      BOM_UTF32BE,
+      BOM_UTF32LE
+    };
+
+    // Read a BOM, if one exists.
+    // If a BOM exists, the stream is advanced to after the BOM.
+    // This function requires a seekable stream (but not a relative
+    // seekable stream).
+    BOM ReadBOM(std::istream& in);
+  }
 }
 
-
-
 #endif
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/MD5.c b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/MD5.c
index 56776a3..a147057 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/MD5.c
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/MD5.c
@@ -478,11 +478,16 @@ void kwsysMD5_Initialize(kwsysMD5* md5)
 /*--------------------------------------------------------------------------*/
 void kwsysMD5_Append(kwsysMD5* md5, unsigned char const* data, int length)
 {
+  size_t dlen;
   if(length < 0)
     {
-    length = (int)strlen((char const*)data);
+    dlen = strlen((char const*)data);
     }
-  md5_append(&md5->md5_state, (md5_byte_t const*)data, (size_t)length);
+  else
+    {
+    dlen = (size_t)length;
+    }
+  md5_append(&md5->md5_state, (md5_byte_t const*)data, dlen);
 }
 
 /*--------------------------------------------------------------------------*/
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/ProcessUNIX.c b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/ProcessUNIX.c
index b9af2f1..faeb967 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/ProcessUNIX.c
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/ProcessUNIX.c
@@ -2449,6 +2449,7 @@ static void kwsysProcessKill(pid_t process_id)
           if(f)
             {
             size_t nread = fread(buffer, 1, KWSYSPE_PIPE_BUFFER_SIZE, f);
+            fclose(f);
             buffer[nread] = '\0';
             if(nread > 0)
               {
@@ -2463,7 +2464,6 @@ static void kwsysProcessKill(pid_t process_id)
                   }
                 }
               }
-            fclose(f);
             }
           }
         }
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SharedForward.h.in b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SharedForward.h.in
index 8bbc74a..dd4d462 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SharedForward.h.in
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SharedForward.h.in
@@ -415,7 +415,7 @@ static int kwsys_shared_forward_realpath(const char* in_path, char* out_path)
 {
 #if defined(_WIN32) && !defined(__CYGWIN__)
   /* Implementation for Windows.  */
-  DWORD n = GetFullPathName(in_path, KWSYS_SHARED_FORWARD_MAXPATH,
+  DWORD n = GetFullPathNameA(in_path, KWSYS_SHARED_FORWARD_MAXPATH,
                             out_path, 0);
   return n > 0 && n <= KWSYS_SHARED_FORWARD_MAXPATH;
 #else
@@ -429,9 +429,9 @@ static int kwsys_shared_forward_samepath(const char* file1, const char* file2)
 {
 #if defined(_WIN32)
   int result = 0;
-  HANDLE h1 = CreateFile(file1, GENERIC_READ, FILE_SHARE_READ, NULL,
+  HANDLE h1 = CreateFileA(file1, GENERIC_READ, FILE_SHARE_READ, NULL,
                          OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
-  HANDLE h2 = CreateFile(file2, GENERIC_READ, FILE_SHARE_READ, NULL,
+  HANDLE h2 = CreateFileA(file2, GENERIC_READ, FILE_SHARE_READ, NULL,
                          OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
   if(h1 != INVALID_HANDLE_VALUE && h2 != INVALID_HANDLE_VALUE)
     {
@@ -462,7 +462,7 @@ static void kwsys_shared_forward_strerror(char* message)
 #if defined(_WIN32) && !defined(__CYGWIN__)
   /* Implementation for Windows.  */
   DWORD original = GetLastError();
-  DWORD length = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+  DWORD length = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM |
                                FORMAT_MESSAGE_IGNORE_INSERTS, 0, original,
                                MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                                message, KWSYS_SHARED_FORWARD_MAXPATH, 0);
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/System.c b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/System.c
index 5d178bf..1ee26fa 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/System.c
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/System.c
@@ -353,6 +353,10 @@ static int kwsysSystem_Shell__GetArgumentSize(const char* in,
   if(kwsysSystem_Shell__ArgumentNeedsQuotes(in, isUnix, flags))
     {
     /* Surrounding quotes are needed.  Allocate space for them.  */
+    if((flags & kwsysSystem_Shell_Flag_WatcomQuote) && (isUnix))
+      {
+        size += 2;
+      }
     size += 2;
 
     /* We must escape all ending backslashes when quoting on windows.  */
@@ -377,7 +381,18 @@ static char* kwsysSystem_Shell__GetArgument(const char* in, char* out,
   if(needQuotes)
     {
     /* Add the opening quote for this argument.  */
-    *out++ = '"';
+    if(flags & kwsysSystem_Shell_Flag_WatcomQuote)
+      {
+      if(isUnix)
+        {
+        *out++ = '"';
+        }
+      *out++ = '\'';
+      }
+    else
+      {
+      *out++ = '"';
+      }
     }
 
   /* Scan the string for characters that require escaping or quoting.  */
@@ -549,7 +564,18 @@ static char* kwsysSystem_Shell__GetArgument(const char* in, char* out,
       }
 
     /* Add the closing quote for this argument.  */
-    *out++ = '"';
+    if(flags & kwsysSystem_Shell_Flag_WatcomQuote)
+      {
+      *out++ = '\'';
+      if(isUnix)
+        {
+        *out++ = '"';
+        }
+      }
+    else
+      {
+      *out++ = '"';
+      }
     }
 
   /* Store a terminating null without incrementing.  */
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/System.h.in b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/System.h.in
index 549db90..f21bf0d 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/System.h.in
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/System.h.in
@@ -36,6 +36,7 @@
 # define kwsysSystem_Shell_Flag_MinGWMake             kwsys_ns(System_Shell_Flag_MinGWMake)
 # define kwsysSystem_Shell_Flag_NMake                 kwsys_ns(System_Shell_Flag_NMake)
 # define kwsysSystem_Shell_Flag_AllowMakeVariables    kwsys_ns(System_Shell_Flag_AllowMakeVariables)
+# define kwsysSystem_Shell_Flag_WatcomQuote           kwsys_ns(System_Shell_Flag_WatcomQuote)
 #endif
 
 #ifdef __VMS
@@ -102,14 +103,17 @@ enum kwsysSystem_Shell_Flag_e
   kwsysSystem_Shell_Flag_MinGWMake          = (1<<4),
 
   /** The target shell is in a NMake makefile.  */
-  kwsysSystem_Shell_Flag_NMake              = (1<<6),
+  kwsysSystem_Shell_Flag_NMake              = (1<<5),
 
   /** Make variable reference syntax $(MAKEVAR) should not be escaped
       to allow a build tool to replace it.  Replacement values
       containing spaces, quotes, backslashes, or other
       non-alphanumeric characters that have significance to some makes
       or shells produce undefined behavior.  */
-  kwsysSystem_Shell_Flag_AllowMakeVariables = (1<<5)
+  kwsysSystem_Shell_Flag_AllowMakeVariables = (1<<6),
+
+  /** The target shell quoting uses extra single Quotes for Watcom tools.  */
+  kwsysSystem_Shell_Flag_WatcomQuote        = (1<<7)
 };
 
 /**
@@ -156,6 +160,7 @@ kwsysEXPORT char** kwsysSystem_Parse_CommandForUnix(const char* command,
 #  undef kwsysSystem_Shell_Flag_MinGWMake
 #  undef kwsysSystem_Shell_Flag_NMake
 #  undef kwsysSystem_Shell_Flag_AllowMakeVariables
+#  undef kwsysSystem_Shell_Flag_WatcomQuote
 # endif
 #endif
 
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SystemInformation.cxx b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SystemInformation.cxx
index 2f6c949..720a7c3 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SystemInformation.cxx
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SystemInformation.cxx
@@ -3162,8 +3162,17 @@ bool SystemInformationImplementation::RetreiveInformationFromCpuInfoFile()
   kwsys_stl::string cores =
                         this->ExtractValueFromCpuInfoFile(buffer,"cpu cores");
   int numberOfCoresPerCPU=atoi(cores.c_str());
-  this->NumberOfPhysicalCPU=static_cast<unsigned int>(
-    numberOfCoresPerCPU*(maxId+1));
+  if (maxId > 0)
+    {
+    this->NumberOfPhysicalCPU=static_cast<unsigned int>(
+      numberOfCoresPerCPU*(maxId+1));
+    }
+  else
+    {
+    // Linux Sparc: get cpu count
+    this->NumberOfPhysicalCPU=
+            atoi(this->ExtractValueFromCpuInfoFile(buffer,"ncpus active").c_str());
+    }
 
 #else // __CYGWIN__
   // does not have "physical id" entries, neither "cpu cores"
@@ -3185,7 +3194,19 @@ bool SystemInformationImplementation::RetreiveInformationFromCpuInfoFile()
 
   // CPU speed (checking only the first processor)
   kwsys_stl::string CPUSpeed = this->ExtractValueFromCpuInfoFile(buffer,"cpu MHz");
-  this->CPUSpeedInMHz = static_cast<float>(atof(CPUSpeed.c_str()));
+  if(!CPUSpeed.empty())
+    {
+    this->CPUSpeedInMHz = static_cast<float>(atof(CPUSpeed.c_str()));
+    }
+#ifdef __linux
+  else
+    {
+    // Linux Sparc: CPU speed is in Hz and encoded in hexadecimal
+    CPUSpeed = this->ExtractValueFromCpuInfoFile(buffer,"Cpu0ClkTck");
+    this->CPUSpeedInMHz = static_cast<float>(
+                                 strtoull(CPUSpeed.c_str(),0,16))/1000000.0f;
+    }
+#endif
 
   // Chip family
   kwsys_stl::string familyStr =
@@ -4677,11 +4698,28 @@ bool SystemInformationImplementation::QueryHaikuInfo()
 {
 #if defined(__HAIKU__)
 
+  // CPU count
   system_info info;
   get_system_info(&info);
-
   this->NumberOfPhysicalCPU = info.cpu_count;
-  this->CPUSpeedInMHz = info.cpu_clock_speed / 1000000.0F;
+
+  // CPU speed
+  uint32 topologyNodeCount = 0;
+  cpu_topology_node_info* topology = 0;
+  get_cpu_topology_info(0, &topologyNodeCount);
+  if (topologyNodeCount != 0)
+    topology = new cpu_topology_node_info[topologyNodeCount];
+  get_cpu_topology_info(topology, &topologyNodeCount);
+
+  for (uint32 i = 0; i < topologyNodeCount; i++) {
+    if (topology[i].type == B_TOPOLOGY_CORE) {
+      this->CPUSpeedInMHz = topology[i].data.core.default_frequency /
+        1000000.0f;
+      break;
+    }
+  }
+
+  delete[] topology;
 
   // Physical Memory
   this->TotalPhysicalMemory = (info.max_pages * B_PAGE_SIZE) / (1024 * 1024) ;
@@ -4985,16 +5023,26 @@ bool SystemInformationImplementation::QueryHPUXProcessor()
     case CPU_PA_RISC1_0:
       this->ChipID.Vendor = "Hewlett-Packard";
       this->ChipID.Family = 0x100;
+      break;
     case CPU_PA_RISC1_1:
       this->ChipID.Vendor = "Hewlett-Packard";
       this->ChipID.Family = 0x110;
+      break;
     case CPU_PA_RISC2_0:
       this->ChipID.Vendor = "Hewlett-Packard";
       this->ChipID.Family = 0x200;
+      break;
+#  if defined(CPU_HP_INTEL_EM_1_0) || defined(CPU_IA64_ARCHREV_0)
+#   ifdef CPU_HP_INTEL_EM_1_0
+    case CPU_HP_INTEL_EM_1_0:
+#   endif
+#   ifdef CPU_IA64_ARCHREV_0
     case CPU_IA64_ARCHREV_0:
+#   endif
       this->ChipID.Vendor = "GenuineIntel";
       this->Features.HasIA64 = true;
       break;
+#  endif
     default:
       return false;
     }
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SystemTools.cxx b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SystemTools.cxx
index 4649f3b..32e79e6 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SystemTools.cxx
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/SystemTools.cxx
@@ -188,6 +188,9 @@ static inline char *realpath(const char *path, char *resolved_path)
 #endif
 
 #if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__MINGW32__))
+
+#include <wctype.h>
+
 inline int Mkdir(const char* dir)
 {
   return _wmkdir(KWSYS_NAMESPACE::Encoding::ToWide(dir).c_str());
@@ -2115,10 +2118,10 @@ bool SystemTools::CopyFileAlways(const char* source, const char* destination)
   SystemTools::RemoveFile(destination);
 
 #if defined(_WIN32) || defined(__CYGWIN__)
-  kwsys_ios::ofstream fout(destination,
+  kwsys::ofstream fout(destination,
                      kwsys_ios::ios::binary | kwsys_ios::ios::out | kwsys_ios::ios::trunc);
 #else
-  kwsys_ios::ofstream fout(destination,
+  kwsys::ofstream fout(destination,
                      kwsys_ios::ios::out | kwsys_ios::ios::trunc);
 #endif
   if(!fout)
@@ -4915,8 +4918,8 @@ void SystemTools::ClassInitialize()
 
         // Strip off one directory level and see if the logical
         // mapping still works.
-        pwd_str = SystemTools::GetFilenamePath(pwd_str.c_str());
-        cwd_str = SystemTools::GetFilenamePath(cwd_str.c_str());
+        pwd_str = SystemTools::GetFilenamePath(pwd_str);
+        cwd_str = SystemTools::GetFilenamePath(cwd_str);
         Realpath(pwd_str.c_str(), pwd_path);
         }
 
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/Terminal.c b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/Terminal.c
index 25832c2..6d7ec41 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/Terminal.c
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/Terminal.c
@@ -155,6 +155,7 @@ static const char* kwsysTerminalVT100Names[] =
   "mach-color",
   "mlterm",
   "putty",
+  "putty-256color",
   "rxvt",
   "rxvt-256color",
   "rxvt-cygwin",
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/hashtable.hxx.in b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/hashtable.hxx.in
index 9539917..b93e9be 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/hashtable.hxx.in
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/hashtable.hxx.in
@@ -310,6 +310,9 @@ struct _Hashtable_node
 {
   _Hashtable_node* _M_next;
   _Val _M_val;
+  void public_method_to_quiet_warning_about_all_methods_private();
+private:
+  void operator=(_Hashtable_node<_Val> const&); // poison node assignment
 };
 
 template <class _Val, class _Key, class _HashFcn,
@@ -403,6 +406,10 @@ struct _Hashtable_const_iterator {
 // Note: assumes long is at least 32 bits.
 enum { _stl_num_primes = 31 };
 
+// create a function with a static local to that function that returns
+// the static
+inline const unsigned long* get_stl_prime_list() {
+
 static const unsigned long _stl_prime_list[_stl_num_primes] =
 {
   5ul,          11ul,         23ul,
@@ -414,10 +421,6 @@ static const unsigned long _stl_prime_list[_stl_num_primes] =
   1610612741ul, 3221225473ul, 4294967291ul
 };
 
-// create a function with a static local to that function that returns
-// the static
-inline const unsigned long* get_stl_prime_list() {
-
 return &_stl_prime_list[0]; }
 
 inline size_t _stl_next_prime(size_t __n)
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/testEncoding.cxx b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/testEncoding.cxx
index 8e74a50..094588c 100644
--- a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/testEncoding.cxx
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/testEncoding.cxx
@@ -16,14 +16,18 @@
 #endif
 
 #include KWSYS_HEADER(Encoding.hxx)
+#include KWSYS_HEADER(Encoding.h)
 #include KWSYS_HEADER(ios/iostream)
 
 #include <locale.h>
+#include <string.h>
+#include <stdlib.h>
 
 // Work-around CMake dependency scanning limitation.  This must
 // duplicate the above list of headers.
 #if 0
 # include "Encoding.hxx.in"
+# include "Encoding.h.in"
 # include "kwsys_ios_iostream.h.in"
 #endif
 
@@ -68,11 +72,16 @@ static int testHelloWorldEncoding()
     std::cout << str << std::endl;
     std::wstring wstr = kwsys::Encoding::ToWide(str);
     std::string str2 = kwsys::Encoding::ToNarrow(wstr);
-    if(!wstr.empty() && str != str2)
+    wchar_t* c_wstr = kwsysEncoding_DupToWide(str.c_str());
+    char* c_str2 = kwsysEncoding_DupToNarrow(c_wstr);
+    if(!wstr.empty() && (str != str2 || strcmp(c_str2, str.c_str())))
       {
       std::cout << "converted string was different: " << str2 << std::endl;
+      std::cout << "converted string was different: " << c_str2 << std::endl;
       ret++;
       }
+    free(c_wstr);
+    free(c_str2);
     }
   return ret;
 }
@@ -136,6 +145,36 @@ static int testRobustEncoding()
   return ret;
 }
 
+static int testCommandLineArguments()
+{
+  int status = 0;
+
+  char const* argv[2] = {
+    "./app.exe",
+    (char const*)helloWorldStrings[1]
+  };
+
+  kwsys::Encoding::CommandLineArguments args(2, argv);
+  kwsys::Encoding::CommandLineArguments arg2 =
+    kwsys::Encoding::CommandLineArguments(args);
+
+  char const* const* u8_argv = args.argv();
+  for(int i=0; i<args.argc(); i++)
+  {
+    char const* u8_arg = u8_argv[i];
+    if(strcmp(argv[i], u8_arg) != 0)
+    {
+      std::cout << "argv[" << i << "] " << argv[i] << " != "
+                << u8_arg << std::endl;
+      status++;
+    }
+  }
+
+  kwsys::Encoding::CommandLineArguments args3 =
+    kwsys::Encoding::CommandLineArguments::Main(2, argv);
+
+  return status;
+}
 
 //----------------------------------------------------------------------------
 int testEncoding(int, char*[])
@@ -154,6 +193,7 @@ int testEncoding(int, char*[])
 
   ret |= testHelloWorldEncoding();
   ret |= testRobustEncoding();
+  ret |= testCommandLineArguments();
 
   return ret;
 }
diff --git a/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/testFStream.cxx b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/testFStream.cxx
new file mode 100644
index 0000000..9abfd4c
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/KWSys/src/KWSys/testFStream.cxx
@@ -0,0 +1,190 @@
+/*============================================================================
+  KWSys - Kitware System Library
+  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
+
+  Distributed under the OSI-approved BSD License (the "License");
+  see accompanying file Copyright.txt for details.
+
+  This software is distributed WITHOUT ANY WARRANTY; without even the
+  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  See the License for more information.
+============================================================================*/
+#include "kwsysPrivate.h"
+
+#if defined(_MSC_VER)
+# pragma warning (disable:4786)
+#endif
+
+#include KWSYS_HEADER(FStream.hxx)
+#include KWSYS_HEADER(ios/iostream)
+#include <string.h>
+#ifdef __BORLANDC__
+# include <mem.h> /* memcmp */
+#endif
+
+// Work-around CMake dependency scanning limitation.  This must
+// duplicate the above list of headers.
+#if 0
+# include "FStream.hxx.in"
+# include "kwsys_ios_iostream.h.in"
+#endif
+
+
+//----------------------------------------------------------------------------
+static int testNoFile()
+{
+  kwsys::ifstream in_file("NoSuchFile.txt");
+  if(in_file)
+    {
+    return 1;
+    }
+
+  return 0;
+}
+
+static kwsys::FStream::BOM expected_bom[5] =
+{
+  kwsys::FStream::BOM_UTF8,
+  kwsys::FStream::BOM_UTF16LE,
+  kwsys::FStream::BOM_UTF16BE,
+  kwsys::FStream::BOM_UTF32LE,
+  kwsys::FStream::BOM_UTF32BE
+};
+
+static unsigned char expected_bom_data[5][5] =
+{
+    {3, 0xEF, 0xBB, 0xBF},
+    {2, 0xFF, 0xFE},
+    {2, 0xFE, 0xFF},
+    {4, 0xFF, 0xFE, 0x00, 0x00},
+    {4, 0x00, 0x00, 0xFE, 0xFF},
+};
+
+static unsigned char file_data[5][45] =
+{
+    {11, 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd'},
+    {22, 0x48, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x20, 0x00,
+    0x57, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x6C, 0x00, 0x64, 0x00},
+    {22, 0x00, 0x48, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x20,
+    0x00, 0x57, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x6C, 0x00, 0x64},
+    {44, 0x48, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00,
+    0x6C, 0x00, 0x00, 0x00, 0x6F, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+    0x57, 0x00, 0x00, 0x00, 0x6F, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00,
+    0x6C, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00},
+    {44, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6C,
+    0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x6F, 0x00, 0x00, 0x00, 0x20,
+    0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x6F, 0x00, 0x00, 0x00, 0x72,
+    0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x64},
+};
+
+//----------------------------------------------------------------------------
+static int testBOM()
+{
+  // test various encodings in binary mode
+  for(int i=0; i<5; i++)
+    {
+      {
+      kwsys::ofstream out("bom.txt", kwsys::ofstream::binary);
+      out.write(reinterpret_cast<const char*>(expected_bom_data[i]+1),
+                *expected_bom_data[i]);
+      out.write(reinterpret_cast<const char*>(file_data[i]+1),
+                file_data[i][0]);
+      }
+
+    kwsys::ifstream in("bom.txt", kwsys::ofstream::binary);
+    kwsys::FStream::BOM bom = kwsys::FStream::ReadBOM(in);
+    if(bom != expected_bom[i])
+      {
+      kwsys_ios::cout << "Unexpected BOM " << i << std::endl;
+      return 1;
+      }
+    char data[45];
+    in.read(data, file_data[i][0]);
+    if(!in.good())
+      {
+      kwsys_ios::cout << "Unable to read data " << i << std::endl;
+      return 1;
+      }
+
+    if(memcmp(data, file_data[i]+1, file_data[i][0]) != 0)
+      {
+      kwsys_ios::cout << "Incorrect read data " << i << std::endl;
+      return 1;
+      }
+
+    }
+
+  // test text file without bom
+  {
+    {
+    kwsys::ofstream out("bom.txt");
+    out << "Hello World";
+    }
+
+    kwsys::ifstream in("bom.txt");
+    kwsys::FStream::BOM bom = kwsys::FStream::ReadBOM(in);
+    if(bom != kwsys::FStream::BOM_None)
+      {
+      kwsys_ios::cout << "Unexpected BOM for none case" << std::endl;
+      return 1;
+      }
+    char data[45];
+    in.read(data, file_data[0][0]);
+    if(!in.good())
+      {
+      kwsys_ios::cout << "Unable to read data for none case" << std::endl;
+      return 1;
+      }
+
+    if(memcmp(data, file_data[0]+1, file_data[0][0]) != 0)
+      {
+      kwsys_ios::cout << "Incorrect read data for none case" << std::endl;
+      return 1;
+      }
+  }
+
+  // test text file with utf-8 bom
+  {
+    {
+    kwsys::ofstream out("bom.txt");
+    out.write(reinterpret_cast<const char*>(expected_bom_data[0]+1),
+              *expected_bom_data[0]);
+    out << "Hello World";
+    }
+
+    kwsys::ifstream in("bom.txt");
+    kwsys::FStream::BOM bom = kwsys::FStream::ReadBOM(in);
+    if(bom != kwsys::FStream::BOM_UTF8)
+      {
+      kwsys_ios::cout << "Unexpected BOM for utf-8 case" << std::endl;
+      return 1;
+      }
+    char data[45];
+    in.read(data, file_data[0][0]);
+    if(!in.good())
+      {
+      kwsys_ios::cout << "Unable to read data for utf-8 case" << std::endl;
+      return 1;
+      }
+
+    if(memcmp(data, file_data[0]+1, file_data[0][0]) != 0)
+      {
+      kwsys_ios::cout << "Incorrect read data for utf-8 case" << std::endl;
+      return 1;
+      }
+  }
+
+  return 0;
+}
+
+
+//----------------------------------------------------------------------------
+int testFStream(int, char*[])
+{
+  int ret = 0;
+
+  ret |= testNoFile();
+  ret |= testBOM();
+
+  return ret;
+}
diff --git a/Utilities/ITK/Modules/ThirdParty/Netlib/src/netlib/slatec/CMakeLists.txt b/Utilities/ITK/Modules/ThirdParty/Netlib/src/netlib/slatec/CMakeLists.txt
index 4e3cb40..522662a 100644
--- a/Utilities/ITK/Modules/ThirdParty/Netlib/src/netlib/slatec/CMakeLists.txt
+++ b/Utilities/ITK/Modules/ThirdParty/Netlib/src/netlib/slatec/CMakeLists.txt
@@ -19,7 +19,7 @@ ADD_LIBRARY( itkNetlibSlatec
   initds.c
   xermsg.c
   d_int.c
-  d_mod.c  
+  d_mod.c
  )
 
 IF(ITK_USE_SYSTEM_VXL)
@@ -32,13 +32,11 @@ IF(ITK_LIBRARY_PROPERTIES)
   SET_TARGET_PROPERTIES(itkNetlibSlatec PROPERTIES ${ITK_LIBRARY_PROPERTIES})
 ENDIF(ITK_LIBRARY_PROPERTIES)
 
-IF(NOT ITK_INSTALL_NO_LIBRARIES)
-  INSTALL(TARGETS itkNetlibSlatec
-    EXPORT ${ITK3P_INSTALL_EXPORT_NAME}
-    RUNTIME DESTINATION ${ITK3P_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries
-    LIBRARY DESTINATION ${ITK3P_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries
-    ARCHIVE DESTINATION ${ITK3P_INSTALL_ARCHIVE_DIR} COMPONENT Development)
-ENDIF(NOT ITK_INSTALL_NO_LIBRARIES)
+INSTALL(TARGETS itkNetlibSlatec
+  EXPORT ${ITK3P_INSTALL_EXPORT_NAME}
+  RUNTIME DESTINATION ${ITK3P_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries
+  LIBRARY DESTINATION ${ITK3P_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries
+  ARCHIVE DESTINATION ${ITK3P_INSTALL_ARCHIVE_DIR} COMPONENT Development)
 
 IF (BORLAND)
   SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-8004 -w-8057")
diff --git a/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/config/cmake/config/vxl_shared_link_test/CMakeLists.txt b/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/config/cmake/config/vxl_shared_link_test/CMakeLists.txt
index 25f26b1..4705027 100644
--- a/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/config/cmake/config/vxl_shared_link_test/CMakeLists.txt
+++ b/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/config/cmake/config/vxl_shared_link_test/CMakeLists.txt
@@ -1,8 +1,14 @@
 # vxl/config/cmake/config/vxl_shared_link_test/CMakeLists.txt
 #
-
+cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+IF(POLICY CMP0025)
+  CMAKE_POLICY(SET CMP0025 NEW)
+ENDIF()
+IF(POLICY CMP0042)
+  CMAKE_POLICY(SET CMP0042 NEW)
+ENDIF()
 PROJECT(vxl_pic_compatible)
 
 ADD_LIBRARY(cmTryCompileStaticLib STATIC static_src.cxx)
 ADD_LIBRARY(cmTryCompileSharedLib SHARED shared_src.cxx)
-TARGET_LINK_LIBRARIES(cmTryCompileSharedLib cmTryCompileStaticLib ${LINK_LIBRARIES})
\ No newline at end of file
+TARGET_LINK_LIBRARIES(cmTryCompileSharedLib cmTryCompileStaticLib ${LINK_LIBRARIES})
diff --git a/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/tests/test_sparse_lm.cxx b/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/tests/test_sparse_lm.cxx
index b7cd225..fda2c7c 100644
--- a/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/tests/test_sparse_lm.cxx
+++ b/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/tests/test_sparse_lm.cxx
@@ -630,7 +630,7 @@ void test_prob3()
   // initial perturbed parameters, add random gaussian noise
   vnl_vector<double> init_a(a_data,12), init_b(b_data,50);
   double sigma_pos = 1.0, sigma_ang = 0.1;
-  vnl_random rnd;
+  vnl_random rnd(1234);
   for (unsigned i=0; i<init_a.size()/3; ++i)
   {
     init_a[3*i] += rnd.normal()*sigma_ang;
diff --git a/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_lbfgsb.cxx b/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_lbfgsb.cxx
index 345160a..e6166e3 100644
--- a/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_lbfgsb.cxx
+++ b/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_lbfgsb.cxx
@@ -160,7 +160,7 @@ bool vnl_lbfgsb::minimize(vnl_vector<double>& x)
         // function tolerance reached
         this->failure_code_ = CONVERGED_FTOL;
       }
-      else if (vcl_strncmp("CONVERGENCE: NORM OF PROJECTED GRADIENT <= PGTOL",
+      else if (vcl_strncmp("CONVERGENCE:_NORM_OF_PROJECTED_GRADIENT_<=_PGTOL",
                            task, 48) == 0)
       {
         // gradient tolerance reached
diff --git a/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_diag_matrix.h b/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_diag_matrix.h
index 77dabed..d432f16 100644
--- a/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_diag_matrix.h
+++ b/Utilities/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_diag_matrix.h
@@ -79,15 +79,8 @@ class vnl_diag_matrix
     return (i != j) ? T(0) : diagonal_[i];
   }
 
-  inline T& operator () (unsigned i, 
-//Need to avoid compiler bug by not supplying the value of j unless checking the assert.
-#ifdef NDEBUG
-unsigned
-#else
-unsigned j
-#endif
-) {
-    assert(i == j);
+  inline T& operator () (unsigned i, unsigned j) {
+    assert(i == j); (void)j;
     return diagonal_[i];
   }
   inline T& operator() (unsigned i) { return diagonal_[i]; }
diff --git a/Utilities/ITK/Modules/ThirdParty/ZLIB/CMakeLists.txt b/Utilities/ITK/Modules/ThirdParty/ZLIB/CMakeLists.txt
index 939735f..b00c051 100644
--- a/Utilities/ITK/Modules/ThirdParty/ZLIB/CMakeLists.txt
+++ b/Utilities/ITK/Modules/ThirdParty/ZLIB/CMakeLists.txt
@@ -26,7 +26,7 @@ configure_file(src/itk_zlib.h.in src/itk_zlib.h)
 
 itk_module_impl()
 
-if(NOT ITK_INSTALL_NO_DEVELOPMENT)
-  install(FILES ${ITKZLIB_BINARY_DIR}/src/itk_zlib.h
-    DESTINATION ${ITKZLIB_INSTALL_INCLUDE_DIR})
-endif(NOT ITK_INSTALL_NO_DEVELOPMENT)
+install(FILES ${ITKZLIB_BINARY_DIR}/src/itk_zlib.h
+  DESTINATION ${ITKZLIB_INSTALL_INCLUDE_DIR}
+  COMPONENT Development
+  )
diff --git a/Utilities/ITK/Modules/ThirdParty/ZLIB/src/itkzlib/CMakeLists.txt b/Utilities/ITK/Modules/ThirdParty/ZLIB/src/itkzlib/CMakeLists.txt
index 3528c4f..968742d 100644
--- a/Utilities/ITK/Modules/ThirdParty/ZLIB/src/itkzlib/CMakeLists.txt
+++ b/Utilities/ITK/Modules/ThirdParty/ZLIB/src/itkzlib/CMakeLists.txt
@@ -34,21 +34,17 @@ if(ITK_LIBRARY_PROPERTIES)
   set_target_properties(itkzlib PROPERTIES ${ITK_LIBRARY_PROPERTIES})
 endif(ITK_LIBRARY_PROPERTIES)
 
-if(NOT ITK_INSTALL_NO_LIBRARIES)
-  install(TARGETS itkzlib
-    EXPORT ${ITK3P_INSTALL_EXPORT_NAME}
-    RUNTIME DESTINATION ${ITK3P_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries
-    LIBRARY DESTINATION ${ITK3P_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries
-    ARCHIVE DESTINATION ${ITK3P_INSTALL_ARCHIVE_DIR} COMPONENT Development
-    )
-endif(NOT ITK_INSTALL_NO_LIBRARIES)
-
-if(NOT ITK_INSTALL_NO_DEVELOPMENT)
-  install(FILES
-    ${ITK3P_ZLIB_SOURCE_DIR}/zlib.h
-    ${ITK3P_ZLIB_SOURCE_DIR}/zconf.h
-    ${ITK3P_ZLIB_SOURCE_DIR}/itk_zlib_mangle.h
-    ${ITK3P_ZLIB_BINARY_DIR}/zlibDllConfig.h
-    DESTINATION ${ITK3P_INSTALL_INCLUDE_DIR}/itkzlib # itk_zlib.h #include "itkzlib/zlib.h"
-    COMPONENT Development)
-endif(NOT ITK_INSTALL_NO_DEVELOPMENT)
+install(TARGETS itkzlib
+  EXPORT ${ITK3P_INSTALL_EXPORT_NAME}
+  RUNTIME DESTINATION ${ITK3P_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries
+  LIBRARY DESTINATION ${ITK3P_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries
+  ARCHIVE DESTINATION ${ITK3P_INSTALL_ARCHIVE_DIR} COMPONENT Development
+  )
+
+install(FILES
+  ${ITK3P_ZLIB_SOURCE_DIR}/zlib.h
+  ${ITK3P_ZLIB_SOURCE_DIR}/zconf.h
+  ${ITK3P_ZLIB_SOURCE_DIR}/itk_zlib_mangle.h
+  ${ITK3P_ZLIB_BINARY_DIR}/zlibDllConfig.h
+  DESTINATION ${ITK3P_INSTALL_INCLUDE_DIR}/itkzlib # itk_zlib.h #include "itkzlib/zlib.h"
+  COMPONENT Development)
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/README-ITK.txt b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/README-ITK.txt
new file mode 100644
index 0000000..3e1b559
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/README-ITK.txt
@@ -0,0 +1,15 @@
+The Modules/ThirdParty/pygccxml/src/
+subdirectory contains a reduced distribution of the pygccxml source tree with
+just the library source.
+
+This module is used by WrapITK to build the wrappings. We distribute our own
+version so that the user does not have to install this dependency.
+This module does not need to be compiled as it is a pure python module.
+We do not allow (for the moment) the usage the systems pygccxml and rely
+on the one shipped here.
+
+See Modules/ThirdParty/VNL/src/README-ITK.txt for update procedure of the
+snapshot using a subtree merge.
+
+The last merged upstream snapshot commit hash is:
+9f6f8dfecd74fdec274c1dbc273f785b529b5909
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/__init__.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/__init__.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/__init__.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/__init__.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/__init__.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/__init__.py
new file mode 100644
index 0000000..e24850c
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/__init__.py
@@ -0,0 +1,345 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+contains classes that describe different C++ declarations
+"""
+
+import compilers
+
+from dependencies import dependency_info_t
+from declaration import location_t
+from declaration import declaration_t
+from scopedef import scopedef_t
+from enumeration import enumeration_t
+from namespace import namespace_t
+
+from class_declaration import class_t
+from class_declaration import CLASS_TYPES
+from class_declaration import ACCESS_TYPES
+from class_declaration import hierarchy_info_t
+from class_declaration import class_declaration_t
+from class_declaration import class_types
+
+from typedef import typedef_t
+
+from cpptypes import type_t
+from cpptypes import dummy_type_t
+from cpptypes import unknown_t
+from cpptypes import ellipsis_t
+from cpptypes import fundamental_t
+from cpptypes import void_t
+from cpptypes import char_t
+from cpptypes import signed_char_t
+from cpptypes import unsigned_char_t
+from cpptypes import wchar_t
+from cpptypes import short_int_t
+from cpptypes import short_unsigned_int_t
+from cpptypes import bool_t
+from cpptypes import int_t
+from cpptypes import unsigned_int_t
+from cpptypes import long_int_t
+from cpptypes import long_unsigned_int_t
+from cpptypes import long_long_int_t
+from cpptypes import long_long_unsigned_int_t
+from cpptypes import float_t
+from cpptypes import double_t
+from cpptypes import long_double_t
+from cpptypes import FUNDAMENTAL_TYPES
+from cpptypes import compound_t
+from cpptypes import volatile_t
+from cpptypes import const_t
+from cpptypes import pointer_t
+from cpptypes import reference_t
+from cpptypes import restrict_t
+from cpptypes import array_t
+from cpptypes import calldef_type_t
+from cpptypes import free_function_type_t
+from cpptypes import member_function_type_t
+from cpptypes import member_variable_type_t
+from cpptypes import declarated_t
+from cpptypes import type_qualifiers_t
+#java types
+from cpptypes import java_fundamental_t
+from cpptypes import jbyte_t
+from cpptypes import jshort_t
+from cpptypes import jint_t
+from cpptypes import jlong_t
+from cpptypes import jfloat_t
+from cpptypes import jdouble_t
+from cpptypes import jchar_t
+from cpptypes import jboolean_t
+
+
+
+from variable import variable_t
+
+from algorithm import full_name
+from algorithm import full_name_from_declaration_path
+from algorithm import make_flatten
+from algorithm import apply_visitor
+from algorithm import declaration_path
+from algorithm import get_named_parent
+from algorithm import find_declaration
+from algorithm import match_declaration_t
+from algorithm import find_all_declarations
+from algorithm import find_first_declaration
+from algorithm import declaration_files
+from algorithm import visit_function_has_not_been_found_t
+from algorithm import get_global_namespace
+
+from calldef import VIRTUALITY_TYPES
+from calldef import FUNCTION_VIRTUALITY_TYPES
+from calldef import argument_t
+from calldef import calldef_t
+from calldef import member_calldef_t
+from calldef import free_calldef_t
+from calldef import operator_t
+from calldef import member_function_t
+from calldef import constructor_t
+from calldef import destructor_t
+from calldef import member_operator_t
+from calldef import casting_operator_t
+from calldef import free_function_t
+from calldef import free_operator_t
+
+from decl_visitor import decl_visitor_t
+from type_visitor import type_visitor_t
+
+from type_traits import decompose_type
+from type_traits import decompose_class
+
+
+from type_traits import is_enum
+from type_traits import enum_declaration
+from type_traits import enum_traits
+
+from type_traits import is_class
+from type_traits import class_traits
+from type_traits import is_class_declaration
+from type_traits import class_declaration_traits
+
+
+from type_traits import is_bool
+from type_traits import is_same
+from type_traits import is_void
+from type_traits import is_void_pointer
+from type_traits import is_const
+from type_traits import base_type
+from type_traits import is_array
+from type_traits import is_pointer
+from type_traits import is_volatile
+from type_traits import is_integral
+from type_traits import is_reference
+from type_traits import is_arithmetic
+from type_traits import is_fundamental
+from type_traits import is_floating_point
+from type_traits import is_base_and_derived
+from type_traits import is_convertible
+from type_traits import is_noncopyable
+from type_traits import is_std_string
+from type_traits import is_std_wstring
+from type_traits import is_std_ostream
+from type_traits import is_std_wostream
+from type_traits import is_calldef_pointer
+
+from type_traits import is_unary_operator
+from type_traits import is_binary_operator
+
+from type_traits import array_size
+from type_traits import array_item_type
+
+from type_traits import remove_cv
+from type_traits import remove_const
+from type_traits import remove_alias
+from type_traits import remove_pointer
+from type_traits import remove_volatile
+from type_traits import remove_reference
+from type_traits import remove_declarated
+
+from type_traits import has_destructor
+from type_traits import has_public_less
+from type_traits import has_copy_constructor
+has_trivial_copy = has_copy_constructor #backward comp mode will be removed
+from type_traits import has_public_equal
+from type_traits import has_public_assign
+from type_traits import has_public_destructor
+from type_traits import has_public_constructor
+from type_traits import has_trivial_constructor
+from type_traits import find_trivial_constructor
+from type_traits import has_public_binary_operator
+from type_traits import has_any_non_copyconstructor
+
+from type_traits import auto_ptr_traits
+from type_traits import smart_pointer_traits
+
+from container_traits import list_traits
+from container_traits import deque_traits
+from container_traits import queue_traits
+from container_traits import priority_queue_traits
+from container_traits import vector_traits
+from container_traits import stack_traits
+from container_traits import map_traits
+from container_traits import multimap_traits
+from container_traits import hash_map_traits
+from container_traits import hash_multimap_traits
+from container_traits import set_traits
+from container_traits import hash_set_traits
+from container_traits import multiset_traits
+from container_traits import hash_multiset_traits
+from container_traits import find_container_traits
+
+from function_traits import is_same_function
+
+all_container_traits = container_traits.container_traits
+"""tuple of all STD container traits classes"""
+
+sequential_container_traits = \
+[
+    list_traits
+    , deque_traits
+    , queue_traits
+    , priority_queue_traits
+    , vector_traits
+    , stack_traits
+    , set_traits
+    , hash_set_traits
+    , multiset_traits
+    , hash_multiset_traits
+]
+"""list, that contains all STD container traits classes"""
+
+
+import templates
+import call_invocation
+
+from filtering import filtering
+
+from decl_factory import decl_factory_t
+
+from matchers import matcher_base_t
+from matchers import or_matcher_t
+from matchers import and_matcher_t
+from matchers import not_matcher_t
+from matchers import declaration_matcher_t
+from matchers import calldef_matcher_t
+from matchers import namespace_matcher_t
+from matchers import variable_matcher_t
+from matchers import regex_matcher_t
+from matchers import access_type_matcher_t
+from matchers import operator_matcher_t
+from matchers import custom_matcher_t
+from matchers import virtuality_type_matcher_t
+
+#make matchers to look more like functors
+or_matcher = or_matcher_t
+"""see L{or_matcher} for documentation"""
+and_matcher = and_matcher_t
+"""see L{and_matcher} for documentation"""
+not_matcher = not_matcher_t
+"""see L{not_matcher} for documentation"""
+declaration_matcher = declaration_matcher_t
+"""see L{declaration_matcher} for documentation"""
+calldef_matcher = calldef_matcher_t
+"""see L{calldef_matcher} for documentation"""
+namespace_matcher = namespace_matcher_t
+"""see L{namespace_matcher} for documentation"""
+variable_matcher = variable_matcher_t
+"""see L{variable_matcher} for documentation"""
+regex_matcher = regex_matcher_t
+"""see L{regex_matcher} for documentation"""
+access_type_matcher = access_type_matcher_t
+"""see L{access_type_matcher} for documentation"""
+operator_matcher = operator_matcher_t
+"""see L{operator_matcher} for documentation"""
+custom_matcher = custom_matcher_t
+"""see L{custom_matcher} for documentation"""
+virtuality_type_matcher = virtuality_type_matcher_t
+"""see L{virtuality_type_matcher} for documentation"""
+
+from matcher import matcher
+
+from mdecl_wrapper import mdecl_wrapper_t
+
+from decl_printer import decl_printer_t
+from decl_printer import print_declarations
+
+
+import scopedef
+
+scopedef.scopedef_t._impl_all_decl_types = \
+[
+    scopedef.scopedef_t
+    , enumeration_t
+    , namespace_t
+    , class_t
+    , class_declaration_t
+    , typedef_t
+    , variable_t
+    , calldef_t
+    , member_calldef_t
+    , free_calldef_t
+    , operator_t
+    , member_function_t
+    , constructor_t
+    , destructor_t
+    , member_operator_t
+    , casting_operator_t
+    , free_function_t
+    , free_operator_t
+]
+
+__impl_matchers = scopedef.scopedef_t._impl_matchers
+__impl_decl_types = scopedef.scopedef_t._impl_decl_types
+
+__impl_matchers[ scopedef.scopedef_t.decl ] = declaration_matcher_t
+
+__impl_matchers[ scopedef.scopedef_t.class_ ] = declaration_matcher_t
+__impl_decl_types[ scopedef.scopedef_t.class_ ] = class_t
+
+__impl_matchers[ scopedef.scopedef_t.variable ] = variable_matcher_t
+
+__impl_matchers[ scopedef.scopedef_t.calldef ] = calldef_matcher_t
+__impl_decl_types[ scopedef.scopedef_t.calldef ] = calldef_t
+
+__impl_matchers[ scopedef.scopedef_t.operator ] = operator_matcher_t
+__impl_decl_types[ scopedef.scopedef_t.operator ] = operator_t
+
+__impl_matchers[ scopedef.scopedef_t.member_function ] = calldef_matcher_t
+__impl_decl_types[ scopedef.scopedef_t.member_function ] = member_function_t
+
+__impl_matchers[ scopedef.scopedef_t.constructor ] = calldef_matcher_t
+__impl_decl_types[ scopedef.scopedef_t.constructor ] = constructor_t
+
+__impl_matchers[ scopedef.scopedef_t.member_operator ] = operator_matcher_t
+__impl_decl_types[ scopedef.scopedef_t.member_operator ] = member_operator_t
+
+__impl_matchers[ scopedef.scopedef_t.member_operator ] = operator_matcher_t
+__impl_decl_types[ scopedef.scopedef_t.member_operator ] = member_operator_t
+
+__impl_matchers[ scopedef.scopedef_t.casting_operator ] = calldef_matcher_t
+__impl_decl_types[ scopedef.scopedef_t.casting_operator ] = casting_operator_t
+
+__impl_matchers[ scopedef.scopedef_t.enumeration ] = declaration_matcher_t
+__impl_decl_types[ scopedef.scopedef_t.enumeration ] = enumeration_t
+
+__impl_matchers[ scopedef.scopedef_t.typedef ] = declaration_matcher_t
+__impl_decl_types[ scopedef.scopedef_t.typedef ] = typedef_t
+
+__impl_matchers[ namespace_t.namespace ] = namespace_matcher_t
+
+__impl_matchers[ namespace_t.free_function ] = calldef_matcher_t
+__impl_decl_types[ namespace_t.free_function ] = free_function_t
+
+__impl_matchers[ namespace_t.free_operator ] = operator_matcher_t
+__impl_decl_types[ namespace_t.free_operator ] = free_operator_t
+
+
+
+
+
+
+
+
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/algorithm.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/algorithm.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/algorithm.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/algorithm.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/algorithms_cache.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/algorithms_cache.py
new file mode 100644
index 0000000..6a85fd4
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/algorithms_cache.py
@@ -0,0 +1,147 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines class that will keep results of different calculations.
+"""
+
+
+class declaration_algs_cache_t( object ):
+    def __init__( self ):
+        object.__init__( self )
+        self._enabled = True
+        self._full_name = None
+        self._full_partial_name = None
+        self._access_type = None
+        self._demangled_name = None
+        self._declaration_path = None
+        self._partial_declaration_path = None        
+        self._container_key_type = None        
+        self._container_element_type = None
+
+    def disable( self ):
+        self._enabled = False
+
+    def enable( self ):
+        self._enabled = True
+
+    @property
+    def enabled( self ):
+        return self._enabled
+
+    def _get_full_name( self ):
+        return self._full_name
+    def _set_full_name( self, fname ):
+        if not self.enabled:
+            fname = None
+        self._full_name = fname        
+    full_name = property( _get_full_name, _set_full_name )
+
+    def _get_full_partial_name( self ):
+        return self._full_partial_name
+    def _set_full_partial_name( self, fname ):
+        if not self.enabled:
+            fname = None
+        self._full_partial_name = fname       
+    full_partial_name = property( _get_full_partial_name, _set_full_partial_name )
+
+    def _get_access_type( self ):
+        return self._access_type
+    def _set_access_type( self, access_type ):
+        if not self.enabled:
+            access_type = None
+        self._access_type = access_type
+    access_type = property( _get_access_type, _set_access_type )
+
+    def _get_demangled_name( self ):
+        return self._demangled_name
+    def _set_demangled_name( self, demangled_name ):
+        if not self.enabled:
+            demangled_name = None        
+        self._demangled_name = demangled_name    
+    demangled_name = property( _get_demangled_name, _set_demangled_name )
+
+    def _get_declaration_path( self ):
+        return self._declaration_path
+    def _set_declaration_path( self, declaration_path ):
+        if not self.enabled:
+            declaration_path = None
+        self._declaration_path = declaration_path
+    declaration_path = property( _get_declaration_path, _set_declaration_path )
+
+    def _get_partial_declaration_path( self ):
+        return self._partial_declaration_path
+    def _set_partial_declaration_path( self, partial_declaration_path ):
+        if not self.enabled:
+            partial_declaration_path = None
+        self._partial_declaration_path = partial_declaration_path
+    partial_declaration_path = property( _get_partial_declaration_path
+                                             , _set_partial_declaration_path )
+
+    def _get_container_element_type( self ):
+        return self._container_element_type
+    def _set_container_element_type( self, etype ):
+        if not self.enabled:
+            etype = None
+        self._container_element_type = etype
+    container_element_type = property( _get_container_element_type, _set_container_element_type )
+    
+    def _get_container_key_type( self ):
+        return self._container_key_type
+    def _set_container_key_type( self, ktype ):
+        if not self.enabled:
+            ktype = None
+        self._container_key_type = ktype
+    container_key_type = property( _get_container_key_type, _set_container_key_type )    
+
+    def reset( self ):
+        self.full_name = None
+        self.full_partial_name = None
+        self.access_type = None
+        self.demangled_name = None
+        self.declaration_path = None
+        self.partial_declaration_path = None
+        self.container_key_type = None
+        self.container_element_type = None
+
+    def reset_name_based( self ):
+        self.full_name = None
+        self.full_partial_name = None
+        self.demangled_name = None
+        self.declaration_path = None
+        self.partial_declaration_path = None
+        self.container_key_type = None
+        self.container_element_type = None
+
+    def reset_access_type( self ):
+        self.access_type = None
+
+class type_algs_cache_t( object ):
+    enabled = True
+    
+    @staticmethod
+    def disable():
+        type_algs_cache_t.enabled = False
+
+    @staticmethod
+    def enable( self ):
+        type_algs_cache_t.enabled = True
+
+    def __init__( self ):
+        object.__init__( self )
+        self._remove_alias = None
+
+    def _get_remove_alias( self ):
+        return self._remove_alias
+    def _set_remove_alias( self, remove_alias ):
+        if not type_algs_cache_t.enabled:
+            remove_alias = None
+        self._remove_alias = remove_alias
+    
+    remove_alias = property( _get_remove_alias, _set_remove_alias )
+
+    def reset(self):
+        self.remove_alias = None
+        
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/call_invocation.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/call_invocation.py
new file mode 100644
index 0000000..058242c
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/call_invocation.py
@@ -0,0 +1,78 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+""" 
+free function call parser
+
+This module implements all functionality necessary to parse C++ free function 
+invocation. In other words this module is able to extract next information from 
+the string like this C{ print_message( message ) }.
+    - name ( print_message )
+    - list of arguments ( message )
+
+This module also defines few convenience function like L{split} and L{join}.
+"""
+
+import pattern_parser
+
+__THE_PARSER = pattern_parser.parser_t( '(', ')', ',' )
+
+def is_call_invocation( decl_string ):
+    """
+    returns True if decl_string is function invocation and False otherwise
+    
+    @param decl_string: string that should be checked for pattern presence
+    @type decl_string: str
+    
+    @return: bool
+    """
+    global __THE_PARSER
+    return __THE_PARSER.has_pattern( decl_string )
+
+def name( decl_string ):
+    """
+    returns name of function
+    
+    @type decl_string: str
+    @return: str
+    """
+    global __THE_PARSER
+    return __THE_PARSER.name( decl_string )
+
+def args( decl_string ):
+    """
+    returns list of function arguments
+    
+    @type decl_string: str
+    @return: [str]
+    """
+    global __THE_PARSER
+    return __THE_PARSER.args( decl_string )
+
+NOT_FOUND = __THE_PARSER.NOT_FOUND
+def find_args( text, start=None ):
+    """
+    finds arguments within function invocation.
+    
+    @type text: str
+    @return: [ arguments ] or L{NOT_FOUND} if arguments could not be found
+    """
+    global __THE_PARSER
+    return __THE_PARSER.find_args( text, start )
+
+def split( decl_string ):
+    """returns (name, [arguments] )"""
+    global __THE_PARSER
+    return __THE_PARSER.split( decl_string )
+    
+def split_recursive( decl_string ):
+    """returns [(name, [arguments])]"""
+    global __THE_PARSER
+    return __THE_PARSER.split_recursive( decl_string )
+
+def join( name, args, arg_separator=None ):
+    """returns name( argument_1, argument_2, ..., argument_n )"""
+    global __THE_PARSER
+    return __THE_PARSER.join( name, args, arg_separator )
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/calldef.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/calldef.py
new file mode 100644
index 0000000..8fcd881
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/calldef.py
@@ -0,0 +1,561 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines classes, that describes "callable" declarations
+
+This modules contains definition for next C++ declarations:
+    - operator
+        - member
+        - free
+    - function
+        - member
+        - free
+    - constructor
+    - destructor
+"""
+
+import cpptypes
+import algorithm
+import declaration
+import type_traits
+import dependencies
+import call_invocation
+
+class VIRTUALITY_TYPES:
+    """class that defines "virtuality" constants"""
+    NOT_VIRTUAL = 'not virtual'
+    VIRTUAL = 'virtual'
+    PURE_VIRTUAL = 'pure virtual'
+    ALL = [NOT_VIRTUAL, VIRTUAL, PURE_VIRTUAL]
+#preserving backward compatebility
+FUNCTION_VIRTUALITY_TYPES = VIRTUALITY_TYPES
+
+#First level in hierarchy of calldef
+class argument_t(object):
+    """
+    class, that describes argument of "callable" declaration
+    """
+
+    def __init__( self, name='', type=None, default_value=None, attributes=None):
+        object.__init__(self)
+        self._name = name
+        self._default_value = default_value
+        self._type = type
+        self._attributes = attributes        
+
+    def clone( self, **keywd ):
+        """constructs new argument_t instance
+        
+        return argument_t( name=keywd.get( 'name', self.name )
+                           , type=keywd.get( 'type', self.type )
+                           , default_value=keywd.get( 'default_value', self.default_value )
+                           , attributes=keywd.get( 'attributes', self.attributes ) )
+
+        """
+        return argument_t( name=keywd.get( 'name', self.name )
+                           , type=keywd.get( 'type', self.type )
+                           , default_value=keywd.get( 'default_value', self.default_value )
+                           , attributes=keywd.get( 'attributes', self.attributes ) )
+        
+    def __str__(self):
+        if self.ellipsis:
+            return "..."
+        else:
+            if self.default_value==None:
+                return "%s %s"%(self.type, self.name)
+            else:
+                return "%s %s=%s"%(self.type, self.name, self.default_value)
+
+    def __eq__(self, other):
+        if not isinstance( other, self.__class__ ):
+            return False
+        return self.name == other.name \
+               and self.default_value == other.default_value \
+               and self.type == other.type
+
+    def __ne__( self, other):
+        return not self.__eq__( other )
+
+    def __lt__(self, other):
+        if not isinstance( other, self.__class__ ):
+            return self.__class__.__name__ < other.__class__.__name__
+        return self.name < other.name \
+               and self.default_value < other.default_value \
+               and self.type < other.type
+
+    def _get_name(self):
+        return self._name
+    def _set_name(self, name):
+        self._name = name
+    name = property( _get_name, _set_name
+                     , doc="""Argument name.
+                     @type: str""" )
+
+    @property
+    def ellipsis(self):
+        """bool, if True argument represents ellipsis ( "..." ) in function definition"""
+        return isinstance( self.type, cpptypes.ellipsis_t )
+
+    def _get_default_value(self):
+        return self._default_value
+    def _set_default_value(self, default_value):
+        self._default_value = default_value
+    default_value = property( _get_default_value, _set_default_value
+                              , doc="""Argument's default value or None.
+                              @type: str""")
+
+    def _get_type(self):
+        return self._type
+    def _set_type(self, type):
+        self._type = type
+    type = property( _get_type, _set_type
+                     , doc="""The type of the argument.
+                     @type: L{type_t}""")
+                     
+    def _get_attributes( self ):
+        return self._attributes
+    def _set_attributes( self, attributes ):
+        self._attributes = attributes
+    attributes = property( _get_attributes, _set_attributes
+                        , doc="""GCCXML attributes, set using __attribute__((gccxml("...")))
+                        @type: str
+                        """ )
+
+
+class calldef_t( declaration.declaration_t ):
+    """base class for all "callable" declarations"""
+    def __init__( self, name='', arguments=None, exceptions=None, return_type=None, has_extern=False, does_throw=True ):
+        declaration.declaration_t.__init__( self, name )
+        if not arguments:
+            arguments = []
+        self._arguments = arguments
+        if not exceptions:
+            exceptions = []
+        self._does_throw = does_throw
+        self._exceptions = exceptions
+        self._return_type = return_type
+        self._has_extern = has_extern
+        self._demangled_name = None
+
+    def _get__cmp__call_items(self):
+        """implementation details"""
+        raise NotImplementedError()
+
+    def _get__cmp__items( self ):
+        """implementation details"""
+        items = [ self.arguments
+                  , self.return_type
+                  , self.has_extern
+                  , self.does_throw
+                  , self._sorted_list( self.exceptions ) ]
+        items.extend( self._get__cmp__call_items() )
+        return items
+
+    def __eq__(self, other):
+        if not declaration.declaration_t.__eq__( self, other ):
+            return False
+        return self.return_type == other.return_type \
+               and self.arguments == other.arguments \
+               and self.has_extern == other.has_extern \
+               and self.does_throw == other.does_throw \
+               and self._sorted_list( self.exceptions ) \
+                   == other._sorted_list( other.exceptions )
+
+    def _get_arguments(self):
+        return self._arguments
+    def _set_arguments(self, arguments):
+        self._arguments = arguments
+    arguments = property( _get_arguments , _set_arguments
+                          , doc="""The argument list.
+                          @type: list of L{argument_t}""")
+
+    @property
+    def has_ellipsis( self ):
+        return self.arguments and self.arguments[-1].ellipsis
+
+    @property
+    def argument_types( self ):
+        """list of all argument types"""
+        return [ arg.type for arg in self.arguments ]
+
+    @property
+    def required_args(self):
+        """list of all required arguments"""
+        r_args = []
+        for arg in self.arguments:
+            if not arg.default_value:
+                r_args.append( arg )
+            else:
+                break
+        return r_args
+
+    @property
+    def optional_args(self):
+        """list of all optional arguments, the arguments that have default value"""
+        return self.arguments[ len( self.required_args ) : ]
+
+    def _get_does_throw(self):
+        return self._does_throw
+    def _set_does_throw(self, does_throw):
+        self._does_throw = does_throw
+    does_throw = property( _get_does_throw, _set_does_throw,
+                           doc="""If False, than function does not throw any exception.
+                           In this case, function was declared with empty throw 
+                           statement.
+                           """)
+
+    def _get_exceptions(self):
+        return self._exceptions
+    def _set_exceptions(self, exceptions):
+        self._exceptions = exceptions
+    exceptions = property( _get_exceptions, _set_exceptions
+                           , doc="""The list of exceptions.
+                           @type: list of L{declaration_t}""")
+
+    def _get_return_type(self):
+        return self._return_type
+    def _set_return_type(self, return_type):
+        self._return_type = return_type
+    return_type = property( _get_return_type, _set_return_type
+                            , doc='''The type of the return value of the "callable" or None (constructors).
+                            @type: L{type_t}
+                            ''')
+    @property
+    def overloads(self):
+        """A list of overloaded "callables" (i.e. other callables with the same name within the same scope.
+        
+        @type: list of L{calldef_t}
+        """ 
+        if not self.parent:
+            return []
+        # finding all functions with the same name
+        return self.parent.calldefs( name=self.name
+                                     , function=lambda decl: not (decl is self )
+                                     , allow_empty=True
+                                     , recursive=False )
+
+    def _get_has_extern(self):
+        return self._has_extern
+    def _set_has_extern(self, has_extern):
+        self._has_extern = has_extern
+    has_extern = property( _get_has_extern, _set_has_extern,
+                           doc="""Was this callable declared as "extern"?
+                           @type: bool
+                           """)
+
+    def __remove_parent_fname( self, demangled ):
+        """implementation details"""
+        demangled = demangled.strip()
+        parent_fname = algorithm.full_name( self.parent )
+        if parent_fname.startswith( '::' ) and not demangled.startswith( '::' ):
+            parent_fname = parent_fname[2:]
+        demangled = demangled[ len( parent_fname ): ]
+        return demangled
+
+    def _get_demangled_name( self ):
+        if not self.demangled:
+            self._demangled_name = ''
+
+        if self._demangled_name:
+            return self._demangled_name
+
+        if self._demangled_name == '':
+            return self.name
+
+        demangled = self.demangled
+        if self.return_type:
+            return_type = type_traits.remove_alias( self.return_type ).decl_string
+
+            if return_type.startswith( '::' ) and not self.demangled.startswith( '::' ):
+                return_type = return_type[2:]
+            demangled = self.demangled
+            if demangled.startswith( return_type ):
+                demangled = demangled[ len( return_type ): ]
+                demangled = demangled.strip()
+        #removing scope
+        demangled_name = call_invocation.name( self.__remove_parent_fname( demangled ) )
+        if demangled_name.startswith( '::' ):
+            demangled_name = demangled_name[2:]
+        #to be on the safe side
+        if demangled_name.startswith( self.name ):
+            self._demangled_name = demangled_name
+            return self._demangled_name
+
+        #well, I am going to try an other strategy
+        fname = algorithm.full_name( self )
+        found = self.demangled.find( fname )
+        if -1 == found:
+            if fname.startswith( '::' ):
+                fname = fname[2:]
+            found = self.demangled.find( fname )
+            if -1 == found:
+                self._demangled_name = ''
+                return self.name
+        demangled_name = call_invocation.name( self.demangled[ found: ] )
+        demangled_name = self.__remove_parent_fname( demangled_name )
+        if demangled_name.startswith( '::' ):
+            demangled_name = demangled_name[2:]
+        #to be on the safe side
+        if demangled_name.startswith( self.name ):
+            self._demangled_name = demangled_name
+            return self._demangled_name
+        #if -1 == found:
+        self._demangled_name = ''
+        return self.name
+
+    demangled_name = property( _get_demangled_name
+                              , doc="returns function demangled name. It can help you to deal with function template instantiations")
+
+    def i_depend_on_them( self, recursive=True ):
+        report_dependency = lambda *args, **keywd: dependencies.dependency_info_t( self, *args, **keywd )
+        answer = []
+        if self.return_type:
+            answer.append( report_dependency( self.return_type, hint="return type" ) )       
+        map( lambda arg: answer.append( report_dependency( arg.type ) )
+             , self.arguments )
+        map( lambda exception: answer.append( report_dependency( exception, hint="exception" ) )
+             , self.exceptions )
+        return answer
+
+#Second level in hierarchy of calldef
+class member_calldef_t( calldef_t ):
+    """base class for "callable" declarations that defined within C++ class or struct"""
+    def __init__( self, virtuality=None, has_const=None, has_static=None, *args, **keywords ):
+        calldef_t.__init__( self, *args, **keywords )
+        self._virtuality = virtuality
+        self._has_const = has_const
+        self._has_static = has_static
+
+    def __str__(self):
+        # Get the full name of the calldef...
+        name = algorithm.full_name(self)
+        if name[:2]=="::":
+            name = name[2:]
+        # Add the arguments...
+        args = map(lambda a: str(a), self.arguments)
+        res = "%s(%s)"%(name, ", ".join(args))
+        # Add the return type...
+        if self.return_type!=None:
+            res = "%s %s"%(self.return_type, res)
+        # const?
+        if self.has_const:
+            res += " const"
+        # static?
+        if self.has_static:
+            res = "static "+res
+        # Append the declaration class
+        cls = self.__class__.__name__
+        if cls[-2:]=="_t":
+            cls = cls[:-2]
+        cls = cls.replace( '_', ' ' )
+        return "%s [%s]"%(res, cls)
+
+    def _get__cmp__call_items(self):
+        """implementation details"""
+        return [ self.virtuality, self.has_static, self.has_const ]
+
+    def __eq__(self, other):
+        if not calldef_t.__eq__( self, other ):
+            return False
+        return self.virtuality == other.virtuality \
+               and self.has_static == other.has_static \
+               and self.has_const == other.has_const
+
+    def get_virtuality(self):
+        return self._virtuality
+    def set_virtuality(self, virtuality):
+        assert virtuality in VIRTUALITY_TYPES.ALL
+        self._virtuality = virtuality
+    virtuality = property( get_virtuality, set_virtuality
+                           , doc="""Describes the "virtuality" of the member (as defined by the string constants in the class L{VIRTUALITY_TYPES}).
+                           @type: str""")
+
+    def _get_access_type(self):
+        return self.parent.find_out_member_access_type( self )
+    access_type = property( _get_access_type
+                            , doc="""Return the access type of the member (as defined by the string constants in the class L{ACCESS_TYPES}.
+                            @type: str""")
+
+    def _get_has_const(self):
+        return self._has_const
+    def _set_has_const(self, has_const):
+        self._has_const = has_const
+    has_const = property( _get_has_const, _set_has_const
+                          , doc="""describes, whether "callable" has const modifier or not""")
+
+    def _get_has_static(self):
+        return self._has_static
+    def _set_has_static(self, has_static):
+        self._has_static = has_static
+    has_static = property( _get_has_static, _set_has_static
+                           , doc="""describes, whether "callable" has static modifier or not""")
+
+    def function_type(self):
+        """returns function type. See L{type_t} hierarchy"""
+        if self.has_static:
+            return cpptypes.free_function_type_t( return_type=self.return_type
+                                           , arguments_types=[ arg.type for arg in self.arguments ] )
+        else:
+            return cpptypes.member_function_type_t( class_inst=self.parent
+                                           , return_type=self.return_type
+                                           , arguments_types=[ arg.type for arg in self.arguments ]
+                                           , has_const=self.has_const )
+
+    def create_decl_string(self, with_defaults=True):
+        f_type = self.function_type()
+        if with_defaults:
+            return f_type.decl_string
+        else:
+            return f_type.partial_decl_string
+
+class free_calldef_t( calldef_t ):
+    """base class for "callable" declarations that defined within C++ namespace"""
+    def __init__( self, *args, **keywords ):
+        calldef_t.__init__( self, *args, **keywords )
+
+    def __str__(self):
+        # Get the full name of the calldef...
+        name = algorithm.full_name(self)
+        if name[:2]=="::":
+            name = name[2:]
+        # Add the arguments...
+        args = map(lambda a: str(a), self.arguments)
+        res = "%s(%s)"%(name, ", ".join(args))
+        # Add the return type...
+        if self.return_type!=None:
+            res = "%s %s"%(self.return_type, res)
+        # extern?
+        if self.has_extern:
+            res = "extern "+res
+        # Append the declaration class
+        cls = self.__class__.__name__
+        if cls[-2:]=="_t":
+            cls = cls[:-2]
+        cls = cls.replace( '_', ' ' )
+        return "%s [%s]"%(res, cls)
+
+    def _get__cmp__call_items(self):
+        """implementation details"""
+        return []
+
+    def function_type(self):
+        """returns function type. See L{type_t} hierarchy"""
+        return cpptypes.free_function_type_t( return_type=self.return_type
+                                     , arguments_types=[ arg.type for arg in self.arguments ] )
+
+    def create_decl_string(self, with_defaults=True):
+        f_type = self.function_type()
+        if with_defaults:
+            return f_type.decl_string
+        else:
+            return f_type.partial_decl_string
+
+
+class operator_t(object):
+    """base class for "operator" declarations"""
+    OPERATOR_WORD_LEN = len( 'operator' )
+    def __init__(self):
+        object.__init__(self)
+
+    @property
+    def symbol(self):
+        "operator's symbol. For example: operator+, symbol is equal to '+'"
+        return self.name[operator_t.OPERATOR_WORD_LEN:].strip()
+
+#Third level in hierarchy of calldef
+class member_function_t( member_calldef_t ):
+    """describes member function declaration"""
+    def __init__( self, *args, **keywords ):
+        member_calldef_t.__init__( self, *args, **keywords )
+
+class constructor_t( member_calldef_t ):
+    """describes constructor declaration"""
+    def __init__( self, *args, **keywords ):
+        member_calldef_t.__init__( self, *args, **keywords )
+
+    def __str__(self):
+        # Get the full name of the calldef...
+        name = algorithm.full_name(self)
+        if name[:2]=="::":
+            name = name[2:]
+        # Add the arguments...
+        args = map(lambda a: str(a), self.arguments)
+        res = "%s(%s)"%(name, ", ".join(args))
+        # Append the declaration class
+        cls = 'constructor'
+        if self.is_copy_constructor:
+            cls = 'copy ' + cls
+        return "%s [%s]"%(res, cls)
+
+    @property
+    def is_copy_constructor(self):
+        """returns True if described declaration is copy constructor, otherwise False"""
+        args = self.arguments
+        if 1 != len( args ):
+            return False
+        arg = args[0]
+        if not type_traits.is_reference( arg.type ):
+            return False
+        if not type_traits.is_const( arg.type.base ):
+            return False
+        unaliased = type_traits.remove_alias( arg.type.base )
+        #unaliased now refers to const_t instance
+        if not isinstance( unaliased.base, cpptypes.declarated_t ):
+            return False
+        return id(unaliased.base.declaration) == id(self.parent)
+    
+    @property
+    def is_trivial_constructor(self):
+        return not bool( self.arguments )
+    
+
+class destructor_t( member_calldef_t ):
+    """describes deconstructor declaration"""
+    def __init__( self, *args, **keywords ):
+        member_calldef_t.__init__( self, *args, **keywords )
+
+class member_operator_t( member_calldef_t, operator_t ):
+    """describes member operator declaration"""
+    def __init__( self, *args, **keywords ):
+        member_calldef_t.__init__( self, *args, **keywords )
+        operator_t.__init__( self, *args, **keywords )
+        self.__class_types = None
+
+class casting_operator_t( member_calldef_t, operator_t ):
+    """describes casting operator declaration"""
+    def __init__( self, *args, **keywords ):
+        member_calldef_t.__init__( self, *args, **keywords )
+        operator_t.__init__( self, *args, **keywords )
+
+class free_function_t( free_calldef_t ):
+    """describes free function declaration"""
+    def __init__( self, *args, **keywords ):
+        free_calldef_t.__init__( self, *args, **keywords )
+
+class free_operator_t( free_calldef_t, operator_t ):
+    """describes free operator declaration"""
+    def __init__( self, *args, **keywords ):
+        free_calldef_t.__init__( self, *args, **keywords )
+        operator_t.__init__( self, *args, **keywords )
+        self.__class_types = None
+        
+    @property
+    def class_types( self ):
+        """list of class/class declaration types, extracted from the operator arguments"""
+        if None is self.__class_types:
+            self.__class_types = []
+            for type_ in self.argument_types:
+                decl = None
+                type_ = type_traits.remove_reference( type_ )
+                if type_traits.is_class( type_ ):
+                    decl = type_traits.class_traits.get_declaration( type_ )
+                elif type_traits.is_class_declaration( type_ ):
+                    decl = type_traits.class_declaration_traits.get_declaration( type_ )
+                else:
+                    pass
+                if decl:
+                    self.__class_types.append( decl )
+        return self.__class_types
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/class_declaration.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/class_declaration.py
new file mode 100644
index 0000000..ef6ba6d
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/class_declaration.py
@@ -0,0 +1,532 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines classes, that describes C++ classes
+
+This modules contains definition for next C++ declarations:
+    - class definition
+    - class declaration
+    - small helper class for describing C++ class hierarchy
+"""
+
+import scopedef
+import itertools
+import compilers
+import algorithm
+import declaration
+import dependencies
+from pygccxml import utils
+
+class ACCESS_TYPES:
+    """class that defines "access" constants"""
+    PUBLIC = "public"
+    PRIVATE = "private"
+    PROTECTED = "protected"
+    ALL = [ PUBLIC, PRIVATE, PROTECTED ]
+
+class CLASS_TYPES:
+    """class that defines "class" type constants"""
+    CLASS = "class"
+    STRUCT = "struct"
+    UNION = "union"
+    ALL = [ CLASS, STRUCT, UNION ]
+
+def get_partial_name( name ):
+    import templates
+    import container_traits #prevent cyclic dependencies
+    ct = container_traits.find_container_traits( name )
+    if ct:
+        return ct.remove_defaults( name )
+    elif templates.is_instantiation( name ):
+        tmpl_name, args = templates.split( name )
+        for i, arg_name in enumerate( args ):
+            args[i] = get_partial_name( arg_name.strip() )
+        return templates.join( tmpl_name, args )
+    else:
+        return name
+
+
+class hierarchy_info_t( object ):
+    """describes class relationship"""
+    def __init__(self, related_class=None, access=None, is_virtual=False ):
+        """creates class that contains partial information about class relationship"""
+        if related_class:
+            assert( isinstance( related_class, class_t ) )
+        self._related_class = related_class
+        if access:
+            assert( access in ACCESS_TYPES.ALL)
+        self._access=access
+        self._is_virtual = is_virtual
+
+    def __eq__(self, other):
+        if not isinstance( other, hierarchy_info_t ):
+            return False
+        return algorithm.declaration_path( self.related_class ) == algorithm.declaration_path( other.related_class ) \
+               and self.access == other.access \
+               and self.is_virtual == other.is_virtual
+
+    def __ne__( self, other):
+        return not self.__eq__( other )
+
+    def __lt__(self, other):
+        if not isinstance( other, self.__class__ ):
+            return self.__class__.__name__ < other.__class__.__name__
+        return ( algorithm.declaration_path( self.related_class ), self.access, self.is_virtual  ) \
+               < ( algorithm.declaration_path( other.related_class ), other.access, self.is_virtual )
+
+    def _get_related_class(self):
+        return self._related_class
+    def _set_related_class(self, new_related_class):
+        if new_related_class:
+            assert( isinstance( new_related_class, class_t ) )
+        self._related_class = new_related_class
+    related_class = property( _get_related_class, _set_related_class
+                              , doc="reference to base or derived L{class<class_t>}")
+
+    def _get_access(self):
+        return self._access
+    def _set_access(self, new_access):
+        assert( new_access in ACCESS_TYPES.ALL )
+        self._access = new_access
+    access = property( _get_access, _set_access )
+    access_type = property( _get_access, _set_access
+                            , doc="describes L{hierarchy type<ACCESS_TYPES>}")
+
+    #TODO: check whether GCC XML support this and if so parser this information
+    def _get_is_virtual(self):
+        return self._is_virtual
+    def _set_is_virtual(self, new_is_virtual):
+        self._is_virtual = new_is_virtual
+    is_virtual = property( _get_is_virtual, _set_is_virtual
+                           , doc="indicates whether the inheritance is virtual or not")
+
+
+class class_declaration_t( declaration.declaration_t ):
+    """describes class declaration"""
+    def __init__( self, name='' ):
+        """creates class that describes C++ class declaration( and not definition )"""
+        declaration.declaration_t.__init__( self, name )
+        self._aliases = []
+        self._container_traits = None
+        self._container_traits_set = False
+
+    def _get__cmp__items(self):
+        """implementation details"""
+        return []
+
+    def i_depend_on_them( self, recursive=True ):
+        return []
+
+    def _get_aliases(self):
+        return self._aliases
+    def _set_aliases( self, new_aliases ):
+        self._aliases = new_aliases
+    aliases = property( _get_aliases, _set_aliases
+                         , doc="List of L{aliases<typedef_t>} to this instance")
+
+    @property
+    def container_traits( self ):
+        """reference to L{container traits<container_traits.py>} or None"""
+        if self._container_traits_set == False:
+            import container_traits #prevent cyclic dependencies
+            self._container_traits_set = True
+            self._container_traits = container_traits.find_container_traits( self )
+        return self._container_traits
+
+    def _get_partial_name_impl( self ):
+        return get_partial_name( self.name )
+
+class class_t( scopedef.scopedef_t ):
+    """describes class definition"""
+
+    USE_DEMANGLED_AS_NAME = True
+    def __init__( self, name='', class_type=CLASS_TYPES.CLASS, is_abstract=False ):
+        """creates class that describes C++ class definition"""
+        scopedef.scopedef_t.__init__( self, name )
+        if class_type:
+            assert( class_type in CLASS_TYPES.ALL )
+        self._class_type = class_type
+        self._bases = []
+        self._derived = []
+        self._is_abstract = is_abstract
+        self._public_members = []
+        self._private_members = []
+        self._protected_members = []
+        self._aliases = []
+        self._byte_size = 0
+        self._byte_align = 0
+        self._container_traits = None
+        self._container_traits_set = False
+        self._recursive_bases = None
+        self._recursive_derived = None
+
+    def _get_name_impl( self ):
+        if not self._name: #class with empty name
+            return self._name
+        elif class_t.USE_DEMANGLED_AS_NAME and self.demangled and 'GCC' in self.compiler:
+            if not self.cache.demangled_name:
+                fname = algorithm.full_name( self.parent )
+                if fname.startswith( '::' ) and not self.demangled.startswith( '::' ):
+                    fname = fname[2:]
+                if self.demangled.startswith( fname ):
+                    tmp = self.demangled[ len( fname ): ] #demangled::name
+                    if tmp.startswith( '::' ):
+                        tmp = tmp[2:]
+                    if '<' not in tmp and '<' in self._name:
+                        #we have template class, but for some reason demangled
+                        #name doesn't contain any template
+                        #This happens for std::string class, but this breaks
+                        #other cases, because this behaviour is not consistent
+                        self.cache.demangled_name = self._name
+                        return self.cache.demangled_name
+                    else:
+                        self.cache.demangled_name = tmp
+                        return tmp
+                else:
+                    self.cache.demangled_name = self._name
+                    return self._name
+            else:
+                return self.cache.demangled_name
+        else:
+            return self._name
+
+    def __str__(self):
+        name = algorithm.full_name(self)
+        if name[:2]=="::":
+            name = name[2:]
+        return "%s [%s]"%(name, self.class_type)
+
+    def _get__cmp__scope_items(self):
+        """implementation details"""
+        return [ self.class_type
+                 , self._sorted_list( [ algorithm.declaration_path( base.related_class ) for base in self.bases ] )
+                 , self._sorted_list( [ algorithm.declaration_path( derive.related_class ) for derive in self.derived ] )
+                 , self.is_abstract
+                 , self._sorted_list( self.public_members )
+                 , self._sorted_list( self.private_members )
+                 , self._sorted_list( self.protected_members ) ]
+
+    def __eq__(self, other):
+        if not scopedef.scopedef_t.__eq__( self, other ):
+            return False
+        return self.class_type == other.class_type \
+               and self._sorted_list( [ algorithm.declaration_path( base.related_class ) for base in self.bases ] ) \
+                   == other._sorted_list( [ algorithm.declaration_path( base.related_class ) for base in other.bases ] ) \
+               and self._sorted_list( [ algorithm.declaration_path( derive.related_class ) for derive in self.derived ] ) \
+                   == other._sorted_list( [ algorithm.declaration_path( derive.related_class ) for derive in other.derived ] ) \
+               and self.is_abstract == other.is_abstract \
+               and self._sorted_list( self.public_members ) \
+                   == other._sorted_list( other.public_members ) \
+               and self._sorted_list( self.private_members ) \
+                   == other._sorted_list( other.private_members ) \
+               and self._sorted_list( self.protected_members ) \
+                   == self._sorted_list( other.protected_members )
+
+    def _get_class_type(self):
+        return self._class_type
+    def _set_class_type( self, new_class_type):
+        if new_class_type:
+            assert( new_class_type in CLASS_TYPES.ALL )
+        self._class_type = new_class_type
+    class_type = property( _get_class_type, _set_class_type
+                           , doc="describes class L{type<CLASS_TYPES>}")
+
+    def _get_bases(self):
+        return self._bases
+    def _set_bases( self, new_bases ):
+        self._bases = new_bases
+    bases = property( _get_bases, _set_bases
+                      , doc="list of L{base classes<hierarchy_info_t>}")
+
+    @property
+    def recursive_bases(self):
+        """list of all L{base classes<hierarchy_info_t>}"""
+        if self._recursive_bases is None:
+            to_go = self.bases[:]
+            all_bases = []
+            while to_go:
+                base = to_go.pop()
+                if base not in all_bases:
+                    all_bases.append( base )
+                    to_go.extend( base.related_class.bases )
+            self._recursive_bases = all_bases
+        return self._recursive_bases
+
+    def _get_derived(self):
+        return self._derived
+    def _set_derived( self, new_derived ):
+        self._derived = new_derived
+    derived = property( _get_derived, _set_derived
+                        , doc="list of L{derived classes<hierarchy_info_t>}")
+
+    @property
+    def recursive_derived(self):
+        """list of all L{derive classes<hierarchy_info_t>}"""
+        if self._recursive_derived is None:
+            to_go = self.derived[:]
+            all_derived = []
+            while to_go:
+                derive = to_go.pop()
+                if derive not in all_derived:
+                    all_derived.append( derive )
+                    to_go.extend( derive.related_class.derived )
+            self._recursive_derived = all_derived
+        return self._recursive_derived
+
+    def _get_is_abstract(self):
+        if self.compiler == compilers.MSVC_PDB_9:
+            #prevent cyclic dependencies
+            import calldef
+            import function_traits
+            from matchers import virtuality_type_matcher_t as vtmatcher_t
+            filter_pv = vtmatcher_t( calldef.VIRTUALITY_TYPES.PURE_VIRTUAL )
+            if self.calldefs( filter_pv, recursive=False, allow_empty=True ):
+                return True
+            filter_npv = vtmatcher_t( calldef.VIRTUALITY_TYPES.VIRTUAL ) \
+                         | vtmatcher_t( calldef.VIRTUALITY_TYPES.NOT_VIRTUAL )
+            pv_calldefs = []
+            npv_calldefs = []
+
+            npv_calldefs.extend( self.calldefs( filter_npv, recursive=False, allow_empty=True ) )
+            for base in self.recursive_bases:
+                cls = base.related_class
+                pv_calldefs.extend( cls.calldefs( filter_pv, recursive=False, allow_empty=True ) )
+                npv_calldefs.extend( cls.calldefs( filter_npv, recursive=False, allow_empty=True ) )
+
+            for pure_virtual in pv_calldefs:
+                impl_found = filter( lambda f: function_traits.is_same_function( pure_virtual, f )
+                                     , npv_calldefs )
+                if not impl_found:
+                    return True
+            return False
+        else:
+            return self._is_abstract
+    def _set_is_abstract( self, is_abstract ):
+        self._is_abstract = is_abstract
+    is_abstract = property( _get_is_abstract, _set_is_abstract
+                            ,doc="describes whether class abstract or not" )
+
+    def _get_public_members(self):
+        return self._public_members
+    def _set_public_members( self, new_public_members ):
+        self._public_members = new_public_members
+    public_members = property( _get_public_members, _set_public_members
+                               , doc="list of all public L{members<declaration_t>}")
+
+    def _get_private_members(self):
+        return self._private_members
+    def _set_private_members( self, new_private_members ):
+        self._private_members = new_private_members
+    private_members = property( _get_private_members, _set_private_members
+                                , doc="list of all private L{members<declaration_t>}")
+
+    def _get_protected_members(self):
+        return self._protected_members
+    def _set_protected_members( self, new_protected_members ):
+        self._protected_members = new_protected_members
+    protected_members = property( _get_protected_members, _set_protected_members
+                                  , doc="list of all protected L{members<declaration_t>}" )
+
+    def _get_aliases(self):
+        return self._aliases
+    def _set_aliases( self, new_aliases ):
+        self._aliases = new_aliases
+    aliases = property( _get_aliases, _set_aliases
+                         , doc="List of L{aliases<typedef_t>} to this instance")
+
+    def _get_byte_size(self):
+        return self._byte_size
+    def _set_byte_size( self, new_byte_size ):
+        self._byte_size = new_byte_size
+    byte_size = property( _get_byte_size, _set_byte_size
+                          , doc="Size of this class in bytes @type: int")
+
+    def _get_byte_align(self):
+        if self.compiler == compilers.MSVC_PDB_9:
+            compilers.on_missing_functionality( self.compiler, "byte align" )
+        return self._byte_align
+    def _set_byte_align( self, new_byte_align ):
+        self._byte_align = new_byte_align
+    byte_align = property( _get_byte_align, _set_byte_align
+                          , doc="Alignment of this class in bytes @type: int")
+
+    def _get_declarations_impl(self):
+        return self.get_members()
+
+    def get_members( self, access=None):
+        """
+        returns list of members according to access type
+
+        If access equals to None, then returned list will contain all members.
+        You should not modify the list content, otherwise different optimization
+        data will stop work and may to give you wrong results.
+
+        @param access: describes desired members
+        @type access: L{ACCESS_TYPES}
+
+        @return: [ members ]
+        """
+        if access == ACCESS_TYPES.PUBLIC:
+            return self.public_members
+        elif access == ACCESS_TYPES.PROTECTED:
+            return self.protected_members
+        elif access == ACCESS_TYPES.PRIVATE:
+            return self.private_members
+        else:
+            all_members = []
+            all_members.extend( self.public_members )
+            all_members.extend( self.protected_members )
+            all_members.extend( self.private_members )
+            return all_members
+
+    def adopt_declaration( self, decl, access ):
+        """adds new declaration to the class
+
+        @param decl: reference to a L{declaration<declaration_t>}
+
+        @param access: member access type
+        @type access: L{ACCESS_TYPES}
+        """
+        if access == ACCESS_TYPES.PUBLIC:
+            self.public_members.append( decl )
+        elif access == ACCESS_TYPES.PROTECTED:
+            self.protected_members.append( decl )
+        elif access == ACCESS_TYPES.PRIVATE:
+            self.private_members.append( decl )
+        else:
+            raise RuntimeError( "Invalid access type: %s." % access )
+        decl.parent = self
+        decl.cache.reset()
+        decl.cache.access_type = access
+
+    def remove_declaration( self, decl ):
+        """
+        removes decl from  members list
+
+        @param decl: declaration to be removed
+        @type decl: L{declaration_t}
+        """
+        container = None
+        access_type = self.find_out_member_access_type( decl )
+        if access_type == ACCESS_TYPES.PUBLIC:
+            container = self.public_members
+        elif access_type == ACCESS_TYPES.PROTECTED:
+            container = self.protected_members
+        else: #decl.cache.access_type == ACCESS_TYPES.PRVATE
+            container = self.private_members
+        del container[ container.index( decl ) ]
+        decl.cache.reset()
+
+    def find_out_member_access_type( self, member ):
+        """
+        returns member access type
+
+        @param member: member of the class
+        @type member: L{declaration_t}
+
+        @return: L{ACCESS_TYPES}
+        """
+        assert member.parent is self
+        if not member.cache.access_type:
+            access_type = None
+            if member in self.public_members:
+                access_type = ACCESS_TYPES.PUBLIC
+            elif member in self.protected_members:
+                access_type = ACCESS_TYPES.PROTECTED
+            elif member in self.private_members:
+                access_type = ACCESS_TYPES.PRIVATE
+            else:
+                raise RuntimeError( "Unable to find member within internal members list." )
+            member.cache.access_type = access_type
+            return access_type
+        else:
+            return member.cache.access_type
+
+    def __find_out_member_dependencies( self, access_type ):
+        members = self.get_members( access_type )
+        answer = []
+        map( lambda mem: answer.extend( mem.i_depend_on_them(recursive=True) ), members )
+        member_ids = set( map( lambda m: id( m ), members ) )
+        for dependency in answer:
+            if id( dependency.declaration ) in member_ids:
+                dependency.access_type = access_type
+        return answer
+
+    def i_depend_on_them( self, recursive=True ):
+        report_dependency = lambda *args: dependencies.dependency_info_t( self, *args )
+        
+        answer = []
+
+        map( lambda base: answer.append( report_dependency( base.related_class, base.access_type, "base class" ) )
+             , self.bases )
+
+        if recursive:
+            map( lambda access_type: answer.extend( self.__find_out_member_dependencies( access_type ) )
+                 , ACCESS_TYPES.ALL )
+
+        return answer
+
+    @property
+    def container_traits( self ):
+        """reference to L{container traits<container_traits.py>} or None"""
+        if self._container_traits_set == False:
+            import container_traits #prevent cyclic dependencies
+            self._container_traits_set = True
+            self._container_traits = container_traits.find_container_traits( self )
+        return self._container_traits
+
+    def find_copy_constructor( self ):
+        copy_ = self.constructors( lambda x: x.is_copy_constructor, recursive=False, allow_empty=True )
+        if copy_:
+            return copy_[0]
+        else:
+            return None
+
+    def find_trivial_constructor( self ):
+        trivial = self.constructors( lambda x: x.is_trivial_constructor, recursive=False, allow_empty=True )
+        if trivial:
+            return trivial[0]
+        else:
+            return None
+
+    def _get_partial_name_impl( self ):
+        import type_traits #prevent cyclic dependencies
+        if type_traits.is_std_string( self ):
+            return 'string'
+        elif type_traits.is_std_wstring( self ):
+            return 'wstring'
+        else:
+            return get_partial_name( self.name )
+    
+    def find_noncopyable_vars( self ):        
+        """returns list of all noncopyable variables"""
+        import type_traits as tt#prevent cyclic dependencies
+        logger = utils.loggers.cxx_parser
+        mvars = self.vars( lambda v: not v.type_qualifiers.has_static, recursive=False, allow_empty=True )
+        noncopyable_vars = []
+        for mvar in mvars:
+            type_ = tt.remove_reference( mvar.type )
+            if tt.is_const( type_ ):
+                no_const = tt.remove_const( type_ )
+                if tt.is_fundamental( no_const ) or tt.is_enum( no_const):
+                    logger.debug( "__contains_noncopyable_mem_var - %s - TRUE - containes const member variable - fundamental or enum" % self.decl_string )
+                    noncopyable_vars.append( mvar )
+                if tt.is_class( no_const ):
+                    logger.debug( "__contains_noncopyable_mem_var - %s - TRUE - containes const member variable - class" % self.decl_string )
+                    noncopyable_vars.append( mvar )
+                if tt.is_array( no_const ):
+                    logger.debug( "__contains_noncopyable_mem_var - %s - TRUE - containes const member variable - array" % self.decl_string )
+                    noncopyable_vars.append( mvar )
+            if tt.class_traits.is_my_case( type_ ):
+                cls = tt.class_traits.get_declaration( type_ )
+                if tt.is_noncopyable( cls ):
+                    logger.debug( "__contains_noncopyable_mem_var - %s - TRUE - containes member variable - class that is not copyable" % self.decl_string )
+                    noncopyable_vars.append( mvar )                
+        logger.debug( "__contains_noncopyable_mem_var - %s - false - doesn't contains noncopyable members" % self.decl_string )
+        return noncopyable_vars
+
+
+class_types = ( class_t, class_declaration_t )
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/compilers.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/compilers.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/compilers.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/compilers.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/container_traits.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/container_traits.py
new file mode 100644
index 0000000..8c3a883
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/container_traits.py
@@ -0,0 +1,487 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines few algorithms, that deals with different properties of std containers
+"""
+
+import types
+import string
+import calldef
+import cpptypes
+import namespace
+import templates
+import type_traits
+import class_declaration
+
+std_namespaces = ( 'std', 'stdext', '__gnu_cxx' )
+
+class defaults_eraser:
+    @staticmethod
+    def normalize( type_str ):
+        return type_str.replace( ' ', '' )
+
+    @staticmethod
+    def replace_basic_string( cls_name ):
+        strings = {
+              'std::string' : ( 'std::basic_string<char,std::char_traits<char>,std::allocator<char> >'
+                                , 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >' )
+            , 'std::wstring' : ( 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >'
+                                 , 'std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >' ) }
+
+        new_name = cls_name
+        for short_name, long_names in strings.iteritems():
+            for lname in long_names:
+                new_name = new_name.replace( lname, short_name )
+        return new_name
+
+    class recursive_impl:
+        @staticmethod
+        def decorated_call_prefix( cls_name, text, doit ):
+            has_text = cls_name.startswith( text )
+            if has_text:
+                cls_name = cls_name[ len( text ): ]
+            answer = doit( cls_name )
+            if has_text:
+                answer = text + answer
+            return answer
+
+        @staticmethod
+        def decorated_call_suffix( cls_name, text, doit ):
+            has_text = cls_name.endswith( text )
+            if has_text:
+                cls_name = cls_name[: len( text )]
+            answer = doit( cls_name )
+            if has_text:
+                answer = answer + text
+            return answer
+
+        @staticmethod
+        def erase_call( cls_name ):
+            global find_container_traits
+            c_traits = find_container_traits( cls_name )
+            if not c_traits:
+                return cls_name
+            return c_traits.remove_defaults( cls_name )
+
+        @staticmethod
+        def erase_recursive( cls_name ):
+            ri = defaults_eraser.recursive_impl
+            no_std = lambda cls_name: ri.decorated_call_prefix( cls_name, 'std::', ri.erase_call )
+            no_stdext = lambda cls_name: ri.decorated_call_prefix( cls_name, 'stdext::', no_std )
+            no_gnustd = lambda cls_name: ri.decorated_call_prefix( cls_name, '__gnu_cxx::', no_stdext )
+            no_const = lambda cls_name: ri.decorated_call_prefix( cls_name, 'const ', no_gnustd )
+            no_end_const = lambda cls_name: ri.decorated_call_suffix( cls_name, ' const', no_const )
+            return no_end_const( cls_name )
+
+    @staticmethod
+    def erase_recursive( cls_name ):
+        return defaults_eraser.recursive_impl.erase_recursive( cls_name )
+
+    @staticmethod
+    def erase_allocator( cls_name, default_allocator='std::allocator' ):
+        cls_name = defaults_eraser.replace_basic_string( cls_name )
+        c_name, c_args = templates.split( cls_name )
+        if 2 != len( c_args ):
+            return
+        value_type = c_args[0]
+        tmpl = string.Template( "$container< $value_type, $allocator<$value_type> >" )
+        tmpl = tmpl.substitute( container=c_name, value_type=value_type, allocator=default_allocator )
+        if defaults_eraser.normalize( cls_name ) == defaults_eraser.normalize( tmpl ):
+            return templates.join( c_name, [defaults_eraser.erase_recursive( value_type )] )
+
+    @staticmethod
+    def erase_container( cls_name, default_container_name='std::deque' ):
+        cls_name = defaults_eraser.replace_basic_string( cls_name )
+        c_name, c_args = templates.split( cls_name )
+        if 2 != len( c_args ):
+            return
+        value_type = c_args[0]
+        dc_no_defaults = defaults_eraser.erase_recursive( c_args[1] )
+        if defaults_eraser.normalize( dc_no_defaults ) \
+           != defaults_eraser.normalize( templates.join( default_container_name, [value_type] ) ):
+            return
+        return templates.join( c_name, [defaults_eraser.erase_recursive( value_type )] )
+
+    @staticmethod
+    def erase_container_compare( cls_name, default_container_name='std::vector', default_compare='std::less' ):
+        cls_name = defaults_eraser.replace_basic_string( cls_name )
+        c_name, c_args = templates.split( cls_name )
+        if 3 != len( c_args ):
+            return
+        dc_no_defaults = defaults_eraser.erase_recursive( c_args[1] )
+        if defaults_eraser.normalize( dc_no_defaults ) \
+           != defaults_eraser.normalize( templates.join( default_container_name, [c_args[0]] ) ):
+            return
+        dcomp_no_defaults = defaults_eraser.erase_recursive( c_args[2] )
+        if defaults_eraser.normalize( dcomp_no_defaults ) \
+           != defaults_eraser.normalize( templates.join( default_compare, [c_args[0]] ) ):
+            return
+        value_type = defaults_eraser.erase_recursive( c_args[0] )
+        return templates.join( c_name, [value_type] )
+
+    @staticmethod
+    def erase_compare_allocator( cls_name, default_compare='std::less', default_allocator='std::allocator' ):
+        cls_name = defaults_eraser.replace_basic_string( cls_name )
+        c_name, c_args = templates.split( cls_name )
+        if 3 != len( c_args ):
+            return
+        value_type = c_args[0]
+        tmpl = string.Template( "$container< $value_type, $compare<$value_type>, $allocator<$value_type> >" )
+        tmpl = tmpl.substitute( container=c_name
+                                , value_type=value_type
+                                , compare=default_compare
+                                , allocator=default_allocator )
+        if defaults_eraser.normalize( cls_name ) == defaults_eraser.normalize( tmpl ):
+            return templates.join( c_name, [defaults_eraser.erase_recursive( value_type )] )
+
+    @staticmethod
+    def erase_map_compare_allocator( cls_name, default_compare='std::less', default_allocator='std::allocator' ):
+        cls_name = defaults_eraser.replace_basic_string( cls_name )
+        c_name, c_args = templates.split( cls_name )
+        if 4 != len( c_args ):
+            return
+        key_type = c_args[0]
+        mapped_type = c_args[1]
+        tmpls = [
+            string.Template( "$container< $key_type, $mapped_type, $compare<$key_type>, $allocator< std::pair< const $key_type, $mapped_type> > >" )
+            , string.Template( "$container< $key_type, $mapped_type, $compare<$key_type>, $allocator< std::pair< $key_type const, $mapped_type> > >" )
+            , string.Template( "$container< $key_type, $mapped_type, $compare<$key_type>, $allocator< std::pair< $key_type, $mapped_type> > >" )]
+        for tmpl in tmpls:
+            tmpl = tmpl.substitute( container=c_name
+                                    , key_type=key_type
+                                    , mapped_type=mapped_type
+                                    , compare=default_compare
+                                    , allocator=default_allocator )
+            if defaults_eraser.normalize( cls_name ) == defaults_eraser.normalize( tmpl ):
+                return templates.join( c_name
+                                       , [ defaults_eraser.erase_recursive( key_type )
+                                           , defaults_eraser.erase_recursive( mapped_type )] )
+
+
+    @staticmethod
+    def erase_hash_allocator( cls_name ):
+        cls_name = defaults_eraser.replace_basic_string( cls_name )
+        c_name, c_args = templates.split( cls_name )
+        if len( c_args ) < 3:
+            return
+
+        default_hash=None
+        default_less='std::less'
+        default_equal_to='std::equal_to'
+        default_allocator='std::allocator'
+
+        tmpl = None
+        if 3 == len( c_args ):
+            default_hash='hash_compare'
+            tmpl = "$container< $value_type, $hash<$value_type, $less<$value_type> >, $allocator<$value_type> >"
+        elif 4 == len( c_args ):
+            default_hash='hash'
+            tmpl = "$container< $value_type, $hash<$value_type >, $equal_to<$value_type >, $allocator<$value_type> >"
+        else:
+            return
+
+        value_type = c_args[0]
+        tmpl = string.Template( tmpl )
+        for ns in std_namespaces:
+            inst = tmpl.substitute( container=c_name
+                                    , value_type=value_type
+                                    , hash= ns + '::' + default_hash
+                                    , less=default_less
+                                    , equal_to=default_equal_to
+                                    , allocator=default_allocator )
+            if defaults_eraser.normalize( cls_name ) == defaults_eraser.normalize( inst ):
+                return templates.join( c_name, [defaults_eraser.erase_recursive( value_type )] )
+
+
+    @staticmethod
+    def erase_hashmap_compare_allocator( cls_name ):
+        cls_name = defaults_eraser.replace_basic_string( cls_name )
+        c_name, c_args = templates.split( cls_name )
+
+        default_hash=None
+        default_less='std::less'
+        default_allocator='std::allocator'
+        default_equal_to = 'std::equal_to'
+
+        tmpl = None
+        key_type = None
+        mapped_type = None
+        if 2 < len( c_args ):
+            key_type = c_args[0]
+            mapped_type = c_args[1]
+        else:
+            return
+
+        if 4 == len( c_args ):
+            default_hash = 'hash_compare'
+            tmpl = string.Template( "$container< $key_type, $mapped_type, $hash<$key_type, $less<$key_type> >, $allocator< std::pair< const $key_type, $mapped_type> > >" )
+            if key_type.startswith( 'const ' ) or key_type.endswith( ' const' ):
+                tmpl = string.Template( "$container< $key_type, $mapped_type, $hash<$key_type, $less<$key_type> >, $allocator< std::pair< $key_type, $mapped_type> > >" )
+        elif 5 == len( c_args ):
+            default_hash = 'hash'
+            tmpl = string.Template( "$container< $key_type, $mapped_type, $hash<$key_type >, $equal_to<$key_type>, $allocator< $mapped_type> >" )
+            if key_type.startswith( 'const ' ) or key_type.endswith( ' const' ):
+                tmpl = string.Template( "$container< $key_type, $mapped_type, $hash<$key_type >, $equal_to<$key_type>, $allocator< $mapped_type > >" )
+        else:
+            return
+
+        for ns in std_namespaces:
+            inst = tmpl.substitute( container=c_name
+                                    , key_type=key_type
+                                    , mapped_type=mapped_type
+                                    , hash=ns + '::' + default_hash
+                                    , less=default_less
+                                    , equal_to = default_equal_to
+                                    , allocator=default_allocator )
+            if defaults_eraser.normalize( cls_name ) == defaults_eraser.normalize( inst ):
+                return templates.join( c_name
+                                       , [ defaults_eraser.erase_recursive( key_type )
+                                           , defaults_eraser.erase_recursive( mapped_type )] )
+
+
+class container_traits_impl_t:
+    """this class implements the functionality needed for convinient work with
+    STD container classes.
+
+    Implemented functionality:
+        - find out whether a declaration is STD container or not
+        - find out container value( mapped ) type
+
+    This class tries to be useful as much, as possible. For example, for class
+    declaration( and not definition ) it parsers the class name in order to
+    extract all the information.
+    """
+    def __init__( self
+                  , container_name
+                  , element_type_index
+                  , element_type_typedef
+                  , defaults_remover                  
+                  , key_type_index=None
+                  , key_type_typedef=None ):
+        """
+        container_name - std container name
+        element_type_index - position of value\\mapped type within template
+          arguments list
+        element_type_typedef - class typedef to the value\\mapped type
+        key_type_index - position of key type within template arguments list
+        key_type_typedef - class typedef to the key type        
+        """
+        self._name = container_name
+        self.remove_defaults_impl = defaults_remover
+        self.element_type_index = element_type_index
+        self.element_type_typedef = element_type_typedef
+        self.key_type_index = key_type_index
+        self.key_type_typedef = key_type_typedef
+
+    def name(self):
+        return self._name
+
+    def get_container_or_none( self, type ):
+        """returns reference to the class declaration or None"""
+        type = type_traits.remove_alias( type )
+        type = type_traits.remove_cv( type )
+
+        cls = None
+        if isinstance( type, cpptypes.declarated_t ):
+            cls = type_traits.remove_alias( type.declaration )
+        elif isinstance( type, class_declaration.class_t ):
+            cls = type
+        elif isinstance( type, class_declaration.class_declaration_t ):
+            cls = type
+        else:
+            return
+
+        if not cls.name.startswith( self.name() + '<' ):
+            return
+
+        for ns in std_namespaces:
+            if type_traits.impl_details.is_defined_in_xxx( ns, cls ):
+                return cls
+
+    def is_my_case( self, type ):
+        """checks, whether type is STD container or not"""
+        return bool( self.get_container_or_none( type ) )
+
+    def class_declaration( self, type ):
+        """returns reference to the class declaration"""
+        cls = self.get_container_or_none( type )
+        if not cls:
+            raise TypeError( 'Type "%s" is not instantiation of std::%s' % ( type.decl_string, self.name() ) )
+        return cls
+
+    def is_sequence( self, type ):
+        #raise exception if type is not container
+        unused = self.class_declaration( type ) 
+        return self.key_type_index is None
+        
+    def is_mapping( self, type ):
+        return not self.is_sequence( type )
+
+    def __find_xxx_type( self, type, xxx_index, xxx_typedef, cache_property_name ):
+        cls = self.class_declaration( type )
+        result = getattr( cls.cache, cache_property_name )
+        if not result:            
+            if isinstance( cls, class_declaration.class_t ):
+                xxx_type = cls.typedef( xxx_typedef, recursive=False ).type
+                result = type_traits.remove_declarated( xxx_type )
+            else:
+                xxx_type_str = templates.args( cls.name )[xxx_index]
+                result = type_traits.impl_details.find_value_type( cls.top_parent, xxx_type_str )
+                if None is result:
+                    raise RuntimeError( "Unable to find out %s '%s' key\\value type."
+                                        % ( self.name(), cls.decl_string ) )
+            setattr( cls.cache, cache_property_name, result )
+        return result
+
+    def element_type( self, type ):
+        """returns reference to the class value\\mapped type declaration"""
+        return self.__find_xxx_type( type
+                                     , self.element_type_index
+                                     , self.element_type_typedef
+                                     , 'container_element_type')
+
+    def key_type( self, type ):
+        """returns reference to the class key type declaration"""        
+        if not self.is_mapping( type ):
+            raise TypeError( 'Type "%s" is not "mapping" container' % str( type ) )
+        return self.__find_xxx_type( type
+                                     , self.key_type_index
+                                     , self.key_type_typedef
+                                     , 'container_key_type' )
+
+    def remove_defaults( self, type_or_string ):
+        """remove template defaults from a template class instantiation
+        
+        For example:
+            std::vector< int, std::allocator< int > > 
+        will become
+            std::vector< int > 
+        """
+        name = type_or_string
+        if not isinstance( type_or_string, types.StringTypes ):
+            name = self.class_declaration( type_or_string ).name
+        if not self.remove_defaults_impl:
+            return name
+        no_defaults = self.remove_defaults_impl( name )
+        if not no_defaults:
+            return name
+        else:
+            return no_defaults
+
+create_traits = container_traits_impl_t
+list_traits = create_traits( 'list'
+                             , 0
+                             , 'value_type'
+                             , defaults_eraser.erase_allocator )
+
+deque_traits = create_traits( 'deque'
+                              , 0
+                              , 'value_type'
+                              , defaults_eraser.erase_allocator )
+
+queue_traits = create_traits( 'queue'
+                              , 0
+                              , 'value_type'
+                              , defaults_eraser.erase_container )
+
+priority_queue_traits = create_traits( 'priority_queue'
+                                       , 0
+                                       , 'value_type'
+                                       , defaults_eraser.erase_container_compare )
+
+vector_traits = create_traits( 'vector'
+                               , 0
+                               , 'value_type'
+                               , defaults_eraser.erase_allocator )
+
+stack_traits = create_traits( 'stack'
+                              , 0
+                              , 'value_type'
+                              , defaults_eraser.erase_container )
+
+map_traits = create_traits( 'map'
+                            , 1
+                            , 'mapped_type'
+                            , defaults_eraser.erase_map_compare_allocator
+                            , key_type_index=0
+                            , key_type_typedef='key_type')
+                            
+multimap_traits = create_traits( 'multimap'
+                                 , 1
+                                 , 'mapped_type'
+                                 , defaults_eraser.erase_map_compare_allocator 
+                                 , key_type_index=0
+                                 , key_type_typedef='key_type')
+
+
+hash_map_traits = create_traits( 'hash_map'
+                                 , 1
+                                 , 'mapped_type'
+                                 , defaults_eraser.erase_hashmap_compare_allocator 
+                                 , key_type_index=0
+                                 , key_type_typedef='key_type')
+                                 
+                                 
+hash_multimap_traits = create_traits( 'hash_multimap'
+                                      , 1
+                                      , 'mapped_type'
+                                      , defaults_eraser.erase_hashmap_compare_allocator 
+                                      , key_type_index=0
+                                      , key_type_typedef='key_type')
+
+set_traits = create_traits( 'set'
+                            , 0
+                            , 'value_type'
+                            , defaults_eraser.erase_compare_allocator)
+                            
+multiset_traits = create_traits( 'multiset'
+                                 , 0
+                                 , 'value_type'
+                                 , defaults_eraser.erase_compare_allocator )
+
+hash_set_traits = create_traits( 'hash_set'
+                                 , 0
+                                 , 'value_type'
+                                 , defaults_eraser.erase_hash_allocator )
+                                 
+hash_multiset_traits = create_traits( 'hash_multiset'
+                                      , 0
+                                      , 'value_type'
+                                      , defaults_eraser.erase_hash_allocator )
+
+container_traits = (
+      list_traits
+    , deque_traits
+    , queue_traits
+    , priority_queue_traits
+    , vector_traits
+    , stack_traits
+    , map_traits
+    , multimap_traits
+    , hash_map_traits
+    , hash_multimap_traits
+    , set_traits
+    , hash_set_traits
+    , multiset_traits
+    , hash_multiset_traits )
+"""tuple of all STD container traits classes"""
+
+def find_container_traits( cls_or_string ):
+    if isinstance( cls_or_string, types.StringTypes ):
+        if not templates.is_instantiation( cls_or_string ):
+            return None
+        name = templates.name( cls_or_string )
+        if name.startswith( 'std::' ):
+            name = name[ len( 'std::' ): ]
+        for cls_traits in container_traits:
+            if cls_traits.name() == name:
+                return cls_traits
+    else:
+        for cls_traits in container_traits:
+            if cls_traits.is_my_case( cls_or_string ):
+                return cls_traits
+
+
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/cpptypes.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/cpptypes.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/cpptypes.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/cpptypes.py
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/decl_factory.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/decl_factory.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/decl_factory.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/decl_factory.py
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/decl_printer.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/decl_printer.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/decl_printer.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/decl_printer.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/decl_visitor.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/decl_visitor.py
new file mode 100644
index 0000000..896fb19
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/decl_visitor.py
@@ -0,0 +1,56 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines declarations visitor class interface
+"""
+
+class decl_visitor_t(object):
+    """
+    declarations visitor interface
+    
+    All functions within this class should be redefined in derived classes.
+    """
+    def __init__(self):
+        object.__init__(self)
+    
+    def visit_member_function( self ):
+        raise NotImplementedError()
+        
+    def visit_constructor( self ):
+        raise NotImplementedError()
+    
+    def visit_destructor( self ):
+        raise NotImplementedError()
+    
+    def visit_member_operator( self ):
+        raise NotImplementedError()
+    
+    def visit_casting_operator( self ):
+        raise NotImplementedError()
+    
+    def visit_free_function( self ):
+        raise NotImplementedError()
+    
+    def visit_free_operator( self ):
+        raise NotImplementedError()
+
+    def visit_class_declaration(self ):
+        raise NotImplementedError()
+        
+    def visit_class(self ):
+        raise NotImplementedError()
+        
+    def visit_enumeration(self ):
+        raise NotImplementedError()
+        
+    def visit_namespace(self ):
+        raise NotImplementedError()
+        
+    def visit_typedef(self ):
+        raise NotImplementedError()
+        
+    def visit_variable(self ):
+        raise NotImplementedError()
\ No newline at end of file
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/declaration.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/declaration.py
new file mode 100644
index 0000000..e61fd48
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/declaration.py
@@ -0,0 +1,277 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines 2 important classes
+
+This module defines:
+* declaration_t - base class for all pygccxml defined classes, which describe
+  a C++ declaration
+* location_t - provides information about physical location of the declaration
+"""
+
+import algorithm
+import templates
+import algorithms_cache
+
+class location_t(object):
+    """provides information about the location of the declaration within the source file"""
+
+    def __init__(self, file_name='', line=-1 ):
+        self._file_name = file_name
+        self._line = line
+
+    def __eq__(self, other):
+        if not isinstance( other, self.__class__ ):
+            return False
+        return self.line == other.line \
+               and self.file_name == other.file_name
+
+    def __ne__( self, other):
+        return not self.__eq__( other )
+
+    def __lt__( self, other ):
+        if not isinstance( other, location_t ):
+            return self.__class__.__name__ < other.__class__.__name__
+        return ( self.file_name, self.line ) < ( other.file_name, other.line )
+
+    def _get_file_name(self):
+        return self._file_name
+    def _set_file_name(self, new_file_name):
+        self._file_name = new_file_name
+    file_name = property( _get_file_name, _set_file_name
+                          , doc="""absolute source file name, type string""" )
+
+    def _get_line( self ):
+        return self._line
+    def _set_line( self, new_line ):
+        self._line = new_line
+    line = property( _get_line, _set_line, doc="""line number, type int""")
+
+    def as_tuple( self ):
+        """return tuple(self.file_name, self.line)"""
+        return (self.file_name, self.line)
+
+class declaration_t( object ):
+    """base class for all classes that represent a C++ declaration"""
+
+    def __init__( self, name='', location=None, is_artificial=False, mangled=None, demangled=None, attributes=None ):
+        self._name = name
+        self._location = location
+        self._is_artificial = is_artificial
+        self._mangled = mangled
+        self._demangled = demangled
+        self._attributes = attributes        
+        self._parent = None
+        self._cache = algorithms_cache.declaration_algs_cache_t()
+        self._compiler = None
+        self._partial_name = None
+        
+    def __str__(self):
+        """Default __str__ method.
+
+        This version just returns the decl_string and the class.
+        Derived classes may override this method to provide more detailed
+        information.
+
+        A __str__ method for a declaration should always provide enough
+        information so that it uniquely identifies the declaration and
+        the user is able to find the declaration in his source code.
+        """
+        name = self.decl_string
+        if name[:2]=="::":
+            name = name[2:]
+        # Append the declaration class
+        cls = self.__class__.__name__
+        if cls[-2:]=="_t":
+            cls = cls[:-2]
+        cls = cls.replace( '_', ' ' )
+        return "%s [%s]"%(name, cls)
+
+    @staticmethod
+    def _sorted_list( some_list ):
+        """implementation details"""
+        some_list.sort()
+        return some_list
+
+    def _get__cmp__items( self ):
+        """implementation details"""
+        #Every derived class should implement this method. This method should
+        #return a list of items, that should be compared.
+
+        print '_get__cmp__items not implemented for class ', self.__class__.__name__
+        raise NotImplemented()
+
+    def _get__cmp__data(self):
+        """implementation details"""
+        data = [ algorithm.declaration_path( self.parent ), self.name, self.location ]
+        data.extend( self._get__cmp__items() )
+        return data
+
+    def __eq__(self, other):
+        """
+        function will return true, if both declarations refers to the same object.
+        This function could be implemented in terms of _get__cmp__data, but in
+        this case it will downgrade performance. self.mangled property is not
+        compared, because it could be chaned from one compilation time to an
+        other.
+        """
+        if not isinstance( other, self.__class__ ):
+            return False
+        return self.name == other.name \
+               and self.location == other.location \
+               and algorithm.declaration_path( self.parent ) \
+                   == algorithm.declaration_path( other.parent )
+
+    def __ne__( self, other):
+        """return not self.__eq__( other )"""
+        return not self.__eq__( other )
+
+    def __lt__(self, other):
+        """
+        C{if not isinstance( other, self.__class__ ):}
+        C{    return self.__class__.__name__ < other.__class__.__name__}
+        C{return self._get__cmp__data() < other._get__cmp__data()}
+        """
+        if not isinstance( other, self.__class__ ):
+            return self.__class__.__name__ < other.__class__.__name__
+        return self._get__cmp__data() < other._get__cmp__data()
+
+    def _get_name_impl( self ):
+        return self._name
+
+    def _get_name( self ):
+        return self._get_name_impl()
+
+    def _on_rename( self ):
+        pass
+
+    def _set_name( self, new_name ):
+        previous_name = self._name
+        self._name = new_name
+        self._partial_name = None
+        self.cache.reset_name_based()
+        if previous_name: #the was a rename and not initial "set"
+            self._on_rename()
+
+    name = property( _get_name, _set_name
+                     , doc="""Declaration name
+                     @type: str
+                     """)
+
+    def _get_partial_name_impl( self ):
+        return self.name
+    
+    @property
+    def partial_name( self ):
+        """declaration name, without template default arguments        
+        Right now std containers is the only classes that support this functionality"""
+        if None is self._partial_name:
+            self._partial_name = self._get_partial_name_impl()
+        return self._partial_name
+
+    def _get_parent(self):
+        return self._parent
+    def _set_parent(self, new_parent):
+        if new_parent:
+            assert( isinstance( new_parent, declaration_t ) )
+        self._parent = new_parent
+    parent = property( _get_parent, _set_parent
+                       , doc="""Reference to parent declaration
+                       @type: declaration_t
+                       """)
+
+    def __get_top_parent(self):
+        parent = self.parent
+        me = self
+        while True:
+            if not parent:
+                return me
+            else:
+                me = parent
+                parent = me.parent
+    top_parent = property( __get_top_parent,
+                           doc="""reference to top parent declaration
+                           @type: declaration_t
+                           """ )
+
+    def _get_location( self ):
+        return self._location
+    def _set_location( self, new_location ):
+        self._location = new_location
+    location = property( _get_location, _set_location
+                        , doc="""Location of the declaration within source file
+                        @type: L{location_t}
+                        """)
+
+    def _get_is_artificial( self ):
+        return self._is_artificial
+    def _set_is_artificial( self, new_artificial ):
+        self._is_artificial = new_artificial
+    is_artificial = property( _get_is_artificial, _set_is_artificial
+                              , doc="""Describes whether declaration is compiler generated or not
+                              @type: bool
+                              """)
+
+    def _get_mangled( self ):
+        return self._mangled
+    def _set_mangled( self, mangled ):
+        self._mangled = mangled
+    mangled = property( _get_mangled, _set_mangled
+                        , doc="""Compiler generated declaration name
+                        @type: str
+                        """ )
+
+    def _get_demangled( self ):
+        return self._demangled
+    def _set_demangled( self, demangled ):
+        self._demangled = demangled
+    demangled = property( _get_demangled, _set_demangled
+                        , doc="""Demangled compiler generated declaration name
+                        @type: str
+                        """ )
+
+    def _get_attributes( self ):
+        return self._attributes
+    def _set_attributes( self, attributes ):
+        self._attributes = attributes
+    attributes = property( _get_attributes, _set_attributes
+                        , doc="""GCCXML attributes, set using __attribute__((gccxml("...")))
+                        @type: str
+                        """ )
+
+    def create_decl_string(self, with_defaults=True):
+        return algorithm.full_name( self, with_defaults )
+
+    @property
+    def decl_string(self):
+        """declaration full name"""
+        return self.create_decl_string()
+
+    @property
+    def partial_decl_string(self):
+        """declaration full name"""
+        return self.create_decl_string(with_defaults=False)
+
+    @property
+    def cache( self ):
+        """implementation details
+
+        reference to instance of L{algorithms_cache.algorithms_cache_t} class.
+        """
+        return self._cache
+
+    def i_depend_on_them( self, recursive=True ):
+        """return list of all types and declarations the declaration depends on"""
+        print self
+        raise NotImplementedError()
+
+    def _get_compiler( self ):
+        return self._compiler
+    def _set_compiler( self, compiler ):
+        self._compiler = compiler
+    compiler = property( _get_compiler, _set_compiler
+                        , doc="""compiler name + version
+                        @type: str""" )
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/dependencies.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/dependencies.py
new file mode 100644
index 0000000..6abe4dd
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/dependencies.py
@@ -0,0 +1,61 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+this module contains class that keeps dependency information of some declaration
+"""
+
+import cpptypes
+
+class dependency_info_t( object ):
+    def __init__( self, declaration, depend_on_it, access_type=None, hint=None ):
+        object.__init__( self )
+        #prevent recursive import
+        import class_declaration
+        assert isinstance( depend_on_it, ( class_declaration.class_t, cpptypes.type_t ) )
+        self._declaration = declaration
+        self._depend_on_it = depend_on_it
+        self._access_type = access_type
+        self._hint = hint
+        
+    @property
+    def declaration( self ):
+        return self._declaration
+    #short name
+    decl = declaration
+
+    @property 
+    def depend_on_it( self ):
+        return self._depend_on_it
+    
+    def _get_access_type( self ):
+        return self._access_type
+    def _set_access_type( self, access_type ):
+        self._access_type = access_type   
+    access_type = property( _get_access_type, _set_access_type )
+
+    def __str__( self ):
+        return 'declaration "%s" depends( %s ) on "%s" ' \
+               % ( self.declaration, self.access_type, self.depend_on_it )
+
+    @property
+    def hint(self):
+        """the declaration, that report dependency can put some additional inforamtion
+        about dependency. It can be used later"""
+        return self._hint
+
+    def find_out_depend_on_declaration( self ):
+        """if declaration depends on other declaration and not on some type
+           this function will return reference to it. Otherwise None will be returned
+        """
+        #prevent recursive import
+        from pygccxml import declarations
+        
+        if isinstance( self.depend_on_it, declarations.declaration_t ):
+            return self.depend_on_it
+        base_type = declarations.base_type( declarations.remove_alias( self.depend_on_it ) )
+        if isinstance( base_type, cpptypes.declarated_t ):
+            return base_type.declaration
+        return None
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/enumeration.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/enumeration.py
new file mode 100644
index 0000000..a77e51b
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/enumeration.py
@@ -0,0 +1,138 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines class, that describes C++ enum
+"""
+
+import copy
+import types
+import compilers
+import declaration
+
+class enumeration_t( declaration.declaration_t ):
+    """
+    describes C++ enum
+    """
+    def __init__( self, name='', values=None ):
+        """creates class that describes C++ enum declaration
+
+        The items of the list 'values' may either be strings containing
+        the enumeration value name or tuples (name, numvalue).
+
+        @param name: Enum name
+        @type name: str
+        @param parent: Parent declaration
+        @type parent: declaration_t
+        @param values: Enumeration values
+        @type values: list
+        """
+        declaration.declaration_t.__init__( self, name )
+
+        # A list of tuples (valname(str), valnum(int)). The order of the list should
+        # be the same as the order in the C/C++ source file.
+        self._values = []
+
+        # Initialize values via property access
+        self.values = values
+        self._byte_size = 0
+        self._byte_align = 0
+
+    def __eq__(self, other):
+        if not declaration.declaration_t.__eq__( self, other ):
+            return False
+        return self.values == other.values
+
+    def _get__cmp__items( self ):
+        """implementation details"""
+        return [self.values]
+
+    def _get_values(self):
+        return copy.copy(self._values)
+    def _set_values(self, values):
+        self._values = []
+        # None is treated like an empty list
+        if (values==None):
+            return
+        # Check that we have indeed a list...
+        if type(values)!=list:
+            raise ValueError, "'values' must be a list (got a %s instead)"%type(values).__name__
+        # Append the items individually. This has the effect that there's
+        # some additional type checking and that a copy of 'values' is stored
+        # and the caller cannot further manipulate the list via his own reference
+        for item in values:
+            if isinstance(item, types.StringTypes):
+                self.append_value(item)
+            elif type(item)==tuple:
+                name,num = item
+                self.append_value(name, num)
+            else:
+                raise ValueError, "'values' contains an invalid item: %s"%item
+    values = property( _get_values, _set_values
+                       , doc="""A list of tuples (valname(str), valnum(int)) that contain the enumeration values.
+                       @type: list""")
+
+    def append_value(self, valuename, valuenum=None):
+        """Append another enumeration value to the enum.
+
+        The numeric value may be None in which case it is automatically determined by
+        increasing the value of the last item.
+
+        When the 'values' attribute is accessed the resulting list will be in the same
+        order as append_value() was called.
+
+        @param valuename: The name of the value.
+        @type valuename: str
+        @param valuenum: The numeric value or None.
+        @type valuenum: int
+        """
+        # No number given? Then use the previous one + 1
+        if valuenum==None:
+            if len(self._values)==0:
+                valuenum = 0
+            else:
+                valuenum = self._values[-1][1]+1
+
+        # Store the new value
+        self._values.append((valuename, int(valuenum)))
+
+    def has_value_name(self, name):
+        """Check if this enum has a particular name among its values.
+
+        @param name: Enumeration value name
+        @type name: str
+        @return: True if there is an enumeration value with the given name
+        """
+        for val,num in self._values:
+            if val==name:
+                return True
+        return False
+
+    def get_name2value_dict( self ):
+        """returns a dictionary, that maps between enum name( key ) and enum value( value )"""
+        x = {}
+        for val, num in self._values:
+            x[val] = num
+        return x
+
+    def i_depend_on_them( self, recursive=True ):
+        return []
+
+    def _get_byte_size(self):
+        return self._byte_size
+    def _set_byte_size( self, new_byte_size ):
+        self._byte_size = new_byte_size
+    byte_size = property( _get_byte_size, _set_byte_size
+                          , doc="Size of this class in bytes @type: int")
+
+    def _get_byte_align(self):
+        if self.compiler == compilers.MSVC_PDB_9:
+            compilers.on_missing_functionality( self.compiler, "byte align" )
+        return self._byte_align
+    def _set_byte_align( self, new_byte_align ):
+        self._byte_align = new_byte_align
+    byte_align = property( _get_byte_align, _set_byte_align
+                          , doc="Alignment of this class in bytes @type: int")
+
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/filtering.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/filtering.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/filtering.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/filtering.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/function_traits.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/function_traits.py
new file mode 100644
index 0000000..25b3f7c
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/function_traits.py
@@ -0,0 +1,92 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines few algorithms, that deals with different properties of functions
+"""
+
+import calldef
+import type_traits
+import class_declaration
+
+def is_same_return_type( f1, f2 ):
+    #covariant returns
+    #The return type of an overriding function shall be either identical to the 
+    #return type of the overridden function or covariant with the classes of the 
+    #functions. If a function D::f overrides a function B::f, the return types 
+    #of the functions are covariant if they satisfy the following criteria:
+
+    #* both are pointers to classes or references to classes
+    #* the class in the return type of B::f is the same class as the class in 
+    #  the return type of D::f or, is an unambiguous direct or indirect base 
+    #  class of the class in the return type of D::f and is accessible in D
+    #* both pointers or references have the same cv-qualification and the class 
+    #  type in the return type of D::f has the same cv-qualification as or less 
+    #  cv-qualification than the class type in the return type of B::f.
+
+    if not f1.__class__ is f2.__class__:
+        #it should be assert
+        return False #2 different calldef types
+    if not isinstance( f1, calldef.member_calldef_t ):
+        #for free functions we compare return types as usual
+        return type_traits.is_same( f1.return_type, f2.return_type)
+    if f1.virtuality == calldef.VIRTUALITY_TYPES.NOT_VIRTUAL \
+       or f2.virtuality == calldef.VIRTUALITY_TYPES.NOT_VIRTUAL:
+        #for non-virtual member functions we compare types as usual
+        return type_traits.is_same( f1.return_type, f2.return_type)
+    rt1 = f1.return_type
+    rt2 = f2.return_type
+    if type_traits.is_pointer( rt1 ) and type_traits.is_pointer( rt2 ):
+        rt1 = type_traits.remove_pointer( rt1 )
+        rt2 = type_traits.remove_pointer( rt2 )
+    elif type_traits.is_reference( rt1 ) and type_traits.is_reference( rt2 ):
+        rt1 = type_traits.remove_reference( rt1 )
+        rt2 = type_traits.remove_reference( rt2 )        
+    else:
+        return type_traits.is_same( f1.return_type, f2.return_type)
+    if ( type_traits.is_const( rt1 ) and type_traits.is_const( rt2 ) ) \
+       or ( False == type_traits.is_const( rt1 ) and False == type_traits.is_const( rt2 ) ):
+        rt1 = type_traits.remove_const( rt1 )
+        rt2 = type_traits.remove_const( rt2 )
+    else:
+        return False
+    if not type_traits.is_class( rt1 ) or not type_traits.is_class( rt2 ):
+        return type_traits.is_same( rt1, rt2 )
+    c1 = type_traits.class_traits.get_declaration( rt1 )
+    c2 = type_traits.class_traits.get_declaration( rt2 )
+    if c1.class_type == class_declaration.CLASS_TYPES.UNION \
+       or c2.class_type == class_declaration.CLASS_TYPES.UNION:
+        return type_traits.is_same( rt1, rt2 )
+    return type_traits.is_same( c1, c2 ) \
+           or type_traits.is_base_and_derived( c1, c2 ) \
+           or type_traits.is_base_and_derived( c2, c1 )
+        
+
+def is_same_function( f1, f2 ):
+    """returns true if f1 and f2 is same function
+
+    Use case: sometimes when user defines some virtual function in base class,
+    it overrides it in a derived one. Sometimes we need to know whether two member
+    functions is actualy same function.
+    """
+    if f1 is f2:
+        return True
+    if not f1.__class__ is f2.__class__:
+        return False
+    if isinstance( f1, calldef.member_calldef_t ) and f1.has_const != f2.has_const:
+        return False
+    if f1.name != f2.name:
+        return False
+    if not is_same_return_type( f1, f2 ):
+        return False
+    if len( f1.arguments ) != len(f2.arguments):
+        return False
+    for f1_arg, f2_arg in zip( f1.arguments, f2.arguments ):
+        if not type_traits.is_same( f1_arg.type, f2_arg.type ):
+            return False
+    return True
+
+
+
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/matcher.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/matcher.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/matcher.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/matcher.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/matchers.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/matchers.py
new file mode 100644
index 0000000..512b505
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/matchers.py
@@ -0,0 +1,527 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines all "built-in" classes that implement declarations compare functionality
+according to some criteria
+"""
+
+import os
+import re
+import types
+import algorithm
+import variable
+import namespace
+import calldef
+import cpptypes
+import templates
+import class_declaration
+from pygccxml import utils
+
+class matcher_base_t(object):
+    """matcher_base_t class defines interface for classes that will implement
+       compare functionality according to some criteria.
+    """
+    def __init__( self ):
+        object.__init__( self )
+
+    def __call__(self, decl):
+        raise NotImplementedError( "matcher must always implement the __call__() method." )
+
+    def __invert__(self):
+        """not-operator (~)"""
+        return not_matcher_t(self)
+
+    def __and__(self, other):
+        """and-operator (&)"""
+        return and_matcher_t([self, other])
+
+    def __or__(self, other):
+        """or-operator (|)"""
+        return or_matcher_t([self, other])
+
+    def __str__( self ):
+        return "base class for all matchers"
+
+class and_matcher_t(matcher_base_t):
+    """Combine several other matchers with "&".
+
+    For example: find all private functions with name XXX
+
+    C{ matcher = access_type_matcher_t( 'private' ) & calldef_matcher_t( name='XXX' ) }
+    """
+    def __init__(self, matchers):
+        matcher_base_t.__init__(self)
+        self.matchers = matchers
+
+    def __call__(self, decl):
+        for matcher in self.matchers:
+            if not matcher(decl):
+                return False
+        return True
+
+    def __str__(self):
+        return " & ".join( map( lambda x: "(%s)" % str( x ), self.matchers ) )
+
+
+class or_matcher_t(matcher_base_t):
+    """Combine several other matchers with "|".
+
+    For example: find all functions and variables with name 'XXX'
+
+    C{ matcher = variable_matcher_t( name='XXX' ) | calldef_matcher_t( name='XXX' ) }
+
+    """
+    def __init__(self, matchers):
+        matcher_base_t.__init__(self)
+        self.matchers = matchers
+
+    def __call__(self, decl):
+        for matcher in self.matchers:
+            if matcher(decl):
+                return True
+        return False
+
+    def __str__(self):
+        return " | ".join( map( lambda x: "(%s)" % str( x ), self.matchers ) )
+
+
+class not_matcher_t(matcher_base_t):
+    """Return the inverse result of matcher, using "~"
+
+    For example: find all private and protected declarations
+
+    C{ matcher = ~access_type_matcher_t( 'private' ) }
+
+    """
+    def __init__(self, matcher):
+        matcher_base_t.__init__(self)
+        self.matcher = matcher
+
+    def __call__(self, decl):
+        return not self.matcher(decl)
+
+    def __str__(self):
+        return "~(%s)"%str(self.matcher)
+
+class declaration_matcher_t( matcher_base_t ):
+    """
+    Instance of this class will match declarations by next criteria:
+          - declaration name, also could be fully qualified name
+            Example: wstring or ::std::wstring
+          - declaration type
+            Example: L{class_t}, L{namespace_t}, L{enumeration_t}
+          - location within file system ( file or directory )
+    """
+    def __init__( self, name=None, decl_type=None, header_dir=None, header_file=None ):
+        """
+        @param decl_type: declaration type to match by. For example L{enumeration_t}.
+        @type decl_type: any class that derives from L{declarations.declaration_t} class
+
+        @param name: declaration name, could be full name.
+        @type name: str
+
+        @param header_dir: absolute directory path
+        @type header_dir: str
+
+        @param header_file: absolute file path
+        @type header_file: str
+
+        """
+        #An other option is that pygccxml will create absolute path using
+        #os.path.abspath function. But I think this is just wrong, because abspath
+        #builds path using current working directory. This behavior is fragile
+        #and very difficult to find a bug.
+        matcher_base_t.__init__( self )
+        self.decl_type = decl_type
+        self.__name = None
+        self.__opt_is_tmpl_inst = None
+        self.__opt_tmpl_name = None
+        self.__opt_is_full_name = None
+        self.__decl_name_only = None
+
+        self._set_name( name )
+
+        self.header_dir = header_dir
+        self.header_file = header_file
+
+        if self.header_dir:
+            self.header_dir = utils.normalize_path( self.header_dir )
+            if not os.path.isabs( self.header_dir ):
+                raise RuntimeError( "Path to header directory should be absolute!" )
+
+        if self.header_file:
+            self.header_file = utils.normalize_path( self.header_file )
+            if not os.path.isabs( self.header_file ):
+                raise RuntimeError( "Path to header file should be absolute!" )
+
+    def _get_name(self):
+        return self.__name
+
+    def _set_name( self, name ):
+        self.__name = name
+        if not self.__name:
+            self.__opt_is_tmpl_inst = None
+            self.__opt_tmpl_name = None
+            self.__opt_is_full_name = None
+            self.__decl_name_only = None
+        else:
+            self.__opt_is_tmpl_inst = templates.is_instantiation( self.__name )
+            self.__opt_tmpl_name = templates.name( self.__name )
+            if self.__opt_is_tmpl_inst:
+                if '::' in self.__opt_tmpl_name:
+                    self.__opt_is_full_name = True
+                    self.__decl_name_only = self.__opt_tmpl_name.split('::')[-1]
+                else:
+                    self.__opt_is_full_name = False
+                    self.__decl_name_only = self.__opt_tmpl_name
+                self.__name = templates.normalize( name )            
+            else:
+                if '::' in self.__name:
+                    self.__opt_is_full_name = True
+                    self.__decl_name_only = self.__name.split('::')[-1]
+                else:
+                    self.__opt_is_full_name = False
+                    self.__decl_name_only = self.__name
+
+
+    name = property( _get_name, _set_name )
+
+    def __str__( self ):
+        msg = []
+        if not None is self.decl_type:
+            msg.append( '(decl type==%s)' % self.decl_type.__name__ )
+        if not None is self.name:
+            msg.append( '(name==%s)' % self.name )
+        if not None is self.header_dir:
+            msg.append( '(header dir==%s)' % self.header_dir )
+        if not None is self.header_file:
+            msg.append( '(header file==%s)' % self.header_file )
+        if not msg:
+            msg.append( 'any' )
+        return ' and '.join( msg )
+
+    def __call__( self, decl ):
+        if not None is self.decl_type:
+            if not isinstance( decl, self.decl_type ):
+                return False
+        if not None is self.name:
+            if not self.check_name( decl ):
+                return False
+        if not None is self.header_dir and decl.location:
+            decl_dir = os.path.abspath( os.path.dirname( decl.location.file_name ) )
+            decl_dir = utils.normalize_path( decl_dir )
+            if decl_dir[:len(self.header_dir)] != self.header_dir:
+                return False
+        if not None is self.header_file and decl.location:
+            decl_file = os.path.abspath( decl.location.file_name )
+            decl_file = utils.normalize_path( decl_file )
+            if decl_file != self.header_file:
+                return False
+        return True
+
+    def check_name( self, decl ):
+        assert not None is self.name
+        if self.__opt_is_tmpl_inst:
+            if not self.__opt_is_full_name:
+                if self.name != templates.normalize( decl.name ) \
+                   and self.name != templates.normalize( decl.partial_name ):
+                    return False
+            else:                
+                if self.name != templates.normalize( algorithm.full_name( decl, with_defaults=True ) ) \
+                   and self.name != templates.normalize( algorithm.full_name( decl, with_defaults=False ) ):
+                    return False
+        else:
+            if not self.__opt_is_full_name:
+                if self.name != decl.name and self.name != decl.partial_name:
+                    return False
+            else:
+                if self.name != algorithm.full_name( decl, with_defaults=True ) \
+                   and self.name != algorithm.full_name( decl, with_defaults=False ):
+                    return False
+        return True
+
+    def is_full_name(self):
+        return self.__opt_is_full_name
+
+    def _get_decl_name_only(self):
+        return self.__decl_name_only
+    decl_name_only = property( _get_decl_name_only )
+
+class variable_matcher_t( declaration_matcher_t ):
+    """
+    Instance of this class will match variables by next criteria:
+        - L{declaration_matcher_t} criteria
+        - variable type. Example: L{int_t} or 'int'
+    """
+    def __init__( self, name=None, type=None, header_dir=None, header_file=None ):
+        """
+        @param type: variable type
+        @type type: string or instance of L{type_t} derived class
+        """
+        declaration_matcher_t.__init__( self
+                                        , name=name
+                                        , decl_type=variable.variable_t
+                                        , header_dir=header_dir
+                                        , header_file=header_file )
+        self.type = type
+
+    def __call__( self, decl ):
+        if not super( variable_matcher_t, self ).__call__( decl ):
+            return False
+        if not None is self.type:
+            if isinstance( self.type, cpptypes.type_t ):
+                if self.type != decl.type:
+                    return False
+            else:
+                if self.type != decl.type.decl_string:
+                    return False
+        return True
+
+    def __str__( self ):
+        msg = [ super( variable_matcher_t, self ).__str__() ]
+        if msg == [ 'any' ]:
+            msg = []
+        if not None is self.type:
+            msg.append( '(value type==%s)' % str(self.type) )
+        if not msg:
+            msg.append( 'any' )
+        return ' and '.join( msg )
+
+
+class namespace_matcher_t( declaration_matcher_t ):
+    """Instance of this class will match namespaces by name."""
+
+    def __init__( self, name=None ):
+        declaration_matcher_t.__init__( self, name=name, decl_type=namespace.namespace_t)
+
+    def __call__( self, decl ):
+        if self.name and decl.name == '':
+            #unnamed namespace have same name as thier parent, we should prevent
+            #this happens. The price is: user should search for unnamed namespace
+            #directly.
+            return False
+        return super( namespace_matcher_t, self ).__call__( decl )
+
+
+class calldef_matcher_t( declaration_matcher_t ):
+    """
+    Instance of this class will match callable by next criteria:
+        - L{declaration_matcher_t} criteria
+        - return type. Example: L{int_t} or 'int'
+        - argument types
+    """
+
+    def __init__( self, name=None, return_type=None, arg_types=None, decl_type=None, header_dir=None, header_file=None):
+        """
+        @param return_type: callable return type
+        @type return_type: string or instance of L{type_t} derived class
+
+        @param arg_types: list of function argument types. arg_types can contain.
+        Any item within the list could be string or instance of L{type_t} derived
+        class. If you don't want some argument to participate in match you can
+        put None. For example:
+
+        C{ calldef_matcher_t( arg_types=[ 'int &', None ] ) }
+
+        will match all functions that takes 2 arguments, where the first one is
+        reference to integer and second any
+        @type arg_types: list
+        """
+        if None is decl_type:
+            decl_type = calldef.calldef_t
+        declaration_matcher_t.__init__( self
+                                        , name=name
+                                        , decl_type=decl_type
+                                        , header_dir=header_dir
+                                        , header_file=header_file )
+
+        self.return_type = return_type
+        self.arg_types = arg_types
+
+    def __call__( self, decl ):
+        if not super( calldef_matcher_t, self ).__call__( decl ):
+            return False
+        if not None is self.return_type \
+           and not self.__compare_types( self.return_type, decl.return_type ):
+            return False
+        if self.arg_types:
+            if isinstance( self.arg_types, (types.ListType, types.TupleType)):
+                if len(self.arg_types) != len( decl.arguments ):
+                    return False
+                for type_or_str, arg in zip( self.arg_types, decl.arguments ):
+                    if None == type_or_str:
+                        continue
+                    else:
+                        if not self.__compare_types( type_or_str, arg.type ):
+                            return False
+        return True
+
+    def __compare_types( self, type_or_str, type ):
+        assert type_or_str
+        if type is None:
+            return False
+        if isinstance( type_or_str, cpptypes.type_t ):
+            if type_or_str != type:
+                return False
+        else:
+            if type_or_str != type.decl_string:
+                return False
+        return True
+
+    def __str__( self ):
+        msg = [ super( calldef_matcher_t, self ).__str__() ]
+        if msg == [ 'any' ]:
+            msg = []
+        if not None is self.return_type:
+            msg.append( '(return type==%s)' % str(self.return_type) )
+        if self.arg_types:
+            for i in range( len( self.arg_types ) ):
+                if self.arg_types[i] is None:
+                    msg.append( '(arg %d type==any)' % i )
+                else:
+                    msg.append( '(arg %d type==%s)' % ( i, str( self.arg_types[i] ) ) )
+        if not msg:
+            msg.append( 'any' )
+        return ' and '.join( msg )
+
+
+class operator_matcher_t( calldef_matcher_t ):
+    """
+    Instance of this class will match operators by next criteria:
+        - L{calldef_matcher_t} criteria
+        - operator symbol: =, !=, (), [] and etc
+    """
+    def __init__( self, name=None, symbol=None, return_type=None, arg_types=None, decl_type=None, header_dir=None, header_file=None):
+        """
+        @param symbol: operator symbol
+        @type symbol: str
+        """
+        if None is decl_type:
+            decl_type = calldef.operator_t
+        calldef_matcher_t.__init__( self
+                                    , name=name
+                                    , return_type=return_type
+                                    , arg_types=arg_types
+                                    , decl_type=decl_type
+                                    , header_dir=header_dir
+                                    , header_file=header_file)
+        self.symbol = symbol
+
+    def __call__( self, decl ):
+        if not super( operator_matcher_t, self ).__call__( decl ):
+            return False
+        if not None is self.symbol:
+            if self.symbol != decl.symbol:
+                return False
+        return True
+
+    def __str__( self ):
+        msg = [ super( operator_matcher_t, self ).__str__() ]
+        if msg == [ 'any' ]:
+            msg = []
+        if not None is self.symbol:
+            msg.append( '(symbol==%s)' % str(self.symbol) )
+        if not msg:
+            msg.append( 'any' )
+        return ' and '.join( msg )
+
+class regex_matcher_t( matcher_base_t ):
+    """
+    Instance of this class will match declaration using regular expression.
+    User should supply a function that will extract from declaration desired
+    information as string. Later, this matcher will match that string using
+    user regular expression.
+    """
+    def __init__( self, regex, function=None ):
+        """
+        @param regex: regular expression
+        @type regex: string, an instance of this class will compile it for you
+
+        @param function: function that will be called to get an information from
+        declaration as string. As input this function takes 1 argument: reference
+        to declaration. Return value should be string. If function is None, then
+        the matcher will use declaration name.
+
+        """
+        matcher_base_t.__init__(self)
+        self.regex = re.compile( regex )
+        self.function = function
+        if None is self.function:
+            self.function = lambda decl: decl.name
+
+    def __call__( self, decl ):
+        text = self.function( decl )
+        return bool( self.regex.match( text ) )
+
+    def __str__( self ):
+        return '(regex=%s)' % self.regex
+
+class access_type_matcher_t( matcher_base_t ):
+    """
+    Instance of this class will match declaration by its access type: public,
+    private or protected. If declarations does not have access type, for example
+    free function, then False will be returned.
+    """
+
+    def __init__( self, access_type ):
+        """
+        @param access_type: declaration access type
+        @type access_type: L{ACCESS_TYPES} defines few consts for your convinience.
+        Any way you can pass public, private or protected as argument to this function
+        """
+        matcher_base_t.__init__( self )
+        self.access_type = access_type
+
+    def __call__( self, decl ):
+        if not isinstance( decl.parent, class_declaration.class_t ):
+            return False
+        return self.access_type == decl.parent.find_out_member_access_type( decl )
+
+    def __str__( self ):
+        return '(access type=%s)' % self.access_type
+
+class virtuality_type_matcher_t( matcher_base_t ):
+    """
+    Instance of this class will match declaration by its virtuality type: not virtual,
+    virtual or pure virtual. If declarations does not have virtuality type, for example
+    free function, then False will be returned.
+    """
+
+    def __init__( self, virtuality_type ):
+        """
+        @param access_type: declaration access type
+        @type access_type: L{VIRTUALITY_TYPES} defines few consts for your convinience.
+        """
+        matcher_base_t.__init__( self )
+        self.virtuality_type = virtuality_type
+
+    def __call__( self, decl ):
+        if not isinstance( decl.parent, class_declaration.class_t ):
+            return False
+        return self.virtuality_type == decl.virtuality
+
+    def __str__( self ):
+        return '(virtuality type=%s)' % self.virtuality_type
+
+
+class custom_matcher_t( matcher_base_t ):
+    """
+    Instance of this class will match declaration by user custom criteria.
+    """
+
+    def __init__( self, function ):
+        """
+        @param function: callable, that takes single argument - declaration instance
+                         should return True or False
+        """
+        matcher_base_t.__init__( self )
+        self.function = function
+
+    def __call__( self, decl ):
+        return bool( self.function( decl ) )
+
+    def __str__( self ):
+        return '(user criteria)'
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/mdecl_wrapper.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/mdecl_wrapper.py
new file mode 100644
index 0000000..3ccd897
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/mdecl_wrapper.py
@@ -0,0 +1,96 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines class L{mdecl_wrapper_t} that allows to work on set of declarations,
+as it was one declaration.
+
+The L{class<mdecl_wrapper_t>} allows user to not write "for" loops within the code.
+"""
+
+import os
+
+class call_redirector_t( object ):
+    """Internal class used to call some function of objects"""
+    def __init__( self, name, decls ):
+        """creates call_redirector_t instance.
+
+        @param name: name of method, to be called on every object in C{decls} list
+        @param decls: list of objects
+        """
+        object.__init__( self )
+        self.name = name
+        self.decls = decls
+
+    def __call__( self, *arguments, **keywords ):
+        """calls method C{self.name} on every object within C{self.decls} list"""
+        for d in self.decls:
+            callable_ = getattr(d, self.name)
+            callable_( *arguments, **keywords )
+
+class mdecl_wrapper_t( object ):
+    """Multiple declarations wrapper.
+
+    The main purpose of this class is to allow an user to work on many
+    declarations, as they were only one single declaration.
+
+    Example:
+    mb = module_builder_t( ... )
+    #lets say we want to exclude all member functions, that returns reference to int:
+    mb.member_functions( return_type='int &' ).exclude()
+
+    "exclude" function will be called on every function that match the criteria.
+    """
+
+    def __init__( self, decls ):
+        """@param decls: list of declarations to operate on.
+        @type decls: list of L{declaration wrappers<decl_wrapper_t>}
+        """
+        object.__init__( self )
+        self.__dict__['declarations'] = decls
+
+    def __nonzero__( self ):
+        return bool( self.declarations )
+
+    def __len__( self ):
+        """returns the number of declarations"""
+        return len( self.declarations )
+
+    def __getitem__( self, index ):
+        """provides access to declaration"""
+        return self.declarations[index]
+
+    def __iter__( self ):
+        return iter(self.declarations)
+
+    def __ensure_attribute( self, name ):
+        invalid_decls = filter( lambda d: not hasattr( d, name ), self.declarations )
+        sep = os.linesep + '    '
+        if invalid_decls:
+            raise RuntimeError( "Next declarations don't have '%s' attribute: %s" 
+                                % ( name, sep.join( map( str, invalid_decls ) ) ) )
+
+    def __setattr__( self, name, value ):
+        """Updates the value of attribute on all declarations.
+        @param name: name of attribute
+        @param value: new value of attribute
+        """
+        self.__ensure_attribute( name )
+        for d in self.declarations:
+            setattr( d, name, value )
+
+    def __getattr__( self, name ):
+        """@param name: name of method
+        """
+        return call_redirector_t( name, self.declarations )
+
+    def __contains__( self, item ):
+        return item in self.declarations
+
+    def to_list(self):
+        l = []
+        for d in self.declarations:
+            l.append( d )
+        return l
\ No newline at end of file
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/namespace.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/namespace.py
new file mode 100644
index 0000000..ae7178e
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/namespace.py
@@ -0,0 +1,144 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""defines class, that describes C++ namespace declaration"""
+
+import declaration
+import scopedef
+import algorithm
+
+class namespace_t( scopedef.scopedef_t ):
+    """
+    describes C++ namespace
+    """
+
+    def __init__( self, name='', declarations=None ):
+        """creates class that describes C++ namespace declaration"""
+        scopedef.scopedef_t.__init__( self, name )
+        if not declarations:
+            declarations = []
+        self._declarations = declarations # list of all declarations belongs to this namespace
+
+    def __str__(self):
+        name = algorithm.full_name(self)
+        if name!="::" and name[:2]=="::":
+            name = name[2:]
+        return "%s [namespace]"%name
+
+    def _get__cmp__scope_items(self):
+        """implementation details"""
+        return [ self._sorted_list( self.declarations ) ]
+
+    def _get_declarations_impl(self):
+        return self._declarations
+    def _set_declarations(self, declarations):
+        self._declarations = declarations
+    declarations = property( scopedef.scopedef_t._get_declarations
+                             , _set_declarations
+                             , doc="list of all declarations, defined in the namespace")
+
+    def take_parenting( self, inst ):
+        """Takes parenting from inst and transfers it to self"""
+        if self is inst:
+            return
+        for decl in inst.declarations:
+            decl.parent = self
+            self.declarations.append( decl )
+        inst.declarations = []
+
+    def adopt_declaration( self, decl ):
+        self.declarations.append( decl )
+        decl.parent = self 
+        decl.cache.reset()
+        
+    def remove_declaration( self, decl ):
+        """
+        removes decl from  members list
+
+        @param decl: declaration to be removed
+        @type decl: L{declaration_t}
+        """
+        del self.declarations[ self.declarations.index( decl ) ]
+        decl.cache.reset()
+        #add more comment about this.
+        #if not keep_parent:
+        #    decl.parent=None
+
+    def namespace( self, name=None, function=None, recursive=None ):
+        """returns reference to namespace declaration, that is matched defined criterias"""
+        return self._find_single( scopedef.scopedef_t._impl_matchers[ namespace_t.namespace ]
+                                  , name=name
+                                  , function=function
+                                  , recursive=recursive )
+    ns = namespace
+    
+    def namespaces( self, name=None, function=None, recursive=None, allow_empty=None ):
+        """returns a set of namespace declarations, that are matched defined criterias"""
+        return self._find_multiple( scopedef.scopedef_t._impl_matchers[ namespace_t.namespace ]
+                                    , name=name
+                                    , function=function
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+    nss = namespaces
+    
+    def free_function( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to free function declaration, that is matched defined criterias"""
+        return self._find_single( scopedef.scopedef_t._impl_matchers[ namespace_t.free_function ]
+                                  , name=name
+                                  , function=function
+                                  , decl_type=self._impl_decl_types[ namespace_t.free_function ]
+                                  , return_type=return_type
+                                  , arg_types=arg_types
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive )
+    free_fun = free_function
+    
+    def free_functions( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of free function declarations, that are matched defined criterias"""
+        return self._find_multiple( scopedef.scopedef_t._impl_matchers[ namespace_t.free_function ]
+                                    , name=name
+                                    , function=function
+                                    , decl_type=self._impl_decl_types[ namespace_t.free_function ]
+                                    , return_type=return_type
+                                    , arg_types=arg_types
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+    free_funs = free_functions
+
+    def free_operator( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to free operator declaration, that is matched defined criterias"""
+        return self._find_single( scopedef.scopedef_t._impl_matchers[ namespace_t.free_operator ]
+                                  , name=self._build_operator_name( name, function, symbol )
+                                  , symbol=symbol
+                                  , function=self._build_operator_function( name, function )
+                                  , decl_type=self._impl_decl_types[ namespace_t.free_operator ]
+                                  , return_type=return_type
+                                  , arg_types=arg_types
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive )
+
+    def free_operators( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of free operator declarations, that are matched defined criterias"""
+        return self._find_multiple( scopedef.scopedef_t._impl_matchers[ namespace_t.free_operator ]
+                                    , name=self._build_operator_name( name, function, symbol )
+                                    , symbol=symbol
+                                    , function=self._build_operator_function( name, function )
+                                    , decl_type=self._impl_decl_types[ namespace_t.free_operator ]
+                                    , return_type=return_type
+                                    , arg_types=arg_types
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+
+    def i_depend_on_them( self, recursive=True ):
+        answer = []
+        if recursive:
+            map( lambda decl: answer.extend( decl.i_depend_on_them() ), self.declarations )
+        return answer
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/pattern_parser.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/pattern_parser.py
new file mode 100644
index 0000000..7b17302
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/pattern_parser.py
@@ -0,0 +1,140 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""implementation details"""
+
+import types
+
+class parser_t( object ):
+    """implementation details"""
+    def __init__( self
+                  , pattern_char_begin
+                  , pattern_char_end
+                  , pattern_char_separator ):
+        self.__begin = pattern_char_begin
+        self.__end = pattern_char_end
+        self.__separator = pattern_char_separator
+        #right now parser does not take into account next qualifiers, but it will
+        self.__text_qualifier = '"'
+        self.__char_qualifier = "'"
+        self.__escape = '\\'
+
+    def has_pattern( self, decl_string ):
+        """implementation details"""
+        last_part = decl_string.split( '::' )[-1]
+        return -1 != decl_string.find( self.__begin ) and -1 != last_part.find( self.__end )
+
+    def name( self, decl_string ):
+        """implementation details"""
+        assert isinstance( decl_string, types.StringTypes )
+        if not self.has_pattern( decl_string ):
+            return decl_string
+        args_begin = decl_string.find( self.__begin )
+        return decl_string[0: args_begin].strip()
+
+    def __find_args_separator( self, decl_string, start_pos ):
+        """implementation details"""
+        bracket_depth = 0
+        for index, ch in enumerate( decl_string[start_pos:] ):
+            if ch not in ( self.__begin, self.__end, self.__separator ):
+                continue #I am interested only in < and >
+            elif self.__separator == ch:
+                if not bracket_depth:
+                    return index + start_pos
+            elif self.__begin == ch:
+                bracket_depth += 1
+            elif not bracket_depth:
+                return index + start_pos
+            else:
+                bracket_depth -= 1
+        return -1
+
+    def args( self, decl_string ):
+        """implementation details"""
+        args_begin = decl_string.find( self.__begin )
+        args_end = decl_string.rfind( self.__end )
+        if -1 in ( args_begin, args_end ) or args_begin == args_end:
+            raise RuntimeError( "%s doesn't valid template instantiation string" % decl_string )
+
+        args_only = decl_string[args_begin + 1: args_end ]
+        args = []
+        previous_found, found = 0, 0
+        while True:
+            found = self.__find_args_separator( args_only, previous_found)
+            if -1 == found:
+                args.append( args_only[ previous_found : ] )
+                break
+            #elif decl_string[ found ] == self.__end:
+            #    print args
+            #    raise RuntimeError( "unmatched '%s' token has been found." % self.__end )
+            else:
+                args.append( args_only[ previous_found : found ] )
+            previous_found = found + 1 #skip found sep
+        return [ arg.strip() for arg in args ]
+
+    NOT_FOUND = ( -1, -1 )
+    """implementation details"""
+
+    def find_args(self, text, start=None ):
+        """implementation details"""
+        if start==None:
+            start = 0
+        first_occurance = text.find( self.__begin, start )
+        if first_occurance == -1:
+            return self.NOT_FOUND
+        previous_found, found = first_occurance + 1, 0
+        while True:
+            found = self.__find_args_separator( text, previous_found)
+            if -1 == found:
+                return self.NOT_FOUND
+            elif text[ found ] == self.__end:
+                return ( first_occurance, found )
+            else:
+                previous_found = found + 1 #skip found sep
+
+    def split( self, decl_string ):
+        """implementation details"""
+        assert self.has_pattern( decl_string )
+        return self.name( decl_string ), self.args( decl_string )
+
+    def split_recursive( self, decl_string ):
+        """implementation details"""
+        assert self.has_pattern( decl_string )
+        answer = []
+        to_go = [ decl_string ]
+        while to_go:
+            name, args = self.split( to_go.pop() )
+            answer.append( ( name, args ) )
+            for arg in args:
+                if self.has_pattern( arg ):
+                    to_go.append( arg )
+        return answer
+
+    def join( self, name, args, arg_separator=None ):
+        """implementation details"""
+        if None is arg_separator:
+            arg_separator = ', '
+        args = filter( None, args)
+        args_str = ''
+        if not args:
+            args_str = ' '
+        elif 1 == len( args ):
+            args_str = ' ' + args[0] + ' '
+        else:
+            args_str = ' ' + arg_separator.join( args ) + ' '
+
+        return ''.join( [ name, self.__begin, args_str, self.__end ] )
+
+    def normalize( self, decl_string, arg_separator=None ):
+        """implementation details"""
+        if not self.has_pattern( decl_string ):
+            return decl_string
+        name, args = self.split( decl_string )
+        for i, arg in enumerate( args ):
+            args[i] = self.normalize( arg )
+        return self.join( name, args, arg_separator )
+            
+
+        
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/scopedef.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/scopedef.py
new file mode 100644
index 0000000..a23571e
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/scopedef.py
@@ -0,0 +1,655 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines base class for L{namespace_t} and L{class_t} classes
+"""
+
+import time
+import algorithm
+import filtering
+import templates
+import declaration
+import mdecl_wrapper
+from pygccxml import utils
+import matcher as matcher_module
+
+class scopedef_t( declaration.declaration_t ):
+    """Base class for L{namespace_t} and L{class_t} classes.
+
+    This is the base class for all declaration classes that may have
+    children nodes. The children can be accessed via the C{declarations}
+    property.
+
+    Also this class provides "get/select/find" interface. Using this class you
+    can get instance or instances of internal declaration(s).
+
+    You can find declaration(s) using next criteria:
+        1. name - declaration name, could be full qualified name
+        2. header_dir - directory, to which belongs file, that the declaration was declarated in.
+           header_dir should be absolute path.
+        3. header_file - file that the declaration was declarated in.
+        4. function - user ( your ) custom criteria. The interesting thing is that
+           this function will be joined with other arguments ( criteria ).
+        5. recursive - the search declaration range, if True will be search in
+          internal declarations too.
+
+    Every "select" API you can invoke and pass as first argument at declaration
+    name or function. This class will find out correctly what argument represents.
+
+    Example::
+        ns - referrers to global namespace
+        ns.member_function( "do_something ) - will return reference to member
+        function named "do_something". If there is no such function exception
+        will be raised. If there is more then one function exception will be
+        raised too.
+
+    Example 2::
+        ns - referers to global namespace
+        do_smths = ns.member_functions( "do_something ) - will return instance
+        of L{mdecl_wrapper_t} object. This object allows you few things:
+
+        1. To iterate on selected declarations
+        2. To set some property to desired value using one line of code only:
+           do_smths.call_policies = x
+        3. To call some function on every instance using one line of code:
+           do_smths.exclude()
+
+        Pay attention: you can not use "get" functions or properties.
+    """
+
+    RECURSIVE_DEFAULT = True
+    ALLOW_EMPTY_MDECL_WRAPPER = False
+
+    declaration_not_found_t = matcher_module.matcher.declaration_not_found_t
+    multiple_declarations_found_t = matcher_module.matcher.multiple_declarations_found_t
+
+    _impl_matchers = {} #this class variable is used to prevent recursive imports
+    _impl_decl_types = {} #this class variable is used to prevent recursive imports
+    _impl_all_decl_types = [] #this class variable is used to prevent recursive imports
+
+    def __init__( self, name=''):
+        declaration.declaration_t.__init__( self, name )
+
+        self._optimized = False
+        self._type2decls = {}
+        self._type2name2decls = {}
+        self._type2decls_nr = {}
+        self._type2name2decls_nr = {}
+        self._all_decls = None
+        self._all_decls_not_recursive = None
+
+    def _get_logger( self ):
+        return utils.loggers.queries_engine
+    _logger = property( _get_logger, doc="reference to C{queries_engine} logger" )
+
+    def _get__cmp__scope_items(self):
+        """implementation details"""
+        raise NotImplementedError()
+
+    def _get__cmp__items(self):
+        """implementation details"""
+        items = []
+        if self._optimized:
+            #in this case we don't need to build class internal declarations list
+            items.append( self._sorted_list( self._all_decls_not_recursive ) )
+        else:
+            items.append( self._sorted_list( self.declarations ) )
+        items.extend( self._get__cmp__scope_items() )
+        return items
+
+    def __eq__(self, other):
+        if not declaration.declaration_t.__eq__( self, other ):
+            return False
+        return self._sorted_list( self.declarations[:] ) \
+               == other._sorted_list( other.declarations[:] )
+        #self_decls = self._all_decls_not_recursive
+        #if not self._optimized:
+            #self_decls = self._sorted_list( self.declarations[:] )
+        #other_decls = other._all_decls_not_recursive[:]
+        #if not other._optimized:
+            #other_decls = other._sorted_list( other.declarations[:] )
+        #else:
+            #return  self_decls == other_decls
+
+    def _get_declarations_impl(self):
+        raise NotImplementedError()
+
+    def _get_declarations(self):
+        if True == self._optimized:
+            return self._all_decls_not_recursive
+        else:
+            return self._get_declarations_impl()
+    declarations = property( _get_declarations, doc="list of children L{declarations<declaration_t>}" )
+
+    def remove_declaration( self, decl ):
+        raise NotImplementedError()
+
+    def __decl_types( self, decl ):
+        """implementation details"""
+        types = []
+        bases = list( decl.__class__.__bases__ )
+        visited = set()
+        if 'pygccxml' in decl.__class__.__module__:
+            types.append( decl.__class__ )
+        while bases:
+            base = bases.pop()
+            if base is declaration.declaration_t:
+                continue
+            if base in visited:
+                continue
+            if 'pygccxml' not in base.__module__:
+                continue
+            types.append( base )
+            bases.extend( base.__bases__ )
+        return types
+
+    def clear_optimizer(self):
+        """Cleans query optimizer state"""
+        self._optimized = False
+        self._type2decls = {}
+        self._type2name2decls = {}
+        self._type2decls_nr = {}
+        self._type2name2decls_nr = {}
+        self._all_decls = None
+        self._all_decls_not_recursive = None
+
+        map( lambda decl: decl.clear_optimizer()
+             , filter( lambda decl: isinstance( decl, scopedef_t )
+                       ,  self.declarations ) )
+
+    def init_optimizer(self):
+        """Initializes query optimizer state.
+        There are 4 internals hash tables:
+            1. from type to declarations
+            2. from type to declarations for non-recursive queries
+            3. from type to name to declarations
+            4. from type to name to declarations for non-recursive queries
+
+        Almost every query includes declaration type information. Also very
+        common query is to search some declaration(s) by name or full name.
+        Those hashtables allows to search declaration very quick.
+        """
+        if self.name == '::':
+            self._logger.debug( "preparing data structures for query optimizer - started" )
+        start_time = time.clock()
+
+        self.clear_optimizer()
+
+        for dtype in scopedef_t._impl_all_decl_types:
+            self._type2decls[ dtype ] = []
+            self._type2decls_nr[ dtype ] = []
+            self._type2name2decls[ dtype ] = {}
+            self._type2name2decls_nr[ dtype ] = {}
+
+        self._all_decls_not_recursive = self.declarations
+        self._all_decls = algorithm.make_flatten( self._all_decls_not_recursive )
+        for decl in self._all_decls:
+            types = self.__decl_types( decl )
+            for type_ in types:
+                self._type2decls[ type_ ].append( decl )
+                name2decls = self._type2name2decls[ type_ ]
+                if not name2decls.has_key( decl.name ):
+                    name2decls[ decl.name ] = []
+                name2decls[ decl.name ].append( decl )
+                if self is decl.parent:
+                    self._type2decls_nr[ type_ ].append( decl )
+                    name2decls_nr = self._type2name2decls_nr[ type_ ]
+                    if not name2decls_nr.has_key( decl.name ):
+                        name2decls_nr[ decl.name ] = []
+                    name2decls_nr[ decl.name ].append( decl )
+
+        map( lambda decl: decl.init_optimizer()
+             , filter( lambda decl: isinstance( decl, scopedef_t )
+                       ,  self._all_decls_not_recursive ) )
+        if self.name == '::':
+            self._logger.debug( "preparing data structures for query optimizer - done( %f seconds ). "
+                                % ( time.clock() - start_time ) )
+        self._optimized = True
+
+    def _build_operator_function( self, name, function ):
+        if callable( name ):
+            return name
+        else:
+            return function
+
+    def _build_operator_name( self, name, function, symbol ):
+        """implementation details"""
+        def add_operator( sym ):
+            if 'new' in sym or 'delete' in sym:
+                return 'operator ' + sym
+            else:
+                return 'operator'+ sym
+        if callable( name ) and None is function:
+            name = None
+        if name:
+            if not 'operator' in name:
+               name = add_operator( name )
+            return name
+        elif symbol:
+            return add_operator( symbol )
+        return name #both name and symbol are None
+
+    def _on_rename( self ):
+        for decl in self.decls(allow_empty=True):
+            decl.cache.reset_name_based()
+        #I am not sure whether to introduce this or not?
+        #It could be very time consuming operation + it changes optimize query
+        #data structures.
+        #if self.parent:
+        #    if self.parent._optimized:
+        #        self.parent.init_optimizer()
+
+    def __normalize_args( self, **keywds ):
+        """implementation details"""
+        if callable( keywds['name'] ) and None is keywds['function']:
+            keywds['function'] = keywds['name']
+            keywds['name'] = None
+        return keywds
+
+    def __findout_recursive( self, **keywds ):
+        """implementation details"""
+        if None is keywds[ 'recursive' ]:
+            return self.RECURSIVE_DEFAULT
+        else:
+            return keywds[ 'recursive' ]
+
+    def __findout_allow_empty( self, **keywds ):
+        """implementation details"""
+        if None is keywds[ 'allow_empty' ]:
+            return self.ALLOW_EMPTY_MDECL_WRAPPER
+        else:
+            return keywds[ 'allow_empty' ]
+
+    def __findout_decl_type( self, match_class, **keywds ):
+        """implementation details"""
+        if keywds.has_key( 'decl_type' ):
+            return keywds['decl_type']
+
+        matcher_args = keywds.copy()
+        del matcher_args['function']
+        del matcher_args['recursive']
+        if matcher_args.has_key('allow_empty'):
+            del matcher_args['allow_empty']
+
+        matcher = match_class( **matcher_args )
+        if matcher.decl_type:
+            return matcher.decl_type
+        return None
+
+    def __create_matcher( self, match_class, **keywds ):
+        """implementation details"""
+        matcher_args = keywds.copy()
+        del matcher_args['function']
+        del matcher_args['recursive']
+        if matcher_args.has_key('allow_empty'):
+            del matcher_args['allow_empty']
+
+        matcher = match_class( **matcher_args )
+        if keywds['function']:
+            self._logger.debug( 'running query: %s and <user defined function>' % str( matcher ) )
+            return lambda decl: matcher( decl ) and keywds['function'](decl)
+        else:
+            self._logger.debug( 'running query: %s' % str( matcher ) )
+            return matcher
+
+    def __findout_range( self, name, decl_type, recursive ):
+        """implementation details"""
+        if not self._optimized:
+            self._logger.debug( 'running non optimized query - optimization has not been done' )
+            decls = self.declarations
+            if recursive:
+                decls = algorithm.make_flatten( self.declarations )
+            if decl_type:
+                decls = filter( lambda d: isinstance( d, decl_type ), decls )
+            return decls
+
+        if name and templates.is_instantiation( name ):
+            #templates has tricky mode to compare them, so lets check the whole
+            #range
+            name = None
+        
+        if name and decl_type:
+            matcher = scopedef_t._impl_matchers[ scopedef_t.decl ]( name=name )
+            if matcher.is_full_name():
+                name = matcher.decl_name_only
+            if recursive:
+                self._logger.debug( 'query has been optimized on type and name' )
+                if self._type2name2decls[decl_type].has_key( name ):
+                    return self._type2name2decls[decl_type][name]
+                else:
+                    return []
+            else:
+                self._logger.debug( 'non recursive query has been optimized on type and name' )
+                if self._type2name2decls_nr[decl_type].has_key( name ):
+                    return self._type2name2decls_nr[decl_type][name]
+                else:
+                    return []
+        elif decl_type:
+            if recursive:
+                self._logger.debug( 'query has been optimized on type' )
+                return self._type2decls[ decl_type ]
+            else:
+                self._logger.debug( 'non recursive query has been optimized on type' )
+                return self._type2decls_nr[ decl_type ]
+        else:
+            if recursive:
+                self._logger.debug( 'query has not been optimized ( hint: query does not contain type and/or name )' )
+                return self._all_decls
+            else:
+                self._logger.debug( 'non recursive query has not been optimized ( hint: query does not contain type and/or name )' )
+                return self._all_decls_not_recursive
+
+    def _find_single( self, match_class, **keywds ):
+        """implementation details"""
+        self._logger.debug( 'find single query execution - started' )
+        start_time = time.clock()
+        norm_keywds = self.__normalize_args( **keywds )
+        matcher = self.__create_matcher( match_class, **norm_keywds )
+        dtype = self.__findout_decl_type( match_class, **norm_keywds )
+        recursive_ = self.__findout_recursive( **norm_keywds )
+        decls = self.__findout_range( norm_keywds['name'], dtype, recursive_ )
+        found = matcher_module.matcher.get_single( matcher, decls, False )
+        self._logger.debug( 'find single query execution - done( %f seconds )' % ( time.clock() - start_time ) )
+        return found
+
+    def _find_multiple( self, match_class, **keywds ):
+        """implementation details"""
+        self._logger.debug( 'find all query execution - started' )
+        start_time = time.clock()
+        norm_keywds = self.__normalize_args( **keywds )
+        matcher = self.__create_matcher( match_class, **norm_keywds )
+        dtype = self.__findout_decl_type( match_class, **norm_keywds )
+        recursive_ = self.__findout_recursive( **norm_keywds )
+        allow_empty = self.__findout_allow_empty( **norm_keywds )
+        decls = self.__findout_range( norm_keywds['name'], dtype, recursive_ )
+        found = matcher_module.matcher.find( matcher, decls, False )
+        mfound = mdecl_wrapper.mdecl_wrapper_t( found )
+        self._logger.debug( '%d declaration(s) that match query' % len(mfound) )
+        self._logger.debug( 'find single query execution - done( %f seconds )'
+                     % ( time.clock() - start_time ) )
+        if not mfound and not allow_empty:
+            raise RuntimeError( "Multi declaration query returned 0 declarations." )
+        return mfound
+
+    def decl( self, name=None, function=None, decl_type=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to declaration, that is matched defined criterias"""
+        return self._find_single( self._impl_matchers[ scopedef_t.decl ]
+                                  , name=name
+                                  , function=function
+                                  , decl_type=decl_type
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive)
+
+    def decls( self, name=None, function=None, decl_type=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of declarations, that are matched defined criterias"""
+        return self._find_multiple( self._impl_matchers[ scopedef_t.decl ]
+                                    , name=name
+                                    , function=function
+                                    , decl_type=decl_type
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+
+    def class_( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to class declaration, that is matched defined criterias"""
+        return self._find_single( self._impl_matchers[ scopedef_t.class_ ]
+                                  , name=name
+                                  , function=function
+                                  , decl_type=self._impl_decl_types[ scopedef_t.class_ ]
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive)
+
+    def classes( self, name=None, function=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of class declarations, that are matched defined criterias"""
+        return self._find_multiple( self._impl_matchers[ scopedef_t.class_ ]
+                                    , name=name
+                                    , function=function
+                                    , decl_type=self._impl_decl_types[ scopedef_t.class_ ]
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+
+    def variable( self, name=None, function=None, type=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to variable declaration, that is matched defined criterias"""
+        return self._find_single( self._impl_matchers[ scopedef_t.variable ]
+                                  , name=name
+                                  , function=function
+                                  , type=type
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive)
+    var = variable #small alias
+
+    def variables( self, name=None, function=None, type=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of variable declarations, that are matched defined criterias"""
+        return self._find_multiple( self._impl_matchers[ scopedef_t.variable ]
+                                    , name=name
+                                    , function=function
+                                    , type=type
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+    vars = variables #small alias
+
+    def calldef( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to "calldef" declaration, that is matched defined criterias"""
+        return self._find_single( self._impl_matchers[ scopedef_t.calldef ]
+                                  , name=name
+                                  , function=function
+                                  , decl_type=self._impl_decl_types[ scopedef_t.calldef ]
+                                  , return_type=return_type
+                                  , arg_types=arg_types
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive )
+
+    def calldefs( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of calldef declarations, that are matched defined criterias"""
+        return self._find_multiple( self._impl_matchers[ scopedef_t.calldef ]
+                                    , name=name
+                                    , function=function
+                                    , decl_type=self._impl_decl_types[ scopedef_t.calldef ]
+                                    , return_type=return_type
+                                    , arg_types=arg_types
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+
+    def operator( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to operator declaration, that is matched defined criterias"""
+        return self._find_single( self._impl_matchers[ scopedef_t.operator ]
+                                  , name=self._build_operator_name( name, function, symbol )
+                                  , symbol=symbol
+                                  , function=self._build_operator_function( name, function )
+                                  , decl_type=self._impl_decl_types[ scopedef_t.operator ]
+                                  , return_type=return_type
+                                  , arg_types=arg_types
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive )
+
+    def operators( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of operator declarations, that are matched defined criterias"""
+        return self._find_multiple( self._impl_matchers[ scopedef_t.operator ]
+                                    , name=self._build_operator_name( name, function, symbol )
+                                    , symbol=symbol
+                                    , function=self._build_operator_function( name, function )
+                                    , decl_type=self._impl_decl_types[ scopedef_t.operator ]
+                                    , return_type=return_type
+                                    , arg_types=arg_types
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+
+    def member_function( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to member declaration, that is matched defined criterias"""
+        return self._find_single( self._impl_matchers[ scopedef_t.member_function ]
+                                  , name=name
+                                  , function=function
+                                  , decl_type=self._impl_decl_types[ scopedef_t.member_function ]
+                                  , return_type=return_type
+                                  , arg_types=arg_types
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive )
+    mem_fun = member_function
+
+    def member_functions( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of member function declarations, that are matched defined criterias"""
+        return self._find_multiple( self._impl_matchers[ scopedef_t.member_function ]
+                                    , name=name
+                                    , function=function
+                                    , decl_type=self._impl_decl_types[ scopedef_t.member_function ]
+                                    , return_type=return_type
+                                    , arg_types=arg_types
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+    mem_funs = member_functions
+
+    def constructor( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to constructor declaration, that is matched defined criterias"""
+        return self._find_single( self._impl_matchers[ scopedef_t.constructor ]
+                                  , name=name
+                                  , function=function
+                                  , decl_type=self._impl_decl_types[ scopedef_t.constructor ]
+                                  , return_type=return_type
+                                  , arg_types=arg_types
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive )
+
+    def constructors( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of constructor declarations, that are matched defined criterias"""
+        return self._find_multiple( self._impl_matchers[ scopedef_t.constructor ]
+                                    , name=name
+                                    , function=function
+                                    , decl_type=self._impl_decl_types[ scopedef_t.constructor ]
+                                    , return_type=return_type
+                                    , arg_types=arg_types
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+
+    def member_operator( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to member operator declaration, that is matched defined criterias"""
+        return self._find_single( self._impl_matchers[ scopedef_t.member_operator ]
+                                  , name=self._build_operator_name( name, function, symbol )
+                                  , symbol=symbol
+                                  , function=self._build_operator_function( name, function )
+                                  , decl_type=self._impl_decl_types[ scopedef_t.member_operator ]
+                                  , return_type=return_type
+                                  , arg_types=arg_types
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive )
+    mem_oper = member_operator
+    def member_operators( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of member operator declarations, that are matched defined criterias"""
+        return self._find_multiple( self._impl_matchers[ scopedef_t.member_operator ]
+                                    , name=self._build_operator_name( name, function, symbol )
+                                    , symbol=symbol
+                                    , function=self._build_operator_function( name, function )
+                                    , decl_type=self._impl_decl_types[ scopedef_t.member_operator ]
+                                    , return_type=return_type
+                                    , arg_types=arg_types
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+    mem_opers = member_operators
+
+    def casting_operator( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to casting operator declaration, that is matched defined criterias"""
+        return self._find_single( self._impl_matchers[ scopedef_t.casting_operator ]
+                                  , name=name
+                                  , function=function
+                                  , decl_type=self._impl_decl_types[ scopedef_t.casting_operator ]
+                                  , return_type=return_type
+                                  , arg_types=arg_types
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive )
+
+    def casting_operators( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of casting operator declarations, that are matched defined criterias"""
+        return self._find_multiple( self._impl_matchers[ scopedef_t.casting_operator ]
+                                    , name=name
+                                    , function=function
+                                    , decl_type=self._impl_decl_types[ scopedef_t.casting_operator ]
+                                    , return_type=return_type
+                                    , arg_types=arg_types
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+
+    def enumeration( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to enumeration declaration, that is matched defined criterias"""
+        return self._find_single( self._impl_matchers[ scopedef_t.enumeration ]
+                                  , name=name
+                                  , function=function
+                                  , decl_type=self._impl_decl_types[ scopedef_t.enumeration ]
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive)
+
+    enum = enumeration
+    """adding small aliase to enumeration method"""
+
+    def enumerations( self, name=None, function=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of enumeration declarations, that are matched defined criterias"""
+        return self._find_multiple( self._impl_matchers[ scopedef_t.enumeration ]
+                                    , name=name
+                                    , function=function
+                                    , decl_type=self._impl_decl_types[ scopedef_t.enumeration ]
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+    #adding small aliase
+    enums = enumerations
+
+    def typedef( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ):
+        """returns reference to typedef declaration, that is matched defined criterias"""
+        return self._find_single( self._impl_matchers[ scopedef_t.typedef ]
+                                  , name=name
+                                  , function=function
+                                  , decl_type=self._impl_decl_types[ scopedef_t.typedef ]
+                                  , header_dir=header_dir
+                                  , header_file=header_file
+                                  , recursive=recursive)
+
+    def typedefs( self, name=None, function=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
+        """returns a set of typedef declarations, that are matched defined criterias"""
+        return self._find_multiple( self._impl_matchers[ scopedef_t.typedef ]
+                                    , name=name
+                                    , function=function
+                                    , decl_type=self._impl_decl_types[ scopedef_t.typedef ]
+                                    , header_dir=header_dir
+                                    , header_file=header_file
+                                    , recursive=recursive
+                                    , allow_empty=allow_empty)
+
+    def __getitem__(self, name_or_function):
+        """ Allow simple name based find of decls.  Internally just calls decls() method.
+            @param name_or_function  Name of decl to lookup or finder function.
+        """
+        return self.decls(name_or_function)
+
+
+
+
+
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/templates.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/templates.py
new file mode 100644
index 0000000..e2c10df
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/templates.py
@@ -0,0 +1,76 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+""" 
+template instantiation parser
+
+This module implements all functionality necessary to parse C++ template
+instantiations.In other words this module is able to extract next information from 
+the string like this C{ std::vector<int> }.
+    - name ( std::vector )
+    - list of arguments ( int )
+
+This module also defines few convenience function like L{split} and L{join}.
+"""
+
+import pattern_parser
+
+__THE_PARSER = pattern_parser.parser_t( '<', '>', ',' )
+
+def is_instantiation( decl_string ):
+    """
+    returns True if decl_string is template instantiation and False otherwise
+    
+    @param decl_string: string that should be checked for pattern presence
+    @type decl_string: str
+    
+    @return: bool
+    """
+    global __THE_PARSER
+    return __THE_PARSER.has_pattern( decl_string )
+
+def name( decl_string ):
+    """
+    returns name of instantiated template
+    
+    @type decl_string: str
+    @return: str
+    """
+    global __THE_PARSER
+    return __THE_PARSER.name( decl_string )
+
+def args( decl_string ):
+    """
+    returns list of template arguments
+    
+    @type decl_string: str
+    @return: [str]
+    """
+    global __THE_PARSER
+    return __THE_PARSER.args( decl_string )
+        
+def split( decl_string ):
+    """returns (name, [arguments] )"""
+    global __THE_PARSER
+    return __THE_PARSER.split( decl_string )
+    
+def split_recursive( decl_string ):
+    """returns [(name, [arguments])]"""
+    global __THE_PARSER
+    return __THE_PARSER.split_recursive( decl_string )
+
+def join( name, args ):
+    """returns name< argument_1, argument_2, ..., argument_n >"""
+    global __THE_PARSER
+    return __THE_PARSER.join( name, args )
+
+def normalize( decl_string ):
+    """returns decl_string, which contains "normalized" spaces
+    
+    this functionality allows to implement comparison of 2 different string
+    which are actually same: x::y< z > and x::y<z>
+    """
+    global __THE_PARSER
+    return __THE_PARSER.normalize( decl_string )
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/type_traits.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/type_traits.py
new file mode 100644
index 0000000..98f5799
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/type_traits.py
@@ -0,0 +1,1101 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines few algorithms, that deals with different properties of C++ types
+
+Do you aware of boost::type_traits library? pygccxml has functionality similar to
+it. Using functions defined in this module you can
+    - find out some properties of the type
+    - modify type
+
+Those functions are very valuable for code generation. Almost all functions
+within this module works on L{type_t} class hierarchy and\\or L{class_t}.
+"""
+
+import os
+import types
+import matchers
+import typedef
+import calldef
+import cpptypes
+import variable
+import algorithm
+import namespace
+import templates
+import enumeration
+import class_declaration
+from pygccxml import utils
+import types as build_in_types
+
+def __remove_alias(type_):
+    """implementation details"""
+    if isinstance( type_, typedef.typedef_t ):
+        return __remove_alias( type_.type )
+    if isinstance( type_, cpptypes.declarated_t ) and isinstance( type_.declaration, typedef.typedef_t ):
+        return __remove_alias( type_.declaration.type )
+    if isinstance( type_, cpptypes.compound_t ):
+        type_.base = __remove_alias( type_.base )
+        return type_
+    return type_
+
+def remove_alias(type_):
+    """returns type without typedefs"""
+    type_ref = None
+    if isinstance( type_, cpptypes.type_t ):
+        type_ref = type_
+    elif isinstance( type_, typedef.typedef_t ):
+        type_ref = type_.type
+    else:
+        pass #not a valid input, just return it
+    if not type_ref:
+        return type_
+    if type_ref.cache.remove_alias:
+        return type_ref.cache.remove_alias
+    no_alias = __remove_alias( type_ref.clone() )
+    type_ref.cache.remove_alias = no_alias
+    return no_alias
+
+def create_cv_types( base ):
+    """implementation details"""
+    return [ base
+             , cpptypes.const_t( base )
+             , cpptypes.volatile_t( base )
+             , cpptypes.volatile_t( cpptypes.const_t( base ) ) ]
+
+def decompose_type(tp):
+    """implementation details"""
+    #implementation of this function is important
+    if isinstance( tp, cpptypes.compound_t ):
+        return [tp] + decompose_type( tp.base )
+    elif isinstance( tp, typedef.typedef_t ):
+        return decompose_type( tp.type )
+    elif isinstance( tp, cpptypes.declarated_t ) and isinstance( tp.declaration, typedef.typedef_t ):
+        return decompose_type( tp.declaration.type )
+    else:
+        return [tp]
+
+def decompose_class(type):
+    """implementation details"""
+    types = decompose_type( type )
+    return [ tp.__class__ for tp in types ]
+
+def base_type(type):
+    """returns base type.
+
+    For C{const int} will return C{int}
+    """
+    types = decompose_type( type )
+    return types[-1]
+
+def does_match_definition(given, main, secondary ):
+    """implementation details"""
+    assert isinstance( secondary, build_in_types.TupleType )
+    assert 2 == len( secondary ) #general solution could be provided
+    types = decompose_type( given )
+    if isinstance( types[0], main ):
+        return True
+    elif 2 <= len( types ) and \
+       ( ( isinstance( types[0], main ) and isinstance( types[1], secondary ) ) \
+         or ( isinstance( types[1], main ) and isinstance( types[0], secondary ) ) ):
+        return True
+    elif 3 <= len( types ):
+        classes = set( [tp.__class__ for tp in types[:3]] )
+        desired = set( [main] + list( secondary ) )
+        return classes == desired
+    else:
+        return False
+
+def is_bool( type_ ):
+    """returns True, if type represents C{bool}, False otherwise"""
+    return remove_alias( type_ ) in create_cv_types( cpptypes.bool_t() )
+
+def is_void( type ):
+    """returns True, if type represents C{void}, False otherwise"""
+    return remove_alias( type ) in create_cv_types( cpptypes.void_t() )
+
+def is_void_pointer( type ):
+    """returns True, if type represents C{void*}, False otherwise"""
+    return is_same( type, cpptypes.pointer_t( cpptypes.void_t() ) )
+
+def is_integral( type ):
+    """returns True, if type represents C++ integral type, False otherwise"""
+    integral_def = create_cv_types( cpptypes.char_t() )                    \
+                   + create_cv_types( cpptypes.unsigned_char_t() )         \
+                   + create_cv_types( cpptypes.signed_char_t() )           \
+                   + create_cv_types( cpptypes.wchar_t() )                 \
+                   + create_cv_types( cpptypes.short_int_t() )             \
+                   + create_cv_types( cpptypes.short_unsigned_int_t() )    \
+                   + create_cv_types( cpptypes.bool_t() )                  \
+                   + create_cv_types( cpptypes.int_t() )                   \
+                   + create_cv_types( cpptypes.unsigned_int_t() )          \
+                   + create_cv_types( cpptypes.long_int_t() )              \
+                   + create_cv_types( cpptypes.long_unsigned_int_t() )     \
+                   + create_cv_types( cpptypes.long_long_int_t() )         \
+                   + create_cv_types( cpptypes.long_long_unsigned_int_t() )
+
+    return remove_alias( type ) in integral_def
+
+def is_floating_point( type ):
+    """returns True, if type represents C++ floating point type, False otherwise"""
+    float_def = create_cv_types( cpptypes.float_t() )                   \
+                + create_cv_types( cpptypes.double_t() )                \
+                + create_cv_types( cpptypes.long_double_t() )
+
+    return remove_alias( type ) in float_def
+
+def is_arithmetic( type ):
+    """returns True, if type represents C++ integral or floating point type, False otherwise"""
+    return is_integral( type ) or is_floating_point( type )
+
+def is_pointer(type):
+    """returns True, if type represents C++ pointer type, False otherwise"""
+    return does_match_definition( type
+                                  , cpptypes.pointer_t
+                                  , (cpptypes.const_t, cpptypes.volatile_t) )
+
+def is_calldef_pointer(type):
+    """returns True, if type represents pointer to free/member function, False otherwise"""
+    if not is_pointer(type):
+        return False
+    nake_type = remove_alias( type )
+    nake_type = remove_const( nake_type )
+    nake_type = remove_volatile( nake_type )
+    return isinstance( nake_type, cpptypes.compound_t ) \
+           and isinstance( nake_type.base, cpptypes.calldef_type_t )
+
+def remove_pointer(type):
+    """removes pointer from the type definition
+
+    If type is not pointer type, it will be returned as is.
+    """
+    nake_type = remove_alias( type )
+    if not is_pointer( nake_type ):
+        return type
+    elif isinstance( nake_type, cpptypes.volatile_t ) and isinstance( nake_type.base, cpptypes.pointer_t ):
+        return cpptypes.volatile_t( nake_type.base.base )
+    elif isinstance( nake_type, cpptypes.const_t ) and isinstance( nake_type.base, cpptypes.pointer_t ):
+        return cpptypes.const_t( nake_type.base.base )
+    elif isinstance( nake_type.base, cpptypes.calldef_type_t ):
+        return type
+    else:
+        return nake_type.base
+
+def is_reference(type):
+    """returns True, if type represents C++ reference type, False otherwise"""
+    nake_type = remove_alias( type )
+    return isinstance( nake_type, cpptypes.reference_t )
+
+def is_array(type):
+    """returns True, if type represents C++ array type, False otherwise"""
+    nake_type = remove_alias( type )
+    nake_type = remove_reference( nake_type )
+    nake_type = remove_cv( nake_type )
+    return isinstance( nake_type, cpptypes.array_t )
+
+def array_size(type):
+    """returns array size"""
+    nake_type = remove_alias( type )
+    nake_type = remove_reference( nake_type )
+    nake_type = remove_cv( nake_type )
+    assert isinstance( nake_type, cpptypes.array_t )
+    return nake_type.size
+
+def array_item_type(type_):
+    """returns array item type"""
+    if is_array(type_):
+        type_ = remove_alias( type_ )
+        type_ = remove_cv( type_ )
+        return type_.base
+    elif is_pointer( type_ ):
+        return remove_pointer( type_ )
+    else:
+        assert 0
+
+def remove_reference(type):
+    """removes reference from the type definition
+
+    If type is not reference type, it will be returned as is.
+    """
+    nake_type = remove_alias( type )
+    if not is_reference( nake_type ):
+        return type
+    else:
+        return nake_type.base
+
+def is_const(type):
+    """returns True, if type represents C++ const type, False otherwise"""
+    nake_type = remove_alias( type )
+    return isinstance( nake_type, cpptypes.const_t )
+
+def remove_const(type):
+    """removes const from the type definition
+
+    If type is not const type, it will be returned as is
+    """
+
+    nake_type = remove_alias( type )
+    if not is_const( nake_type ):
+        return type
+    else:
+        return nake_type.base
+
+def remove_declarated( type ):
+    """removes type-declaration class-binder L{declarated_t} from the type
+
+    If type is not L{declarated_t}, it will be returned as is
+    """
+    type = remove_alias( type )
+    if isinstance( type, cpptypes.declarated_t ):
+        type = type.declaration
+    return type
+
+def is_same(type1, type2):
+    """returns True, if type1 and type2 are same types"""
+    nake_type1 = remove_declarated( type1 )
+    nake_type2 = remove_declarated( type2 )
+    return nake_type1 == nake_type2
+
+def is_volatile(type):
+    """returns True, if type represents C++ volatile type, False otherwise"""
+    nake_type = remove_alias( type )
+    return isinstance( nake_type, cpptypes.volatile_t )
+
+def remove_volatile(type):
+    """removes volatile from the type definition
+
+    If type is not volatile type, it will be returned as is
+    """
+    nake_type = remove_alias( type )
+    if not is_volatile( nake_type ):
+        return type
+    else:
+        return nake_type.base
+
+def remove_cv(type):
+    """removes const and volatile from the type definition"""
+
+    nake_type = remove_alias(type)
+    if not is_const( nake_type ) and not is_volatile( nake_type ):
+        return type
+    result = nake_type
+    if is_const( nake_type ):
+        result = nake_type.base
+    if is_volatile( result ):
+        result = result.base
+    return result
+
+def is_fundamental(type):
+    """returns True, if type represents C++ fundamental type"""
+    return does_match_definition( type
+                                  , cpptypes.fundamental_t
+                                  , (cpptypes.const_t, cpptypes.volatile_t) )
+
+class declaration_xxx_traits:
+    """this class implements the functionality needed for convinient work with
+    declaration classes
+
+    Implemented functionality:
+        - find out whether a declaration is a desired one
+        - get reference to the declaration
+    """
+    sequence = [ remove_alias, remove_cv, remove_declarated ]
+    def __init__( self, declaration_class ):
+        self.declaration_class = declaration_class
+
+    def __apply_sequence( self, type ):
+        for f in self.sequence:
+            type = f( type )
+        return type
+
+    def is_my_case( self, type ):
+        """returns True, if type represents the desired declaration, False otherwise"""
+        return isinstance( self.__apply_sequence( type ), self.declaration_class )
+
+    def get_declaration( self, type ):
+        """returns reference to the declaration
+
+        Precondition: self.is_my_case( type ) == True
+        """
+        assert self.is_my_case( type )
+        return self.__apply_sequence( type )
+
+enum_traits = declaration_xxx_traits( enumeration.enumeration_t )
+"""implements functionality, needed for convinient work with C++ enums"""
+
+is_enum = enum_traits.is_my_case
+"""returns True, if type represents C++ enumeration declaration, False otherwise"""
+
+enum_declaration = enum_traits.get_declaration
+"""returns reference to enum declaration"""
+
+class_traits = declaration_xxx_traits( class_declaration.class_t )
+"""implements functionality, needed for convinient work with C++ classes"""
+
+is_class = class_traits.is_my_case
+"""returns True, if type represents C++ class definition, False otherwise"""
+
+class_declaration_traits = declaration_xxx_traits( class_declaration.class_declaration_t )
+"""implements functionality, needed for convinient work with C++ class declarations"""
+
+is_class_declaration = class_declaration_traits.is_my_case
+"""returns True, if type represents C++ class declaration, False otherwise"""
+
+def find_trivial_constructor( type ):
+    """returns reference to trivial constructor or None"""
+    assert isinstance( type, class_declaration.class_t )
+    return type.find_trivial_constructor()
+
+def has_trivial_constructor( class_ ):
+    """if class has public trivial constructor, this function will return reference to it, None otherwise"""
+    class_ = class_traits.get_declaration( class_ )
+    trivial = class_.find_trivial_constructor()
+    if trivial and trivial.access_type == 'public':
+        return trivial
+
+def has_copy_constructor( class_ ):
+    """if class has public copy constructor, this function will return reference to it, None otherwise"""
+    class_ = class_traits.get_declaration( class_ )
+    copy_constructor = class_.find_copy_constructor()
+    if copy_constructor and copy_constructor.access_type == 'public':
+        return copy_constructor
+
+def has_destructor(class_):
+    """if class has destructor, this function will return reference to it, None otherwise"""
+    class_ = class_traits.get_declaration( class_ )
+    destructor = class_.decls( decl_type=calldef.destructor_t, recursive=False, allow_empty=True )
+    if destructor:
+        return destructor[0]
+
+def has_public_constructor(class_):
+    """if class has any public constructor, this function will return list of them, otherwise None"""
+    class_ = class_traits.get_declaration(class_)
+    decls = class_.constructors( lambda c: not c.is_copy_constructor and c.access_type == 'public'
+                                 , recursive=False, allow_empty=True )
+    if decls:
+        return decls
+
+def has_public_assign(class_):
+    """returns True, if class has public assign operator, False otherwise"""
+    class_ = class_traits.get_declaration( class_ )
+    decls = class_.mem_opers( lambda o: o.symbol == '=' and o.access_type == 'public'
+                              , recursive=False, allow_empty=True )
+    return bool( decls )
+
+def has_public_destructor(type):
+    """returns True, if class has public destructor, False otherwise"""
+    d = has_destructor( type )
+    return d and d.access_type == 'public'
+
+def is_base_and_derived( based, derived ):
+    """returns True, if there is "base and derived" relationship between classes, False otherwise"""
+    assert isinstance( based, class_declaration.class_t )
+    assert isinstance( derived, ( class_declaration.class_t, tuple ) )
+
+    all_derived = None
+    if isinstance( derived, class_declaration.class_t ):
+        all_derived = ( [derived] )
+    else: #tuple
+        all_derived = derived
+
+    for derived_cls in all_derived:
+        for base_desc in derived_cls.recursive_bases:
+            if base_desc.related_class == based:
+                return True
+    return False
+
+def has_any_non_copyconstructor( type):
+    """if class has any public constructor, which is not copy constructor, this function will return list of them, otherwise None"""
+    class_ = class_traits.get_declaration( type )
+    decls = class_.constructors( lambda c: not c.is_copy_constructor and c.access_type == 'public'
+                                 , recursive=False, allow_empty=True )
+    if decls:
+        return decls
+
+def has_public_binary_operator( type, operator_symbol ):
+    """returns True, if type has public binary operator, otherwise False"""
+    not_artificial = lambda decl: decl.is_artificial == False
+    type = remove_alias( type )
+    type = remove_cv( type )
+    type = remove_declarated( type )
+    assert isinstance( type, class_declaration.class_t )
+
+    if is_std_string( type ) or is_std_wstring( type ):
+        #In some case compare operators of std::basic_string are not instantiated
+        return True
+
+    operators = type.member_operators( function=matchers.custom_matcher_t( not_artificial ) \
+                                                & matchers.access_type_matcher_t( 'public' )
+                                       , symbol=operator_symbol
+                                       , allow_empty=True
+                                       , recursive=False )
+    if operators:
+        return True
+
+    t = cpptypes.declarated_t( type )
+    t = cpptypes.const_t( t )
+    t = cpptypes.reference_t( t )
+    operators = type.top_parent.operators( function=not_artificial
+                                           , arg_types=[t, None]
+                                           , symbol=operator_symbol
+                                           , allow_empty=True
+                                           , recursive=True )
+    if operators:
+        return True
+    for bi in type.recursive_bases:
+        assert isinstance( bi, class_declaration.hierarchy_info_t )
+        if bi.access_type != class_declaration.ACCESS_TYPES.PUBLIC:
+            continue
+        operators = bi.related_class.member_operators( function=matchers.custom_matcher_t( not_artificial ) \
+                                                             & matchers.access_type_matcher_t( 'public' )
+                                                       , symbol=operator_symbol
+                                                       , allow_empty=True
+                                                       , recursive=False )
+        if operators:
+            return True
+    return False
+
+def has_public_equal( type ):
+    """returns True, if class has public operator==, otherwise False"""
+    return has_public_binary_operator( type, '==' )
+
+def has_public_less( type ):
+    """returns True, if class has public operator<, otherwise False"""
+    return has_public_binary_operator( type, '<' )
+
+def is_unary_operator( oper ):
+    """returns True, if operator is unary operator, otherwise False"""
+    #~ definition:
+        #~ memeber in class
+          #~ ret-type operator symbol()
+          #~ ret-type operator [++ --](int)
+        #~ globally
+          #~ ret-type operator symbol( arg )
+          #~ ret-type operator [++ --](X&, int)
+    symbols = [ '!', '&', '~', '*', '+', '++', '-', '--' ]
+    if not isinstance( oper, calldef.operator_t ):
+        return False
+    if oper.symbol not in symbols:
+        return False
+    if isinstance( oper, calldef.member_operator_t ):
+        if 0 == len( oper.arguments ):
+            return True
+        elif oper.symbol in [ '++', '--' ] and isinstance( oper.arguments[0].type, cpptypes.int_t ):
+            return True
+        else:
+            return False
+    else:
+        if 1 == len( oper.arguments ):
+            return True
+        elif oper.symbol in [ '++', '--' ] \
+             and 2 == len( oper.arguments ) \
+             and isinstance( oper.arguments[1].type, cpptypes.int_t ):
+            #may be I need to add additional check whether first argument is reference or not?
+            return True
+        else:
+            return False
+
+def is_binary_operator( oper ):
+    """returns True, if operator is binary operator, otherwise False"""
+    #~ definition:
+        #~ memeber in class
+          #~ ret-type operator symbol(arg)
+        #~ globally
+          #~ ret-type operator symbol( arg1, arg2 )
+    symbols = [ ',', '()', '[]', '!=', '%', '%=', '&', '&&', '&=', '*', '*=', '+', '+='
+                , '-', '-=', '->', '->*', '/', '/=', '<', '<<', '<<=', '<='
+                , '=', '==', '>', '>=', '>>', '>>=', '^', '^=', '|', '|=', '||'
+    ]
+    if not isinstance( oper, calldef.operator_t ):
+        return False
+    if oper.symbol not in symbols:
+        return False
+    if isinstance( oper, calldef.member_operator_t ):
+        if 1 == len( oper.arguments ):
+            return True
+        else:
+            return False
+    else:
+        if 2 == len( oper.arguments ):
+            return True
+        else:
+            return False
+
+class __is_convertible_t:
+    """implementation details"""
+    def __init__( self, source, target ):
+        self.__source = self.__normalize( source )
+        self.__target = self.__normalize( target )
+
+    def __find_class_by_class_declaration( self, class_decl ):
+        found = algorithm.find_declaration( class_decl.parent.declarations
+                                            , name=class_decl.name
+                                            , type=class_declaration.class_t )
+        return found
+
+    def __normalize( self, type_ ):
+        type_ = remove_alias( type_ )
+        bt_of_type = base_type( type_ )
+        if isinstance( bt_of_type, cpptypes.declarated_t ) \
+           and isinstance( bt_of_type.declaration, class_declaration.class_declaration_t ):
+            type_ = type_.clone()
+            bt_of_type = base_type( type_ )
+            bt_of_type.declaration = self.__find_class_by_class_declaration( bt_of_type.declaration )
+        return type_
+
+    def __test_trivial( self, source, target ):
+        if not ( source and target ):
+            return False
+        if is_same( source, target ):
+            return True #X => X
+        if is_const( target ) and is_same( source, target.base ):
+            return True #X => const X
+        if is_reference( target ) and is_same( source, target.base ):
+            return True #X => X&
+        if is_reference( target ) and is_const( target.base ) and is_same( source, target.base.base ):
+            return True #X => const X&
+        if is_same( target, cpptypes.pointer_t( cpptypes.void_t() ) ):
+            if is_integral( source ) or is_enum( source ):
+                return False
+            else:
+                return True #X => void*
+        if is_pointer( source ) and is_pointer( target ):
+            if is_const( target.base ) and is_same( source.base, target.base.base ):
+                return True#X* => const X*
+        if is_reference( source ) and is_reference( target ):
+            if is_const( target.base ) and is_same( source.base, target.base.base ):
+                return True#X& => const X&
+        if not is_const( source ) and is_array( source ) and is_pointer( target ):
+            if is_same( base_type(source), target.base ):
+                return True#X[2] => X*
+        if is_array( source ) and is_pointer( target ) and is_const( target.base ):
+            if is_same( base_type(source), target.base.base ):
+                return True
+
+    def __test_pointer_to_func_or_mv__to__func_or_mv( self, source, target ):
+        if is_pointer( source ) \
+           and is_reference( target ) \
+           and isinstance( target.base
+                           , ( cpptypes.free_function_type_t
+                               , cpptypes.member_function_type_t
+                               , cpptypes.member_variable_type_t ) ) \
+           and is_same( source.base, target.base ):
+                return True
+
+        if is_pointer( source ) \
+           and isinstance( target
+                           , ( cpptypes.free_function_type_t
+                               , cpptypes.member_function_type_t
+                               , cpptypes.member_variable_type_t ) ) \
+           and is_same( source.base, target ):
+                return True
+
+        if is_pointer( target ) \
+           and is_reference( source ) \
+           and isinstance( source.base
+                           , ( cpptypes.free_function_type_t
+                               , cpptypes.member_function_type_t
+                               , cpptypes.member_variable_type_t ) ) \
+           and is_same( source.base, target.base ):
+                return True
+
+        if is_pointer( target ) \
+           and isinstance( source
+                           , ( cpptypes.free_function_type_t
+                               , cpptypes.member_function_type_t
+                               , cpptypes.member_variable_type_t ) ) \
+           and is_same( target.base, source ):
+                return True
+
+
+    def __test_const_x_ref__to__x( self, source, target ):
+        if not is_reference( source ) \
+           or not is_const( source.base ) \
+           or not is_same( source.base.base, target ):
+            return False
+        if is_fundamental( target ):
+            return True
+        if is_enum( target ):
+            return True
+        if isinstance( target, cpptypes.declarated_t ):
+            assert isinstance( target.declaration, class_declaration.class_t )
+            if has_copy_constructor( target.declaration ):
+                return True #we have copy constructor
+        return False
+
+    def __test_const_ref_x__to__y(self, source, target):
+        if not is_reference( source ) or not is_const( source.base ):
+            return False
+        if is_fundamental( source.base.base ) and is_fundamental( target ):
+            return True
+        if is_convertible( source.base.base, cpptypes.int_t() ) and is_enum( target ):
+            return True
+        if isinstance( target, cpptypes.declarated_t ):
+            assert isinstance( target.declaration, class_declaration.class_t )
+            if has_copy_constructor( target.declaration ):
+                return True #we have copy constructor
+        return False
+
+    def __test_ref_x__to__x( self, source, target ):
+        if not is_reference( source ) or not is_same( source.base, target ):
+            return False
+        if is_fundamental( target ):
+            return True
+        if is_enum( target ):
+            return True
+        if isinstance( target, cpptypes.declarated_t ):
+            assert isinstance( target.declaration, class_declaration.class_t )
+            if has_copy_constructor( target.declaration ):
+                return True #we have copy constructor
+        return False
+
+    def __test_ref_x__to__y(self, source, target):
+        if not is_reference( source ):
+            return False
+        if is_fundamental( source.base ) and is_fundamental( target ):
+            return True
+        if is_convertible( source.base, cpptypes.int_t() ) and is_enum( target ):
+            return True
+        if isinstance( target, cpptypes.declarated_t ):
+            assert isinstance( target.declaration, class_declaration.class_t )
+            if has_copy_constructor( target.declaration ):
+                return True #we have copy constructor
+        return False
+
+    def __test_fundamental__to__fundamental(self, source, target):
+        if not is_fundamental( base_type( source ) ) or not is_fundamental( base_type( target ) ):
+            return False
+        if is_void( base_type( source ) ) or is_void( base_type( target ) ):
+            return False
+        if is_fundamental( source ) and is_fundamental( target ):
+            return True
+        if not is_pointer( source ) and is_fundamental( target ):
+            return True
+        if not is_pointer( source ) and is_const( target ) and is_fundamental( target.base ):
+            return True
+        if is_fundamental( source ) \
+           and is_reference( target ) \
+           and is_const( target.base ) \
+           and is_fundamental( target.base.base ):
+            return True #X => const Y&
+        return False
+
+    def __test_derived_to_based( self, source, target ):
+        derived = base_type( source )
+        base = base_type( target )
+        if not ( isinstance( derived, cpptypes.declarated_t ) \
+                 and isinstance( derived.declaration, class_declaration.class_t ) ):
+            return False
+        if not ( isinstance( base, cpptypes.declarated_t ) \
+                 and isinstance( base.declaration, class_declaration.class_t ) ):
+            return False
+        base = base.declaration
+        derived = derived.declaration
+        if not is_base_and_derived( base, derived ):
+            return False
+        for b in derived.recursive_bases:
+            if ( b.related_class is base ) and b.access_type != class_declaration.ACCESS_TYPES.PRIVATE:
+                break
+        else:
+            return False
+
+        base = target
+        derived = source
+        is_both_declarated = lambda x, y: isinstance( x, cpptypes.declarated_t ) \
+                                          and isinstance( y, cpptypes.declarated_t )
+        #d => b
+        if is_both_declarated( base, derived ):
+            return True
+        #d* => b*
+        if is_pointer( derived ) and is_pointer( base ) \
+           and is_both_declarated( base.base, derived.base ):
+            return True
+        #const d* => const b*
+        if is_pointer( derived ) and is_pointer( base ) \
+           and is_const( derived.base ) and is_const( base.base ) \
+           and is_both_declarated( base.base.base, derived.base.base ):
+            return True
+        #d* => const b*
+        if is_pointer( derived ) and is_pointer( base ) \
+           and is_const( derived.base )\
+           and is_both_declarated( base.base.base, derived.base ):
+            return True
+
+        #d& => b&
+        if is_reference( derived ) and is_reference( base ) \
+           and is_both_declarated( base.base, derived.base ):
+            return True
+        #const d& => const b&
+        if is_reference( derived ) and is_reference( base ) \
+           and is_const( derived.base ) and is_const( base.base ) \
+           and is_both_declarated( base.base.base, derived.base.base ):
+            return True
+        #d& => const b&
+        if is_reference( derived ) and is_reference( base ) \
+           and is_const( derived.base )\
+           and is_both_declarated( base.base.base, derived.base ):
+            return True
+        return False
+
+    def is_convertible( self ):
+        source = self.__source
+        target = self.__target
+
+        if self.__test_trivial(source, target):
+            return True
+        if is_array( source ) or is_array( target ):
+            return False
+        if self.__test_const_x_ref__to__x(source, target):
+            return True
+        if self.__test_const_ref_x__to__y(source, target):
+            return True
+        if self.__test_ref_x__to__x(source, target):
+            return True
+        if self.__test_ref_x__to__y(source, target):
+            return True
+        if self.__test_fundamental__to__fundamental( source, target ):
+            return True
+        if self.__test_pointer_to_func_or_mv__to__func_or_mv( source, target ):
+            return True
+        if self.__test_derived_to_based( source, target ):
+            return True
+
+        if isinstance( source, cpptypes.declarated_t ):
+            if isinstance( source.declaration, enumeration.enumeration_t ) \
+               and is_fundamental( target ) \
+               and not is_void( target ):
+                return True # enum could be converted to any integral type
+
+            if isinstance( source.declaration, class_declaration.class_t ):
+                source_inst = source.declaration
+                #class instance could be convertible to something else if it has operator
+                casting_operators = algorithm.find_all_declarations( source_inst.declarations
+                                                                     , type=calldef.casting_operator_t
+                                                                     , recursive=False )
+                if casting_operators:
+                    for operator in casting_operators:
+                        if is_convertible( operator.return_type, target ):
+                            return True
+
+        #may be target is class too, so in this case we should check whether is
+        #has constructor from source
+        if isinstance( target, cpptypes.declarated_t ):
+            if isinstance( target.declaration, class_declaration.class_t ):
+                constructors = algorithm.find_all_declarations( target.declaration.declarations
+                                                                , type=calldef.constructor_t
+                                                                , recursive=False )
+                if constructors:
+                    for constructor in constructors:
+                        if 1 != len( constructor.arguments ):
+                            continue
+                        #TODO: add test to check explicitness
+                        if is_convertible( source, constructor.arguments[0].type ):
+                            return True
+
+        return False
+
+def is_convertible( source, target ):
+    """returns True, if source could be converted to target, otherwise False"""
+    return __is_convertible_t( source, target ).is_convertible()
+
+def __is_noncopyable_single( class_):
+    """implementation details"""
+    #It is not enough to check base classes, we should also to check
+    #member variables.
+    logger = utils.loggers.cxx_parser
+
+    if has_copy_constructor( class_ ) \
+       and has_public_constructor( class_ ) \
+       and has_public_assign( class_ ) \
+       and has_public_destructor( class_ ):
+        msg = os.linesep.join([
+            "__is_noncopyable_single - %s - COPYABLE:" % class_.decl_string
+            , "    trivial copy constructor: yes"
+            , "    public constructor: yes"
+            , "    public assign: yes"
+            , "    public destructor: yes"
+        ])
+        logger.debug( msg )
+        return False
+    if class_.find_noncopyable_vars():
+        logger.debug( "__is_noncopyable_single(TRUE) - %s - contains noncopyable members" % class_.decl_string )
+        return True
+    else:
+        logger.debug( "__is_noncopyable_single(FALSE) - %s - COPYABLE, because is doesn't contains noncopyable members" % class_.decl_string )
+        return False
+
+def is_noncopyable( class_ ):
+    """returns True, if class is noncopyable, False otherwise"""
+    logger = utils.loggers.cxx_parser
+    class_ = class_traits.get_declaration( class_ )
+
+    true_header = "is_noncopyable(TRUE) - %s - " % class_.decl_string
+    false_header = "is_noncopyable(false) - %s - " % class_.decl_string
+
+    if class_.class_type == class_declaration.CLASS_TYPES.UNION:
+        return False
+
+    if class_.is_abstract:
+        logger.debug( true_header + "abstract client" )
+        return True
+
+    #if class has public, user defined copy constructor, than this class is
+    #copyable
+    copy_ = class_.find_copy_constructor()
+    if copy_ and copy_.access_type == 'public' and not copy_.is_artificial:
+        return False
+
+    for base_desc in class_.recursive_bases:
+        assert isinstance( base_desc, class_declaration.hierarchy_info_t )
+        if base_desc.related_class.decl_string in ('::boost::noncopyable', '::boost::noncopyable_::noncopyable' ):
+            logger.debug( true_header + "derives from boost::noncopyable" )
+            return True
+        if not has_copy_constructor( base_desc.related_class ):
+            base_copy_ = base_desc.related_class.find_copy_constructor()
+            if base_copy_:
+                if base_copy_.access_type == 'private':
+                    logger.debug( true_header + "there is private copy constructor" )
+                    return True
+            else:
+                if __is_noncopyable_single( base_desc.related_class ):
+                    logger.debug( true_header + "__is_noncopyable_single returned True" )
+                    return True
+        if __is_noncopyable_single( base_desc.related_class ):
+            logger.debug( true_header + "__is_noncopyable_single returned True" )
+            return True
+
+    if not has_copy_constructor( class_ ):
+        logger.debug( true_header + "does not have trival copy constructor" )
+        return True
+    elif not has_public_constructor( class_ ):
+        logger.debug( true_header + "does not have a public constructor" )
+        return True
+    elif has_destructor( class_ ) and not has_public_destructor( class_ ):
+        logger.debug( true_header + "has private destructor")
+        return True
+    else:
+        return __is_noncopyable_single( class_ )
+
+def is_defined_in_xxx( xxx, cls ):
+    """small helper function, that checks whether class ( C{cls} ) is defined
+    under C{::xxx} namespace"""
+    if not cls.parent:
+        return False
+
+    if not isinstance( cls.parent, namespace.namespace_t ):
+        return False
+
+    if xxx != cls.parent.name:
+        return False
+
+    xxx_ns = cls.parent
+    if not xxx_ns.parent:
+        return False
+
+    if not isinstance( xxx_ns.parent, namespace.namespace_t ):
+        return False
+
+    if '::' != xxx_ns.parent.name:
+        return False
+
+    global_ns = xxx_ns.parent
+    return None is global_ns.parent
+
+class impl_details:
+    """implementation details"""
+    @staticmethod
+    def is_defined_in_xxx( xxx, cls ):
+        """implementation details"""
+        if not cls.parent:
+            return False
+
+        if not isinstance( cls.parent, namespace.namespace_t ):
+            return False
+
+        if xxx != cls.parent.name:
+            return False
+
+        xxx_ns = cls.parent
+        if not xxx_ns.parent:
+            return False
+
+        if not isinstance( xxx_ns.parent, namespace.namespace_t ):
+            return False
+
+        if '::' != xxx_ns.parent.name:
+            return False
+
+        global_ns = xxx_ns.parent
+        return None is global_ns.parent
+
+    @staticmethod
+    def find_value_type( global_ns, value_type_str ):
+        """implementation details"""
+        if not value_type_str.startswith( '::' ):
+            value_type_str = '::' + value_type_str
+        found = global_ns.decls( name=value_type_str
+                                 , function=lambda decl: not isinstance( decl, calldef.calldef_t )
+                                 ,  allow_empty=True )
+        if not found:
+            no_global_ns_value_type_str = value_type_str[2:]
+            if cpptypes.FUNDAMENTAL_TYPES.has_key( no_global_ns_value_type_str ):
+                return cpptypes.FUNDAMENTAL_TYPES[ no_global_ns_value_type_str ]
+            elif is_std_string( value_type_str ):
+                string_ = global_ns.typedef( '::std::string' )
+                return remove_declarated( string_ )
+            elif is_std_wstring( value_type_str ):
+                string_ = global_ns.typedef( '::std::wstring' )
+                return remove_declarated( string_ )
+            else:
+                value_type_str = no_global_ns_value_type_str
+                has_const = value_type_str.startswith( 'const ' )
+                if has_const:
+                    value_type_str = value_type_str[ len('const '): ]
+                has_pointer = value_type_str.endswith( '*' )
+                if has_pointer:
+                    value_type_str = value_type_str[:-1]
+                found = None
+                if has_const or has_pointer:
+                    found = impl_details.find_value_type( global_ns, value_type_str )
+                if not found:
+                    return None
+                else:
+                    if isinstance( found, class_declaration.class_types ):
+                        found = cpptypes.declarated_t( found )
+                    if has_const:
+                        found = cpptypes.const_t( found )
+                    if has_pointer:
+                        found = cpptypes.pointer_t( found )
+                    return found
+        if len( found ) == 1:
+            return found[0]
+        else:
+            return None
+
+class smart_pointer_traits:
+    """implements functionality, needed for convinient work with smart pointers"""
+
+    @staticmethod
+    def is_smart_pointer( type ):
+        """returns True, if type represents instantiation of C{boost::shared_ptr}, False otherwise"""
+        type = remove_alias( type )
+        type = remove_cv( type )
+        type = remove_declarated( type )
+        if not isinstance( type, ( class_declaration.class_declaration_t, class_declaration.class_t ) ):
+            return False
+        if not impl_details.is_defined_in_xxx( 'boost', type ):
+            return False
+        return type.decl_string.startswith( '::boost::shared_ptr<' )
+
+    @staticmethod
+    def value_type( type ):
+        """returns reference to boost::shared_ptr value type"""
+        if not smart_pointer_traits.is_smart_pointer( type ):
+            raise TypeError( 'Type "%s" is not instantiation of boost::shared_ptr' % type.decl_string )
+        type = remove_alias( type )
+        cls = remove_cv( type )
+        cls = remove_declarated( type )
+        if isinstance( cls, class_declaration.class_t ):
+            return remove_declarated( cls.typedef( "value_type", recursive=False ).type )
+        elif not isinstance( cls, ( class_declaration.class_declaration_t, class_declaration.class_t ) ):
+            raise RuntimeError( "Unable to find out shared_ptr value type. shared_ptr class is: %s" % cls.decl_string )
+        else:
+            value_type_str = templates.args( cls.name )[0]
+            ref = impl_details.find_value_type( cls.top_parent, value_type_str )
+            if None is ref:
+                raise RuntimeError( "Unable to find out shared_ptr value type. shared_ptr class is: %s" % cls.decl_string )
+            return ref
+
+class auto_ptr_traits:
+    """implements functionality, needed for convinient work with std::auto_ptr pointers"""
+
+    @staticmethod
+    def is_smart_pointer( type ):
+        """returns True, if type represents instantiation of C{boost::shared_ptr}, False otherwise"""
+        type = remove_alias( type )
+        type = remove_cv( type )
+        type = remove_declarated( type )
+        if not isinstance( type, ( class_declaration.class_declaration_t, class_declaration.class_t ) ):
+            return False
+        if not impl_details.is_defined_in_xxx( 'std', type ):
+            return False
+        return type.decl_string.startswith( '::std::auto_ptr<' )
+
+    @staticmethod
+    def value_type( type ):
+        """returns reference to boost::shared_ptr value type"""
+        if not auto_ptr_traits.is_smart_pointer( type ):
+            raise TypeError( 'Type "%s" is not instantiation of std::auto_ptr' % type.decl_string )
+        type = remove_alias( type )
+        cls = remove_cv( type )
+        cls = remove_declarated( type )
+        if isinstance( cls, class_declaration.class_t ):
+            return remove_declarated( cls.typedef( "element_type", recursive=False ).type )
+        elif not isinstance( cls, ( class_declaration.class_declaration_t, class_declaration.class_t ) ):
+            raise RuntimeError( "Unable to find out auto_ptr value type. auto_ptr class is: %s" % cls.decl_string )
+        else:
+            value_type_str = templates.args( cls.name )[0]
+            ref = impl_details.find_value_type( cls.top_parent, value_type_str )
+            if None is ref:
+                raise RuntimeError( "Unable to find out auto_ptr value type. shared_ptr class is: %s" % cls.decl_string )
+            return ref
+
+
+def is_std_string( type ):
+    """returns True, if type represents C++ std::string, False otherwise"""
+    decl_strings = [
+        '::std::basic_string<char,std::char_traits<char>,std::allocator<char> >'
+        , '::std::basic_string<char, std::char_traits<char>, std::allocator<char> >'
+        , '::std::string' ]
+    if isinstance( type, types.StringTypes ):
+        return type in decl_strings
+    else:
+        type = remove_alias( type )
+        return remove_cv( type ).decl_string in decl_strings
+
+def is_std_wstring( type ):
+    """returns True, if type represents C++ std::wstring, False otherwise"""
+    decl_strings = [
+        '::std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >'
+        , '::std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >'
+        , '::std::wstring' ]
+    if isinstance( type, types.StringTypes ):
+        return type in decl_strings
+    else:
+        type = remove_alias( type )
+        return remove_cv( type ).decl_string in decl_strings
+
+def is_std_ostream( type ):
+    """returns True, if type represents C++ std::string, False otherwise"""
+    decl_strings = [
+        '::std::basic_ostream<char, std::char_traits<char> >'
+        , '::std::basic_ostream<char,std::char_traits<char> >'
+        , '::std::ostream' ]
+    if isinstance( type, types.StringTypes ):
+        return type in decl_strings
+    else:
+        type = remove_alias( type )
+        return remove_cv( type ).decl_string in decl_strings
+
+
+def is_std_wostream( type ):
+    """returns True, if type represents C++ std::string, False otherwise"""
+    decl_strings = [
+        '::std::basic_ostream<wchar_t, std::char_traits<wchar_t> >'
+        , '::std::basic_ostream<wchar_t,std::char_traits<wchar_t> >'
+        , '::std::wostream' ]
+    if isinstance( type, types.StringTypes ):
+        return type in decl_strings
+    else:
+        type = remove_alias( type )
+        return remove_cv( type ).decl_string in decl_strings
+
+
+
+
+
+
+
+
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/type_visitor.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/type_visitor.py
new file mode 100644
index 0000000..e2e474c
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/type_visitor.py
@@ -0,0 +1,132 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines types visitor class interface
+"""
+
+class type_visitor_t(object):
+    """
+    types visitor interface
+    
+    All functions within this class should be redefined in derived classes.
+    """
+    def __init__(self):
+        object.__init__(self)
+
+    def visit_void( self ):
+        raise NotImplementedError()
+        
+    def visit_char( self ):
+        raise NotImplementedError()
+        
+    def visit_unsigned_char( self ):
+        raise NotImplementedError()
+
+    def visit_signed_char( self ):
+        raise NotImplementedError()
+    
+    def visit_wchar( self ):
+        raise NotImplementedError()
+        
+    def visit_short_int( self ):
+        raise NotImplementedError()
+        
+    def visit_short_unsigned_int( self ):
+        raise NotImplementedError()
+        
+    def visit_bool( self ):
+        raise NotImplementedError()
+        
+    def visit_int( self ):
+        raise NotImplementedError()
+        
+    def visit_unsigned_int( self ):
+        raise NotImplementedError()
+        
+    def visit_long_int( self ):
+        raise NotImplementedError()
+        
+    def visit_long_unsigned_int( self ):
+        raise NotImplementedError()
+        
+    def visit_long_long_int( self ):
+        raise NotImplementedError()
+        
+    def visit_long_long_unsigned_int( self ):
+        raise NotImplementedError()
+        
+    def visit_float( self ):
+        raise NotImplementedError()
+        
+    def visit_double( self ):
+        raise NotImplementedError()
+        
+    def visit_long_double( self ):
+        raise NotImplementedError()
+    
+    def visit_complex_long_double(self):
+        raise NotImplementedError()
+
+    def visit_complex_double(self):
+        raise NotImplementedError()
+
+    def visit_complex_float(self):
+        raise NotImplementedError()
+   
+    def visit_jbyte(self):
+        raise NotImplementedError()
+    
+    def visit_jshort(self):
+        raise NotImplementedError()
+    
+    def visit_jint(self):
+        raise NotImplementedError()
+    
+    def visit_jlong(self):
+        raise NotImplementedError()
+    
+    def visit_jfloat(self):
+        raise NotImplementedError()
+    
+    def visit_jdouble(self):
+        raise NotImplementedError()
+    
+    def visit_jchar(self):
+        raise NotImplementedError()
+    
+    def visit_jboolean(self):
+        raise NotImplementedError()
+    
+    def visit_volatile( self ):
+        raise NotImplementedError()
+        
+    def visit_const( self ):
+        raise NotImplementedError()
+        
+    def visit_pointer( self ):
+        raise NotImplementedError()
+        
+    def visit_reference( self ):
+        raise NotImplementedError()
+        
+    def visit_array( self ):
+        raise NotImplementedError()
+        
+    def visit_free_function_type( self ):
+        raise NotImplementedError()
+        
+    def visit_member_function_type( self ):
+        raise NotImplementedError()
+        
+    def visit_member_variable_type( self ):
+        raise NotImplementedError()
+        
+    def visit_declarated( self ):
+        raise NotImplementedError()
+
+    def visit_restrict( self ):
+        raise NotImplementedError()
+    
\ No newline at end of file
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/typedef.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/typedef.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/typedef.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/typedef.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/variable.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/variable.py
new file mode 100644
index 0000000..cd5f99c
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/variable.py
@@ -0,0 +1,82 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines class that describes C++ global and member variable declaration
+"""
+
+import declaration
+import dependencies
+import class_declaration
+
+class variable_t( declaration.declaration_t ):
+    """describes C++ global and member variable declaration"""
+
+    def __init__( self, name='', type=None, type_qualifiers=None, value=None, bits=None):
+        """creates class that describes C++ global or member variable"""
+        declaration.declaration_t.__init__( self, name )
+        self._type = type
+        self._type_qualifiers = type_qualifiers
+        self._value = value
+        self._bits = bits
+        self._byte_offset = 0
+        
+    def _get__cmp__items( self ):
+        """implementation details"""
+        return [ self.type, self.type_qualifiers, self.value ]
+
+    def __eq__(self, other):
+        """implementation details"""
+        if not declaration.declaration_t.__eq__( self, other ):
+            return False
+        return self.type == other.type \
+               and self.type_qualifiers == other.type_qualifiers \
+               and self.value == other.value \
+               and self.bits == other.bits
+
+    def _get_type(self):
+        return self._type
+    def _set_type(self, type):
+        self._type = type
+    type = property( _get_type, _set_type
+                     , doc="reference to the variable L{type<type_t>}"    )
+
+    def _get_type_qualifiers(self):
+        return self._type_qualifiers
+    def _set_type_qualifiers(self, type_qualifiers):
+        self._type_qualifiers = type_qualifiers
+    type_qualifiers = property( _get_type_qualifiers, _set_type_qualifiers
+                                , doc="reference to the L{type_qualifiers_t} instance" )
+
+    def _get_value(self):
+        return self._value
+    def _set_value(self, value):
+        self._value = value
+    value = property( _get_value, _set_value
+                      , doc="string, that contains the variable value"    )
+
+    def _get_bits(self):
+        return self._bits
+    def _set_bits(self, bits):
+        self._bits = bits
+    bits = property( _get_bits, _set_bits
+                     , doc="integer, that contains information about how many bit takes bit field")
+
+    def _get_byte_offset(self):
+        return self._byte_offset
+    def _set_byte_offset(self, byte_offset):
+        self._byte_offset = byte_offset
+    byte_offset = property( _get_byte_offset, _set_byte_offset
+                            , doc="integer, offset of the field from the beginning of class.")
+
+
+    @property
+    def access_type(self):
+        if not isinstance( self.parent, class_declaration.class_t ):
+            raise RuntimeError( "access_type functionality only available on member variables and not on global variables" )
+        return self.parent.find_out_member_access_type( self )
+
+    def i_depend_on_them( self, recursive=True ):
+        return [ dependencies.dependency_info_t( self, self.type ) ]
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/__init__.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/__init__.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/__init__.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/__init__.py
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/bsc/__init__.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/bsc/__init__.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/bsc/__init__.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/bsc/__init__.py
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/bsc/c_wrapper.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/bsc/c_wrapper.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/bsc/c_wrapper.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/bsc/c_wrapper.py
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/common_utils.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/common_utils.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/common_utils.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/common_utils.py
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/config.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/config.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/config.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/config.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/__init__.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/__init__.py
new file mode 100644
index 0000000..3062610
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/__init__.py
@@ -0,0 +1,25 @@
+import os
+import sys
+import ctypes
+import pprint
+import logging
+import comtypes
+import comtypes.client
+
+from . import impl_details
+
+from ... import utils
+from ... import declarations
+from .. import config as msvc_cfg
+
+msdia = comtypes.client.GetModule( msvc_cfg.msdia_path )
+
+#~ comtypes_client_gen_dir = comtypes.client.gen_dir
+#~ try:
+    #~ comtypes.client.gen_dir = None
+    #~ msdia = comtypes.client.GetModule( msvc_cfg.msdia_path )
+#~ finally:
+    #~ comtypes.client.gen_dir = comtypes_client_gen_dir
+
+from loader import decl_loader_t
+
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/enums.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/enums.py
new file mode 100644
index 0000000..cb33e5f
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/enums.py
@@ -0,0 +1,60 @@
+from ... import utils #import utils from pygccxml package
+
+class BasicType(utils.enum):
+    btNoType   = 0
+    btVoid     = 1
+    btChar     = 2
+    btWChar    = 3
+    btInt      = 6
+    btUInt     = 7
+    btFloat    = 8
+    btBCD      = 9
+    btBool     = 10
+    btLong     = 13
+    btULong    = 14
+    btCurrency = 25
+    btDate     = 26
+    btVariant  = 27
+    btComplex  = 28
+    btBit      = 29
+    btBSTR     = 30
+    btHresult  = 31
+
+
+
+
+#Adding code, that was not generated for some reason.
+class UdtKind(utils.enum):
+   UdtStruct, UdtClass, UdtUnion = (0, 1, 2)
+
+class CV_access_e(utils.enum):
+   CV_private, CV_protected, CV_public = (1, 2, 3)
+
+class NameSearchOptions(utils.enum):
+   nsNone               = 0
+   nsfCaseSensitive     = 0x1
+   nsfCaseInsensitive   = 0x2
+   nsfFNameExt          = 0x4
+   nsfRegularExpression = 0x8
+   nsfUndecoratedName   = 0x10
+
+   # For backward compabibility:
+   nsCaseSensitive           = nsfCaseSensitive
+   nsCaseInsensitive         = nsfCaseInsensitive
+   nsFNameExt = nsfFNameExt
+   nsRegularExpression       = nsfRegularExpression | nsfCaseSensitive
+   nsCaseInRegularExpression = nsfRegularExpression | nsfCaseInsensitive
+
+
+class DataKind( utils.enum ):
+   DataIsUnknown        = 0
+   DataIsLocal          = 1
+   DataIsStaticLocal    = 2
+   DataIsParam          = 3
+   DataIsObjectPtr      = 4
+   DataIsFileStatic     = 5
+   DataIsGlobal         = 6
+   DataIsMember         = 7
+   DataIsStaticMember   = 8
+   DataIsConstant       = 9
+
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/impl_details.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/impl_details.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/impl_details.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/impl_details.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/kb.txt b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/kb.txt
new file mode 100644
index 0000000..e72ddf2
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/kb.txt
@@ -0,0 +1,17 @@
+url: http://www.hightechtalks.com/visual-studio-net-debugging/re-using-dia-sdk-find-360868.html
+Q: how to find out member variable offset?
+A (By Oleg):
+1. Assuming that you have IDiaSymbol interface pointer for the class (UDT) symbol,
+use IDiaSymbol::findChildren (with SymTagData as the tag) to lookup the field
+with the given name (or all fields).
+
+2. IDiaSymbol::findChildren will give you IDiaEnumSymbols interface, which you can use
+to retrieve IDiaSymbol for the field(s).
+
+3. Using the field's IDiaSymbol interface, call IDiaSymbol::get_locationType to determine
+the location of the field.
+If the location is LocIsThisRel, use IDiaSymbol::get_offset to obtain the offset.
+If the location is LocIsStatic, use IDiaSymbol::get_addressSection and IDiaSymbol::get_addressOffset,
+or IDiaSymbol::get_relativeVirtualAddress, or IDiaSymbol::get_virtualAddress to obtain
+the address of the static member.
+
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/loader.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/loader.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/loader.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/msvc/pdb/loader.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/__init__.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/__init__.py
new file mode 100644
index 0000000..695e9c6
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/__init__.py
@@ -0,0 +1,61 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""Parser sub-package.
+"""
+
+from config import config_t
+from config import gccxml_configuration_t
+
+from project_reader import COMPILATION_MODE
+from project_reader import project_reader_t
+from project_reader import file_configuration_t
+from project_reader import create_text_fc
+from project_reader import create_source_fc
+from project_reader import create_gccxml_fc
+from project_reader import create_cached_source_fc
+
+from source_reader import source_reader_t
+from source_reader import gccxml_runtime_error_t
+from declarations_cache import cache_base_t
+from declarations_cache import file_cache_t
+from declarations_cache import dummy_cache_t
+from directory_cache import directory_cache_t
+#shortcut
+CONTENT_TYPE = file_configuration_t.CONTENT_TYPE
+
+
+def parse( files
+           , config=None
+           , compilation_mode=COMPILATION_MODE.FILE_BY_FILE
+           , cache=None ):
+    """Parse header files.
+
+    @param files: The header files that should be parsed
+    @type files: list of str
+    @param config: Configuration object or None
+    @type config: L{config_t}
+    @param compilation_mode: Determines whether the files are parsed individually or as one single chunk
+    @type compilation_mode: L{COMPILATION_MODE}
+    @param cache: Declaration cache (None=no cache)
+    @type cache: L{cache_base_t} or str
+    @returns: Declarations
+    """
+        
+    if not config:
+        config = config_t()
+    parser = project_reader_t( config=config, cache=cache )
+    answer = parser.read_files(files, compilation_mode)
+    return answer
+
+def parse_string(content, config=None):
+    if not config:
+        config = config_t()
+    parser = project_reader_t(config )
+    return parser.read_string(content)
+
+def parse_xml_file( content, config=None ):
+    parser = source_reader_t( config )
+    return parser.read_xml_file( content )
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/config.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/config.py
new file mode 100644
index 0000000..3f528a2
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/config.py
@@ -0,0 +1,191 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""This module contains the implementation of the L{config_t} class.
+"""
+
+import os
+import sys
+import copy
+
+class parser_configuration_t(object):
+    """Configuration object to collect parameters for invoking C++ parser
+
+    This class serves as a base class for the parameters that can be used
+    to customize the call to C++ parser. This class also allows users to work with
+    relative files paths. In this case files are searched in the following order:
+
+    1. current directory
+
+    2. working directory
+
+    3. additional include paths specified by the user
+
+    """
+    def __init__( self
+                  , working_directory='.'
+                  , include_paths=None
+                  , define_symbols=None
+                  , undefine_symbols=None
+                  , cflags=""
+                  , compiler=None):
+        """Constructor.
+        """
+        object.__init__( self )
+        self.__working_directory = working_directory
+
+        if not include_paths:
+            include_paths = []
+        self.__include_paths = include_paths
+
+        if not define_symbols:
+            define_symbols = []
+        self.__define_symbols = define_symbols
+
+        if not undefine_symbols:
+            undefine_symbols = []
+        self.__undefine_symbols = undefine_symbols
+
+        self.__cflags = cflags
+
+        self.__compiler = compiler
+
+    def clone(self):
+        raise NotImplementedError( self.__class__.__name__ )
+
+    def __get_working_directory(self):
+        return self.__working_directory
+    def __set_working_directory(self, working_dir):
+        self.__working_directory=working_dir
+    working_directory = property( __get_working_directory, __set_working_directory )
+
+    @property
+    def include_paths(self):
+        """list of include paths to look for header files"""
+        return self.__include_paths
+
+    @property
+    def define_symbols(self):
+        """list of "define" directives """
+        return self.__define_symbols
+
+    @property
+    def undefine_symbols(self):
+        """list of "undefine" directives """
+        return self.__undefine_symbols
+
+    @property
+    def compiler(self):
+        """compiler name to simulate"""
+        return self.__compiler
+
+    def __get_cflags(self):
+        return self.__cflags
+    def __set_cflags(self, val):
+        self.__cflags = val
+    cflags = property( __get_cflags, __set_cflags
+                      , doc="additional flags to pass to compiler" )
+
+    def __ensure_dir_exists( self, dir_path, meaning ):
+        if os.path.isdir( dir_path ):
+            return
+        msg = None
+        if os.path.exists( self.working_directory ):
+            raise RuntimeError( '%s("%s") does not exist!' % ( meaning, dir_path ) )
+        else:
+            raise RuntimeError( '%s("%s") should be "directory", not a file.' % ( meaning, dir_path ) )
+
+
+    def raise_on_wrong_settings( self ):
+        """validates the configuration settings and raises RuntimeError on error"""
+        self.__ensure_dir_exists( self.working_directory, 'working directory' )
+        map( lambda idir: self.__ensure_dir_exists( idir, 'include directory' )
+             , self.include_paths )
+
+
+class gccxml_configuration_t(parser_configuration_t):
+    """Configuration object to collect parameters for invoking gccxml.
+
+    This class serves as a container for the parameters that can be used
+    to customize the call to gccxml.
+    """
+    def __init__( self
+                  , gccxml_path=''
+                  , working_directory='.'
+                  , include_paths=None
+                  , define_symbols=None
+                  , undefine_symbols=None
+                  , start_with_declarations=None
+                  , ignore_gccxml_output=False
+                  , cflags=""
+                  , compiler=None):
+        """Constructor.
+        """
+        parser_configuration_t.__init__( self
+                                         , working_directory=working_directory
+                                         , include_paths=include_paths
+                                         , define_symbols=define_symbols
+                                         , undefine_symbols=undefine_symbols
+                                         , cflags=cflags
+                                         , compiler=compiler)
+
+        self.__gccxml_path = gccxml_path
+
+        if not start_with_declarations:
+            start_with_declarations = []
+        self.__start_with_declarations = start_with_declarations
+
+        self.__ignore_gccxml_output = ignore_gccxml_output
+
+    def clone(self):
+        return copy.deepcopy( self )
+
+    def __get_gccxml_path(self):
+        return self.__gccxml_path
+    def __set_gccxml_path(self, new_path ):
+        self.__gccxml_path = new_path
+    gccxml_path = property( __get_gccxml_path, __set_gccxml_path
+                            , doc="gccxml binary location" )
+
+    @property
+    def start_with_declarations(self):
+        """list of declarations gccxml should start with, when it dumps declaration tree"""
+        return self.__start_with_declarations
+
+    def __get_ignore_gccxml_output(self):
+        return self.__ignore_gccxml_output
+    def __set_ignore_gccxml_output(self, val=True):
+        self.__ignore_gccxml_output = val
+    ignore_gccxml_output = property( __get_ignore_gccxml_output, __set_ignore_gccxml_output
+                                    , doc="set this property to True, if you want pygccxml to ignore any error\\warning that comes from gccxml" )
+
+
+    def raise_on_wrong_settings( self ):
+        super( gccxml_configuration_t, self ).raise_on_wrong_settings()
+        if os.path.isfile( self.gccxml_path ):
+            return
+        if sys.platform == 'win32':
+            gccxml_name = 'gccxml' + '.exe'
+            environment_var_delimiter = ';'
+        elif sys.platform == 'linux2' or sys.platform == 'darwin':
+            gccxml_name = 'gccxml'
+            environment_var_delimiter = ':'
+        else:
+            raise RuntimeError( 'unable to find out location of gccxml' )
+        may_be_gccxml = os.path.join( self.gccxml_path, gccxml_name )
+        if os.path.isfile( may_be_gccxml ):
+            self.gccxml_path = may_be_gccxml
+        else:
+            for path in os.environ['PATH'].split( environment_var_delimiter ):
+                gccxml_path = os.path.join( path, gccxml_name )
+                if os.path.isfile( gccxml_path ):
+                    self.gccxml_path = gccxml_path
+                    break
+            else:
+                msg = 'gccxml_path("%s") should exists or to be a valid file name.' \
+                      % self.gccxml_path
+                raise RuntimeError( msg )
+
+config_t = gccxml_configuration_t #backward computability
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/declarations_cache.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/declarations_cache.py
new file mode 100644
index 0000000..2156e0a
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/declarations_cache.py
@@ -0,0 +1,237 @@
+#! /usr/bin/python
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import os
+import md5
+import time
+import cPickle 
+from pygccxml import utils
+import config as cxx_parsers_cfg
+
+def file_signature( filename ):
+    if not os.path.isfile( filename ):
+        return None
+    if not os.path.exists( filename ):
+        return None
+    # Extend here to use md5 hash for signature
+    # - This change allows duplicate autogenerated files to be recognized
+    #return os.path.getmtime( source )
+    sig = md5.new()
+    f = file(filename,'r')
+    sig.update(f.read())
+    f.close()    
+    return sig.hexdigest()
+
+def configuration_signature( config ):
+    """ Return a signature for a configuration (config_t)
+        object.  This can then be used as a key in the cache.
+        This method must take into account anything about
+        a configuration that could cause the declarations generated
+        to be different between runs.
+    """
+    sig = md5.new()
+    if isinstance( config, cxx_parsers_cfg.gccxml_configuration_t ):
+        sig.update(str(config.gccxml_path))
+    sig.update(str(config.working_directory))
+    if isinstance( config, cxx_parsers_cfg.gccxml_configuration_t ):
+        sig.update(str(config.cflags))
+    for p in config.include_paths:
+        sig.update(str(p))
+    for s in config.define_symbols:
+        sig.update(str(s))
+    for u in config.undefine_symbols:
+        sig.update(str(u))    
+    return sig.hexdigest()
+
+class cache_base_t( object ):
+    logger = utils.loggers.declarations_cache
+    
+    def __init__( self ):
+        object.__init__(self)
+        
+    def flush(self):
+        """ Flush (write out) the cache to disk if needed. """
+        raise NotImplementedError()
+        
+    def update(self, source_file, configuration, declarations, included_files):
+        """ Update cache entry.
+        @param source_file: path to the C++ source file being parsed
+        @param configuration: configuration used in parsing (config_t)
+        @param declarations: declaration tree found when parsing
+        @param included_files: files included by parsing.
+        """
+        raise NotImplementedError()    
+        
+    def cached_value(self, source_file, configuration):
+        """ Return declarations we have cached for the source_file and configuration
+            given.
+        @param source_file: path to the C++ source file being parsed.
+        @param configuration: configuration to use for parsing (config_t)
+        """        
+        raise NotImplementedError()
+
+class record_t( object ):
+    def __init__( self
+                  , source_signature
+                  , config_signature
+                  , included_files
+                  , included_files_signature
+                  , declarations ):
+        self.__source_signature = source_signature
+        self.__config_signature = config_signature
+        self.__included_files = included_files
+        self.__included_files_signature = included_files_signature
+        self.__declarations = declarations
+        self.__was_hit = True # Track if there was a cache hit
+    
+    def _get_was_hit(self):
+        return self.__was_hit
+    def _set_was_hit(self, was_hit):
+        self.__was_hit = was_hit
+    was_hit = property( _get_was_hit, _set_was_hit )
+    
+    def key(self):
+        return ( self.__source_signature, self.__config_signature)
+    
+    @staticmethod
+    def create_key( source_file, configuration ):
+        return ( file_signature(source_file)
+                 , configuration_signature(configuration))                 
+    
+    def __source_signature(self):
+        return self.__source_signature
+    source_signature = property( __source_signature )
+    
+    def __config_signature(self):
+        return self.__config_signature
+    config_signature = property( __config_signature )
+        
+    def __included_files(self):
+        return self.__included_files
+    included_files = property( __included_files )
+    
+    def __included_files_signature(self):
+        return self.__included_files_signature
+    included_files_signature = property( __included_files_signature )
+           
+    def __declarations(self):
+        return self.__declarations
+    declarations = property( __declarations )   
+
+class file_cache_t( cache_base_t ):   
+    """ Cache implementation to store data in a pickled form in a file. 
+        This class contains some cache logic that keeps track of which entries
+        have been 'hit' in the cache and if an entry has not been hit then
+        it is deleted at the time of the flush().  This keeps the cache from
+        growing larger when files change and are not used again.        
+    """
+
+    def __init__( self, name ):
+        """
+        @param name: name of the cache file.
+        """
+        cache_base_t.__init__( self )       
+        self.__name = name                              # Name of cache file
+        self.__cache = self.__load( self.__name )       # Map record_key to record_t
+        self.__needs_flushed = not bool( self.__cache ) # If empty then we need to flush        
+        for entry in self.__cache.itervalues(): # Clear hit flags
+            entry.was_hit = False
+        
+    @staticmethod
+    def __load( file_name ):
+        " Load pickled cache from file and return the object. "
+        cache = None
+        if os.path.exists( file_name ) and not os.path.isfile( file_name ):
+            raise RuntimeError( 'Cache should be initialized with valid full file name' )
+        if not os.path.exists( file_name ):
+            file( file_name, 'w+b' ).close()
+            return {}
+        cache_file_obj = file( file_name, 'rb' )
+        try:
+            file_cache_t.logger.info( 'Loading cache file "%s".' % file_name )
+            start_time = time.clock()
+            cache = cPickle.load( cache_file_obj )            
+            file_cache_t.logger.debug( "Cache file has been loaded in %.1f secs"%( time.clock() - start_time ) )
+            file_cache_t.logger.debug( "Found cache in file: [%s]  entries: %s"
+                               % ( file_name, len( cache.keys() ) ) )
+        except Exception, error:
+            file_cache_t.logger.exception( "Error occured while reading cache file: %s", error )
+            cache_file_obj.close()
+            file_cache_t.logger.info( "Invalid cache file: [%s]  Regenerating." % file_name )
+            file(file_name, 'w+b').close()   # Create empty file
+            cache = {}                       # Empty cache            
+        return cache
+        
+    def flush(self):
+        # If not marked as needing flushed, then return immediately
+        if not self.__needs_flushed:
+            self.logger.debug("Cache did not change, ignoring flush.")
+            return
+        
+        # Remove entries that did not get a cache hit
+        num_removed = 0
+        for key in self.__cache.keys():
+            if not self.__cache[key].was_hit:
+                num_removed += 1
+                del self.__cache[key]
+        if num_removed > 0:
+            self.logger.debug(  "There are %s removed entries from cache." % num_removed )
+        # Save out the cache to disk
+        cache_file = file( self.__name, 'w+b' )
+        cPickle.dump( self.__cache, cache_file, cPickle.HIGHEST_PROTOCOL )
+        cache_file.close()
+
+    def update(self, source_file, configuration, declarations, included_files):
+        """ Update a cached record with the current key and value contents. """
+        record = record_t( source_signature=file_signature(source_file)
+                           , config_signature=configuration_signature(configuration)
+                           , included_files=included_files
+                           , included_files_signature=map( file_signature, included_files)
+                           , declarations=declarations 
+                        )
+        # Switched over to holding full record in cache so we don't have
+        # to keep creating records in the next method.
+        self.__cache[ record.key() ] = record
+        self.__cache[ record.key() ].was_hit = True
+        self.__needs_flushed = True
+    
+    def cached_value(self, source_file, configuration):
+        """ Attempt to lookup the cached decls for the given file and configuration.
+            If not found or signature check fails, returns None.
+        """
+        key = record_t.create_key(source_file, configuration)
+        if not self.__cache.has_key( key ):
+            return None
+        record = self.__cache[key]
+        if self.__is_valid_signature( record ):
+            record.was_hit = True                  # Record cache hit
+            return record.declarations
+        else: #some file has been changed 
+            del self.__cache[key]
+            return None
+        
+    def __is_valid_signature( self, record ):
+        # This is now part of key
+        #if self.__signature( record.source_file ) != record.source_file_signature:
+        #    return False
+        for index, included_file in enumerate( record.included_files ):
+            if file_signature( included_file ) != record.included_files_signature[index]:
+                return False
+        return True
+        
+
+class dummy_cache_t( cache_base_t ):
+    def __init__( self ):
+        cache_base_t.__init__(self)
+        
+    def flush(self):
+        pass
+        
+    def update(self, source_file, configuration, declarations, included_files):
+        pass
+        
+    def cached_value(self, source_file, configuration):
+        return None
\ No newline at end of file
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/directory_cache.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/directory_cache.py
new file mode 100644
index 0000000..03b9e68
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/directory_cache.py
@@ -0,0 +1,528 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+# The initial version of the directory_cache_t class was written
+# by Matthias Baas (baas at ira.uka.de).
+
+"""Directory cache implementation.
+
+This module contains the implementation of a cache that uses individual
+files stored in a dedicated cache directory to store the cached contents.
+The cache class is L{directory_cache_t} which can be passed to the C{cache}
+argument of the L{parse()} function.
+"""
+
+import os, os.path, gzip, md5
+import cPickle
+import declarations_cache
+
+class index_entry_t:
+    """Entry of the index table in the directory cache index.
+
+    Each cached header file (i.e. each *.cache file) has a corresponding
+    index_entry_t object. This object is used to determine whether the
+    cache file with the declarations is still valid or not.
+
+    This class is a helper class for the directory_cache_t class.
+    """
+    
+    def __init__( self, filesigs, configsig ):
+        """Constructor.
+
+        filesigs is a list of tuples (fileid, sig)...
+        configsig is the signature of the configuration object.
+        """
+        self.filesigs = filesigs
+        self.configsig = configsig
+
+    def __getstate__(self):
+        return (self.filesigs, self.configsig)
+
+    def __setstate__(self, state):
+        self.filesigs, self.configsig = state
+ 
+
+class directory_cache_t ( declarations_cache.cache_base_t ):
+    """Cache class that stores its data as multiple files inside a directory.
+
+    The cache stores one index file called "index.dat" which is always
+    read by the cache when the cache object is created. Each header file
+    will have its corresponding *.cache file that stores the declarations
+    found in the header file. The index file is used to determine whether
+    a *.cache file is still valid or not (by checking if one of the dependent
+    files (i.e. the header file itself and all included files) have been
+    modified since the last run).
+    """
+
+    def __init__( self, dir="cache", compression=False, md5_sigs=True ):
+        """Constructor.
+
+        dir is the cache directory (it is created if it does not exist).
+        If compression is set to True the cache files will be compressed
+        using gzip.
+        md5_sigs determines whether file modifications is checked by
+        computing a md5 digest or by checking the modification date.
+        """
+        declarations_cache.cache_base_t.__init__(self)
+
+        # Cache directory
+        self.__dir = os.path.abspath(dir)
+
+        # Flag that determines whether the cache files will be compressed
+        self.__compression = compression
+
+        # Flag that determines whether the signature is a md5 digest or
+        # the modification time
+        # (this flag is passed to the filename_repository_t class)
+        self.__md5_sigs = md5_sigs
+
+        # Filename repository
+        self.__filename_rep = filename_repository_t(self.__md5_sigs)
+
+        # Index dictionary (Key is the value returned by _create_cache_key()
+        # (which is based on the header file name) and value is an
+        # index_entry_t object)
+        self.__index = {}
+
+        # Flag that indicates whether the index was modified
+        self.__modified_flag = False
+
+        # Check if dir refers to an existing file...
+        if os.path.isfile(self.__dir):
+            raise ValueError, "Cannot use %s as cache directory. There is already a file with that name."%self.__dir
+
+        # Load the cache or create the cache directory...
+        if os.path.isdir(self.__dir):
+            self._load()
+        else:
+            # Create the cache directory...
+            os.mkdir(self.__dir)
+
+    def flush(self):
+        """Save the index table to disk."""
+
+        self._save()      
+#        self.__filename_rep._dump()
+
+    def update(self, source_file, configuration, declarations, included_files):
+        """Replace a cache entry by a new value.
+
+        @param source_file: Header file name.
+        @type source_file: str
+        @param configuration: Configuration  object.
+        @type configuration: L{config_t}
+        @param declarations: Declarations contained in the header file.
+        @type declarations: picklable object
+        @param included_files: Dependent files
+        @type included_files: list of str
+        """
+        # Normlize all paths...
+        source_file = os.path.normpath(source_file)
+        included_files = map(lambda p: os.path.normpath(p), included_files)
+
+        # Create the list of dependent files. This is the included_files list
+        # + the source file. Duplicate names are removed.
+        dependent_files = {}
+        for name in [source_file]+included_files:
+            dependent_files[name] = 1
+        dependent_files = dependent_files.keys()
+
+        key = self._create_cache_key(source_file)
+        # Remove an existing entry (if there is one)
+        # After calling this method, it is guaranteed that __index[key]
+        # does not exist anymore.
+        self._remove_entry(source_file, key)
+
+        # Create a new entry...
+
+        # Create the sigs of all dependent files...
+        filesigs = []
+        for filename in dependent_files:
+            id_,sig = self.__filename_rep.acquire_filename(filename)
+            filesigs.append((id_,sig))
+
+        configsig = self._create_config_signature(configuration)
+        entry = index_entry_t(filesigs, configsig)
+        self.__index[key] = entry
+        self.__modified_flag = True
+
+        # Write the declarations into the cache file...
+        cachefilename = self._create_cache_filename(source_file)
+        self._write_file(cachefilename, declarations)
+
+       
+    def cached_value(self, source_file, configuration):
+        """Return the cached declarations or None.
+
+        @param source_file: Header file name
+        @type source_file: str
+        @param configuration: Configuration object
+        @type configuration: L{config_t}
+        @return: Cached declarations or None
+        """
+
+        # Check if the cache contains an entry for source_file
+        key = self._create_cache_key(source_file)
+        entry = self.__index.get(key)
+        if entry==None:
+#            print "CACHE: %s: Not cached"%source_file            
+            return None
+
+        # Check if the entry is still valid. It is not valid if:
+        #  - the source_file has been updated
+        #  - the configuration object has changed (i.e. the header is parsed
+        #    by gccxml with different settings which may influence the
+        #    declarations)
+        #  - the included files have been updated
+        #    (this list is part of the cache entry as it cannot be known
+        #    by the caller when cached_value() is called. It was instead
+        #    passed to update())
+
+        # Check if the config is different...
+        configsig = self._create_config_signature(configuration)
+        if configsig!=entry.configsig:
+#            print "CACHE: %s: Config mismatch"%source_file
+            return None
+
+        # Check if any of the dependent files has been modified...
+        for id_, sig in entry.filesigs:
+            if self.__filename_rep.is_file_modified(id_, sig):
+#                print "CACHE: %s: Entry not up to date"%source_file
+                return None
+
+        # Load and return the cached declarations
+        cachefilename = self._create_cache_filename(source_file)
+        decls = self._read_file(cachefilename)
+
+#        print "CACHE: Using cached decls for",source_file
+        return decls
+
+    def _load(self):
+        """Load the cache.
+
+        Loads the file index.dat which contains the index table and
+        the file name repository.
+
+        This method is called by the constructor.
+        """
+
+        indexfilename = os.path.join(self.__dir, "index.dat")
+        if os.path.exists(indexfilename):
+            data = self._read_file(indexfilename)
+            self.__index = data[0]
+            self.__filename_rep = data[1]
+            if self.__filename_rep._md5_sigs!=self.__md5_sigs:
+                print "CACHE: Warning: md5_sigs stored in the cache is set to %s."%self.__filename_rep._md5_sigs
+                print "       Please remove the cache to change this setting."
+                self.__md5_sigs = self.__filename_rep._md5_sigs
+        else:
+            self.__index = {}
+            self.__filename_rep = filename_repository_t(self.__md5_sigs)
+            
+        self.__modified_flag = False
+
+    def _save(self):
+        """Save the cache index if it was modified.
+
+        Saves the index table and the file name repository in the file
+        index.dat.
+        """
+        if self.__modified_flag:
+            self.__filename_rep.update_id_counter()
+            indexfilename = os.path.join(self.__dir, "index.dat")
+            self._write_file(indexfilename, (self.__index,self.__filename_rep))
+            self.__modified_flag = False
+
+    def _read_file(self, filename):
+        """Read a Python object from a cache file.
+
+        Reads a pickled object from disk and returns it.
+
+        @param filename: Name of the file that should be read.
+        @type filename: str
+        @returns: Unpickled file contents
+        """
+        if self.__compression:
+            f = gzip.GzipFile(filename, "rb")
+        else:
+            f = file(filename, "rb")
+        res = cPickle.load(f)
+        f.close()
+        return res
+
+    def _write_file(self, filename, data):
+        """Write a data item into a file.
+
+        The data object is written to a file using the pickle mechanism.
+
+        @param filename: Output file name
+        @type filename: str
+        @param data: A Python object that will be pickled
+        @type data: picklable object
+        """
+        if self.__compression:
+            f = gzip.GzipFile(filename, "wb")
+        else:
+            f = file(filename, "wb")
+        cPickle.dump(data, f, cPickle.HIGHEST_PROTOCOL)
+        f.close()        
+        
+    def _remove_entry(self, source_file, key):
+        """Remove an entry from the cache.
+
+        source_file is the name of the header and key is its corresponding
+        cache key (obtained by a call to L{_create_cache_key()}).
+        The entry is removed from the index table, any referenced file
+        name is released and the cache file is deleted.
+
+        If key references a non-existing entry, the method returns
+        immediately.
+
+        @param source_file: Header file name
+        @type source_file: str
+        @param key: Key value for the specified header file
+        @type key: hashable object
+        """
+        
+        entry = self.__index.get(key)
+        if entry==None:
+            return
+
+        # Release the referenced files...
+        for id_, sig in entry.filesigs:
+            self.__filename_rep.release_filename(id_)
+
+        # Remove the cache entry...
+        del self.__index[key]
+        self.__modified_flag = True
+
+        # Delete the corresponding cache file...
+        cachefilename = self._create_cache_filename(source_file)
+        try:
+            os.remove(cachefilename)
+        except OSError, e:
+            print "Could not remove cache file (%s)"%e
+
+
+    def _create_cache_key(self, source_file):
+        """Return the cache key for a header file.
+
+        @param source_file: Header file name
+        @type source_file: str
+        @returns: Key for the given header file
+        @rtype: str
+        """
+        path, name = os.path.split(source_file)
+        return name+str(hash(path))
+
+    def _create_cache_filename(self, source_file):
+        """Return the cache file name for a header file.
+
+        @param source_file: Header file name
+        @type source_file: str
+        @returns: Cache file name (*.cache)
+        @rtype: str
+        """
+        res = self._create_cache_key(source_file)+".cache"
+        return os.path.join(self.__dir, res)
+
+    def _create_config_signature(self, config):
+        """Return the signature for a config object.
+
+        The signature is computed as md5 digest of the contents of
+        working_directory, include_paths, define_symbols and
+        undefine_symbols.
+
+        @param config: Configuration object
+        @type config: L{config_t}
+        @returns: Signature
+        @rtype: str
+        """
+        m = md5.new()
+        m.update(config.working_directory)
+        map(lambda p: m.update(p), config.include_paths)
+        map(lambda p: m.update(p), config.define_symbols)
+        map(lambda p: m.update(p), config.undefine_symbols)
+        map(lambda p: m.update(p), config.cflags)
+        return m.digest()
+
+
+        
+
+class filename_entry_t:
+    """This is a record stored in the filename_repository_t class.
+
+    The class is an internal class used in the implementation of the
+    filename_repository_t class and it just serves as a container for
+    the file name and the reference count.
+    """
+
+    def __init__( self, filename ):
+        """Constructor.
+
+        The reference count is initially set to 0.
+        """
+        # Filename
+        self.filename = filename
+        # Reference count
+        self.refcount = 0
+        
+        # Cached signature value for the file.
+        # If sig_valid flag is False, the signature still has to be computed,
+        # otherwise the cached value can be used.
+        # These attributes must not be pickled!
+        self.sig_valid = False
+        self.signature = None
+
+    def __getstate__(self):
+        # Only pickle filename and refcount
+        return (self.filename, self.refcount)
+
+    def __setstate__(self, state):
+        self.filename, self.refcount = state
+        self.sig_valid = False
+        self.signature = None
+
+    def inc_ref_count(self):
+        """Increase the reference count by 1."""
+        self.refcount += 1
+
+    def dec_ref_count(self):
+        """Decrease the reference count by 1 and return the new count."""
+        self.refcount -= 1
+        return self.refcount
+
+
+class filename_repository_t:
+    """File name repository.
+
+    This class stores file names and can check whether a file has been
+    modified or not since a previous call.
+    A file name is stored by calling acquire_filename() which returns
+    an ID and a signature of the file. The signature can later be used
+    to check if the file was modified by calling is_file_modified().
+    If the file name is no longer required release_filename() should be
+    called so that the entry can be removed from the repository.
+    """
+
+    def __init__( self, md5_sigs ):
+        """Constructor.
+        """
+        
+        # Flag that determines whether the signature is a md5 digest or
+        # the modification time
+        # (this flag is passed to the filename_repository_t class)
+        self._md5_sigs = md5_sigs
+
+        # ID lookup table (key: filename / value: id_)
+        self.__id_lut = {}
+
+        # Entry dictionary (key: id_ / value: filename_entry_t)
+        # This dictionary contains the actual data.
+        # It must always hold that each entry in __entries has a corresponding
+        # entry in __id_lut (i.e. the keys in __id_lut must be the names
+        # stored in __entries)
+        self.__entries = {}
+
+        # A counter for new ids
+        self.__next_id = 1
+
+    def acquire_filename(self, name):
+        """Acquire a file name and return its id and its signature.
+        """
+        id_ = self.__id_lut.get(name)
+        # Is this a new entry? 
+        if id_==None:
+            # then create one...
+            id_ = self.__next_id
+            self.__next_id += 1
+            self.__id_lut[name] = id_
+            entry = filename_entry_t(name)
+            self.__entries[id_] = entry
+        else:
+            # otherwise obtain the entry...
+            entry = self.__entries[id_]
+
+        entry.inc_ref_count()
+        return id_, self._get_signature(entry)
+            
+    def release_filename(self, id_):
+        """Release a file name.
+        """
+        entry = self.__entries.get(id_)
+        if entry==None:
+            raise ValueError, "Invalid filename id (%d)"%id_
+
+        # Decrease reference count and check if the entry has to be removed...
+        if entry.dec_ref_count()==0:
+            del self.__entries[id_]
+            del self.__id_lut[entry.filename]
+
+    def is_file_modified(self, id_, signature):
+        """Check if the file referred to by id_ has been modified.
+        """
+        entry = self.__entries.get(id_)
+        if entry==None:
+            raise ValueError, "Invalid filename id_ (%d)"%id_
+
+        # Is the signature already known? 
+        if entry.sig_valid:
+            # use the cached signature
+            filesig = entry.signature
+        else:
+            # compute the signature and store it
+            filesig = self._get_signature(entry)
+            entry.signature = filesig
+            entry.sig_valid = True
+
+        return filesig!=signature
+
+    def update_id_counter(self):
+        """Update the id_ counter so that it doesn't grow forever.
+        """
+        if len(self.__entries)==0:
+            self.__next_id = 1
+        else:
+            self.__next_id = max(self.__entries.keys())+1
+
+    def _get_signature(self, entry):
+        """Return the signature of the file stored in entry.
+        """
+        if self._md5_sigs:
+            # return md5 digest of the file content...
+            if not os.path.exists(entry.filename):
+                return None
+            try:
+                f = file(entry.filename)
+            except IOError, e:
+                print "Cannot determine md5 digest:",e
+                return None
+            data = f.read()
+            f.close()
+            return md5.new(data).digest()
+        else:
+            # return file modification date...
+            try:
+                return os.path.getmtime(entry.filename)
+            except OSError, e:
+                return None
+
+    def _dump(self):
+        """Dump contents for debugging/testing.
+        """
+
+        print 70*"-"
+        print "ID lookup table:"
+        for name in self.__id_lut:
+            id_ = self.__id_lut[name]
+            print "  %s -> %d"%(name, id_)
+
+        print 70*"-"
+        print "%-4s %-60s %s"%("ID", "Filename", "Refcount")
+        print 70*"-"
+        for id_ in self.__entries:
+            entry = self.__entries[id_]
+            print "%04d %-60s %d"%(id_, entry.filename, entry.refcount)
+
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/etree_scanner.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/etree_scanner.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/etree_scanner.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/etree_scanner.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/linker.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/linker.py
new file mode 100644
index 0000000..b7053a4
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/linker.py
@@ -0,0 +1,272 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import types
+from pygccxml.declarations import *
+
+class linker_t( decl_visitor_t, type_visitor_t, object ):
+    def __init__( self, decls, types, access, membership, files ):
+        decl_visitor_t.__init__(self)
+        type_visitor_t.__init__(self)
+        object.__init__(self)
+
+        self.__decls = decls
+        self.__types = types
+        self.__access = access
+        self.__membership = membership
+        self.__files = files
+        self.__inst = None
+        
+        self.__compiler = None 
+        if self.__decls:
+            for d in self.__decls.itervalues():
+                self.__compiler = d.compiler
+                break
+    
+    def _get_inst(self):
+        return self.__inst
+    def _set_inst(self, inst):
+        self.__inst = inst
+        #use inst, to reduce attribute access time
+        if isinstance( inst, declaration_t ) and inst.location:
+            inst.location.file_name = self.__files[inst.location.file_name]
+    instance = property( _get_inst, _set_inst )
+
+    def __link_type(self, type_id):
+        if type_id is None:
+            return None #in some situations type_id is None, return_type of constructor or destructor
+        elif self.__types.has_key( type_id ):
+            return self.__types[type_id]
+        elif self.__decls.has_key( type_id ):
+            base = declarated_t( declaration=self.__decls[ type_id ] )
+            self.__types[type_id] = base
+            return base
+        elif '...' == type_id:
+            return ellipsis_t()
+        else:
+            return unknown_t()
+
+    def __link_compound_type(self):        
+        self.__inst.base = self.__link_type( self.__inst.base )
+
+    def __link_members(self):
+        if not self.__membership.has_key( id(self.__inst) ):
+            return 
+        for member in self.__membership[ id(self.__inst) ]:
+            if not self.__access.has_key( member ):
+                continue
+            access = self.__access[member]
+            if not self.__decls.has_key( member ):
+                continue
+            decl = self.__decls[member]
+            if isinstance( self.__inst, class_t ):
+                self.__inst.adopt_declaration( decl, access )
+            else:
+                self.__inst.adopt_declaration( decl )
+
+    def __link_calldef(self):
+        self.__inst.return_type = self.__link_type( self.__inst.return_type )
+        if isinstance( self.__inst, type_t ):
+            linked_args = [ self.__link_type( arg ) for arg in self.__inst.arguments_types ]
+            self.__inst.arguments_types = linked_args
+        else:
+            for arg in self.__inst.arguments:
+                arg.type = self.__link_type(arg.type)
+            for index in range( len( self.__inst.exceptions ) ):
+                try:
+                    self.__inst.exceptions[index] = self.__decls[ self.__inst.exceptions[index] ]
+                except KeyError:
+                    self.__inst.exceptions[index] = self.__link_type( self.__inst.exceptions[index] )
+
+    def visit_member_function( self ):
+        self.__link_calldef()
+
+    def visit_constructor( self ):
+        self.__link_calldef()
+            
+    def visit_destructor( self ):
+        self.__link_calldef()
+
+    def visit_member_operator( self ):
+        self.__link_calldef()
+
+    def visit_casting_operator( self ):
+        self.__link_calldef()
+        #will be fixed by patcher. It is needed because of demangled name taken into account
+        #self.__inst._name = 'operator ' + self.__inst.return_type.decl_string
+
+    def visit_free_function( self ):
+        self.__link_calldef()
+
+    def visit_free_operator( self ):
+        self.__link_calldef()
+
+    def visit_class_declaration(self ):
+        pass
+
+    def visit_class(self ):
+        self.__link_members()
+        #GCC-XML sometimes generates constructors with names that does not match
+        #class name. I think this is because those constructors are compiler 
+        #generated. I need to find out more about this and to talk with Brad 
+
+        new_name = self.__inst._name
+        if templates.is_instantiation( new_name ):
+            new_name = templates.name( new_name )
+            
+        for decl in self.__inst.declarations:
+            if not isinstance( decl, constructor_t ):
+                continue
+            if '.' in decl._name or '$' in decl._name:
+                decl._name = new_name
+
+        bases = self.__inst.bases.split()
+        self.__inst.bases = []
+        for base in bases:
+            #it could be "_5" or "protected:_5"
+            data = base.split(':')
+            base_decl = self.__decls[ data[-1] ]
+            access = ACCESS_TYPES.PUBLIC
+            if 2 == len( data ):
+                access = data[0]
+            self.__inst.bases.append( hierarchy_info_t( base_decl, access ) )
+            base_decl.derived.append( hierarchy_info_t( self.__inst, access ) )
+        
+    def visit_enumeration(self ):
+        pass
+
+    def visit_namespace(self ):
+        self.__link_members()
+
+    def visit_typedef(self ):
+        self.__inst.type = self.__link_type(self.__inst.type)
+
+    def visit_variable(self ):
+        self.__inst.type = self.__link_type(self.__inst.type)
+
+    def visit_void( self ):
+        pass
+
+    def visit_char( self ):
+        pass
+
+    def visit_signed_char( self ):
+        pass
+
+    def visit_unsigned_char( self ):
+        pass
+
+    def visit_wchar( self ):
+        pass
+
+    def visit_short_int( self ):
+        pass
+
+    def visit_short_unsigned_int( self ):
+        pass
+
+    def visit_bool( self ):
+        pass
+
+    def visit_int( self ):
+        pass
+
+    def visit_unsigned_int( self ):
+        pass
+
+    def visit_long_int( self ):
+        pass
+
+    def visit_long_unsigned_int( self ):
+        pass
+
+    def visit_long_long_int( self ):
+        pass
+
+    def visit_long_long_unsigned_int( self ):
+        pass
+
+    def visit_float( self ):
+        pass
+
+    def visit_double( self ):
+        pass
+
+    def visit_long_double( self ):
+        pass
+
+    def visit_complex_long_double(self):
+        pass
+
+    def visit_complex_double(self):
+        pass
+
+    def visit_complex_float(self):
+        pass
+
+    def visit_jbyte(self):
+        pass
+    
+    def visit_jshort(self):
+        pass
+    
+    def visit_jint(self):
+        pass
+    
+    def visit_jlong(self):
+        pass
+    
+    def visit_jfloat(self):
+        pass
+    
+    def visit_jdouble(self):
+        pass
+    
+    def visit_jchar(self):
+        pass
+    
+    def visit_jboolean(self):
+        pass
+
+    def visit_volatile( self ):
+        self.__link_compound_type()
+
+    def visit_const( self ):
+        self.__link_compound_type()
+
+    def visit_pointer( self ):
+        if '0.9' in self.__compiler and isinstance( self.__inst.base, member_variable_type_t ):
+            original_inst = self.__inst
+            self.__inst = self.__inst.base 
+            self.visit_member_variable_type()
+            self.__inst = original_inst
+        else:
+            self.__link_compound_type()
+
+    def visit_reference( self ):
+        self.__link_compound_type()
+
+    def visit_array( self ):
+        self.__link_compound_type()
+
+    def visit_free_function_type( self ):
+        self.__link_calldef()
+
+    def visit_member_function_type( self ):
+        self.__link_calldef()
+        if isinstance( self.__inst, type_t ):
+            self.__inst.class_inst = self.__link_type( self.__inst.class_inst )
+
+    def visit_member_variable_type( self ):
+        self.__inst.variable_type = self.__link_type( self.__inst.variable_type )
+        self.__link_compound_type()
+
+    def visit_declarated( self ):
+        if isinstance( self.__inst.declaration, types.StringTypes ):
+            self.__inst.declaration = self.__decls[self.__inst.declaration]
+
+    def visit_restrict( self ):
+        self.__link_compound_type()
+
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/patcher.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/patcher.py
new file mode 100644
index 0000000..119584b
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/patcher.py
@@ -0,0 +1,189 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+from pygccxml import utils
+from pygccxml import declarations
+
+
+class default_argument_patcher_t( object ):
+    def __init__( self, enums ):
+        object.__init__( self )
+        self.__enums = enums
+        
+    def __call__(self, decl):
+        for arg in decl.arguments:
+            if not arg.default_value:
+                continue
+            fixer = self.__find_fixer( decl, arg )
+            if fixer:
+                arg.default_value = fixer( decl, arg )
+
+    def __find_fixer(self, func, arg):
+        if not arg.default_value:
+            return False
+        elif self.__is_unqualified_enum( func, arg ):
+            return self.__fix_unqualified_enum
+        elif self.__is_double_call( func, arg ):
+            return self.__fix_double_call       
+        elif self.__is_invalid_integral( func, arg ):
+            return self.__fix_invalid_integral
+        elif self.__is_constructor_call( func, arg ):
+            return self.__fix_constructor_call
+        else:
+            return None
+
+    def __join_names( self, prefix, suffix ):
+        if prefix == '::':
+            return '::' + suffix
+        else:
+            return prefix + '::' + suffix
+  
+    def __is_unqualified_enum(self, func, arg):
+        type_ = declarations.remove_reference( declarations.remove_cv( arg.type ) )        
+        if not declarations.is_enum( type_ ):
+            return False
+        enum_type = declarations.enum_declaration( type_ )
+        return enum_type.has_value_name( arg.default_value )
+
+    def __fix_unqualified_enum( self, func, arg):
+        type_ = declarations.remove_reference( declarations.remove_cv( arg.type ) )
+        enum_type = declarations.enum_declaration( type_ )
+        return self.__join_names( enum_type.parent.decl_string, arg.default_value )
+
+    def __is_invalid_integral(self, func, arg):
+        type_ = declarations.remove_reference( declarations.remove_cv( arg.type ) )        
+        if not declarations.is_integral( type_ ):
+            return False
+        try:
+            int( arg.default_value )
+            return False
+        except:
+            return True
+
+    def __fix_invalid_integral(self, func, arg):
+        try:
+            int( arg.default_value )
+            return arg.default_value
+        except:
+            pass
+                
+        try:
+            int( arg.default_value, 16 )
+            if 64 == utils.get_architecture():
+                #on 64 bit architecture, gccxml reports 0fffff, which is valid number
+                #the problem is that in this case it is so buggy so pygccxml can not fix it
+                #users will have to fix the default value manually
+                return arg.default_value
+            default_value = arg.default_value.lower()
+            found_hex = filter( lambda ch: ch in 'abcdef', default_value )
+            if found_hex and not default_value.startswith( '0x' ):
+                int( '0x' + default_value, 16 )
+                return '0x' + default_value
+        except:
+            pass
+        
+        #may be we deal with enum
+        parent = func.parent
+        while parent:
+            found = self.__find_enum( parent, arg.default_value )
+            if found:
+                if declarations.is_fundamental( arg.type ) and ' ' in arg.type.decl_string:
+                    template = '(%s)(%s)'
+                else:
+                    template = '%s(%s)'
+                return template % ( arg.type.decl_string
+                                    , self.__join_names( found.parent.decl_string, arg.default_value ) )
+            else:
+                parent = parent.parent
+        return arg.default_value
+
+    def __find_enum( self, scope, default_value ):
+        #this algorithm could be improved: it could take into account
+        #1. unnamed namespaced
+        #2. location within files
+        
+        for enum in self.__enums:
+            if enum.parent is scope and enum.has_value_name( default_value ):
+                return enum
+        return None
+
+    def __is_double_call( self, func, arg ):
+        call_invocation = declarations.call_invocation
+        dv = arg.default_value
+        found1 = call_invocation.find_args( dv )
+        if found1 == call_invocation.NOT_FOUND:
+            return False
+        found2 = call_invocation.find_args( dv, found1[1] + 1 )
+        if found2 == call_invocation.NOT_FOUND:
+            return False
+        args1 = call_invocation.args( dv[ found1[0] : found1[1] + 1 ] )
+        args2 = call_invocation.args( dv[ found2[0] : found2[1] + 1 ] )
+        return len(args1) == len(args2)
+    
+    def __fix_double_call( self, func, arg ):
+        call_invocation = declarations.call_invocation
+        dv = arg.default_value
+        found1 = call_invocation.find_args( dv )
+        found2 = call_invocation.find_args( dv, found1[1] + 1 )
+        #args1 = call_invocation.args( dv[ found1[0] : found1[1] + 1 ] )
+        args2 = call_invocation.args( dv[ found2[0] : found2[1] + 1 ] )
+        return call_invocation.join( dv[:found1[0]], args2 )
+
+    def __is_constructor_call( self, func, arg ):
+        #if '0.9' in func.compiler:
+        #    return False
+        call_invocation = declarations.call_invocation
+        dv = arg.default_value
+        if not call_invocation.is_call_invocation( dv ):
+            return False
+        name = call_invocation.name( dv )
+        base_type = declarations.base_type( arg.type )
+        if not isinstance( base_type, declarations.declarated_t ):
+            return False
+        decl = base_type.declaration
+        return decl.name == name \
+               or ( isinstance( decl, declarations.class_t ) \
+                    and name in map( lambda typedef: typedef.name, decl.aliases ) )
+
+    def __fix_constructor_call( self, func, arg ):
+        call_invocation = declarations.call_invocation
+        dv = arg.default_value
+        if not call_invocation.is_call_invocation( dv ):
+            return False
+        base_type = declarations.base_type( arg.type )
+        decl = base_type.declaration
+        name, args = call_invocation.split( dv )
+        if decl.name != name:
+            #we have some alias to the class
+            relevant_typedefs = filter( lambda typedef: typedef.name == name
+                                        , decl.aliases )
+            if 1 == len( relevant_typedefs ):
+                f_q_name = self.__join_names( declarations.full_name( relevant_typedefs[0].parent )
+                                              , name )
+            else:#in this case we can not say which typedef user uses:
+                f_q_name = self.__join_names( declarations.full_name( decl.parent )
+                                              , decl.name )
+        else:
+            f_q_name = self.__join_names( declarations.full_name( decl.parent ), name )
+            
+        return call_invocation.join( f_q_name, args )
+
+class casting_operator_patcher_t( object ):
+    def __init__( self ):
+        object.__init__( self )
+
+    def __call__(self, decl):
+        decl.name = 'operator ' + decl.return_type.decl_string
+
+_casting_oper_patcher_ = casting_operator_patcher_t()
+
+def fix_calldef_decls(decls, enums):
+    default_arg_patcher = default_argument_patcher_t(enums)
+    #decls should be flat list of all declarations, you want to apply patch on
+    for decl in decls:
+        default_arg_patcher( decl )
+        if isinstance( decl, declarations.casting_operator_t):
+            _casting_oper_patcher_( decl )
+    
\ No newline at end of file
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/project_reader.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/project_reader.py
similarity index 100%
rename from Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/project_reader.py
rename to Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/project_reader.py
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/scanner.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/scanner.py
new file mode 100644
index 0000000..563d3e2
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/scanner.py
@@ -0,0 +1,539 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import os
+import types
+import pprint
+import xml.sax
+import warnings
+import xml.sax.handler
+from pygccxml.declarations import *
+from pygccxml import utils
+
+##convention
+#XML_NN - XML Node Name
+#XML_AN - XML Attribute Name
+#also those constants are sorted for easy searching.
+XML_AN_ABSTRACT = "abstract"
+XML_AN_ACCESS = "access"
+XML_AN_ALIGN = "align"
+XML_AN_ARTIFICIAL = "artificial"
+XML_AN_ATTRIBUTES = "attributes"
+XML_AN_BASE_TYPE = "basetype"
+XML_AN_BASES = "bases"
+XML_AN_BITS = "bits"
+XML_AN_CONST = "const"
+XML_AN_CONTEXT = "context"
+XML_AN_CVS_REVISION = "cvs_revision"
+XML_AN_DEFAULT = "default"
+XML_AN_DEMANGLED = "demangled"
+XML_AN_EXTERN = "extern"
+XML_AN_FILE = "file"
+XML_AN_ID = "id"
+XML_AN_INCOMPLETE = "incomplete"
+XML_AN_INIT = "init"
+XML_AN_LINE = "line"
+XML_AN_MANGLED = "mangled"
+XML_AN_MAX = "max"
+XML_AN_MEMBERS = "members"
+XML_AN_MUTABLE = "mutable"
+XML_AN_NAME = "name"
+XML_AN_OFFSET = "offset"
+XML_AN_PURE_VIRTUAL = "pure_virtual"
+XML_AN_RESTRICT = "restrict"
+XML_AN_RETURNS = "returns"
+XML_AN_SIZE = "size"
+XML_AN_STATIC = "static"
+XML_AN_THROW = "throw"
+XML_AN_TYPE = "type"
+XML_AN_VIRTUAL = "virtual"
+XML_AN_VOLATILE = "volatile"
+XML_NN_ARGUMENT = "Argument"
+XML_NN_ARRAY_TYPE = "ArrayType"
+XML_NN_CASTING_OPERATOR = "Converter"
+XML_NN_CLASS = "Class"
+XML_NN_CONSTRUCTOR = "Constructor"
+XML_NN_CV_QUALIFIED_TYPE = "CvQualifiedType"
+XML_NN_DESTRUCTOR = "Destructor"
+XML_NN_ELLIPSIS = "Ellipsis"
+XML_NN_ENUMERATION = "Enumeration"
+XML_NN_ENUMERATION_VALUE = "EnumValue"
+XML_NN_FIELD = "Field"
+XML_NN_FILE = "File"
+XML_NN_FUNCTION = "Function"
+XML_NN_FUNCTION_TYPE = "FunctionType"
+XML_NN_FUNDAMENTAL_TYPE = "FundamentalType"
+XML_NN_FREE_OPERATOR = "OperatorFunction"
+XML_NN_GCC_XML = "GCC_XML"
+XML_NN_MEMBER_OPERATOR = "OperatorMethod"
+XML_NN_METHOD = "Method"
+XML_NN_METHOD_TYPE = "MethodType"
+XML_NN_NAMESPACE = "Namespace"
+XML_NN_OFFSET_TYPE = "OffsetType"
+XML_NN_POINTER_TYPE = "PointerType"
+XML_NN_REFERENCE_TYPE = "ReferenceType"
+XML_NN_ROOT = "GCC_XML"
+XML_NN_STRUCT = "Struct"
+XML_NN_TYPEDEF = "Typedef"
+XML_NN_UNION = "Union"
+XML_NN_VARIABLE = "Variable"
+
+class scanner_t( xml.sax.handler.ContentHandler ):
+    def __init__(self, gccxml_file, decl_factory, *args ):
+        xml.sax.handler.ContentHandler.__init__(self, *args )
+        self.logger = utils.loggers.gccxml
+        self.gccxml_file = gccxml_file
+        #defining parsing tables
+        self.__readers = {
+               XML_NN_FILE : self.__read_file
+               , XML_NN_NAMESPACE : self.__read_namespace
+               , XML_NN_ENUMERATION : self.__read_enumeration
+               , XML_NN_ENUMERATION_VALUE : self.__read_enumeration_value
+               , XML_NN_ARRAY_TYPE : self.__read_array_type
+               , XML_NN_CV_QUALIFIED_TYPE : self.__read_cv_qualified_type
+               , XML_NN_POINTER_TYPE : self.__read_pointer_type
+               , XML_NN_REFERENCE_TYPE : self.__read_reference_type
+               , XML_NN_FUNDAMENTAL_TYPE : self.__read_fundamental_type
+               , XML_NN_ARGUMENT : self.__read_argument
+               , XML_NN_FUNCTION_TYPE : self.__read_function_type
+               , XML_NN_METHOD_TYPE : self.__read_method_type
+               , XML_NN_OFFSET_TYPE : self.__read_offset_type
+               , XML_NN_TYPEDEF : self.__read_typedef
+               , XML_NN_VARIABLE : self.__read_variable
+               , XML_NN_CLASS : self.__read_class
+               , XML_NN_STRUCT : self.__read_struct
+               , XML_NN_UNION : self.__read_union
+               , XML_NN_FIELD : self.__read_field
+               , XML_NN_CASTING_OPERATOR : self.__read_casting_operator
+               , XML_NN_CONSTRUCTOR : self.__read_constructor
+               , XML_NN_DESTRUCTOR : self.__read_destructor
+               , XML_NN_FUNCTION : self.__read_function
+               , XML_NN_FREE_OPERATOR : self.__read_free_operator
+               , XML_NN_MEMBER_OPERATOR : self.__read_member_operator
+               , XML_NN_METHOD : self.__read_method
+               , XML_NN_GCC_XML : self.__read_version
+               , XML_NN_ELLIPSIS : self.__read_ellipsis
+        }
+        self.deep_declarations = [
+            XML_NN_CASTING_OPERATOR
+            , XML_NN_CONSTRUCTOR
+            , XML_NN_DESTRUCTOR
+            , XML_NN_ENUMERATION
+            , XML_NN_FILE
+            , XML_NN_FUNCTION
+            , XML_NN_FREE_OPERATOR
+            , XML_NN_MEMBER_OPERATOR
+            , XML_NN_METHOD
+            , XML_NN_FUNCTION_TYPE
+            , XML_NN_METHOD_TYPE
+        ]
+
+        assert isinstance( decl_factory, decl_factory_t )
+        self.__decl_factory = decl_factory
+
+        #mapping from id -> decl
+        self.__declarations = {}
+        #list of all read declarations
+        self.__calldefs = []
+        #list of enums I need later
+        self.__enums = []
+        #mapping from id -> type
+        self.__types = {}
+        #mapping from id -> file
+        self.__files = {}
+        #mapping between decl id -> access
+        self.__access = {}
+        #current object under construction
+        self.__inst = None
+        #mapping from id to members
+        self.__members = {}
+
+        self.__compiler = None
+
+    def read( self ):
+        xml.sax.parse( self.gccxml_file, self )
+
+    def endDocument( self ):
+        #updating membership
+        members_mapping = {}
+        for gccxml_id, members in self.__members.iteritems():
+            decl = self.__declarations.get( gccxml_id, None )
+            if not decl or not isinstance( decl, scopedef_t):
+                continue
+            members_mapping[ id( decl ) ] = members
+        self.__members = members_mapping
+
+    def declarations(self):
+        return self.__declarations
+
+    def calldefs( self ):
+        return self.__calldefs
+
+    def enums(self):
+        return self.__enums
+
+    def types(self):
+        return self.__types
+
+    def files(self):
+        return self.__files
+
+    def access(self):
+        return self.__access
+
+    def members(self):
+        return self.__members
+
+    def startElementNS(self, name, qname, attrs):
+        return self.startElement( name[1], attrs )
+
+    def endElementNS(self, name, qname):
+        return self.endElement( name[1] )
+
+    def startElement(self, name, attrs):
+        try:
+            if name not in self.__readers:
+                return
+            obj = self.__readers[name]( attrs )
+            if not obj:
+                return #it means that we worked on internals
+                       #for example EnumValue of function argument
+            if name in self.deep_declarations:
+                self.__inst = obj
+            self.__read_access( attrs )
+            element_id = attrs.get(XML_AN_ID, None)
+            if isinstance( obj, declaration_t ):
+                obj.compiler = self.__compiler
+                self.__update_membership( attrs )
+                self.__declarations[ element_id ] = obj
+                if not isinstance( obj, namespace_t ):
+                    self.__read_location( obj, attrs )
+                if isinstance( obj, class_t):
+                    self.__read_bases( obj, attrs )
+                self.__read_artificial(obj, attrs)
+                self.__read_mangled( obj, attrs)
+                self.__read_demangled( obj, attrs)
+                self.__read_attributes(obj, attrs)
+
+            elif isinstance( obj, type_t ):
+                self.__types[ element_id ] = obj
+                self.__read_byte_size(obj, attrs)
+                self.__read_byte_align(obj, attrs)
+            elif isinstance( obj, types.StringTypes ):
+                self.__files[ element_id ] = obj
+            else:
+                self.logger.warning( 'Unknown object type has been found.'
+                                     + ' Please report this bug to pygccxml development team.' )
+        except Exception, error:
+            msg = 'error occured, while parsing element with name "%s" and attrs "%s".'
+            msg = msg + os.linesep + 'Error: %s.' % str( error )
+            self.logger.error( msg % ( name, pprint.pformat( attrs.keys() ) ) )
+            raise
+
+    def endElement(self, name):
+        if name in self.deep_declarations:
+            self.__inst = None
+
+    def __read_location(self, decl, attrs):
+        decl.location = location_t( file_name=attrs[XML_AN_FILE], line=int(attrs[XML_AN_LINE]))
+
+    def __update_membership(self, attrs):
+        parent = attrs.get( XML_AN_CONTEXT, None )
+        if not parent:
+            return
+        if not self.__members.has_key( parent ):
+            self.__members[ parent ] = []
+        self.__members[parent].append( attrs[XML_AN_ID] )
+
+    def __read_members(self, decl, attrs ):
+        decl.declarations = attrs.get(XML_AN_MEMBERS, "")
+
+    def __read_bases(self, decl, attrs ):
+        decl.bases = attrs.get( XML_AN_BASES, "" )
+
+    def __read_artificial( self, decl, attrs ):
+        decl.is_artificial = attrs.get( XML_AN_ARTIFICIAL, False )
+
+    def __read_mangled( self, decl, attrs ):
+        decl.mangled = attrs.get( XML_AN_MANGLED, None )
+
+    def __read_demangled( self, decl, attrs ):
+        decl.demangled = attrs.get( XML_AN_DEMANGLED, None )
+
+    def __read_attributes( self, decl, attrs ):
+        decl.attributes = attrs.get( XML_AN_ATTRIBUTES, None )
+
+    def __read_access( self, attrs ):
+        self.__access[ attrs[XML_AN_ID] ] = attrs.get( XML_AN_ACCESS, ACCESS_TYPES.PUBLIC )
+
+    def __read_byte_size (self, decl, attrs):
+        "Using duck typing to set the size instead of in constructor"
+        size = attrs.get(XML_AN_SIZE, 0)
+        decl.byte_size = int(size)/8 # Make sure the size is in bytes instead of bits
+
+    def __read_byte_offset (self, decl, attrs):
+        "Using duck typing to set the offset instead of in constructor"
+        offset = attrs.get(XML_AN_OFFSET, 0)
+        decl.byte_offset = int(offset)/8 # Make sure the size is in bytes instead of bits
+
+    def __read_byte_align (self, decl, attrs):
+        "Using duck typing to set the alignment"
+        align = attrs.get(XML_AN_ALIGN, 0)
+        decl.byte_align = int(align)/8 # Make sure the size is in bytes instead of bits
+
+    def __read_root(self, attrs):
+        pass
+
+    def __read_file( self, attrs ):
+        return attrs.get( XML_AN_NAME, '' )
+
+    def __read_namespace(self, attrs):
+        ns_name = attrs.get( XML_AN_NAME, '' )
+        if '.' in ns_name:
+            #if '.' in namespace then this is mangled namespace -> in c++ namespace{...}
+            #that is almost true: gcc mangale name using top file name.
+            #almost all files has '.' in name
+            ns_name = ''
+        return self.__decl_factory.create_namespace( name=ns_name )
+
+    def __read_enumeration(self, attrs):
+        enum_name = attrs.get( XML_AN_NAME, '' )
+        if '$_' in enum_name or '._' in enum_name:
+            #it means that this is unnamed enum. in c++ enum{ x };
+            enum_name = ''
+        decl = self.__decl_factory.create_enumeration( name=enum_name )
+        self.__read_byte_size(decl, attrs)
+        self.__read_byte_align(decl, attrs)
+        self.__enums.append( decl )
+        return decl
+
+    def __read_enumeration_value( self, attrs ):
+        name = attrs.get( XML_AN_NAME, '' )
+        num = int(attrs[XML_AN_INIT])
+        self.__inst.append_value(name, num)
+
+    def __guess_int_value( self, value_as_str ):
+        #returns instance of int or None
+        #if gcc compiled the code, than it is correct!
+        numeric_suffix_letters = 'UuLlFf'
+        for s in numeric_suffix_letters:
+            value_as_str = value_as_str.replace( s, '' )
+        try:
+            return int( value_as_str )
+        except ValueError:
+            try:
+                return int( value_as_str, 16 )
+            except ValueError:
+                return None
+
+    def __read_array_type( self, attrs ):
+        type_ = attrs[ XML_AN_TYPE ]
+        size = self.__guess_int_value( attrs.get(XML_AN_MAX, '' ) )
+        if size is None:
+            size = array_t.SIZE_UNKNOWN
+            msg = 'unable to find out array size from expression "%s"' % attrs[ XML_AN_MAX ]
+            warnings.warn( msg )
+        return array_t( type_, size + 1 )
+
+    def __read_cv_qualified_type( self, attrs ):
+        if attrs.has_key( XML_AN_CONST ):
+            return const_t( attrs[XML_AN_TYPE] )
+        elif attrs.has_key( XML_AN_VOLATILE ):
+            return volatile_t( attrs[XML_AN_TYPE] )
+        elif attrs.has_key( XML_AN_RESTRICT ):
+            return restrict_t( attrs[XML_AN_TYPE] )
+        else:
+            assert 0
+
+    def __read_pointer_type( self, attrs ):
+        return pointer_t( attrs[XML_AN_TYPE] )
+
+    def __read_reference_type( self, attrs ):
+        return reference_t( attrs[XML_AN_TYPE] )
+
+    def __read_fundamental_type(self, attrs ):
+        try:
+            return FUNDAMENTAL_TYPES[ attrs.get( XML_AN_NAME, '' ) ]
+        except KeyError:
+            raise RuntimeError( "pygccxml error: unable to find fundamental type with name '%s'."
+                                % attrs.get( XML_AN_NAME, '' ) )
+
+    def __read_offset_type( self,attrs ):
+        base = attrs[ XML_AN_BASE_TYPE ]
+        type_ = attrs[ XML_AN_TYPE ]
+        if '0.9' in self.__compiler:
+            return pointer_t( member_variable_type_t( class_inst=base, variable_type=type_ ) )
+        else:
+            return member_variable_type_t( class_inst=base, variable_type=type_ )
+
+    def __read_argument( self, attrs ):
+        if isinstance( self.__inst, calldef_type_t ):
+            self.__inst.arguments_types.append( attrs[XML_AN_TYPE] )
+        else:
+            argument = argument_t()
+            argument.name = attrs.get( XML_AN_NAME, 'arg%d' % len(self.__inst.arguments) )
+            argument.type = attrs[XML_AN_TYPE]
+            argument.default_value = attrs.get( XML_AN_DEFAULT, None )
+            self.__read_attributes( argument, attrs )
+            if argument.default_value == '<gccxml-cast-expr>':
+                argument.default_value = None
+            self.__inst.arguments.append( argument )
+
+    def __read_ellipsis( self, attrs ):
+        if isinstance( self.__inst, calldef_type_t ):
+            self.__inst.arguments_types.append( '...' )
+        else:
+            argument = argument_t( type='...' )
+            self.__inst.arguments.append( argument )
+
+    def __read_calldef( self, calldef, attrs, is_declaration ):
+        #destructor for example doesn't have return type
+        calldef.return_type =  attrs.get( XML_AN_RETURNS, None )
+        if is_declaration:
+            self.__calldefs.append( calldef )
+            calldef.name = attrs.get(XML_AN_NAME, '')
+            calldef.has_extern = attrs.get( XML_AN_EXTERN, False )
+            throw_stmt = attrs.get( XML_AN_THROW, None )
+            if None is throw_stmt:
+                calldef.does_throw = True
+                calldef.exceptions = []
+            elif "" == throw_stmt:
+                calldef.does_throw = False
+                calldef.exceptions = []
+            else:
+                calldef.does_throw = True
+                calldef.exceptions = throw_stmt.split()
+
+    def __read_member_function( self, calldef, attrs, is_declaration ):
+        self.__read_calldef( calldef, attrs, is_declaration )
+        calldef.has_const = attrs.get( XML_AN_CONST, False )
+        if is_declaration:
+            calldef.has_static = attrs.get( XML_AN_STATIC, False )
+            if attrs.has_key( XML_AN_PURE_VIRTUAL ):
+                calldef.virtuality = VIRTUALITY_TYPES.PURE_VIRTUAL
+            elif attrs.has_key( XML_AN_VIRTUAL ):
+                calldef.virtuality = VIRTUALITY_TYPES.VIRTUAL
+            else:
+                calldef.virtuality = VIRTUALITY_TYPES.NOT_VIRTUAL
+        else:
+            calldef.class_inst = attrs[XML_AN_BASE_TYPE]
+
+    def __read_function_type(self, attrs):
+        answer = free_function_type_t()
+        self.__read_calldef( answer, attrs, False )
+        return answer
+
+    def __read_method_type(self, attrs):
+        answer = member_function_type_t()
+        self.__read_member_function( answer, attrs, False )
+        return answer
+
+    def __read_typedef(self, attrs ):
+        return self.__decl_factory.create_typedef( name=attrs.get( XML_AN_NAME, '' ), type=attrs[XML_AN_TYPE])
+
+    def __read_variable(self, attrs ):
+        type_qualifiers = type_qualifiers_t()
+        type_qualifiers.has_mutable = attrs.get(XML_AN_MUTABLE, False)
+        type_qualifiers.has_static = attrs.get(XML_AN_EXTERN, False)
+        bits = attrs.get( XML_AN_BITS, None )
+        if bits:
+            bits = int( bits )
+        decl = self.__decl_factory.create_variable( name=attrs.get( XML_AN_NAME, '' )
+                                                    , type=attrs[XML_AN_TYPE]
+                                                    , type_qualifiers=type_qualifiers
+                                                    , value=attrs.get( XML_AN_INIT, None )
+                                                    , bits=bits)
+        self.__read_byte_offset(decl, attrs)
+        return decl
+
+    __read_field = __read_variable #just a synonim
+
+    def __read_class_impl(self, class_type, attrs):
+        decl = None
+        name = attrs.get(XML_AN_NAME, '')
+        if '$' in name or '.' in name:
+            name = ''
+        if attrs.has_key( XML_AN_INCOMPLETE ):
+            decl = self.__decl_factory.create_class_declaration(name=name)
+        else:
+            decl = self.__decl_factory.create_class( name=name, class_type=class_type )
+            if attrs.get( XML_AN_ABSTRACT, False ):
+                decl.is_abstract = True
+            else:
+                decl.is_abstract = False
+        self.__read_byte_size(decl, attrs)
+        self.__read_byte_align(decl, attrs)
+        return decl
+
+    def __read_class( self, attrs ):
+        return self.__read_class_impl( CLASS_TYPES.CLASS, attrs )
+
+    def __read_struct( self, attrs ):
+        return self.__read_class_impl( CLASS_TYPES.STRUCT, attrs )
+
+    def __read_union( self, attrs ):
+        return self.__read_class_impl( CLASS_TYPES.UNION, attrs )
+
+    def __read_casting_operator(self, attrs ):
+        operator = self.__decl_factory.create_casting_operator()
+        self.__read_member_function( operator, attrs, True )
+        return operator
+
+    def __read_constructor( self, attrs ):
+        constructor = self.__decl_factory.create_constructor()
+        self.__read_member_function( constructor, attrs, True )
+        return constructor
+
+    def __read_function(self, attrs):
+        gfunction = self.__decl_factory.create_free_function()
+        self.__read_calldef( gfunction, attrs, True )
+        return gfunction
+
+    def __read_method(self, attrs):
+        mfunction = self.__decl_factory.create_member_function()
+        self.__read_member_function( mfunction, attrs, True )
+        return mfunction
+
+    def __read_destructor(self, attrs):
+        destructor = self.__decl_factory.create_destructor()
+        self.__read_member_function( destructor, attrs, True )
+        destructor.name = '~' + destructor.name
+        return destructor
+
+    def __read_free_operator(self, attrs ):
+        operator = self.__decl_factory.create_free_operator()
+        self.__read_member_function( operator, attrs, True )
+        if 'new' in operator.name or 'delete' in operator.name:
+            operator.name = 'operator ' + operator.name
+        else:
+            operator.name = 'operator' + operator.name
+        return operator
+
+    def __read_member_operator(self, attrs):
+        operator = self.__decl_factory.create_member_operator()
+        self.__read_member_function( operator, attrs, True )
+        if 'new' in operator.name or 'delete' in operator.name:
+            operator.name = 'operator ' + operator.name
+        else:
+            operator.name = 'operator' + operator.name
+        return operator
+
+    def __read_version(self, attrs):
+        logger = utils.loggers.cxx_parser
+
+        version = float( attrs.get(XML_AN_CVS_REVISION, 0.6) )
+        if version is None:
+            logger.info ( 'GCCXML version - 0.6' )
+            self.__compiler = compilers.GCC_XML_06
+        elif version <= 1.114:
+            logger.info ( 'GCCXML version - 0.7' )
+            self.__compiler = compilers.GCC_XML_07
+        elif version in ( 1.115, 1.116, 1.117, 1.118, 1.119, 1.120, 1.121 ):
+            logger.info ( 'GCCXML version - 0.9 BUGGY' )
+            self.__compiler = compilers.GCC_XML_09_BUGGY
+        else:
+            logger.info ( 'GCCXML version - 0.9' )
+            self.__compiler = compilers.GCC_XML_09
+
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/source_reader.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/source_reader.py
new file mode 100644
index 0000000..da20ef6
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/parser/source_reader.py
@@ -0,0 +1,346 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import os
+import sys
+import linker
+import config
+import patcher
+import pygccxml.utils
+
+try: #select the faster xml parser
+    from etree_scanner import etree_scanner_t as scanner_t
+except:
+    from scanner import scanner_t
+
+import declarations_cache
+from pygccxml import utils
+from pygccxml.declarations import *
+
+class gccxml_runtime_error_t( RuntimeError ):
+    def __init__( self, msg ):
+        RuntimeError.__init__( self, msg )
+
+def bind_aliases( decls ):
+    """
+    This function binds between class and it's typedefs.
+
+    @param decls: list of all declarations
+    @type all_classes: list of L{declaration_t} items
+
+    @return: None
+    """
+    visited = set()
+    typedefs = filter( lambda decl: isinstance( decl, typedef_t ), decls )
+    for decl in typedefs:
+        type_ = remove_alias( decl.type )
+        if not isinstance( type_, declarated_t ):
+            continue
+        cls_inst = type_.declaration
+        if not isinstance( cls_inst, class_types ):
+            continue
+        if id( cls_inst ) not in visited:
+            visited.add( id( cls_inst ) )
+            del cls_inst.aliases[:]
+        cls_inst.aliases.append( decl )
+
+class source_reader_t:
+    """
+    This class reads C++ source code and returns declarations tree.
+
+    This class is the only class that have an intime knowledge about GCC-XML.
+    It has only one responsibility: it calls GCC-XML with a source file specified
+    by user and creates declarations tree. The implementation of this class is split
+    to 2 classes:
+
+    1. L{scanner_t} - this class scans the "XML" file, generated by GCC-XML and
+       creates `pygccxml`_ declarations and types classes. After the xml file has
+       been processed declarations and type class instances keeps references to
+       each other using GCC-XML generated id's.
+
+    2. L{linker_t} - this class contains logic for replacing GCC-XML generated
+       ids with references to declarations or type class instances.
+    """
+    def __init__( self, config, cache=None, decl_factory=None ):
+        """
+        @param config: instance of L{config_t} class, that contains GCC-XML
+                       configuration
+        @type config: L{config_t}
+
+        @param cache: reference to cache object, that will be updated after
+                      file has been parsed.
+        @param cache: instance of class, that derives from {cache_base_t}
+
+        @param decl_factory: declarations factory, if not given default
+                             declarations factory L{decl_factory_t} will be used
+        """
+        self.logger = utils.loggers.cxx_parser
+        self.__search_directories = []
+        self.__config = config
+        self.__search_directories.append( config.working_directory )
+        self.__search_directories.extend( config.include_paths )
+        if not cache:
+            cache = declarations_cache.dummy_cache_t()
+        self.__dcache = cache
+        self.__config.raise_on_wrong_settings()
+        self.__decl_factory = decl_factory
+        if not decl_factory:
+            self.__decl_factory = decl_factory_t()
+
+    def __create_command_line(self, file, xmlfile):
+        assert isinstance( self.__config, config.config_t )
+        #returns
+        cmd = []
+        #first is gccxml executable
+        if 'win32' in sys.platform:
+            cmd.append( '"%s"' % os.path.normpath( self.__config.gccxml_path ) )
+        else:
+            cmd.append(  '%s' % os.path.normpath( self.__config.gccxml_path ) )
+
+        # Add all cflags passed
+        if self.__config.cflags != "":
+            cmd.append(" %s "%self.__config.cflags)
+        #second all additional includes directories
+        cmd.append( ''.join( [' -I"%s"' % search_dir for search_dir in self.__search_directories] ) )
+        #third all additional defined symbols
+        cmd.append( ''.join( [' -D"%s"' % defined_symbol for defined_symbol in self.__config.define_symbols] ) )
+        cmd.append( ''.join( [' -U"%s"' % undefined_symbol for undefined_symbol in self.__config.undefine_symbols] ) )
+        #fourth source file
+        cmd.append( '"%s"' % file )
+        #five destination file
+        cmd.append( '-fxml="%s"' % xmlfile )
+        if self.__config.start_with_declarations:
+            cmd.append( '-fxml-start="%s"' % ','.join( self.__config.start_with_declarations ) )
+        # Specify compiler if asked to
+        if self.__config.compiler:
+            cmd.append( " --gccxml-compiler %s" % self.__config.compiler )
+        cmd_line = ' '.join(cmd)
+        if 'win32' in sys.platform :
+            cmd_line = '"%s"' % cmd_line
+        self.logger.info( 'gccxml cmd: %s' % cmd_line )
+        return cmd_line
+
+    def create_xml_file( self, header, destination=None ):
+        """
+        This function will return the file name of the file, created by GCC-XML
+        for "header" file. If destination_file_path is not None, then this file
+        path will be used and returned.
+
+        @param header: path to source file, that should be parsed
+        @type header: str
+
+        @param destination: if given, will be used as target file/path for
+                            GCC-XML generated file.
+        @type destination: str
+
+        @return: path to GCC-XML generated file
+        """
+        gccxml_file = destination
+        # If file specified, remove it to start else create new file name
+        if gccxml_file:
+            pygccxml.utils.remove_file_no_raise( gccxml_file )
+        else:
+            gccxml_file = pygccxml.utils.create_temp_file_name( suffix='.xml' )
+        try:
+            ffname = header
+            if not os.path.isabs( ffname ):
+                  ffname = self.__file_full_name(header)
+            command_line = self.__create_command_line( ffname, gccxml_file )
+            input_, output = os.popen4( command_line )
+            input_.close()
+            gccxml_reports = []
+            while True:
+                  data = output.readline()
+                  gccxml_reports.append( data )
+                  if not data:
+                       break
+            exit_status = output.close()
+            gccxml_msg = ''.join(gccxml_reports)
+            if self.__config.ignore_gccxml_output:
+                if not os.path.isfile(gccxml_file):
+                    raise gccxml_runtime_error_t( "Error occured while running GCC-XML: %s status:%s" % (gccxml_msg, exit_status) )
+            else:
+                if gccxml_msg or exit_status or not os.path.isfile(gccxml_file):
+                    raise gccxml_runtime_error_t( "Error occured while running GCC-XML: %s" % gccxml_msg )
+        except Exception, error:
+            pygccxml.utils.remove_file_no_raise( gccxml_file )
+            raise error
+        return gccxml_file
+
+    def create_xml_file_from_string( self, content, destination=None ):
+        """
+        Creates XML file from text.
+
+        @param content: C++ source code
+        @type content: str
+
+        @param destination: file name for GCC-XML generated file
+        @type destination: str
+
+        @return: returns file name of GCC-XML generated file
+        """
+        header_file = pygccxml.utils.create_temp_file_name( suffix='.h' )
+        gccxml_file = None
+        try:
+            header_file_obj = file(header_file, 'w+')
+            header_file_obj.write( content )
+            header_file_obj.close()
+            gccxml_file = self.create_xml_file( header_file, destination )
+        finally:
+            pygccxml.utils.remove_file_no_raise( header_file )
+        return gccxml_file
+
+    def read_file( self, source_file ):
+        if isinstance( self.__config, config.gccxml_configuration_t ):
+            return self.read_gccxml_file( source_file )
+        else:
+            return self.read_synopsis_file( source_file )
+
+    def read_gccxml_file(self, source_file):
+        """
+        Reads C++ source file and returns declarations tree
+
+        @param source_file: path to C++ source file
+        @type source_file: str
+        """
+        declarations, types = None, None
+        gccxml_file = ''
+        try:
+            ffname = self.__file_full_name(source_file)
+            self.logger.debug( "Reading source file: [%s]." % ffname )
+            declarations = self.__dcache.cached_value( ffname, self.__config )
+            if not declarations:
+                self.logger.debug( "File has not been found in cache, parsing..." )
+                gccxml_file = self.create_xml_file( ffname )
+                declarations, files = self.__parse_gccxml_created_file( gccxml_file )
+                self.__dcache.update( ffname, self.__config, declarations, files )
+            else:
+                self.logger.debug( "File has not been changed, reading declarations from cache." )
+        except Exception, error:
+            if gccxml_file:
+                pygccxml.utils.remove_file_no_raise( gccxml_file )
+            raise error
+        if gccxml_file:
+            pygccxml.utils.remove_file_no_raise( gccxml_file )
+        return declarations
+
+    def read_xml_file(self, gccxml_created_file):
+        """
+        Reads GCC-XML generated XML file.
+
+        @param gccxml_created_file: path to GCC-XML generated file
+        @type gccxml_created_file: str
+
+        @return: declarations tree
+        """
+        assert(self.__config!=None)
+
+        ffname = self.__file_full_name(gccxml_created_file)
+        self.logger.debug( "Reading xml file: [%s]" % gccxml_created_file )
+        declarations = self.__dcache.cached_value( ffname, self.__config )
+        if not declarations:
+            self.logger.debug( "File has not been found in cache, parsing..." )
+            declarations, files = self.__parse_gccxml_created_file( ffname )
+            self.__dcache.update( ffname, self.__config, declarations, [] )
+        else:
+            self.logger.debug( "File has not been changed, reading declarations from cache." )
+
+        return declarations
+
+    def read_string(self, content):
+        """
+        Reads Python string, that contains valid C++ code, and returns
+        declarations tree.
+        """
+        header_file = pygccxml.utils.create_temp_file_name( suffix='.h' )
+        header_file_obj = file(header_file, 'w+')
+        header_file_obj.write( content )
+        header_file_obj.close()
+        declarations = None
+        try:
+            declarations = self.read_file( header_file )
+        except Exception, error:
+            pygccxml.utils.remove_file_no_raise( header_file )
+            raise error
+        pygccxml.utils.remove_file_no_raise( header_file )
+        return declarations
+
+    def __file_full_name( self, file ):
+        if os.path.isfile( file ):
+            return file
+        for path in self.__search_directories:
+            file_path = os.path.join( path, file )
+            if os.path.isfile( file_path ):
+                  return file_path
+        raise RuntimeError( "pygccxml error: file '%s' does not exist" % file )
+
+    def __produce_full_file( self, file_path ):
+        if 'win' in sys.platform or 'linux' in sys.platform:
+            file_path = file_path.replace( r'\/', os.path.sep )
+        if os.path.isabs( file_path ):
+            return file_path
+        try:
+            abs_file_path = os.path.realpath( os.path.join( self.__config.working_directory, file_path ) )
+            if os.path.exists( abs_file_path ):
+                return os.path.normpath( abs_file_path )
+            return file_path
+        except Exception:
+            return file_path
+
+    def __parse_gccxml_created_file( self, gccxml_file ):
+        scanner_ = scanner_t( gccxml_file, self.__decl_factory )
+        scanner_.read()
+        decls = scanner_.declarations()
+        types = scanner_.types()
+        files = {}
+        for file_id, file_path in scanner_.files().iteritems():
+            files[file_id] = self.__produce_full_file(file_path)
+        linker_ = linker.linker_t( decls=decls
+                                   , types=types
+                                   , access=scanner_.access()
+                                   , membership=scanner_.members()
+                                   , files=files )
+        for type_ in types.values():
+            #I need this copy because internaly linker change types collection
+            linker_.instance = type_
+            apply_visitor( linker_, type_ )
+        for decl in decls.itervalues():
+            linker_.instance = decl
+            apply_visitor( linker_, decl )
+        bind_aliases( decls.itervalues() )
+        #some times gccxml report typedefs defined in no namespace
+        #it happens for example in next situation
+        #template< typename X>
+        #void ddd(){ typedef typename X::Y YY;}
+        #if I will fail on this bug next time, the right way to fix it may be different
+        patcher.fix_calldef_decls( scanner_.calldefs(), scanner_.enums() )
+        decls = filter( lambda inst: isinstance( inst, namespace_t ) and not inst.parent
+                        , decls.itervalues()  )
+        return ( decls, files.values() )
+
+    def read_synopsis_file( self, source_file ):
+        import synopsis_scanner
+        from Synopsis import AST
+        from Synopsis.Parsers import Cxx
+
+        ffname = self.__file_full_name(source_file)
+
+        cppflags = []
+        map( lambda dpath: cppflags.append( '-I %s' % dpath )
+             , self.__config.include_paths )
+        map( lambda define: cppflags.append( '-D %s' % define )
+             , self.__config.define_symbols )
+        map( lambda define: cppflags.append( '-U %s' % define )
+             , self.__config.undefine_symbols )
+
+        cxx = Cxx.Parser( preprocess=True, cppflags=cppflags )
+        ast = AST.AST()
+        cxx.process( ast, input=[source_file] )
+        scanner = synopsis_scanner.scanner_t( ast, self.__decl_factory )
+        scanner.visitAST( ast )
+        declarations = [scanner.global_ns]
+        self.__dcache.update( ffname, self.__config, declarations, [] )
+        return declarations
+
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/utils/__init__.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/utils/__init__.py
new file mode 100644
index 0000000..cb51ec1
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/utils/__init__.py
@@ -0,0 +1,156 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+"""
+defines logger classes and few convinience methods, not related to the declarations
+tree
+"""
+
+import os
+import sys
+import logging
+import tempfile
+from fs_utils import files_walker
+from fs_utils import directories_walker
+
+def _create_logger_( name ):
+    """implementation details"""
+    logger = logging.getLogger(name)
+    handler = logging.StreamHandler()
+    #handler.setFormatter( logging.Formatter( os.linesep + '%(levelname)s %(message)s' ) )
+    handler.setFormatter( logging.Formatter( '%(levelname)s %(message)s' ) )
+    logger.addHandler(handler)
+    logger.setLevel(logging.INFO)
+    return logger
+
+class loggers:
+    """class-namespace, defines few loggers classes, used in the project"""
+
+    cxx_parser = _create_logger_( 'pygccxml.cxx_parser' )
+    """logger for C++ parser functionality
+
+    If you set this logger level to DEBUG, you will be able to see the exact
+    command line, used to invoke GCC-XML  and errors that occures during XML parsing
+    """
+
+    gccxml = cxx_parser #backward compatability
+
+    pdb_reader = _create_logger_( 'pygccxml.pdb_reader' )
+    """logger for MS .pdb file reader functionality
+    """
+
+
+    queries_engine = _create_logger_( 'pygccxml.queries_engine' )
+    """logger for query engine functionality.
+
+    If you set this logger level to DEBUG, you will be able to see what queries
+    you do against declarations tree, measure performance and may be even to improve it.
+    Query engine reports queries and whether they are optimized or not.
+    """
+
+    declarations_cache = _create_logger_( 'pygccxml.declarations_cache' )
+    """logger for declarations tree cache functionality
+
+    If you set this logger level to DEBUG, you will be able to see what is exactly
+    happens, when you read the declarations from cache file. You will be able to
+    decide, whether it worse for you to use this or that cache strategy.
+    """
+
+    root = logging.getLogger( 'pygccxml' )
+    """root logger exists for your convinience only"""
+
+    all = [ root, cxx_parser, queries_engine, declarations_cache, pdb_reader ]
+    """contains all logger classes, defined by the class"""
+
+def remove_file_no_raise(file_name ):
+    """removes file from disk, if exception is raised, it silently ignores it"""
+    try:
+        if os.path.exists(file_name):
+            os.remove( file_name )
+    except Exception, error:
+        loggers.root.error( "Error ocured while removing temprorary created file('%s'): %s"
+                            % ( file_name, str( error ) ) )
+
+def create_temp_file_name(suffix, prefix=None, dir=None):
+    """small convinience function that creates temporal file.
+
+    This function is a wrapper aroung Python built-in function - tempfile.mkstemp
+    """
+    if not prefix:
+        prefix = tempfile.template
+    fd, name = tempfile.mkstemp( suffix=suffix, prefix=prefix, dir=dir )
+    file_obj = os.fdopen( fd )
+    file_obj.close()
+    return name
+
+def normalize_path( some_path ):
+    """return os.path.normpath( os.path.normcase( some_path ) )"""
+    return os.path.normpath( os.path.normcase( some_path ) )
+
+def get_architecture():
+    """returns computer architecture: 32 or 64.
+
+    The guess is based on maxint.
+    """
+    if sys.maxint == 2147483647:
+        return 32
+    elif sys.maxint == 9223372036854775807:
+        return 64
+    else:
+        raise RuntimeError( "Unknown architecture" )
+
+
+#The following code is cut-and-paste from this post:
+#http://groups.google.com/group/comp.lang.python/browse_thread/thread/5b71896c06bd0f76/
+#Thanks to Michele Simionato, for it
+class cached(property):
+    'Convert a method into a cached attribute'
+    def __init__(self, method):
+        private = '_' + method.__name__
+        def fget(s):
+            try:
+                return getattr(s, private)
+            except AttributeError:
+                value = method(s)
+                setattr(s, private, value)
+                return value
+        def fdel(s):
+            del s.__dict__[private]
+        super(cached, self).__init__(fget, fdel=fdel)
+        
+    @staticmethod
+    def reset(self):
+        cls = self.__class__
+        for name in dir(cls):
+            attr = getattr(cls, name)
+            if isinstance(attr, cached):
+                delattr(self, name) 
+
+class enum( object ):
+    """Usage example:
+        class fruits(enum):
+            apple = 0
+            orange = 1
+            
+        fruits.has_value( 1 )
+        fruits.name_of( 1 )
+    """
+    
+    @classmethod
+    def has_value( cls, enum_numeric_value ):
+        for name, value in cls.__dict__.iteritems():          
+            if enum_numeric_value == value:
+                return True
+        else:
+            return False
+    
+    @classmethod
+    def name_of( cls, enum_numeric_value ):
+        for name, value in cls.__dict__.iteritems():          
+            if enum_numeric_value == value:
+                return name
+        else:
+            raise RuntimeError( 'Unable to find name for value(%d) in enumeration "%s"'
+                                % ( enum_numeric_value, cls.__name__ ) )
diff --git a/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/utils/fs_utils.py b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/utils/fs_utils.py
new file mode 100644
index 0000000..0f5996e
--- /dev/null
+++ b/Utilities/ITK/Modules/ThirdParty/pygccxml/src/pygccxml/utils/fs_utils.py
@@ -0,0 +1,136 @@
+# Copyright 2004-2008 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import os
+from types import *
+
+##If you want include files that doesn't have extension then use filter like '*.'
+
+def _make_list( argument ):
+    if type(argument) in StringTypes:
+        if argument:
+            return [argument]
+        else:
+            return []
+    elif type(argument) is ListType:
+        return argument
+    else:
+        raise TypeError( 'Argument "%s" must be or list of strings or string.' % argument )
+        
+class base_files_iterator:
+    def __init__(self, file_exts, is_include_exts = True):
+        self.__file_exts = _make_list( file_exts )
+        self.__is_include_exts = is_include_exts
+
+    def _is_to_skip(self, file_path):     
+        if not self.__file_exts:
+            return 0
+        file_ext = os.path.splitext( file_path )[1]
+        if not file_ext:
+            file_ext = '.' + file_ext
+        file_ext = '*' + file_ext 
+        if file_ext.lower() in self.__file_exts:
+            return not self.__is_include_exts
+        else:
+            return self.__is_include_exts
+
+    def _subdirectories_and_files(self, directory_path):
+        files, directories = [], []
+        directory_contents = os.listdir(directory_path)
+        for object_name in directory_contents:
+            object_path = os.path.join(directory_path, object_name)
+            if os.path.isfile( object_path ) and not self._is_to_skip( object_path ):
+                files.append( object_path )
+            elif os.path.isdir( object_path ):
+                directories.append( object_path )
+            else:
+                pass
+        return directories, files
+
+    def __iter__(self):
+        raise NotImplementedError
+
+    def next(self):
+        raise NotImplementedError
+
+    def restart(self):
+        raise NotImplementedError
+
+class files_walker(base_files_iterator):
+    def __init__(self, directories, file_ext_filter = '', is_include_filter = True, is_recursive = True):
+        base_files_iterator.__init__(self, file_ext_filter, is_include_filter)
+        self.__directories = _make_list( directories )
+        self.__is_recursive = is_recursive
+        self.__file_generator = None
+
+    def __walk(self):
+        directories = self.__directories[:]
+        while directories:
+            sub_directories, files = self._subdirectories_and_files( directories.pop(0) )
+            if self.__is_recursive:
+                for directory in sub_directories:
+                    directories.append( directory )
+            for file_os in files:
+                yield file_os
+
+    def __iter__(self):
+        self.__file_generator = self.__walk()
+        return self
+
+    def next(self):
+        return self.__file_generator.next()
+
+    def restart(self):
+        self.__file_generator = None
+
+
+class directories_walker:
+    def __init__(self, directories, is_recursive = 1):
+        self.__directories = []
+        for root in _make_list( directories ):
+            self.__directories.extend( self.__sub_directories( root ) )
+        self.__is_recursive = is_recursive
+        self.__directory_generator = None
+        
+    def __sub_directories(self, directory_path):
+        sub_directories = []
+        directory_contains = os.listdir(directory_path)
+        for object_in_directory in directory_contains:
+            full_path = os.path.join(directory_path, object_in_directory)
+            if os.path.isdir( full_path ):
+                sub_directories.append( full_path )
+        return sub_directories
+
+    def __walk(self):
+        directories = self.__directories[:]
+        for curr_directory in directories:
+            yield curr_directory
+            if self.__is_recursive:
+                for f in directories_walker( [curr_directory], True ):
+                    yield f
+                
+    def __iter__(self):
+        self.__directory_generator = self.__walk()
+        return self
+
+    def next(self):
+        return self.__directory_generator.next()
+
+    def restart(self):
+        self.__directory_generator = None
+
+
+if '__main__' == __name__:
+    pass
+    #lFileCount = 0
+    #for file_os in files_iterator( r'C:\Program Files\Microsoft Visual Studio\VC98\Include\stlport', ['*.h', '*.'], True, False):
+        #print file_os
+        #lFileCount += 1
+    #print lFileCount
+
+    #~ for directory in directories_iterator( '/home/roman/language-binding', False ):
+        #~ print directory
+    #~ for directory in directories_iterator( '/home/roman/language-binding', True ):
+        #~ print directory
diff --git a/Utilities/ITK/Modules/Video/Core/include/itkRingBuffer.h b/Utilities/ITK/Modules/Video/Core/include/itkRingBuffer.h
index eb4d93d..fd085a9 100644
--- a/Utilities/ITK/Modules/Video/Core/include/itkRingBuffer.h
+++ b/Utilities/ITK/Modules/Video/Core/include/itkRingBuffer.h
@@ -95,7 +95,7 @@ protected:
   /**-PROTECTED METHODS------------------------------------------------------*/
   RingBuffer();
   virtual ~RingBuffer();
-  void PrintSelf(std::ostream &os, Indent indent) const;
+  virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE;
 
   /** Get the proper buffer index from an offset */
   OffsetValueType GetOffsetBufferIndex(OffsetValueType offset);
diff --git a/Utilities/ITK/Modules/Video/Core/include/itkRingBuffer.hxx b/Utilities/ITK/Modules/Video/Core/include/itkRingBuffer.hxx
index 307fb72..c61b748 100644
--- a/Utilities/ITK/Modules/Video/Core/include/itkRingBuffer.hxx
+++ b/Utilities/ITK/Modules/Video/Core/include/itkRingBuffer.hxx
@@ -183,7 +183,7 @@ RingBuffer< TElement >
     {
     for (size_t i = 0; i < n - currentSize; ++i)
       {
-      ElementPointer newPointer = NULL;
+      ElementPointer newPointer = ITK_NULLPTR;
       this->m_PointerVector.insert( this->m_PointerVector.begin() +
                                     this->m_HeadIndex, newPointer );
 
diff --git a/Utilities/ITK/Modules/Video/Core/include/itkTemporalDataObject.h b/Utilities/ITK/Modules/Video/Core/include/itkTemporalDataObject.h
index aff2935..d5939dd 100644
--- a/Utilities/ITK/Modules/Video/Core/include/itkTemporalDataObject.h
+++ b/Utilities/ITK/Modules/Video/Core/include/itkTemporalDataObject.h
@@ -85,23 +85,23 @@ public:
    * buffered region */
   virtual const TemporalRegionType GetUnbufferedRequestedTemporalRegion();
 
-  virtual void SetRequestedRegionToLargestPossibleRegion();
+  virtual void SetRequestedRegionToLargestPossibleRegion() ITK_OVERRIDE;
 
-  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion();
+  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() ITK_OVERRIDE;
 
-  virtual bool VerifyRequestedRegion();
+  virtual bool VerifyRequestedRegion() ITK_OVERRIDE;
 
-  virtual void CopyInformation(const DataObject *);
+  virtual void CopyInformation(const DataObject *) ITK_OVERRIDE;
 
-  virtual void SetRequestedRegion(const DataObject *);
+  virtual void SetRequestedRegion(const DataObject *) ITK_OVERRIDE;
 
-  virtual void Graft(const DataObject *);
+  virtual void Graft(const DataObject *) ITK_OVERRIDE;
 
 protected:
 
   TemporalDataObject();
   virtual ~TemporalDataObject();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Buffer for holding component data objects */
   BufferType::Pointer m_DataObjectBuffer;
diff --git a/Utilities/ITK/Modules/Video/Core/include/itkTemporalProcessObject.h b/Utilities/ITK/Modules/Video/Core/include/itkTemporalProcessObject.h
index 6b26611..050b95c 100644
--- a/Utilities/ITK/Modules/Video/Core/include/itkTemporalProcessObject.h
+++ b/Utilities/ITK/Modules/Video/Core/include/itkTemporalProcessObject.h
@@ -81,11 +81,11 @@ public:
 
   /** Override EnlargeOutputRequestedRegion, GenerateOutputRequestedRegion, and
    * GenerateInputRequestedRegion to handle temporal regions */
-  virtual void EnlargeOutputRequestedRegion(DataObject* output);
+  virtual void EnlargeOutputRequestedRegion(DataObject* output) ITK_OVERRIDE;
 
-  virtual void GenerateOutputRequestedRegion(DataObject* output);
+  virtual void GenerateOutputRequestedRegion(DataObject* output) ITK_OVERRIDE;
 
-  virtual void GenerateInputRequestedRegion();
+  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
 
   /** Get the number of frames of input required to produce output. We don't
    * provide a Set method because we want some filters to be able to hold this
@@ -102,7 +102,7 @@ public:
    * temporal region based on the largest possible temporal region of the input,
    * the unit input/output sizes for the process, and the number of frames
    * skipped per output*/
-  virtual void UpdateOutputInformation();
+  virtual void UpdateOutputInformation() ITK_OVERRIDE;
 
   /** Override ProcessObject's implementation of UpdateOutputData. This is
    * necessary because by default ProcessObject propagates the call to its
@@ -115,7 +115,7 @@ public:
    *
    * Code: this->ProcessObject::UpdateOutputData( output )
    */
-  virtual void UpdateOutputData(DataObject* output);
+  virtual void UpdateOutputData(DataObject* output) ITK_OVERRIDE;
 
   /** Override GenerateData to do temporal region streaming. This is analogous
    * to the ThreadedGenerateData system implemented in ImageSource, but it
@@ -127,7 +127,7 @@ public:
    * the requested temporal region of the input to each input requested
    * temporal sub-region (in sequence) and re-propagate the temporal region
    * request up the pipeline. */
-  virtual void GenerateData();
+  virtual void GenerateData() ITK_OVERRIDE;
 
   /** TemporalStreamingGenerateData is in charge of producing output for a
    * single portion of the output requested temporal region. This is where
@@ -149,7 +149,7 @@ protected:
   }
 
   /** ITK print mechanism */
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Explicitly handle temporal regions in EnlargeRequestedRegion. The default
    * implementation makes sure that the output requested temporal region is
diff --git a/Utilities/ITK/Modules/Video/Core/include/itkTemporalRegion.h b/Utilities/ITK/Modules/Video/Core/include/itkTemporalRegion.h
index a70392d..6f1ee57 100644
--- a/Utilities/ITK/Modules/Video/Core/include/itkTemporalRegion.h
+++ b/Utilities/ITK/Modules/Video/Core/include/itkTemporalRegion.h
@@ -68,7 +68,7 @@ public:
   FrameOffsetType GetFrameDuration() const;
 
   /** Return RegionType (SRUCTURED_REGION) */
-  virtual RegionType GetRegionType() const;
+  virtual RegionType GetRegionType() const ITK_OVERRIDE;
 
   /** Constructor */
   TemporalRegion();
@@ -89,7 +89,7 @@ public:
 
 protected:
 
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Time boundaries */
   RealTimeStamp    m_RealStart;
diff --git a/Utilities/ITK/Modules/Video/Core/include/itkVideoSource.h b/Utilities/ITK/Modules/Video/Core/include/itkVideoSource.h
index 6802dc8..a49b4de 100644
--- a/Utilities/ITK/Modules/Video/Core/include/itkVideoSource.h
+++ b/Utilities/ITK/Modules/Video/Core/include/itkVideoSource.h
@@ -99,7 +99,7 @@ public:
    * multiple types of output must override this to return the proper type. */
   typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
   using Superclass::MakeOutput;
-  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
+  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
 
 protected:
 
@@ -114,14 +114,14 @@ protected:
    * mid-pipeline filters will always have their outputs' requested spatial
    * regions set by the GenerateInputRequestedRegion call from the filter one
    * further down the pipeline. */
-  virtual void GenerateOutputRequestedTemporalRegion(TemporalDataObject* output);
+  virtual void GenerateOutputRequestedTemporalRegion(TemporalDataObject* output) ITK_OVERRIDE;
 
   /** We override the default implementation of TemporalStreamingGenerateData
    * from TemporalProcessObject to provide functionality for spatial streaming.
    * This implementation works exactly the same way as the implementation of
    * GenerateData in ImageSource. The filter-specific implementation of
    * ThreadedGenerateData will be responsible of accessing the correct frames. */
-  virtual void TemporalStreamingGenerateData();
+  virtual void TemporalStreamingGenerateData() ITK_OVERRIDE;
 
   /** ThreadedGenerateData here serves the same symnatic purpose as
    * ThreadedGenerateData in ProcessObjects that handle Images. This is to say
@@ -173,7 +173,7 @@ protected:
 
   VideoSource();
   virtual ~VideoSource();
-  virtual void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
 private:
 
diff --git a/Utilities/ITK/Modules/Video/Core/include/itkVideoSource.hxx b/Utilities/ITK/Modules/Video/Core/include/itkVideoSource.hxx
index e6c86a9..05b8e31 100644
--- a/Utilities/ITK/Modules/Video/Core/include/itkVideoSource.hxx
+++ b/Utilities/ITK/Modules/Video/Core/include/itkVideoSource.hxx
@@ -69,7 +69,7 @@ VideoSource<TOutputVideoStream>::GetOutput()
   if (this->GetNumberOfOutputs() < 1)
     {
     itkWarningMacro("No outputs set");
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   // Return the output
@@ -87,7 +87,7 @@ VideoSource<TOutputVideoStream>::GetOutput(unsigned int idx)
     (this->TemporalProcessObject::GetOutput(idx) );
 
   // Make sure there is at least 1 output
-  if (out == NULL)
+  if (out == ITK_NULLPTR)
     {
     itkWarningMacro("dynamic_cast to output type failed");
     }
diff --git a/Utilities/ITK/Modules/Video/Core/include/itkVideoStream.h b/Utilities/ITK/Modules/Video/Core/include/itkVideoStream.h
index 52b5f9f..39d60dd 100644
--- a/Utilities/ITK/Modules/Video/Core/include/itkVideoStream.h
+++ b/Utilities/ITK/Modules/Video/Core/include/itkVideoStream.h
@@ -273,7 +273,7 @@ public:
    * just copies the meta information using TemporalProcessObject's Graft then
    * sets the internal RingBuffer pointer to point to the same buffer used by
    * the other VideoStream. */
-  virtual void Graft(const DataObject* data);
+  virtual void Graft(const DataObject* data) ITK_OVERRIDE;
 
 protected:
 
@@ -281,7 +281,7 @@ protected:
   }
   virtual ~VideoStream() {
   }
-  virtual void PrintSelf(std::ostream & os, Indent indent) const
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
   {
     Superclass::Print(os, indent);
   }
diff --git a/Utilities/ITK/Modules/Video/Core/src/itkTemporalDataObject.cxx b/Utilities/ITK/Modules/Video/Core/src/itkTemporalDataObject.cxx
index 0bdc42f..40fe566 100644
--- a/Utilities/ITK/Modules/Video/Core/src/itkTemporalDataObject.cxx
+++ b/Utilities/ITK/Modules/Video/Core/src/itkTemporalDataObject.cxx
@@ -249,7 +249,6 @@ TemporalDataObject
       itkExceptionMacro( << "itk::TemporalDataObject::"
                          << "RequestedRegionIsOutsideOfTheBufferedRegion() "
                          << "Invalid Temporal Unit" );
-      return true;
     }
 }
 
@@ -283,7 +282,6 @@ TemporalDataObject
     default:
       itkExceptionMacro( << "itk::TemporalDataObject::VerifyRequestedRegion() "
                          << "Invalid Temporal Unit" );
-      return false;
     }
 }
 
diff --git a/Utilities/ITK/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx b/Utilities/ITK/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx
index fa31c97..3ebc3b4 100644
--- a/Utilities/ITK/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx
+++ b/Utilities/ITK/Modules/Video/Filtering/include/itkImageFilterToVideoFilterWrapper.hxx
@@ -37,7 +37,7 @@ ImageFilterToVideoFilterWrapper()
   this->TemporalProcessObject::m_FrameSkipPerOutput = 1;
 
   // Initialize image filter to NULL
-  m_ImageFilter = NULL;
+  m_ImageFilter = ITK_NULLPTR;
 }
 
 //
diff --git a/Utilities/ITK/Modules/Video/IO/include/itkFileListVideoIO.h b/Utilities/ITK/Modules/Video/IO/include/itkFileListVideoIO.h
index d8184e3..b70dbf3 100644
--- a/Utilities/ITK/Modules/Video/IO/include/itkFileListVideoIO.h
+++ b/Utilities/ITK/Modules/Video/IO/include/itkFileListVideoIO.h
@@ -50,7 +50,7 @@ public:
   itkTypeMacro(FileListVideoIO, Superclass);
 
   /** Close the reader and writer and reset members */
-  virtual void FinishReadingOrWriting();
+  virtual void FinishReadingOrWriting() ITK_OVERRIDE;
 
   /** Split up the input file names -- This is public so that places where
    * FileListVideoIO is used can access the individual file names. This is
@@ -60,27 +60,27 @@ public:
   /*-------- This part of the interface deals with reading data. ------ */
 
   /** Set to reading from file */
-  virtual void SetReadFromFile();
+  virtual void SetReadFromFile() ITK_OVERRIDE;
 
   /** Set to reading from a camera */
-  virtual void SetReadFromCamera();
+  virtual void SetReadFromCamera() ITK_OVERRIDE;
 
   /** Determine the file type. Returns true if this ImageIO can read the
    * file specified. */
-  virtual bool CanReadFile(const char *);
+  virtual bool CanReadFile(const char *) ITK_OVERRIDE;
 
   /** Return whether or not the VideoIO can read from a camera */
-  virtual bool CanReadCamera( CameraIDType cameraID )const;
+  virtual bool CanReadCamera( CameraIDType cameraID )const ITK_OVERRIDE;
 
   /** Set the spacing and dimension information for the set filename. */
-  virtual void ReadImageInformation();
+  virtual void ReadImageInformation() ITK_OVERRIDE;
 
   /** Reads the data from disk into the memory buffer provided. */
-  virtual void Read(void *buffer);
+  virtual void Read(void *buffer) ITK_OVERRIDE;
 
   /** Set the next frame that should be read. Return true if you operation
    * successful */
-  virtual bool SetNextFrameToRead(FrameOffsetType frameNumber);
+  virtual bool SetNextFrameToRead(FrameOffsetType frameNumber) ITK_OVERRIDE;
 
   /** Accessor functions for video specific information */
   itkGetConstMacro(PositionInMSec,TemporalOffsetType);
@@ -92,42 +92,42 @@ public:
   itkGetConstMacro(LastIFrame,FrameOffsetType);
 
   /** Override SetFileName to do parsing */
-  virtual void SetFileName(const std::string& fileList);
-  virtual void SetFileName(const char* fileList);
+  virtual void SetFileName(const std::string& fileList) ITK_OVERRIDE;
+  virtual void SetFileName(const char* fileList) ITK_OVERRIDE;
 
   /** Override Accessors to pass through to internal image reader */
-  virtual double GetSpacing(unsigned int i) const;
+  virtual double GetSpacing(unsigned int i) const ITK_OVERRIDE;
 
-  virtual double GetOrigin(unsigned int i) const;
+  virtual double GetOrigin(unsigned int i) const ITK_OVERRIDE;
 
-  virtual std::vector< double > GetDirection(unsigned int i) const;
+  virtual std::vector< double > GetDirection(unsigned int i) const ITK_OVERRIDE;
 
   /*-------- This part of the interfaces deals with writing data. ----- */
 
   /** Determine the file type. Returns true if this ImageIO can write the
    * file specified. */
-  virtual bool CanWriteFile(const char *);
+  virtual bool CanWriteFile(const char *) ITK_OVERRIDE;
 
   /** Writes the spacing and dimensions of the image.
    * Assumes SetFileName has been called with a valid file name. */
-  virtual void WriteImageInformation();
+  virtual void WriteImageInformation() ITK_OVERRIDE;
 
   /** 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);
+  virtual void Write(const void *buffer) ITK_OVERRIDE;
 
   /** Set Writer Parameters */
   virtual void SetWriterParameters( TemporalRatioType framesPerSecond,
                                     const std::vector<SizeValueType>& dim,
                                     const char* fourCC,
                                     unsigned int nChannels,
-                                    IOComponentType componentType );
+                                    IOComponentType componentType ) ITK_OVERRIDE;
 
 protected:
   FileListVideoIO();
   ~FileListVideoIO();
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Reset member variables to empty state closed */
   void ResetMembers();
diff --git a/Utilities/ITK/Modules/Video/IO/include/itkFileListVideoIOFactory.h b/Utilities/ITK/Modules/Video/IO/include/itkFileListVideoIOFactory.h
index 85925a6..97e1efd 100644
--- a/Utilities/ITK/Modules/Video/IO/include/itkFileListVideoIOFactory.h
+++ b/Utilities/ITK/Modules/Video/IO/include/itkFileListVideoIOFactory.h
@@ -38,9 +38,9 @@ public:
   typedef SmartPointer< const Self > ConstPointer;
 
   /** Class methods used to interface with the registered factories. */
-  virtual const char * GetITKSourceVersion(void) const;
+  virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE;
 
-  virtual const char * GetDescription(void) const;
+  virtual const char * GetDescription(void) const ITK_OVERRIDE;
 
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
diff --git a/Utilities/ITK/Modules/Video/IO/include/itkVideoFileReader.hxx b/Utilities/ITK/Modules/Video/IO/include/itkVideoFileReader.hxx
index 0bf46f4..531f15d 100644
--- a/Utilities/ITK/Modules/Video/IO/include/itkVideoFileReader.hxx
+++ b/Utilities/ITK/Modules/Video/IO/include/itkVideoFileReader.hxx
@@ -37,7 +37,7 @@ VideoFileReader< TOutputVideoStream >
 {
   // Initialize members
   m_FileName = "";
-  m_VideoIO = NULL;
+  m_VideoIO = ITK_NULLPTR;
   m_PixelConversionNeeded = false;
   m_IFrameSafe = true;
 
diff --git a/Utilities/ITK/Modules/Video/IO/include/itkVideoFileWriter.h b/Utilities/ITK/Modules/Video/IO/include/itkVideoFileWriter.h
index cf3c76f..019a26e 100644
--- a/Utilities/ITK/Modules/Video/IO/include/itkVideoFileWriter.h
+++ b/Utilities/ITK/Modules/Video/IO/include/itkVideoFileWriter.h
@@ -100,11 +100,11 @@ public:
 
   /** Aliased to the Write() method to be consistent with the rest of the
    * pipeline. */
-  virtual void Update();
+  virtual void Update() ITK_OVERRIDE;
 
   /** Write the entire video to a file, if possible. This is the same as
    * calling write or update without setting an output temporal region. */
-  virtual void UpdateLargestPossibleRegion();
+  virtual void UpdateLargestPossibleRegion() ITK_OVERRIDE;
 
 protected:
 
@@ -112,7 +112,7 @@ protected:
 
   VideoFileWriter();
   virtual ~VideoFileWriter();
-  void PrintSelf(std::ostream &os, Indent indent) const;
+  virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE;
 
   /** Initialize output parameters */
   bool InitializeOutputParameters();
@@ -123,7 +123,7 @@ protected:
   bool InitializeVideoIO();
 
   /** Override TemporalStreamingGenerateData to do the actual writing. */
-  virtual void TemporalStreamingGenerateData();
+  virtual void TemporalStreamingGenerateData() ITK_OVERRIDE;
 
   /**-PROTECTED MEMBERS------------------------------------------------------*/
 
diff --git a/Utilities/ITK/Modules/Video/IO/include/itkVideoFileWriter.hxx b/Utilities/ITK/Modules/Video/IO/include/itkVideoFileWriter.hxx
index 52a6186..ea639b8 100644
--- a/Utilities/ITK/Modules/Video/IO/include/itkVideoFileWriter.hxx
+++ b/Utilities/ITK/Modules/Video/IO/include/itkVideoFileWriter.hxx
@@ -34,14 +34,13 @@ namespace itk
 //
 template< typename TInputVideoStream >
 VideoFileWriter< TInputVideoStream >
-::VideoFileWriter()
+::VideoFileWriter() :
+  m_FileName(""),
+  m_VideoIO(ITK_NULLPTR),
+  m_FramesPerSecond(24),
+  m_FourCC("MP42"),
+  m_NumberOfComponents(0)
 {
-  // Initialize members
-  m_FileName = "";
-  m_VideoIO = NULL;
-  m_FramesPerSecond = 24; // Default to 24 fps
-  m_FourCC = "MP42";      // Default to Mpeg 4 v2
-
   // TemporalProcessObject inherited members
   this->TemporalProcessObject::m_UnitInputNumberOfFrames = 1;
   this->TemporalProcessObject::m_UnitOutputNumberOfFrames = 1;
@@ -102,7 +101,7 @@ VideoFileWriter< TInputVideoStream >
 {
   if (this->GetNumberOfInputs() < 1)
     {
-    return NULL;
+    return ITK_NULLPTR;
     }
 
   return static_cast<VideoStreamType*>(this->ProcessObject::GetInput(0));
@@ -135,7 +134,7 @@ VideoFileWriter< TInputVideoStream >
 
   // Make sure input is available
   const VideoStreamType* input = this->GetInput();
-  if (input == NULL)
+  if (input == ITK_NULLPTR)
     {
     itkExceptionMacro("No input to writer");
     }
@@ -272,7 +271,7 @@ VideoFileWriter< TInputVideoStream >
 ::UpdateLargestPossibleRegion()
 {
   const VideoStreamType* input = this->GetInput();
-  if (input == NULL)
+  if (input == ITK_NULLPTR)
     {
     itkExceptionMacro("No input to writer");
     }
@@ -320,7 +319,7 @@ VideoFileWriter< TInputVideoStream >
 ::InitializeOutputParameters()
 {
   // InputImage and VideoIO must be valid
-  if (this->GetInput() == NULL)
+  if (this->GetInput() == ITK_NULLPTR)
     {
     return false;
     }
diff --git a/Utilities/ITK/Modules/Video/IO/include/itkVideoIOBase.h b/Utilities/ITK/Modules/Video/IO/include/itkVideoIOBase.h
index f1c64e5..4eb0c06 100644
--- a/Utilities/ITK/Modules/Video/IO/include/itkVideoIOBase.h
+++ b/Utilities/ITK/Modules/Video/IO/include/itkVideoIOBase.h
@@ -114,7 +114,7 @@ protected:
   VideoIOBase();
   virtual ~VideoIOBase();
 
-  void PrintSelf(std::ostream & os, Indent indent) const;
+  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
 
   /** Member Variables */
   ReadType           m_ReadType;
diff --git a/Utilities/ITK/Modules/Video/IO/src/itkFileListVideoIO.cxx b/Utilities/ITK/Modules/Video/IO/src/itkFileListVideoIO.cxx
index 52a71c1..12b253a 100644
--- a/Utilities/ITK/Modules/Video/IO/src/itkFileListVideoIO.cxx
+++ b/Utilities/ITK/Modules/Video/IO/src/itkFileListVideoIO.cxx
@@ -526,7 +526,7 @@ void FileListVideoIO::OpenWriter()
 //
 void FileListVideoIO::ResetMembers()
 {
-  m_ImageIO = NULL;
+  m_ImageIO = ITK_NULLPTR;
   m_FileNames.clear();
   m_WriterOpen = false;
   m_ReaderOpen = false;
diff --git a/Utilities/ITK/Modules/Video/IO/src/itkVideoIOBase.cxx b/Utilities/ITK/Modules/Video/IO/src/itkVideoIOBase.cxx
index 21dd988..618e34b 100644
--- a/Utilities/ITK/Modules/Video/IO/src/itkVideoIOBase.cxx
+++ b/Utilities/ITK/Modules/Video/IO/src/itkVideoIOBase.cxx
@@ -24,7 +24,17 @@
 namespace itk
 {
 
-VideoIOBase::VideoIOBase()
+VideoIOBase::VideoIOBase() :
+  m_ReadType(ReadFromFile),
+  m_FramesPerSecond(0.0),
+  m_FrameTotal(NumericTraits<SizeValueType>::Zero),
+  m_CurrentFrame(NumericTraits<SizeValueType>::Zero),
+  m_IFrameInterval(NumericTraits<SizeValueType>::Zero),
+  m_LastIFrame(NumericTraits<SizeValueType>::Zero),
+  m_Ratio(0.0),
+  m_PositionInMSec(0.0),
+  m_WriterOpen(false),
+  m_ReaderOpen(false)
 {
 }
 
diff --git a/Utilities/ITK/Modules/Video/IO/src/itkVideoIOFactory.cxx b/Utilities/ITK/Modules/Video/IO/src/itkVideoIOFactory.cxx
index 8315bbf..6f98007 100644
--- a/Utilities/ITK/Modules/Video/IO/src/itkVideoIOFactory.cxx
+++ b/Utilities/ITK/Modules/Video/IO/src/itkVideoIOFactory.cxx
@@ -83,7 +83,7 @@ VideoIOBase::Pointer VideoIOFactory::CreateVideoIO( IOModeType mode, const char*
     }
 
   // Didn't find a usable VideoIO
-  return NULL;
+  return ITK_NULLPTR;
 
 }
 
diff --git a/Utilities/ITK/README.OTB.txt b/Utilities/ITK/README.OTB.txt
deleted file mode 100644
index 7f5381f..0000000
--- a/Utilities/ITK/README.OTB.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-Update of ITK in OTB source tree
-================================
-
-#Perhpas better to update internal ITK using the archive .tar.gz
-
-# Remove old version
-find Utilities/ITK -type f -not -name "README.OTB.txt" | xargs rm
-find Utilities/ITK/* -type d | xargs rm -r
-
-# Copy new version
-cp -R /home/jmalik/dev/src/ITK/* Utilities/ITK
-
-# git files 
-rm -rf Utilities/ITK/.git*
-rm -rf Utilities/ITK/Modules/Remote/.gitignore
-rm -rf Utilities/ITK/Modules/External/.gitignore
-rm -rf Utilities/ITK/Modules/ThirdParty/.gitattributes
-
-# Remove ITK module test code
-find Utilities/ITK -type d | grep -v vxl_shared_link_test | grep test$ | xargs rm -rf
-
-# Remove ThirdParty code we don't need
-rm -rf Utilities/ITK/Modules/ThirdParty/DCMTK
-rm -rf Utilities/ITK/Modules/ThirdParty/DICOMParser
-rm -rf Utilities/ITK/Modules/ThirdParty/GDCM
-rm -rf Utilities/ITK/Modules/ThirdParty/GIFTI
-rm -rf Utilities/ITK/Modules/ThirdParty/HDF5
-rm -rf Utilities/ITK/Modules/ThirdParty/JPEG
-rm -rf Utilities/ITK/Modules/ThirdParty/MINC
-rm -rf Utilities/ITK/Modules/ThirdParty/NIFTI
-rm -rf Utilities/ITK/Modules/ThirdParty/NrrdIO
-rm -rf Utilities/ITK/Modules/ThirdParty/OpenJPEG
-rm -rf Utilities/ITK/Modules/ThirdParty/PNG
-rm -rf Utilities/ITK/Modules/ThirdParty/TIFF
-
-# Remove IO modules code we don't need 
-find Utilities/ITK/Modules/IO  -maxdepth 1 -mindepth 1 -type d | grep -v ImageBase | xargs rm -rf
-
-rm -rf Utilities/ITK/Modules/Core/TestKernel
-rm -rf Utilities/ITK/Modules/Bridge
-rm -rf Utilities/ITK/Modules/Numerics/FEM
-rm -rf Utilities/ITK/Modules/Nonunit/Review
-rm -rf Utilities/ITK/Modules/Segmentation/LevelSetsv4Visualization
-rm -rf Utilities/ITK/Modules/Registration/FEM
-rm -rf Utilities/ITK/Modules/Compatibility/Deprecated
-
-
-# Remaining ThirdParty :
-DoubleConversion (needed by Common)
-Expat (needed by MetaIO)
-KWSys (needed by Common)
-MetaIO (needed by SpatialObjects)
-Netlib (needed by Statistics)
-VNL (needed by VNLInstantiation Netlib)
-VNLInstantiation (needed by Common)
-ZLIB (needed by MetaIO)
-
-
-
-# Remove directory we don't use in OTB
-rm -rf Utilities/ITK/Documentation
-rm -rf Utilities/ITK/Examples
-rm -rf Utilities/ITK/Testing
-rm -rf Utilities/ITK/Utilities/Dart
-rm -rf Utilities/ITK/Utilities/DevelopmentSetupScripts
-rm -rf Utilities/ITK/Utilities/Git
-rm -rf Utilities/ITK/Utilities/Hooks
-rm -rf Utilities/ITK/Utilities/InstallTest
-rm     Utilities/ITK/Utilities/SetupForDevelopment.sh
-
-# Check that everything is working properly by compiling OTB with internal ITK
-# and run some tests
-
-# Commit those changes in one commit. Use the -A option of hg commit to
-#  add/remove new/old files in ITK  
-
-
-
-
diff --git a/Utilities/ITK/Utilities/Doxygen/CMakeLists.txt b/Utilities/ITK/Utilities/Doxygen/CMakeLists.txt
index 97bd7ea..31876f0 100644
--- a/Utilities/ITK/Utilities/Doxygen/CMakeLists.txt
+++ b/Utilities/ITK/Utilities/Doxygen/CMakeLists.txt
@@ -135,25 +135,24 @@ if (BUILD_DOCUMENTATION)
     DEPENDS "${ITK_SOURCE_DIR}/Examples" "${ITK_SOURCE_DIR}/Utilities/Doxygen/GenerateExamplesDox.cmake"
     )
 
+  add_custom_target(Documentation ALL
+    COMMAND ${DOXYGEN_EXECUTABLE} ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config
+    MAIN_DEPENDENCY ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config
+    DEPENDS         ${ITK_BINARY_DIR}/Utilities/Doxygen/itkdoxygen.pl
+    DEPENDS         ${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox
+    WORKING_DIRECTORY ${ITK_BINARY_DIR}/Utilities/Doxygen
+    )
 
   # Somehow the logo image is not copied into the html folder.
   # Here we ensure that the logo image ends up in the right directory
   # where html pages could find it.
   add_custom_command(TARGET Documentation
+    POST_BUILD
     COMMAND ${CMAKE_COMMAND} -E copy
       ${ITK_SOURCE_DIR}/Documentation/Art/itkLogoSmall.jpg # logo
       ${ITK_DOXYGEN_OUTPUT_DIR}/html # output doxygen directory
     )
 
-  add_custom_target(Documentation ALL
-    COMMAND ${DOXYGEN_EXECUTABLE} ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config
-    MAIN_DEPENDENCY ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config
-    DEPENDS         ${ITK_BINARY_DIR}/Utilities/Doxygen/itkdoxygen.pl
-    DEPENDS         ${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox
-    WORKING_DIRECTORY ${ITK_BINARY_DIR}/Utilities/Doxygen
-    )
-
-
   message( STATUS
            "To generate Doxygen's documentation, you need to build the Documentation target"
          )
diff --git a/Utilities/ITK/Utilities/Doxygen/doxygen.config.in b/Utilities/ITK/Utilities/Doxygen/doxygen.config.in
index 1bfb75a..0799659 100644
--- a/Utilities/ITK/Utilities/Doxygen/doxygen.config.in
+++ b/Utilities/ITK/Utilities/Doxygen/doxygen.config.in
@@ -1972,11 +1972,12 @@ PREDEFINED             = "itkNotUsed(x)=" \
                          "itkSetConstObjectMacro(name,type)=                   virtual void Set##name ( const type* _arg);" \
                          "itkGetConstObjectMacro(name,type)=      virtual const type* Get##name () const;" \
                          "itkGetModifiableObjectMacro(name,type)= virtual type* GetModifiable##name ();  virtual const type* Get##name () const;" \
-                         "itkGetConstReferenceMacro(name,type)=                   virtual const type& Get##name ();" \
+                         "itkGetConstReferenceMacro(name,type)=                   virtual const type& Get##name () const;" \
                          "itkSetEnumMacro(name,type)=                   virtual void Set##name (const type _arg);" \
                          "itkGetEnumMacro(name,type)=                   virtual type Get##name () const;" \
                          "itkGetConstReferenceObjectMacro(name,type)=                   virtual const type::Pointer& Get##name () const;" \
                          "itkSetDecoratedInputMacro(name, type, number)=                   virtual void Set##name##Input(const SimpleDataObjectDecorator<type> *_arg);                   virtual void SetInput##number(const SimpleDataObjectDecorator<type> *_arg);                   virtual const SimpleDataObjectDecorator<type> * Get##name##Input() const;                   virtual const SimpleDataObjectDecorator<type> * GetInput##number() const;                   virtual void Set##name(const  [...]
+                         "itkSetGetDecoratedInputMacro(name, type, number)=                   virtual void Set##name##Input(const SimpleDataObjectDecorator< type > *_arg);         virtual void Set##name(const type &_arg);          virtual const SimpleDataObjectDecorator< type > * Get##name##Input() const;              virtual const type & Get##name() const;          " \
                          "itkSetDecoratedObjectInputMacro(name, type, number)=                   virtual void Set##name##Input(const DataObjectDecorator<type> *_arg);                   virtual void SetInput##number(const DataObjectDecorator<type> *_arg);                   virtual const DataObjectDecorator<type> * Get##name##Input() const;                   virtual const DataObjectDecorator<type> * GetInput##number() const;                   virtual void Set##name(const type *_arg);" \
                          "itkBooleanMacro(name)=                   virtual void name##On ();                   virtual void name##Off ();" \
                          "itkSetVector2Macro(name,type)=                   virtual void Set##name (type _arg1, type _arg2)                   virtual void Set##name (type _arg[2]);" \
@@ -1999,7 +2000,7 @@ PREDEFINED             = "itkNotUsed(x)=" \
                          "itkEventMacro(thisClass,superclass)=                   class thisClass : public superclass {};" \
                          "itkDeclareExceptionMacro(newexcp,parentexcp,whatmessage)=         namespace itk {         class newexcp : public parentexcp {        public:       newexcp( const char *file, unsigned int lineNumber ) :        parentexcp( file, lineNumber )          { this->SetDescription( whatmessage ); }          newexcp( const std::string & file, unsigned int lineNumber ) :          parentexcp( file, lineNumber )          { this->SetDescription( whatmessage ); }          itkTy [...]
                          "itkConceptMacro(thisName,thisConcept)=                   /** This class requires thisName                       in the form of thisConcept */                     typedef thisConcept thisName;" \
-                         "vcl_numeric_limits=                   std::numeric_limits" \
+                         "std::numeric_limits=                   std::numeric_limits" \
                          "ITK_TYPENAME=                   typename" \
                          "itkTemplateFloatingToIntegerMacro(name)=                   template <TReturn, typename TInput> name( TInput x )" \
                          "FEM_ABSTRACT_CLASS(thisClass,parentClass)=                   public:                                                                   /** Standard  Self typedef.*/                                          typedef thisClass Self;                                                 /** Standard  Superclass typedef. */                                   typedef parentClass Superclass;                                         /** Pointer or SmartPointer to an object. */  [...]
@@ -2016,7 +2017,8 @@ PREDEFINED             = "itkNotUsed(x)=" \
                          "ITK_USE_FFTWF" \
                          "ITK_USE_CONCEPT_CHECKING" \
                          "__itkMacro_h" \
-                         "ITK_LEGACY_REMOVE"
+                         "ITK_LEGACY_REMOVE" \
+                         "ITKCommon_EXPORT_EXPLICIT"
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
 # tag can be used to specify a list of macro names that should be expanded. The
diff --git a/Utilities/ITK/Utilities/KWStyle/KWStyle.cmake b/Utilities/ITK/Utilities/KWStyle/KWStyle.cmake
index a755337..4d6335e 100644
--- a/Utilities/ITK/Utilities/KWStyle/KWStyle.cmake
+++ b/Utilities/ITK/Utilities/KWStyle/KWStyle.cmake
@@ -1,12 +1,13 @@
-
-find_package(KWStyle 1.0.1
-  QUIET
-  )
-option(ITK_USE_KWSTYLE
-  "Enable the use of KWStyle for checking coding style."
-  ${KWSTYLE_FOUND} # default
-  )
-mark_as_advanced(ITK_USE_KWSTYLE)
+if(NOT DEFINED ITK_USE_KWSTYLE)
+  find_package(KWStyle 1.0.1
+    QUIET
+    )
+  option(ITK_USE_KWSTYLE
+    "Enable the use of KWStyle for checking coding style."
+    ${KWSTYLE_FOUND} # default
+    )
+  mark_as_advanced(ITK_USE_KWSTYLE)
+endif(NOT DEFINED ITK_USE_KWSTYLE)
 
 if(ITK_USE_KWSTYLE)
   find_package(KWStyle 1.0.1
@@ -15,24 +16,24 @@ if(ITK_USE_KWSTYLE)
     )
 
   # Define and configure configuration files
-  set(KWSTYLE_ITK_CONFIGURATION_FILE
+  set(kwstyle_itk_configuration_file
     ${ITK_SOURCE_DIR}/Utilities/KWStyle/ITK.kws.xml
     )
-  set(KWSTYLE_ITK_CODE_FILES_LIST_FILE
+  set(kwstyle_itk_code_files_list_file
     ${ITK_BINARY_DIR}/Utilities/KWStyle/ITKCodeFiles.txt
     )
   configure_file( # KWStyle requires that the files list be absolute paths
     ${ITK_SOURCE_DIR}/Utilities/KWStyle/ITKCodeFiles.txt.in
-    ${KWSTYLE_ITK_CODE_FILES_LIST_FILE}
+    ${kwstyle_itk_code_files_list_file}
     )
-  set(KWSTYLE_ITK_EXAMPLES_FILES_LIST_FILE
+  set(kwstyle_itk_examples_files_list_file
     ${ITK_BINARY_DIR}/Utilities/KWStyle/ITKExamplesFiles.txt
     )
   configure_file( # KWStyle requires that the files list be absolute paths
     ${ITK_SOURCE_DIR}/Utilities/KWStyle/ITKExamplesFiles.txt.in
-    ${KWSTYLE_ITK_EXAMPLES_FILES_LIST_FILE}
+    ${kwstyle_itk_examples_files_list_file}
     )
-  set(KWSTYLE_ITK_OVERWRITE_FILE
+  set(kwstyle_itk_overwrite_file
     ${ITK_SOURCE_DIR}/Utilities/KWStyle/ITKOverwrite.txt
     )
 
@@ -54,61 +55,61 @@ if(ITK_USE_KWSTYLE)
   mark_as_advanced(KWSTYLE_USE_GCC_FORMAT)
   mark_as_advanced(KWSTYLE_USE_MSVC_FORMAT)
 
-  set(KWSTYLE_EDITOR_FORMAT "")
+  set(kwstyle_editor_format "")
   if(KWSTYLE_USE_VIM_FORMAT)
-    list(APPEND KWSTYLE_EDITOR_FORMAT -vim)
+    list(APPEND kwstyle_editor_format -vim)
   endif()
   if(KWSTYLE_USE_GCC_FORMAT)
-    list(APPEND KWSTYLE_EDITOR_FORMAT -gcc)
+    list(APPEND kwstyle_editor_format -gcc)
   endif()
   if(KWSTYLE_USE_MSVC_FORMAT)
-    list(APPEND KWSTYLE_EDITOR_FORMAT -msvc)
+    list(APPEND kwstyle_editor_format -msvc)
   endif()
 
   list(LENGTH
-    KWSTYLE_EDITOR_FORMAT
-    KWSTYLE_EDITOR_FORMAT_LENGTH
+    kwstyle_editor_format
+    kwstyle_editor_format_length
     )
-  if(KWSTYLE_EDITOR_FORMAT_LENGTH GREATER 1)
+  if(kwstyle_editor_format_length GREATER 1)
     message(FATAL_ERROR "At most, only one of KWSTYLE_USE_*_FORMAT can be set to TRUE.")
   endif()
 
   # Add build target and CTest test
-  set(KWSTYLE_COMMON_ARGUMENTS
-    -xml ${KWSTYLE_ITK_CONFIGURATION_FILE}
+  set(kwstyle_common_arguments
+    -xml ${kwstyle_itk_configuration_file}
     -v
-    -o ${KWSTYLE_ITK_OVERWRITE_FILE}
+    -o ${kwstyle_itk_overwrite_file}
     )
   add_custom_target(StyleCheckCode
     COMMAND ${KWSTYLE_EXECUTABLE}
-      ${KWSTYLE_COMMON_ARGUMENTS}
-      -D ${KWSTYLE_ITK_CODE_FILES_LIST_FILE}
-      ${KWSTYLE_EDITOR_FORMAT}
+      ${kwstyle_common_arguments}
+      -D ${kwstyle_itk_code_files_list_file}
+      ${kwstyle_editor_format}
     COMMENT "Coding Style Checker"
-    WORKING_DIRECTORY ${ITK_SOURCE_DIR} # the paths in KWSTYLE_CONFIGURATION_FILE are relative
+    WORKING_DIRECTORY ${ITK_SOURCE_DIR} # the paths in kwstyle_itk_configuration_file are relative
     )
   add_custom_target(StyleCheckExamples
     COMMAND ${KWSTYLE_EXECUTABLE}
-      ${KWSTYLE_COMMON_ARGUMENTS}
-      -D ${KWSTYLE_ITK_EXAMPLES_FILES_LIST_FILE}
-      ${KWSTYLE_EDITOR_FORMAT}
+      ${kwstyle_common_arguments}
+      -D ${kwstyle_itk_examples_files_list_file}
+      ${kwstyle_editor_format}
     COMMENT "Examples Style Checker"
-    WORKING_DIRECTORY ${ITK_SOURCE_DIR} # the paths in KWSTYLE_CONFIGURATION_FILE are relative
+    WORKING_DIRECTORY ${ITK_SOURCE_DIR} # the paths in kwstyle_itk_configuration_file are relative
     )
   if(BUILD_TESTING)
     set(itk-module KWStyle)
     # for uniformity and brevity, test will always output GCC-style
     itk_add_test(NAME KWStyleCodeTest
       COMMAND ${KWSTYLE_EXECUTABLE}
-        ${KWSTYLE_COMMON_ARGUMENTS}
-        -D ${KWSTYLE_ITK_CODE_FILES_LIST_FILE}
+        ${kwstyle_common_arguments}
+        -D ${kwstyle_itk_code_files_list_file}
         -gcc
       WORKING_DIRECTORY ${ITK_SOURCE_DIR}
       )
     itk_add_test(NAME KWStyleExamplesTest
       COMMAND ${KWSTYLE_EXECUTABLE}
-        ${KWSTYLE_COMMON_ARGUMENTS}
-        -D ${KWSTYLE_ITK_EXAMPLES_FILES_LIST_FILE}
+        ${kwstyle_common_arguments}
+        -D ${kwstyle_itk_examples_files_list_file}
         -gcc
       WORKING_DIRECTORY ${ITK_SOURCE_DIR}
       )
diff --git a/Utilities/ITK/Utilities/Maintenance/ArchiveTestingData.py b/Utilities/ITK/Utilities/Maintenance/ArchiveTestingData.py
index ed4ca73..e55d8f0 100644
--- a/Utilities/ITK/Utilities/Maintenance/ArchiveTestingData.py
+++ b/Utilities/ITK/Utilities/Maintenance/ArchiveTestingData.py
@@ -10,6 +10,8 @@ local ExternalData object store.
 Requires pydas: https://github.com/midasplatform/pydas
 """
 
+from __future__ import print_function
+
 import argparse
 import fnmatch
 import os
diff --git a/Utilities/ITK/Utilities/Maintenance/BuildHeaderTest.py b/Utilities/ITK/Utilities/Maintenance/BuildHeaderTest.py
index be66437..cdf54ef 100644
--- a/Utilities/ITK/Utilities/Maintenance/BuildHeaderTest.py
+++ b/Utilities/ITK/Utilities/Maintenance/BuildHeaderTest.py
@@ -18,6 +18,8 @@
 #
 #==========================================================================*/
 
+from __future__ import print_function
+
 usage = """usage: BuildHeaderTest.py <module_name> <module_source_path> <module_binary_path> <maximum_number_of_headers>
 
 This script generates a a source file designed to check the headers in each
diff --git a/Utilities/ITK/Utilities/Maintenance/BuildKWStyle/CMakeLists.txt b/Utilities/ITK/Utilities/Maintenance/BuildKWStyle/CMakeLists.txt
index 724bc97..fc71790 100644
--- a/Utilities/ITK/Utilities/Maintenance/BuildKWStyle/CMakeLists.txt
+++ b/Utilities/ITK/Utilities/Maintenance/BuildKWStyle/CMakeLists.txt
@@ -3,6 +3,7 @@ project(BuildKWStyle)
 
 include(ExternalProject)
 
+itk_download_attempt_check(KWStyle)
 ExternalProject_add(KWStyle
   GIT_REPOSITORY "http://public.kitware.com/KWStyle.git"
 #  GIT_TAG -- shouldn't there be a release tag? the GIT repo just
diff --git a/Utilities/ITK/Utilities/Maintenance/FindRedundantHeaderIncludes.py b/Utilities/ITK/Utilities/Maintenance/FindRedundantHeaderIncludes.py
index 16ad8d7..b4427d3 100644
--- a/Utilities/ITK/Utilities/Maintenance/FindRedundantHeaderIncludes.py
+++ b/Utilities/ITK/Utilities/Maintenance/FindRedundantHeaderIncludes.py
@@ -25,6 +25,8 @@
 ## you can remove the sibling include.
 
 ## in the ITK/Code directory issue the following command
+from __future__ import print_function
+
 import os
 import sys
 import re
@@ -47,7 +49,7 @@ class FileToPathMapping:
            curr_dir=os.path.dirname(testfile)
            if not os.path.isfile(testfile):
              continue
-           #print testfile
+           #print(testfile)
            ff=open(testfile)
            search_string=r'^#include *([<"])(itk[^<"]*h)([>"])'
            myregexp=re.compile(search_string)
@@ -79,14 +81,14 @@ class FileToPathMapping:
         ## Pocess all children
         isdone=donenode.get((starting_child,dupcandidate),None)
         if isdone != None:
-          #print "found {0} {1}".format(starting_child,dupcandidate)
+          #print("found {0} {1}".format(starting_child,dupcandidate))
           return False
         else:
-          #print "adding {0} {1}".format(starting_child,dupcandidate)
+          #print("adding {0} {1}".format(starting_child,dupcandidate))
           donenode[(starting_child,dupcandidate)]=True
 
         nodeEdges=myDependTree[node]
-        #print nodeEdges
+        #print(nodeEdges)
         if ( dupcandidate not in nodeEdges): # Nothing to do
           print("-")
           return False
@@ -125,7 +127,7 @@ myDependTree=mymapper.FillFromWalkingTree(basedir)
 #    print(parentFiles)
 #    for childFiles in myDependTree[parentFiles]:
 #        print(" "*3+childFiles)
-#print mymapper.filePathBaseDirs
+#print(mymapper.filePathBaseDirs)
 
 
 donenode=dict()
diff --git a/Utilities/ITK/Utilities/Maintenance/JREUpdate.py b/Utilities/ITK/Utilities/Maintenance/JREUpdate.py
index c80655e..09bb5d3 100644
--- a/Utilities/ITK/Utilities/Maintenance/JREUpdate.py
+++ b/Utilities/ITK/Utilities/Maintenance/JREUpdate.py
@@ -14,6 +14,8 @@ Currently, the tarball needs to be uploaded manually to midas3.kitware.com.
 In the future, pydas can be used for automatic upload.
 """
 
+from __future__ import print_function
+
 import os
 import subprocess
 import tarfile
diff --git a/Utilities/ITK/Utilities/Maintenance/StripIncludes.py b/Utilities/ITK/Utilities/Maintenance/StripIncludes.py
index 58cd4bc..920233d 100644
--- a/Utilities/ITK/Utilities/Maintenance/StripIncludes.py
+++ b/Utilities/ITK/Utilities/Maintenance/StripIncludes.py
@@ -35,6 +35,7 @@ relativeFileList = "filelist.txt" # files to process
 includesToSkip = ["itkVersion.h","<cstring>", "<iostream>", "<fstream>","vnl/vnl_math.h","<string>","itkConfigure.h","<stdlib>","<time.h>"] #keep those headers
 #######################################################################
 
+from __future__ import print_function
 
 import os
 
@@ -81,7 +82,7 @@ def processFile(directory, fileName):
         if line.startswith('#include'):
             if shouldSkipInclude(line): continue
 
-            print "Try remove:", line
+            print("Try remove:", line)
             lines[i] = ""
 
             writeFile(lines, absFileName)
@@ -89,7 +90,7 @@ def processFile(directory, fileName):
             if returnCode == 0:
                 removedLines.append(i)
             else:
-                print "Restoring:", line
+                print("Restoring:", line)
                 lines[i] = line
 
     # Write final changes to file
diff --git a/Utilities/ITK/Utilities/Maintenance/UpdateCopyrightStatementsInITK.py b/Utilities/ITK/Utilities/Maintenance/UpdateCopyrightStatementsInITK.py
index 940bf8d..a384ba8 100644
--- a/Utilities/ITK/Utilities/Maintenance/UpdateCopyrightStatementsInITK.py
+++ b/Utilities/ITK/Utilities/Maintenance/UpdateCopyrightStatementsInITK.py
@@ -22,6 +22,9 @@
 #
 # This script is designed to help change the copyright notices in all ITK files to a common format.
 # For files that are .h, .cxx, .hxx, .c, if there is no other copyright information, add the itkCopyright.
+
+from __future__ import print_function
+
 import re
 import sys
 import os
@@ -108,10 +111,10 @@ for top,directory,files in os.walk(HeadOfITKTree):
         continue
       if ff[0] == '.': #Skip all files that begin with '.'
         files.remove(ff)
-        #print "@@@@@@@",ff
+        #print("@@@@@@@",ff)
         continue
       currFile=os.path.join(top,ff)
-      print currFile
+      print(currFile)
 
       infile=open(currFile,'r')
       file_text=infile.read()
diff --git a/Utilities/ITK/Utilities/Maintenance/VerifyURLs.py b/Utilities/ITK/Utilities/Maintenance/VerifyURLs.py
index 6af9aba..eec6d34 100644
--- a/Utilities/ITK/Utilities/Maintenance/VerifyURLs.py
+++ b/Utilities/ITK/Utilities/Maintenance/VerifyURLs.py
@@ -1,5 +1,7 @@
 #!/usr/bin/env python
 
+from __future__ import print_function
+
 import sys
 import re
 import httplib
@@ -22,7 +24,7 @@ for arg in sys.argv[1:]:
     f.close()
 
 if len( http_dict ) > 1:
-    print "Found ", len( http_dict ), " unique URLS."
+    print("Found ", len( http_dict ), " unique URLS.")
 
 # compile regular expression to pull out the server address and path
 server_re = re.compile( "http://([^/]+)(/?[^\s]*)" )
@@ -33,7 +35,7 @@ for url,filename in http_dict.items():
     path = mo.group( 2 )
 
     try:
-        #print "Verifying URL: ", url,
+        #print("Verifying URL: ", url,)
 
         # connect to server and get the path
         conn = httplib.HTTPConnection( server )
@@ -43,31 +45,31 @@ for url,filename in http_dict.items():
 
         if  r1.status == httplib.OK:
             # URL is OK do nothing
-            #print "   URL: ", url, r1.status, r1.reason
+            #print("   URL: ", url, r1.status, r1.reason)
             pass
         elif r1.status == httplib.MOVED_PERMANENTLY:
-            print filename,": ERROR (URL needs update): ", url,
-            print r1.status, r1.reason, " to: ", r1.getheader("location")
+            print(filename,": ERROR (URL needs update): ", url)
+            print(r1.status, r1.reason, " to: ", r1.getheader("location"))
         elif r1.status == httplib.FOUND:
-            print filename,": INFO URL: ", url, r1.status, r1.reason, " to: ", r1.getheader("location")
+            print(filename,": INFO URL: ", url, r1.status, r1.reason, " to: ", r1.getheader("location"))
             pass
         elif r1.status == httplib.FORBIDDEN:
-            print filename,": INFO URL: ", url, r1.status, r1.reason
+            print(filename,": INFO URL: ", url, r1.status, r1.reason)
             pass
         elif r1.status == httplib.NOT_FOUND:
-            print filename,": ERROR URL: ", url, r1.status, r1.reason
+            print(filename,": ERROR URL: ", url, r1.status, r1.reason)
         else:
-            print filename, ": UNKNOWN URL: ", url, "\"", r1.status, "\"", r1.reason
+            print(filename, ": UNKNOWN URL: ", url, "\"", r1.status, "\"", r1.reason)
             pass
 
 
     except Exception as e:
-        print
-        print filename,": ERROR (exception): ", url,
-        print e
+        print()
+        print(filename,": ERROR (exception): ", url)
+        print(e)
     except:
-        print filename,": ERROR (exception): ", url,
-        print "Unexpected error:", sys.exc_info()[0]
+        print(filename,": ERROR (exception): ", url)
+        print("Unexpected error:", sys.exc_info()[0])
         raise
     finally:
         conn.close()
diff --git a/Utilities/ITK/Utilities/Maintenance/VisualizeTestTimes.py b/Utilities/ITK/Utilities/Maintenance/VisualizeTestTimes.py
index 514f19e..9fc6b91 100644
--- a/Utilities/ITK/Utilities/Maintenance/VisualizeTestTimes.py
+++ b/Utilities/ITK/Utilities/Maintenance/VisualizeTestTimes.py
@@ -8,6 +8,8 @@ Run from the top of the build tree after the ctest has been run at least once.
 
 Pass the --modular-grouping flag to group by module."""
 
+from __future__ import print_function
+
 import os
 import pprint
 import subprocess
diff --git a/Utilities/ITK/Utilities/Maintenance/WhatModulesITK.py b/Utilities/ITK/Utilities/Maintenance/WhatModulesITK.py
index 10e1c55..4b0419f 100644
--- a/Utilities/ITK/Utilities/Maintenance/WhatModulesITK.py
+++ b/Utilities/ITK/Utilities/Maintenance/WhatModulesITK.py
@@ -1,10 +1,13 @@
 #!/usr/bin/env python
+
+from __future__ import print_function
+
 import os, sys
 import re
 
 program = sys.argv[0]
 if len(sys.argv) < 3:
-    print """
+    print("""
 Usage: WhatModulesITK.py itkSourceTree applicationFiles...
     Generate a FindPackage(ITK COMPONENTS) that lists all modules referenced by a set of files
 
@@ -32,7 +35,7 @@ NOTE: IO modules, other than ITKIOImageBase, are not discovered
       unless their include file is present in the application
       code. If ITKIOImageBase is present, a cmake variable
       ITK_IO_MODULES_USED is created and added to the module list.
-"""
+""")
     exit(0)
 
 # Build a dict that maps include files to paths
@@ -85,7 +88,7 @@ pathsToModules = FindModules(sys.argv[1] + "/Modules")
 
 # Test to see if ITK source is provided
 if len(pathsToModules) == 0:
-    print program + ": " + sys.argv[1] + " is not an ITK source directory. It does not contain any itk-module.cmake files."
+    print(program + ": " + sys.argv[1] + " is not an ITK source directory. It does not contain any itk-module.cmake files.")
     exit(1)
 
 # Build a set of includes for all command line files
@@ -97,7 +100,7 @@ for f in sys.argv:
     if os.path.isfile(f):
         allIncludes.update(FindIncludes(f))
     else:
-        print program + ": " + f + " is a directory and is ignored"
+        print(program + ": " + f + " is a directory and is ignored")
 
 # Build a set that contains all modules referenced in command line files
 allModules = set()
@@ -107,12 +110,12 @@ for inc in allIncludes:
         allModules.add(pathsToModules[includesToPaths[inc]])
 
 # Print a useful cmake command
-print r'set(ITK_IO_MODULES_USED "")'
-print "find_package(ITK COMPONENTS"
+print(r'set(ITK_IO_MODULES_USED "")')
+print("find_package(ITK COMPONENTS")
 for module in sorted(allModules):
-    print "  " + module
+    print("  " + module)
 if "ITKIOImageBase" in allModules:
-    print r"  ${ITK_IO_MODULES_USED}"
-print ")"
+    print(r"  ${ITK_IO_MODULES_USED}")
+print(")")
 
-print "Your application code includes " + str(len(allModules)) + " of " + str(len(pathsToModules)) + " itk modules."
+print("Your application code includes " + str(len(allModules)) + " of " + str(len(pathsToModules)) + " itk modules.")
diff --git a/Utilities/ITK/Wrapping/CMakeLists.txt b/Utilities/ITK/Wrapping/CMakeLists.txt
index 19f5b2a..cbbaacd 100644
--- a/Utilities/ITK/Wrapping/CMakeLists.txt
+++ b/Utilities/ITK/Wrapping/CMakeLists.txt
@@ -16,29 +16,21 @@
 #
 #==========================================================================*/
 
+cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+if(POLICY CMP0025)
+  cmake_policy(SET CMP0025 NEW)
+endif()
+if(POLICY CMP0042)
+  cmake_policy(SET CMP0042 NEW)
+endif()
+
 project(WrapITK)
 
 # set an internal cache to mark when this file is parsed
 set(ITK_WRAPPING_REACHED ON CACHE INTERNAL "Wrapping folder has been reached")
 
-# check cmake version
-# Require 2.4.2 for MATH and LIST commands (REMOVE_ITEM is not the same in
-# 2.4.1)
-# 2.4.5 is required to parse the if(POLICY) command.
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-if(COMMAND CMAKE_POLICY)
-  cmake_policy(SET CMP0003 NEW)
-  if(POLICY CMP0011)
-    cmake_policy(SET CMP0011 NEW)
-  endif()
-endif()
 include("CMakeUtilityFunctions.cmake")
 
-set(ITK_VERSION "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}")
-if(NOT "${CMAKE_VERSION}" STRLESS "2.6.3")
-  cmake_policy(SET CMP0011 OLD)
-endif()
-
 enable_testing()
 
 ###############################################################################
@@ -47,12 +39,6 @@ enable_testing()
 
 # Set up options needed for ConfigureWrapping
 
-# set WrapITK version
-set(WrapITK_VERSION_MAJOR 0)
-set(WrapITK_VERSION_MINOR 4)
-set(WrapITK_VERSION_PATCH 0)
-
-
 option(ITK_WRAP_unsigned_char "Wrap unsigned char type" ON)
 option(ITK_WRAP_unsigned_short "Wrap unsigned short type" OFF)
 option(ITK_WRAP_unsigned_long "Wrap unsigned long type" OFF)
diff --git a/Utilities/ITK/Wrapping/ConfigureWrapping.cmake b/Utilities/ITK/Wrapping/ConfigureWrapping.cmake
index cdcf413..556523f 100644
--- a/Utilities/ITK/Wrapping/ConfigureWrapping.cmake
+++ b/Utilities/ITK/Wrapping/ConfigureWrapping.cmake
@@ -38,8 +38,6 @@
 # only used by the macros defined in a given cmake file.
 ###############################################################################
 
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
 
 ###############################################################################
 # Find Required Packages
@@ -50,16 +48,6 @@ cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
 #-----------------------------------------------------------------------------
 find_package(ITK REQUIRED)
 include(${ITK_USE_FILE})
-# we must be sure we have the right ITK version; WrapITK can't build with
-# an old version of ITK because some classes will not be there.
-# newer version should only cause some warnings
-set(ITK_REQUIRED_VERSION "4.0.0")
-set(ITK_VERSION "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}")
-if("${ITK_VERSION}" VERSION_LESS "${ITK_REQUIRED_VERSION}")
-  message(FATAL_ERROR "ITK ${ITK_REQUIRED_VERSION} is required to build this version of WrapITK, and you are trying to use version ${ITK_VERSION}. Set ITK_DIR to point to the directory of ITK ${ITK_REQUIRED_VERSION}.")
-endif()
-
-cmake_policy(SET CMP0003 NEW)
 
 ###############################################################################
 # Set various variables in order
@@ -114,10 +102,6 @@ else()
   set(WRAP_ITK_LIBNAME_PREFIX "")
 endif()
 
-# 467 is for warnings caused by typemap on overloaded methods
-set(CSWIG_IGNORE_WARNINGS -w362 -w389 -w467 -w503 -w508 -w509 -w516)
-add_definitions(-DSWIG_GLOBAL)
-
 # generators dir
 set(GENERATORS_SRC_DIR "${WRAP_ITK_CMAKE_DIR}/Generators" CACHE INTERNAL "generators source directory")
 
diff --git a/Utilities/ITK/Wrapping/Generators/Doc/doxy2swig.py b/Utilities/ITK/Wrapping/Generators/Doc/doxy2swig.py
index 3e08303..63bf07f 100644
--- a/Utilities/ITK/Wrapping/Generators/Doc/doxy2swig.py
+++ b/Utilities/ITK/Wrapping/Generators/Doc/doxy2swig.py
@@ -21,6 +21,7 @@ output will be written (the file will be clobbered).
 # Author: Prabhu Ramachandran
 # License: BSD style
 
+from __future__ import print_function
 
 from xml.dom import minidom
 import re
@@ -309,7 +310,7 @@ class Doxy2SWIG:
             fname = refid + '.xml'
             if not os.path.exists(fname):
                 fname = os.path.join(self.my_dir,  fname)
-            print "parsing file: %s"%fname
+            print("parsing file: %s"%fname)
             p = Doxy2SWIG(fname)
             p.generate()
             self.pieces.extend(self.clean_pieces(p.pieces))
@@ -366,6 +367,6 @@ def main(input, output):
 
 if __name__ == '__main__':
     if len(sys.argv) != 3:
-        print __doc__
+        print(__doc__)
         sys.exit(1)
     main(sys.argv[1], sys.argv[2])
diff --git a/Utilities/ITK/Wrapping/Generators/Doc/doxygen.config.in b/Utilities/ITK/Wrapping/Generators/Doc/doxygen.config.in
index e856e64..e189237 100644
--- a/Utilities/ITK/Wrapping/Generators/Doc/doxygen.config.in
+++ b/Utilities/ITK/Wrapping/Generators/Doc/doxygen.config.in
@@ -420,7 +420,7 @@ PREDEFINED  =  "itkNotUsed(x)="\
                   class thisClass : public superclass {};" \
                "itkConceptMacro(name,concept)= \
                   enum { name = 0 };" \
-               "vcl_numeric_limits= \
+               "std::numeric_limits= \
                   std::numeric_limits" \
                "ITK_TYPENAME= \
                   typename" \
diff --git a/Utilities/ITK/Wrapping/Generators/Doc/itk_doxy2swig.py b/Utilities/ITK/Wrapping/Generators/Doc/itk_doxy2swig.py
index 859d54f..cab3fd9 100644
--- a/Utilities/ITK/Wrapping/Generators/Doc/itk_doxy2swig.py
+++ b/Utilities/ITK/Wrapping/Generators/Doc/itk_doxy2swig.py
@@ -7,12 +7,7 @@ Usage:
 
 """
 
-# silently import psyco
-try:
-  import psyco
-  psyco.full()
-except ImportError:
-  pass
+from __future__ import print_function
 
 import sys
 import os
@@ -40,7 +35,7 @@ class itkDoxy2SWIG(Doxy2SWIG):
     def do_compoundname(self, node):
         self.add_text('\n\n')
         data = self.cpp_to_swig_name(node.firstChild.data)
-        # print "=================", data
+        # print("=================", data)
         self.add_text('%%feature("docstring") %s "\n'%data)
 
     def do_memberdef(self, node):
@@ -80,7 +75,7 @@ class itkDoxy2SWIG(Doxy2SWIG):
                 cname = self.cpp_to_swig_name(anc_node[0].firstChild.data)
                 # self.add_text(' %s::%s "\n%s'%(cname, name, defn))
                 self.add_text(' %s::%s "'%(cname, name))
-                # print "***", name, defn
+                # print("***", name, defn)
 
             # make sure that the docstring won't be empty before writing any text
             current_length = len(self.pieces)
@@ -118,7 +113,7 @@ def d2s_dir(in_dir_name, out_swig_i):
           for swig_name in ls[2:]:
             output.write(tpl.replace("@[{(]})@", swig_name))
       else:
-        print >> sys.stderr, "Warning: %s does not exist. Ignore it." % xfn
+        print("Warning: %s does not exist. Ignore it." % xfn, file=sys.stderr)
   f = open(out_swig_i, 'w')
   f.write(output.getvalue())
   f.close()
@@ -128,6 +123,6 @@ def main(in_dir_name, out_swig_i):
 
 if __name__ == '__main__':
         if len(sys.argv) != 3:
-                print __doc__
+                print(__doc__)
                 sys.exit(1)
         main(sys.argv[1], sys.argv[2])
diff --git a/Utilities/ITK/Wrapping/Generators/GccXML/CMakeLists.txt b/Utilities/ITK/Wrapping/Generators/GccXML/CMakeLists.txt
index cd59677..33c44b8 100644
--- a/Utilities/ITK/Wrapping/Generators/GccXML/CMakeLists.txt
+++ b/Utilities/ITK/Wrapping/Generators/GccXML/CMakeLists.txt
@@ -2,6 +2,9 @@
 option(ITK_USE_SYSTEM_GCCXML "Use system gccxml. If OFF, gccxml is built as an external project." OFF)
 mark_as_advanced(ITK_USE_SYSTEM_GCCXML)
 
+set(gccxml_url http://itk.org/files/gccxml/gccxml-2014-06-10.tar.gz)
+set(gccxml_md5 3ca85731d1d95a9d433eed865d2079c0)
+
 set(gccxml_ep ${CMAKE_CURRENT_BINARY_DIR}/gccxml/bin/gccxml)
 if(WIN32)
   set(gccxml_ep "${gccxml_ep}.exe")
@@ -25,9 +28,10 @@ else()
   else()
     set(test )
   endif()
-  ExternalProject_add(GCC_XML
-  URL http://itk.org/files/gccxml/gccxml-2013-11-18.tar.bz2
-  URL_MD5 3b8f72ae76c6946a954bddf3222c201b
+  itk_download_attempt_check(GCC_XML)
+  ExternalProject_Add(GCC_XML
+  URL ${gccxml_url}
+  URL_MD5 ${gccxml_md5}
   PREFIX gccxml
   CMAKE_ARGS
     -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
@@ -129,7 +133,6 @@ macro(itk_end_wrap_submodule_gccxml module)
             -fxml-start=_cable_
             -o ${xml_file}
             ${CONFIG_GCCXML_INC_CONTENTS}
-            -DCSWIG
             -DCABLE_CONFIGURATION
             -DITK_MANUAL_INSTANTIATION
             ${cxx_file}
@@ -142,7 +145,6 @@ macro(itk_end_wrap_submodule_gccxml module)
             -fxml-start=_cable_
             -fxml=${xml_file}
             --gccxml-gcc-options ${gccxml_inc_file}
-            -DCSWIG
             -DCABLE_CONFIGURATION
             -DITK_MANUAL_INSTANTIATION
             ${ADDITIONAL_GCC_XML_FLAGS}
diff --git a/Utilities/ITK/Wrapping/Generators/Java/itkCommand.i b/Utilities/ITK/Wrapping/Generators/Java/itkCommand.i
index 752a84e..eb84cd4 100644
--- a/Utilities/ITK/Wrapping/Generators/Java/itkCommand.i
+++ b/Utilities/ITK/Wrapping/Generators/Java/itkCommand.i
@@ -1,6 +1,6 @@
 // This is needed for a reference in SwigExtras.i
 // The actuall itkCommand wrapping is done in wrap_ITKCommonBase.cxx by
-// CableSwig
+// Swig
 class itkCommand
 {
 public:
diff --git a/Utilities/ITK/Wrapping/Generators/Java/itkJavaCommand.i b/Utilities/ITK/Wrapping/Generators/Java/itkJavaCommand.i
index ad84670..800a3b8 100644
--- a/Utilities/ITK/Wrapping/Generators/Java/itkJavaCommand.i
+++ b/Utilities/ITK/Wrapping/Generators/Java/itkJavaCommand.i
@@ -77,7 +77,7 @@ namespace std {
 %}
 
 // import fake itk command
-// because itkCommand will be wrapped elsewhere by cableswig
+// because itkCommand will be wrapped elsewhere by Swig
 %import "itkCommand.i"
 
 //  create an itkJavaCommand that has an Execute method that
diff --git a/Utilities/ITK/Wrapping/Generators/Python/CMakeLists.txt b/Utilities/ITK/Wrapping/Generators/Python/CMakeLists.txt
index a0c13a4..0e81d02 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/CMakeLists.txt
+++ b/Utilities/ITK/Wrapping/Generators/Python/CMakeLists.txt
@@ -1,8 +1,19 @@
-
 ###############################################################################
-# configure python
-find_package(PythonLibs)
+# configure python (find PythonInterp first, as of cmake 3.1)
 find_package(PythonInterp)
+find_package(PythonLibs)
+
+# require at least python 2.6
+if(PYTHON_VERSION_STRING VERSION_LESS 2.6)
+  message(WARNING "Python version less than 2.6: \"${PYTHON_VERSION_STRING}\".")
+endif()
+
+# check for version mismatch.
+if(PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND
+    AND NOT(PYTHON_VERSION_STRING VERSION_EQUAL PYTHONLIBS_VERSION_STRING))
+  message(WARNING "Python executable (\"${PYTHON_VERSION_STRING}\") and library (\"${PYTHONLIBS_VERSION_STRING}\") version mismatch.")
+endif()
+
 mark_as_advanced(PYTHON_EXECUTABLE)
 include_directories(${PYTHON_INCLUDE_PATH})
 
@@ -18,15 +29,6 @@ set(ITK_WRAP_PYTHON_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE INTERNAL "pyt
 file(MAKE_DIRECTORY ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python)
 
 ###############################################################################
-# should we use autodoc? swig 1.3.37 produce invalid code with autodoc.
-# see https://sourceforge.net/tracker/index.php?func=detail&aid=2552048&group_id=1645&atid=101645
-if("${SWIG_VERSION}" STREQUAL "1.3.37")
-  set(ITK_WRAP_PYTHON_AUTODOC "" CACHE INTERNAL "python autodoc option")
-else()
-  set(ITK_WRAP_PYTHON_AUTODOC -features autodoc=1 CACHE INTERNAL "python autodoc option")
-endif()
-
-###############################################################################
 # python 2.6 search for the modules in a "64" subdirectory, and don't provide
 # any obvious way to find that. Create a link 64 -> . to make it find its
 # files.
@@ -121,21 +123,6 @@ endif()
 
 
 ###############################################################################
-# Configure the old style module
-
-if(NOT EXTERNAL_WRAP_ITK_PROJECT)
-  set(ITK_WRAP_PYTHON_OLD_STYLE_IMPORTS )
-  foreach(lib ${WRAP_ITK_MODULES})
-    set(ITK_WRAP_PYTHON_OLD_STYLE_IMPORTS "${ITK_WRAP_PYTHON_OLD_STYLE_IMPORTS}from ${lib}Python import *\n")
-  endforeach()
-  configure_file("${ITK_WRAP_PYTHON_SOURCE_DIR}/InsightToolkit.py.in"
-             "${ITK_WRAP_PYTHON_BINARY_DIR}/InsightToolkit.py"
-             @ONLY)
-  WRAP_ITK_BINDINGS_INSTALL(/Python "${ITK_WRAP_PYTHON_BINARY_DIR}/InsightToolkit.py")
-endif()
-
-
-###############################################################################
 # Copy python files for out-of-source builds, and set up install of same.
 
 if(NOT EXTERNAL_WRAP_ITK_PROJECT)
@@ -147,7 +134,7 @@ if(NOT EXTERNAL_WRAP_ITK_PROJECT)
     itkBase
     itkTemplate
     itkTypes
-  #  itkExtras/__init__
+    itkExtras
     itkLazy
     )
   # Done listing files.
@@ -162,7 +149,6 @@ if(NOT EXTERNAL_WRAP_ITK_PROJECT)
     endforeach()
   else()
     set(ITK_WRAP_PYTHON_FILES)
-    add_custom_target(copy_python_files ALL)
     foreach(file ${ITK_PYTHON_FILES})
       set(src "${CMAKE_CURRENT_SOURCE_DIR}/${file}.py")
       # recall that WRAP_ITK_BUILD_INTDIR expands to nothing if no config types are set,
@@ -176,19 +162,13 @@ if(NOT EXTERNAL_WRAP_ITK_PROJECT)
       # create the directory to avoid loosing case on windows
       file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${WRAP_ITK_INSTALL_INTDIR}${path})
 
-      add_custom_command(SOURCE ${src}
-        COMMAND ${CMAKE_COMMAND}
-        ARGS -E copy ${src} ${copy_tgt}
-        OUTPUTS ${copy_tgt}
-        TARGET copy_python_files
+      add_custom_command(OUTPUT ${copy_tgt}
+        COMMAND ${CMAKE_COMMAND} -E copy ${src} ${copy_tgt}
+        DEPENDS ${src}
         COMMENT "Copying ${file}.py to build dir.")
     endforeach()
+    add_custom_target(copy_python_files ALL DEPENDS ${ITK_WRAP_PYTHON_FILES})
 
-    # driver command to make the copy happen.
-    add_custom_command(
-      SOURCE copy_python_files
-      DEPENDS ${ITK_WRAP_PYTHON_FILES}
-      TARGET copy_python_files)
   endif()
 
   # Install the package python files.
@@ -204,6 +184,7 @@ if(CMAKE_CONFIGURATION_TYPES)
 
   foreach(config ${CMAKE_CONFIGURATION_TYPES})
     set(CONFIG_ITK_WRAP_PYTHON_DIR "${CMAKE_CURRENT_BINARY_DIR}/${config}")
+    set(CONFIG_ITK_WRAP_LIBRARY_DIR "${ITK_BINARY_DIR}/${ITK_INSTALL_LIBRARY_DIR}/${config}")
 
     # SWIG-generated libs and *.py files are sent to ${config} subdir
     # This assumes that CMAKE_LIBRARY_OUTPUT_DIRECTORY is WrapITK_BINARY_DIR/bin (bad!)
@@ -214,6 +195,7 @@ if(CMAKE_CONFIGURATION_TYPES)
   endforeach()
 else()
   set(CONFIG_ITK_WRAP_PYTHON_DIR "${CMAKE_CURRENT_BINARY_DIR}")
+  set(CONFIG_ITK_WRAP_LIBRARY_DIR "${ITK_BINARY_DIR}/${ITK_INSTALL_LIBRARY_DIR}")
 
   configure_file("${CMAKE_CURRENT_SOURCE_DIR}/WrapITK.pth.in"
                  "${CMAKE_CURRENT_BINARY_DIR}/WrapITK.pth"
@@ -222,48 +204,28 @@ else()
 endif()
 
 set(CONFIG_ITK_WRAP_PYTHON_DIR "${CMAKE_INSTALL_PREFIX}/lib/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}/Python")
+set(CONFIG_ITK_WRAP_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/${ITK_INSTALL_LIBRARY_DIR}")
 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/WrapITK.pth.in"
             "${CMAKE_CURRENT_BINARY_DIR}/InstallOnly/WrapITK.pth"
             @ONLY)
 
 if(PYTHON_EXECUTABLE)
-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/det_spp.py "try:\n  import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1)\nexcept: pass")
+  set(python_check "from __future__ import print_function\ntry:\n    import distutils.sysconfig\n    print(distutils.sysconfig.get_python_lib(1))\nexcept:\n    pass")
+  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/det_spp.py ${python_check})
   execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/det_spp.py"
     OUTPUT_VARIABLE py_spp
     ERROR_VARIABLE py_spp
   )
 endif()
 
-string(REGEX REPLACE "\\\\" "/" py_spp_nobackslashes "${py_spp}")
+string(REGEX REPLACE "\n" "" py_spp_no_newline "${py_spp}")
+string(REGEX REPLACE "\\\\" "/" py_spp_nobackslashes "${py_spp_no_newline}")
 set(PY_SITE_PACKAGES_PATH "${py_spp_nobackslashes}" CACHE PATH "Python site-packages directory to install a .pth file pointing at WrapITK Python modules.")
 mark_as_advanced(PY_SITE_PACKAGES_PATH)
 if(PY_SITE_PACKAGES_PATH)
   INSTALL_AT_ABSOLUTE_PATH(install_wrapitk_compatibility "${PY_SITE_PACKAGES_PATH}" "${CMAKE_CURRENT_BINARY_DIR}/InstallOnly/WrapITK.pth")
 endif()
 
-
-
-# # compile python files
-# set(PYTHON_MODULES "")
-# foreach(m ${WRAP_ITK_MODULES})
-#   set(PYTHON_MODULES ${PYTHON_MODULES} _${m}Python)
-# endforeach()
-#
-# add_custom_target(PythonCompile ALL
-#   ${PYTHON_EXECUTABLE}
-#   ${PY_SITE_PACKAGES_PATH}/../compileall.py -l
-#   -d "${CMAKE_INSTALL_PREFIX}/${WRAP_ITK_INSTALL_PREFIX}/lib"
-#   ${WrapITK_BINARY_DIR}/lib
-#
-#   COMMAND ${PYTHON_EXECUTABLE}
-#   ${PY_SITE_PACKAGES_PATH}/../compileall.py -l
-#   -d "${CMAKE_INSTALL_PREFIX}/${WRAP_ITK_INSTALL_PREFIX}/Python"
-#   ${WrapITK_BINARY_DIR}/Python
-#
-#   DEPENDS SwigRuntimePython ${PYTHON_MODULES}
-# )
-
-
 ###############################################################################
 # Install python stuff for external projects
 if(NOT EXTERNAL_WRAP_ITK_PROJECT)
@@ -280,9 +242,8 @@ if(NOT EXTERNAL_WRAP_ITK_PROJECT)
   )
 endif()
 
-
-
-
+###############################################################################
+# Define the wrapping macros
 
 macro(itk_wrap_module_python library_name)
   set(ITK_WRAP_PYTHON_CONFIGURATION_TEMPLATES "")
@@ -294,6 +255,77 @@ macro(itk_wrap_module_python library_name)
 endmacro()
 
 
+macro(itk_setup_swig_python type base_name interface_file python_file cpp_file doc_file)
+
+  #############################################################################
+  # Runs swig to produce the .so and the .py file
+  # Called by itk_end_wrap_module_python and by itk_end_wrap_submodule_python
+  # Type will then be either "module" or "submodule"
+  #############################################################################
+
+  set(swig_command ${SWIG_EXECUTABLE})
+  if(ITK_USE_CCACHE)
+    set(swig_command ${CCACHE_EXECUTABLE} ${swig_command})
+  endif()
+
+  set(_swig_depend)
+  if(NOT ITK_USE_SYSTEM_SWIG)
+    # The ExternalProject SWIG install.
+    set(_swig_depend swig)
+  endif()
+
+  set(dependencies
+    "${DEPS}"
+    "${interface_file}"
+    "${WRAP_ITK_TYPEDEFS_DIRECTORY}/pyBase.i"
+    "${_swig_depend}")
+
+  if("${type}" STREQUAL "module")
+    # Module
+    set(dependencies ${dependencies}
+      "${ITK_WRAP_PYTHON_LIBRARY_DEPS}"
+      "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${WRAPPER_LIBRARY_NAME}_ext.i")
+  else()
+    # Submodule
+    set(dependencies ${dependencies}
+      "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${base_name}_ext.i"
+      "${doc_file}")
+  endif()
+
+  add_custom_command(
+    OUTPUT ${cpp_file} ${python_file}
+    COMMAND ${swig_command} -c++ -python -O -features autodoc=1
+    -Werror
+    -w302 # Identifier 'name' redefined (ignored)
+    -w303 # %extend defined for an undeclared class 'name' (to avoid warning about customization in pyBase.i)
+    -w312 # Unnamed nested class not currently supported (ignored)
+    -w314 # 'identifier' is a lang keyword
+    -w361 # operator! ignored
+    -w362 # operator= ignored
+    -w350 # operator new ignored
+    -w383 # operator++ ignored
+    -w384 # operator-- ignored
+    -w389 # operator[] ignored
+    -w394 # operator new[] ignored
+    -w395 # operator delete[] ignored
+    -w467 # Overloaded declaration not supported (no type checking rule for 'type')
+    -w508 # Declaration of 'name' shadows declaration accessible via operator->(), previous declaration of'declaration'
+    -w509 # Overloaded method declaration effectively ignored, as it is shadowed by declaration
+    -o ${cpp_file}
+    -I${GENERATORS_SRC_DIR}
+    -I${WRAP_ITK_TYPEDEFS_DIRECTORY}/python
+    -I${WRAP_ITK_TYPEDEFS_DIRECTORY}
+    ${WRAP_ITK_SWIG_ARGS_PYTHON}
+    -outdir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+    ${interface_file}
+    WORKING_DIRECTORY ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python
+    DEPENDS ${dependencies}
+  )
+  WRAP_ITK_BINDINGS_INSTALL("/Python" "${python_file}")
+
+endmacro()
+
+
 macro(itk_end_wrap_module_python)
 
   # Loop over the extra swig input files and add them to the generated files
@@ -333,7 +365,6 @@ macro(itk_end_wrap_module_python)
     "${ITK_WRAP_PYTHON_BINARY_DIR}/Configuration/${WRAPPER_LIBRARY_NAME}Config.py"
   )
 
-
   # create the advanced lib module python file
   # this file let the final user _not_ use the itk module, but rather
   # something like "import Base"
@@ -343,9 +374,6 @@ macro(itk_end_wrap_module_python)
     @ONLY)
   WRAP_ITK_BINDINGS_INSTALL("/Python" "${ITK_WRAP_PYTHON_BINARY_DIR}/${WRAPPER_LIBRARY_NAME}.py")
 
-#   add_custom_target(${WRAPPER_LIBRARY_NAME}SwigPython DEPENDS ${cpp_files} ${python_files})
-#   add_custom_target(${WRAPPER_LIBRARY_NAME}Python DEPENDS ${modules})
-
   # create the python customization stuff in the main module
   # it allow to group the pythons module in a single shared lib, by loading the int
   # functions of the module. I also import the objects from the submodules in the
@@ -360,7 +388,6 @@ macro(itk_end_wrap_module_python)
     "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${WRAPPER_LIBRARY_NAME}_ext.i"
   )
 
-
   # set some var reused later
   set(interface_file "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${WRAPPER_LIBRARY_NAME}.i")
   set(lib ${WRAPPER_LIBRARY_NAME}Python)
@@ -372,44 +399,10 @@ macro(itk_end_wrap_module_python)
     set(WRAP_ITK_SWIG_ARGS_PYTHON "" CACHE STRING "Extra user-defined swig arguments to be to the swig executable.")
   endif()
 
-  # and generate c++ code from the main module swig interface.
-  set(swig_command ${SWIG_EXECUTABLE})
-  if(ITK_USE_CCACHE)
-    set(swig_command ${CCACHE_EXECUTABLE} ${swig_command})
-  endif()
-
-  set(_swig_depend)
-  if(NOT ITK_USE_SYSTEM_SWIG)
-    # The ExternalProject SWIG install.
-    set(_swig_depend swig)
-  endif()
-  add_custom_command(
-    OUTPUT ${cpp_file} ${python_file}
-    COMMAND ${swig_command} -c++ -python -O ${ITK_WRAP_PYTHON_AUTODOC} -Werror
-#       -fcompact
-    -w508 -w312 -w314 -w509 -w302 -w362
-    -w389 # operator[], to be suppressed later...
-    -w384 -w383 # operator++ ane operator--
-    -w361 # operator!
-    -w467 # overloaded functions (with typemaps)
-    -w350 -w394 -w395  # operator new/new[]/delete[] ignored
-    -w303 # to avoid warning about customization in pyBase.i
-    -o ${cpp_file}
-    -I${GENERATORS_SRC_DIR}
-    -I${WRAP_ITK_TYPEDEFS_DIRECTORY}/python
-    -I${WRAP_ITK_TYPEDEFS_DIRECTORY}
-    ${WRAP_ITK_SWIG_ARGS_PYTHON}
-    -outdir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-    ${interface_file}
-    WORKING_DIRECTORY ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python
-    DEPENDS ${DEPS} ${ITK_WRAP_PYTHON_LIBRARY_DEPS} ${interface_file}
-    ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${WRAPPER_LIBRARY_NAME}_ext.i
-    ${WRAP_ITK_TYPEDEFS_DIRECTORY}/pyBase.i ${_swig_depend}
-  )
-  WRAP_ITK_BINDINGS_INSTALL("/Python" "${python_file}")
+  # Run swig to produce the .so and the .py file
+  itk_setup_swig_python("module" ${base_name} ${interface_file} ${python_file} ${cpp_file} "")
 
   # build all the c++ files from this module in a common lib
-  set(lib ${WRAPPER_LIBRARY_NAME}Python)
   add_library(${lib} MODULE ${cpp_file} ${ITK_WRAP_PYTHON_CXX_FILES} ${WRAPPER_LIBRARY_CXX_SOURCES})
   set_target_properties(${lib} PROPERTIES PREFIX "_")
   # gcc 4.4 complains a lot without this flag when building in release mode
@@ -489,7 +482,6 @@ macro(itk_end_wrap_submodule_python group_name)
   set(ITK_WRAP_PYTHON_SWIG_EXT "%import pyBase.i\n\n${ITK_WRAP_PYTHON_SWIG_EXT}")
 
   # create the swig interface for all the groups in the module
-  #
   set(interface_file "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${base_name}.i")
   set(lib ${group_name}Python)
   set(python_file "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${lib}.py")
@@ -508,48 +500,8 @@ macro(itk_end_wrap_submodule_python group_name)
     set(DEPS ${DEPS} ${${dep}SwigFiles})
   endforeach()
 
-  # and run swig to produce the c++ file and the .py file
-  set(swig_command ${SWIG_EXECUTABLE})
-  if(ITK_USE_CCACHE)
-    set(swig_command ${CCACHE_EXECUTABLE} ${swig_command})
-  endif()
-
-  if(NOT ITK_USE_SYSTEM_SWIG)
-    # The ExternalProject SWIG install.
-    set(_swig_depend swig)
-  endif()
-  add_custom_command(
-    OUTPUT ${cpp_file} ${python_file}
-    COMMAND ${swig_command} -c++ -python -O ${ITK_WRAP_PYTHON_AUTODOC} -Werror
-#       -fcompact
-    -w508 -w312 -w314 -w509 -w302 -w362
-    -w389 # operator[], to be suppressed later...
-    -w384 -w383 # operator++ ane operator--
-    -w361 # operator!
-    -w467 # overloaded functions (with typemaps)
-    -w350 -w394 -w395  # operator new/new[]/delete[] ignored
-    -w303 # to avoid warning about customization in pyBase.i
-    -o ${cpp_file}
-    -I${GENERATORS_SRC_DIR}
-    -I${WRAP_ITK_TYPEDEFS_DIRECTORY}/python
-    -I${WRAP_ITK_TYPEDEFS_DIRECTORY}
-    ${WRAP_ITK_SWIG_ARGS_PYTHON}
-    -outdir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-    ${interface_file}
-    WORKING_DIRECTORY ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python
-    DEPENDS ${DEPS} ${interface_file}
-    ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${base_name}_ext.i
-    ${WRAP_ITK_TYPEDEFS_DIRECTORY}/pyBase.i ${doc_file} ${_swig_depend}
-    # ${ITK_WRAP_PYTHON_LIBRARY_DEPS}
-  )
-  WRAP_ITK_BINDINGS_INSTALL("/Python" "${python_file}")
-
-# gcc visibility can't be used without getting errors when passing objects
-# from one module to an other
-#
-#    if(CMAKE_COMPILER_IS_GNUCC)
-#      set_target_properties(${lib} PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
-#    endif()
+  # Run swig to produce the .so and the .py file
+  itk_setup_swig_python("submodule" ${base_name} ${interface_file} ${python_file} ${cpp_file} "${doc_file}")
 
   # add the c++ files which will be generated by the swig command to the
   # list of python related c++ files, so they can be built at the end
@@ -675,8 +627,6 @@ macro(itk_wrap_simple_type_python wrap_class swig_name)
     set(ext_def "")
   endif()
   string(REGEX REPLACE ".*::" "" simple_name "${cpp_name}")
-#  message("${wrap_class} -- ${swig_name}")
-#  message("${cpp_name} -- ${template_params} -- ${ext_def}")
 
   # must be done first so the typemap are used in the %template commands
   if("${swig_name}" MATCHES "_Pointer$")
@@ -897,7 +847,6 @@ endmacro()
 
 if(NOT EXTERNAL_WRAP_ITK_PROJECT)
   add_subdirectory(Tests)
-  add_subdirectory(itkExtras)
 
   macro(itk_end_wrap_modules_python)
     add_subdirectory(${ITK_WRAP_PYTHON_SOURCE_DIR}/PyUtils)
diff --git a/Utilities/ITK/Wrapping/Generators/Python/InsightToolkit.py.in b/Utilities/ITK/Wrapping/Generators/Python/InsightToolkit.py.in
deleted file mode 100644
index ddcabd0..0000000
--- a/Utilities/ITK/Wrapping/Generators/Python/InsightToolkit.py.in
+++ /dev/null
@@ -1,6 +0,0 @@
-import sys, os
-sys.path.append(__file__+os.sep+"../lib")
-del sys, os
-
-from ITKPyBase import *
- at ITK_WRAP_PYTHON_OLD_STYLE_IMPORTS@
diff --git a/Utilities/ITK/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx b/Utilities/ITK/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx
index b9bd6bc..254d650 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx
+++ b/Utilities/ITK/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx
@@ -80,7 +80,7 @@ void PyCommand::PyExecute()
     if (!PyCallable_Check(this->m_Object))
     {
         // we throw a standard ITK exception: this makes it possible for
-        // our standard CableSwig exception handling logic to take this
+        // our standard Swig exception handling logic to take this
         // through to the invoking Python process
         itkExceptionMacro(<<"CommandCallable is not a callable Python object, "
                           <<"or it has not been set.");
diff --git a/Utilities/ITK/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx b/Utilities/ITK/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx
index 9dafa3e..b0e6387 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx
+++ b/Utilities/ITK/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx
@@ -77,7 +77,7 @@ PyImageFilter<TInputImage,TOutputImage>
     if (!PyCallable_Check(this->m_Object))
     {
         // we throw a standard ITK exception: this makes it possible for
-        // our standard CableSwig exception handling logic to take this
+        // our standard Swig exception handling logic to take this
         // through to the invoking Python process
         itkExceptionMacro(<<"CommandCallable is not a callable Python object, "
                           <<"or it has not been set.");
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/AntiAliasBinaryImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/AntiAliasBinaryImageFilter.py
index 0b7421b..1090c8c 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/AntiAliasBinaryImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/AntiAliasBinaryImageFilter.py
@@ -16,26 +16,29 @@
 #
 #==========================================================================*/
 
+from __future__ import print_function
+
 import itk
 from sys import argv, stderr, exit
 
 itk.auto_progress(2)
 
-if len(argv) < 3 :
-  print >> stderr, """Missing Parameters
-Usage: AntiAliasBinaryImageFilter inputImage outputImage [RMS] [numberOfIterations]"""
-  exit(1)
+if len(argv) < 3:
+    print((
+        "Missing Parameters \n Usage: AntiAliasBinaryImageFilter"
+        " inputImage outputImage [RMS] [numberOfIterations]"), file=stderr)
+    exit(1)
 
-inputFilename  = argv[1]
+inputFilename = argv[1]
 outputFilename = argv[2]
 maximumRMSError = 0.01
 numberOfIterations = 50
 
-if len(argv) > 3 :
-  maximumRMSError = float( argv[3] )
+if len(argv) > 3:
+    maximumRMSError = float(argv[3])
 
-if len(argv) > 4 :
-  numberOfIterations = int( argv[4] )
+if len(argv) > 4:
+    numberOfIterations = int(argv[4])
 
 
 CharPixelType = itk.UC
@@ -45,18 +48,16 @@ Dimension = 3
 CharImageType = itk.Image[CharPixelType, Dimension]
 RealImageType = itk.Image[RealPixelType, Dimension]
 
-ReaderType = itk.ImageFileReader[ CharImageType ]
-WriterType = itk.ImageFileWriter[ CharImageType ]
-
-
+ReaderType = itk.ImageFileReader[CharImageType]
+WriterType = itk.ImageFileWriter[CharImageType]
 
 
-CastToRealFilterType = itk.CastImageFilter[ CharImageType, RealImageType]
+CastToRealFilterType = itk.CastImageFilter[CharImageType, RealImageType]
 
-RescaleFilter = itk.RescaleIntensityImageFilter[RealImageType, CharImageType ]
+RescaleFilter = itk.RescaleIntensityImageFilter[RealImageType, CharImageType]
 
-
-AntiAliasFilterType = itk.AntiAliasBinaryImageFilter[RealImageType, RealImageType]
+antiAliasFilter = itk.AntiAliasBinaryImageFilter[RealImageType, RealImageType]
+antiAliasFilter = antiAliasFilter.New()
 
 reader = ReaderType.New()
 writer = WriterType.New()
@@ -64,23 +65,21 @@ writer = WriterType.New()
 toReal = CastToRealFilterType.New()
 rescale = RescaleFilter.New()
 
-antiAliasFilter = AntiAliasFilterType.New()
-
-reader.SetFileName( inputFilename  )
-writer.SetFileName( outputFilename )
+reader.SetFileName(inputFilename)
+writer.SetFileName(outputFilename)
 
-rescale.SetOutputMinimum(   0 )
-rescale.SetOutputMaximum( 255 )
+rescale.SetOutputMinimum(0)
+rescale.SetOutputMaximum(255)
 
-toReal.SetInput( reader.GetOutput() )
+toReal.SetInput(reader.GetOutput())
 
-antiAliasFilter.SetInput( toReal.GetOutput() )
+antiAliasFilter.SetInput(toReal.GetOutput())
 
-antiAliasFilter.SetMaximumRMSError( maximumRMSError )
-antiAliasFilter.SetNumberOfIterations( numberOfIterations )
-antiAliasFilter.SetNumberOfLayers( 2 )
+antiAliasFilter.SetMaximumRMSError(maximumRMSError)
+antiAliasFilter.SetNumberOfIterations(numberOfIterations)
+antiAliasFilter.SetNumberOfLayers(2)
 
-rescale.SetInput( antiAliasFilter.GetOutput() )
-writer.SetInput( rescale.GetOutput() )
+rescale.SetInput(antiAliasFilter.GetOutput())
+writer.SetInput(rescale.GetOutput())
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryDilateImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryDilateImageFilter.py
index 6a7f158..3b2c5fa 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryDilateImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryDilateImageFilter.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 #==========================================================================
 #
 #   Copyright Insight Software Consortium
@@ -17,21 +19,39 @@
 #==========================================================================*/
 
 #
-#  Example on the use of the BinaryDilateImageFilter
+#  Test BinaryDilateImageFilter
 #
 
+import sys
 import itk
-from sys import argv
 itk.auto_progress(2)
 
-dim = 2
-IType = itk.Image[itk.UC, dim]
+inputImage = sys.argv[1]
+outputImage = sys.argv[2]
+radiusValue = int(sys.argv[3])
+
+PixelType = itk.UC
+Dimension = 2
+
+ImageType = itk.Image[PixelType, Dimension]
+
+ReaderType = itk.ImageFileReader[ImageType]
+reader = ReaderType.New()
+reader.SetFileName(inputImage)
+
+StructuringElementType = itk.FlatStructuringElement[Dimension]
+structuringElement = StructuringElementType.Ball(radiusValue)
+
+DilateFilterType = itk.BinaryDilateImageFilter[
+    ImageType, ImageType, StructuringElementType]
+dilateFilter = DilateFilterType.New()
+dilateFilter.SetInput(reader.GetOutput())
+dilateFilter.SetKernel(structuringElement)
+dilateFilter.SetDilateValue(200)
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-kernel = itk.strel(dim, 5)
-filter  = itk.BinaryDilateImageFilter[IType, IType, kernel].New( reader,
-                DilateValue=200,
-                Kernel=kernel )
-writer = itk.ImageFileWriter[IType].New( filter, FileName=argv[2] )
+WriterType = itk.ImageFileWriter[ImageType]
+writer = WriterType.New()
+writer.SetFileName(outputImage)
+writer.SetInput(dilateFilter.GetOutput())
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryErodeImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryErodeImageFilter.py
index 49fdc02..17a36e8 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryErodeImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryErodeImageFilter.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 #==========================================================================
 #
 #   Copyright Insight Software Consortium
@@ -17,21 +19,39 @@
 #==========================================================================*/
 
 #
-#  Example on the use of the BinaryErodeImageFilter
+#  Test BinaryDilateImageFilter
 #
 
+import sys
 import itk
-from sys import argv
 itk.auto_progress(2)
 
-dim = 2
-IType = itk.Image[itk.UC, dim]
+inputImage = sys.argv[1]
+outputImage = sys.argv[2]
+radiusValue = int(sys.argv[3])
+
+PixelType = itk.UC
+Dimension = 2
+
+ImageType = itk.Image[PixelType, Dimension]
+
+ReaderType = itk.ImageFileReader[ImageType]
+reader = ReaderType.New()
+reader.SetFileName(inputImage)
+
+StructuringElementType = itk.FlatStructuringElement[Dimension]
+structuringElement = StructuringElementType.Ball(radiusValue)
+
+ErodeFilterType = itk.BinaryErodeImageFilter[
+    ImageType, ImageType, StructuringElementType]
+erodeFilter = ErodeFilterType.New()
+erodeFilter.SetInput(reader.GetOutput())
+erodeFilter.SetKernel(structuringElement)
+erodeFilter.SetErodeValue(200)
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-kernel = itk.strel(dim, 5)
-filter  = itk.BinaryErodeImageFilter[IType, IType, kernel].New( reader,
-                ErodeValue=200,
-                Kernel=kernel )
-writer = itk.ImageFileWriter[IType].New( filter, FileName=argv[2] )
+WriterType = itk.ImageFileWriter[ImageType]
+writer = WriterType.New()
+writer.SetFileName(outputImage)
+writer.SetInput(erodeFilter.GetOutput())
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryThresholdImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryThresholdImageFilter.py
index 22adc12..ef7f5fa 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryThresholdImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/BinaryThresholdImageFilter.py
@@ -17,22 +17,42 @@
 #==========================================================================*/
 
 #
-#  Example on the use of the BinaryThresholdImageFilter
+#  Test BinaryThresholdImageFilter
 #
 
+import sys
 import itk
-from sys import argv
 itk.auto_progress(2)
 
-dim = 2
-IType = itk.Image[itk.UC, dim]
+inputImage = sys.argv[1]
+outputImage = sys.argv[2]
+lowerThreshold = int(sys.argv[3])
+upperThreshold = int(sys.argv[4])
+outsideValue = int(sys.argv[5])
+insideValue = int(sys.argv[6])
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-filter  = itk.BinaryThresholdImageFilter[IType, IType].New( reader,
-                LowerThreshold=eval( argv[3] ),
-                UpperThreshold=eval( argv[4] ),
-                OutsideValue=eval( argv[5] ),
-                InsideValue=eval( argv[6] ))
-writer = itk.ImageFileWriter[IType].New( filter, FileName=argv[2] )
+PixelType = itk.UC
+Dimension = 2
+
+ImageType = itk.Image[PixelType, Dimension]
+
+ReaderType = itk.ImageFileReader[ImageType]
+reader = ReaderType.New()
+reader.SetFileName(inputImage)
+
+FilterType = itk.BinaryThresholdImageFilter[ImageType, ImageType]
+thresholdFilter = FilterType.New()
+
+thresholdFilter.SetInput(reader.GetOutput())
+
+thresholdFilter.SetLowerThreshold(lowerThreshold)
+thresholdFilter.SetUpperThreshold(upperThreshold)
+thresholdFilter.SetOutsideValue(outsideValue)
+thresholdFilter.SetInsideValue(insideValue)
+
+WriterType = itk.ImageFileWriter[ImageType]
+writer = WriterType.New()
+writer.SetFileName(outputImage)
+writer.SetInput(thresholdFilter.GetOutput())
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/BoxGrayscaleDilateImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/BoxGrayscaleDilateImageFilter.py
index 58ed5f7..c96a560 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/BoxGrayscaleDilateImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/BoxGrayscaleDilateImageFilter.py
@@ -28,10 +28,10 @@ itk.auto_progress(2)
 dim = 2
 IType = itk.Image[itk.UC, dim]
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
+reader = itk.ImageFileReader[IType].New(FileName=argv[1])
 kernel = itk.FlatStructuringElement[dim].Box(5)
-filter  = itk.GrayscaleDilateImageFilter[IType, IType, kernel].New( reader,
-                Kernel=kernel )
-writer = itk.ImageFileWriter[IType].New( filter, FileName=argv[2] )
+grayscaleFilter = itk.GrayscaleDilateImageFilter[IType, IType, kernel]
+grayscaleFilter = grayscaleFilter.New(reader, Kernel=kernel)
+writer = itk.ImageFileWriter[IType].New(grayscaleFilter, FileName=argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/CMakeLists.txt b/Utilities/ITK/Wrapping/Generators/Python/Tests/CMakeLists.txt
index 2dbf091..0512207 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/CMakeLists.txt
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/CMakeLists.txt
@@ -77,12 +77,14 @@ if(ITK_WRAP_unsigned_char AND WRAP_2)
   add_python_test(PythonModuleToModule
     ${CMAKE_CURRENT_SOURCE_DIR}/module2module.py
     DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png}
+    5
   )
 
   add_python_test(PythonBinaryDilateImageFilter
     ${CMAKE_CURRENT_SOURCE_DIR}/BinaryDilateImageFilter.py
     DATA{${WrapITK_SOURCE_DIR}/images/2th_cthead1.png}
     BinaryDilateImageFilter.png
+    5
     --compare BinaryDilateImageFilter.png DATA{${WrapITK_SOURCE_DIR}/images/BinaryDilateImageFilter.png}
   )
 
@@ -90,6 +92,7 @@ if(ITK_WRAP_unsigned_char AND WRAP_2)
     ${CMAKE_CURRENT_SOURCE_DIR}/BinaryErodeImageFilter.py
     DATA{${WrapITK_SOURCE_DIR}/images/2th_cthead1.png}
     BinaryErodeImageFilter.png
+    5
     --compare BinaryErodeImageFilter.png DATA{${WrapITK_SOURCE_DIR}/images/BinaryErodeImageFilter.png}
   )
 
@@ -113,6 +116,7 @@ if(ITK_WRAP_unsigned_char AND WRAP_2)
     ${CMAKE_CURRENT_SOURCE_DIR}/GrayscaleDilateImageFilter.py
     DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png}
     GrayscaleDilateImageFilter.png
+    5
     --compare GrayscaleDilateImageFilter.png DATA{${WrapITK_SOURCE_DIR}/images/GrayscaleDilateImageFilter.png}
   )
 
@@ -135,6 +139,7 @@ if(ITK_WRAP_unsigned_char AND WRAP_2)
     ${CMAKE_CURRENT_SOURCE_DIR}/GrayscaleErodeImageFilter.py
     DATA{${WrapITK_SOURCE_DIR}/images/cthead1.png}
     GrayscaleErodeImageFilter.png
+    5
     --compare GrayscaleErodeImageFilter.png DATA{${WrapITK_SOURCE_DIR}/images/GrayscaleErodeImageFilter.png}
   )
 
@@ -417,6 +422,11 @@ if(ITK_WRAP_float AND WRAP_2)
           SpatialObject.png
   )
 
+  add_python_test(PythonReadDicomAndReadTag
+    ${CMAKE_CURRENT_SOURCE_DIR}/ReadDicomAndReadTag.py
+    DATA{${ITK_DATA_ROOT}/Input/DicomSeries/,REGEX:Image[0-9]+.dcm}
+  )
+
 endif()
 
 
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/CannyEdgeDetectionImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/CannyEdgeDetectionImageFilter.py
index 36d2f7b..1913e67 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/CannyEdgeDetectionImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/CannyEdgeDetectionImageFilter.py
@@ -20,20 +20,29 @@
 #  Example on the use of the CannyEdgeDetectionImageFilter
 #
 
+from __future__ import print_function
+
 import itk
 from sys import argv, stderr, exit
 itk.auto_progress(2)
 
 if len(argv) < 3:
-  print >> stderr, "Usage: CannyEdgeDetectionImageFilter.py  inputImage outputImage [variance]"
-  exit(1)
+    print((
+        "Usage: CannyEdgeDetectionImageFilter.py inputImage outputImage "
+        "[variance]"), file=stderr)
+    exit(1)
 
 variance = 2.0
 if len(argv) > 3:
-  variance = float( argv[3] )
-  print variance
+    variance = float(argv[3])
+    print(variance)
 
-reader = itk.ImageFileReader.IF2.New( FileName=argv[1] )
-filter  = itk.CannyEdgeDetectionImageFilter.IF2IF2.New( reader, Variance=variance )
-outputCast = itk.RescaleIntensityImageFilter.IF2IUC2.New( filter, OutputMinimum=0, OutputMaximum=255 )
-itk.write( outputCast, argv[2] )
+reader = itk.ImageFileReader.IF2.New(FileName=argv[1])
+filter = itk.CannyEdgeDetectionImageFilter.IF2IF2.New(
+    reader,
+    Variance=variance)
+outputCast = itk.RescaleIntensityImageFilter.IF2IUC2.New(
+    filter,
+    OutputMinimum=0,
+    OutputMaximum=255)
+itk.write(outputCast, argv[2])
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/CastImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/CastImageFilter.py
index 0a2d146..6a12b73 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/CastImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/CastImageFilter.py
@@ -28,8 +28,8 @@ dim = 2
 IType = itk.Image[itk.F, dim]
 OIType = itk.Image[itk.UC, dim]
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-filter  = itk.CastImageFilter[IType, OIType].New( reader )
-writer = itk.ImageFileWriter[OIType].New( filter, FileName=argv[2] )
+reader = itk.ImageFileReader[IType].New(FileName=argv[1])
+filter = itk.CastImageFilter[IType, OIType].New(reader)
+writer = itk.ImageFileWriter[OIType].New(filter, FileName=argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/CurvatureAnisotropicDiffusionImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/CurvatureAnisotropicDiffusionImageFilter.py
index 8a88ae6..11b7097 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/CurvatureAnisotropicDiffusionImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/CurvatureAnisotropicDiffusionImageFilter.py
@@ -29,14 +29,17 @@ dim = 2
 IType = itk.Image[itk.F, dim]
 OIType = itk.Image[itk.UC, dim]
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-filter  = itk.CurvatureAnisotropicDiffusionImageFilter[IType, IType].New( reader,
-                NumberOfIterations=eval( argv[3] ),
-                TimeStep=eval( argv[4] ),
-                ConductanceParameter=eval( argv[5] ) )
+reader = itk.ImageFileReader[IType].New(FileName=argv[1])
+filter = itk.CurvatureAnisotropicDiffusionImageFilter[IType, IType].New(
+    reader,
+    NumberOfIterations=eval(
+        argv[
+            3]),
+    TimeStep=eval(argv[4]),
+    ConductanceParameter=eval(argv[5]))
 cast = itk.RescaleIntensityImageFilter[IType, OIType].New(filter,
-                OutputMinimum=0,
-                OutputMaximum=255)
-writer = itk.ImageFileWriter[OIType].New( cast, FileName=argv[2] )
+                                                          OutputMinimum=0,
+                                                          OutputMaximum=255)
+writer = itk.ImageFileWriter[OIType].New(cast, FileName=argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/CurvatureFlowImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/CurvatureFlowImageFilter.py
index beafb7d..52f03f1 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/CurvatureFlowImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/CurvatureFlowImageFilter.py
@@ -21,7 +21,6 @@
 #
 
 
-
 import itk
 from sys import argv
 itk.auto_progress(2)
@@ -30,13 +29,11 @@ dim = 2
 IType = itk.Image[itk.F, dim]
 OIType = itk.Image[itk.UC, dim]
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-filter  = itk.CurvatureFlowImageFilter[IType, IType].New( reader,
-                NumberOfIterations=eval( argv[3] ),
-                TimeStep=eval( argv[4] ) )
-cast = itk.RescaleIntensityImageFilter[IType, OIType].New(filter,
-                OutputMinimum=0,
-                OutputMaximum=255)
-writer = itk.ImageFileWriter[OIType].New( cast, FileName=argv[2] )
+reader = itk.ImageFileReader[IType].New(FileName=argv[1])
+filt = itk.CurvatureFlowImageFilter[IType, IType].New(
+    reader, NumberOfIterations=eval(argv[3]), TimeStep=eval(argv[4]))
+cast = itk.RescaleIntensityImageFilter[IType, OIType].New(
+    filt, OutputMinimum=0, OutputMaximum=255)
+writer = itk.ImageFileWriter[OIType].New(cast, FileName=argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/FFTImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/FFTImageFilter.py
index a3abe64..8611802 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/FFTImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/FFTImageFilter.py
@@ -27,26 +27,37 @@ itk.auto_progress(2)
 dim = 2
 PixelType = itk.F
 ImageType = itk.Image[PixelType, dim]
-ComplexImageType  = itk.Image[itk.complex[PixelType], dim]
+ComplexImageType = itk.Image[itk.complex[PixelType], dim]
 
-reader = itk.ImageFileReader[ImageType].New( FileName=argv[1] )
+reader = itk.ImageFileReader[ImageType].New(FileName=argv[1])
 fftFilter = itk.ForwardFFTImageFilter[ImageType, ComplexImageType].New(reader)
 
 # why this Update() ?
 fftFilter.Update()
 
-complexWriter = itk.ImageFileWriter[ComplexImageType].New( fftFilter, FileName="complexImage.mhd" )
+complexWriter = itk.ImageFileWriter[ComplexImageType].New(
+    fftFilter,
+    FileName="complexImage.mhd")
 complexWriter.Update()
 
-realFilter = itk.ComplexToRealImageFilter[ComplexImageType, ImageType].New( fftFilter )
+realFilter = itk.ComplexToRealImageFilter[
+    ComplexImageType, ImageType].New(fftFilter)
 
 WritePixelType = itk.UC
 WriteImageType = itk.Image[WritePixelType, dim]
-intensityRescaler = itk.RescaleIntensityImageFilter[ImageType, WriteImageType].New( realFilter, OutputMinimum=0, OutputMaximum=255 )
-writer = itk.ImageFileWriter[WriteImageType].New( intensityRescaler, FileName=argv[2] )
+intensityRescaler = itk.RescaleIntensityImageFilter[
+    ImageType,
+    WriteImageType].New(
+    realFilter,
+    OutputMinimum=0,
+    OutputMaximum=255)
+writer = itk.ImageFileWriter[WriteImageType].New(
+    intensityRescaler,
+    FileName=argv[2])
 writer.Update()
 
-imaginaryFilter = itk.ComplexToImaginaryImageFilter[ComplexImageType, ImageType].New( fftFilter )
-intensityRescaler.SetInput( imaginaryFilter.GetOutput() )
-writer.SetFileName( argv[3] )
+imaginaryFilter = itk.ComplexToImaginaryImageFilter[
+    ComplexImageType, ImageType].New(fftFilter)
+intensityRescaler.SetInput(imaginaryFilter.GetOutput())
+writer.SetFileName(argv[3])
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/FastMarchingImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/FastMarchingImageFilter.py
index f131b01..59aeea6 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/FastMarchingImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/FastMarchingImageFilter.py
@@ -35,111 +35,116 @@
 #     OUTPUTS: {FastMarchingFilterOutput3.png}
 #     ARGUMENTS:    40 90 0.5  -0.3  2.0   200 100
 
+from __future__ import print_function
+
 import itk
 from sys import argv, stderr, exit
 
 
-if( len(argv) < 10 ):
-  print >> stderr, """Missing Parameters
-Usage: FastMarchingImageFilter.py inputImage  outputImage seedX seedY Sigma SigmoidAlpha SigmoidBeta TimeThreshold StoppingValue"""
-  exit(1)
+if(len(argv) < 10):
+    print((
+        "Missing Parameters \n Usage: FastMarchingImageFilter.py inputImage "
+        "outputImage seedX seedY Sigma SigmoidAlpha SigmoidBeta TimeThreshold "
+        "StoppingValue"), file=stderr)
+    exit(1)
 
 itk.auto_progress(2)
 
 
 InternalPixelType = itk.F
 Dimension = 2
-InternalImageType = itk.Image[ InternalPixelType, Dimension ]
+InternalImageType = itk.Image[InternalPixelType, Dimension]
 
 OutputPixelType = itk.UC
-OutputImageType = itk.Image[ OutputPixelType, Dimension ]
+OutputImageType = itk.Image[OutputPixelType, Dimension]
 
-thresholder = itk.BinaryThresholdImageFilter[ InternalImageType, OutputImageType ].New();
+thresholder = itk.BinaryThresholdImageFilter[
+    InternalImageType, OutputImageType].New()
 
-timeThreshold = float( argv[8] )
-thresholder.SetLowerThreshold(           0.0  )
-thresholder.SetUpperThreshold( timeThreshold  )
+timeThreshold = float(argv[8])
+thresholder.SetLowerThreshold(0.0)
+thresholder.SetUpperThreshold(timeThreshold)
 
-thresholder.SetOutsideValue(  0  )
-thresholder.SetInsideValue(  255 )
+thresholder.SetOutsideValue(0)
+thresholder.SetInsideValue(255)
 
-ReaderType = itk.ImageFileReader[ InternalImageType ]
-WriterType = itk.ImageFileWriter[ OutputImageType ]
+ReaderType = itk.ImageFileReader[InternalImageType]
+WriterType = itk.ImageFileWriter[OutputImageType]
 
 reader = ReaderType.New()
 writer = WriterType.New()
 
-reader.SetFileName( argv[1] )
-writer.SetFileName( argv[2] )
+reader.SetFileName(argv[1])
+writer.SetFileName(argv[2])
 
 
 CastFilterType = itk.RescaleIntensityImageFilter[
-                            InternalImageType,
-                            OutputImageType ]
+    InternalImageType,
+    OutputImageType]
 
 SmoothingFilterType = itk.CurvatureAnisotropicDiffusionImageFilter[
-                            InternalImageType,
-                            InternalImageType ]
+    InternalImageType,
+    InternalImageType]
 
 smoothing = SmoothingFilterType.New()
 
 GradientFilterType = itk.GradientMagnitudeRecursiveGaussianImageFilter[
-                            InternalImageType,
-                            InternalImageType ]
+    InternalImageType,
+    InternalImageType]
 
 SigmoidFilterType = itk.SigmoidImageFilter[
-                            InternalImageType,
-                            InternalImageType ]
+    InternalImageType,
+    InternalImageType]
 
-gradientMagnitude = GradientFilterType.New();
+gradientMagnitude = GradientFilterType.New()
 sigmoid = SigmoidFilterType.New()
 
-sigmoid.SetOutputMinimum(  0.0  )
-sigmoid.SetOutputMaximum(  1.0  )
+sigmoid.SetOutputMinimum(0.0)
+sigmoid.SetOutputMaximum(1.0)
 
-FastMarchingFilterType = itk.FastMarchingImageFilter[ InternalImageType,
-                            InternalImageType ]
+FastMarchingFilterType = itk.FastMarchingImageFilter[InternalImageType,
+                                                     InternalImageType]
 
 fastMarching = FastMarchingFilterType.New()
 
-smoothing.SetInput( reader.GetOutput() )
-gradientMagnitude.SetInput( smoothing.GetOutput() )
-sigmoid.SetInput( gradientMagnitude.GetOutput() )
-fastMarching.SetInput( sigmoid.GetOutput() )
-thresholder.SetInput( fastMarching.GetOutput() )
-writer.SetInput( thresholder.GetOutput() )
+smoothing.SetInput(reader.GetOutput())
+gradientMagnitude.SetInput(smoothing.GetOutput())
+sigmoid.SetInput(gradientMagnitude.GetOutput())
+fastMarching.SetInput(sigmoid.GetOutput())
+thresholder.SetInput(fastMarching.GetOutput())
+writer.SetInput(thresholder.GetOutput())
 
-smoothing.SetTimeStep( 0.125 )
-smoothing.SetNumberOfIterations(  5 )
-smoothing.SetConductanceParameter( 9.0 )
+smoothing.SetTimeStep(0.125)
+smoothing.SetNumberOfIterations(5)
+smoothing.SetConductanceParameter(9.0)
 
-sigma = float( argv[5] )
+sigma = float(argv[5])
 
-gradientMagnitude.SetSigma(  sigma  )
+gradientMagnitude.SetSigma(sigma)
 
-alpha =  float( argv[6] )
-beta  =  float( argv[7] )
+alpha = float(argv[6])
+beta = float(argv[7])
 
-sigmoid.SetAlpha( alpha )
-sigmoid.SetBeta(  beta  )
+sigmoid.SetAlpha(alpha)
+sigmoid.SetBeta(beta)
 
 NodeType = itk.LevelSetNode[InternalPixelType, Dimension]
 NodeContainer = itk.VectorContainer[itk.UI, NodeType]
 seeds = NodeContainer.New()
 
-seedPosition = [int( argv[3] ), int( argv[4] )]
+seedPosition = [int(argv[3]), int(argv[4])]
 
 
 node = NodeType()
 seedValue = 0.0
 
-node.SetValue( seedValue )
-node.SetIndex( seedPosition )
+node.SetValue(seedValue)
+node.SetIndex(seedPosition)
 
-seeds.Initialize();
-seeds.InsertElement( 0, node )
+seeds.Initialize()
+seeds.InsertElement(0, node)
 
-fastMarching.SetTrialPoints(  seeds  );
+fastMarching.SetTrialPoints(seeds)
 
 caster1 = CastFilterType.New()
 caster2 = CastFilterType.New()
@@ -151,40 +156,40 @@ writer2 = WriterType.New()
 writer3 = WriterType.New()
 writer4 = WriterType.New()
 
-caster1.SetInput( smoothing.GetOutput() )
-writer1.SetInput( caster1.GetOutput() )
+caster1.SetInput(smoothing.GetOutput())
+writer1.SetInput(caster1.GetOutput())
 writer1.SetFileName("FastMarchingFilterOutput1.png")
-caster1.SetOutputMinimum(   0 )
-caster1.SetOutputMaximum( 255 )
+caster1.SetOutputMinimum(0)
+caster1.SetOutputMaximum(255)
 writer1.Update()
 
-caster2.SetInput( gradientMagnitude.GetOutput() )
-writer2.SetInput( caster2.GetOutput() )
+caster2.SetInput(gradientMagnitude.GetOutput())
+writer2.SetInput(caster2.GetOutput())
 writer2.SetFileName("FastMarchingFilterOutput2.png")
-caster2.SetOutputMinimum(   0 )
-caster2.SetOutputMaximum( 255 )
+caster2.SetOutputMinimum(0)
+caster2.SetOutputMaximum(255)
 writer2.Update()
 
-caster3.SetInput( sigmoid.GetOutput() )
-writer3.SetInput( caster3.GetOutput() )
+caster3.SetInput(sigmoid.GetOutput())
+writer3.SetInput(caster3.GetOutput())
 writer3.SetFileName("FastMarchingFilterOutput3.png")
-caster3.SetOutputMinimum(   0 )
-caster3.SetOutputMaximum( 255 )
+caster3.SetOutputMinimum(0)
+caster3.SetOutputMaximum(255)
 writer3.Update()
 
-caster4.SetInput( fastMarching.GetOutput() )
-writer4.SetInput( caster4.GetOutput() )
+caster4.SetInput(fastMarching.GetOutput())
+writer4.SetInput(caster4.GetOutput())
 writer4.SetFileName("FastMarchingFilterOutput4.png")
-caster4.SetOutputMinimum(   0 )
-caster4.SetOutputMaximum( 255 )
+caster4.SetOutputMinimum(0)
+caster4.SetOutputMaximum(255)
 
 
 fastMarching.SetOutputSize(
-        reader.GetOutput().GetBufferedRegion().GetSize() )
+    reader.GetOutput().GetBufferedRegion().GetSize())
 
-stoppingTime = float( argv[9] )
+stoppingTime = float(argv[9])
 
-fastMarching.SetStoppingValue(  stoppingTime  )
+fastMarching.SetStoppingValue(stoppingTime)
 
 writer.Update()
 
@@ -192,19 +197,19 @@ writer.Update()
 writer4.Update()
 
 
-InternalWriterType = itk.ImageFileWriter[ InternalImageType ]
+InternalWriterType = itk.ImageFileWriter[InternalImageType]
 
 mapWriter = InternalWriterType.New()
-mapWriter.SetInput( fastMarching.GetOutput() )
+mapWriter.SetInput(fastMarching.GetOutput())
 mapWriter.SetFileName("FastMarchingFilterOutput4.mha")
 mapWriter.Update()
 
 speedWriter = InternalWriterType.New()
-speedWriter.SetInput( sigmoid.GetOutput() )
+speedWriter.SetInput(sigmoid.GetOutput())
 speedWriter.SetFileName("FastMarchingFilterOutput3.mha")
 speedWriter.Update()
 
 gradientWriter = InternalWriterType.New()
-gradientWriter.SetInput( gradientMagnitude.GetOutput() )
+gradientWriter.SetInput(gradientMagnitude.GetOutput())
 gradientWriter.SetFileName("FastMarchingFilterOutput2.mha")
 gradientWriter.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/FlatStructuringElement.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/FlatStructuringElement.py
index 7369f03..26b6c46 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/FlatStructuringElement.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/FlatStructuringElement.py
@@ -16,35 +16,37 @@
 #
 #==========================================================================*/
 
+from __future__ import print_function
+
 import itk
 from sys import argv, exit
 itk.auto_progress(2)
 
 if argv[2] == "Ball":
-  print "Ball"
-  strel = itk.FlatStructuringElement[2].Ball( int( argv[3] ) )
+    print("Ball")
+    strel = itk.FlatStructuringElement[2].Ball(int(argv[3]))
 elif argv[2] == "Box":
-  print "Box"
-  strel = itk.FlatStructuringElement[2].Box( int( argv[3] ) )
+    print("Box")
+    strel = itk.FlatStructuringElement[2].Box(int(argv[3]))
 elif argv[2] == "FromImage":
-  print "FromImage"
-  reader = itk.ImageFileReader.IUC2.New( FileName=argv[3] )
-  strel = itk.FlatStructuringElement[2].FromImageUC( reader.GetOutput() )
+    print("FromImage")
+    reader = itk.ImageFileReader.IUC2.New(FileName=argv[3])
+    strel = itk.FlatStructuringElement[2].FromImageUC(reader.GetOutput())
 else:
-  print "invalid arguement: " + argv[2]
-  exit(1)
+    print("invalid arguement: " + argv[2])
+    exit(1)
 
 img = strel.GetImageUC()
-size = itk.size( img )
+size = itk.size(img)
 for y in range(0, size.GetElement(1)):
-  for x in range(0, size.GetElement(0)):
-   if img.GetPixel( [x, y] ):
-     print "X",
-   else:
-     print " ",
-  print "\n",
+    for x in range(0, size.GetElement(0)):
+        if img.GetPixel([x, y]):
+            print("X")
+        else:
+            print(" ")
+    print("\n")
 
-itk.write( img, argv[1] )
+itk.write(img, argv[1])
 
 # writer = itk.ImageFileWriter.IUC2.New(FileName=argv[1], Input=img )
 # itk.echo(writer)
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/GeodesicActiveContourImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/GeodesicActiveContourImageFilter.py
index e34bbac..f310a6e 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/GeodesicActiveContourImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/GeodesicActiveContourImageFilter.py
@@ -18,7 +18,8 @@
 
 # GeodesicActiveContourImageFilter.py
 # Translated by Charl P. Botha <http://cpbotha.net/> from the cxx original.
-# $Id: GeodesicActiveContourImageFilter.py,v 1.1 2006/09/06 20:58:42 glehmann Exp $
+# $Id: GeodesicActiveContourImageFilter.py,v 1.1 2006/09/06 20:58:42 glehmann
+# Exp $
 
 # example runs:
 # ------------
@@ -35,10 +36,13 @@
 # See the ITK Software Guide, section 9.3.3 "Geodesic Active Contours
 # Segmentation" as well as the CXX example for more comments.
 
+from __future__ import print_function
+
 import itk
 from sys import argv, stderr
 itk.auto_progress(2)
 
+
 def main():
     if len(argv) < 10:
         errMsg = "Missing parameters\n" \
@@ -48,7 +52,7 @@ def main():
                  " Sigma SigmoidAlpha SigmoidBeta\n" \
                  " PropagationScaling\n"
 
-        print >> stderr, errMsg
+        print(errMsg, file=stderr)
         return
 
     # We're going to build the following pipelines:
@@ -72,19 +76,26 @@ def main():
     # needed to give the size to the fastmarching filter
     reader.Update()
 
-    smoothing = itk.CurvatureAnisotropicDiffusionImageFilter[InternalImageType, InternalImageType].New(reader,
-                        TimeStep=0.125,
-                        NumberOfIterations=5,
-                        ConductanceParameter=9.0)
-
-    gradientMagnitude = itk.GradientMagnitudeRecursiveGaussianImageFilter[InternalImageType, InternalImageType].New(smoothing,
-                        Sigma=float(argv[6]))
-
-    sigmoid = itk.SigmoidImageFilter[InternalImageType, InternalImageType].New(gradientMagnitude,
-                        OutputMinimum=0.0,
-                        OutputMaximum=1.1,
-                        Alpha=float(argv[7]),
-                        Beta=float(argv[8]))
+    smoothing = itk.CurvatureAnisotropicDiffusionImageFilter[
+        InternalImageType,
+        InternalImageType].New(
+        reader,
+        TimeStep=0.125,
+        NumberOfIterations=5,
+        ConductanceParameter=9.0)
+
+    gradientMagnitude = itk.GradientMagnitudeRecursiveGaussianImageFilter[
+        InternalImageType,
+        InternalImageType].New(
+        smoothing,
+        Sigma=float(argv[6]))
+
+    sigmoid = itk.SigmoidImageFilter[InternalImageType, InternalImageType].New(
+        gradientMagnitude,
+        OutputMinimum=0.0,
+        OutputMaximum=1.1,
+        Alpha=float(argv[7]),
+        Beta=float(argv[8]))
 
     seedPosition = itk.Index[2]()
     seedPosition.SetElement(0, int(argv[3]))
@@ -94,67 +105,83 @@ def main():
     node.SetValue(-float(argv[5]))
     node.SetIndex(seedPosition)
 
-    seeds = itk.VectorContainer[itk.UI, itk.LevelSetNode[InternalPixelType, Dimension]].New()
+    seeds = itk.VectorContainer[
+        itk.UI, itk.LevelSetNode[InternalPixelType, Dimension]].New()
     seeds.Initialize()
     seeds.InsertElement(0, node)
 
-    fastMarching = itk.FastMarchingImageFilter[InternalImageType, InternalImageType].New(sigmoid,
-                        TrialPoints=seeds,
-                        SpeedConstant=1.0,
-                        OutputSize=reader.GetOutput().GetBufferedRegion().GetSize() )
-
-
-    geodesicActiveContour = itk.GeodesicActiveContourLevelSetImageFilter[InternalImageType, InternalImageType, InternalPixelType].New(fastMarching,
-                        FeatureImage=sigmoid.GetOutput(), # it is required to use the explicitly the FeatureImage - itk segfault without that :-(
-                        PropagationScaling=float(argv[9]),
-                        CurvatureScaling=1.0,
-                        AdvectionScaling=1.0,
-                        MaximumRMSError=0.02,
-                        NumberOfIterations=800
-                        )
-
-    thresholder = itk.BinaryThresholdImageFilter[InternalImageType, OutputImageType].New(geodesicActiveContour,
-                        LowerThreshold=-1000,
-                        UpperThreshold=0,
-                        OutsideValue=0,
-                        InsideValue=255)
-
-    writer = itk.ImageFileWriter[OutputImageType].New(thresholder, FileName=argv[2])
-
-
-
+    fastMarching = itk.FastMarchingImageFilter[
+        InternalImageType,
+        InternalImageType].New(
+        sigmoid,
+        TrialPoints=seeds,
+        SpeedConstant=1.0,
+        OutputSize=reader.GetOutput().GetBufferedRegion().GetSize())
+
+    geodesicActiveContour = itk.GeodesicActiveContourLevelSetImageFilter[
+        InternalImageType,
+        InternalImageType,
+        InternalPixelType].New(
+        fastMarching,
+        # it is required to use the explicitly the FeatureImage
+        # - itk segfault without that :-(
+        FeatureImage=sigmoid.GetOutput(),
+        PropagationScaling=float(argv[9]),
+        CurvatureScaling=1.0,
+        AdvectionScaling=1.0,
+        MaximumRMSError=0.02,
+        NumberOfIterations=800)
+
+    thresholder = itk.BinaryThresholdImageFilter[
+        InternalImageType,
+        OutputImageType].New(
+        geodesicActiveContour,
+        LowerThreshold=-1000,
+        UpperThreshold=0,
+        OutsideValue=0,
+        InsideValue=255)
+
+    writer = itk.ImageFileWriter[OutputImageType].New(
+        thresholder,
+        FileName=argv[2])
 
     def rescaleAndWrite(filter, fileName):
-        caster = itk.RescaleIntensityImageFilter[InternalImageType, OutputImageType].New(filter,
-                       OutputMinimum=0,
-                       OutputMaximum=255)
+        caster = itk.RescaleIntensityImageFilter[
+            InternalImageType,
+            OutputImageType].New(
+            filter,
+            OutputMinimum=0,
+            OutputMaximum=255)
         itk.write(caster, fileName)
 
-
     rescaleAndWrite(smoothing, "GeodesicActiveContourImageFilterOutput1.png")
-    rescaleAndWrite(gradientMagnitude, "GeodesicActiveContourImageFilterOutput2.png")
+    rescaleAndWrite(
+        gradientMagnitude,
+        "GeodesicActiveContourImageFilterOutput2.png")
     rescaleAndWrite(sigmoid, "GeodesicActiveContourImageFilterOutput3.png")
-    rescaleAndWrite(fastMarching, "GeodesicActiveContourImageFilterOutput4.png")
+    rescaleAndWrite(
+        fastMarching,
+        "GeodesicActiveContourImageFilterOutput4.png")
 
     writer.Update()
 
-
-    print
-    print "Max. no. iterations: %d" % (geodesicActiveContour.GetNumberOfIterations())
-    print "Max. RMS error: %.3f" % (geodesicActiveContour.GetMaximumRMSError())
-    print
-    print "No. elapsed iterations: %d" % (geodesicActiveContour.GetElapsedIterations())
-    print "RMS change: %.3f" % (geodesicActiveContour.GetRMSChange())
-
+    print("")
+    print(
+        "Max. no. iterations: %d" %
+        (geodesicActiveContour.GetNumberOfIterations()))
+    print(
+        "Max. RMS error: %.3f" %
+        (geodesicActiveContour.GetMaximumRMSError()))
+    print("")
+    print(
+        "No. elapsed iterations: %d"
+        % (geodesicActiveContour.GetElapsedIterations()))
+    print("RMS change: %.3f" % (geodesicActiveContour.GetRMSChange()))
 
     itk.write(fastMarching, "GeodesicActiveContourImageFilterOutput4.mha")
     itk.write(sigmoid, "GeodesicActiveContourImageFilterOutput3.mha")
     itk.write(gradientMagnitude, "GeodesicActiveContourImageFilterOutput2.mha")
 
 
-
-
-
-
 if __name__ == "__main__":
     main()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/GradientAnisotropicDiffusionImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/GradientAnisotropicDiffusionImageFilter.py
index 75e6d1f..29abfce 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/GradientAnisotropicDiffusionImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/GradientAnisotropicDiffusionImageFilter.py
@@ -26,17 +26,24 @@ OutputPixelType = itk.F
 InputImageType = itk.Image[InputPixelType, 2]
 OutputImageType = itk.Image[OutputPixelType, 2]
 
-reader = itk.ImageFileReader[InputImageType].New( FileName=argv[1] )
+reader = itk.ImageFileReader[InputImageType].New(FileName=argv[1])
 
-filter = itk.GradientAnisotropicDiffusionImageFilter[InputImageType, OutputImageType].New( reader,
-                  NumberOfIterations=int(argv[3]),
-                  TimeStep=float(argv[4]),
-                  ConductanceParameter=float(argv[5]))
-filter.Update();
+filter = itk.GradientAnisotropicDiffusionImageFilter[
+    InputImageType, OutputImageType].New(
+    reader,
+    NumberOfIterations=int(argv[3]),
+    TimeStep=float(argv[4]),
+    ConductanceParameter=float(argv[5]))
+filter.Update()
 
 WritePixelType = itk.UC
 WriteImageType = itk.Image[WritePixelType, 2]
 
-rescaler = itk.RescaleIntensityImageFilter[OutputImageType, WriteImageType].New( filter, OutputMinimum=0, OutputMaximum=255 )
-writer = itk.ImageFileWriter[WriteImageType].New( rescaler, FileName=argv[2] )
-writer.Update();
+rescaler = itk.RescaleIntensityImageFilter[
+    OutputImageType,
+    WriteImageType].New(
+    filter,
+    OutputMinimum=0,
+    OutputMaximum=255)
+writer = itk.ImageFileWriter[WriteImageType].New(rescaler, FileName=argv[2])
+writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/GradientMagnitudeRecursiveGaussianImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/GradientMagnitudeRecursiveGaussianImageFilter.py
index 83ea0b9..3aba8c4 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/GradientMagnitudeRecursiveGaussianImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/GradientMagnitudeRecursiveGaussianImageFilter.py
@@ -26,14 +26,20 @@ OutputPixelType = itk.F
 InputImageType = itk.Image[InputPixelType, 2]
 OutputImageType = itk.Image[OutputPixelType, 2]
 
-reader = itk.ImageFileReader[InputImageType].New( FileName=argv[1] )
+reader = itk.ImageFileReader[InputImageType].New(FileName=argv[1])
 
-filter = itk.GradientMagnitudeRecursiveGaussianImageFilter[InputImageType, OutputImageType].New( reader, Sigma=float(argv[3]) )
-filter.Update();
+filter = itk.GradientMagnitudeRecursiveGaussianImageFilter[
+    InputImageType, OutputImageType].New(reader, Sigma=float(argv[3]))
+filter.Update()
 
 WritePixelType = itk.UC
 WriteImageType = itk.Image[WritePixelType, 2]
 
-rescaler = itk.RescaleIntensityImageFilter[OutputImageType, WriteImageType].New( filter, OutputMinimum=0, OutputMaximum=255 )
-writer = itk.ImageFileWriter[WriteImageType].New( rescaler, FileName=argv[2] )
-writer.Update();
+rescaler = itk.RescaleIntensityImageFilter[
+    OutputImageType,
+    WriteImageType].New(
+    filter,
+    OutputMinimum=0,
+    OutputMaximum=255)
+writer = itk.ImageFileWriter[WriteImageType].New(rescaler, FileName=argv[2])
+writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/GrayscaleDilateImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/GrayscaleDilateImageFilter.py
index 785ee85..6530085 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/GrayscaleDilateImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/GrayscaleDilateImageFilter.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 #==========================================================================
 #
 #   Copyright Insight Software Consortium
@@ -17,20 +19,38 @@
 #==========================================================================*/
 
 #
-#  Example on the use of the GrayscaleDilateImageFilter
+#  Test GrayscaleDilateImageFilter
 #
 
+import sys
 import itk
-from sys import argv
 itk.auto_progress(2)
 
-dim = 2
-IType = itk.Image[itk.UC, dim]
+inputImage = sys.argv[1]
+outputImage = sys.argv[2]
+radiusValue = int(sys.argv[3])
+
+PixelType = itk.UC
+Dimension = 2
+
+ImageType = itk.Image[PixelType, Dimension]
+
+ReaderType = itk.ImageFileReader[ImageType]
+reader = ReaderType.New()
+reader.SetFileName(inputImage)
+
+StructuringElementType = itk.FlatStructuringElement[Dimension]
+structuringElement = StructuringElementType.Ball(radiusValue)
+
+GrayscaleFilterType = itk.GrayscaleDilateImageFilter[
+    ImageType, ImageType, StructuringElementType]
+grayscaleFilter = GrayscaleFilterType.New()
+grayscaleFilter.SetInput(reader.GetOutput())
+grayscaleFilter.SetKernel(structuringElement)
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-kernel = itk.strel(dim, 5)
-filter  = itk.GrayscaleDilateImageFilter[IType, IType, kernel].New( reader,
-                Kernel=kernel )
-writer = itk.ImageFileWriter[IType].New( filter, FileName=argv[2] )
+WriterType = itk.ImageFileWriter[ImageType]
+writer = WriterType.New()
+writer.SetFileName(outputImage)
+writer.SetInput(grayscaleFilter.GetOutput())
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/GrayscaleErodeImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/GrayscaleErodeImageFilter.py
index aaff2b1..74c92db 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/GrayscaleErodeImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/GrayscaleErodeImageFilter.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 #==========================================================================
 #
 #   Copyright Insight Software Consortium
@@ -17,20 +19,38 @@
 #==========================================================================*/
 
 #
-#  Example on the use of the GrayscaleErodeImageFilter
+#  Test GrayscaleErodeImageFilter
 #
 
+import sys
 import itk
-from sys import argv
 itk.auto_progress(2)
 
-dim = 2
-IType = itk.Image[itk.UC, dim]
+inputImage = sys.argv[1]
+outputImage = sys.argv[2]
+radiusValue = int(sys.argv[3])
+
+PixelType = itk.UC
+Dimension = 2
+
+ImageType = itk.Image[PixelType, Dimension]
+
+ReaderType = itk.ImageFileReader[ImageType]
+reader = ReaderType.New()
+reader.SetFileName(inputImage)
+
+StructuringElementType = itk.FlatStructuringElement[Dimension]
+structuringElement = StructuringElementType.Ball(radiusValue)
+
+GrayscaleFilterType = itk.GrayscaleErodeImageFilter[
+    ImageType, ImageType, StructuringElementType]
+grayscaleFilter = GrayscaleFilterType.New()
+grayscaleFilter.SetInput(reader.GetOutput())
+grayscaleFilter.SetKernel(structuringElement)
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-kernel = itk.strel(dim, 5)
-filter  = itk.GrayscaleErodeImageFilter[IType, IType, kernel].New( reader,
-                Kernel=kernel )
-writer = itk.ImageFileWriter[IType].New( filter, FileName=argv[2] )
+WriterType = itk.ImageFileWriter[ImageType]
+writer = WriterType.New()
+writer.SetFileName(outputImage)
+writer.SetInput(grayscaleFilter.GetOutput())
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/LaplacianImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/LaplacianImageFilter.py
index d27faf6..32be496 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/LaplacianImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/LaplacianImageFilter.py
@@ -28,11 +28,11 @@ dim = 2
 IType = itk.Image[itk.F, dim]
 OIType = itk.Image[itk.UC, dim]
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-filter  = itk.LaplacianImageFilter[IType, IType].New( reader )
+reader = itk.ImageFileReader[IType].New(FileName=argv[1])
+filter = itk.LaplacianImageFilter[IType, IType].New(reader)
 cast = itk.RescaleIntensityImageFilter[IType, OIType].New(filter,
-                OutputMinimum=0,
-                OutputMaximum=255)
-writer = itk.ImageFileWriter[OIType].New( cast, FileName=argv[2] )
+                                                          OutputMinimum=0,
+                                                          OutputMaximum=255)
+writer = itk.ImageFileWriter[OIType].New(cast, FileName=argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/MeanImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/MeanImageFilter.py
index 35dfbbd..e0e30cf 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/MeanImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/MeanImageFilter.py
@@ -1,3 +1,20 @@
+#==========================================================================
+#
+#   Copyright Insight Software Consortium
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#          http://www.apache.org/licenses/LICENSE-2.0.txt
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#==========================================================================*/
 
 #
 #  Example on the use of the MeanImageFilter
@@ -9,11 +26,11 @@ from sys import argv
 dim = 2
 IType = itk.Image[itk.UC, dim]
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-filter  = itk.MeanImageFilter[IType, IType].New( reader, Radius=eval( argv[3] ) )
+reader = itk.ImageFileReader[IType].New(FileName=argv[1])
+filter = itk.MeanImageFilter[IType, IType].New(reader, Radius=eval(argv[3]))
 
-watcher = itk.SimpleFilterWatcher( filter, "filter" )
+watcher = itk.SimpleFilterWatcher(filter, "filter")
 
-writer = itk.ImageFileWriter[IType].New( filter, FileName=argv[2] )
+writer = itk.ImageFileWriter[IType].New(filter, FileName=argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/MedianImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/MedianImageFilter.py
index 455190c..ebbc5ee 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/MedianImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/MedianImageFilter.py
@@ -23,15 +23,15 @@
 import itk
 from sys import argv
 
-reader = itk.ImageFileReader.IUC2.New( FileName=argv[1] )
+reader = itk.ImageFileReader.IUC2.New(FileName=argv[1])
 
 # test the deduction of the template parameter from the input
-filter  = itk.MedianImageFilter.New( reader )
-watcher = itk.XMLFilterWatcher( filter, "filter" )
+filter = itk.MedianImageFilter.New(reader)
+watcher = itk.XMLFilterWatcher(filter, "filter")
 
 # test the update of the filter with the __call__ operator
 # and the setting of parameter inside it
-filter( Radius=eval(argv[3]) )
+filter(Radius=eval(argv[3]))
 
 # test the write method
-itk.write( filter, argv[2] )
+itk.write(filter, argv[2])
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/OldStyleBinaryDilateImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/OldStyleBinaryDilateImageFilter.py
index ad091b6..bb01f4f 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/OldStyleBinaryDilateImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/OldStyleBinaryDilateImageFilter.py
@@ -1,3 +1,21 @@
+#==========================================================================
+#
+#   Copyright Insight Software Consortium
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#          http://www.apache.org/licenses/LICENSE-2.0.txt
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#==========================================================================*/
+
 #
 #  Example on the use of the BinaryDilateImageFilter
 #
@@ -6,14 +24,14 @@ from InsightToolkit import *
 from sys import argv
 
 reader = itkImageFileReaderIUC2.New()
-reader.SetFileName( argv[1] )
-kernel = itkFlatStructuringElement2.Ball( 5 )
-filter  = itkBinaryDilateImageFilterIUC2IUC2SE2.New()
-filter.SetInput( reader.GetOutput() )
-filter.SetDilateValue( 200 )
-filter.SetKernel( kernel )
+reader.SetFileName(argv[1])
+kernel = itkFlatStructuringElement2.Ball(5)
+filter = itkBinaryDilateImageFilterIUC2IUC2SE2.New()
+filter.SetInput(reader.GetOutput())
+filter.SetDilateValue(200)
+filter.SetKernel(kernel)
 writer = itkImageFileWriterIUC2.New()
 writer.SetInput(filter.GetOutput())
-writer.SetFileName( argv[2] )
+writer.SetFileName(argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/ReadDicomAndReadTag.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/ReadDicomAndReadTag.py
new file mode 100644
index 0000000..df1edd0
--- /dev/null
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/ReadDicomAndReadTag.py
@@ -0,0 +1,68 @@
+#==========================================================================
+#
+#   Copyright Insight Software Consortium
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#          http://www.apache.org/licenses/LICENSE-2.0.txt
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#==========================================================================*/
+
+# Tests:
+# - Reading dicom files from a directory
+# - Read a tag (patient's name) through the MetaDataDictionary
+# - Read a tag (patient's name) directly with the GetValueFromTag() method
+# - Compare the two tags if they are the same
+
+from __future__ import print_function
+
+import itk
+import sys
+
+imdir = sys.argv[1]
+image_t = itk.Image[itk.F, 3]
+
+# Set up reader
+reader = itk.ImageSeriesReader[image_t].New()
+dicomIO = itk.GDCMImageIO.New()
+dicomFN = itk.GDCMSeriesFileNames.New()
+reader.SetImageIO(dicomIO)
+
+# Get file names
+dicomFN.SetUseSeriesDetails(True)
+dicomFN.SetDirectory(imdir)
+
+# Get the first image series
+uids = dicomFN.GetSeriesUIDs()
+fnames = dicomFN.GetFileNames(uids[0])
+
+# Read in the files
+reader.SetFileNames(fnames)
+reader.Update()
+image = reader.GetOutput()
+
+# Now access the meta data dictionary
+metad = dicomIO.GetMetaDataDictionary()
+
+# Get the patient's name
+name1 = metad["0010|0010"]
+
+# Other way to get the tag
+# GetValueFromTag(tagkey, tagvalue)
+# tagvalue is an empty string, in C++ it is passed by
+# reference. Here we pass an empty string, and the
+# actual value is returned as the second variable.
+found, name2 = dicomIO.GetValueFromTag("0010|0010", "")
+assert(name1 == name2)
+
+# Check also if we returned the right tag
+found, name3 = dicomIO.GetLabelFromTag("0010|0010", "")
+assert(name3 == "Patient's Name")
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/ResampleImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/ResampleImageFilter.py
index 74fe6ed..1d1e653 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/ResampleImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/ResampleImageFilter.py
@@ -33,89 +33,91 @@
 #     OUTPUTS: {ResampleImageFilterOutput4.png}
 #     3
 
+from __future__ import print_function
+
 import itk
 from sys import argv, stderr, exit
 itk.auto_progress(2)
 
 
-if( len(argv) < 3 ):
-  print >> stderr, """Missing Parameters
-Usage: ResampleImageFilter.py inputImageFile  outputImageFile [exampleAction={0,1,2,3}]"""
-  exit(1)
+if(len(argv) < 3):
+    print((
+        "Missing Parameters \n Usage: ResampleImageFilter.py inputImageFile "
+        "outputImageFile [exampleAction={0,1,2,3}]"), file=stderr)
+    exit(1)
 
 exampleAction = 0
 
-if( len(argv) >= 4 ):
-  exampleAction = int( argv[3] )
+if(len(argv) >= 4):
+    exampleAction = int(argv[3])
 
 Dimension = 2
 InputPixelType = itk.UC
 OutputPixelType = itk.UC
-InputImageType = itk.Image[ InputPixelType,  Dimension ]
-OutputImageType = itk.Image[ OutputPixelType, Dimension ]
+InputImageType = itk.Image[InputPixelType, Dimension]
+OutputImageType = itk.Image[OutputPixelType, Dimension]
 
-ReaderType = itk.ImageFileReader[ InputImageType  ]
-CastType = itk.CastImageFilter[ InputImageType, OutputImageType ]
-WriterType = itk.ImageFileWriter[ OutputImageType ]
+ReaderType = itk.ImageFileReader[InputImageType]
+CastType = itk.CastImageFilter[InputImageType, OutputImageType]
+WriterType = itk.ImageFileWriter[OutputImageType]
 
 reader = ReaderType.New()
 cast = CastType.New()
 writer = WriterType.New()
 
-reader.SetFileName( argv[1] )
-writer.SetFileName( argv[2] )
+reader.SetFileName(argv[1])
+writer.SetFileName(argv[2])
 
-FilterType = itk.ResampleImageFilter[InputImageType,InputImageType]
+FilterType = itk.ResampleImageFilter[InputImageType, InputImageType]
 filter = FilterType.New()
 
-TransformType = itk.AffineTransform[ itk.D, Dimension ]
+TransformType = itk.AffineTransform[itk.D, Dimension]
 
 transform = TransformType.New()
-filter.SetTransform( transform )
+filter.SetTransform(transform)
 
 InterpolatorType = itk.NearestNeighborInterpolateImageFunction[
-                      InputImageType, itk.D ]
+    InputImageType, itk.D]
 
 interpolator = InterpolatorType.New()
-filter.SetInterpolator( interpolator )
+filter.SetInterpolator(interpolator)
 
-filter.SetDefaultPixelValue( 0 )
+filter.SetDefaultPixelValue(0)
 
 # spacing = itk.Vector[itk.D, Dimension]()
 # spacing.SetElement(0, 1.0)
 # spacing.SetElement(1, 1.0)
 # filter.SetOutputSpacing( spacing )
-filter.SetOutputSpacing( 1.0 )
+filter.SetOutputSpacing(1.0)
 
 # origin = itk.Point[itk.D, Dimension]()
 # origin.SetElement(0, 0.0)
 # origin.SetElement(1, 0.0)
 # filter.SetOutputOrigin( origin )
-filter.SetOutputOrigin( [0.0, 0.0] )
+filter.SetOutputOrigin([0.0, 0.0])
 
 # size = itk.Size[Dimension]()
 # size.SetElement(0, 300)
 # size.SetElement(1, 300)
 # filter.SetSize( size )
-filter.SetSize( 300 )
+filter.SetSize(300)
 
-filter.SetInput( reader.GetOutput() )
-cast.SetInput( filter.GetOutput() )
-writer.SetInput( cast.GetOutput() )
+filter.SetInput(reader.GetOutput())
+cast.SetInput(filter.GetOutput())
+writer.SetInput(cast.GetOutput())
 writer.Update()
 
 # translation = itk.Vector[itk.D, Dimension]()
 # translation.SetElement(0, -30)
 # translation.SetElement(1, -50)
 # transform.Translate( translation, 0 )
-transform.Translate( [-30, -50], 0 )
-
-if( exampleAction == 1 ):
-  writer.Update()
+transform.Translate([-30, -50], False)
 
+if(exampleAction == 1):
+    writer.Update()
 
 
-filter.SetDefaultPixelValue( 100 )
+filter.SetDefaultPixelValue(100)
 
-if( exampleAction == 2 ):
-  writer.Update()
+if(exampleAction == 2):
+    writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/SigmoidImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/SigmoidImageFilter.py
index 0cc7649..f034672 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/SigmoidImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/SigmoidImageFilter.py
@@ -27,13 +27,13 @@ itk.auto_progress(2)
 dim = 2
 IType = itk.Image[itk.UC, dim]
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-filter  = itk.SigmoidImageFilter[IType, IType].New( reader,
-                  OutputMinimum=eval( argv[3] ),
-                  OutputMaximum=eval( argv[4] ),
-                  Alpha=eval( argv[5] ),
-                  Beta=eval( argv[6] ),
-                  )
-writer = itk.ImageFileWriter[IType].New( filter, FileName=argv[2] )
+reader = itk.ImageFileReader[IType].New(FileName=argv[1])
+filter = itk.SigmoidImageFilter[IType, IType].New(reader,
+                                                  OutputMinimum=eval(argv[3]),
+                                                  OutputMaximum=eval(argv[4]),
+                                                  Alpha=eval(argv[5]),
+                                                  Beta=eval(argv[6]),
+                                                  )
+writer = itk.ImageFileWriter[IType].New(filter, FileName=argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/SmoothingRecursiveGaussianImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/SmoothingRecursiveGaussianImageFilter.py
index 95aee11..12d1d7e 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/SmoothingRecursiveGaussianImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/SmoothingRecursiveGaussianImageFilter.py
@@ -24,6 +24,8 @@ import itk
 from sys import argv
 itk.auto_progress(2)
 
-reader = itk.ImageFileReader.IUC2.New( FileName=argv[1] )
-filter  = itk.SmoothingRecursiveGaussianImageFilter.New( reader, Sigma=eval( argv[3] ) )
-itk.write( filter, argv[2] )
+reader = itk.ImageFileReader.IUC2.New(FileName=argv[1])
+filter = itk.SmoothingRecursiveGaussianImageFilter.New(
+    reader,
+    Sigma=eval(argv[3]))
+itk.write(filter, argv[2])
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/SpatialObjectTest.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/SpatialObjectTest.py
index 58c7d56..78c1932 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/SpatialObjectTest.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/SpatialObjectTest.py
@@ -32,14 +32,17 @@
 #     OUTPUTS: {ResampleImageFilterOutput4.png}
 #     3
 
+from __future__ import print_function
+
 import itk
 from sys import argv, stderr, exit
 
 itk.auto_progress(2)
 
 # if( len(argv) < 3 ):
-#   print >> stderr, """Missing Parameters
-# Usage: ResampleImageFilter.py inputImageFile  outputImageFile [exampleAction={0,1,2,3}]"""
+#   print("""Missing Parameters
+# Usage: ResampleImageFilter.py inputImageFile outputImageFile
+# [exampleAction={0,1,2,3}]""", file=stderr)
 #   exit(1)
 
 dim = 2
@@ -48,27 +51,33 @@ InternalImageType = itk.Image[itk.F, dim]
 OutputPixelType = itk.UC
 OutputImageType = itk.Image[OutputPixelType, dim]
 
-ellipse = itk.EllipseSpatialObject[dim].New( Radius=[10,5] )
-ellipse.GetObjectToParentTransform().SetOffset( [20,20] )
+ellipse = itk.EllipseSpatialObject[dim].New(Radius=[10, 5])
+ellipse.GetObjectToParentTransform().SetOffset([20, 20])
 ellipse.ComputeObjectToWorldTransform()
 
-box = itk.BoxSpatialObject[dim].New( Size=20 )
-box.GetObjectToParentTransform().SetOffset( [20,40] )
+box = itk.BoxSpatialObject[dim].New(Size=20)
+box.GetObjectToParentTransform().SetOffset([20, 40])
 box.ComputeObjectToWorldTransform()
 
-gaussian = itk.GaussianSpatialObject[dim].New( Radius=100 )
-gaussian.GetObjectToParentTransform().SetOffset( [60,60] )
-gaussian.GetObjectToParentTransform().SetScale( 10 )
+gaussian = itk.GaussianSpatialObject[dim].New(Radius=100)
+gaussian.GetObjectToParentTransform().SetOffset([60, 60])
+gaussian.GetObjectToParentTransform().SetScale(10)
 gaussian.ComputeObjectToWorldTransform()
 
 group = itk.GroupSpatialObject[dim].New()
-group.AddSpatialObject( ellipse )
-group.AddSpatialObject( box )
-group.AddSpatialObject( gaussian )
+group.AddSpatialObject(ellipse)
+group.AddSpatialObject(box)
+group.AddSpatialObject(gaussian)
 
-filter = itk.SpatialObjectToImageFilter[SOType, InternalImageType].New( group, Size=[100,100], UseObjectValue=True )
-filter.Update() # required ?!
+filter = itk.SpatialObjectToImageFilter[SOType, InternalImageType].New(
+    group, Size=[100, 100], UseObjectValue=True)
+filter.Update()  # required ?!
 
-rescale = itk.RescaleIntensityImageFilter[InternalImageType, OutputImageType].New( filter, OutputMinimum=itk.NumericTraits[OutputPixelType].NonpositiveMin(), OutputMaximum=itk.NumericTraits[OutputPixelType].max() )
+rescale = itk.RescaleIntensityImageFilter[
+    InternalImageType,
+    OutputImageType].New(
+    filter,
+    OutputMinimum=itk.NumericTraits[OutputPixelType].NonpositiveMin(),
+    OutputMaximum=itk.NumericTraits[OutputPixelType].max())
 
 itk.write(rescale, argv[1])
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/StrelFromImageGrayscaleDilateImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/StrelFromImageGrayscaleDilateImageFilter.py
index d3e89dd..758828e 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/StrelFromImageGrayscaleDilateImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/StrelFromImageGrayscaleDilateImageFilter.py
@@ -29,12 +29,12 @@ dim = 2
 IType = itk.Image[itk.US, dim]
 OIType = itk.Image[itk.UC, dim]
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-reader2 = itk.ImageFileReader[OIType].New( FileName=argv[3] )
-kernel = itk.FlatStructuringElement[dim].FromImageUC( reader2.GetOutput() )
-filter  = itk.GrayscaleDilateImageFilter[IType, IType, kernel].New( reader,
-                Kernel=kernel )
-cast = itk.CastImageFilter[IType, OIType].New(filter)
-writer = itk.ImageFileWriter[OIType].New( cast, FileName=argv[2] )
+reader = itk.ImageFileReader[IType].New(FileName=argv[1])
+reader2 = itk.ImageFileReader[OIType].New(FileName=argv[3])
+kernel = itk.FlatStructuringElement[dim].FromImageUC(reader2.GetOutput())
+grayscaleFilter = itk.GrayscaleDilateImageFilter[IType, IType, kernel]
+grayscaleFilter = grayscaleFilter.New(reader, Kernel=kernel)
+cast = itk.CastImageFilter[IType, OIType].New(grayscaleFilter)
+writer = itk.ImageFileWriter[OIType].New(cast, FileName=argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/TestDirectory.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/TestDirectory.py
index 636254b..c5940ae 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/TestDirectory.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/TestDirectory.py
@@ -16,6 +16,8 @@
 #
 #==========================================================================*/
 
+from __future__ import print_function
+
 import itk
 itk.auto_progress(2)
 
@@ -24,5 +26,5 @@ d.Load(".")
 n = d.GetNumberOfFiles()
 i = 0
 while i < n:
-        print d.GetFile(i)
-        i = i +1
+    print(d.GetFile(i))
+    i = i + 1
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/TestMetaDataDictionary.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/TestMetaDataDictionary.py
index d2c9356..4a80ad0 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/TestMetaDataDictionary.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/TestMetaDataDictionary.py
@@ -15,6 +15,9 @@
 #   limitations under the License.
 #
 #==========================================================================*/
+
+from __future__ import print_function
+
 import itk
 from sys import argv
 
@@ -23,7 +26,8 @@ md = itk.MetaDataDictionary()
 dv = itk.MetaDataObject.D.New()
 dv.SetMetaDataObjectValue(10.0)
 md.Set("double", dv)
-print md.Get("double")
-# other way of setting and retrieving double value (levereges on Python's weak type system)
+print(md.Get("double"))
+# other way of setting and retrieving double value (levereges on Python's
+# weak type system)
 md['double'] = 10.0
-print md['double']
+print(md['double'])
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/ThresholdImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/ThresholdImageFilter.py
index ab3cb48..1e49cae 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/ThresholdImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/ThresholdImageFilter.py
@@ -27,13 +27,13 @@ itk.auto_progress(2)
 dim = 2
 IType = itk.Image[itk.UC, dim]
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-filter  = itk.ThresholdImageFilter[IType].New( reader,
-                OutsideValue=eval( argv[3] ) )
+reader = itk.ImageFileReader[IType].New(FileName=argv[1])
+filter = itk.ThresholdImageFilter[IType].New(reader,
+                                             OutsideValue=eval(argv[3]))
 # this method can't be called in the New() method because it doesn't
 # use the Set notation
-filter.ThresholdAbove(  eval( argv[4] )  )
+filter.ThresholdAbove(eval(argv[4]))
 
-writer = itk.ImageFileWriter[IType].New( filter, FileName=argv[2] )
+writer = itk.ImageFileWriter[IType].New(filter, FileName=argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/ThresholdSegmentationLevelSetImageFilter.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/ThresholdSegmentationLevelSetImageFilter.py
index 5ff9dc3..33b12c8 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/ThresholdSegmentationLevelSetImageFilter.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/ThresholdSegmentationLevelSetImageFilter.py
@@ -28,103 +28,114 @@
 #     OUTPUTS: {ThresholdSegmentationLevelSetImageFilterGrayMatter.png}
 #     107 69 5 180  210
 
+from __future__ import print_function
+
 import itk
 from sys import argv, stderr, exit
 itk.auto_progress(2)
 
 # itk.auto_progress(1)
 
-if len(argv) < 8 :
-  print >> stderr, """Missing Parameters
-Usage: ThresholdSegmentationLevelSetImageFilter.py inputImage  outputImage seedX seedY InitialDistance LowerThreshold UpperThreshold [CurvatureScaling == 1.0]"""
-  exit(1)
+if len(argv) < 8:
+    print((
+        "Missing Parameters \n Usage: "
+        "ThresholdSegmentationLevelSetImageFilter.py inputImage outputImage "
+        "seedX seedY InitialDistance LowerThreshold UpperThreshold "
+        "[CurvatureScaling == 1.0]"), file=stderr)
+    exit(1)
 
 InternalPixelType = itk.F
 Dimension = 2
-InternalImageType = itk.Image[ InternalPixelType, Dimension ]
+InternalImageType = itk.Image[InternalPixelType, Dimension]
 
 OutputPixelType = itk.UC
-OutputImageType = itk.Image[ OutputPixelType, Dimension ]
+OutputImageType = itk.Image[OutputPixelType, Dimension]
 
-thresholder = itk.BinaryThresholdImageFilter[ InternalImageType, OutputImageType ].New()
+thresholder = itk.BinaryThresholdImageFilter[
+    InternalImageType, OutputImageType].New()
 
-thresholder.SetLowerThreshold( -1000.0 )
-thresholder.SetUpperThreshold(     0.0 )
+thresholder.SetLowerThreshold(-1000.0)
+thresholder.SetUpperThreshold(0.0)
 
-thresholder.SetOutsideValue(  0  )
-thresholder.SetInsideValue(  255 )
+thresholder.SetOutsideValue(0)
+thresholder.SetInsideValue(255)
 
-ReaderType = itk.ImageFileReader[ InternalImageType ]
-WriterType = itk.ImageFileWriter[  OutputImageType  ]
+ReaderType = itk.ImageFileReader[InternalImageType]
+WriterType = itk.ImageFileWriter[OutputImageType]
 
 reader = ReaderType.New()
 writer = WriterType.New()
 
-reader.SetFileName( argv[1] )
-writer.SetFileName( argv[2] )
+reader.SetFileName(argv[1])
+writer.SetFileName(argv[2])
 
 
-FastMarchingFilterType = itk.FastMarchingImageFilter[ InternalImageType, InternalImageType ]
+FastMarchingFilterType = itk.FastMarchingImageFilter[
+    InternalImageType,
+    InternalImageType]
 fastMarching = FastMarchingFilterType.New()
 
-ThresholdSegmentationLevelSetImageFilterType = itk.ThresholdSegmentationLevelSetImageFilter[ InternalImageType, InternalImageType, InternalPixelType ]
-thresholdSegmentation = ThresholdSegmentationLevelSetImageFilterType.New()
-thresholdSegmentation.SetPropagationScaling( 1.0 )
-if len(argv) > 8 :
-  thresholdSegmentation.SetCurvatureScaling( float(argv[8]) )
+ThresholdSegLvlSetImgFilterType = itk.ThresholdSegmentationLevelSetImageFilter[
+    InternalImageType,
+    InternalImageType,
+    InternalPixelType]
+thresholdSegmentation = ThresholdSegLvlSetImgFilterType.New()
+thresholdSegmentation.SetPropagationScaling(1.0)
+if len(argv) > 8:
+    thresholdSegmentation.SetCurvatureScaling(float(argv[8]))
 else:
-  thresholdSegmentation.SetCurvatureScaling( 1.0 )
+    thresholdSegmentation.SetCurvatureScaling(1.0)
 
-thresholdSegmentation.SetMaximumRMSError( 0.02 )
-thresholdSegmentation.SetNumberOfIterations( 1200 )
+thresholdSegmentation.SetMaximumRMSError(0.02)
+thresholdSegmentation.SetNumberOfIterations(1200)
 
-thresholdSegmentation.SetUpperThreshold( float(argv[7]) )
-thresholdSegmentation.SetLowerThreshold( float(argv[6]) )
+thresholdSegmentation.SetUpperThreshold(float(argv[7]))
+thresholdSegmentation.SetLowerThreshold(float(argv[6]))
 thresholdSegmentation.SetIsoSurfaceValue(0.0)
 
-thresholdSegmentation.SetInput( fastMarching.GetOutput() )
-thresholdSegmentation.SetFeatureImage( reader.GetOutput() )
-thresholder.SetInput( thresholdSegmentation.GetOutput() )
-writer.SetInput( thresholder.GetOutput() )
+thresholdSegmentation.SetInput(fastMarching.GetOutput())
+thresholdSegmentation.SetFeatureImage(reader.GetOutput())
+thresholder.SetInput(thresholdSegmentation.GetOutput())
+writer.SetInput(thresholder.GetOutput())
 
 NodeType = itk.LevelSetNode[InternalPixelType, Dimension]
 NodeContainer = itk.VectorContainer[itk.UI, NodeType]
 seeds = NodeContainer.New()
-seedPosition = [int( argv[3] ), int( argv[4] )]
+seedPosition = [int(argv[3]), int(argv[4])]
 
-initialDistance = float( argv[5] )
+initialDistance = float(argv[5])
 
 node = NodeType()
 
 seedValue = - initialDistance
 
-node.SetValue( seedValue )
-node.SetIndex( seedPosition )
+node.SetValue(seedValue)
+node.SetIndex(seedPosition)
 
 seeds.Initialize()
-seeds.InsertElement( 0, node )
+seeds.InsertElement(0, node)
 
-fastMarching.SetTrialPoints(  seeds  )
+fastMarching.SetTrialPoints(seeds)
 
-fastMarching.SetSpeedConstant( 1.0 )
+fastMarching.SetSpeedConstant(1.0)
 
 
 reader.Update()
 fastMarching.SetOutputSize(
-  reader.GetOutput().GetBufferedRegion().GetSize() )
+    reader.GetOutput().GetBufferedRegion().GetSize())
 writer.Update()
 
 itk.echo(thresholdSegmentation)
 
 
-InternalWriterType = itk.ImageFileWriter[ InternalImageType ]
+InternalWriterType = itk.ImageFileWriter[InternalImageType]
 
 mapWriter = InternalWriterType.New()
-mapWriter.SetInput( fastMarching.GetOutput() )
+mapWriter.SetInput(fastMarching.GetOutput())
 mapWriter.SetFileName("fastMarchingImage.mha")
 mapWriter.Update()
 
 speedWriter = InternalWriterType.New()
-speedWriter.SetInput( thresholdSegmentation.GetSpeedImage() )
+speedWriter.SetInput(thresholdSegmentation.GetSpeedImage())
 speedWriter.SetFileName("speedTermImage.mha")
 speedWriter.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/WatershedSegmentation1.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/WatershedSegmentation1.py
index d8c5960..441ff57 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/WatershedSegmentation1.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/WatershedSegmentation1.py
@@ -21,13 +21,13 @@ import sys
 itk.auto_progress(2)
 
 reader = itk.ImageFileReader.IF2.New()
-reader.SetFileName( sys.argv[1] )
+reader.SetFileName(sys.argv[1])
 
 diffusion = itk.GradientAnisotropicDiffusionImageFilter.IF2IF2.New()
 diffusion.SetInput(reader.GetOutput())
 diffusion.SetTimeStep(0.0625)
 diffusion.SetConductanceParameter(9.0)
-diffusion.SetNumberOfIterations( 5 );
+diffusion.SetNumberOfIterations(5)
 
 gradient = itk.GradientMagnitudeImageFilter.IF2IF2.New()
 gradient.SetInput(diffusion.GetOutput())
@@ -38,12 +38,12 @@ watershed.SetThreshold(0.01)
 watershed.SetLevel(0.2)
 
 relabel = itk.RelabelComponentImageFilter.IUL2ISS2.New()
-relabel.SetInput( watershed.GetOutput() )
+relabel.SetInput(watershed.GetOutput())
 
 cast = itk.CastImageFilter.ISS2IUC2.New()
-cast.SetInput( relabel.GetOutput() )
+cast.SetInput(relabel.GetOutput())
 
 writer = itk.ImageFileWriter.IUC2.New()
-writer.SetFileName( sys.argv[2] )
-writer.SetInput( cast.GetOutput()  )
+writer.SetFileName(sys.argv[2])
+writer.SetInput(cast.GetOutput())
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/auto_pipeline.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/auto_pipeline.py
index b656951..e9f4274 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/auto_pipeline.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/auto_pipeline.py
@@ -1,14 +1,32 @@
+#==========================================================================
+#
+#   Copyright Insight Software Consortium
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#          http://www.apache.org/licenses/LICENSE-2.0.txt
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#==========================================================================*/
+
 import itk
 from sys import argv
 
 # instantiate an auto pipeline
 p = itk.auto_pipeline()
 
-# from now, and until we call p.Stop(), all the new objects will be connected to
-# the pipeline p, without having to give a name to any filter
+# from now, and until we call p.Stop(), all the new objects will be connected
+# to the pipeline p, without having to give a name to any filter
 
-itk.ImageFileReader.IUC2.New( FileName=argv[1] )
-itk.MedianImageFilter.IUC2IUC2.New( Radius=eval( argv[3] ) )
+itk.ImageFileReader.IUC2.New(FileName=argv[1])
+itk.MedianImageFilter.IUC2IUC2.New(Radius=eval(argv[3]))
 itk.CastImageFilter.IUC2IUC2.New()
 
 # stop the auto_pipeline and test that the next (imcompatible) filter is not
@@ -17,5 +35,5 @@ p.Stop()
 itk.CastImageFilter.IF2IF2.New()
 p.Start()
 
-itk.ImageFileWriter.IUC2.New( FileName=argv[2] )
+itk.ImageFileWriter.IUC2.New(FileName=argv[2])
 p.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/extras.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/extras.py
index 1598b87..eef3bbc 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/extras.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/extras.py
@@ -17,15 +17,20 @@
 #==========================================================================*/
 
 # also test the import callback feature
+
+from __future__ import print_function
+
+
 def custom_callback(name, progress):
-  if progress == 0:
-    print >> sys.stderr, "Loading %s..." % name,
-  if progress == 1:
-    print >> sys.stderr, "done"
+    if progress == 0:
+        print("Loading %s..." % name, file=sys.stderr)
+    if progress == 1:
+        print("done", file=sys.stderr)
 import itkConfig
 itkConfig.ImportCallback = custom_callback
 
-import itk, sys
+import itk
+import sys
 
 # test the force load function
 itk.force_load()
@@ -51,19 +56,19 @@ assert itk.class_("dummy") == str
 assert itk.template(ReaderType) == (itk.ImageFileReader, (IType,))
 assert itk.template(reader) == (itk.ImageFileReader, (IType,))
 try:
-  itk.template(str)
-  raise Exception("unknown class should send an exception")
+    itk.template(str)
+    raise Exception("unknown class should send an exception")
 except KeyError:
-  pass
+    pass
 
 # test ctype
 assert itk.ctype("unsigned short") == itk.US
 assert itk.ctype("        unsigned      \n   short \t  ") == itk.US
 try:
-  itk.ctype("dummy")
-  raise Exception("unknown C type should send an exception")
+    itk.ctype("dummy")
+    raise Exception("unknown C type should send an exception")
 except KeyError:
-  pass
+    pass
 
 
 # test output
@@ -73,18 +78,6 @@ assert itk.output(1) == 1
 assert itk.image(reader) == reader.GetOutput()
 assert itk.image(1) == 1
 
-
-# test strel
-# should work with the image type, an image instance or a filter
-# and should work with a list, a tuple, an int or an itk.Size
-for s in [2, (2, 2), [2, 2], itk.Size[2](2)] :
-  st = itk.strel(dim, s)
-
-  (tpl, param) = itk.template(st)
-  assert tpl == itk.FlatStructuringElement
-  assert param[0] == dim
-  assert st.GetRadius()[0] == st.GetRadius()[1] == 2
-
 # test size
 s = itk.size(reader)
 assert s[0] == s[1] == 256
@@ -145,7 +138,8 @@ assert "Index" not in res
 
 # test down_cast
 obj = itk.Object.cast(reader)
-assert obj.__class__ == itk.Object  # be sure that the reader is casted to itk::Object
+# be sure that the reader is casted to itk::Object
+assert obj.__class__ == itk.Object
 down_casted = itk.down_cast(obj)
 assert down_casted == reader
 assert down_casted.__class__ == ReaderType
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/findEmptyClasses.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/findEmptyClasses.py
index d1593de..93b3d67 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/findEmptyClasses.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/findEmptyClasses.py
@@ -16,7 +16,11 @@
 #
 #==========================================================================*/
 
-import itk, re, sys
+from __future__ import print_function
+
+import itk
+import re
+import sys
 # itk.auto_progress(True)
 
 from itkTemplate import itkTemplate
@@ -28,93 +32,97 @@ set = sets.Set
 # dirty but easier: a global var to count the empty classes
 empty = set()
 
+
 def exploreTpl(tpl):
     for cl in tpl.itervalues():
-        print cl
+        print(cl)
         exploreMethods(cl)
         # try to instanciate the class
-        try :
+        try:
             obj = cl.New()
             exploreMethods(obj)
         except:
             pass
-        try :
+        try:
             exploreMethods(cl())
         except:
             pass
 
+
 def exploreMethods(obj):
     global count
     excludeList = ['this', 'thisown']
-    attrNameList = [i for i in dir(obj) if isinstance(i, str) and i[0].isupper() and i not in excludeList]
-    if attrNameList == [] :
-      empty.add(obj)
+    attrNameList = [i for i in dir(
+        obj) if isinstance(i, str) and i[0].isupper() and i not in excludeList]
+    if attrNameList == []:
+        empty.add(obj)
 
 
 excluded = set([
-  "PeriodicBoundaryCondition",
-  "BandNode",
-  "DefaultDynamicMeshTraits",
-  "DefaultStaticMeshTraits",
-  "NormalBandNode",
-  "ZeroFluxNeumannBoundaryCondition",
-  "SparseFieldLevelSetNode",
-  "ParallelSparseFieldLevelSetNode",
-  "PySwigIterator",
-  "SwigPyIterator",
-  "COLORS",
-  "VECTOR_REALS",
-  "SCALARS",
-  "ALL_TYPES",
-  "COMPLEX_REALS",
-  "RGBS",
-  "RGBAS",
-  "REALS",
-  "USIGN_INTS",
-  "DIMS",
-  "SIGN_INTS",
-  "VECTORS",
-  "INTS",
-  "COV_VECTOR_REALS",
-  "FFTComplexToComplexImageFilter",
-  "QuadEdgeMeshCellTraitsInfo",
-  "QuadEdgeMeshTraits",
-  "OnesMatrixCoefficients",
-  "ConformalMatrixCoefficients",
-  "InverseEuclideanDistanceMatrixCoefficients",
-  "AuthalicMatrixCoefficients",
-  "IntrinsicMatrixCoefficients",
-  "InverseEuclideanDistanceMatrixCoefficients",
-  "OnesMatrixCoefficients",
-  "ConformalMatrixCoefficients",
-  "AuthalicMatrixCoefficients",
-  "MatrixCoefficients",
-  ])
-
-
-attrNameList = set([i for i in dir(itk) if i[0].isupper() and len(i) > 2]) - excluded
+    "PeriodicBoundaryCondition",
+    "BandNode",
+    "DefaultDynamicMeshTraits",
+    "DefaultStaticMeshTraits",
+    "NormalBandNode",
+    "ZeroFluxNeumannBoundaryCondition",
+    "SparseFieldLevelSetNode",
+    "ParallelSparseFieldLevelSetNode",
+    "PySwigIterator",
+    "SwigPyIterator",
+    "COLORS",
+    "VECTOR_REALS",
+    "SCALARS",
+    "ALL_TYPES",
+    "COMPLEX_REALS",
+    "RGBS",
+    "RGBAS",
+    "REALS",
+    "USIGN_INTS",
+    "DIMS",
+    "SIGN_INTS",
+    "VECTORS",
+    "INTS",
+    "COV_VECTOR_REALS",
+    "FFTComplexToComplexImageFilter",
+    "QuadEdgeMeshCellTraitsInfo",
+    "QuadEdgeMeshTraits",
+    "OnesMatrixCoefficients",
+    "ConformalMatrixCoefficients",
+    "InverseEuclideanDistanceMatrixCoefficients",
+    "AuthalicMatrixCoefficients",
+    "IntrinsicMatrixCoefficients",
+    "InverseEuclideanDistanceMatrixCoefficients",
+    "OnesMatrixCoefficients",
+    "ConformalMatrixCoefficients",
+    "AuthalicMatrixCoefficients",
+    "MatrixCoefficients",
+])
+
+
+attrNameList = set(
+    [i for i in dir(itk) if i[0].isupper() and len(i) > 2]) - excluded
 
 for name in attrNameList:
     # use it because of lazy loading
-    exec "attr = itk."+name
-    print "-----------", name, "-----------"
-    if isinstance(attr, itkTemplate) :
+    exec "attr = itk." + name
+    print("-----------", name, "-----------")
+    if isinstance(attr, itkTemplate):
         exploreTpl(attr)
-    else :
+    else:
         exploreMethods(attr)
-        try :
+        try:
             exploreMethods(cl.New())
         except:
             pass
-        try :
+        try:
             exploreMethods(cl())
         except:
             pass
 
-print
-print
-print len(empty), "empty classes found"
+print()
+print()
+print(len(empty), "empty classes found")
 for c in empty:
-  print c
+    print(c)
 
 sys.exit(len(empty))
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/findSegfaults.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/findSegfaults.py
index e6309b4..377bd73 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/findSegfaults.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/findSegfaults.py
@@ -16,20 +16,40 @@
 #
 #==========================================================================*/
 
+from __future__ import print_function
 
-import sys, commands, tempfile
+import sys
+import commands
+import tempfile
 from optparse import OptionParser
 
 parser = OptionParser(usage="usage: %prog")
-parser.add_option("--start-from", dest="startFrom", default=None, metavar="CLASS", help="")
-parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="")
-parser.add_option("-k", "--keep", action="store_true", dest="keep", default=False, help="")
+parser.add_option(
+    "--start-from",
+    dest="startFrom",
+    default=None,
+    metavar="CLASS",
+    help="")
+parser.add_option(
+    "-v",
+    "--verbose",
+    action="store_true",
+    dest="verbose",
+    default=False,
+    help="")
+parser.add_option(
+    "-k",
+    "--keep",
+    action="store_true",
+    dest="keep",
+    default=False,
+    help="")
 (options, args) = parser.parse_args()
 
-if options.keep :
-  mode = "a"
+if options.keep:
+    mode = "a"
 else:
-  mode = "w"
+    mode = "w"
 segfaultFile = file(args[0], mode)
 
 logs = tempfile.NamedTemporaryFile()
@@ -37,25 +57,26 @@ logs = tempfile.NamedTemporaryFile()
 lastClass = options.startFrom
 ret = 1
 while ret != 0:
-  command = "python returnedTypeCoverage.py -v5 --exclude "+sys.argv[1]+" --log-file '"+logs.name+"'"
-  if lastClass:
-      command += " --start-from "+lastClass
-  if options.verbose:
-    print command
-  (ret, output) = commands.getstatusoutput( command )
-  if ret != 0:
-    # find last args (the ones which caused the segfault)
-    faultyArgs = None
-    logs.file.seek(0)
-    for l in reversed(logs.file.readlines()):
-      l = l.strip()
-      if faultyArgs == None and l.startswith('('):
-        faultyArgs = l
-      if faultyArgs != None :
-        # find the last class
-        if len(l) != 0 and l[0].isupper():
-          lastClass = l
-          break
-    print repr(faultyArgs)
-    segfaultFile.write(faultyArgs+"\n")
-    segfaultFile.flush()
+    command = "python returnedTypeCoverage.py -v5 --exclude " + \
+        sys.argv[1] + " --log-file '" + logs.name + "'"
+    if lastClass:
+        command += " --start-from " + lastClass
+    if options.verbose:
+        print(command)
+    (ret, output) = commands.getstatusoutput(command)
+    if ret != 0:
+        # find last args (the ones which caused the segfault)
+        faultyArgs = None
+        logs.file.seek(0)
+        for l in reversed(logs.file.readlines()):
+            l = l.strip()
+            if faultyArgs is None and l.startswith('('):
+                faultyArgs = l
+            if faultyArgs is not None:
+                # find the last class
+                if len(l) != 0 and l[0].isupper():
+                    lastClass = l
+                    break
+        print(repr(faultyArgs))
+        segfaultFile.write(faultyArgs + "\n")
+        segfaultFile.flush()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/getNameOfClass.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/getNameOfClass.py
index 698835c..71ecd1a 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/getNameOfClass.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/getNameOfClass.py
@@ -18,51 +18,63 @@
 
 # a short program to check the value returned by the GetNameOfClass() methods
 
-import itk, sys
+from __future__ import print_function
+
+import itk
+import sys
 itk.auto_progress(2)
 
 # must force the load to return all the names with dir(itk)
 itk.force_load()
 # itk.ImageToImageFilter
 
-# a list of classes to exclude. Typically, the classes with a custom New() method, which return a subclass
-# of the current class
-exclude = ["ForwardFFTImageFilter", "InverseFFTImageFilter", "OutputWindow", "FFTComplexToComplexImageFilter", "templated_class", "HalfHermitianToRealInverseFFTImageFilter", "RealToHalfHermitianForwardFFTImageFilter"]
+# a list of classes to exclude. Typically, the classes with a custom New()
+# method, which return a subclass of the current class
+exclude = ["ForwardFFTImageFilter",
+           "InverseFFTImageFilter",
+           "OutputWindow",
+           "FFTComplexToComplexImageFilter",
+           "templated_class",
+           "HalfHermitianToRealInverseFFTImageFilter",
+           "RealToHalfHermitianForwardFFTImageFilter"]
 
 wrongName = False
 
 for t in dir(itk):
-  if t not in exclude:
-    T = itk.__dict__[t]
-    # first case - that's a templated class
-    if isinstance(T, itk.Vector.__class__) and len(T)>0:
-      # use only the first specialization - all of them return the same name
-      i = T.values()[0]
-      # GetNameOfClass() is a virtual method of the LightObject class, so we must
-      # instantiate an object with the New() method
-      if 'New' in dir(i):
-        I = i.New()
-        # be sure that the type of the instantiated object is the same than the
-        # one of the class. It can be different if the class is an "abstract" one
-        # and don't provide any New() method. In that case, the one of the superclass
-        # is used.
-        if 'GetNameOfClass' in dir(I):
-          # print "Checking", t
-          n = I.GetNameOfClass()
-          if n != t and itk.class_(I) == i:
-            print >> sys.stderr, t, "doesn't provide the right name."
-            wrongName = True
-    else:
-      if 'New' in dir(T):
-        I = T.New()
-        if 'GetNameOfClass' in dir(I):
-          # print "Checking", t
-          n = I.GetNameOfClass()
-          if n != t and itk.class_(I) == T:
-            print >> sys.stderr, t, "doesn't provide the right name."
-            wrongName = True
+    if t not in exclude:
+        T = itk.__dict__[t]
+        # first case - that's a templated class
+        if isinstance(T, itk.Vector.__class__) and len(T) > 0:
+            # use only the first specialization - all of them return the same
+            # name
+            i = T.values()[0]
+            # GetNameOfClass() is a virtual method of the LightObject class,
+            # so we must instantiate an object with the New() method
+            if 'New' in dir(i):
+                I = i.New()
+                # be sure that the type of the instantiated object is the same
+                # than the one of the class. It can be different if the class
+                # is an "abstract" one and don't provide any New() method.
+                # In that case, the one of the superclass is used.
+                if 'GetNameOfClass' in dir(I):
+                    # print("Checking", t)
+                    n = I.GetNameOfClass()
+                    if n != t and itk.class_(I) == i:
+                        msg = "doesn't provide the right name."
+                        print(t, msg, file=sys.stderr)
+                        wrongName = True
+        else:
+            if 'New' in dir(T):
+                I = T.New()
+                if 'GetNameOfClass' in dir(I):
+                    # print("Checking", t)
+                    n = I.GetNameOfClass()
+                    if n != t and itk.class_(I) == T:
+                        msg = "doesn't provide the right name."
+                        print(t, msg, file=sys.stderr)
+                        wrongName = True
 
 
 if wrongName:
-  print >> sys.stderr, "Some classes are not providing the correct name."
-  sys.exit(1)
+    print("Some classes are not providing the correct name.", file=sys.stderr)
+    sys.exit(1)
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/module2module.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/module2module.py
index d577fcf..d1ef6d5 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/module2module.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/module2module.py
@@ -16,12 +16,10 @@
 #
 #==========================================================================*/
 
-# def custom_callback(name):
-#   print "loading %s submodule..." % name
-# import itkConfig
-# itkConfig.ImportCallback = custom_callback
+from __future__ import print_function
 
-import itk, sys
+import itk
+import sys
 
 import ITKCommon
 import ITKBinaryMathematicalMorphology
@@ -29,112 +27,109 @@ import ITKImageStatistics
 import ITKSmoothing
 import ITKDistanceMap
 import ITKImageIntensity
-import ITKIOImageBase
 import ITKThresholding
 import ITKImageGrid
 
-PType = itk.UC
-dim = 2
-IType = itk.Image[PType, dim]
+inputImage = sys.argv[1]
+radiusValue = int(sys.argv[2])
 
-kernel = itk.strel(2, 1)
+PixelType = itk.UC
+Dimension = 2
+ImageType = itk.Image[PixelType, Dimension]
+
+StructuringElementType = itk.FlatStructuringElement[Dimension]
+radius = (radiusValue, radiusValue)
+structuringElement = StructuringElementType.Ball(radius)
 
 # create the reader
-reader = itk.ImageFileReader[IType].New(FileName=sys.argv[1])
+reader = itk.ImageFileReader[ImageType].New(FileName=inputImage)
 
 sources = []
-image = ITKCommon.Image[PType, dim].New()
-r = itk.ImageRegion._2()
-r.SetSize((10, 10))
-image.SetRegions(r)
+image = ITKCommon.Image[PixelType, Dimension].New()
+region = itk.ImageRegion._2()
+region.SetSize((10, 10))
+image.SetRegions(region)
 image.Allocate()
 
 sources.append(("ITKCommon", image))
 
 sources.append(("ITKIOImageBase", reader.GetOutput()))
 
-otsu = ITKThresholding.OtsuThresholdImageFilter[IType, IType].New(reader)
+OtsuType = ITKThresholding.OtsuThresholdImageFilter[ImageType, ImageType]
+otsu = OtsuType.New(reader)
 sources.append(("ITKThresholding", otsu.GetOutput()))
 
-flip = ITKImageGrid.FlipImageFilter[IType].New(reader)
+flip = ITKImageGrid.FlipImageFilter[ImageType].New(reader)
 sources.append(("ITKImageGrid", flip.GetOutput()))
 
-abs = ITKImageIntensity.AbsImageFilter[IType, IType].New(reader)
-sources.append(("ITKImageIntensity", abs.GetOutput()))
+absFilter = ITKImageIntensity.AbsImageFilter[ImageType, ImageType].New(reader)
+sources.append(("ITKImageIntensity", absFilter.GetOutput()))
+absFilter.InPlaceOff()
+
+BinaryDilateType = ITKBinaryMathematicalMorphology.BinaryDilateImageFilter[
+    ImageType, ImageType, StructuringElementType]
+binaryDilateFilter = BinaryDilateType.New()
+binaryDilateFilter.SetInput(reader.GetOutput())
+binaryDilateFilter.SetKernel(structuringElement)
 
-bdilate = ITKBinaryMathematicalMorphology.BinaryDilateImageFilter[IType, IType, kernel].New(reader, Kernel=kernel)
-sources.append(("ITKBinaryMathematicalMorphology", bdilate.GetOutput()))
+output = binaryDilateFilter.GetOutput()
+sources.append(("ITKBinaryMathematicalMorphology", output))
 
-minmax = ITKImageStatistics.MinimumMaximumImageFilter[IType].New(reader)
+minmax = ITKImageStatistics.MinimumMaximumImageFilter[ImageType].New(reader)
 sources.append(("ITKImageStatistics", minmax.GetOutput()))
 
-median = ITKSmoothing.MedianImageFilter[IType, IType].New(reader)
+median = ITKSmoothing.MedianImageFilter[ImageType, ImageType].New(reader)
 sources.append(("ITKSmoothing", median.GetOutput()))
 
-distance = ITKDistanceMap.DanielssonDistanceMapImageFilter[IType, IType].New(reader)
+distance = ITKDistanceMap.DanielssonDistanceMapImageFilter[
+    ImageType, ImageType].New(reader)
 sources.append(("ITKDistanceMap", distance.GetOutput()))
 
-# sobel = EdgesAndContours.SobelEdgeDetectionImageFilter[IType, IType].New(reader)
-# sources.append(("EdgesAndContours", sobel.GetOutput()))
-
-# laplacian = Filtering.LaplacianImageFilter[IType, IType].New(reader)
-# sources.append(("Filtering", laplacian.GetOutput()))
-
-
-
-
-
-
 
 dests = []
 
-dotsu = ITKThresholding.OtsuThresholdImageFilter[IType, IType].New(reader)
+dotsu = OtsuType.New()
 dests.append(("ITKThresholding", dotsu))
 
-dflip = ITKImageGrid.FlipImageFilter[IType].New()
+dflip = ITKImageGrid.FlipImageFilter[ImageType].New()
 dests.append(("ITKImageGrid", dflip))
 
-dabs = ITKImageIntensity.AbsImageFilter[IType, IType].New()
+dabs = ITKImageIntensity.AbsImageFilter[ImageType, ImageType].New()
 dests.append(("ITKImageIntensity", dabs))
 
-dbdilate = ITKBinaryMathematicalMorphology.BinaryDilateImageFilter[IType, IType, kernel].New(Kernel=kernel)
-dests.append(("ITKBinaryMathematicalMorphology", dbdilate))
+dbinaryDilateFilter = BinaryDilateType.New()
+dbinaryDilateFilter.SetKernel(structuringElement)
+dests.append(("ITKBinaryMathematicalMorphology", dbinaryDilateFilter))
 
-dminmax = ITKImageStatistics.MinimumMaximumImageFilter[IType].New()
+dminmax = ITKImageStatistics.MinimumMaximumImageFilter[ImageType].New()
 dests.append(("ITKImageStatistics", dminmax))
 
-dmedian = ITKSmoothing.MedianImageFilter[IType, IType].New()
+dmedian = ITKSmoothing.MedianImageFilter[ImageType, ImageType].New()
 dests.append(("ITKSmoothing", dmedian))
 
-ddistance = ITKDistanceMap.DanielssonDistanceMapImageFilter[IType, IType].New()
+DistanceMapType = ITKDistanceMap.DanielssonDistanceMapImageFilter[ImageType,
+                                                                  ImageType]
+ddistance = DistanceMapType.New()
 dests.append(("ITKDistanceMap", ddistance))
 
-# dsobel = EdgesAndContours.SobelEdgeDetectionImageFilter[IType, IType].New()
-# dests.append(("EdgesAndContours", dsobel))
-
-# dlaplacian = Filtering.LaplacianImageFilter[IType, IType].New()
-# dests.append(("Filtering", dlaplacian))
-
-writer = ITKIOImageBase.ImageFileWriter[IType].New(FileName='out.png')
-dests.append(("ITKIOImageBase", writer))
-
 
 nb = 0
 failList = []
-for sname, s in sources:
-  for dname, d in dests:
-    nb += 1
-    d.SetInput( s )
-    try:
-      d.Update()
-      print "%s -> %s pass" % (sname, dname)
-    except RuntimeError, e:
-      print "%s -> %s fail" % (sname, dname)
-      failList.append((sname, dname))
-
-
-print
-print "%i tests succeed" % (nb - len(failList))
-print "%i tests failed" % len(failList)
+for sourceName, source in sources:
+    for destinationName, destination in dests:
+        nb += 1
+        destination.SetInput(source)
+        try:
+            destination.UpdateLargestPossibleRegion()
+            print("%s -> %s pass" % (sourceName, destinationName))
+        except RuntimeError as e:
+            print("%s -> %s fail" % (sourceName, destinationName))
+            print(e)
+            failList.append((sourceName, destinationName))
+
+
+print()
+print("%i tests succeed" % (nb - len(failList)))
+print("%i tests failed" % len(failList))
 
 sys.exit(len(failList))
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/DicomSliceRead.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/DicomSliceRead.py
index e5901fe..48a8d35 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/DicomSliceRead.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/DicomSliceRead.py
@@ -34,17 +34,17 @@ writer = itkImageFileWriterUC2_New()
 
 dicomIO = itkDicomImageIO_New()
 
-reader.SetImageIO( dicomIO.GetPointer() )
+reader.SetImageIO(dicomIO.GetPointer())
 
-filter  = itkRescaleIntensityImageFilterUS2UC2_New()
+filter = itkRescaleIntensityImageFilterUS2UC2_New()
 
-filter.SetOutputMinimum( 0 )
+filter.SetOutputMinimum(0)
 filter.SetOutputMaximum(255)
 
-filter.SetInput( reader.GetOutput() )
-writer.SetInput( filter.GetOutput() )
+filter.SetInput(reader.GetOutput())
+writer.SetInput(filter.GetOutput())
 
-reader.SetFileName( argv[1] )
-writer.SetFileName( argv[2] )
+reader.SetFileName(argv[1])
+writer.SetFileName(argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration3.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration3.py
index aa780d8..98c5284 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration3.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration3.py
@@ -21,71 +21,69 @@ from InsightToolkit import *
 from sys import argv
 
 
-
 #
 #  Read the fixed and moving images using filenames
 #  from the command line arguments
 #
-fixedImageReader  = itkImageFileReaderF2_New()
+fixedImageReader = itkImageFileReaderF2_New()
 movingImageReader = itkImageFileReaderF2_New()
 
-fixedImageReader.SetFileName(  argv[1] )
-movingImageReader.SetFileName( argv[2] )
+fixedImageReader.SetFileName(argv[1])
+movingImageReader.SetFileName(argv[2])
 
 fixedImageReader.Update()
 movingImageReader.Update()
 
-fixedImage  = fixedImageReader.GetOutput()
+fixedImage = fixedImageReader.GetOutput()
 movingImage = movingImageReader.GetOutput()
 
 
-
-
 #
 #  Instantiate the classes for the registration framework
 #
 registration = itkImageRegistrationMethodF2F2_New()
-imageMetric  = itkMeanSquaresImageToImageMetricF2F2_New()
-transform    = itkTranslationTransform2_New()
-optimizer    = itkRegularStepGradientDescentOptimizer_New()
+imageMetric = itkMeanSquaresImageToImageMetricF2F2_New()
+transform = itkTranslationTransform2_New()
+optimizer = itkRegularStepGradientDescentOptimizer_New()
 interpolator = itkLinearInterpolateImageFunctionF2D_New()
 
 
-registration.SetOptimizer(    optimizer.GetPointer()    )
-registration.SetTransform(    transform.GetPointer()    )
-registration.SetInterpolator( interpolator.GetPointer() )
-registration.SetMetric(       imageMetric.GetPointer()  )
-registration.SetFixedImage(  fixedImage  )
-registration.SetMovingImage( movingImage )
+registration.SetOptimizer(optimizer.GetPointer())
+registration.SetTransform(transform.GetPointer())
+registration.SetInterpolator(interpolator.GetPointer())
+registration.SetMetric(imageMetric.GetPointer())
+registration.SetFixedImage(fixedImage)
+registration.SetMovingImage(movingImage)
 
-registration.SetFixedImageRegion( fixedImage.GetBufferedRegion() )
+registration.SetFixedImageRegion(fixedImage.GetBufferedRegion())
 
 transform.SetIdentity()
 initialParameters = transform.GetParameters()
 
-registration.SetInitialTransformParameters( initialParameters )
+registration.SetInitialTransformParameters(initialParameters)
 
 #
 # Iteration Observer
 #
+
+
 def iterationUpdate():
     currentParameter = transform.GetParameters()
-    print "M: %f   P: %f %f " % ( optimizer.GetValue(),
-                        currentParameter.GetElement(0),
-                        currentParameter.GetElement(1) )
+    print "M: %f   P: %f %f " % (optimizer.GetValue(),
+                                 currentParameter.GetElement(0),
+                                 currentParameter.GetElement(1))
 
 iterationCommand = itkPyCommand_New()
-iterationCommand.SetCommandCallable( iterationUpdate )
-optimizer.AddObserver( itkIterationEvent(), iterationCommand.GetPointer() )
-
+iterationCommand.SetCommandCallable(iterationUpdate)
+optimizer.AddObserver(itkIterationEvent(), iterationCommand.GetPointer())
 
 
 #
 #  Define optimizer parameters
 #
-optimizer.SetMaximumStepLength(  4.00 )
-optimizer.SetMinimumStepLength(  0.01 )
-optimizer.SetNumberOfIterations( 200  )
+optimizer.SetMaximumStepLength(4.00)
+optimizer.SetMinimumStepLength(0.01)
+optimizer.SetNumberOfIterations(200)
 
 
 print "Starting registration"
@@ -107,27 +105,25 @@ print "Translation X =  %f" % (finalParameters.GetElement(0),)
 print "Translation Y =  %f" % (finalParameters.GetElement(1),)
 
 
-
-
 #
 # Now, we use the final transform for resampling the
 # moving image.
 #
 resampler = itkResampleImageFilterF2F2_New()
-resampler.SetTransform( transform.GetPointer()    )
-resampler.SetInput(     movingImage  )
+resampler.SetTransform(transform.GetPointer())
+resampler.SetInput(movingImage)
 
 region = fixedImage.GetLargestPossibleRegion()
 
-resampler.SetSize( region.GetSize() )
+resampler.SetSize(region.GetSize())
 
-resampler.SetOutputSpacing( fixedImage.GetSpacing() )
-resampler.SetOutputOrigin(  fixedImage.GetOrigin()  )
-resampler.SetDefaultPixelValue( 100 )
+resampler.SetOutputSpacing(fixedImage.GetSpacing())
+resampler.SetOutputOrigin(fixedImage.GetOrigin())
+resampler.SetDefaultPixelValue(100)
 
 outputCast = itkRescaleIntensityImageFilterF2US2_New()
-outputCast.SetOutputMinimum(      0  )
-outputCast.SetOutputMaximum(  65535  )
+outputCast.SetOutputMinimum(0)
+outputCast.SetOutputMaximum(65535)
 outputCast.SetInput(resampler.GetOutput())
 
 #
@@ -135,6 +131,6 @@ outputCast.SetInput(resampler.GetOutput())
 #
 writer = itkImageFileWriterUS2_New()
 
-writer.SetFileName( argv[3] )
-writer.SetInput( outputCast.GetOutput() )
+writer.SetFileName(argv[3])
+writer.SetInput(outputCast.GetOutput())
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration4.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration4.py
index fcc5a8a..eabcab7 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration4.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration4.py
@@ -21,74 +21,72 @@ from InsightToolkit import *
 from sys import argv
 
 
-
 #
 #  Read the fixed and moving images using filenames
 #  from the command line arguments
 #
-fixedImageReader  = itkImageFileReaderF2_New()
+fixedImageReader = itkImageFileReaderF2_New()
 movingImageReader = itkImageFileReaderF2_New()
 
-fixedImageReader.SetFileName(  argv[1] )
-movingImageReader.SetFileName( argv[2] )
+fixedImageReader.SetFileName(argv[1])
+movingImageReader.SetFileName(argv[2])
 
 fixedImageReader.Update()
 movingImageReader.Update()
 
-fixedImage  = fixedImageReader.GetOutput()
+fixedImage = fixedImageReader.GetOutput()
 movingImage = movingImageReader.GetOutput()
 
 
-
-
 #
 #  Instantiate the classes for the registration framework
 #
 registration = itkImageRegistrationMethodF2F2_New()
-imageMetric  = itkMattesMutualInformationImageToImageMetricF2F2_New()
-transform    = itkTranslationTransform2_New()
-optimizer    = itkRegularStepGradientDescentOptimizer_New()
+imageMetric = itkMattesMutualInformationImageToImageMetricF2F2_New()
+transform = itkTranslationTransform2_New()
+optimizer = itkRegularStepGradientDescentOptimizer_New()
 interpolator = itkLinearInterpolateImageFunctionF2D_New()
 
 
-imageMetric.SetNumberOfHistogramBins( 20 );
-imageMetric.SetNumberOfSpatialSamples( 10000 );
+imageMetric.SetNumberOfHistogramBins(20)
+imageMetric.SetNumberOfSpatialSamples(10000)
 
-registration.SetOptimizer(    optimizer.GetPointer()    )
-registration.SetTransform(    transform.GetPointer()    )
-registration.SetInterpolator( interpolator.GetPointer() )
-registration.SetMetric(       imageMetric.GetPointer()  )
-registration.SetFixedImage(  fixedImage  )
-registration.SetMovingImage( movingImage )
+registration.SetOptimizer(optimizer.GetPointer())
+registration.SetTransform(transform.GetPointer())
+registration.SetInterpolator(interpolator.GetPointer())
+registration.SetMetric(imageMetric.GetPointer())
+registration.SetFixedImage(fixedImage)
+registration.SetMovingImage(movingImage)
 
-registration.SetFixedImageRegion( fixedImage.GetBufferedRegion() )
+registration.SetFixedImageRegion(fixedImage.GetBufferedRegion())
 
 transform.SetIdentity()
 initialParameters = transform.GetParameters()
 
-registration.SetInitialTransformParameters( initialParameters )
+registration.SetInitialTransformParameters(initialParameters)
 
 #
 # Iteration Observer
 #
+
+
 def iterationUpdate():
     currentParameter = transform.GetParameters()
-    print "M: %f   P: %f %f " % ( optimizer.GetValue(),
-                        currentParameter.GetElement(0),
-                        currentParameter.GetElement(1) )
+    print "M: %f   P: %f %f " % (optimizer.GetValue(),
+                                 currentParameter.GetElement(0),
+                                 currentParameter.GetElement(1))
 
 iterationCommand = itkPyCommand_New()
-iterationCommand.SetCommandCallable( iterationUpdate )
-optimizer.AddObserver( itkIterationEvent(), iterationCommand.GetPointer() )
-
+iterationCommand.SetCommandCallable(iterationUpdate)
+optimizer.AddObserver(itkIterationEvent(), iterationCommand.GetPointer())
 
 
 #
 #  Define optimizer parameters
 #
-optimizer.SetMaximumStepLength(  4.00 )
-optimizer.SetMinimumStepLength(  0.01 )
-optimizer.SetNumberOfIterations( 200  )
+optimizer.SetMaximumStepLength(4.00)
+optimizer.SetMinimumStepLength(0.01)
+optimizer.SetNumberOfIterations(200)
 
 
 print "Starting registration"
@@ -110,27 +108,25 @@ print "Translation X =  %f" % (finalParameters.GetElement(0),)
 print "Translation Y =  %f" % (finalParameters.GetElement(1),)
 
 
-
-
 #
 # Now, we use the final transform for resampling the
 # moving image.
 #
 resampler = itkResampleImageFilterF2F2_New()
-resampler.SetTransform( transform.GetPointer()    )
-resampler.SetInput(     movingImage  )
+resampler.SetTransform(transform.GetPointer())
+resampler.SetInput(movingImage)
 
 region = fixedImage.GetLargestPossibleRegion()
 
-resampler.SetSize( region.GetSize() )
+resampler.SetSize(region.GetSize())
 
-resampler.SetOutputSpacing( fixedImage.GetSpacing() )
-resampler.SetOutputOrigin(  fixedImage.GetOrigin()  )
-resampler.SetDefaultPixelValue( 100 )
+resampler.SetOutputSpacing(fixedImage.GetSpacing())
+resampler.SetOutputOrigin(fixedImage.GetOrigin())
+resampler.SetDefaultPixelValue(100)
 
 outputCast = itkRescaleIntensityImageFilterF2US2_New()
-outputCast.SetOutputMinimum(      0  )
-outputCast.SetOutputMaximum(  65535  )
+outputCast.SetOutputMinimum(0)
+outputCast.SetOutputMaximum(65535)
 outputCast.SetInput(resampler.GetOutput())
 
 #
@@ -138,6 +134,6 @@ outputCast.SetInput(resampler.GetOutput())
 #
 writer = itkImageFileWriterUS2_New()
 
-writer.SetFileName( argv[3] )
-writer.SetInput( outputCast.GetOutput() )
+writer.SetFileName(argv[3])
+writer.SetInput(outputCast.GetOutput())
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration5.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration5.py
index 6a3e4dd..a90c5ae 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration5.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageRegistration5.py
@@ -29,8 +29,8 @@ from sys import argv
 fixedImageReader = itkImageFileReaderF2_New()
 movingImageReader = itkImageFileReaderF2_New()
 
-fixedImageReader.SetFileName(  argv[1] )
-movingImageReader.SetFileName( argv[2] )
+fixedImageReader.SetFileName(argv[1])
+movingImageReader.SetFileName(argv[2])
 
 fixedImageReader.Update()
 movingImageReader.Update()
@@ -41,60 +41,68 @@ movingImage = movingImageReader.GetOutput()
 #
 #  Instantiate the classes for the registration framework
 #
-registration    = itkImageRegistrationMethodF2F2_New()
-imageMetric     = itkMeanSquaresImageToImageMetricF2F2_New()
-transform       = itkCenteredRigid2DTransform_New()
-optimizer       = itkRegularStepGradientDescentOptimizer_New()
-interpolator    = itkLinearInterpolateImageFunctionF2D_New()
+registration = itkImageRegistrationMethodF2F2_New()
+imageMetric = itkMeanSquaresImageToImageMetricF2F2_New()
+transform = itkCenteredRigid2DTransform_New()
+optimizer = itkRegularStepGradientDescentOptimizer_New()
+interpolator = itkLinearInterpolateImageFunctionF2D_New()
 
-registration.SetOptimizer(      optimizer.GetPointer() )
-registration.SetTransform(      transform.GetPointer() )
-registration.SetInterpolator(   interpolator.GetPointer() )
-registration.SetMetric(         imageMetric.GetPointer() )
-registration.SetFixedImage(  fixedImage )
-registration.SetMovingImage( movingImage )
-registration.SetFixedImageRegion(  fixedImage.GetBufferedRegion() )
+registration.SetOptimizer(optimizer.GetPointer())
+registration.SetTransform(transform.GetPointer())
+registration.SetInterpolator(interpolator.GetPointer())
+registration.SetMetric(imageMetric.GetPointer())
+registration.SetFixedImage(fixedImage)
+registration.SetMovingImage(movingImage)
+registration.SetFixedImageRegion(fixedImage.GetBufferedRegion())
 
 
 #
 # Initial transform parameters
 #
-transform.SetAngle( 0.0 );
+transform.SetAngle(0.0)
 
 # center of the fixed image
 fixedSpacing = fixedImage.GetSpacing()
 fixedOrigin = fixedImage.GetOrigin()
 fixedSize = fixedImage.GetLargestPossibleRegion().GetSize()
 
-centerFixed = ( fixedOrigin.GetElement(0) + fixedSpacing.GetElement(0) * fixedSize.GetElement(0) / 2.0,
-                fixedOrigin.GetElement(1) + fixedSpacing.GetElement(1) * fixedSize.GetElement(1) / 2.0 )
+centerFixed = (
+    fixedOrigin.GetElement(0) + fixedSpacing.GetElement(0) *
+    fixedSize.GetElement(0) / 2.0,
+    fixedOrigin.GetElement(1) + fixedSpacing.GetElement(1) *
+    fixedSize.GetElement(1) / 2.0)
 
 # center of the moving image
 movingSpacing = movingImage.GetSpacing()
 movingOrigin = movingImage.GetOrigin()
 movingSize = movingImage.GetLargestPossibleRegion().GetSize()
 
-centerMoving = ( movingOrigin.GetElement(0) + movingSpacing.GetElement(0) * movingSize.GetElement(0) / 2.0,
-                 movingOrigin.GetElement(1) + movingSpacing.GetElement(1) * movingSize.GetElement(1) / 2.0  )
+centerMoving = (
+    movingOrigin.GetElement(0) + movingSpacing.GetElement(0) *
+    movingSize.GetElement(0) / 2.0,
+    movingOrigin.GetElement(1) + movingSpacing.GetElement(1) *
+    movingSize.GetElement(1) / 2.0)
 
 # transform center
 center = transform.GetCenter()
-center.SetElement( 0, centerFixed[0] )
-center.SetElement( 1, centerFixed[1] )
+center.SetElement(0, centerFixed[0])
+center.SetElement(1, centerFixed[1])
 
 # transform translation
 translation = transform.GetTranslation()
-translation.SetElement( 0, centerMoving[0] - centerFixed[0] )
-translation.SetElement( 1, centerMoving[1] - centerFixed[1] )
+translation.SetElement(0, centerMoving[0] - centerFixed[0])
+translation.SetElement(1, centerMoving[1] - centerFixed[1])
 
 initialParameters = transform.GetParameters()
 
 print "Initial Parameters: "
 print "Angle: %f" % (initialParameters.GetElement(0), )
-print "Center: %f, %f" % ( initialParameters.GetElement(1), initialParameters.GetElement(2) )
-print "Translation: %f, %f" % (initialParameters.GetElement(3), initialParameters.GetElement(4))
+print "Center: %f, %f" % (initialParameters.GetElement(1),
+                          initialParameters.GetElement(2))
+print "Translation: %f, %f" % (initialParameters.GetElement(3),
+                               initialParameters.GetElement(4))
 
-registration.SetInitialTransformParameters( initialParameters )
+registration.SetInitialTransformParameters(initialParameters)
 
 #
 # Define optimizer parameters
@@ -103,33 +111,35 @@ registration.SetInitialTransformParameters( initialParameters )
 # optimizer scale
 translationScale = 1.0 / 1000.0
 
-optimizerScales = itkArrayD( transform.GetNumberOfParameters() )
+optimizerScales = itkArrayD(transform.GetNumberOfParameters())
 optimizerScales.SetElement(0, 1.0)
 optimizerScales.SetElement(1, translationScale)
 optimizerScales.SetElement(2, translationScale)
 optimizerScales.SetElement(3, translationScale)
 optimizerScales.SetElement(4, translationScale)
 
-optimizer.SetScales( optimizerScales )
-optimizer.SetMaximumStepLength( 0.1 )
-optimizer.SetMinimumStepLength( 0.001 )
-optimizer.SetNumberOfIterations( 200 )
+optimizer.SetScales(optimizerScales)
+optimizer.SetMaximumStepLength(0.1)
+optimizer.SetMinimumStepLength(0.001)
+optimizer.SetNumberOfIterations(200)
 
 #
 # Iteration Observer
 #
+
+
 def iterationUpdate():
     currentParameter = transform.GetParameters()
-    print "M: %f   P: %f %f %f %f %f " % ( optimizer.GetValue(),
-                                 currentParameter.GetElement(0),
-                                 currentParameter.GetElement(1),
-                                 currentParameter.GetElement(2),
-                                 currentParameter.GetElement(3),
-                                 currentParameter.GetElement(4) )
+    print "M: %f   P: %f %f %f %f %f " % (optimizer.GetValue(),
+                                          currentParameter.GetElement(0),
+                                          currentParameter.GetElement(1),
+                                          currentParameter.GetElement(2),
+                                          currentParameter.GetElement(3),
+                                          currentParameter.GetElement(4))
 
 iterationCommand = itkPyCommand_New()
-iterationCommand.SetCommandCallable( iterationUpdate )
-optimizer.AddObserver( itkIterationEvent(), iterationCommand.GetPointer() )
+iterationCommand.SetCommandCallable(iterationUpdate)
+optimizer.AddObserver(itkIterationEvent(), iterationCommand.GetPointer())
 
 print "Starting registration"
 
@@ -154,26 +164,26 @@ print "Translation in  Y = %f" % finalParameters.GetElement(4)
 # Now, we use the final transform for resampling the moving image.
 resampler = itkResampleImageFilterF2F2_New()
 
-resampler.SetTransform( transform.GetPointer() )
-resampler.SetInput( movingImage )
+resampler.SetTransform(transform.GetPointer())
+resampler.SetInput(movingImage)
 
 region = fixedImage.GetLargestPossibleRegion()
 
-resampler.SetSize( region.GetSize() )
-resampler.SetOutputSpacing( fixedImage.GetSpacing() )
-resampler.SetOutputOrigin(  fixedImage.GetOrigin() )
-resampler.SetDefaultPixelValue( 100 )
+resampler.SetSize(region.GetSize())
+resampler.SetOutputSpacing(fixedImage.GetSpacing())
+resampler.SetOutputOrigin(fixedImage.GetOrigin())
+resampler.SetDefaultPixelValue(100)
 
 #
 # Cast for output
 #
 outputCast = itkRescaleIntensityImageFilterF2US2_New()
-outputCast.SetInput( resampler.GetOutput() )
-outputCast.SetOutputMinimum( 0 )
-outputCast.SetOutputMaximum( 65535 )
+outputCast.SetInput(resampler.GetOutput())
+outputCast.SetOutputMinimum(0)
+outputCast.SetOutputMaximum(65535)
 
 writer = itkImageFileWriterUS2_New()
 
-writer.SetFileName( argv[3] )
-writer.SetInput( outputCast.GetOutput() )
+writer.SetFileName(argv[3])
+writer.SetInput(outputCast.GetOutput())
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageToArray.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageToArray.py
index 5bbbb43..66ef5aa 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageToArray.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/ImageToArray.py
@@ -24,20 +24,20 @@ reader = itkImageFileReaderUC2_New()
 
 connector = itkPyBufferUC2_New()
 
-reader.SetFileName( argv[1] )
+reader.SetFileName(argv[1])
 
 reader.Update()
 
 print "ready to convert image into array"
 
-buffer = connector.GetArrayFromImage( reader.GetOutput() )
+buffer = connector.GetArrayFromImage(reader.GetOutput())
 
 writer = itkImageFileWriterUC2_New()
 
-writer.SetFileName( argv[2] )
+writer.SetFileName(argv[2])
 
 print "ready to convert array into image"
 
-writer.SetInput( connector.GetImageFromArray( buffer ) )
+writer.SetInput(connector.GetImageFromArray(buffer))
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/VoronoiSegmentation.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/VoronoiSegmentation.py
index f5b3cd7..4b8f655 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/VoronoiSegmentation.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/VoronoiSegmentation.py
@@ -28,22 +28,22 @@ from sys import argv
 readerInput = itkImageFileReaderUC2_New()
 readerPrior = itkImageFileReaderUC2_New()
 
-readerInput.SetFileName( argv[1] )
-readerPrior.SetFileName( argv[2] )
+readerInput.SetFileName(argv[1])
+readerPrior.SetFileName(argv[2])
 
 readerInput.Update()
 readerPrior.Update()
 
-filter  = itkVoronoiSegmentationImageFilterUC2UC2UC2_New()
+filter = itkVoronoiSegmentationImageFilterUC2UC2UC2_New()
 
-filter.SetInput(   readerInput.GetOutput() )
-filter.TakeAPrior( readerPrior.GetOutput() )
+filter.SetInput(readerInput.GetOutput())
+filter.TakeAPrior(readerPrior.GetOutput())
 
-filter.SetMeanPercentError( eval( argv[4] )  )
-filter.SetSTDPercentError( eval( argv[5] )  )
+filter.SetMeanPercentError(eval(argv[4]))
+filter.SetSTDPercentError(eval(argv[5]))
 
 writer = itkImageFileWriterUC2_New()
-writer.SetFileName( argv[3] )
-writer.SetInput( filter.GetOutput() )
+writer.SetFileName(argv[3])
+writer.SetInput(filter.GetOutput())
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/itkCurvatureFlowTestPython2.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/itkCurvatureFlowTestPython2.py
index 71904b2..453e2ec 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/itkCurvatureFlowTestPython2.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/notYetUsable/itkCurvatureFlowTestPython2.py
@@ -17,95 +17,112 @@
 #==========================================================================*/
 
 from InsightToolkit import *
-import itktesting
+import itkTesting
 
 import sys
 import os
 import shutil
 
-basename = os.path.basename( sys.argv[0] )
-name = os.path.splitext( basename )[0]
-dir  = "Algorithms"
+basename = os.path.basename(sys.argv[0])
+name = os.path.splitext(basename)[0]
+dir = "Algorithms"
 
 
-testInput  = itktesting.ITK_TEST_INPUT
-testOutput = itktesting.ITK_TEST_OUTPUT
-baseLine   = itktesting.ITK_TEST_BASELINE
+testInput = itkTesting.ITK_TEST_INPUT
+testOutput = itkTesting.ITK_TEST_OUTPUT
+baseLine = itkTesting.ITK_TEST_BASELINE
 
 
 reader = itkImageFileReaderF2_New()
-reader.SetFileName( testInput+"/cthead1.png")
+reader.SetFileName(testInput + "/cthead1.png")
 
 
-cf     = itkCurvatureFlowImageFilterF2F2_New()
-cf.SetInput( reader.GetOutput() )
-cf.SetTimeStep( 0.25 )
-cf.SetNumberOfIterations( 10 )
+cf = itkCurvatureFlowImageFilterF2F2_New()
+cf.SetInput(reader.GetOutput())
+cf.SetTimeStep(0.25)
+cf.SetNumberOfIterations(10)
 
 
-cfss   = itkShiftScaleImageFilterF2US2_New()
-cfss.SetInput( cf.GetOutput() )
-cfss.SetShift( 0.7 )
-cfss.SetScale( 0.9 )
+cfss = itkShiftScaleImageFilterF2US2_New()
+cfss.SetInput(cf.GetOutput())
+cfss.SetShift(0.7)
+cfss.SetScale(0.9)
 
 
-valid  = itkImageFileReaderUS2_New()
-valid.SetFileName( baseLine+"/"+dir+"/"+name+".png")
+valid = itkImageFileReaderUS2_New()
+valid.SetFileName(baseLine + "/" + dir + "/" + name + ".png")
 
 
-diff =  itkDifferenceImageFilterUS2_New()
-diff.SetValidInput(  valid.GetOutput() )
-diff.SetTestInput(  cfss.GetOutput() )
-diff.SetToleranceRadius( 1 )
-diff.SetDifferenceThreshold( 0 )
+diff = itkDifferenceImageFilterUS2_New()
+diff.SetValidInput(valid.GetOutput())
+diff.SetTestInput(cfss.GetOutput())
+diff.SetToleranceRadius(1)
+diff.SetDifferenceThreshold(0)
 
 diff.Update()
 
 
-meanDiff  = diff.GetMeanDifference()
+meanDiff = diff.GetMeanDifference()
 totalDiff = diff.GetTotalDifference()
 
 
-print "MeanDifference  = ", meanDiff
-print "TotalDifference = ", totalDiff
-
-
-print "<DartMeasurement name=\"MeanDifference\" type=\"numeric/double\">",meanDiff,"</DartMeasurement>"
-print "<DartMeasurement name=\"TotalDifference\" type=\"numeric/double\">",totalDiff,"</DartMeasurement>"
-
-if ( meanDiff > 0.1 ) :
-  convert = itkCastImageFilterUS2UC2_New()
-  rescale = itkRescaleIntensityImageFilterUS2UC2_New()
-  rescale.SetInput( diff.GetOutput() )
-  rescale.SetOutputMinimum( 0 )
-  rescale.SetOutputMaximum( 255 )
-
-  io = itkPNGImageIO_New()
-  io.SetUseCompression( 1 )
-  io.SetCompressionLevel( 9 )
-
-  writer = itkImageFileWriterUC2_New()
-  writer.SetImageIO( io.GetPointer() )
-  writer.SetInput(  convert.GetOutput() )
-
-  writer.SetFileName( testOutput+"/"+name+".test.png" )
-  convert.SetInput( cfss.GetOutput() )
-  writer.Write()
-
-  writer.SetFileName( testOutput+"/"+name+".diff.png" )
-  writer.SetInput( rescale.GetOutput() )
-  writer.Write()
-
-  shutil.copyfile( baseLine+"/"+dir+"/"+name+".png", testOutput+"/"+name+".valid.png" )
-
-  print "<DartMeasurementFile name=\"TestImage\" type=\"image/png\">"+testOutput+"/"+name+".test.png</DartMeasurementFile>"
-  print "<DartMeasurementFile name=\"DifferenceImage\" type=\"image/png\">"+testOutput+"/"+name+".diff.png</DartMeasurementFile>"
-  print "<DartMeasurementFile name=\"ValidImage\" type=\"image/png\">"+testOutput+"/"+name+".valid.png</DartMeasurementFile>"
-  print "<DartMeasurement name=\"DifferenceShift\" type=\"numeric/double\">",rescale.GetShift(),"</DartMeasurement>"
-  print "<DartMeasurement name=\"DifferenceScale\" type=\"numeric/double\">",rescale.GetScale(),"</DartMeasurement>"
+print("MeanDifference  = ", meanDiff)
+print("TotalDifference = ", totalDiff)
+
+
+print ("<DartMeasurement name=\"MeanDifference\" type=\"numeric/double\">",
+       meanDiff, "</DartMeasurement>")
+print ("<DartMeasurement name=\"TotalDifference\" type=\"numeric/double\">",
+       totalDiff, "</DartMeasurement>")
+
+if (meanDiff > 0.1):
+    convert = itkCastImageFilterUS2UC2_New()
+    rescale = itkRescaleIntensityImageFilterUS2UC2_New()
+    rescale.SetInput(diff.GetOutput())
+    rescale.SetOutputMinimum(0)
+    rescale.SetOutputMaximum(255)
+
+    io = itkPNGImageIO_New()
+    io.SetUseCompression(1)
+    io.SetCompressionLevel(9)
+
+    writer = itkImageFileWriterUC2_New()
+    writer.SetImageIO(io.GetPointer())
+    writer.SetInput(convert.GetOutput())
+
+    writer.SetFileName(testOutput + "/" + name + ".test.png")
+    convert.SetInput(cfss.GetOutput())
+    writer.Write()
+
+    writer.SetFileName(testOutput + "/" + name + ".diff.png")
+    writer.SetInput(rescale.GetOutput())
+    writer.Write()
+
+    shutil.copyfile(
+        baseLine +
+        "/" +
+        dir +
+        "/" +
+        name +
+        ".png",
+        testOutput +
+        "/" +
+        name +
+        ".valid.png")
+
+    print ("<DartMeasurementFile name=\"TestImage\" type=\"image/png\">" +
+           testOutput + "/" + name + ".test.png</DartMeasurementFile>")
+    print ("<DartMeasurementFile name=\"DifferenceImage\" type=\"image/png\">"
+           + testOutput + "/" + name + ".diff.png</DartMeasurementFile>")
+    print ("<DartMeasurementFile name=\"ValidImage\" type=\"image/png\">" +
+           testOutput + "/" + name + ".valid.png</DartMeasurementFile>")
+    pr = "<DartMeasurement name=\"DifferenceShift\" type=\"numeric/double\">"
+    print (pr, rescale.GetShift(), "</DartMeasurement>")
+    pr = "<DartMeasurement name=\"DifferenceScale\" type=\"numeric/double\">"
+    print (pr, rescale.GetScale(), "</DartMeasurement>")
 
 #  return 1
 
 
 
-#return 0
+# return 0
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/pythonTestDriver.py.in b/Utilities/ITK/Wrapping/Generators/Python/Tests/pythonTestDriver.py.in
index 408ece6..4cfb6e1 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/pythonTestDriver.py.in
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/pythonTestDriver.py.in
@@ -2,6 +2,8 @@
 
 # set environment variables
 
+from __future__ import print_function
+
 import os, subprocess, sys
 from optparse import OptionParser
 
@@ -57,7 +59,7 @@ if len(args) < 1:
 
 command = ["@PYTHON_EXECUTABLE@"] + args
 if options.verbose:
-  print >> sys.stderr, "+", " ".join(command)
+  print(sys.stderr, "+", " ".join(command))
 returnValue = subprocess.call( command )
 if returnValue != 0 :
   sys.exit( returnValue )
@@ -66,7 +68,7 @@ if returnValue != 0 :
 for imageFile1, imageFile2 in options.compare :
   command = ["@IMAGE_COMPARE@", imageFile1, imageFile2]
   if options.verbose:
-    print >> sys.stderr, "+", " ".join(command)
+    print(sys.stderr, "+", " ".join(command))
   returnValue = subprocess.call( command )
   if returnValue != 0 :
     sys.exit( returnValue )
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/returnedTypeCoverage.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/returnedTypeCoverage.py
index 8273314..6047090 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/returnedTypeCoverage.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/returnedTypeCoverage.py
@@ -16,7 +16,11 @@
 #
 #==========================================================================*/
 
-import itk, re, sys
+from __future__ import print_function
+
+import itk
+import re
+import sys
 try:
     import itkvtk
 except:
@@ -26,241 +30,264 @@ from optparse import OptionParser
 
 
 ctypes = [
-  'double',
-  'float',
-  'signed_char',
-  'signed_short',
-  'signed_long',
-  'unsigned_char',
-  'unsigned_short',
-  'unsigned_long',
-  'char',
-  'short',
-  'long',
-  'bool',
-  'int',
-  'unsigned_int',
-  'void'
+    'double',
+    'float',
+    'signed_char',
+    'signed_short',
+    'signed_long',
+    'unsigned_char',
+    'unsigned_short',
+    'unsigned_long',
+    'char',
+    'short',
+    'long',
+    'bool',
+    'int',
+    'unsigned_int',
+    'void'
 ]
 
 
 excludedMethodsList = [
-  'Delete',
-  'Unregister',
-  'SetReferenceCount',
-
-  # the method broken for all filters
-  'PushBackInput',
-  'PushFrontInput',
-  'GraftOutput',
-  'SetInput',
-  'UpdateOutputData',
-  'PropagateRequestedRegion',
-  'EnlargeOutputRequestedRegion',
-
-  # functor are not wrapped so exclude GetFunctor
-  'GetFunctor',
-
-  #'UnCreateAllInstanceRegister',
-  #'Update',
-  #'UpdateLargestPossibleRegion',
-  #'GenerateInputRequestedRegion',
-  #'GenerateOutputInformation',
-  #'GenerateData',
-  #'GetImageIO',
-  #'UpdateOutputData',
-  #'UpdateOutputInformation',
-  #'GraftOutput',
-  #'AddSeed',
-  #'GetInputs',
-  #'GetOutputs',
-  #'CreateAllInstance'
+    'Delete',
+    'Unregister',
+    'SetReferenceCount',
+
+    # the method broken for all filters
+    'PushBackInput',
+    'PushFrontInput',
+    'GraftOutput',
+    'SetInput',
+    'UpdateOutputData',
+    'PropagateRequestedRegion',
+    'EnlargeOutputRequestedRegion',
+
+    # functor are not wrapped so exclude GetFunctor
+    'GetFunctor',
+
+    #'UnCreateAllInstanceRegister',
+    #'Update',
+    #'UpdateLargestPossibleRegion',
+    #'GenerateInputRequestedRegion',
+    #'GenerateOutputInformation',
+    #'GenerateData',
+    #'GetImageIO',
+    #'UpdateOutputData',
+    #'UpdateOutputInformation',
+    #'GraftOutput',
+    #'AddSeed',
+    #'GetInputs',
+    #'GetOutputs',
+    #'CreateAllInstance'
 ]
 
 excludedMethodsWithParamList = [
-  #'GetElement',
-  #'RegisterFactory',
-  #'UnRegisterFactory',
-  #'PropagateRequestedRegion',
-  #'Resize',
-  #'PadByRadius'
+    #'GetElement',
+    #'RegisterFactory',
+    #'UnRegisterFactory',
+    #'PropagateRequestedRegion',
+    #'Resize',
+    #'PadByRadius'
 ]
 
 excludedClasses = [
-  #'BinaryBallStructuringElement',
-  #'Neighborhood',
-  #'BSplineDecompositionImageFilter',
-  #'AtanImageFilter',
-  #'Atan2ImageFilter',
-  #'ChangeInformationImageFilter',
-  #'GeodesicActiveContourLevelSetImageFilter',
-  #'Image',
-  #'ImageBase',
-  #'ImageFileReader',
-  #'ImageFileWriter',
-  #'ImageRegistrationMethod',
-  #'BSplineDownsampleImageFilter',
-  #'BSplineUpsampleImageFilter',
-  #'CropImageFilter',
-  #'LevelSetFunction',
-  #'MattesMutualInformationImageToImageMetric',
-  #'MeanReciprocalSquareDifferenceImageToImageMetric',
-  #'MeanSquaresImageToImageMetric',
-  #'MultiResolutionImageRegistrationMethod',
-  #'MultiResolutionPyramidImageFilter',
-  #'MutualInformationImageToImageMetric',
-  #'NormalizedCorrelationImageToImageMetric',
-  #'ParallelSparseFieldLevelSetImageFilter',
-  #'PyBuffer',
-  #'RawImageIO',
-  #'RecursiveMultiResolutionPyramidImageFilter',
-  #'ResampleImageFilter',
-  #'RescaleIntensityImageFilter',
-  #'SegmentationLevelSetImageFilter',
-  #'ShapeDetectionLevelSetImageFilter',
-  #'SparseFieldFourthOrderLevelSetImageFilter',
-  #'SparseFieldLevelSetImageFilter',
-  #'SpatialObject',
-  #'SpatialObjectTreeNode',
-  #'WatershedImageFilter',
-  #'TreeNode',
-  #'ThresholdSegmentationLevelSetImageFilter',
-  #'PointSet',
-  #'ImageConstIterator',
-  #'ImageConstIteratorWithIndex',
-  #'ImageIterator',
-  #'ImageIteratorWithIndex',
-  #'ImageLinearConstIteratorWithIndex',
-  #'ImageLinearIteratorWithIndex',
-  #'ImageRandomConstIteratorWithIndex',
-  #'ImageRandomIteratorWithIndex',
-  #'ImageRandomNonRepeatingConstIteratorWithIndex',
-  #'ImageRandomNonRepeatingIteratorWithIndex',
-  #'ImageRegionConstIterator',
-  #'ImageRegionIterator',
-  #'ImageRegionConstIteratorWithIndex',
-  #'ImageRegionIteratorWithIndex',
-  #'InterpolateImageFilter',
-  #'IsolatedConnectedImageFilter',
-  'SmartPointer',
-  'BMPImageIO',
+    #'BinaryBallStructuringElement',
+    #'Neighborhood',
+    #'BSplineDecompositionImageFilter',
+    #'AtanImageFilter',
+    #'Atan2ImageFilter',
+    #'ChangeInformationImageFilter',
+    #'GeodesicActiveContourLevelSetImageFilter',
+    #'Image',
+    #'ImageBase',
+    #'ImageFileReader',
+    #'ImageFileWriter',
+    #'ImageRegistrationMethod',
+    #'BSplineDownsampleImageFilter',
+    #'BSplineUpsampleImageFilter',
+    #'CropImageFilter',
+    #'LevelSetFunction',
+    #'MattesMutualInformationImageToImageMetric',
+    #'MeanReciprocalSquareDifferenceImageToImageMetric',
+    #'MeanSquaresImageToImageMetric',
+    #'MultiResolutionImageRegistrationMethod',
+    #'MultiResolutionPyramidImageFilter',
+    #'MutualInformationImageToImageMetric',
+    #'NormalizedCorrelationImageToImageMetric',
+    #'ParallelSparseFieldLevelSetImageFilter',
+    #'PyBuffer',
+    #'RawImageIO',
+    #'RecursiveMultiResolutionPyramidImageFilter',
+    #'ResampleImageFilter',
+    #'RescaleIntensityImageFilter',
+    #'SegmentationLevelSetImageFilter',
+    #'ShapeDetectionLevelSetImageFilter',
+    #'SparseFieldFourthOrderLevelSetImageFilter',
+    #'SparseFieldLevelSetImageFilter',
+    #'SpatialObject',
+    #'SpatialObjectTreeNode',
+    #'WatershedImageFilter',
+    #'TreeNode',
+    #'ThresholdSegmentationLevelSetImageFilter',
+    #'PointSet',
+    #'ImageConstIterator',
+    #'ImageConstIteratorWithIndex',
+    #'ImageIterator',
+    #'ImageIteratorWithIndex',
+    #'ImageLinearConstIteratorWithIndex',
+    #'ImageLinearIteratorWithIndex',
+    #'ImageRandomConstIteratorWithIndex',
+    #'ImageRandomIteratorWithIndex',
+    #'ImageRandomNonRepeatingConstIteratorWithIndex',
+    #'ImageRandomNonRepeatingIteratorWithIndex',
+    #'ImageRegionConstIterator',
+    #'ImageRegionIterator',
+    #'ImageRegionConstIteratorWithIndex',
+    #'ImageRegionIteratorWithIndex',
+    #'InterpolateImageFilter',
+    #'IsolatedConnectedImageFilter',
+    'SmartPointer',
+    'BMPImageIO',
 ]
 
+
 def log(s, level):
-  if level <= options.verbose:
-    print >> logFile, s
-    logFile.flush()
+    if level <= options.verbose:
+        print(logFile, s)
+        logFile.flush()
 
 
 def cleanType(s):
-  i = s.index('_', 1)
-  return s[i+1:]
+    i = s.index('_', 1)
+    return s[i + 1:]
 
 
 def addUnwrappedType(s):
-  s = cleanType(s)
-  if not s in unwrappedTypes:
-    unwrappedTypes.add(s)
-    log(s, 0)
+    s = cleanType(s)
+    if not s in unwrappedTypes:
+        unwrappedTypes.add(s)
+        log(s, 0)
 
 
 def exploreTpl(tpl):
     for cl in tpl.itervalues():
         exploreMethods(cl, cl)
         # try to instanciate the class
-        try :
+        try:
             obj = cl.New()
             exploreMethods(obj, cl)
         except:
             pass
-        try :
+        try:
             exploreMethods(cl(), cl)
         except:
             pass
 
+
 def exploreMethods(obj, cl):
-    attrNameList = [i for i in dir(obj) if isinstance(i, str) and i[0].isupper() and i not in excludedMethodsList]
-    attrNameList.sort()
+    isin = isinstance(i, str)
+    ls = excludedMethodsList
+    attrNameList = sorted(
+        [i for i in dir(obj) if isin and i[0].isupper() and i not in ls])
 
     for attrName in attrNameList:
         log(" + " + attrName, 2)
-        try :
+        try:
             parameters = repr((cl.__name__, attrName))
-            if parameters not in exclude :
-              log(parameters, 4)
-              exec "s = obj.%s()" % attrName
-              if isUnwrappedTypeString(s):
-                  addUnwrappedType(s)
-                  log("   - " + cleanType(s), 5)
-        except :
+            if parameters not in exclude:
+                log(parameters, 4)
+                exec "s = obj.%s()" % attrName
+                if isUnwrappedTypeString(s):
+                    addUnwrappedType(s)
+                    log("   - " + cleanType(s), 5)
+        except:
             # try with some parameters
-            if attrName not in excludedMethodsWithParamList :
-                for param in [0, '', False, None] :
-                  parameters = repr((cl.__name__, attrName, param))
-                  if parameters not in exclude :
-                    log('  * ' + repr(param), 3)
-                    log(parameters, 4)
-                    try :
-                        exec "s = obj.%s(param)" % attrName
-                        if isUnwrappedTypeString(s):
-                          addUnwrappedType(s)
-                          log("   - " + cleanType(s), 5)
-                    except :
-                        pass
+            if attrName not in excludedMethodsWithParamList:
+                for param in [0, '', False, None]:
+                    parameters = repr((cl.__name__, attrName, param))
+                    if parameters not in exclude:
+                        log('  * ' + repr(param), 3)
+                        log(parameters, 4)
+                        try:
+                            exec "s = obj.%s(param)" % attrName
+                            if isUnwrappedTypeString(s):
+                                addUnwrappedType(s)
+                                log("   - " + cleanType(s), 5)
+                        except:
+                            pass
+
 
 def isUnwrappedTypeString(s):
     if not isinstance(s, str):
         return False
     if not s[0] == "_":
         return False
-    for t in ctypes :
-        if re.match('^_[0-9a-z]+_p_%s$' % t, s) :
+    for t in ctypes:
+        if re.match('^_[0-9a-z]+_p_%s$' % t, s):
             return False
     return True
 
 
-
-
 parser = OptionParser(usage="usage: %prog")
-parser.add_option("--exclude", dest="exclude", default=None, metavar="FILE", help="")
-parser.add_option("--log-file", dest="logFile", default="-", metavar="FILE", help="")
-parser.add_option("--start-from", dest="startFrom", default=None, metavar="CLASS", help="")
-parser.add_option("-v", "--verbose", dest="verbose", default=0, type="int", help="")
+parser.add_option(
+    "--exclude",
+    dest="exclude",
+    default=None,
+    metavar="FILE",
+    help="")
+parser.add_option(
+    "--log-file",
+    dest="logFile",
+    default="-",
+    metavar="FILE",
+    help="")
+parser.add_option(
+    "--start-from",
+    dest="startFrom",
+    default=None,
+    metavar="CLASS",
+    help="")
+parser.add_option(
+    "-v",
+    "--verbose",
+    dest="verbose",
+    default=0,
+    type="int",
+    help="")
 (options, args) = parser.parse_args()
 
 if options.logFile == "-":
-  logFile = sys.stdout
+    logFile = sys.stdout
 else:
-  logFile = file(options.logFile, "w")
+    logFile = file(options.logFile, "w")
 
 
 exclude = set()
-if options.exclude :
-  exclude = set(file(options.exclude).read().splitlines())
-
-
+if options.exclude:
+    exclude = set(file(options.exclude).read().splitlines())
 
-attrNameList = sorted(set([i for i in dir(itk) if i[0].isupper() and len(i) > 2]) - set(excludedClasses))
+val = [i for i in dir(itk) if i[0].isupper() and len(i) > 2]
+attrNameList = sorted(set(val) - set(excludedClasses))
 
-if options.startFrom :
+if options.startFrom:
     attrNameList = attrNameList[attrNameList.index(options.startFrom):]
 
 unwrappedTypes = set()
 
 
 for name in attrNameList:
-    exec "attr = itk."+name
+    exec "attr = itk." + name
     # attr = itk.__dict__[name]
     log(name, 1)
-    if isinstance(attr, itkTemplate) :
+    if isinstance(attr, itkTemplate):
         exploreTpl(attr)
-    else :
+    else:
         exploreMethods(attr, attr)
-        try :
+        try:
             exploreMethods(attr.New(), attr)
         except:
             pass
-        try :
+        try:
             exploreMethods(attr(), attr)
         except:
             pass
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/simple_pipeline.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/simple_pipeline.py
index ba718b0..e20d062 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/simple_pipeline.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/simple_pipeline.py
@@ -16,7 +16,8 @@
 #
 #==========================================================================*/
 
-import itk, sys
+import itk
+import sys
 itk.auto_progress(2)
 
 # first argument is the pixel type
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/template.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/template.py
index 146d62f..10e4b84 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/template.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/template.py
@@ -42,17 +42,17 @@ readerType3 = itk.ImageFileReader.IUC2
 assert readerType == readerType2 == readerType3
 
 # we should be able to get the template and its parameters from the class
-(tpl, parameters) = itk.template( IType )
+(tpl, parameters) = itk.template(IType)
 assert tpl == itk.Image
 assert parameters == (PType, dim)
 
 # the template must raise a KeyError exception if the template parameter
 # is unknown
-try :
-  itk.ImageFileReader['unknown parameter']
-  raise Exception('no exception sent for unknown parameter')
+try:
+    itk.ImageFileReader['unknown parameter']
+    raise Exception('no exception sent for unknown parameter')
 except KeyError:
-  pass
+    pass
 
 # TODO: test the rest of the dict interface
 # TODO: test __eq__, __ne__ and __hash__
@@ -60,10 +60,7 @@ except KeyError:
 # something else ?
 
 
-
-
 # now test the New method
-
 # without parameter
 reader = readerType.New()
 reader2 = readerType.New()
@@ -73,18 +70,18 @@ reader = readerType.New(FileName='test.png')
 assert reader.GetFileName() == 'test.png'
 
 # wwith a wrong attribute name
-try :
-  reader = readerType.New(WrongName='test.png')
-  raise Exception('no exception sent for wrong attribute name')
+try:
+    reader = readerType.New(WrongName='test.png')
+    raise Exception('no exception sent for wrong attribute name')
 except AttributeError:
-  pass
+    pass
 
 # wwith a wrong attribute type
-try :
-  reader = readerType.New(FileName=1)
-  raise Exception('no exception sent for wrong attribute type')
-except :
-  pass
+try:
+    reader = readerType.New(FileName=1)
+    raise Exception('no exception sent for wrong attribute type')
+except:
+    pass
 
 # pass filter as argument for input
 # to a filter with SetInput method
@@ -118,31 +115,32 @@ assert im2 == sub.GetInput(1)
 
 # pass invalid input
 try:
-  itk.MedianImageFilter[IType, IType].New(1)
-  raise Exception('no exception sent for wrong input type')
+    itk.MedianImageFilter[IType, IType].New(1)
+    raise Exception('no exception sent for wrong input type')
 except:
-  pass
+    pass
 
 try:
-  itk.SubtractImageFilter[IType, IType, IType].New(im, "wrong")
-  raise Exception('no exception sent for wrong 2nd input type')
+    itk.SubtractImageFilter[IType, IType, IType].New(im, "wrong")
+    raise Exception('no exception sent for wrong 2nd input type')
 except TypeError:
-  pass
+    pass
 
 
 # pass both input and attribute
-recons = itk.ReconstructionByDilationImageFilter[IType, IType].New(reader.GetOutput(), im, FullyConnected=True)
+recons = itk.ReconstructionByDilationImageFilter[
+    IType, IType].New(reader.GetOutput(), im, FullyConnected=True)
 assert reader.GetOutput() == recons.GetInput(0)
 assert im == recons.GetInput(1)
-assert recons.GetFullyConnected() == True
+assert recons.GetFullyConnected()
 
 
 # pass input to object which do not take one
 try:
-  IType.New(im)
-  raise Exception('no exception sent for object without input')
+    IType.New(im)
+    raise Exception('no exception sent for object without input')
 except AttributeError:
-  pass
+    pass
 
 # TODO: test auto_progress
 # but how ?
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/templated_pipeline.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/templated_pipeline.py
index 47bc7e0..850e77a 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/templated_pipeline.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/templated_pipeline.py
@@ -1,41 +1,73 @@
+#==========================================================================
+#
+#   Copyright Insight Software Consortium
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#          http://www.apache.org/licenses/LICENSE-2.0.txt
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#==========================================================================*/
+
 import itk
 from sys import argv
 itk.auto_progress(2)
 
 # define a custom templated pipeline
 
+
 class LabelDilateImageFilter(itk.pipeline):
-  def __init__(self, *args, **kargs):
-    # call the constructor of the superclass but without args and kargs, because the attributes
-    # are not all already there!
-    # Set/GetRadius() is created in the constructor for example, with the expose() method
-    itk.pipeline.__init__(self)
-
-    # get the template parameters
-    template_parameters = kargs["template_parameters"]
-    # check the template parameters validity. Not really useful in that case, because we do the same
-    # here, but a good habit
-    LabelDilateImageFilter.check_template_parameters(template_parameters)
-
-    # and store them in an easier way
-    ImageType, DistanceMapType = template_parameters
-
-    # build the minipipeline
-    self.connect(itk.DanielssonDistanceMapImageFilter[ImageType, DistanceMapType].New(UseImageSpacing=True, SquaredDistance=False))
-    self.connect(itk.BinaryThresholdImageFilter[DistanceMapType, ImageType].New())
-    self.expose("UpperThreshold", "Radius")
-    self.append(itk.MaskImageFilter[ImageType, ImageType, ImageType].New(self.filters[0].GetVoronoiMap(), Input2=self.filters[1]))
-
-    # now we can parse the inputs
-    itk.set_inputs(self, args, kargs)
-
-  def check_template_parameters(template_parameters):
-    ImageType, DistanceMapType = template_parameters
-    itk.DanielssonDistanceMapImageFilter[ImageType, DistanceMapType]
-    itk.BinaryThresholdImageFilter[DistanceMapType, ImageType]
-    itk.CastImageFilter[DistanceMapType, ImageType]
-    itk.MaskImageFilter[ImageType, ImageType, ImageType]
-  check_template_parameters = staticmethod(check_template_parameters)
+
+    def __init__(self, *args, **kargs):
+        # call the constructor of the superclass but without args and kargs,
+        # because the attributes are not all already there!
+        # Set/GetRadius() is created in the constructor for example, with the
+        # expose() method
+        itk.pipeline.__init__(self)
+
+        # get the template parameters
+        template_parameters = kargs["template_parameters"]
+        # check the template parameters validity. Not really useful in that
+        # case, because we do the same here, but a good habit
+        LabelDilateImageFilter.check_template_parameters(template_parameters)
+
+        # and store them in an easier way
+        ImageType, DistanceMapType = template_parameters
+
+        # build the minipipeline
+        self.connect(
+            itk.DanielssonDistanceMapImageFilter[
+                ImageType,
+                DistanceMapType].New(
+                UseImageSpacing=True,
+                SquaredDistance=False))
+        self.connect(
+            itk.BinaryThresholdImageFilter[DistanceMapType,
+                                           ImageType].New())
+        self.expose("UpperThreshold", "Radius")
+        self.append(
+            itk.MaskImageFilter[ImageType,
+                                ImageType,
+                                ImageType].New(self.filters[0].GetVoronoiMap(),
+                                               Input2=self.filters[1]))
+
+        # now we can parse the inputs
+        itk.set_inputs(self, args, kargs)
+
+    def check_template_parameters(template_parameters):
+        ImageType, DistanceMapType = template_parameters
+        itk.DanielssonDistanceMapImageFilter[ImageType, DistanceMapType]
+        itk.BinaryThresholdImageFilter[DistanceMapType, ImageType]
+        itk.CastImageFilter[DistanceMapType, ImageType]
+        itk.MaskImageFilter[ImageType, ImageType, ImageType]
+    check_template_parameters = staticmethod(check_template_parameters)
 
 LabelDilateImageFilter = itk.templated_class(LabelDilateImageFilter)
 
@@ -46,8 +78,9 @@ IType = itk.Image[itk.UC, dim]
 OIType = itk.Image[itk.UC, dim]
 DIType = itk.Image[itk.F, dim]
 
-reader = itk.ImageFileReader[IType].New( FileName=argv[1] )
-dilate = LabelDilateImageFilter[IType, DIType].New(reader, Radius=eval(argv[3]))
-writer = itk.ImageFileWriter[OIType].New( dilate, FileName=argv[2] )
+reader = itk.ImageFileReader[IType].New(FileName=argv[1])
+val = argv[3]
+dilate = LabelDilateImageFilter[IType, DIType].New(reader, Radius=eval(val))
+writer = itk.ImageFileWriter[OIType].New(dilate, FileName=argv[2])
 
 writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/timing.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/timing.py
index 31bc119..08818b6 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/timing.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/timing.py
@@ -1,59 +1,86 @@
+#==========================================================================
+#
+#   Copyright Insight Software Consortium
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#          http://www.apache.org/licenses/LICENSE-2.0.txt
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#==========================================================================*/
+
+from __future__ import print_function
+
 import time
 
 start = time.time()
 import itk
 itk.force_load()
-print "load:", time.time() - start
+print("load:", time.time() - start)
 
-img = itk.Image.UC2.New(Regions=(10,20))
+img = itk.Image.UC2.New(Regions=(10, 20))
 img.Allocate()
 
+
 def index(it):
-  idx = itk.Index[2]()
-  for dummy in range(0, it):
-    img.GetPixel(idx)
+    idx = itk.Index[2]()
+    for dummy in range(0, it):
+        img.GetPixel(idx)
+
 
 def index2(it):
-  idx = itk.Index[2]()
-  for dummy in range(0, it):
-    idx[0] = 0
-    idx[1] = 0
-    img.GetPixel(idx)
+    idx = itk.Index[2]()
+    for dummy in range(0, it):
+        idx[0] = 0
+        idx[1] = 0
+        img.GetPixel(idx)
+
 
 def integer(it):
-  for dummy in range(0, it):
-    img.GetPixel(0)
+    for dummy in range(0, it):
+        img.GetPixel(0)
+
 
 def pylist(it):
-  l = [0, 0]
-  for dummy in range(0, it):
-    img.GetPixel(l)
+    l = [0, 0]
+    for dummy in range(0, it):
+        img.GetPixel(l)
+
 
 def pytuple(it):
-  l = (0, 0)
-  for dummy in range(0, it):
-    img.GetPixel(l)
+    l = (0, 0)
+    for dummy in range(0, it):
+        img.GetPixel(l)
+
 
 def new(it):
-  for dummy in range(0, it):
-    lo = itk.Image.UC2.__New_orig__()
+    for dummy in range(0, it):
+        lo = itk.Image.UC2.__New_orig__()
+
 
 def extended_new(it):
-  for dummy in range(0, it):
-    lo = itk.Image.UC2.New()
+    for dummy in range(0, it):
+        lo = itk.Image.UC2.New()
 
 
 def run(f, it):
-  start = time.time()
-  f(it)
-  return time.time() - start
+    start = time.time()
+    f(it)
+    return time.time() - start
 
 
 it = 1000000
-print "index:", run(index, it)
-print "index2:", run(index2, it)
-print "integer:", run(integer, it)
-print "list:", run(pylist, it)
-print "tuple:", run(pytuple, it)
-print "new:", run(new, 100000)
-print "extended_new:", run(extended_new, 100000)
+print("index:", run(index, it))
+print("index2:", run(index2, it))
+print("integer:", run(integer, it))
+print("list:", run(pylist, it))
+print("tuple:", run(pytuple, it))
+print("new:", run(new, 100000))
+print("extended_new:", run(extended_new, 100000))
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/typemaps.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/typemaps.py
index 9b9a2c0..6dfaced 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/typemaps.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/typemaps.py
@@ -16,7 +16,11 @@
 #
 #==========================================================================*/
 
-import itk, sys, gc
+from __future__ import print_function
+
+import itk
+import sys
+import gc
 
 # create some vars used later
 
@@ -37,15 +41,31 @@ idx1 = itk.Index[2](idx)
 idx2 = itk.Index[2](t)
 idx3 = itk.Index[2](l)
 idx4 = itk.Index[2](i)
-assert idx1.GetElement(0) == idx2.GetElement(0) == idx3.GetElement(0) == idx4.GetElement(0) == i
-assert idx1.GetElement(1) == idx2.GetElement(1) == idx3.GetElement(1) == idx4.GetElement(1) == i
+assert idx1.GetElement(
+    0) == idx2.GetElement(
+    0) == idx3.GetElement(
+    0) == idx4.GetElement(
+    0) == i
+assert idx1.GetElement(
+    1) == idx2.GetElement(
+    1) == idx3.GetElement(
+    1) == idx4.GetElement(
+    1) == i
 
 size1 = itk.Size[2](size)
 size2 = itk.Size[2](t)
 size3 = itk.Size[2](l)
 size4 = itk.Size[2](i)
-assert size1.GetElement(0) == size2.GetElement(0) == size3.GetElement(0) == size4.GetElement(0) == i
-assert size1.GetElement(1) == size2.GetElement(1) == size3.GetElement(1) == size4.GetElement(1) == i
+assert size1.GetElement(
+    0) == size2.GetElement(
+    0) == size3.GetElement(
+    0) == size4.GetElement(
+    0) == i
+assert size1.GetElement(
+    1) == size2.GetElement(
+    1) == size3.GetElement(
+    1) == size4.GetElement(
+    1) == i
 
 median = itk.MedianImageFilter.IUC2IUC2.New()
 median.SetRadius(size)
@@ -56,36 +76,44 @@ median.SetRadius(l)
 size3 = median.GetRadius()
 median.SetRadius(i)
 size4 = median.GetRadius()
-assert size1.GetElement(0) == size2.GetElement(0) == size3.GetElement(0) == size4.GetElement(0) == i
-assert size1.GetElement(1) == size2.GetElement(1) == size3.GetElement(1) == size4.GetElement(1) == i
+assert size1.GetElement(
+    0) == size2.GetElement(
+    0) == size3.GetElement(
+    0) == size4.GetElement(
+    0) == i
+assert size1.GetElement(
+    1) == size2.GetElement(
+    1) == size3.GetElement(
+    1) == size4.GetElement(
+    1) == i
 
 
 # smart pointers
 im = itk.Image.UC2.New()
-assert im != None
+assert im is not None
 
-median.SetInput( im )
+median.SetInput(im)
 assert median.GetInput() == im
 assert median.GetInput() != median.GetOutput()
 
-median.SetInput( None )
-assert median.GetInput() == None
+median.SetInput(None)
+assert median.GetInput() is None
 
 
 # ImageSource
 
 median2 = itk.MedianImageFilter.IUC2IUC2.New()
-median.SetInput( median2 )
+median.SetInput(median2)
 assert median.GetInput() == median2.GetOutput()
 
 
 # catching exception
 try:
-  median.Update()
-  print >> sys.stderr, "Exception not throwed!"
-  sys.exit(1)
-except RuntimeError, e:
-  print "Exception catched as expected", e
+    median.Update()
+    print("Exception not throwed!", file=sys.stderr)
+    sys.exit(1)
+except RuntimeError as e:
+    print("Exception catched as expected", e)
 
 #   ----- keep that at the end! -----
 
diff --git a/Utilities/ITK/Wrapping/Generators/Python/Tests/wrappingCoverage.py b/Utilities/ITK/Wrapping/Generators/Python/Tests/wrappingCoverage.py
index 4edd1ce..c819c63 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/Tests/wrappingCoverage.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/Tests/wrappingCoverage.py
@@ -1,71 +1,88 @@
-# -*- coding: utf-8 -*-
+#==========================================================================
+#
+#   Copyright Insight Software Consortium
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#          http://www.apache.org/licenses/LICENSE-2.0.txt
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#==========================================================================*/
 
-import sys, re, itk, os
-from optparse import OptionParser
-
-# python 2.3 compatibility
-if sys.version < '2.4' :
-        # set compatibility
-        import sets
-        set = sets.Set
+from __future__ import print_function
 
-        def sorted(iterable, cmp=None, key=None, reverse=False) :
-            i = list(iterable)
-            if key :
-                d = {}
-                for v in iterable :
-                    k = key(v)
-                    if not d.has_key(k) :
-                        d[k] = []
-                    d[k].append(v)
-                keys = d.keys()
-                keys.sort(cmp)
-                i = []
-                for k in keys :
-                    i += d[k]
-            else :
-                i.sort(cmp)
-            if reverse :
-                i.reverse()
-            return i
+import sys
+import re
+import itk
+import os
+from optparse import OptionParser
 
-parser = OptionParser(usage = 'wrappingCoverage.py paths')
+parser = OptionParser(usage='wrappingCoverage.py paths')
 
-parser.add_option("-b", "--base", dest="base", default="Filter", help="Base string used to search for the classes (default: Filter).")
-parser.add_option("-e", "--exclude", dest="exclude", default=None, help="Path of a file with one class to exclude per line (default: None).")
-parser.add_option("-E", "--no-error", action="store_true", dest="noError", help="Don't generate an error code if all the classes are not wrapped.")
+parser.add_option(
+    "-b",
+    "--base",
+    dest="base",
+    default="Filter",
+    help="Base string used to search for the classes (default: Filter).")
+parser.add_option(
+    "-e",
+    "--exclude",
+    dest="exclude",
+    default=None,
+    help="Path of a file with one class to exclude per line (default: None).")
+parser.add_option(
+    "-E",
+    "--no-error",
+    action="store_true",
+    dest="noError",
+    help="Don't generate an error code if all the classes are not wrapped.")
 
 opts, args = parser.parse_args()
 
 # declares classes which will not be wrapped
 excluded = set([])
 if opts.exclude:
-  map(excluded.add, [c.strip() for c in file(opts.exclude).readlines()])
+    map(excluded.add, [c.strip() for c in file(opts.exclude).readlines()])
 
 # get classes from sources
 headers = []
 for d in args:
-  headers += sum([ f for p,d,f in os.walk(d) if "Deprecated" not in p and "TestKernel" not in p ], [])
-classes = set([f[len('itk'):-len('.h')] for f in headers if f.startswith("itk") and not f.startswith("itkv3") and f.endswith(opts.base+".h")]) - excluded
+    headers += sum([f for p, d, f in os.walk(d)
+                   if "Deprecated" not in p and "TestKernel" not in p], [])
+classes = set([f[len('itk'):-len('.h')] for f in headers if f.startswith("itk")
+              and not f.startswith("itkv3") and
+              f.endswith(opts.base + ".h")]) - excluded
 
 # get filter from wrapper files
-# remove classes which are not in the toolkit (external projects, PyImageFilter, ...)
-wrapped = set([a for a in dir(itk) if a.endswith(opts.base)]).intersection(classes)
+# remove classes which are not in the toolkit (external projects,
+# PyImageFilter, ...)
+wrapped = set([a for a in dir(itk) if a.endswith(opts.base)]
+              ).intersection(classes)
 
 nonWrapped = classes - wrapped
 
 
-# print non wrapped classes without much text to stdout, so they can be easily reused
-for f in sorted(nonWrapped) :
-        print f
+# print non wrapped classes without much text to stdout, so they can be
+# easily reused
+for f in sorted(nonWrapped):
+    print(f)
 
 # and print stats in stderr to avoid poluting the list above
-print >>sys.stderr
-print >>sys.stderr, '%i %s' % (len(classes), opts.base)
-print >>sys.stderr, '%i wrapped %s' % (len(wrapped), opts.base)
-print >>sys.stderr, '%i non wrapped %s' % (len(nonWrapped), opts.base)
-print >>sys.stderr, '%f%% covered' % (len(wrapped) / float(len(classes)) * 100)
-print >>sys.stderr
+print("", file=sys.stderr)
+print('%i %s' % (len(classes), opts.base), file=sys.stderr)
+print('%i wrapped %s' % (len(wrapped), opts.base), file=sys.stderr)
+print('%i non wrapped %s' % (len(nonWrapped), opts.base), file=sys.stderr)
+covered = len(wrapped) / float(len(classes))
+print('%f%% covered' % (covered * 100), file=sys.stderr)
+print("", file=sys.stderr)
 
 if not opts.noError:
-  sys.exit(len(nonWrapped))
+    sys.exit(len(nonWrapped))
diff --git a/Utilities/ITK/Wrapping/Generators/Python/WrapITK.pth.in b/Utilities/ITK/Wrapping/Generators/Python/WrapITK.pth.in
index 2eadcd1..7e2dc5a 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/WrapITK.pth.in
+++ b/Utilities/ITK/Wrapping/Generators/Python/WrapITK.pth.in
@@ -1,2 +1,3 @@
 # Python pth file to add WrapITK's path to sys.path.
 @CONFIG_ITK_WRAP_PYTHON_DIR@
+ at CONFIG_ITK_WRAP_LIBRARY_DIR@
diff --git a/Utilities/ITK/Wrapping/Generators/Python/WrapITKBuildOptionsConfig.py b/Utilities/ITK/Wrapping/Generators/Python/WrapITKBuildOptionsConfig.py
index dc80b81..a0094a1 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/WrapITKBuildOptionsConfig.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/WrapITKBuildOptionsConfig.py
@@ -1,17 +1,17 @@
 depends = ('ITKCommon',)
 templates = (
-  ('DIMS', 'ITK_WRAP_DIMS', 'DIMS'),
-  ('USIGN_INTS', 'WRAP_ITK_USIGN_INT', 'USIGN_INTS'),
-  ('SIGN_INTS', 'WRAP_ITK_SIGN_INT', 'SIGN_INTS'),
-  ('REALS', 'WRAP_ITK_REAL', 'REALS'),
-  ('VECTOR_REALS', 'WRAP_ITK_VECTOR_REAL', 'VECTOR_REALS'),
-  ('COV_VECTOR_REALS', 'WRAP_ITK_COV_VECTOR_REAL', 'COV_VECTOR_REALS'),
-  ('RGBS', 'WRAP_ITK_RGB', 'RGBS'),
-  ('RGBAS', 'WRAP_ITK_RGBA', 'RGBAS'),
-  ('COMPLEX_REALS', 'WRAP_ITK_COMPLEX_REAL', 'COMPLEX_REALS'),
-  ('INTS', 'WRAP_ITK_INT', 'INTS'),
-  ('SCALARS', 'WRAP_ITK_SCALAR', 'SCALARS'),
-  ('VECTORS', 'WRAP_ITK_VECTOR', 'VECTORS'),
-  ('COLORS', 'WRAP_ITK_COLOR', 'COLORS'),
-  ('ALL_TYPES', 'WRAP_ITK_ALL_TYPE', 'ALL_TYPES'),
+    ('DIMS', 'ITK_WRAP_DIMS', 'DIMS'),
+    ('USIGN_INTS', 'WRAP_ITK_USIGN_INT', 'USIGN_INTS'),
+    ('SIGN_INTS', 'WRAP_ITK_SIGN_INT', 'SIGN_INTS'),
+    ('REALS', 'WRAP_ITK_REAL', 'REALS'),
+    ('VECTOR_REALS', 'WRAP_ITK_VECTOR_REAL', 'VECTOR_REALS'),
+    ('COV_VECTOR_REALS', 'WRAP_ITK_COV_VECTOR_REAL', 'COV_VECTOR_REALS'),
+    ('RGBS', 'WRAP_ITK_RGB', 'RGBS'),
+    ('RGBAS', 'WRAP_ITK_RGBA', 'RGBAS'),
+    ('COMPLEX_REALS', 'WRAP_ITK_COMPLEX_REAL', 'COMPLEX_REALS'),
+    ('INTS', 'WRAP_ITK_INT', 'INTS'),
+    ('SCALARS', 'WRAP_ITK_SCALAR', 'SCALARS'),
+    ('VECTORS', 'WRAP_ITK_VECTOR', 'VECTORS'),
+    ('COLORS', 'WRAP_ITK_COLOR', 'COLORS'),
+    ('ALL_TYPES', 'WRAP_ITK_ALL_TYPE', 'ALL_TYPES'),
 )
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itk.py b/Utilities/ITK/Wrapping/Generators/Python/itk.py
index e26198a..1e1cec0 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/itk.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/itk.py
@@ -17,56 +17,56 @@
 #==========================================================================*/
 
 """itk.py : Top-level container module for ITK wrappers."""
-import itkBase, itkConfig, itkLazy, itkTypes, itkExtras, os, sys
-
-# silently import psyco
-try:
-  import psyco
-  psyco.profile()
-except ImportError:
-  pass
+import itkBase
+import itkConfig
+import itkLazy
+import itkTypes
+import itkExtras
+import os
+import sys
 
 thisModule = sys.modules[__name__]
 
 if itkConfig.LazyLoading:
-  # If we are loading lazily (on-demand), make a dict mapping the available
-  # classes/functions/etc. (read from the configuration modules) to the
-  # modules they are declared in. Then pass that dict to a LazyITKModule
-  # instance and (later) do some surgery on sys.modules so that the 'itk'
-  # module becomes that new instance instead of what is executed from this file.
-  lazyAttributes = {}
-  for module, data in itkBase.module_data.items():
-    templateNames = [ t[0] for t in data['templates'] ]
-    attributes = dict( [(n, module) for n in templateNames] )
-    lazyAttributes.update(attributes)
-  if isinstance(thisModule, itkLazy.LazyITKModule):
-    # Handle reload case where we've already done this once.
-    # If we made a new module every time, multiple reload()s would fail
-    # because the identity of sys.modules['itk'] would always be changing.
-    thisModule.__init__(__name__, lazyAttributes)
-    del lazyAttributes
-  else:
-    thisModule = itkLazy.LazyITKModule(__name__, lazyAttributes)
+    # If we are loading lazily (on-demand), make a dict mapping the available
+    # classes/functions/etc. (read from the configuration modules) to the
+    # modules they are declared in. Then pass that dict to a LazyITKModule
+    # instance and (later) do some surgery on sys.modules so that the 'itk'
+    # module becomes that new instance instead of what is executed from this
+    # file.
+    lazyAttributes = {}
+    for module, data in itkBase.module_data.items():
+        templateNames = [t[0] for t in data['templates']]
+        attributes = dict([(n, module) for n in templateNames])
+        lazyAttributes.update(attributes)
+    if isinstance(thisModule, itkLazy.LazyITKModule):
+        # Handle reload case where we've already done this once.
+        # If we made a new module every time, multiple reload()s would fail
+        # because the identity of sys.modules['itk'] would always be changing.
+        thisModule.__init__(__name__, lazyAttributes)
+        del lazyAttributes
+    else:
+        thisModule = itkLazy.LazyITKModule(__name__, lazyAttributes)
 else:
-  # We're not lazy-loading. Just load the modules in the order specified in
-  # the known_modules list for consistency.
-  for module in itkBase.known_modules:
-    itkBase.LoadModule(module, thisModule.__dict__)
+    # We're not lazy-loading. Just load the modules in the order specified in
+    # the known_modules list for consistency.
+    for module in itkBase.known_modules:
+        itkBase.LoadModule(module, thisModule.__dict__)
 
 # Regardless of how it was loaded, fill up the itk module with the ITK types
 # and extras.
 for k, v in itkTypes.__dict__.items():
-  if k != 'itkCType' and not k.startswith('_'):
-    setattr(thisModule, k, v)
+    if k != 'itkCType' and not k.startswith('_'):
+        setattr(thisModule, k, v)
 for k, v in itkExtras.__dict__.items():
-  if not k.startswith('_'):
-    setattr(thisModule, k, v)
+    if not k.startswith('_'):
+        setattr(thisModule, k, v)
 
 if itkConfig.LazyLoading:
-  # this has to be the last step, else python gets confused about itkTypes
-  # and itkExtras above. I'm not sure why...
-  sys.modules[__name__] = thisModule
+    # this has to be the last step, else python gets confused about itkTypes
+    # and itkExtras above. I'm not sure why...
+    sys.modules[__name__] = thisModule
 else:
-  # do some cleanup
-  del module, thisModule
-  del itkBase, itkConfig, itkLazy, itkTypes, itkExtras, os, sys
+    # do some cleanup
+    del module, thisModule
+    del itkBase, itkConfig, itkLazy, itkTypes, itkExtras, os, sys
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itkBase.py b/Utilities/ITK/Wrapping/Generators/Python/itkBase.py
index f8fe009..5023297 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/itkBase.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/itkBase.py
@@ -16,213 +16,221 @@
 #
 #==========================================================================*/
 
-import os, os.path, sys, imp, inspect, itkConfig, itkTemplate
-
-def LoadModule(name, namespace = None):
-  """This function causes a SWIG module to be loaded into memory after its dependencies
-  are satisfied. Information about the templates defined therein is looked up from
-  a config file, and PyTemplate instances for each are created. These template
-  instances are placed in a module with the given name that is either looked up
-  from sys.modules or created and placed there if it does not already exist.
-  Optionally, a 'namespace' parameter can be provided. If it is provided, this
-  namespace will be updated with the new template instantiations.
-  The raw classes loaded from the named module's SWIG interface are placed in a
-  'swig' sub-module. If the namespace parameter is provided, this information will
-  be placed in a sub-module named 'swig' therein as well. This latter submodule
-  will be created if it does not already exist."""
-
-  # find the module's name in sys.modules, or create a new module so named
-  this_module = sys.modules.setdefault(name, imp.new_module(name))
-
-  # if this library and it's template instantiations have already been loaded
-  # into sys.modules, bail out after loading the defined symbols into 'namespace'
-  if hasattr(this_module, '__templates_loaded'):
-    if namespace is not None:
-        swig = namespace.setdefault('swig', imp.new_module('swig'))
-        swig.__dict__.update(this_module.swig.__dict__)
-
-        # don't worry about overwriting the symbols in namespace -- any common
-        # symbols should be of type itkTemplate, which is a singleton type. That
-        # is, they are all identical, so replacing one with the other isn't a
-        # problem.
-        for k, v in this_module.__dict__.items():
-          if not (k.startswith('_') or k == 'swig'): namespace[k] = v
-    return
-
-  # We're definitely going to load the templates. We set templates_loaded here
-  # instead of at the end of the file to protect against cyclical dependencies
-  # that could kill the recursive lookup below.
-  this_module.__templates_loaded = True
-
-  # For external projects :
-  # If this_module name (variable name) is in the module_data dictionnary, then
-  # this_module is an installed module (or a previously loaded module).
-  # Otherwise, it may come from an external project. In this case, we must
-  # search the Configuration/<name>Config.py file of this project.
-  try:
-    module_data[name]
-  except:
-    file = inspect.getfile(this_module)
-    path = os.path.dirname(file)
-
-    data = {}
+from __future__ import print_function
+
+import os
+import os.path
+import sys
+import imp
+import inspect
+import itkConfig
+import itkTemplate
+
+
+def LoadModule(name, namespace=None):
+    """This function causes a SWIG module to be loaded into memory after its
+    dependencies are satisfied. Information about the templates defined therein
+    is looked up from a config file, and PyTemplate instances for each are
+    created. These template instances are placed in a module with the given
+    name that is either looked up from sys.modules or created and placed there
+    if it does not already exist.
+    Optionally, a 'namespace' parameter can be provided. If it is provided,
+    this namespace will be updated with the new template instantiations.
+    The raw classes loaded from the named module's SWIG interface are placed in
+    a 'swig' sub-module. If the namespace parameter is provided, this
+    information will be placed in a sub-module named 'swig' therein as well.
+    This later submodule will be created if it does not already exist."""
+
+    # find the module's name in sys.modules, or create a new module so named
+    this_module = sys.modules.setdefault(name, imp.new_module(name))
+
+    # if this library and it's template instantiations have already been loaded
+    # into sys.modules, bail out after loading the defined symbols into
+    # 'namespace'
+    if hasattr(this_module, '__templates_loaded'):
+        if namespace is not None:
+            swig = namespace.setdefault('swig', imp.new_module('swig'))
+            swig.__dict__.update(this_module.swig.__dict__)
+
+            # don't worry about overwriting the symbols in namespace -- any
+            # common symbols should be of type itkTemplate, which is a
+            # singleton type. That is, they are all identical, so replacing one
+            # with the other isn't a problem.
+            for k, v in this_module.__dict__.items():
+                if not (k.startswith('_') or k == 'swig'):
+                    namespace[k] = v
+        return
+
+    # We're definitely going to load the templates. We set templates_loaded
+    # here instead of at the end of the file to protect against cyclical
+    # dependencies that could kill the recursive lookup below.
+    this_module.__templates_loaded = True
+
+    # For external projects :
+    # If this_module name (variable name) is in the module_data dictionnary,
+    # then this_module is an installed module (or a previously loaded module).
+    # Otherwise, it may come from an external project. In this case, we must
+    # search the Configuration/<name>Config.py file of this project.
     try:
-      # for a linux tree
-      execfile(os.path.join(path, 'Configuration', name + 'Config.py'), data)
+        module_data[name]
     except:
-      try:
-        # for a windows tree
-        execfile(os.path.join(path, '..', 'Configuration', name + 'Config.py'), data)
-      except:
-        data=None
-    if(data):
-      module_data[name] = data
-
-  # Now, we we definitely need to load the template instantiations from the
-  # named module, and possibly also load the underlying SWIG module. Before we
-  # can load the template instantiations of this module, we need to load those
-  # of the modules on which this one depends. Ditto for the SWIG modules.
-  # So, we recursively satisfy the dependencies of named module and create the
-  # template instantiations.
-  # Dependencies are looked up from the auto-generated configuration files, via
-  # the module_data instance defined at the bottom of this file, which knows how
-  # to find those configuration files.
-  data = module_data[name]
-  if data:
-    deps = list(data['depends'])
-    deps.sort()
-    for dep in deps:
-      LoadModule(dep, namespace)
-
-  if itkConfig.ImportCallback: itkConfig.ImportCallback(name, 0)
-
-  # SWIG-generated modules have 'Python' appended. Only load the SWIG module if
-  # we haven't already.
-  swigModuleName = name + "Python"
-  loader = LibraryLoader()
-  if not swigModuleName in sys.modules: module = loader.load(swigModuleName)
-
-  # OK, now the modules on which this one depends are loaded and template-instantiated,
-  # and the SWIG module for this one is also loaded.
-  # We're going to put the things we load and create in two places: the optional
-  # 'namespace' parameter, and the this_module variable's namespace.
-
-  # make a new 'swig' sub-module for this_module. Also look up or create a
-  # different 'swig' module for 'namespace'. Since 'namespace' may be used to
-  # collect symbols from multiple different ITK modules, we don't want to
-  # stomp on an existing 'swig' module, nor do we want to share 'swig' modules
-  # between this_module and namespace.
-
-  this_module.swig = imp.new_module('swig')
-  if namespace is not None: swig = namespace.setdefault('swig', imp.new_module('swig'))
-  for k, v in module.__dict__.items():
-    if not k.startswith('__'): setattr(this_module.swig, k, v)
-    if namespace is not None and not k.startswith('__'): setattr(swig, k, v)
-
-  data = module_data[name]
-  if data:
-    for template in data['templates']:
-      if len(template) == 4:
-        # this is a template description
-        pyClassName, cppClassName, swigClassName, templateParams = template
-        # It doesn't matter if an itkTemplate for this class name already exists
-        # since every instance of itkTemplate with the same name shares the same
-        # state. So we just make a new instance and add the new templates.
-        templateContainer = itkTemplate.itkTemplate(cppClassName)
-        try:
-          templateContainer.__add__(templateParams, getattr(module, swigClassName))
-          setattr(this_module, pyClassName, templateContainer)
-          if namespace is not None:
-            current_value = namespace.get(pyClassName)
-            if current_value != None and current_value != templateContainer:
-              DebugPrintError("Namespace already has a value for %s, which is not an itkTemplate instance for class %s. Overwriting old value." %(pyClassName, cppClassName))
-            namespace[pyClassName] = templateContainer
-        except Exception, e:
-          DebugPrintError("%s not loaded from module %s because of exception:\n %s" %(swigClassName, name, e))
-
-      else:
-        # this is a description of a non-templated class
-        pyClassName, cppClassName, swigClassName = template
+        file = inspect.getfile(this_module)
+        path = os.path.dirname(file)
+
+        data = {}
+        conf = name + 'Config.py'
         try:
-          swigClass = getattr(module, swigClassName)
-          itkTemplate.registerNoTpl(cppClassName, swigClass)
-          setattr(this_module, pyClassName, swigClass)
-          if namespace is not None:
-            current_value = namespace.get(pyClassName)
-            if current_value != None and current_value != swigClass:
-              DebugPrintError("Namespace already has a value for %s, which is not class %s. Overwriting old value." %(pyClassName, cppClassName))
-            namespace[pyClassName] = swigClass
-        except Exception, e:
-          DebugPrintError("%s not found in module %s because of exception:\n %s" %(swigClassName, name, e))
-
-  if itkConfig.ImportCallback: itkConfig.ImportCallback(name, 1)
+            # for a linux tree
+            execfile(os.path.join(path, 'Configuration', conf), data)
+        except:
+            try:
+                # for a windows tree
+                execfile(os.path.join(path, '..', 'Configuration', conf), data)
+            except:
+                data = None
+        if(data):
+            module_data[name] = data
+
+    # Now, we definitely need to load the template instantiations from the
+    # named module, and possibly also load the underlying SWIG module. Before
+    # we can load the template instantiations of this module, we need to load
+    # those of the modules on which this one depends. Ditto for the SWIG
+    # modules.
+    # So, we recursively satisfy the dependencies of named module and create
+    # the template instantiations.
+    # Dependencies are looked up from the auto-generated configuration files,
+    # via the module_data instance defined at the bottom of this file, which
+    # knows how to find those configuration files.
+    data = module_data[name]
+    if data:
+        deps = sorted(data['depends'])
+        for dep in deps:
+            LoadModule(dep, namespace)
+
+    if itkConfig.ImportCallback:
+        itkConfig.ImportCallback(name, 0)
+
+    # SWIG-generated modules have 'Python' appended. Only load the SWIG module
+    # if we haven't already.
+    swigModuleName = name + "Python"
+    loader = LibraryLoader()
+    if not swigModuleName in sys.modules:
+        module = loader.load(swigModuleName)
+
+    # OK, now the modules on which this one depends are loaded and
+    # template-instantiated, and the SWIG module for this one is also loaded.
+    # We're going to put the things we load and create in two places: the
+    # optional 'namespace' parameter, and the this_module variable's namespace.
+
+    # make a new 'swig' sub-module for this_module. Also look up or create a
+    # different 'swig' module for 'namespace'. Since 'namespace' may be used to
+    # collect symbols from multiple different ITK modules, we don't want to
+    # stomp on an existing 'swig' module, nor do we want to share 'swig'
+    # modules between this_module and namespace.
+
+    this_module.swig = imp.new_module('swig')
+    if namespace is not None:
+        swig = namespace.setdefault('swig', imp.new_module('swig'))
+    for k, v in module.__dict__.items():
+        if not k.startswith('__'):
+            setattr(this_module.swig, k, v)
+        if namespace is not None and not k.startswith('__'):
+            setattr(swig, k, v)
+
+    data = module_data[name]
+    if data:
+        for template in data['templates']:
+            if len(template) == 4:
+                # This is a template description
+                pyClassName, cppClassName, swigClassName, templateParams = \
+                    template
+                # It doesn't matter if an itkTemplate for this class name
+                # already exists since every instance of itkTemplate with the
+                # same name shares the same state. So we just make a new
+                # instance and add the new templates.
+                templateContainer = itkTemplate.itkTemplate(cppClassName)
+                try:
+                    templateContainer.__add__(
+                        templateParams, getattr(module, swigClassName))
+                    setattr(this_module, pyClassName, templateContainer)
+                    if namespace is not None:
+                        curval = namespace.get(pyClassName)
+                        if curval is not None and curval != templateContainer:
+                            DebugPrintError("Namespace already has a value for"
+                                            " %s, which is not an itkTemplate"
+                                            "instance for class %s. "
+                                            "Overwriting old value."
+                                            % (pyClassName, cppClassName))
+                        namespace[pyClassName] = templateContainer
+                except Exception as e:
+                    DebugPrintError("%s not loaded from module %s because of "
+                                    "exception:\n %s"
+                                    % (swigClassName, name, e))
+
+            else:
+                # this is a description of a non-templated class
+                pyClassName, cppClassName, swigClassName = template
+                try:
+                    swigClass = getattr(module, swigClassName)
+                    itkTemplate.registerNoTpl(cppClassName, swigClass)
+                    setattr(this_module, pyClassName, swigClass)
+                    if namespace is not None:
+                        curval = namespace.get(pyClassName)
+                        if curval is not None and curval != swigClass:
+                            DebugPrintError("Namespace already has a value for"
+                                            " %s, which is not class %s. "
+                                            "Overwriting old value."
+                                            % (pyClassName, cppClassName))
+                        namespace[pyClassName] = swigClass
+                except Exception as e:
+                    DebugPrintError("%s not found in module %s because of "
+                                    "exception:\n %s"
+                                    % (swigClassName, name, e))
+
+    if itkConfig.ImportCallback:
+        itkConfig.ImportCallback(name, 1)
+
 
 def DebugPrintError(error):
-  if itkConfig.DebugLevel == itkConfig.WARN:
-    print >> sys.stderr, error
-  elif itkConfig.DebugLevel == itkConfig.ERROR:
-    raise RuntimeError(error)
+    if itkConfig.DebugLevel == itkConfig.WARN:
+        print(error, file=sys.stderr)
+    elif itkConfig.DebugLevel == itkConfig.ERROR:
+        raise RuntimeError(error)
+
 
 class LibraryLoader(object):
-  """Do all the work to set up the environment so that a SWIG-generated library
-  can be properly loaded. This invloves setting paths, etc., defined in itkConfig."""
-
-  # To share symbols across extension modules, we must set
-  #     sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
-  #
-  # Since RTLD_NOW==0x002 and RTLD_GLOBAL==0x100 very commonly
-  # we will just guess that the proper flags are 0x102 when there
-  # is no dl module. On darwin (where there is not yet a dl module)
-  # we need different flags because RTLD_GLOBAL = 0x008.
-  darwin_dlopenflags  = 0xA
-  generic_dlopenflags = 0x102
-
-  if sys.platform.startswith('darwin'):
-    dlopenflags = darwin_dlopenflags
-  elif sys.platform.startswith('win'):
-    dlopenflags = None
-  else:
-    dlopenflags = generic_dlopenflags
-  # now try to refine the dlopenflags if we have a dl module.
-  try:
-    import dl
-    dlopenflags = dl.RTLD_NOW|dl.RTLD_GLOBAL
-  except:
-    pass
-
-
-  def setup(self):
-    self.old_cwd = os.getcwd()
-    try:
-      os.chdir(itkConfig.swig_lib)
-    except OSError:
-      # silently pass to avoid the case where the dir is not there
-      pass
-    self.old_path = sys.path
-    sys.path = [itkConfig.swig_lib, itkConfig.swig_py] + sys.path
-    try:
-      self.old_dlopenflags = sys.getdlopenflags()
-      sys.setdlopenflags(self.dlopenflags)
-    except:
-      self.old_dlopenflags = None
 
-  def load(self, name):
-    self.setup()
-    try:
-      fp = None # needed in case next line raises exception, so that finally block works
-      fp, pathname, description = imp.find_module(name)
-      return imp.load_module(name, fp, pathname, description)
-    finally:
-      # Since we may exit via an exception, close fp explicitly.
-      if fp: fp.close()
-      self.cleanup()
-
-  def cleanup(self):
-    os.chdir(self.old_cwd)
-    sys.path = self.old_path
-    if self.old_dlopenflags:
-      try: sys.setdlopenflags(self.old_dlopenflags)
-      except: pass
+    """Do all the work to set up the environment so that a SWIG-generated
+    library can be properly loaded. This invloves setting paths defined in
+    itkConfig."""
+
+    def setup(self):
+        self.old_cwd = os.getcwd()
+        try:
+            os.chdir(itkConfig.swig_lib)
+        except OSError:
+            # silently pass to avoid the case where the dir is not there
+            pass
+        self.old_path = sys.path
+        sys.path = [itkConfig.swig_lib, itkConfig.swig_py] + sys.path
+
+    def load(self, name):
+        self.setup()
+        try:
+            # needed in case next line raises exception, so that finally block
+            # works
+            fp = None
+            fp, pathname, description = imp.find_module(name)
+            return imp.load_module(name, fp, pathname, description)
+        finally:
+            # Since we may exit via an exception, close fp explicitly.
+            if fp:
+                fp.close()
+            self.cleanup()
+
+    def cleanup(self):
+        os.chdir(self.old_cwd)
+        sys.path = self.old_path
 
 
 # Make a list of all know modules (described in *Config.py files in the
@@ -231,12 +239,13 @@ class LibraryLoader(object):
 dirs = [p for p in itkConfig.path if os.path.isdir(p)]
 module_data = {}
 for d in dirs:
-  known_modules = [f[:-9] for f in os.listdir(d+os.sep+"Configuration") if f.endswith('Config.py')]
-  known_modules.sort()
-  sys.path.append(d)
-  sys.path.append(d+os.sep+".."+os.sep+"lib")
-
-  for module in known_modules:
-    data = {}
-    execfile(os.path.join(d+os.sep+"Configuration", module + 'Config.py'), data)
-    module_data[module] = data
+    files = os.listdir(d + os.sep + "Configuration")
+    known_modules = sorted([f[:-9] for f in files if f.endswith('Config.py')])
+    sys.path.append(d)
+    sys.path.append(d + os.sep + ".." + os.sep + "lib")
+
+    for module in known_modules:
+        data = {}
+        conf = module + 'Config.py'
+        execfile(os.path.join(d + os.sep + "Configuration", conf), data)
+        module_data[module] = data
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itkData.py b/Utilities/ITK/Wrapping/Generators/Python/itkData.py
new file mode 100644
index 0000000..ff543aa
--- /dev/null
+++ b/Utilities/ITK/Wrapping/Generators/Python/itkData.py
@@ -0,0 +1,42 @@
+#==========================================================================
+#
+#   Copyright Insight Software Consortium
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#          http://www.apache.org/licenses/LICENSE-2.0.txt
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#==========================================================================*/
+
+import itkBase
+import sys
+import os
+
+# Put the ITK_DATA_ROOT setting in the global namespace.  This
+# package is only used for testing, so this is okay.
+
+ITK_DATA_ROOT = ""
+
+# Look for the -D command line option.
+if not ITK_DATA_ROOT:
+    for a in range(len(sys.argv)):
+        if sys.argv[a] == "-D" and a < len(sys.argv):
+            ITK_DATA_ROOT = sys.argv[a + 1]
+            break
+
+# Check for the environment variable ::ITK_DATA_ROOT.
+if not ITK_DATA_ROOT and 'ITK_DATA_ROOT' in os.environ:
+    ITK_DATA_ROOT = os.environ['ITK_DATA_ROOT']
+
+
+# Use the default output directory.
+if not ITK_DATA_ROOT:
+    ITK_DATA_ROOT = itkBase.defaultDataRoot
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itkExtras.py b/Utilities/ITK/Wrapping/Generators/Python/itkExtras.py
new file mode 100644
index 0000000..8b2c585
--- /dev/null
+++ b/Utilities/ITK/Wrapping/Generators/Python/itkExtras.py
@@ -0,0 +1,1035 @@
+#==========================================================================
+#
+#   Copyright Insight Software Consortium
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#          http://www.apache.org/licenses/LICENSE-2.0.txt
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#==========================================================================*/
+
+from __future__ import print_function
+
+# The following line defines an ascii string used for dynamically refreshing
+# the import and progress callbacks on the same terminal line.
+# See http://www.termsys.demon.co.uk/vtansi.htm
+# \033 is the C-style octal code for an escape character
+# [2000D moves the cursor back 2000 columns, this is a brute force way of
+# getting to the start of the line.
+# [K erases the end of the line
+clrLine = "\033[2000D\033[K"
+
+
+def auto_not_in_place(v=True):
+    """Force it to not run in place
+    """
+    import itkConfig
+    itkConfig.NotInPlace = v
+
+
+def auto_progress(progressType=1):
+    """Set up auto progress report
+
+    progressType:
+        1 or True -> auto progress be used in a terminal
+        2 -> simple auto progress (without special characters)
+        0 or False -> disable auto progress
+    """
+    import itkConfig
+
+    if progressType is True or progressType == 1:
+        itkConfig.ImportCallback = terminal_import_callback
+        itkConfig.ProgressCallback = terminal_progress_callback
+
+    elif progressType == 2:
+        itkConfig.ImportCallback = simple_import_callback
+        itkConfig.ProgressCallback = simple_progress_callback
+
+    elif progressType is False or progressType == 0:
+        itkConfig.ImportCallback = None
+        itkConfig.ProgressCallback = None
+
+    else:
+        raise ValueError("Invalid auto progress type: " + repr(progressType))
+
+
+def terminal_progress_callback(name, p):
+    """Display the progress of an object and clean the display once complete
+
+    This function can be used with itkConfig.ProgressCallback
+    """
+    import sys
+    print(clrLine + "%s: %f" % (name, p), file=sys.stderr)
+    if p == 1:
+        print(clrLine, file=sys.stderr)
+
+
+def terminal_import_callback(name, p):
+    """Display the loading of a module and clean the display once complete
+
+    This function can be used with itkConfig.ImportCallback
+    """
+    import sys
+    print(clrLine + "Loading %s..." % name, file=sys.stderr)
+    if p == 1:
+        print(clrLine, file=sys.stderr)
+
+
+def simple_import_callback(name, p):
+    """Print a message when a module is loading
+
+    This function can be used with itkConfig.ImportCallback
+    """
+    import sys
+    if p == 0:
+        print("Loading %s..." % name, file=sys.stderr)
+    elif p == 1:
+        print("done", file=sys.stderr)
+
+
+def simple_progress_callback(name, p):
+    """Print a message when an object is running
+
+    This function can be used with itkConfig.ProgressCallback
+    """
+    import sys
+    if p == 0:
+        print("Running %s..." % name, file=sys.stderr)
+    elif p == 1:
+        print("done", file=sys.stderr)
+
+
+def force_load():
+    """force itk to load all the submodules"""
+    import itk
+    for k in dir(itk):
+        getattr(itk, k)
+
+
+import sys
+
+
+def echo(object, f=sys.stderr):
+    """Print an object is f
+
+    If the object has a method Print(), this method is used.
+    repr(object) is used otherwise
+    """
+    print(f, object)
+del sys
+
+
+def size(imageOrFilter):
+    """Return the size of an image, or of the output image of a filter
+
+    This method take care of updating the needed informations
+    """
+    # we don't need the entire output, only its size
+    imageOrFilter.UpdateOutputInformation()
+    img = output(imageOrFilter)
+    return img.GetLargestPossibleRegion().GetSize()
+
+
+def physical_size(imageOrFilter):
+    """Return the physical size of an image, or of the output image of a filter
+
+    This method take care of updating the needed informations
+    """
+    # required because range is overladed in this module
+    from __builtin__ import range
+    spacing_ = spacing(imageOrFilter)
+    size_ = size(imageOrFilter)
+    result = []
+    for i in range(0, spacing_.Size()):
+        result.append(spacing_.GetElement(i) * size_.GetElement(i))
+    return result
+
+
+def spacing(imageOrFilter):
+    """Return the spacing of an image, or of the output image of a filter
+
+    This method take care of updating the needed informations
+    """
+    # we don't need the entire output, only its size
+    imageOrFilter.UpdateOutputInformation()
+    img = output(imageOrFilter)
+    return img.GetSpacing()
+
+
+def origin(imageOrFilter):
+    """Return the origin of an image, or of the output image of a filter
+
+    This method take care of updating the needed informations
+    """
+    # we don't need the entire output, only its size
+    imageOrFilter.UpdateOutputInformation()
+    img = output(imageOrFilter)
+    return img.GetOrigin()
+
+
+def index(imageOrFilter):
+    """Return the index of an image, or of the output image of a filter
+
+    This method take care of updating the needed informations
+    """
+    # we don't need the entire output, only its size
+    imageOrFilter.UpdateOutputInformation()
+    img = output(imageOrFilter)
+    return img.GetLargestPossibleRegion().GetIndex()
+
+
+def region(imageOrFilter):
+    """Return the region of an image, or of the output image of a filter
+
+    This method take care of updating the needed informations
+    """
+    # we don't need the entire output, only its size
+    imageOrFilter.UpdateOutputInformation()
+    img = output(imageOrFilter)
+    return img.GetLargestPossibleRegion()
+
+
+# return an image
+from itkTemplate import image, output
+
+
+def template(cl):
+    """Return the template of a class (or of the class of an object) and
+    its parameters
+
+    template() returns a tuple with 2 elements:
+        - the first one is the itkTemplate object
+        - the second is a tuple containing the template parameters
+    """
+    from itkTemplate import itkTemplate
+    return itkTemplate.__class_to_template__[class_(cl)]
+
+
+def ctype(s):
+    """Return the c type corresponding to the string passed in parameter
+
+    The string can contain some extra spaces.
+    see also itkCType
+    """
+    from itkTypes import itkCType
+    ret = itkCType.GetCType(" ".join(s.split()))
+    if ret is None:
+        raise KeyError("Unrecognized C type '%s'" % s)
+    return ret
+
+
+def class_(obj):
+    """Return a class from an object
+
+    Often in itk, the __class__ is not what the user is expecting.
+    class_() should do a better job
+    """
+    import inspect
+    if inspect.isclass(obj):
+        # obj is already a class !
+        return obj
+    else:
+        return obj.__class__
+
+
+def range(imageOrFilter):
+    """Return the range of values in a image of in the output image of a filter
+
+    The minimum and maximum values are returned in a tuple: (min, max)
+    range() take care of updating the pipeline
+    """
+    import itk
+    img = output(imageOrFilter)
+    img.UpdateOutputInformation()
+    img.Update()
+    # don't put that calculator in the automatic pipeline
+    tmp_auto_pipeline = auto_pipeline.current
+    auto_pipeline.current = None
+    comp = itk.MinimumMaximumImageCalculator[img].New(Image=img)
+    auto_pipeline.current = tmp_auto_pipeline
+    comp.Compute()
+    return (comp.GetMinimum(), comp.GetMaximum())
+
+
+def write(imageOrFilter, fileName, compression=False):
+    """Write a image or the output image of a filter to filename
+
+    The writer is instantiated with the image type of the image in
+    parameter (or, again, with the output image of the filter in parameter)
+    """
+    import itk
+    img = output(imageOrFilter)
+    img.UpdateOutputInformation()
+    # don't put that writer in the automatic pipeline
+    tmp_auto_pipeline = auto_pipeline.current
+    auto_pipeline.current = None
+    writer = itk.ImageFileWriter[img].New(
+        Input=img,
+        FileName=fileName,
+        UseCompression=compression)
+    auto_pipeline.current = tmp_auto_pipeline
+    writer.Update()
+
+
+def search(s, case_sensitive=False):  # , fuzzy=True):
+    """Search for a class name in the itk module.
+    """
+    s = s.replace(" ", "")
+    if not case_sensitive:
+        s = s.lower()
+    import itk
+    names = sorted(dir(itk))
+    # exact match first
+    if case_sensitive:
+        res = [n for n in names if s == n]
+    else:
+        res = [n for n in names if s == n.lower()]
+    # then exact match inside the name
+    if case_sensitive:
+        res += [n for n in names if s in n and s != n]
+    else:
+        res += [n for n in names if s in n.lower() and s != n.lower()]
+#     if fuzzy:
+#         try:
+# everything now requires editdist
+#             import editdist
+#             if case_sensitive:
+#                 res.sort(key=lambda x: editdist.distance(x, s))
+#             else:
+#                 res.sort(key=lambda x: (editdist.distance(x.lower(), s), x))
+#         except:
+#             pass
+    return res
+
+
+def set_inputs(newItkObject, args=[], kargs={}):
+    """Set the inputs of the given objects, according to the non named or the
+    named parameters in args and kargs
+
+    This function tries to assign all the non named parameters in the input of
+    the newItkObject
+    - the first non named parameter in the first input, etc.
+
+    The named parameters are used by calling the method with the same name
+    prefixed by 'Set'.
+    set_inputs( obj, kargs={'Threshold': 10} ) calls obj.SetThreshold(10)
+
+    This is the function use in the enhanced New() method to manage the inputs.
+    It can be used to produce a similar behavior:
+
+    def SetInputs(self, *args, **kargs):
+        import itk
+        itk.set_inputs(self, *args, **kargs)
+    """
+    # try to get the images from the filters in args
+    args = [output(arg) for arg in args]
+
+    # args without name are filter used to set input image
+    #
+    # count SetInput calls to call SetInput, SetInput2, SetInput3, ...
+    # usefull with filter which take 2 input (or more) like SubstractImageFiler
+    # Ex: substract image2.png to image1.png and save the result in result.png
+    # r1 = itk.ImageFileReader.US2.New(FileName='image1.png')
+    # r2 = itk.ImageFileReader.US2.New(FileName='image2.png')
+    # s = itk.SubtractImageFilter.US2US2US2.New(r1, r2)
+    # itk.ImageFileWriter.US2.New(s, FileName='result.png').Update()
+    try:
+        for setInputNb, arg in enumerate(args):
+            methodName = 'SetInput%i' % (setInputNb + 1)
+            if methodName in dir(newItkObject):
+                # first try to use methods called SetInput1, SetInput2, ...
+                # those method should have more chances to work in case of
+                # multiple input types
+                getattr(newItkObject, methodName)(arg)
+            else:
+                # no method called SetInput?
+                # try with the standard SetInput(nb, input)
+                newItkObject.SetInput(setInputNb, arg)
+    except TypeError as e:
+        # the exception have (at least) to possible reasons:
+        # + the filter don't take the input number as first argument
+        # + arg is an object of wrong type
+        #
+        # if it's not the first input, re-raise the exception
+        if setInputNb != 0:
+            raise e
+        # it's the first input, try to use the SetInput() method without input
+        # number
+        newItkObject.SetInput(args[0])
+        # but raise an exception if there is more than 1 argument
+        if len(args) > 1:
+            raise TypeError('Object accept only 1 input.')
+    except AttributeError:
+        # There is no SetInput() method, try SetImage
+        # but before, check the number of inputs
+        if len(args) > 1:
+            raise TypeError('Object accept only 1 input.')
+        methodList = ['SetImage', 'SetInputImage']
+        methodName = None
+        for m in methodList:
+            if m in dir(newItkObject):
+                methodName = m
+        if methodName:
+            getattr(newItkObject, methodName)(args[0])
+        else:
+            raise AttributeError('No method found to set the input.')
+
+    # named args : name is the function name, value is argument(s)
+    for attribName, value in kargs.iteritems():
+        # use Set as prefix. It allow to use a shorter and more intuitive
+        # call (Ex: itk.ImageFileReader.UC2.New(FileName='image.png')) than
+        # with the full name
+        # (Ex: itk.ImageFileReader.UC2.New(SetFileName='image.png'))
+        if attribName not in ["auto_progress", "template_parameters"]:
+            attrib = getattr(newItkObject, 'Set' + attribName)
+            attrib(value)
+
+
+def show(input, **kargs):
+    """display an image
+    """
+    import itk
+    img = output(input)
+    if img.GetImageDimension() == 3 and "show3D" in dir(itk):
+        return itk.show3D(input, **kargs)
+    else:
+        # print("2D not supported yet, use the 3D viewer.")
+        return show2D(input, **kargs)
+
+
+class show2D:
+
+    """Display a 2D image
+    """
+
+    def __init__(self, imageOrFilter, Label=False, Title=None):
+        import tempfile
+        import itk
+        import os
+        import platform
+        # get some data from the environment
+        command = os.environ.get("WRAPITK_SHOW2D_COMMAND")
+        if command is None:
+            if platform.system() == "Darwin":
+                command = (
+                    "open -a ImageJ -n --args -eval 'open(\"%(image)s\"); "
+                    "run (\"View 100%%\"); rename(\"%(title)s\");'")
+            else:
+                command = (
+                    "imagej %(image)s -run 'View 100%%' -eval "
+                    "'rename(\"%(title)s\")' &")
+
+        label_command = os.environ.get("WRAPITK_SHOW2D_LABEL_COMMAND")
+        if label_command is None:
+            if platform.system() == "Darwin":
+                label_command = (
+                    "open -a ImageJ -n --args -eval 'open(\"%(image)s\"); "
+                    "run (\"View 100%%\"); rename(\"%(title)s\"); "
+                    "run(\"3-3-2 RGB\");'")
+            else:
+                label_command = (
+                    "imagej %(image)s -run 'View 100%%' -eval "
+                    "'rename(\"%(title)s\")' -run '3-3-2 RGB' &")
+
+        compress = os.environ.get(
+            "WRAPITK_SHOW2D_COMPRESS",
+            "true").lower() in ["on", "true", "yes", "1"]
+        extension = os.environ.get("WRAPITK_SHOW2D_EXTENSION", ".tif")
+
+        # use the tempfile module to get a non used file name and to put
+        # the file at the rignt place
+        self.__tmpFile__ = tempfile.NamedTemporaryFile(suffix=extension)
+        # get an updated image
+        img = output(imageOrFilter)
+        img.UpdateOutputInformation()
+        img.Update()
+        if Title is None:
+            # try to generate a title
+            s = img.GetSource()
+            if s:
+                s = itk.down_cast(s)
+                if hasattr(img, "GetSourceOutputIndex"):
+                    o = '[%s]' % img.GetSourceOutputIndex()
+                elif hasattr(img, "GetSourceOutputName"):
+                    o = '[%s]' % img.GetSourceOutputName()
+                else:
+                    o = ""
+                Title = "%s%s" % (s.__class__.__name__, o)
+            else:
+                Title = img.__class__.__name__
+            try:
+                import IPython.ipapi
+                ip = IPython.ipapi.get()
+                if ip is not None:
+                    names = []
+                    ref = imageOrFilter
+                    if s:
+                        ref = s
+                    for n, v in ip.user_ns.iteritems():
+                        if isinstance(v, itk.LightObject) and v == ref:
+                            names.append(n)
+                    if names != []:
+                        Title = ", ".join(names) + " - " + Title
+            except ImportError:
+                # just do nothing
+                pass
+        # change the LabelMaps to an Image, so we can look at them easily
+        if 'LabelMap' in dir(itk) and img.GetNameOfClass() == 'LabelMap':
+            # retreive the biggest label in the label map
+            maxLabel = img.GetNthLabelObject(
+                img.GetNumberOfLabelObjects() - 1).GetLabel()
+            # search for a filter to convert the label map
+            lab = itk.LabelMapToLabelImageFilter.keys()
+            maxVal = itk.NumericTraits[itk.template(params[1])[1][0]].max()
+            cond = params[0] == class_(img) and maxVal >= maxLabel
+            label_image_type = sorted([params[1] for params in lab if cond])[0]
+            convert = itk.LabelMapToLabelImageFilter[
+                img, label_image_type].New(img)
+            convert.Update()
+            img = convert.GetOutput()
+            # this is a label image - force the parameter
+            Label = True
+        write(img, self.__tmpFile__.name, compress)
+        # now run imview
+        import os
+        if Label:
+            os.system(
+                label_command %
+                {"image": self.__tmpFile__.name, "title": Title})
+        else:
+            os.system(
+                command %
+                {"image": self.__tmpFile__.name, "title": Title})
+
+
+class templated_class:
+
+    """This class is used to mimic the behavior of the templated C++ classes.
+
+    It is used that way:
+
+    class CustomClass:
+        # class definition here
+    CustomClass = templated_class(CustomClass)
+
+    customObject = CustomClass[template, parameters].New()
+
+    The template parameters are passed to the custom class constructor as a
+    named parameter 'template_parameters' in a tuple.
+
+    The custom class may implement a static method
+    check_template_parameters(parameters) which should raise an exception if
+    the template parameters provided are not suitable to instantiate the custom
+    class.
+    """
+
+    def __init__(self, cls):
+        """cls is the custom class
+        """
+        self.__cls__ = cls
+        self.__templates__ = {}
+
+    def New(self, *args, **kargs):
+        """Use the parameters to infer the types of the template parameters.
+        """
+        # extract the types from the arguments to instantiate the class
+        import itk
+        types = tuple(itk.class_(o) for o in args)
+        return self[types].New(*args, **kargs)
+
+    def __getitem__(self, template_parameters):
+        """Return a pair class-template parameters ready to be instantiated.
+
+        The template parameters may be validated if the custom class provide
+        the static method check_template_parameters(parameters).
+        """
+        if not isinstance(template_parameters, tuple):
+            template_parameters = (template_parameters,)
+        return (
+            templated_class.__templated_class_and_parameters__(
+                self,
+                template_parameters)
+        )
+
+    def check_template_parameters(self, template_parameters):
+        """Check the template parameters passed in parameter.
+        """
+        # this method is there mainly to make possible to reuse it in the
+        # custom class constructor after having used templated_class().
+        # Without that, the following example doesn't work:
+        #
+        # class CustomClass:
+        #     def __init__(self, *args, **kargs):
+        #         template_parameters = kargs["template_parameters"]
+        #         CustomClass.check_template_parameters(template_parameters)
+        # other init stuff
+        #     def check_template_parameters(template_parameters):
+        # check, really
+        #         pass
+        #    CustomClass = templated_class(CustomClass)
+        #
+        self.__cls__.check_template_parameters(template_parameters)
+
+    def add_template(self, name, params):
+        if not isinstance(params, list) and not isinstance(params, tuple):
+            params = (params,)
+        params = tuple(params)
+        val = self[params]
+        self.__templates__[params] = val
+        setattr(self, name, val)
+
+    def add_image_templates(self, *args):
+        import itk
+        if args == []:
+            return
+        combinations = [[t] for t in args[0]]
+        for types in args[1:]:
+            temp = []
+            for t in types:
+                for c in combinations:
+                    temp.append(c + [t])
+            combinations = temp
+        for d in itk.DIMS:
+            for c in combinations:
+                parameters = []
+                name = ""
+                for t in c:
+                    parameters.append(itk.Image[t, d])
+                    name += "I" + t.short_name + str(d)
+                self.add_template(name, tuple(parameters))
+
+    class __templated_class_and_parameters__:
+
+        """Inner class used to store the pair class-template parameters ready
+        to instantiate.
+        """
+
+        def __init__(self, templated_class, template_parameters):
+            self.__templated_class__ = templated_class
+            self.__template_parameters__ = template_parameters
+            if "check_template_parameters" in dir(templated_class.__cls__):
+                templated_class.__cls__.check_template_parameters(
+                    template_parameters)
+
+        def New(self, *args, **kargs):
+            """A New() method to mimic the ITK default behavior, even if the
+            class doesn't provide any New() method.
+            """
+            kargs["template_parameters"] = self.__template_parameters__
+            if "New" in dir(self.__templated_class__.__cls__):
+                obj = self.__templated_class__.__cls__.New(*args, **kargs)
+            else:
+                obj = self.__templated_class__.__cls__(*args, **kargs)
+            setattr(
+                obj,
+                "__template_parameters__",
+                self.__template_parameters__)
+            setattr(obj, "__templated_class__", self.__templated_class__)
+            return obj
+
+        def __call__(self, *args, **kargs):
+            return self.New(*args, **kargs)
+
+    def keys(self):
+        return self.__templates__.keys()
+
+    # everything after this comment is for dict interface
+    # and is a copy/paste from DictMixin
+    # only methods to edit dictionary are not there
+    def __iter__(self):
+        for k in self.keys():
+            yield k
+
+    def has_key(self, key):
+        try:
+            value = self[key]
+        except KeyError:
+            return False
+        return True
+
+    def __contains__(self, key):
+        return key in self
+
+    # third level takes advantage of second level definitions
+    def iteritems(self):
+        for k in self:
+            yield (k, self[k])
+
+    def iterkeys(self):
+        return self.__iter__()
+
+    # fourth level uses definitions from lower levels
+    def itervalues(self):
+        for _, v in self.iteritems():
+            yield v
+
+    def values(self):
+        return [v for _, v in self.iteritems()]
+
+    def items(self):
+        return list(self.iteritems())
+
+    def get(self, key, default=None):
+        try:
+            return self[key]
+        except KeyError:
+            return default
+
+    def __len__(self):
+        return len(self.keys())
+
+
+class pipeline:
+
+    """A convenient class to store the reference to the filters of a pipeline
+
+    With this class, a method can create a pipeline of several filters and
+    return it without losing the references to the filters in this pipeline.
+    The pipeline object act almost like a filter (it has a GetOutput() method)
+    and thus can be simply integrated in another pipeline.
+    """
+
+    def __init__(self, *args, **kargs):
+        self.clear()
+        self.input = None
+        set_inputs(self, args, kargs)
+
+    def connect(self, filter):
+        """Connect a new filter to the pipeline
+
+        The output of the first filter will be used as the input of this
+        one and the filter passed as parameter will be added to the list
+        """
+        if self.GetOutput() is not None:
+            set_inputs(filter, [self.GetOutput()])
+        self.append(filter)
+
+    def append(self, filter):
+        """Add a new filter to the pipeline
+
+        The new filter will not be connected. The user must connect it.
+        """
+        self.filters.append(filter)
+
+    def clear(self):
+        """Clear the filter list
+        """
+        self.filters = []
+
+    def GetOutput(self, index=0):
+        """Return the output of the pipeline
+
+        If another output is needed, use
+        pipeline.filters[-1].GetAnotherOutput() instead of this method,
+        subclass pipeline to implement another GetOutput() method, or use
+        expose()
+        """
+        if len(self.filters) == 0:
+            return self.GetInput()
+        else:
+            filter = self.filters[-1]
+            if hasattr(filter, "__getitem__"):
+                return filter[index]
+            try:
+                return filter.GetOutput(index)
+            except:
+                if index == 0:
+                    return filter.GetOutput()
+                else:
+                    raise ValueError("Index can only be 0 on that object")
+
+    def SetInput(self, input):
+        """Set the input of the pipeline
+        """
+        if len(self.filters) != 0:
+            set_inputs(self.filters[0], [input])
+        self.input = input
+
+    def GetInput(self):
+        """Get the input of the pipeline
+        """
+        return self.input
+
+    def Update(self):
+        """Update the pipeline
+        """
+        if len(self.filters) > 0:
+            return self.filters[-1].Update()
+
+    def UpdateLargestPossibleRegion(self):
+        """Update the pipeline
+        """
+        if len(self.filters) > 0:
+            return self.filters[-1].UpdateLargestPossibleRegion()
+
+    def UpdateOutputInformation(self):
+        if "UpdateOutputInformation" in dir(self.filters[-1]):
+            self.filters[-1].UpdateOutputInformation()
+        else:
+            self.Update()
+
+    def __len__(self):
+        if len(self.filters) == 0:
+            return 1
+        else:
+            return self.filters[-1].GetNumberOfOutputs()
+
+    def __getitem__(self, item):
+        return self.GetOutput(item)
+
+    def __call__(self, *args, **kargs):
+        set_inputs(self, args, kargs)
+        self.UpdateLargestPossibleRegion()
+        return self
+
+    def expose(self, name, new_name=None, position=-1):
+        """Expose an attribute from a filter of the minipeline.
+
+        Once called, the pipeline instance has a new Set/Get set of methods to
+        access directly the corresponding method of one of the filter of the
+        pipeline.
+        Ex: p.expose( "Radius" )
+                p.SetRadius( 5 )
+                p.GetRadius( 5 )
+        By default, the attribute usable on the pipeline instance has the same
+        name than the one of the filter, but it can be changed by providing a
+        value to new_name.
+        The last filter of the pipeline is used by default, but another one may
+        be used by giving its position.
+        Ex: p.expose("Radius", "SmoothingNeighborhood", 2)
+            p.GetSmoothingNeighborhood()
+        """
+        if new_name is None:
+            new_name = name
+        src = self.filters[position]
+        ok = False
+        set_name = "Set" + name
+        if set_name in dir(src):
+            setattr(self, "Set" + new_name, getattr(src, set_name))
+            ok = True
+        get_name = "Get" + name
+        if get_name in dir(src):
+            setattr(self, "Get" + new_name, getattr(src, get_name))
+            ok = True
+        if not ok:
+            raise RuntimeError(
+                "No attribute %s at position %s." %
+                (name, position))
+
+
+class auto_pipeline(pipeline):
+    current = None
+
+    def __init__(self, *args, **kargs):
+        pipeline.__init__(self, *args, **kargs)
+        self.Start()
+
+    def Start(self):
+        auto_pipeline.current = self
+
+    def Stop(self):
+        auto_pipeline.current = None
+
+
+def down_cast(obj):
+    """Down cast an itkLightObject (or a object of a subclass) to its most
+    specialized type.
+    """
+    import itk
+    import itkTemplate
+    className = obj.GetNameOfClass()
+    t = getattr(itk, className)
+    if isinstance(t, itkTemplate.itkTemplate):
+        for c in t.values():
+            try:
+                return c.cast(obj)
+            except:
+                # fail silently for now
+                pass
+        raise RuntimeError(
+            "Can't downcast to a specialization of %s" %
+            className)
+    else:
+        return t.cast(obj)
+
+
+def attribute_list(i, name):
+    """Returns a list of the specified attributes for the objects in the image.
+
+    i: the input LabelImage
+    name: the attribute name
+    """
+    import itk
+    i = itk.output(i)
+    relabel = itk.StatisticsRelabelLabelMapFilter[i].New(
+        i,
+        Attribute=name,
+        ReverseOrdering=True,
+        InPlace=False)
+    relabel.UpdateLargestPossibleRegion()
+    r = relabel.GetOutput()
+    l = []
+    for i in range(1, r.GetNumberOfLabelObjects() + 1):
+        l.append(r.GetLabelObject(i).__getattribute__("Get" + name)())
+    return l
+
+
+def attributes_list(i, names):
+    """Returns a list of the specified attributes for the objects in the image.
+
+    i: the input LabelImage
+    name: the attribute name
+    """
+    import itk
+    i = itk.output(i)
+    relabel = itk.StatisticsRelabelLabelMapFilter[i].New(
+        i,
+        Attribute=names[0],
+        ReverseOrdering=True,
+        InPlace=False)
+    relabel.UpdateLargestPossibleRegion()
+    r = relabel.GetOutput()
+    l = []
+    for i in range(1, r.GetNumberOfLabelObjects() + 1):
+        attrs = []
+        for name in names:
+            attrs.append(r.GetLabelObject(i).__getattribute__("Get" + name)())
+        l.append(tuple(attrs))
+    return l
+
+
+def attribute_dict(i, name):
+    """Returns a dict with the attribute values in keys and a list of the
+    corresponding objects in value
+
+    i: the input LabelImage
+    name: the name of the attribute
+    """
+    import itk
+    i = itk.output(i)
+    relabel = itk.StatisticsRelabelLabelMapFilter[i].New(
+        i,
+        Attribute=name,
+        ReverseOrdering=True,
+        InPlace=False)
+    relabel.UpdateLargestPossibleRegion()
+    r = relabel.GetOutput()
+    d = {}
+    for i in range(1, r.GetNumberOfLabelObjects() + 1):
+        lo = r.GetLabelObject(i)
+        v = lo.__getattribute__("Get" + name)()
+        l = d.get(v, [])
+        l.append(lo)
+        d[v] = l
+    return d
+
+
+def number_of_objects(i):
+    """Returns the number of objets in the image.
+
+    i: the input LabelImage
+    """
+    import itk
+    i.UpdateLargestPossibleRegion()
+    i = itk.output(i)
+    return i.GetNumberOfLabelObjects()
+
+
+def ipython_kw_matches(text):
+    """Match named ITK object's named parameters"""
+    import IPython.ipapi
+    import itk
+    import re
+    import inspect
+    import itkTemplate
+    regexp = re.compile(r'''
+                    '.*?' |  # single quoted strings or
+                    ".*?" |  # double quoted strings or
+                    \w+     |  # identifier
+                    \S  # other characters
+                    ''', re.VERBOSE | re.DOTALL)
+    ip = IPython.ipapi.get()
+    if "." in text:  # a parameter cannot be dotted
+        return []
+    # 1. find the nearest identifier that comes before an unclosed
+    # parenthesis e.g. for "foo (1+bar(x), pa", the candidate is "foo".
+    # Use get_endidx() to find the indentifier at the cursor position
+    tokens = regexp.findall(
+        ip.IP.Completer.get_line_buffer()[:ip.IP.Completer.get_endidx()])
+    tokens.reverse()
+    iterTokens = iter(tokens)
+    openPar = 0
+    for token in iterTokens:
+        if token == ')':
+            openPar -= 1
+        elif token == '(':
+            openPar += 1
+            if openPar > 0:
+                # found the last unclosed parenthesis
+                break
+    else:
+        return []
+    # 2. Concatenate dotted names ("foo.bar" for "foo.bar(x, pa" )
+    ids = []
+    isId = re.compile(r'\w+$').match
+    while True:
+        try:
+            ids.append(iterTokens.next())
+            if not isId(ids[-1]):
+                ids.pop()
+                break
+            if not iterTokens.next() == '.':
+                break
+        except StopIteration:
+            break
+    # lookup the candidate callable matches either using global_matches
+    # or attr_matches for dotted names
+    if len(ids) == 1:
+        callableMatches = ip.IP.Completer.global_matches(ids[0])
+    else:
+        callableMatches = ip.IP.Completer.attr_matches('.'.join(ids[::-1]))
+    argMatches = []
+    for callableMatch in callableMatches:
+        # drop the .New at this end, so we can search in the class members
+        if callableMatch.endswith(".New"):
+            callableMatch = callableMatch[:-4]
+        try:
+            object = eval(callableMatch, ip.IP.Completer.namespace)
+            if isinstance(object, itkTemplate.itkTemplate):
+                # this is a template - lets grab the first entry to search for
+                # the methods
+                object = object.values()[0]
+            namedArgs = []
+            isin = isinstance(object, itk.LightObject)
+            issub = issubclass(object, itk.LightObject)
+            if isin or (inspect.isclass(object) and issub):
+                namedArgs = [n[3:] for n in dir(object) if n.startswith("Set")]
+        except Exception as e:
+            print(e)
+            continue
+        for namedArg in namedArgs:
+            if namedArg.startswith(text):
+                argMatches.append("%s=" % namedArg)
+    return argMatches
+
+# install progress callback and custom completer if we are in ipython
+# interpreter
+try:
+    import itkConfig
+    import IPython.ipapi
+    if IPython.ipapi.get():
+        IPython.ipapi.get().IP.Completer.matchers.insert(0, ipython_kw_matches)
+        itkConfig.ProgressCallback = terminal_progress_callback
+    # some cleanup
+    del itkConfig, IPython
+except ImportError:
+    # fail silently
+    pass
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itkExtras/CMakeLists.txt b/Utilities/ITK/Wrapping/Generators/Python/itkExtras/CMakeLists.txt
deleted file mode 100644
index 878e7ac..0000000
--- a/Utilities/ITK/Wrapping/Generators/Python/itkExtras/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copy python files for out-of-source builds, and set up install of same.
-
-# Create a list of Python files.
-# WrapITK/Python/itkExtras/*.py
-set(ITK_PYTHON_EXTRAS_FILES
-  __init__
-  )
-# Done listing files.
-
-# Now copy these files if necessary.
-set(ITK_WRAP_PYTHON_EXTRAS_INSTALL_FILES "")
-if("${WrapITK_BINARY_DIR}" MATCHES "^${WrapITK_SOURCE_DIR}$")
-  # In source build -- no need to copy Python file. Do need to set up the install.
-  foreach(file ${ITK_PYTHON_EXTRAS_FILES})
-    set(install_tgt "${CMAKE_CURRENT_SOURCE_DIR}/${file}.py")
-    set(ITK_WRAP_PYTHON_EXTRAS_INSTALL_FILES ${ITK_WRAP_PYTHON_EXTRAS_FILES} "${install_tgt}")
-  endforeach()
-else()
-  set(ITK_WRAP_PYTHON_EXTRAS_FILES)
-  add_custom_target(copy_python_extras_files ALL)
-  foreach(file ${ITK_PYTHON_EXTRAS_FILES})
-    set(src "${CMAKE_CURRENT_SOURCE_DIR}/${file}.py")
-    # recall that WRAP_ITK_BUILD_INTDIR expands to nothing if no config types are set,
-    # or to "CMAKE_CONFIG_INTDIR/" if there are such. Likewise, WRAP_ITK_INSTALL_INTDIR
-    # expands to ${BUILD_TYPE}/ or nothing.
-    set(copy_tgt "${CMAKE_CURRENT_BINARY_DIR}/${file}.py")
-    set(ITK_WRAP_PYTHON_EXTRAS_FILES ${ITK_WRAP_PYTHON_EXTRAS_FILES} "${copy_tgt}")
-    set(install_tgt "${CMAKE_CURRENT_BINARY_DIR}/${file}.py")
-    set(ITK_WRAP_PYTHON_EXTRAS_INSTALL_FILES ${ITK_WRAP_PYTHON_EXTRAS_INSTALL_FILES} "${install_tgt}")
-
-    # create the directory to avoid loosing case on windows
-    file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${WRAP_ITK_INSTALL_INTDIR}${path})
-
-    add_custom_command(SOURCE ${src}
-      COMMAND ${CMAKE_COMMAND}
-      ARGS -E copy ${src} ${copy_tgt}
-      OUTPUTS ${copy_tgt}
-      TARGET copy_python_extras_files
-      COMMENT "source copy")
-  endforeach()
-
-  # driver command to make the copy happen.
-  add_custom_command(
-    SOURCE copy_python_extras_files
-    DEPENDS ${ITK_WRAP_PYTHON_EXTRAS_FILES}
-    TARGET copy_python_extras_files)
-endif()
-
-# Install the package python files.
-WRAP_ITK_BINDINGS_INSTALL(/Python/itkExtras ${ITK_WRAP_PYTHON_EXTRAS_INSTALL_FILES})
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itkExtras/__init__.py b/Utilities/ITK/Wrapping/Generators/Python/itkExtras/__init__.py
deleted file mode 100644
index cea1b2f..0000000
--- a/Utilities/ITK/Wrapping/Generators/Python/itkExtras/__init__.py
+++ /dev/null
@@ -1,1029 +0,0 @@
-#==========================================================================
-#
-#   Copyright Insight Software Consortium
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#          http://www.apache.org/licenses/LICENSE-2.0.txt
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-#
-#==========================================================================*/
-
-# new features introduced by itk module
-# each new feature use a name in lower case
-clrLine = "\033[2000D\033[K"
-
-def auto_not_in_place( v=True ) :
-  """Force it to not run in place
-  """
-  import itkConfig
-  itkConfig.NotInPlace = v
-
-def auto_progress( progressType = 1 ):
-  """Set up auto progress report
-
-  progressType:
-    1 or True  -> auto progress be used in a terminal
-    2          -> simple auto progress (without special characters)
-    0 or False -> disable auto progress
-  """
-  import itkConfig
-
-  if progressType == True or progressType == 1 :
-    itkConfig.ImportCallback = terminal_import_callback
-    itkConfig.ProgressCallback = terminal_progress_callback
-
-  elif progressType == 2 :
-    itkConfig.ImportCallback = simple_import_callback
-    itkConfig.ProgressCallback = simple_progress_callback
-
-  elif progressType == False or progressType == 0 :
-    itkConfig.ImportCallback = None
-    itkConfig.ProgressCallback = None
-
-  else:
-    raise ValueError("Invalid auto progress type: "+repr(progressType))
-
-def terminal_progress_callback(name, p):
-  """Display the progress of an object and clean the display once complete
-
-  This function can be used with itkConfig.ProgressCallback
-  """
-  import sys
-  print >> sys.stderr, clrLine+"%s: %f" % (name, p),
-  if p == 1 :
-    print >> sys.stderr, clrLine,
-
-def terminal_import_callback(name, p):
-  """Display the loading of a module and clean the display once complete
-
-  This function can be used with itkConfig.ImportCallback
-  """
-  import sys
-  print >> sys.stderr, clrLine+"Loading %s..." % name,
-  if p == 1 :
-    print >> sys.stderr, clrLine,
-
-def simple_import_callback(name, p):
-  """Print a message when a module is loading
-
-  This function can be used with itkConfig.ImportCallback
-  """
-  import sys
-  if p == 0:
-    print >> sys.stderr, "Loading %s..." % name,
-  elif p == 1 :
-    print >> sys.stderr, "done"
-
-def simple_progress_callback(name, p):
-  """Print a message when an object is running
-
-  This function can be used with itkConfig.ProgressCallback
-  """
-  import sys
-  if p == 0 :
-    print >> sys.stderr, "Running %s..." % name,
-  elif p == 1 :
-    print >> sys.stderr, "done"
-
-
-def force_load():
-  """force itk to load all the submodules"""
-  import itk
-  for k in dir(itk):
-    getattr(itk, k)
-
-
-import sys
-def echo(object, f=sys.stderr) :
-   """Print an object is f
-
-   If the object has a method Print(), this method is used.
-   repr(object) is used otherwise
-   """
-   print >> f, object
-del sys
-
-
-def size(imageOrFilter) :
-  """Return the size of an image, or of the output image of a filter
-
-  This method take care of updating the needed informations
-  """
-  # we don't need the entire output, only its size
-  imageOrFilter.UpdateOutputInformation()
-  img = output(imageOrFilter)
-  return img.GetLargestPossibleRegion().GetSize()
-
-
-def physical_size(imageOrFilter) :
-  """Return the physical size of an image, or of the output image of a filter
-
-  This method take care of updating the needed informations
-  """
-  from __builtin__ import range # required because range is overladed in this module
-  spacing_ = spacing(imageOrFilter)
-  size_ = size(imageOrFilter)
-  result = []
-  for i in range(0, spacing_.Size()):
-    result.append( spacing_.GetElement(i) * size_.GetElement(i) )
-  return result
-
-
-def spacing(imageOrFilter) :
-  """Return the spacing of an image, or of the output image of a filter
-
-  This method take care of updating the needed informations
-  """
-  # we don't need the entire output, only its size
-  imageOrFilter.UpdateOutputInformation()
-  img = output(imageOrFilter)
-  return img.GetSpacing()
-
-
-def origin(imageOrFilter) :
-  """Return the origin of an image, or of the output image of a filter
-
-  This method take care of updating the needed informations
-  """
-  # we don't need the entire output, only its size
-  imageOrFilter.UpdateOutputInformation()
-  img = output(imageOrFilter)
-  return img.GetOrigin()
-
-
-def index(imageOrFilter) :
-  """Return the index of an image, or of the output image of a filter
-
-  This method take care of updating the needed informations
-  """
-  # we don't need the entire output, only its size
-  imageOrFilter.UpdateOutputInformation()
-  img = output(imageOrFilter)
-  return img.GetLargestPossibleRegion().GetIndex()
-
-
-def region(imageOrFilter) :
-  """Return the region of an image, or of the output image of a filter
-
-  This method take care of updating the needed informations
-  """
-  # we don't need the entire output, only its size
-  imageOrFilter.UpdateOutputInformation()
-  img = output(imageOrFilter)
-  return img.GetLargestPossibleRegion()
-
-
-def strel(dim, radius=1) :
-  """A method to create a ball structuring element
-  """
-  import itk
-  import sys
-  # print >> sys.stderr, "strel() is deprecated and will be removed in the next release"
-  return itk.FlatStructuringElement[dim].Ball(radius)
-
-# return an image
-from itkTemplate import image, output
-
-
-def template(cl) :
-  """Return the template of a class (or of the class of an object) and its parameters
-
-  template() returns a tuple with 2 elements:
-    - the first one is the itkTemplate object
-    - the second is a tuple containing the template parameters
-  """
-  from itkTemplate import itkTemplate
-  return itkTemplate.__class_to_template__[class_(cl)]
-
-
-def ctype(s) :
-  """Return the c type corresponding to the string passed in parameter
-
-  The string can contain some extra spaces.
-  see also itkCType
-  """
-  from itkTypes import itkCType
-  ret = itkCType.GetCType(" ".join(s.split()))
-  if ret == None :
-    raise KeyError("Unrecognized C type '%s'" % s)
-  return ret
-
-
-def class_(obj) :
-  """Return a class from an object
-
-  Often in itk, the __class__ is not what the user is expecting.
-  class_() should do a better job
-  """
-  import inspect
-  if inspect.isclass(obj) :
-    # obj is already a class !
-    return obj
-  else :
-    return obj.__class__
-
-
-def range(imageOrFilter) :
-  """Return the range of values in a image of in the output image of a filter
-
-  The minimum and maximum values are returned in a tuple: (min, max)
-  range() take care of updating the pipeline
-  """
-  import itk
-  img = output(imageOrFilter)
-  img.UpdateOutputInformation()
-  img.Update()
-  # don't put that calculator in the automatic pipeline
-  tmp_auto_pipeline = auto_pipeline.current
-  auto_pipeline.current = None
-  comp = itk.MinimumMaximumImageCalculator[img].New(Image=img)
-  auto_pipeline.current = tmp_auto_pipeline
-  comp.Compute()
-  return (comp.GetMinimum(), comp.GetMaximum())
-
-
-def write(imageOrFilter, fileName, compression=False):
-  """Write a image or the output image of a filter to filename
-
-  The writer is instantiated with the image type of the image in
-  parameter (or, again, with the output image of the filter in parameter)
-  """
-  import itk
-  img = output(imageOrFilter)
-  img.UpdateOutputInformation()
-  # don't put that writer in the automatic pipeline
-  tmp_auto_pipeline = auto_pipeline.current
-  auto_pipeline.current = None
-  writer = itk.ImageFileWriter[img].New(Input=img, FileName=fileName, UseCompression=compression)
-  auto_pipeline.current = tmp_auto_pipeline
-  writer.Update()
-
-
-def index_to_physical_point( imageOrFilter, idx ):
-  """Get the pysical point in an image from an index
-
-  imageOrFilter is the image where the physical point must be computed
-  idx is the index used to compute the physical point. It can be a continuous index.
-  """
-  import sys
-  print >> sys.stderr, "WrapITK warning: itk.index_to_physical_point() is deprecated. The coresponding templated method is now available in itk::ImageBase."
-  from __builtin__ import range # required because range is overladed in this module
-  # get the image if needed
-  img = output( imageOrFilter )
-  dim = img.GetImageDimension()
-  o = origin( img )
-  s = spacing( img )
-
-  # use the typemaps to really get a continuous index
-  import itk
-  idx = itk.ContinuousIndex[ itk.D, dim ]( idx )
-
-  # create the output object
-  p = itk.Point[ itk.D, dim ]()
-  for i in range( 0, dim ):
-    p[i] = s[i] * idx[i] + o[i]
-  return p
-
-
-def physical_point_to_continuous_index( imageOrFilter, p ):
-  """Get the continuous index in an image from the physical point
-
-  imageOrFilter is the image where the physical point must be computed
-  p is the point used to compute the index
-  """
-  import sys
-  print >> sys.stderr, "WrapITK warning: itk.index_to_physical_point() is deprecated. The coresponding templated method is now available in itk::ImageBase."
-  from __builtin__ import range # required because range is overladed in this module
-  # get the image if needed
-  img = output( imageOrFilter )
-  dim = img.GetImageDimension()
-  o = origin( img )
-  s = spacing( img )
-
-  # use the typemaps to really get a point
-  import itk
-  p = itk.Point[ itk.D, dim ]( p )
-
-  # create the output object
-  idx = itk.ContinuousIndex[ itk.D, dim ]()
-  for i in range( 0, dim ):
-    idx.SetElement( i, ( p[i] - o[i] ) / s[i] )
-  return idx
-
-
-def physical_point_to_index( imageOrFilter, p ):
-  """Get the index in an image from the physical point
-
-  image is the image where the physical point must be computed
-  p is the point used to compute the index
-  """
-  import sys
-  print >> sys.stderr, "WrapITK warning: itk.physical_point_to_index() is deprecated. The coresponding templated method is now available in itk::ImageBase."
-  from __builtin__ import range # required because range is overladed in this module
-  # get the image if needed
-  img = output( imageOrFilter )
-  dim = img.GetImageDimension()
-  o = origin( img )
-  s = spacing( img )
-
-  # use the typemaps to really get a point
-  import itk
-  p = itk.Point[ itk.D, dim ]( p )
-
-  # create the output object
-  idx = itk.Index[ dim ]()
-  for i in range( 0, dim ):
-    idx.SetElement( i, int( round( ( p[i] - o[i] ) / s[i] ) ) )
-  return idx
-
-
-def search( s, case_sensitive=False): #, fuzzy=True):
-  """Search for a class name in the itk module.
-  """
-  s = s.replace(" ", "")
-  if not case_sensitive:
-    s = s.lower()
-  import itk
-  names = dir(itk)
-  names.sort()
-  # exact match first
-  if case_sensitive:
-    res = [n for n in names if s == n]
-  else:
-    res = [n for n in names if s == n.lower()]
-  # then exact match inside the name
-  if case_sensitive:
-    res += [n for n in names if s in n and s != n]
-  else:
-    res += [n for n in names if s in n.lower() and s != n.lower()]
-#   if fuzzy:
-#     try:
-#       # everything now requires editdist
-#       import editdist
-#       if case_sensitive:
-#         res.sort(key=lambda x: editdist.distance(x, s))
-#       else:
-#         res.sort(key=lambda x: (editdist.distance(x.lower(), s), x))
-#     except:
-#       pass
-  return res
-
-
-def set_inputs( newItkObject, args=[], kargs={} ):
-  """Set the inputs of the given objects, according to the non named or the named parameters in args and kargs
-
-  This function tries to assign all the non named parameters in the input of the newItkObject
-  - the first non named parameter in the first input, etc.
-
-  The named parameters are used by calling the method with the same name prefixed by 'Set'.
-  set_inputs( obj, kargs={'Threshold': 10} ) calls obj.SetThreshold(10)
-
-  This is the function use in the enhanced New() method to manage the inputs.
-  It can be used to produce a similar behavior:
-
-  def SetInputs(self, *args, **kargs):
-    import itk
-    itk.set_inputs(self, *args, **kargs)
-  """
-  # try to get the images from the filters in args
-  args = [output(arg) for arg in args]
-
-  # args without name are filter used to set input image
-  #
-  # count SetInput calls to call SetInput, SetInput2, SetInput3, ...
-  # usefull with filter which take 2 input (or more) like SubstractImageFiler
-  # Ex: substract image2.png to image1.png and save the result in result.png
-  # r1 = itk.ImageFileReader.US2.New(FileName='image1.png')
-  # r2 = itk.ImageFileReader.US2.New(FileName='image2.png')
-  # s = itk.SubtractImageFilter.US2US2US2.New(r1, r2)
-  # itk.ImageFileWriter.US2.New(s, FileName='result.png').Update()
-  try :
-    for setInputNb, arg  in enumerate(args) :
-      methodName = 'SetInput%i' % (setInputNb+1)
-      if methodName in dir(newItkObject) :
-        # first try to use methods called SetInput1, SetInput2, ...
-        # those method should have more chances to work in case of multiple
-        # input types
-        getattr(newItkObject, methodName)(arg)
-      else :
-        # no method called SetInput?
-        # try with the standard SetInput(nb, input)
-        newItkObject.SetInput(setInputNb, arg)
-  except TypeError, e :
-    # the exception have (at least) to possible reasons:
-    # + the filter don't take the input number as first argument
-    # + arg is an object of wrong type
-    #
-    # if it's not the first input, re-raise the exception
-    if setInputNb != 0 :
-      raise e
-    # it's the first input, try to use the SetInput() method without input number
-    newItkObject.SetInput(args[0])
-    # but raise an exception if there is more than 1 argument
-    if len(args) > 1 :
-      raise TypeError('Object accept only 1 input.')
-  except AttributeError :
-    # There is no SetInput() method, try SetImage
-    # but before, check the number of inputs
-    if len(args) > 1 :
-      raise TypeError('Object accept only 1 input.')
-    methodList = ['SetImage', 'SetInputImage']
-    methodName = None
-    for m in methodList:
-      if m in dir(newItkObject):
-        methodName = m
-    if methodName :
-      getattr(newItkObject, methodName)(args[0])
-    else:
-      raise AttributeError('No method found to set the input.')
-
-  # named args : name is the function name, value is argument(s)
-  for attribName, value in kargs.iteritems() :
-    # use Set as prefix. It allow to use a shorter and more intuitive
-    # call (Ex: itk.ImageFileReader.UC2.New(FileName='image.png')) than with the
-    # full name (Ex: itk.ImageFileReader.UC2.New(SetFileName='image.png'))
-    if attribName not in ["auto_progress", "template_parameters"] :
-      attrib = getattr(newItkObject, 'Set' + attribName)
-      attrib(value)
-
-
-def show(input, **kargs) :
-  """display an image
-  """
-  import itk
-  img = output(input)
-  if img.GetImageDimension() == 3 and "show3D" in dir(itk):
-          return itk.show3D(input, **kargs)
-  else :
-          # print "2D not supported yet, use the 3D viewer."
-          return show2D(input, **kargs)
-
-class show2D :
-  """Display a 2D image
-  """
-  def __init__(self, imageOrFilter, Label=False, Title=None) :
-    import tempfile, itk, os, platform
-    # get some data from the environment
-    command = os.environ.get("WRAPITK_SHOW2D_COMMAND")
-    if command==None:
-      if platform.system() == "Darwin":
-        command = "open -a ImageJ -n --args -eval 'open(\"%(image)s\"); run (\"View 100%%\"); rename(\"%(title)s\");'"
-      else:
-        command = "imagej %(image)s -run 'View 100%%' -eval 'rename(\"%(title)s\")' &"
-
-    label_command = os.environ.get("WRAPITK_SHOW2D_LABEL_COMMAND")
-    if label_command==None:
-      if platform.system() == "Darwin":
-        label_command = "open -a ImageJ -n --args -eval 'open(\"%(image)s\"); run (\"View 100%%\"); rename(\"%(title)s\"); run(\"3-3-2 RGB\");'"
-      else:
-        label_command = "imagej %(image)s -run 'View 100%%' -eval 'rename(\"%(title)s\")' -run '3-3-2 RGB' &"
-
-    compress = os.environ.get("WRAPITK_SHOW2D_COMPRESS", "true").lower() in ["on", "true", "yes", "1"]
-    extension = os.environ.get("WRAPITK_SHOW2D_EXTENSION", ".tif")
-
-    # use the tempfile module to get a non used file name and to put
-    # the file at the rignt place
-    self.__tmpFile__ = tempfile.NamedTemporaryFile(suffix=extension)
-    # get an updated image
-    img = output(imageOrFilter)
-    img.UpdateOutputInformation()
-    img.Update()
-    if Title == None:
-      # try to generate a title
-      s = img.GetSource()
-      if s:
-        s = itk.down_cast(s)
-        if hasattr(img, "GetSourceOutputIndex"):
-          o = '[%s]' % img.GetSourceOutputIndex()
-        elif hasattr(img, "GetSourceOutputName"):
-          o = '[%s]' % img.GetSourceOutputName()
-        else:
-          o = ""
-        Title = "%s%s" % (s.__class__.__name__, o)
-      else:
-        Title = img.__class__.__name__
-      try:
-        import IPython.ipapi
-        ip = IPython.ipapi.get()
-        if ip != None:
-          names = []
-          ref = imageOrFilter
-          if s:
-            ref = s
-          for n, v in ip.user_ns.iteritems():
-            if isinstance(v, itk.LightObject) and v == ref:
-              names.append(n)
-          if names != []:
-            Title = ", ".join(names)+" - "+Title
-      except ImportError:
-        # just do nothing
-        pass
-    # change the LabelMaps to an Image, so we can look at them easily
-    if 'LabelMap' in dir(itk) and img.GetNameOfClass() == 'LabelMap':
-      # retreive the biggest label in the label map
-      maxLabel = img.GetNthLabelObject( img.GetNumberOfLabelObjects() - 1 ).GetLabel()
-      # search for a filter to convert the label map
-      label_image_type = sorted( [params[1] for params in itk.LabelMapToLabelImageFilter.keys() if params[0] == class_(img) and itk.NumericTraits[itk.template(params[1])[1][0]].max() >= maxLabel ] )[0]
-      convert = itk.LabelMapToLabelImageFilter[ img, label_image_type ].New( img )
-      convert.Update()
-      img = convert.GetOutput()
-      # this is a label image - force the parameter
-      Label = True
-    write(img, self.__tmpFile__.name, compress)
-    # now run imview
-    import os
-    if Label:
-      os.system( label_command % {"image":self.__tmpFile__.name, "title": Title} )
-    else:
-      os.system( command % {"image":self.__tmpFile__.name, "title": Title} )
-    #tmpFile.close()
-
-
-class templated_class:
-  """This class is used to mimic the behavior of the templated C++ classes.
-
-  It is used that way:
-
-  class CustomClass:
-    # class definition here
-  CustomClass = templated_class(CustomClass)
-
-  customObject = CustomClass[template, parameters].New()
-
-  The template parameters are passed to the custom class constructor as a named parameter
-  'template_parameters' in a tuple.
-
-  The custom class may implement a static method check_template_parameters(parameters)
-  which should raise an exception if the template parameters provided are not suitable
-  to instantiate the custom class.
-  """
-  def __init__(self, cls):
-    """cls is the custom class
-    """
-    self.__cls__ = cls
-    self.__templates__ = {}
-
-  def New(self, *args, **kargs):
-    """Use the parameters to infer the types of the template parameters.
-    """
-    # extract the types from the arguments to instantiate the class
-    import itk
-    types = tuple(itk.class_(o) for o in args)
-    return self[types].New(*args, **kargs)
-
-  def __getitem__(self, template_parameters):
-    """Return a pair class-template parameters ready to be instantiated.
-
-    The template parameters may be validated if the custom class provide the static
-    method check_template_parameters(parameters).
-    """
-    if not isinstance(template_parameters, tuple):
-      template_parameters = (template_parameters,)
-    return templated_class.__templated_class_and_parameters__(self, template_parameters)
-
-  def check_template_parameters(self, template_parameters):
-    """Check the template parameters passed in parameter.
-    """
-    # this method is there mainly to make possible to reuse it in the custom class
-    # constructor after having used templated_class(). Without that, the following
-    # example doesn't work:
-    #
-    # class CustomClass:
-    #   def __init__(self, *args, **kargs):
-    #     template_parameters = kargs["template_parameters"]
-    #     CustomClass.check_template_parameters(template_parameters)
-    #     # other init stuff
-    #   def check_template_parameters(template_parameters):
-    #     # check, really
-    #     pass
-    #  CustomClass = templated_class(CustomClass)
-    #
-    self.__cls__.check_template_parameters(template_parameters)
-
-  def add_template(self, name, params):
-    if not isinstance(params, list) and not isinstance(params, tuple):
-      params = (params,)
-    params = tuple(params)
-    val = self[params]
-    self.__templates__[params] = val
-    setattr(self, name, val)
-
-  def add_image_templates(self, *args):
-    import itk
-    if args == []:
-      return
-    combinations = [[t] for t in args[0]]
-    for types in args[1:]:
-      temp = []
-      for t in types:
-        for c in combinations:
-          temp.append(c+[t])
-      combinations = temp
-    for d in itk.DIMS:
-      for c in combinations:
-        parameters = []
-        name = ""
-        for t in c:
-          parameters.append( itk.Image[t, d] )
-          name += "I"+t.short_name+str(d)
-        self.add_template(name, tuple(parameters))
-
-  class __templated_class_and_parameters__:
-    """Inner class used to store the pair class-template parameters ready to instantiate.
-    """
-    def __init__(self, templated_class, template_parameters):
-      self.__templated_class__ = templated_class
-      self.__template_parameters__ = template_parameters
-      if "check_template_parameters" in dir(templated_class.__cls__):
-        templated_class.__cls__.check_template_parameters(template_parameters)
-
-    def New(self, *args, **kargs):
-      """A New() method to mimic the ITK default behavior, even if the class doesn't provide any New() method.
-      """
-      kargs["template_parameters"] = self.__template_parameters__
-      if "New" in dir(self.__templated_class__.__cls__):
-        obj = self.__templated_class__.__cls__.New(*args, **kargs)
-      else:
-        obj = self.__templated_class__.__cls__(*args, **kargs)
-      setattr(obj, "__template_parameters__", self.__template_parameters__)
-      setattr(obj, "__templated_class__", self.__templated_class__)
-      return obj
-
-    def __call__(self, *args, **kargs):
-      return self.New(*args, **kargs)
-
-  def keys(self):
-    return self.__templates__.keys()
-
-  # everything after this comment is for dict interface
-  # and is a copy/paste from DictMixin
-  # only methods to edit dictionary are not there
-  def __iter__(self):
-    for k in self.keys():
-      yield k
-
-  def has_key(self,key):
-    try:
-      value=self[key]
-    except KeyError:
-      return False
-    return True
-
-  def __contains__(self,key):
-    return self.has_key(key)
-
-  # third level takes advantage of second level definitions
-  def iteritems(self):
-    for k in self:
-      yield (k,self[k])
-
-  def iterkeys(self):
-    return self.__iter__()
-
-  # fourth level uses definitions from lower levels
-  def itervalues(self):
-    for _,v in self.iteritems():
-      yield v
-
-  def values(self):
-    return [v for _,v in self.iteritems()]
-
-  def items(self):
-    return list(self.iteritems())
-
-  def get(self,key,default=None):
-    try:
-      return self[key]
-    except KeyError:
-      return default
-
-  def __len__(self):
-    return len(self.keys())
-
-
-class pipeline:
-  """A convenient class to store the reference to the filters of a pipeline
-
-  With this class, a method can create a pipeline of several filters and return
-  it without losing the references to the filters in this pipeline. The pipeline
-  object act almost like a filter (it has a GetOutput() method) and thus can
-  be simply integrated in another pipeline.
-  """
-  def __init__( self, *args, **kargs ):
-    self.clear()
-    self.input = None
-    set_inputs( self, args, kargs )
-
-  def connect( self, filter ):
-    """Connect a new filter to the pipeline
-
-    The output of the first filter will be used as the input of this
-    one and the filter passed as parameter will be added to the list
-    """
-    if self.GetOutput() != None:
-      set_inputs(filter, [self.GetOutput()] )
-    self.append( filter )
-
-  def append( self, filter ):
-    """Add a new filter to the pipeline
-
-    The new filter will not be connected. The user must connect it.
-    """
-    self.filters.append( filter )
-
-  def clear( self ):
-    """Clear the filter list
-    """
-    self.filters = []
-
-  def GetOutput( self, index=0 ):
-    """Return the output of the pipeline
-
-    If another output is needed, use
-    pipeline.filters[-1].GetAnotherOutput() instead of this method, subclass
-    pipeline to implement another GetOutput() method, or use expose()
-    """
-    if len(self.filters) == 0:
-      return self.GetInput()
-    else :
-      filter = self.filters[-1]
-      if hasattr(filter, "__getitem__"):
-        return filter[index]
-      try:
-        return filter.GetOutput(index)
-      except:
-        if index == 0:
-          return filter.GetOutput()
-        else:
-          raise ValueError("Index can only be 0 on that object")
-
-  def SetInput( self, input ):
-    """Set the input of the pipeline
-    """
-    if len(self.filters) != 0:
-      set_inputs(self.filters[0], [input])
-    self.input = input
-
-  def GetInput( self ):
-    """Get the input of the pipeline
-    """
-    return self.input
-
-  def Update( self ):
-    """Update the pipeline
-    """
-    if len(self.filters) > 0:
-      return self.filters[-1].Update()
-
-  def UpdateLargestPossibleRegion( self ):
-    """Update the pipeline
-    """
-    if len(self.filters) > 0:
-      return self.filters[-1].UpdateLargestPossibleRegion()
-
-  def UpdateOutputInformation( self ):
-    if "UpdateOutputInformation" in dir(self.filters[-1]):
-      self.filters[-1].UpdateOutputInformation()
-    else:
-      self.Update()
-
-  def __len__(self):
-    if len(self.filters) == 0:
-      return 1
-    else:
-      return self.filters[-1].GetNumberOfOutputs()
-
-  def __getitem__(self, item):
-    return self.GetOutput( item )
-
-  def __call__(self, *args, **kargs):
-     set_inputs( self, args, kargs )
-     self.UpdateLargestPossibleRegion()
-     return self
-
-  def expose(self, name, new_name=None, position=-1):
-     """Expose an attribute from a filter of the minipeline.
-
-     Once called, the pipeline instance has a new Set/Get set of methods to access
-     directly the corresponding method of one of the filter of the pipeline.
-     Ex: p.expose( "Radius" )
-         p.SetRadius( 5 )
-         p.GetRadius( 5 )
-     By default, the attribute usable on the pipeline instance has the same name than
-     the one of the filter, but it can be changed by providing a value to new_name.
-     The last filter of the pipeline is used by default, but another one may be used
-     by giving its position.
-     Ex: p.expose("Radius", "SmoothingNeighborhood", 2)
-         p.GetSmoothingNeighborhood()
-     """
-     if new_name == None:
-       new_name = name
-     src = self.filters[position]
-     ok = False
-     set_name = "Set" + name
-     if set_name in dir(src):
-       setattr(self, "Set" + new_name, getattr(src, set_name))
-       ok = True
-     get_name = "Get" + name
-     if get_name in dir(src):
-       setattr(self, "Get" + new_name, getattr(src, get_name))
-       ok = True
-     if not ok:
-       raise RuntimeError("No attribute %s at position %s." % (name, position))
-
-
-class auto_pipeline(pipeline):
-   current = None
-
-   def __init__(self, *args, **kargs):
-     pipeline.__init__(self, *args, **kargs)
-     self.Start()
-
-   def Start(self):
-     auto_pipeline.current = self
-
-   def Stop(self):
-     auto_pipeline.current = None
-
-
-def down_cast(obj):
-  """Down cast an itkLightObject (or a object of a subclass) to its most specialized type.
-  """
-  import itk, itkTemplate
-  className = obj.GetNameOfClass()
-  t = getattr(itk, className)
-  if isinstance(t, itkTemplate.itkTemplate):
-    for c in t.values():
-      try:
-        return c.cast(obj)
-      except:
-        # fail silently for now
-        pass
-    raise RuntimeError("Can't downcast to a specialization of %s" % className)
-  else:
-    return t.cast(obj)
-
-def attribute_list( i, name ):
-  """Returns a list of the specified attributes for the objects in the image.
-
-  i: the input LabelImage
-  name: the attribute name
-  """
-  import itk
-  i = itk.output(i)
-  relabel = itk.StatisticsRelabelLabelMapFilter[i].New(i, Attribute=name, ReverseOrdering=True, InPlace=False)
-  relabel.UpdateLargestPossibleRegion()
-  r = relabel.GetOutput()
-  l = []
-  for i in range(1, r.GetNumberOfLabelObjects()+1):
-    l.append( r.GetLabelObject(i).__getattribute__("Get"+name)() )
-  return l
-
-
-def attributes_list( i, names ):
-  """Returns a list of the specified attributes for the objects in the image.
-
-  i: the input LabelImage
-  name: the attribute name
-  """
-  import itk
-  i = itk.output(i)
-  relabel = itk.StatisticsRelabelLabelMapFilter[i].New(i, Attribute=names[0], ReverseOrdering=True, InPlace=False)
-  relabel.UpdateLargestPossibleRegion()
-  r = relabel.GetOutput()
-  l = []
-  for i in range(1, r.GetNumberOfLabelObjects()+1):
-    attrs = []
-    for name in names :
-      attrs.append( r.GetLabelObject(i).__getattribute__("Get"+name)() )
-    l.append( tuple( attrs ) )
-  return l
-
-
-def attribute_dict( i, name ):
-  """Returns a dict with the attribute values in keys and a list of the corresponding objects in value
-
-  i: the input LabelImage
-  name: the name of the attribute
-  """
-  import itk
-  i = itk.output(i)
-  relabel = itk.StatisticsRelabelLabelMapFilter[i].New(i, Attribute=name, ReverseOrdering=True, InPlace=False)
-  relabel.UpdateLargestPossibleRegion()
-  r = relabel.GetOutput()
-  d = {}
-  for i in range(1, r.GetNumberOfLabelObjects()+1):
-    lo = r.GetLabelObject(i)
-    v = lo.__getattribute__("Get"+name)()
-    l = d.get( v, [] )
-    l.append( lo )
-    d[v] = l
-  return d
-
-
-def number_of_objects( i ):
-  """Returns the number of objets in the image.
-
-  i: the input LabelImage
-  """
-  import itk
-  i.UpdateLargestPossibleRegion()
-  i =  itk.output(i)
-  return i.GetNumberOfLabelObjects()
-
-def ipython_kw_matches(text):
-  """Match named ITK object's named parameters"""
-  import IPython.ipapi, itk, re, inspect, itkTemplate
-  regexp =  re.compile(r'''
-          '.*?' |    # single quoted strings or
-          ".*?" |    # double quoted strings or
-          \w+   |    # identifier
-          \S         # other characters
-          ''', re.VERBOSE | re.DOTALL)
-  ip = IPython.ipapi.get()
-  if "." in text: # a parameter cannot be dotted
-    return []
-  # 1. find the nearest identifier that comes before an unclosed
-  # parenthesis e.g. for "foo (1+bar(x), pa", the candidate is "foo".
-  # Use get_endidx() to find the indentifier at the cursor position
-  tokens = regexp.findall(ip.IP.Completer.get_line_buffer()[:ip.IP.Completer.get_endidx()])
-  tokens.reverse()
-  iterTokens = iter(tokens); openPar = 0
-  for token in iterTokens:
-    if token == ')':
-      openPar -= 1
-    elif token == '(':
-      openPar += 1
-      if openPar > 0:
-        # found the last unclosed parenthesis
-        break
-  else:
-    return []
-  # 2. Concatenate dotted names ("foo.bar" for "foo.bar(x, pa" )
-  ids = []
-  isId = re.compile(r'\w+$').match
-  while True:
-    try:
-      ids.append(iterTokens.next())
-      if not isId(ids[-1]):
-        ids.pop(); break
-      if not iterTokens.next() == '.':
-        break
-    except StopIteration:
-      break
-  # lookup the candidate callable matches either using global_matches
-  # or attr_matches for dotted names
-  if len(ids) == 1:
-    callableMatches = ip.IP.Completer.global_matches(ids[0])
-  else:
-    callableMatches = ip.IP.Completer.attr_matches('.'.join(ids[::-1]))
-  argMatches = []
-  for callableMatch in callableMatches:
-    # drop the .New at this end, so we can search in the class members
-    if callableMatch.endswith(".New"):
-      callableMatch = callableMatch[:-4]
-    try:
-      object = eval(callableMatch, ip.IP.Completer.namespace)
-      if isinstance(object, itkTemplate.itkTemplate):
-        # this is a template - lets grab the first entry to search for the methods
-        object = object.values()[0]
-      namedArgs = []
-      if isinstance(object, itk.LightObject) or (inspect.isclass(object) and issubclass(object, itk.LightObject)):
-        namedArgs = [n[3:] for n in dir(object) if n.startswith("Set")]
-    except Exception, e:
-      print e
-      continue
-    for namedArg in namedArgs:
-      if namedArg.startswith(text):
-        argMatches.append("%s=" %namedArg)
-  return argMatches
-
-# install progress callback and custom completer if we are in ipython interpreter
-try:
-  import itkConfig, IPython.ipapi
-  if IPython.ipapi.get():
-    IPython.ipapi.get().IP.Completer.matchers.insert(0, ipython_kw_matches)
-    itkConfig.ProgressCallback = terminal_progress_callback
-  # some cleanup
-  del itkConfig, IPython
-except ImportError:
-  # fail silently
-  pass
-
-# now loads the other modules we may found in the same directory
-import os.path, sys
-directory = os.path.dirname(__file__)
-moduleNames = [name[:-len('.py')] for name in os.listdir(directory) if name.endswith('.py') and name != '__init__.py']
-for name in moduleNames:
-  # there should be another way - I don't like to much exec -, but the which one ??
-  exec "from %s import *" % name
-# some cleaning
-del directory, os, sys, moduleNames, name
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itkLazy.py b/Utilities/ITK/Wrapping/Generators/Python/itkLazy.py
index 4facba4..cfc7eba 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/itkLazy.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/itkLazy.py
@@ -17,29 +17,34 @@
 #==========================================================================*/
 
 
-import types, itkBase
+import types
+import itkBase
 
 not_loaded = 'not loaded'
 
+
 class LazyITKModule(types.ModuleType):
-  """Subclass of ModuleType that implements a custom __getattribute__ method
-  to allow lazy-loading of attributes from ITK sub-modules."""
-  def __init__(self, name, lazy_attributes):
-    types.ModuleType.__init__(self, name)
-    self.__lazy_attributes = lazy_attributes
-    for k in lazy_attributes:
-      setattr(self, k, not_loaded)
-  def __getattribute__(self, attr):
-    value = types.ModuleType.__getattribute__(self, attr)
-    if value is not_loaded:
-      module = self.__lazy_attributes[attr]
-      namespace = {}
-      itkBase.LoadModule(module, namespace)
-      # Load into 'namespace' first, then self.__dict__ (via setattr) to
-      # prevent the warnings about overwriting the 'NotLoaded' values already
-      # in in self.__dict__ we would get if we just passed self.__dict__ to
-      # itkBase.LoadModule.
-      for k, v in namespace.items():
-        setattr(self, k, v)
-      value = namespace[attr]
-    return value
+
+    """Subclass of ModuleType that implements a custom __getattribute__ method
+    to allow lazy-loading of attributes from ITK sub-modules."""
+
+    def __init__(self, name, lazy_attributes):
+        types.ModuleType.__init__(self, name)
+        self.__lazy_attributes = lazy_attributes
+        for k in lazy_attributes:
+            setattr(self, k, not_loaded)
+
+    def __getattribute__(self, attr):
+        value = types.ModuleType.__getattribute__(self, attr)
+        if value is not_loaded:
+            module = self.__lazy_attributes[attr]
+            namespace = {}
+            itkBase.LoadModule(module, namespace)
+            # Load into 'namespace' first, then self.__dict__ (via setattr) to
+            # prevent the warnings about overwriting the 'NotLoaded' values
+            # already in self.__dict__ we would get if we just passed
+            # self.__dict__ to itkBase.LoadModule.
+            for k, v in namespace.items():
+                setattr(self, k, v)
+            value = namespace[attr]
+        return value
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itkTemplate.py b/Utilities/ITK/Wrapping/Generators/Python/itkTemplate.py
index d8d3c38..c729294 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/itkTemplate.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/itkTemplate.py
@@ -16,364 +16,411 @@
 #
 #==========================================================================*/
 
+from __future__ import print_function
+
 import types
 import inspect
 import sys
 import os
+import warnings
 import itkConfig
 from itkTypes import itkCType
 
 
-def registerNoTpl(name, cl):
-  """Register a class without template
-
-  It can seem not useful to register classes without template (and it wasn't
-  useful until the SmartPointer template was generated), but those classes
-  can be used as template argument of classes with template.
-  """
-  itkTemplate.__templates__[normalizeName(name)] = cl
-
+def itkFormatWarning(msg, *a):
+    """"Format the warnings issued by itk to display only the message.
 
-def normalizeName(name):
-  """Normalize the class name to remove ambiguity
+    This will ignore the filename and the linenumber where the warning was
+    triggered. The message is returned to the warnings module.
+    """
 
-  This function removes the white spaces in the name, and also
-  remove the pointer declaration "*" (it have no sense in python) """
+    return str(msg) + '\n'
 
-  name = name.replace(" ","")
-  name = name.replace("*","")
+# Redefine the format of the warnings
+warnings.formatwarning = itkFormatWarning
 
-  return name
 
+def registerNoTpl(name, cl):
+    """Register a class without template
 
-class itkTemplate(object):
-  """This class manage access to avaible template arguments of C++ class
-
-  There is 2 ways to access types:
-  - with a dict interface. The user can manipulate template parameters nearly
-  as it do in c++, excepted that the available parameters sets are choosed at
-  build time. It is also possible, with the dict interface, to explore the
-  available parameters sets.
-  - with object attributes. The user can easily find the available parameters
-  sets by pressing tab in interperter like ipython
-  """
-  __templates__ = {}
-  __class_to_template__ = {}
-  __named_templates__ = {}
-  __doxygen_root__ = itkConfig.doxygen_root
-
-  def __new__(cls, name):
-    # Singleton pattern: we only make a single instance of any Template of a
-    # given name. If we have already made the instance, just return it as-is.
-    if not cls.__named_templates__.has_key(name):
-        new_instance = object.__new__(cls)
-        new_instance.__name__ = name
-        new_instance.__template__ = {}
-        cls.__named_templates__[name] = new_instance
-    return cls.__named_templates__[name]
-
-  def __add__(self, paramSetString, cl):
-    """add a new argument set and the resulting class to the template
-
-    paramSetString is the c++ string which define the parameters set
-    cl is the class which correspond to the couple template-argument set
+    It can seem not useful to register classes without template (and it wasn't
+    useful until the SmartPointer template was generated), but those classes
+    can be used as template argument of classes with template.
     """
-    # recreate the full name and normalize it to avoid ambiguity
-    normalizedFullName = normalizeName(self.__name__+"<"+paramSetString+">")
-
-    # the full class should not be already registered. If it is, there is a problem
-    # somewhere so warn the user so he can fix the problem
-    if itkTemplate.__templates__.has_key( normalizedFullName ) :
-      print >>sys.stderr,"Warning: template %s\n  already defined as %s\n  is redefined as    %s" % (normalizedFullName, self.__templates__[normalizedFullName], cl)
-    # register the class
-    itkTemplate.__templates__[normalizedFullName] = cl
-
-    # __find_param__ will parse the paramSetString and produce a list of the same
-    # parameters transformed in corresponding python classes.
-    # we transform this list in tuple to make it usable as key of the dict
-    param = tuple( self.__find_param__( paramSetString ) )
-
-    # once again, warn the user if the tuple of parameter is already defined
-    # so he can fix the problem
-    if self.__template__.has_key( param ) :
-      print >>sys.stderr,"Warning: template already defined '%s'" % normalizedFullName
-    # and register the parameter tuple
-    self.__template__[param] = cl
-
-    # add in __class_to_template__ dictionary
-    itkTemplate.__class_to_template__[cl] = (self, param)
-
-    # now populate the template
-    # 2 cases:
-    # - the template is a SmartPointer. In that case, the attribute name will be the
-    #   full real name of the class without the itk prefix and _Pointer suffix
-    # - the template is not a SmartPointer. In that case, we keep only the end of the
-    #   real class name which is a short string discribing the template arguments
-    #   (for example IUC2)
-    if cl.__name__.startswith("itk"):
-      if cl.__name__.endswith("_Pointer") :
-        # it's a SmartPointer
-        attributeName = cl.__name__[len("itk"):-len("_Pointer")]
-      else :
-        # it's not a SmartPointer
-        # we need to now the size of the name to keep only the suffix
-        # short name does not contain :: and nested namespace
-        # itk::Numerics::Sample -> itkSample
-        import re
-        shortNameSize = len(re.sub(r':.*:', '', self.__name__))
-        attributeName = cl.__name__[shortNameSize:]
-    elif cl.__name__.startswith("vcl_complex"):
-      # C++ name is likely to be std::complex here, instead of the expected vcl_complex
-      attributeName = cl.__name__[len("vcl_complex"):]
-    else:
-      import re
-      shortNameSize = len(re.sub(r'.*::', '', self.__name__))
-      attributeName = cl.__name__[shortNameSize:]
+    itkTemplate.__templates__[normalizeName(name)] = cl
+
 
+def normalizeName(name):
+    """Normalize the class name to remove ambiguity
 
-    if attributeName.isdigit() :
-      # the attribute name can't be a number
-      # add a single undescore before it to build a valid name
-      attributeName = "_" + attributeName
+    This function removes the white spaces in the name, and also
+    remove the pointer declaration "*" (it have no sense in python) """
 
-    # add the attribute to this object
-    self.__dict__[attributeName] = cl
+    name = name.replace(" ", "")
+    name = name.replace("*", "")
 
+    return name
 
-  def __find_param__(self, paramSetString):
-    """find the parameters of the template
 
-    paramSetString is the c++ string which define the parameters set
+class itkTemplate(object):
 
-    __find_param__ returns a list of itk classes, itkCType, and/or numbers
-    which correspond to the parameters described in paramSetString.
-    The parameters MUST have been registered before calling this method,
-    or __find_param__ will return a string and not the wanted object, and
-    will display a warning. Registration order is important.
+    """This class manage access to avaible template arguments of C++ class
 
-    This method is not static only to be able to display the template name
-    in the warning
-    """
-    # split the string in a list of parameters
-    paramStrings = []
-    inner = 0
-    part = paramSetString.split(",")
-    for elt in part :
-      if inner == 0 :
-        paramStrings.append( elt )
-      else:
-        paramStrings[-1] += "," + elt
-      inner += elt.count("<") - elt.count(">")
-
-    # convert all string parameters into classes (if possible)
-    parameters = []
-    for param in paramStrings:
-      # the parameter need to be normalized several time below
-      # do it once here
-      param = param.strip()
-      paramNorm = normalizeName(param)
-
-      if itkTemplate.__templates__.has_key( paramNorm ) :
-        # the parameter is registered.
-        # just get the really class form the dictionary
-        param = itkTemplate.__templates__[paramNorm]
-
-      elif itkCType.GetCType( param ) :
-        # the parameter is a c type
-        # just get the itkCtype instance
-        param = itkCType.GetCType( param )
-
-      elif paramNorm.isdigit() :
-        # the parameter is a number
-        # convert the string to a number !
-        param = int(param)
-
-      elif paramNorm == "true":
-        param = True
-      elif paramNorm == "false":
-        param = False
-
-      else :
-        # unable to convert the parameter
-        # use it without changes, but display a warning message, to incite
-        # developer to fix the problem
-        print >>sys.stderr,"Warning: Unknown parameter '%s' in template '%s'" % (param, self.__name__)
-
-      parameters.append( param )
-
-    return parameters
-
-
-  def __getitem__(self, parameters):
-    """return the class which correspond to the given template parameters
-
-    parameters can be:
-      - a single parameter (Ex: itk.Index[2])
-      - a list of element (Ex: itk.Image[itk.UC, 2])
+    There is 2 ways to access types:
+    - with a dict interface. The user can manipulate template parameters nearly
+    as it do in c++, excepted that the available parameters sets are choosed at
+    build time. It is also possible, with the dict interface, to explore the
+    available parameters sets.
+    - with object attributes. The user can easily find the available parameters
+    sets by pressing tab in interperter like ipython
     """
+    __templates__ = {}
+    __class_to_template__ = {}
+    __named_templates__ = {}
+    __doxygen_root__ = itkConfig.doxygen_root
+
+    def __new__(cls, name):
+        # Singleton pattern: we only make a single instance of any Template of
+        # a given name. If we have already made the instance, just return it
+        # as-is.
+        if name not in cls.__named_templates__:
+                new_instance = object.__new__(cls)
+                new_instance.__name__ = name
+                new_instance.__template__ = {}
+                cls.__named_templates__[name] = new_instance
+        return cls.__named_templates__[name]
+
+    def __add__(self, paramSetString, cl):
+        """add a new argument set and the resulting class to the template
+
+        paramSetString is the c++ string which define the parameters set
+        cl is the class which correspond to the couple template-argument set
+        """
+        # recreate the full name and normalize it to avoid ambiguity
+        normFullName = normalizeName(
+            self.__name__ + "<" + paramSetString + ">")
+
+        # the full class should not be already registered. If it is, there is a
+        # problem somewhere so warn the user so he can fix the problem
+        if normFullName in itkTemplate.__templates__:
+            message = (
+                "Template %s\n already defined as %s\n is redefined "
+                "as %s") % (normFullName, self.__templates__[normFullName], cl)
+            warnings.warn(message)
+        # register the class
+        itkTemplate.__templates__[normFullName] = cl
+
+        # __find_param__ will parse the paramSetString and produce a list of
+        # the same parameters transformed in corresponding python classes.
+        # we transform this list in tuple to make it usable as key of the dict
+        param = tuple(self.__find_param__(paramSetString))
+
+        # once again, warn the user if the tuple of parameter is already
+        # defined so he can fix the problem
+        if param in self.__template__:
+            message = "Warning: template already defined '%s'" % normFullName
+            warnings.warn(message)
+        # and register the parameter tuple
+        self.__template__[param] = cl
+
+        # add in __class_to_template__ dictionary
+        itkTemplate.__class_to_template__[cl] = (self, param)
+
+        # now populate the template
+        # 2 cases:
+        # - the template is a SmartPointer. In that case, the attribute name
+        # will be the full real name of the class without the itk prefix and
+        # _Pointer suffix
+        # - the template is not a SmartPointer. In that case, we keep only the
+        # end of the real class name which is a short string discribing the
+        # template arguments (for example IUC2)
+        if cl.__name__.startswith("itk"):
+            if cl.__name__.endswith("_Pointer"):
+                # it's a SmartPointer
+                attributeName = cl.__name__[len("itk"):-len("_Pointer")]
+            else:
+                # it's not a SmartPointer
+                # we need to now the size of the name to keep only the suffix
+                # short name does not contain :: and nested namespace
+                # itk::Numerics::Sample -> itkSample
+                import re
+                shortNameSize = len(re.sub(r':.*:', '', self.__name__))
+                attributeName = cl.__name__[shortNameSize:]
+        elif cl.__name__.startswith("vcl_complex"):
+            # C++ name is likely to be std::complex here, instead of the
+            # expected vcl_complex
+            attributeName = cl.__name__[len("vcl_complex"):]
+        else:
+            import re
+            shortNameSize = len(re.sub(r'.*::', '', self.__name__))
+            attributeName = cl.__name__[shortNameSize:]
+
+        if attributeName.isdigit():
+            # the attribute name can't be a number
+            # add a single undescore before it to build a valid name
+            attributeName = "_" + attributeName
+
+        # add the attribute to this object
+        self.__dict__[attributeName] = cl
+
+    def __find_param__(self, paramSetString):
+        """find the parameters of the template
+
+        paramSetString is the c++ string which define the parameters set
+
+        __find_param__ returns a list of itk classes, itkCType, and/or numbers
+        which correspond to the parameters described in paramSetString.
+        The parameters MUST have been registered before calling this method,
+        or __find_param__ will return a string and not the wanted object, and
+        will display a warning. Registration order is important.
+
+        This method is not static only to be able to display the template name
+        in the warning
+        """
+        # split the string in a list of parameters
+        paramStrings = []
+        inner = 0
+        part = paramSetString.split(",")
+        for elt in part:
+            if inner == 0:
+                paramStrings.append(elt)
+            else:
+                paramStrings[-1] += "," + elt
+            inner += elt.count("<") - elt.count(">")
+
+        # convert all string parameters into classes (if possible)
+        parameters = []
+        for param in paramStrings:
+            # the parameter need to be normalized several time below
+            # do it once here
+            param = param.strip()
+            paramNorm = normalizeName(param)
+
+            if paramNorm in itkTemplate.__templates__:
+                # the parameter is registered.
+                # just get the really class form the dictionary
+                param = itkTemplate.__templates__[paramNorm]
+
+            elif itkCType.GetCType(param):
+                # the parameter is a c type
+                # just get the itkCtype instance
+                param = itkCType.GetCType(param)
+
+            elif paramNorm.isdigit():
+                # the parameter is a number
+                # convert the string to a number !
+                param = int(param)
+
+            elif paramNorm == "true":
+                param = True
+            elif paramNorm == "false":
+                param = False
+
+            else:
+                # unable to convert the parameter
+                # use it without changes, but display a warning message, to
+                # incite developer to fix the problem
+                message = (
+                    "Warning: Unknown parameter '%s' in "
+                    "template '%s'" % (param, self.__name__))
+                warnings.warn(message)
+
+            parameters.append(param)
+
+        return parameters
+
+    def __getitem__(self, parameters):
+        """return the class which correspond to the given template parameters
+
+        parameters can be:
+            - a single parameter (Ex: itk.Index[2])
+            - a list of element (Ex: itk.Image[itk.UC, 2])
+        """
+
+        isin = isinstance(parameters, types.TupleType)
+        if not isin and not isinstance(parameters, types.ListType):
+            # parameters is a single element.
+            # include it in a list to manage the 2 cases in the same way
+            parameters = [parameters]
+
+        cleanParameters = []
+        for param in parameters:
+            # In the case of itk class instance, get the class
+            name = param.__class__.__name__
+            isclass = inspect.isclass(param)
+            if not isclass and name[:3] == 'itk' and name != "itkCType":
+                param = param.__class__
+
+            # append the parameter to the list. If it's not a supported type,
+            # it is not in the dictionary and we will raise an exception below
+            cleanParameters.append(param)
+
+        try:
+            return(self.__template__[tuple(cleanParameters)])
+        except:
+            raise KeyError(
+                'itkTemplate : No template %s for the %s class' %
+                (str(parameters), self.__name__))
+
+    def __repr__(self):
+        return '<itkTemplate %s>' % self.__name__
+
+    def __getattribute__(self, attr):
+        """Support for reading doxygen man pages to produce __doc__ strings"""
+        root = itkTemplate.__doxygen_root__
+        indoc = (attr == '__doc__')
+        if indoc and root != "" and self.__name__.startswith('itk'):
+            try:
+                import commands
+                doxyname = self.__name__.replace("::", "_")
+                man_path = "%s/man3/%s.3" % (root, doxyname)
+                bzman_path = "%s/man3/%s.3.bz2" % (root, doxyname)
+                if os.path.exists(bzman_path):
+                        return (
+                            commands.getoutput(
+                                "bunzip2 --stdout '" + bzman_path +
+                                "' | groff -mandoc -Tascii -c"))
+                elif os.path.exists(man_path):
+                    # Use groff here instead of man because man dies when it is
+                    # passed paths with spaces (!) groff does not.
+                    return (
+                        commands.getoutput(
+                            "groff -mandoc -Tascii -c '" +
+                            man_path + "'"))
+                else:
+                    return (
+                        "Cannot find man page for %s: %s"
+                        % (self.__name__, man_path + "[.bz2]"))
+            except Exception as e:
+                return (
+                    "Cannot display man page for %s due to exception: %s."
+                    % (self.__name__, e))
+        else:
+            return object.__getattribute__(self, attr)
+
+    def New(self, *args, **kargs):
+        """TODO: some doc! Don't call it __call__ as it break the __doc__
+        attribute feature in ipython"""
+        import itk
+        keys = self.keys()
+        if len(args) != 0:
+            # try to find a type suitable for the input provided
+            input_types = [output(f).__class__ for f in args]
+            keys = [k for k in self.keys() if k[0] == input_types[0]]
+        cur = itk.auto_pipeline.current
+        if cur is not None and len(cur) != 0:
+            # try to find a type suitable for the input provided
+            input_type = output(cur).__class__
+            keys = [k for k in self.keys() if k[0] == input_type]
+        if len(keys) == 0:
+            raise RuntimeError("No suitable template parameter can be found.")
+        return self[keys[0]].New(*args, **kargs)
+
+    def keys(self):
+        return self.__template__.keys()
+
+    # everything after this comment is for dict interface
+    # and is a copy/paste from DictMixin
+    # only methods to edit dictionary are not there
+    def __iter__(self):
+        for k in self.keys():
+            yield k
+
+    def has_key(self, key):
+        try:
+            value = self[key]
+        except KeyError:
+            return False
+        return True
+
+    def __contains__(self, key):
+        return key in self
+
+    # third level takes advantage of second level definitions
+    def iteritems(self):
+        for k in self:
+            yield (k, self[k])
+
+    def iterkeys(self):
+        return self.__iter__()
+
+    # fourth level uses definitions from lower levels
+    def itervalues(self):
+        for _, v in self.iteritems():
+            yield v
+
+    def values(self):
+        return [v for _, v in self.iteritems()]
+
+    def items(self):
+        return list(self.iteritems())
+
+    def get(self, key, default=None):
+        try:
+            return self[key]
+        except KeyError:
+            return default
+
+    def __len__(self):
+        return len(self.keys())
 
-    if type(parameters) != types.TupleType and type(parameters) != types.ListType :
-      # parameters is a single element.
-      # include it in a list to manage the 2 cases in the same way
-      parameters = [parameters]
 
-    cleanParameters = []
-    for param in parameters:
-      # In the case of itk class instance, get the class
-      if not inspect.isclass( param ) and param.__class__.__name__[:3] == 'itk' and param.__class__.__name__!= "itkCType" :
-        param = param.__class__
+# create a new New function which accepts parameters
+def New(self, *args, **kargs):
+    import sys
+    import itk
 
-      # append the parameter to the list. If it's not a supported type, it is
-      # not in the dictionary and we will raise an exception below
-      cleanParameters.append( param )
+    itk.set_inputs(self, args, kargs)
 
-    try:
-      return(self.__template__[tuple(cleanParameters)])
-    except:
-      raise KeyError, 'itkTemplate : No template %s for the %s class' % (str(parameters), self.__name__)
-
-
-  def __repr__(self):
-    return '<itkTemplate %s>' % self.__name__
-
-  # support for reading doxygen man pages to produce __doc__ strings
-  def __getattribute__(self, attr):
-    if attr == '__doc__' and itkTemplate.__doxygen_root__ != "" and self.__name__.startswith('itk'):
-      try:
-        import commands
-        doxyname = self.__name__.replace("::", "_")
-        man_path = "%s/man3/%s.3" %(itkTemplate.__doxygen_root__, doxyname)
-        bzman_path = "%s/man3/%s.3.bz2" %(itkTemplate.__doxygen_root__, doxyname)
-        if os.path.exists(bzman_path):
-            return commands.getoutput("bunzip2 --stdout '"+bzman_path+"' | groff -mandoc -Tascii -c")
-        elif os.path.exists(man_path):
-          # Use groff here instead of man because man dies when it is passed paths with spaces (!)
-          # groff does not.
-          return commands.getoutput("groff -mandoc -Tascii -c '" + man_path +"'")
+    # now, try to add observer to display progress
+    if "auto_progress" in kargs.keys():
+        if kargs["auto_progress"] in [True, 1]:
+            callback = itk.terminal_progress_callback
+        elif kargs["auto_progress"] == 2:
+            callback = itk.simple_progress_callback
         else:
-          return "Cannot find man page for %s: %s" %(self.__name__, man_path+"[.bz2]")
-      except Exception, e:
-        return "Cannot display man page for %s due to exception: %s." %(self.__name__, e)
+            callback = None
+    elif itkConfig.ProgressCallback:
+        callback = itkConfig.ProgressCallback
     else:
-      return object.__getattribute__(self, attr)
+        callback = None
 
-  def New(self, *args, **kargs):
-    """TODO: some doc! Don't call it __call__ as it break the __doc__ attribute feature in
-    ipython"""
-    import itk
-    keys = self.keys()
-    if len(args) != 0:
-      # try to find a type suitable for the input provided
-      input_types = [output(f).__class__ for f in args]
-      keys = [k for k in self.keys() if k[0] == input_types[0]]
-    if itk.auto_pipeline.current != None and len(itk.auto_pipeline.current) != 0:
-      # try to find a type suitable for the input provided
-      input_type = output(itk.auto_pipeline.current).__class__
-      keys = [k for k in self.keys() if k[0] == input_type]
-    if len(keys) == 0:
-      raise RuntimeError("No suitable template parameter can be found.")
-    return self[keys[0]].New(*args, **kargs)
-
-  def keys(self):
-    return self.__template__.keys()
-
-  # everything after this comment is for dict interface
-  # and is a copy/paste from DictMixin
-  # only methods to edit dictionary are not there
-  def __iter__(self):
-    for k in self.keys():
-      yield k
-
-  def has_key(self,key):
-    try:
-      value=self[key]
-    except KeyError:
-      return False
-    return True
+    if callback:
+        try:
+            name = self.__class__.__name__
 
-  def __contains__(self,key):
-    return self.has_key(key)
+            def progress():
+                # self and callback are kept referenced with a closure
+                callback(name, self.GetProgress())
 
-  # third level takes advantage of second level definitions
-  def iteritems(self):
-    for k in self:
-      yield (k,self[k])
+            self.AddObserver(itk.ProgressEvent(), progress)
+        except:
+            # it seems that something goes wrong...
+            # as this feature is designed for prototyping, it's not really a
+            # problem if an object doesn't have progress reporter, so adding
+            # reporter can silently fail
+            pass
 
-  def iterkeys(self):
-    return self.__iter__()
+    if itkConfig.NotInPlace and "SetInPlace" in dir(self):
+        self.SetInPlace(False)
 
-  # fourth level uses definitions from lower levels
-  def itervalues(self):
-    for _,v in self.iteritems():
-      yield v
+    if itk.auto_pipeline.current is not None:
+        itk.auto_pipeline.current.connect(self)
 
-  def values(self):
-    return [v for _,v in self.iteritems()]
+    return self
 
-  def items(self):
-    return list(self.iteritems())
 
-  def get(self,key,default=None):
+def output(input):
     try:
-      return self[key]
-    except KeyError:
-      return default
-
-  def __len__(self):
-    return len(self.keys())
-
-
-
-# create a new New function which accepts parameters
-def New(self, *args, **kargs) :
-  import sys, itk
-
-  itk.set_inputs( self, args, kargs )
-
-  # now, try to add observer to display progress
-  if "auto_progress" in kargs.keys() :
-    if kargs["auto_progress"] in [True, 1] :
-      callback = itk.terminal_progress_callback
-    elif kargs["auto_progress"] == 2 :
-      callback = itk.simple_progress_callback
-    else :
-      callback = None
-  elif itkConfig.ProgressCallback :
-    callback = itkConfig.ProgressCallback
-  else :
-    callback = None
-
-  if callback :
-    try :
-      name = self.__class__.__name__
-      def progress() :
-        # self and callback are kept referenced with a closure
-        callback(name, self.GetProgress())
-
-      self.AddObserver(itk.ProgressEvent(), progress)
-    except :
-      # it seems that something goes wrong...
-      # as this feature is designed for prototyping, it's not really a problem
-      # if an object  don't have progress reporter, so adding reporter can silently fail
-      pass
-
-  if itkConfig.NotInPlace and "SetInPlace" in dir(self) :
-    self.SetInPlace( False )
-
-  if itk.auto_pipeline.current != None:
-    itk.auto_pipeline.current.connect(self)
-
-  return self
-
-
-def output(input) :
-  try :
-    img = input.GetOutput()
-  except AttributeError :
-    img = input
-  return img
-
-def image(input) :
-  import sys
-  print >> sys.stderr, "WrapITK warning: itk.image() is deprecated. Use itk.output() instead."
-  return output(input)
+        img = input.GetOutput()
+    except AttributeError:
+        img = input
+    return img
+
+
+def image(input):
+    import sys
+    print(
+        ("WrapITK warning: itk.image() is deprecated. "
+            "Use itk.output() instead."), file=sys.stderr)
+    return output(input)
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itkTesting.py b/Utilities/ITK/Wrapping/Generators/Python/itkTesting.py
new file mode 100644
index 0000000..75ff583
--- /dev/null
+++ b/Utilities/ITK/Wrapping/Generators/Python/itkTesting.py
@@ -0,0 +1,63 @@
+#==========================================================================
+#
+#   Copyright Insight Software Consortium
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#          http://www.apache.org/licenses/LICENSE-2.0.txt
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#==========================================================================*/
+
+import itkBase
+import sys
+import os
+import stat
+
+import itkData
+
+# Put the ITK_TEST_ROOT setting in the global namespace.  This
+# package is only used for testing, so this is okay.
+
+ITK_TEST_ROOT = ""
+
+# Look for the -T command line option.
+if not ITK_TEST_ROOT:
+    for a in range(len(sys.argv)):
+        if sys.argv[a] == "-T" and a < len(sys.argv):
+            ITK_TEST_ROOT = sys.argv[a + 1]
+            break
+
+# Check for the environment variable ::ITK_TEST_ROOT.
+if not ITK_TEST_ROOT and 'ITK_TEST_ROOT' in os.environ:
+    ITK_TEST_ROOT = os.environ['ITK_TEST_ROOT']
+
+
+# Use the default output directory.
+if not ITK_TEST_ROOT:
+    ITK_TEST_ROOT = itkBase.defaultTestRoot
+    if ITK_TEST_ROOT == "<NO_DEFAULT>":
+        sys.stderr.write("Set ITK_TEST_ROOT or use -T option to specify.\n")
+        sys.exit(1)
+
+# Setup testing directories.
+ITK_TEST_BASELINE = "%s/Baseline" % itkData.ITK_DATA_ROOT
+ITK_TEST_INPUT = "%s/Input" % itkData.ITK_DATA_ROOT
+ITK_TEST_OUTPUT = "%s/Output" % ITK_TEST_ROOT
+
+try:
+    if not os.path.exists(ITK_TEST_ROOT):
+        os.mkdir(ITK_TEST_OUTPUT)
+except:
+    sys.stderr.write("Bla: %s\n" % repr(sys.exc_info()[0]))
+    sys.stderr.write(
+        "Unable to create testing output directory with name: %s\n" %
+        ITK_TEST_OUTPUT)
+    sys.exit(1)
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itkTypes.py b/Utilities/ITK/Wrapping/Generators/Python/itkTypes.py
index a507f5c..1b08ab5 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/itkTypes.py
+++ b/Utilities/ITK/Wrapping/Generators/Python/itkTypes.py
@@ -16,41 +16,42 @@
 #
 #==========================================================================*/
 
-class itkCType :
-   __cTypes__ = {}
 
-   def __init__(self,name,shortName):
-      self.name=name
-      self.short_name=shortName
+class itkCType:
+    __cTypes__ = {}
 
-      itkCType.__cTypes__[self.name]=self
+    def __init__(self, name, shortName):
+        self.name = name
+        self.short_name = shortName
 
-   def __del__(self):
-      try:
-         del itkCType.__cTypes__[self.name]
-      except:
-         pass
+        itkCType.__cTypes__[self.name] = self
 
-   def __repr__(self):
-      return "<itkCType %s>" % self.name
+    def __del__(self):
+        try:
+            del itkCType.__cTypes__[self.name]
+        except:
+            pass
 
-   def GetCType(name):
-      try:
-         return(itkCType.__cTypes__[name])
-      except KeyError:
-         return(None)
-   GetCType=staticmethod(GetCType)
+    def __repr__(self):
+        return "<itkCType %s>" % self.name
 
+    def GetCType(name):
+        try:
+            return(itkCType.__cTypes__[name])
+        except KeyError:
+            return(None)
+    GetCType = staticmethod(GetCType)
 
-F  = itkCType("float",          "F")
-D  = itkCType("double",         "D")
-LD = itkCType("long double",   "LD")
+
+F = itkCType("float", "F")
+D = itkCType("double", "D")
+LD = itkCType("long double", "LD")
 UC = itkCType("unsigned char", "UC")
-US = itkCType("unsigned short","US")
-UI = itkCType("unsigned int",  "UI")
+US = itkCType("unsigned short", "US")
+UI = itkCType("unsigned int", "UI")
 UL = itkCType("unsigned long", "UL")
-SC = itkCType("signed char",   "SC")
-SS = itkCType("signed short",  "SS")
-SI = itkCType("signed int",    "SI")
-SL = itkCType("signed long",   "SL")
-B  = itkCType("bool",           "B")
+SC = itkCType("signed char", "SC")
+SS = itkCType("signed short", "SS")
+SI = itkCType("signed int", "SI")
+SL = itkCType("signed long", "SL")
+B = itkCType("bool", "B")
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itkdata.py b/Utilities/ITK/Wrapping/Generators/Python/itkdata.py
deleted file mode 100644
index 9e5c232..0000000
--- a/Utilities/ITK/Wrapping/Generators/Python/itkdata.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#==========================================================================
-#
-#   Copyright Insight Software Consortium
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#          http://www.apache.org/licenses/LICENSE-2.0.txt
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-#
-#==========================================================================*/
-
-import itkbase
-import sys
-import os
-
-# Put the ITK_DATA_ROOT setting in the global namespace.  This
-# package is only used for testing, so this is okay.
-
-ITK_DATA_ROOT = ""
-
-# Look for the -D command line option.
-if not ITK_DATA_ROOT:
-  for a in range(len(sys.argv)):
-    if sys.argv[a] == "-D" and a < len(sys.argv):
-      ITK_DATA_ROOT = sys.argv[a+1]
-      break
-
-# Check for the environment variable ::ITK_DATA_ROOT.
-if not ITK_DATA_ROOT and os.environ.has_key('ITK_DATA_ROOT'):
-  ITK_DATA_ROOT = os.environ['ITK_DATA_ROOT']
-
-
-# Use the default output directory.
-if not ITK_DATA_ROOT:
-  ITK_DATA_ROOT = itkbase.defaultDataRoot
diff --git a/Utilities/ITK/Wrapping/Generators/Python/itktesting.py b/Utilities/ITK/Wrapping/Generators/Python/itktesting.py
deleted file mode 100644
index c8dc2f7..0000000
--- a/Utilities/ITK/Wrapping/Generators/Python/itktesting.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#==========================================================================
-#
-#   Copyright Insight Software Consortium
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#          http://www.apache.org/licenses/LICENSE-2.0.txt
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-#
-#==========================================================================*/
-
-import itkbase
-import sys
-import os
-import stat
-
-import itkdata
-
-# Put the ITK_TEST_ROOT setting in the global namespace.  This
-# package is only used for testing, so this is okay.
-
-ITK_TEST_ROOT = ""
-
-# Look for the -T command line option.
-if not ITK_TEST_ROOT:
-  for a in range(len(sys.argv)):
-    if sys.argv[a] == "-T" and a < len(sys.argv):
-      ITK_TEST_ROOT = sys.argv[a+1]
-      break
-
-# Check for the environment variable ::ITK_TEST_ROOT.
-if not ITK_TEST_ROOT and os.environ.has_key('ITK_TEST_ROOT'):
-  ITK_TEST_ROOT = os.environ['ITK_TEST_ROOT']
-
-
-# Use the default output directory.
-if not ITK_TEST_ROOT:
-  ITK_TEST_ROOT = itkbase.defaultTestRoot
-  if ITK_TEST_ROOT == "<NO_DEFAULT>":
-    sys.stderr.write("Set ITK_TEST_ROOT or use -T option to specify.\n")
-    sys.exit(1)
-
-# Setup testing directories.
-ITK_TEST_BASELINE = "%s/Baseline" % itkdata.ITK_DATA_ROOT
-ITK_TEST_INPUT    = "%s/Input"    % itkdata.ITK_DATA_ROOT
-ITK_TEST_OUTPUT   = "%s/Output"   % ITK_TEST_ROOT
-
-try:
-  if not os.path.exists(ITK_TEST_ROOT):
-    os.mkdir(ITK_TEST_OUTPUT)
-except:
-  sys.stderr.write("Bla: %s\n" % `sys.exc_info()[0]`)
-  sys.stderr.write("Unable to create testing output directory with name: %s\n" % ITK_TEST_OUTPUT)
-  sys.exit(1)
diff --git a/Utilities/ITK/Wrapping/Generators/Python/module_ext.i.in b/Utilities/ITK/Wrapping/Generators/Python/module_ext.i.in
index f576d7f..53f0553 100644
--- a/Utilities/ITK/Wrapping/Generators/Python/module_ext.i.in
+++ b/Utilities/ITK/Wrapping/Generators/Python/module_ext.i.in
@@ -1,8 +1,7 @@
 %{
-// workaround for undefined ptrdiff_t with swig 1.3.40
-#include <cstddef>
-
-// workaround for undefined SWIGPY_SLICE_ARG with swig 2.0.3 and 2.0.4
+// Workaround for undefined SWIGPY_SLICE_ARG with swig 2.0.3 and 2.0.4
+// If removed, fails also with swig 3.0, so this has not been fixed ?
+// Needs to be investigated
 #include <iostream>
 
 #if PY_VERSION_HEX >= 0x03020000
diff --git a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/CMakeLists.txt b/Utilities/ITK/Wrapping/Generators/Ruby/Tests/CMakeLists.txt
deleted file mode 100644
index 8689758..0000000
--- a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-
-# configure the test driver
-find_program(ITK_TEST_DRIVER itkTestDriver)
diff --git a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/DicomSliceRead.py b/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/DicomSliceRead.py
deleted file mode 100644
index 6789256..0000000
--- a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/DicomSliceRead.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-#  Example on the use of DicomImageIO for reading a single DICOM slice, rescale
-#  the intensities and save it in a different file format.
-#
-
-from InsightToolkit import *
-
-from sys import argv
-
-#
-# Reads an image in  16bits/pixel
-# and save it as      8bits/pixel
-#
-reader = itkImageFileReaderUS2_New()
-writer = itkImageFileWriterUC2_New()
-
-dicomIO = itkDicomImageIO_New()
-
-reader.SetImageIO( dicomIO.GetPointer() )
-
-filter  = itkRescaleIntensityImageFilterUS2UC2_New()
-
-filter.SetOutputMinimum( 0 )
-filter.SetOutputMaximum(255)
-
-filter.SetInput( reader.GetOutput() )
-writer.SetInput( filter.GetOutput() )
-
-reader.SetFileName( argv[1] )
-writer.SetFileName( argv[2] )
-
-writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageRegistration3.py b/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageRegistration3.py
deleted file mode 100644
index e7ced3d..0000000
--- a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageRegistration3.py
+++ /dev/null
@@ -1,139 +0,0 @@
-#=========================================================================
-#
-#  Program:   Insight Segmentation & Registration Toolkit
-#  Module:    $RCSfile: ImageRegistration3.py,v $
-#  Language:  C++
-#  Date:      $Date: 2006/09/06 20:58:42 $
-#  Version:   $Revision: 1.1 $
-#
-#  Copyright (c) Insight Software Consortium. All rights reserved.
-#  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
-#
-#     This software is distributed WITHOUT ANY WARRANTY; without even
-#     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-#     PURPOSE.  See the above copyright notices for more information.
-#
-#=========================================================================
-
-from InsightToolkit import *
-
-from sys import argv
-
-
-
-#
-#  Read the fixed and moving images using filenames
-#  from the command line arguments
-#
-fixedImageReader  = itkImageFileReaderF2_New()
-movingImageReader = itkImageFileReaderF2_New()
-
-fixedImageReader.SetFileName(  argv[1] )
-movingImageReader.SetFileName( argv[2] )
-
-fixedImageReader.Update()
-movingImageReader.Update()
-
-fixedImage  = fixedImageReader.GetOutput()
-movingImage = movingImageReader.GetOutput()
-
-
-
-
-#
-#  Instantiate the classes for the registration framework
-#
-registration = itkImageRegistrationMethodF2F2_New()
-imageMetric  = itkMeanSquaresImageToImageMetricF2F2_New()
-transform    = itkTranslationTransform2_New()
-optimizer    = itkRegularStepGradientDescentOptimizer_New()
-interpolator = itkLinearInterpolateImageFunctionF2D_New()
-
-
-registration.SetOptimizer(    optimizer.GetPointer()    )
-registration.SetTransform(    transform.GetPointer()    )
-registration.SetInterpolator( interpolator.GetPointer() )
-registration.SetMetric(       imageMetric.GetPointer()  )
-registration.SetFixedImage(  fixedImage  )
-registration.SetMovingImage( movingImage )
-
-registration.SetFixedImageRegion( fixedImage.GetBufferedRegion() )
-
-transform.SetIdentity()
-initialParameters = transform.GetParameters()
-
-registration.SetInitialTransformParameters( initialParameters )
-
-#
-# Iteration Observer
-#
-def iterationUpdate():
-    currentParameter = transform.GetParameters()
-    print "M: %f   P: %f %f " % ( optimizer.GetValue(),
-                        currentParameter.GetElement(0),
-                        currentParameter.GetElement(1) )
-
-iterationCommand = itkPyCommand_New()
-iterationCommand.SetCommandCallable( iterationUpdate )
-optimizer.AddObserver( itkIterationEvent(), iterationCommand.GetPointer() )
-
-
-
-#
-#  Define optimizer parameters
-#
-optimizer.SetMaximumStepLength(  4.00 )
-optimizer.SetMinimumStepLength(  0.01 )
-optimizer.SetNumberOfIterations( 200  )
-
-
-print "Starting registration"
-
-#
-#  Start the registration process
-#
-
-registration.Update()
-
-
-#
-# Get the final parameters of the transformation
-#
-finalParameters = registration.GetLastTransformParameters()
-
-print "Final Registration Parameters "
-print "Translation X =  %f" % (finalParameters.GetElement(0),)
-print "Translation Y =  %f" % (finalParameters.GetElement(1),)
-
-
-
-
-#
-# Now, we use the final transform for resampling the
-# moving image.
-#
-resampler = itkResampleImageFilterF2F2_New()
-resampler.SetTransform( transform.GetPointer()    )
-resampler.SetInput(     movingImage  )
-
-region = fixedImage.GetLargestPossibleRegion()
-
-resampler.SetSize( region.GetSize() )
-
-resampler.SetOutputSpacing( fixedImage.GetSpacing() )
-resampler.SetOutputOrigin(  fixedImage.GetOrigin()  )
-resampler.SetDefaultPixelValue( 100 )
-
-outputCast = itkRescaleIntensityImageFilterF2US2_New()
-outputCast.SetOutputMinimum(      0  )
-outputCast.SetOutputMaximum(  65535  )
-outputCast.SetInput(resampler.GetOutput())
-
-#
-#  Write the resampled image
-#
-writer = itkImageFileWriterUS2_New()
-
-writer.SetFileName( argv[3] )
-writer.SetInput( outputCast.GetOutput() )
-writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageRegistration4.py b/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageRegistration4.py
deleted file mode 100644
index e552b24..0000000
--- a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageRegistration4.py
+++ /dev/null
@@ -1,142 +0,0 @@
-#=========================================================================
-#
-#  Program:   Insight Segmentation & Registration Toolkit
-#  Module:    $RCSfile: ImageRegistration4.py,v $
-#  Language:  C++
-#  Date:      $Date: 2006/09/06 20:58:42 $
-#  Version:   $Revision: 1.1 $
-#
-#  Copyright (c) Insight Software Consortium. All rights reserved.
-#  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
-#
-#     This software is distributed WITHOUT ANY WARRANTY; without even
-#     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-#     PURPOSE.  See the above copyright notices for more information.
-#
-#=========================================================================
-
-from InsightToolkit import *
-
-from sys import argv
-
-
-
-#
-#  Read the fixed and moving images using filenames
-#  from the command line arguments
-#
-fixedImageReader  = itkImageFileReaderF2_New()
-movingImageReader = itkImageFileReaderF2_New()
-
-fixedImageReader.SetFileName(  argv[1] )
-movingImageReader.SetFileName( argv[2] )
-
-fixedImageReader.Update()
-movingImageReader.Update()
-
-fixedImage  = fixedImageReader.GetOutput()
-movingImage = movingImageReader.GetOutput()
-
-
-
-
-#
-#  Instantiate the classes for the registration framework
-#
-registration = itkImageRegistrationMethodF2F2_New()
-imageMetric  = itkMattesMutualInformationImageToImageMetricF2F2_New()
-transform    = itkTranslationTransform2_New()
-optimizer    = itkRegularStepGradientDescentOptimizer_New()
-interpolator = itkLinearInterpolateImageFunctionF2D_New()
-
-
-imageMetric.SetNumberOfHistogramBins( 20 );
-imageMetric.SetNumberOfSpatialSamples( 10000 );
-
-registration.SetOptimizer(    optimizer.GetPointer()    )
-registration.SetTransform(    transform.GetPointer()    )
-registration.SetInterpolator( interpolator.GetPointer() )
-registration.SetMetric(       imageMetric.GetPointer()  )
-registration.SetFixedImage(  fixedImage  )
-registration.SetMovingImage( movingImage )
-
-registration.SetFixedImageRegion( fixedImage.GetBufferedRegion() )
-
-transform.SetIdentity()
-initialParameters = transform.GetParameters()
-
-registration.SetInitialTransformParameters( initialParameters )
-
-#
-# Iteration Observer
-#
-def iterationUpdate():
-    currentParameter = transform.GetParameters()
-    print "M: %f   P: %f %f " % ( optimizer.GetValue(),
-                        currentParameter.GetElement(0),
-                        currentParameter.GetElement(1) )
-
-iterationCommand = itkPyCommand_New()
-iterationCommand.SetCommandCallable( iterationUpdate )
-optimizer.AddObserver( itkIterationEvent(), iterationCommand.GetPointer() )
-
-
-
-#
-#  Define optimizer parameters
-#
-optimizer.SetMaximumStepLength(  4.00 )
-optimizer.SetMinimumStepLength(  0.01 )
-optimizer.SetNumberOfIterations( 200  )
-
-
-print "Starting registration"
-
-#
-#  Start the registration process
-#
-
-registration.Update()
-
-
-#
-# Get the final parameters of the transformation
-#
-finalParameters = registration.GetLastTransformParameters()
-
-print "Final Registration Parameters "
-print "Translation X =  %f" % (finalParameters.GetElement(0),)
-print "Translation Y =  %f" % (finalParameters.GetElement(1),)
-
-
-
-
-#
-# Now, we use the final transform for resampling the
-# moving image.
-#
-resampler = itkResampleImageFilterF2F2_New()
-resampler.SetTransform( transform.GetPointer()    )
-resampler.SetInput(     movingImage  )
-
-region = fixedImage.GetLargestPossibleRegion()
-
-resampler.SetSize( region.GetSize() )
-
-resampler.SetOutputSpacing( fixedImage.GetSpacing() )
-resampler.SetOutputOrigin(  fixedImage.GetOrigin()  )
-resampler.SetDefaultPixelValue( 100 )
-
-outputCast = itkRescaleIntensityImageFilterF2US2_New()
-outputCast.SetOutputMinimum(      0  )
-outputCast.SetOutputMaximum(  65535  )
-outputCast.SetInput(resampler.GetOutput())
-
-#
-#  Write the resampled image
-#
-writer = itkImageFileWriterUS2_New()
-
-writer.SetFileName( argv[3] )
-writer.SetInput( outputCast.GetOutput() )
-writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageRegistration5.py b/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageRegistration5.py
deleted file mode 100644
index 7ba1886..0000000
--- a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageRegistration5.py
+++ /dev/null
@@ -1,161 +0,0 @@
-#
-
-from InsightToolkit import *
-
-from sys import argv
-
-#
-# Read the fixed and moving images using filenames
-# from the command line arguments
-#
-fixedImageReader = itkImageFileReaderF2_New()
-movingImageReader = itkImageFileReaderF2_New()
-
-fixedImageReader.SetFileName(  argv[1] )
-movingImageReader.SetFileName( argv[2] )
-
-fixedImageReader.Update()
-movingImageReader.Update()
-
-fixedImage = fixedImageReader.GetOutput()
-movingImage = movingImageReader.GetOutput()
-
-#
-#  Instantiate the classes for the registration framework
-#
-registration    = itkImageRegistrationMethodF2F2_New()
-imageMetric     = itkMeanSquaresImageToImageMetricF2F2_New()
-transform       = itkCenteredRigid2DTransform_New()
-optimizer       = itkRegularStepGradientDescentOptimizer_New()
-interpolator    = itkLinearInterpolateImageFunctionF2D_New()
-
-registration.SetOptimizer(      optimizer.GetPointer() )
-registration.SetTransform(      transform.GetPointer() )
-registration.SetInterpolator(   interpolator.GetPointer() )
-registration.SetMetric(         imageMetric.GetPointer() )
-registration.SetFixedImage(  fixedImage )
-registration.SetMovingImage( movingImage )
-registration.SetFixedImageRegion(  fixedImage.GetBufferedRegion() )
-
-
-#
-# Initial transform parameters
-#
-transform.SetAngle( 0.0 );
-
-# center of the fixed image
-fixedSpacing = fixedImage.GetSpacing()
-fixedOrigin = fixedImage.GetOrigin()
-fixedSize = fixedImage.GetLargestPossibleRegion().GetSize()
-
-centerFixed = ( fixedOrigin.GetElement(0) + fixedSpacing.GetElement(0) * fixedSize.GetElement(0) / 2.0,
-                fixedOrigin.GetElement(1) + fixedSpacing.GetElement(1) * fixedSize.GetElement(1) / 2.0 )
-
-# center of the moving image
-movingSpacing = movingImage.GetSpacing()
-movingOrigin = movingImage.GetOrigin()
-movingSize = movingImage.GetLargestPossibleRegion().GetSize()
-
-centerMoving = ( movingOrigin.GetElement(0) + movingSpacing.GetElement(0) * movingSize.GetElement(0) / 2.0,
-                 movingOrigin.GetElement(1) + movingSpacing.GetElement(1) * movingSize.GetElement(1) / 2.0  )
-
-# transform center
-center = transform.GetCenter()
-center.SetElement( 0, centerFixed[0] )
-center.SetElement( 1, centerFixed[1] )
-
-# transform translation
-translation = transform.GetTranslation()
-translation.SetElement( 0, centerMoving[0] - centerFixed[0] )
-translation.SetElement( 1, centerMoving[1] - centerFixed[1] )
-
-initialParameters = transform.GetParameters()
-
-print "Initial Parameters: "
-print "Angle: %f" % (initialParameters.GetElement(0), )
-print "Center: %f, %f" % ( initialParameters.GetElement(1), initialParameters.GetElement(2) )
-print "Translation: %f, %f" % (initialParameters.GetElement(3), initialParameters.GetElement(4))
-
-registration.SetInitialTransformParameters( initialParameters )
-
-#
-# Define optimizer parameters
-#
-
-# optimizer scale
-translationScale = 1.0 / 1000.0
-
-optimizerScales = itkArrayD( transform.GetNumberOfParameters() )
-optimizerScales.SetElement(0, 1.0)
-optimizerScales.SetElement(1, translationScale)
-optimizerScales.SetElement(2, translationScale)
-optimizerScales.SetElement(3, translationScale)
-optimizerScales.SetElement(4, translationScale)
-
-optimizer.SetScales( optimizerScales )
-optimizer.SetMaximumStepLength( 0.1 )
-optimizer.SetMinimumStepLength( 0.001 )
-optimizer.SetNumberOfIterations( 200 )
-
-#
-# Iteration Observer
-#
-def iterationUpdate():
-    currentParameter = transform.GetParameters()
-    print "M: %f   P: %f %f %f %f %f " % ( optimizer.GetValue(),
-                                 currentParameter.GetElement(0),
-                                 currentParameter.GetElement(1),
-                                 currentParameter.GetElement(2),
-                                 currentParameter.GetElement(3),
-                                 currentParameter.GetElement(4) )
-
-iterationCommand = itkPyCommand_New()
-iterationCommand.SetCommandCallable( iterationUpdate )
-optimizer.AddObserver( itkIterationEvent(), iterationCommand.GetPointer() )
-
-print "Starting registration"
-
-#
-# Start the registration process
-#
-
-registration.Update()
-
-#
-# Get the final parameters of the transformation
-#
-finalParameters = registration.GetLastTransformParameters()
-
-print "Final Registration Parameters "
-print "Angle in radians  = %f" % finalParameters.GetElement(0)
-print "Rotation Center X = %f" % finalParameters.GetElement(1)
-print "Rotation Center Y = %f" % finalParameters.GetElement(2)
-print "Translation in  X = %f" % finalParameters.GetElement(3)
-print "Translation in  Y = %f" % finalParameters.GetElement(4)
-
-# Now, we use the final transform for resampling the moving image.
-resampler = itkResampleImageFilterF2F2_New()
-
-resampler.SetTransform( transform.GetPointer() )
-resampler.SetInput( movingImage )
-
-region = fixedImage.GetLargestPossibleRegion()
-
-resampler.SetSize( region.GetSize() )
-resampler.SetOutputSpacing( fixedImage.GetSpacing() )
-resampler.SetOutputOrigin(  fixedImage.GetOrigin() )
-resampler.SetDefaultPixelValue( 100 )
-
-#
-# Cast for output
-#
-outputCast = itkRescaleIntensityImageFilterF2US2_New()
-outputCast.SetInput( resampler.GetOutput() )
-outputCast.SetOutputMinimum( 0 )
-outputCast.SetOutputMaximum( 65535 )
-
-writer = itkImageFileWriterUS2_New()
-
-writer.SetFileName( argv[3] )
-writer.SetInput( outputCast.GetOutput() )
-writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageToArray.py b/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageToArray.py
deleted file mode 100644
index 975c146..0000000
--- a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/ImageToArray.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from InsightToolkit import *
-from numarray import *
-from sys import argv
-
-reader = itkImageFileReaderUC2_New()
-
-connector = itkPyBufferUC2_New()
-
-reader.SetFileName( argv[1] )
-
-reader.Update()
-
-print "ready to convert image into array"
-
-buffer = connector.GetArrayFromImage( reader.GetOutput() )
-
-writer = itkImageFileWriterUC2_New()
-
-writer.SetFileName( argv[2] )
-
-print "ready to convert array into image"
-
-writer.SetInput( connector.GetImageFromArray( buffer ) )
-
-writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/VoronoiSegmentation.py b/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/VoronoiSegmentation.py
deleted file mode 100644
index 202ebf7..0000000
--- a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/VoronoiSegmentation.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-#  Example on the use of the VoronoiSegmentationImageFilter.
-#
-
-from InsightToolkit import *
-
-from sys import argv
-
-
-readerInput = itkImageFileReaderUC2_New()
-readerPrior = itkImageFileReaderUC2_New()
-
-readerInput.SetFileName( argv[1] )
-readerPrior.SetFileName( argv[2] )
-
-readerInput.Update()
-readerPrior.Update()
-
-filter  = itkVoronoiSegmentationImageFilterUC2UC2UC2_New()
-
-filter.SetInput(   readerInput.GetOutput() )
-filter.TakeAPrior( readerPrior.GetOutput() )
-
-filter.SetMeanPercentError( eval( argv[4] )  )
-filter.SetSTDPercentError( eval( argv[5] )  )
-
-writer = itkImageFileWriterUC2_New()
-writer.SetFileName( argv[3] )
-writer.SetInput( filter.GetOutput() )
-
-writer.Update()
diff --git a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/itkCurvatureFlowTestPython2.py b/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/itkCurvatureFlowTestPython2.py
deleted file mode 100644
index eaa1675..0000000
--- a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/notYetUsable/itkCurvatureFlowTestPython2.py
+++ /dev/null
@@ -1,93 +0,0 @@
-from InsightToolkit import *
-import itktesting
-
-import sys
-import os
-import shutil
-
-basename = os.path.basename( sys.argv[0] )
-name = os.path.splitext( basename )[0]
-dir  = "Algorithms"
-
-
-testInput  = itktesting.ITK_TEST_INPUT
-testOutput = itktesting.ITK_TEST_OUTPUT
-baseLine   = itktesting.ITK_TEST_BASELINE
-
-
-reader = itkImageFileReaderF2_New()
-reader.SetFileName( testInput+"/cthead1.png")
-
-
-cf     = itkCurvatureFlowImageFilterF2F2_New()
-cf.SetInput( reader.GetOutput() )
-cf.SetTimeStep( 0.25 )
-cf.SetNumberOfIterations( 10 )
-
-
-cfss   = itkShiftScaleImageFilterF2US2_New()
-cfss.SetInput( cf.GetOutput() )
-cfss.SetShift( 0.7 )
-cfss.SetScale( 0.9 )
-
-
-valid  = itkImageFileReaderUS2_New()
-valid.SetFileName( baseLine+"/"+dir+"/"+name+".png")
-
-
-diff =  itkDifferenceImageFilterUS2_New()
-diff.SetValidInput(  valid.GetOutput() )
-diff.SetTestInput(  cfss.GetOutput() )
-diff.SetToleranceRadius( 1 )
-diff.SetDifferenceThreshold( 0 )
-
-diff.Update()
-
-
-meanDiff  = diff.GetMeanDifference()
-totalDiff = diff.GetTotalDifference()
-
-
-print "MeanDifference  = ", meanDiff
-print "TotalDifference = ", totalDiff
-
-
-print "<DartMeasurement name=\"MeanDifference\" type=\"numeric/double\">",meanDiff,"</DartMeasurement>"
-print "<DartMeasurement name=\"TotalDifference\" type=\"numeric/double\">",totalDiff,"</DartMeasurement>"
-
-if ( meanDiff > 0.1 ) :
-  convert = itkCastImageFilterUS2UC2_New()
-  rescale = itkRescaleIntensityImageFilterUS2UC2_New()
-  rescale.SetInput( diff.GetOutput() )
-  rescale.SetOutputMinimum( 0 )
-  rescale.SetOutputMaximum( 255 )
-
-  io = itkPNGImageIO_New()
-  io.SetUseCompression( 1 )
-  io.SetCompressionLevel( 9 )
-
-  writer = itkImageFileWriterUC2_New()
-  writer.SetImageIO( io.GetPointer() )
-  writer.SetInput(  convert.GetOutput() )
-
-  writer.SetFileName( testOutput+"/"+name+".test.png" )
-  convert.SetInput( cfss.GetOutput() )
-  writer.Write()
-
-  writer.SetFileName( testOutput+"/"+name+".diff.png" )
-  writer.SetInput( rescale.GetOutput() )
-  writer.Write()
-
-  shutil.copyfile( baseLine+"/"+dir+"/"+name+".png", testOutput+"/"+name+".valid.png" )
-
-  print "<DartMeasurementFile name=\"TestImage\" type=\"image/png\">"+testOutput+"/"+name+".test.png</DartMeasurementFile>"
-  print "<DartMeasurementFile name=\"DifferenceImage\" type=\"image/png\">"+testOutput+"/"+name+".diff.png</DartMeasurementFile>"
-  print "<DartMeasurementFile name=\"ValidImage\" type=\"image/png\">"+testOutput+"/"+name+".valid.png</DartMeasurementFile>"
-  print "<DartMeasurement name=\"DifferenceShift\" type=\"numeric/double\">",rescale.GetShift(),"</DartMeasurement>"
-  print "<DartMeasurement name=\"DifferenceScale\" type=\"numeric/double\">",rescale.GetScale(),"</DartMeasurement>"
-
-#  return 1
-
-
-
-#return 0
diff --git a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/pythonTestDriver.py.in b/Utilities/ITK/Wrapping/Generators/Ruby/Tests/pythonTestDriver.py.in
deleted file mode 100644
index 408ece6..0000000
--- a/Utilities/ITK/Wrapping/Generators/Ruby/Tests/pythonTestDriver.py.in
+++ /dev/null
@@ -1,76 +0,0 @@
-#!@PYTHON_EXECUTABLE@
-
-# set environment variables
-
-import os, subprocess, sys
-from optparse import OptionParser
-
-# the environment needed to find the lib depend on the system
-# I'm really not sure that's needed on all the systems...
-# TODO: can we replace os.name by os.uname()[0] for all systems ?
-env_lib_path = {"posix": "LD_LIBRARY_PATH", "mac": "DYLD_LIBRARY_PATH", "nt": "PATH"}[os.name]
-# the environment needed to find the lib depend on the system
-if os.name == "posix":
-  if os.uname()[0] == "Darwin" :
-    env_lib_path = "DYLD_LIBRARY_PATH"
-  else :
-    env_lib_path = "LD_LIBRARY_PATH"
-elif os.name == "nt":
-  env_lib_path = "PATH"
-else:
-  raise "Please add the library path for your system."
-lib_path_list = "@PYTHON_TEST_LIB_PATH@".split(';')
-if os.environ.has_key(env_lib_path) :
-  os.environ[env_lib_path] = os.pathsep.join(lib_path_list + [os.environ[env_lib_path]])
-else:
-  os.environ[env_lib_path] = os.pathsep.join(lib_path_list)
-
-env_python_path = "PYTHONPATH"
-python_path_list = "@PYTHON_TEST_PYTHON_PATH@".split(';')
-if os.environ.has_key(env_python_path) :
-  os.environ[env_python_path] = os.pathsep.join(python_path_list + [os.environ[env_python_path]])
-else:
-  os.environ[env_python_path] = os.pathsep.join(python_path_list)
-
-env_wrapitk_python_path = "WRAPITK_PYTHON_PATH"
-wrapitk_python_path_list = "@PYTHON_TEST_WRAPITK_PYTHON_PATH@".split(';')
-if os.environ.has_key(env_wrapitk_python_path) :
-  os.environ[env_wrapitk_python_path] = os.pathsep.join(wrapitk_python_path_list + [os.environ[env_wrapitk_python_path]])
-else:
-  os.environ[env_wrapitk_python_path] = os.pathsep.join(wrapitk_python_path_list)
-
-
-
-# setup the option manager to be able to compare the resulting images in the same test
-
-optionParser = OptionParser(usage="usage: %prog [--compare image1 image2] test.py [arg1 [arg2 [...]]]")
-optionParser.add_option("-c", "--compare", action="append", dest="compare", default=[], metavar="IMAGE1 IMAGE2", nargs=2, help="compare IMAGE1 and IMAGE2 and exit with an error if the images are different. This options can appear several times to compare several images.")
-optionParser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="display the command line before running the programs.")
-
-(options, args) = optionParser.parse_args()
-
-if len(args) < 1:
-  optionParser.print_usage(sys.stderr)
-  sys.exit(1)
-
-# call the program, and exit if it fail
-
-command = ["@PYTHON_EXECUTABLE@"] + args
-if options.verbose:
-  print >> sys.stderr, "+", " ".join(command)
-returnValue = subprocess.call( command )
-if returnValue != 0 :
-  sys.exit( returnValue )
-
-# compare the images if needed
-for imageFile1, imageFile2 in options.compare :
-  command = ["@IMAGE_COMPARE@", imageFile1, imageFile2]
-  if options.verbose:
-    print >> sys.stderr, "+", " ".join(command)
-  returnValue = subprocess.call( command )
-  if returnValue != 0 :
-    sys.exit( returnValue )
-
-
-# everything suceed - just exit
-sys.exit(0)
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/CMakeLists.txt b/Utilities/ITK/Wrapping/Generators/SwigInterface/CMakeLists.txt
index dec2cfe..6e77848 100644
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/CMakeLists.txt
+++ b/Utilities/ITK/Wrapping/Generators/SwigInterface/CMakeLists.txt
@@ -1,16 +1,22 @@
 ###############################################################################
-# find swig
-#find_package(SWIG REQUIRED)
-#include(${SWIG_USE_FILE})
+# Find python
+find_package(PythonInterp REQUIRED)
 
 ###############################################################################
 # Build swig
 
 option(ITK_USE_SYSTEM_SWIG "Use system swig. If OFF, swig is built as an external project." OFF)
 
-set(swig_version 2.0.4)
-set(swig_md5     4319c503ee3a13d2a53be9d828c3adc0)
-set(swigwin_md5  4ab8064b1a8894c8577ef9d0fb2523c8)
+# Require at least SWIG 3.0.0
+if(ITK_USE_SYSTEM_SWIG)
+  if(${SWIG_VERSION} VERSION_LESS 3.0.0)
+    message(WARNING "Swig version less than 3.0.0: \"${SWIG_VERSION}\".")
+  endif()
+endif()
+
+set(swig_version 3.0.2)
+set(swig_md5     62f9b0d010cef36a13a010dc530d0d41)
+set(swigwin_md5  3f18de4fc09ab9abb0d3be37c11fbc8f)
 
 if(WIN32)
   set(swig_ep "${CMAKE_CURRENT_BINARY_DIR}/swigwin-${swig_version}/swig.exe")
@@ -35,6 +41,7 @@ if(ITK_USE_SYSTEM_SWIG)
 else()
   include(ExternalProject)
   if(WIN32)
+    itk_download_attempt_check(SWIG)
     ExternalProject_Add(swig
       URL http://prdownloads.sourceforge.net/swig/swigwin-${swig_version}.zip
       URL_MD5 ${swigwin_md5}
@@ -61,9 +68,10 @@ else()
     #  CXXCPP      C++ preprocessor
 
     # build swig as an external project
-    ExternalProject_add(PCRE
-    URL http://downloads.sourceforge.net/project/pcre/pcre/8.12/pcre-8.12.tar.gz
-    URL_MD5 fa69e4c5d8971544acd71d1f10d59193
+    itk_download_attempt_check(PCRE)
+    ExternalProject_Add(PCRE
+    URL http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
+    URL_MD5 ed58bcbe54d3b1d59e9f5415ef45ce1c
     CONFIGURE_COMMAND
       env
         "CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}"
@@ -107,7 +115,8 @@ else()
     #              This script will default YFLAGS to the empty string to avoid a
     #              default value of `-d' given by some make applications.
 
-    ExternalProject_add(swig
+    itk_download_attempt_check(SWIG)
+    ExternalProject_Add(swig
     URL http://prdownloads.sourceforge.net/swig/swig-${swig_version}.tar.gz
     URL_MD5 ${swig_md5}
     CONFIGURE_COMMAND
@@ -133,12 +142,10 @@ else()
   set(SWIG_EXECUTABLE ${swig_ep} CACHE FILEPATH "swig executable." FORCE)
 endif()
 
-
 ###############################################################################
-# find python
-find_package(PythonInterp REQUIRED)
 
-set(CABLE_INDEX ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/idx.py CACHE INTERNAL "cableidx path")
+set(IDX_GENERATOR ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/idx.py CACHE INTERNAL "idx generator path")
+set(PYGCCXML_DIR ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/pygccxml/src CACHE INTERNAL "pygccxml path")
 
 ###############################################################################
 # install the files requires for swiginterface
@@ -149,12 +156,9 @@ if(NOT EXTERNAL_WRAP_ITK_PROJECT)
   WRAP_ITK_INSTALL(/Configuration/Generators/SwigInterface module.i.in)
   WRAP_ITK_INSTALL(/Configuration/Generators/SwigInterface module.includes.in)
 
-  install(DIRECTORY pygccxml-1.0.0
+  install(DIRECTORY ${PYGCCXML_DIR}
     DESTINATION "${WRAP_ITK_INSTALL_PREFIX}/Configuration/Generators/SwigInterface"
-    PATTERN ".svn" EXCLUDE
-    PATTERN "CVS" EXCLUDE
-    PATTERN "docs" EXCLUDE
-    PATTERN "unittests" EXCLUDE
+    PATTERN ".git" EXCLUDE
   )
 
   install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/idx.py"
@@ -244,15 +248,6 @@ macro(itk_end_wrap_module_swig_interface)
 #      set(opts ${opts} --import "${bi}")
 #    endforeach()
 
-  # message("${opts}")
-
-    # configure the test driver, to set the python path to the pygccxml dir
-  #   find_program(ITK_TEST_DRIVER itkTestDriver)
-  #   set(PYTHON_PYGCCXML_DRIVER "${ITK_TEST_DRIVER}"
-  #     --add-before-env PYTHONPATH "${WRAP_ITK_CMAKE_DIR}/pygccxml-1.0.0/"
-  #     "${PYTHON_EXECUTABLE}"
-  #   )
-
     if(ITK_WRAP_EXPLICIT)
       set(opts ${opts} --include "${WRAPPER_LIBRARY_NAME}Explicit.h")
     endif()
@@ -267,12 +262,13 @@ macro(itk_end_wrap_module_swig_interface)
 #        --include ${WRAPPER_LIBRARY_NAME}.includes
 #        --import ${module_interface_file}
         --swig-include ${module}_ext.i
-        -w1 -w3 -w51 -w52 -w53 -w54 #--warning-error
+        -w1 -w3 -w51 -w52 -w53 -w54
         -A protected -A private
+        -p ${PYGCCXML_DIR}
+        -g ${GCCXML}
         --typedef-input ${typedef_in_file}
         --typedef-output ${typedef_file}
         --include ${module}SwigInterface.h
-        # --verbose
         ${xml_file}
         ${interface_file}
       DEPENDS ${DEPS} ${idx_files} ${IGENERATOR} # ${SWIG_INTERFACE_IDX_FILES} ${SWIG_INTERFACE_FILES} ${typedef_in_file} # ${includes_file}
@@ -350,7 +346,6 @@ macro(itk_end_wrap_submodule_swig_interface module)
   # variables used:
   # WRAPPER_LIBRARY_NAME
   # WRAPPER_LIBRARY_OUTPUT_DIR
-  # WRAPPER_LIBRARY_CABLESWIG_INPUTS
   # WRAPPER_LIBRARY_DEPENDS
   # WRAPPER_MASTER_INDEX_OUTPUT_DIR
   # MODULE_INCLUDES
@@ -384,9 +379,9 @@ macro(itk_end_wrap_submodule_swig_interface module)
   set(idx_file "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${module}.idx")
   add_custom_command(
     OUTPUT ${idx_file}
-    COMMAND ${CABLE_INDEX}
-          ${xml_file} ${idx_file}
-    DEPENDS ${CABLE_INDEX} ${xml_file}
+    COMMAND ${IDX_GENERATOR}
+      ${PYGCCXML_DIR} ${GCCXML} ${xml_file} ${idx_file}
+    DEPENDS ${IDX_GENERATOR} ${xml_file}
   )
   WRAP_ITK_INSTALL("/Configuration/Typedefs/" "${idx_file}")
 #   add_custom_target(${module}Idx DEPENDS ${idx_file})
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/idx.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/idx.py
index 3a75b17..1d5eb26 100644
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/idx.py
+++ b/Utilities/ITK/Wrapping/Generators/SwigInterface/idx.py
@@ -1,41 +1,64 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-import sys, os
-sys.path.append(sys.path[0]+os.sep+'pygccxml-1.0.0')
+# Import unicode literals so that StringIO works on both Python 2 and 3
+from __future__ import unicode_literals
+from __future__ import print_function
 
-import pygccxml, sys, cStringIO
+import sys
+import os
+
+try:
+    # Python 3
+    from io import StringIO
+except ImportError:
+    # Python 2
+    from cStringIO import StringIO
+
+pygccxmlPath = sys.argv[1]
+gccxmlPath = sys.argv[2]
+xmlFilePath = sys.argv[3]
+idxFilePath = sys.argv[4]
+
+sys.path.append(pygccxmlPath)
+import warnings
+# Temporarly hide pygccxml warnings
+# Import normally once pygccxml 1.6.0 is out
+warnings.filterwarnings("ignore", category=UserWarning)
+warnings.filterwarnings("ignore", category=DeprecationWarning)
+import pygccxml
 
 # the output file
-outputFile = cStringIO.StringIO()
+outputFile = StringIO()
 # init the pygccxml stuff
 pygccxml.declarations.scopedef_t.RECURSIVE_DEFAULT = False
 pygccxml.declarations.scopedef_t.ALLOW_EMPTY_MDECL_WRAPPER = True
-pygccxml_config = pygccxml.parser.config.config_t()
-pygccxml_reader = pygccxml.parser.source_reader.source_reader_t(pygccxml_config)
+pygccxml_config = pygccxml.parser.config.gccxml_configuration_t(
+    gccxml_path=gccxmlPath)
+pygccxml_reader = pygccxml.parser.source_reader.source_reader_t(
+    pygccxml_config)
 # and read a xml file
-res = pygccxml_reader.read_xml_file(sys.argv[1])
+res = pygccxml_reader.read_xml_file(xmlFilePath)
 
-global_ns = pygccxml.declarations.get_global_namespace( res )
+global_ns = pygccxml.declarations.get_global_namespace(res)
 cable_ns = global_ns.namespace('_cable_')
 wrappers_ns = cable_ns.namespace('wrappers')
 
-module = os.path.splitext(os.path.basename(sys.argv[1]))[0]
+module = os.path.splitext(os.path.basename(xmlFilePath))[0]
 
 # iterate over all the typedefs in the _cable_::wrappers namespace
 for typedef in wrappers_ns.typedefs():
-  n = typedef.name
-  s = typedef.type.decl_string
-  # drop the :: prefix - it make swig produce invalid code
-  if s.startswith("::"):
-    s = s[2:]
-  print >> outputFile, "{%s} {%s} {%s}" % (s, n, module)
+    n = typedef.name
+    s = typedef.type.decl_string
+    # drop the :: prefix - it make swig produce invalid code
+    if s.startswith("::"):
+        s = s[2:]
+    outputFile.write("{%s} {%s} {%s}\n" % (s, n, module))
 
 content = outputFile.getvalue()
 
-if sys.argv[2] != '-':
-  f = file( sys.argv[2], "w" )
-  f.write( content )
-  f.close()
+if idxFilePath != '-':
+    with open(idxFilePath, "w") as f:
+        f.write(content)
 else:
-  sys.stdout.write( content )
+    sys.stdout.write(content)
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/igenerator.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/igenerator.py
index ec4fb79..5b672c7 100644
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/igenerator.py
+++ b/Utilities/ITK/Wrapping/Generators/SwigInterface/igenerator.py
@@ -1,33 +1,146 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-import sys, os
-sys.path.append(sys.path[0]+os.sep+'pygccxml-1.0.0')
-
-import pygccxml, sys, re, cStringIO, time, os
+# Import unicode literals so that StringIO works on both Python 2 and 3
+from __future__ import unicode_literals
+from __future__ import print_function
+
+import sys
+import os
+import re
+import time
 from optparse import OptionParser
 
+try:
+    # Python 3
+    from io import StringIO
+except ImportError:
+    # Python 2
+    from cStringIO import StringIO
+
 # Start process time measurement
 t0 = time.clock()
 
 optionParser = OptionParser()
-optionParser.add_option("--idx", action="append", dest="idx", default=[], metavar="FILE", help="idx file to be used.")
-optionParser.add_option("--mdx", action="append", dest="mdx", default=[], metavar="FILE", help="master idx file to be used.")
-optionParser.add_option("--include", action="append", dest="includes", default=[], metavar="FILE", help="File to be included in the generated interface file.")
-optionParser.add_option("--take-includes", action="append", dest="take_includes", default=[], metavar="FILE", help="File which contains the include to take, and include in the generated interface file.")
-optionParser.add_option("--swig-include", action="append", dest="swig_includes", default=[], metavar="FILE", help="File to be included by swig (%include) in the generated interface file.")
-optionParser.add_option("--import", action="append", dest="imports", default=[], metavar="FILE", help="File to be imported in the generated interface file.")
-optionParser.add_option("--typedef-input", action="store", type="string", dest="typedef_input")
-optionParser.add_option("--typedef-output", action="store", type="string", dest="typedef_output")
-optionParser.add_option("-w", "--disable-warning", action="append", dest="warnings", default=[], metavar="WARNING", help="Warning to be disabled.")
-optionParser.add_option("-A", "--disable-access-warning", action="append", dest="access_warnings", default=[], metavar="LEVEL", help="Access level where warnings are disabled (public, protected, private).")
-optionParser.add_option("-W", "--warning-error", action="store_true", dest="warningError", help="Treat warnings as errors.")
-optionParser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="Log what is currently done.")
-optionParser.add_option("-k", "--keep", action="store_true", dest="keep", help="Don't rewrite the output file if the content is unchanged.")
+optionParser.add_option(
+    "--idx",
+    action="append",
+    dest="idx",
+    default=[],
+    metavar="FILE",
+    help="idx file to be used.")
+optionParser.add_option(
+    "--mdx",
+    action="append",
+    dest="mdx",
+    default=[],
+    metavar="FILE",
+    help="master idx file to be used.")
+optionParser.add_option(
+    "--include",
+    action="append",
+    dest="includes",
+    default=[],
+    metavar="FILE",
+    help="File to be included in the generated interface file.")
+optionParser.add_option(
+    "--take-includes",
+    action="append",
+    dest="take_includes",
+    default=[],
+    metavar="FILE",
+    help=(
+        "File which contains the include to take, and include in the "
+        "generated interface file."))
+optionParser.add_option(
+    "--swig-include",
+    action="append",
+    dest="swig_includes",
+    default=[],
+    metavar="FILE",
+    help=(
+        "File to be included by swig (%include) in the generated "
+        "interface file."))
+optionParser.add_option(
+    "--import",
+    action="append",
+    dest="imports",
+    default=[],
+    metavar="FILE",
+    help="File to be imported in the generated interface file.")
+optionParser.add_option(
+    "--typedef-input",
+    action="store",
+    type="string",
+    dest="typedef_input")
+optionParser.add_option(
+    "--typedef-output",
+    action="store",
+    type="string",
+    dest="typedef_output")
+optionParser.add_option(
+    "-w",
+    "--disable-warning",
+    action="append",
+    dest="igenerator_warnings",
+    default=[],
+    metavar="WARNING",
+    help="Warning to be disabled.")
+optionParser.add_option(
+    "-A",
+    "--disable-access-warning",
+    action="append",
+    dest="access_warnings",
+    default=[],
+    metavar="LEVEL",
+    help=(
+        "Access level where warnings are disabled "
+        "(public, protected, private)."))
+optionParser.add_option(
+    "-W",
+    "--warning-error",
+    action="store_true",
+    dest="warningError",
+    help="Treat warnings as errors.")
+optionParser.add_option(
+    "-v",
+    "--verbose",
+    action="store_true",
+    dest="verbose",
+    help="Log what is currently done.")
+optionParser.add_option(
+    "-k",
+    "--keep",
+    action="store_true",
+    dest="keep",
+    help="Don't rewrite the output file if the content is unchanged.")
+optionParser.add_option(
+    "-p",
+    "--pygccxml-path",
+    action="store",
+    dest="pygccxml_path",
+    help="Path to pygccxml")
+optionParser.add_option(
+    "-g",
+    "--gccxml-path",
+    action="store",
+    dest="gccxml_path",
+    help="Path to gccxml")
 options, args = optionParser.parse_args()
 
+sys.path.append(options.pygccxml_path)
+import warnings
+# Temporarly hide pygccxml warnings
+# Import normally once pygccxml 1.6.0 is out
+warnings.filterwarnings("ignore", category=UserWarning)
+warnings.filterwarnings("ignore", category=DeprecationWarning)
+import pygccxml
+
+# Apply file, for passing std::string as reference in methods
+applyFile = StringIO()
+applyFileNames = []
 # the output file
-outputFile = cStringIO.StringIO()
+outputFile = StringIO()
 
 # a dict to let us use the alias name instead of the full c++ name. Without
 # that, in many cases, swig don't know that's the same type
@@ -41,60 +154,71 @@ usedTypes = set()
 typedefSource = {}
 
 
-warnings = set()
-
-def warn( id, msg, doWarn=True ):
-  if not doWarn:
-    # don't warn for anything
-    return
-  if str(id) not in options.warnings:
-    if not options.verbose and (id, msg) in warnings:
-      # just do nothing
-      return
-    warnings.add((id, msg))
+igenerator_warnings = set()
+
+
+def igenerator_warn(id, msg, doWarn=True):
+    if not doWarn:
+        # don't warn for anything
+        return
+    if str(id) not in options.igenerator_warnings:
+        if not options.verbose and (id, msg) in igenerator_warnings:
+            # just do nothing
+            return
+        igenerator_warnings.add((id, msg))
+        if options.verbose:
+            if options.warningError:
+                print("error(%s): %s" % (str(id), msg), file=sys.stderr)
+            else:
+                print("warning(%s): %s" % (str(id), msg), file=sys.stderr)
+        else:
+            if options.warningError:
+                print(
+                    "%s: error(%s): %s" %
+                    (args[0], str(id), msg), file=sys.stderr)
+            else:
+                print(
+                    "%s: warning(%s): %s" %
+                    (args[0], str(id), msg), file=sys.stderr)
+
+
+def info(msg):
     if options.verbose:
-      if options.warningError:
-        print >> sys.stderr, "error(%s): %s" % (str(id), msg)
-      else:
-        print >> sys.stderr, "warning(%s): %s" % (str(id), msg)
-    else:
-      if options.warningError:
-        print >> sys.stderr, "%s: error(%s): %s" % (args[0], str(id), msg)
-      else:
-        print >> sys.stderr, "%s: warning(%s): %s" % (args[0], str(id), msg)
-
-def info( msg ):
-  if options.verbose:
-      print >> sys.stderr, "info: %s" % msg
+        print("info: %s" % msg, file=sys.stderr)
 
 notWrapped = [
-  "itk::SmartPointerForwardReference<.+>",
-  "itk::LibHandle",
-  "itk::NeighborhoodAllocator<.+>",
-  "itk::ImageRegion<.+>", # to avoid wrapping all the region for all the dims
-  "itk::ImportImageContainer<.+>",
-  "itk::DefaultPixelAccessor<.+>",
-  "itk::NeighborhoodAccessorFunctor<.+>",
-  "itk::DefaultVectorPixelAccessor<.+>",
-  "itk::VectorImageNeighborhoodAccessorFunctor<.+>",
-  "itk::.*Iterator.*",  # TODO: remove this one ?
-  "itk::Neighborhood<.+>", # TODO: remove this one
-  "itk::ThreadFunctionType",
-  "itk::Functor::.+",
-  "itk::SmartPointer< itk::Functor::.+",
-  "itk::Function::.+",
-  "itk::.+Function.*",  # Level set functions
-  "itk::InterpolateImageFunction<.+>",  # use one more dimension than the wrapped one
-  "itk::watershed::.+",  # ignore the internal classes of the watershed
-  "itk::SmartPointer< itk::VoronoiDiagram2D<.+> >",  # require to wrap too more type
-  "itk::Image< itk::CovariantVector< double, \d+u >, \d+u >",  # used internally in ImageToImageMetric
+    "itk::SmartPointerForwardReference<.+>",
+    "itk::LibHandle",
+    "itk::NeighborhoodAllocator<.+>",
+    # to avoid wrapping all the region for all the dims
+    "itk::ImageRegion<.+>",
+    "itk::ImportImageContainer<.+>",
+    "itk::DefaultPixelAccessor<.+>",
+    "itk::NeighborhoodAccessorFunctor<.+>",
+    "itk::DefaultVectorPixelAccessor<.+>",
+    "itk::VectorImageNeighborhoodAccessorFunctor<.+>",
+    "itk::.*Iterator.*",  # TODO: remove this one ?
+    "itk::Neighborhood<.+>",  # TODO: remove this one
+    "itk::ThreadFunctionType",
+    "itk::Functor::.+",
+    "itk::SmartPointer< itk::Functor::.+",
+    "itk::Function::.+",
+    "itk::.+Function.*",  # Level set functions
+    # use one more dimension than the wrapped one
+    "itk::InterpolateImageFunction<.+>",
+    "itk::watershed::.+",  # ignore the internal classes of the watershed
+    # require to wrap too more type
+    "itk::SmartPointer< itk::VoronoiDiagram2D<.+> >",
+    # used internally in ImageToImageMetric
+    "itk::Image< itk::CovariantVector< double, \d+u >, \d+u >",
 ]
 
-notWrappedRegExp = re.compile( "|".join( [ "^"+s+"$" for s in notWrapped] ) )
+notWrappedRegExp = re.compile("|".join(["^" + s + "$" for s in notWrapped]))
 
 # vcl_complex code
 
-vcl_complex_headers = {"D": """ class vcl_complexD {
+vcl_complex_headers = {
+    "D": """ class vcl_complexD {
    public:
      ~vcl_complexD();
      vcl_complexD & operator=(vcl_complexD const & arg0);
@@ -118,7 +242,7 @@ vcl_complex_headers = {"D": """ class vcl_complexD {
  };
 """,
 
-"F": """class vcl_complexF {
+    "F": """class vcl_complexF {
    public:
      ~vcl_complexF();
      vcl_complexF & operator=(vcl_complexF const & arg0);
@@ -142,7 +266,7 @@ vcl_complex_headers = {"D": """ class vcl_complexD {
  };
 """,
 
-"LD" : """ class vcl_complexLD {
+    "LD": """ class vcl_complexLD {
    public:
      ~vcl_complexLD();
      vcl_complexLD & operator=(vcl_complexLD const & arg0);
@@ -164,430 +288,535 @@ vcl_complex_headers = {"D": """ class vcl_complexD {
    private:
    protected:
  };
-"""
-}
+"""}
 
-def getType(v):
-  if hasattr(v, "type"):
-    return getType(v.type)
-  if hasattr(v, "declaration"):
-    return getType(v.declaration)
-  return v
 
-def getDeclarationString(t):
-  t = getType(t)
-  if t.decl_string == "::PyObject *":
-    # don't go further - we want to keep that one as is
-    return "::PyObject *"
-  if isinstance(t, pygccxml.declarations.cpptypes.pointer_t):
-    return getDeclarationString(getType(t.base)) + " *"
-  elif isinstance(t, pygccxml.declarations.cpptypes.const_t):
-    return getDeclarationString(getType(t.base)) + " const"
-  elif isinstance(t, pygccxml.declarations.cpptypes.reference_t):
-    return getDeclarationString(getType(t.base)) + " &"
-  return t.decl_string
-
-def renameTypesInSTL( s ):
-  if s.startswith( "std::" ) and pygccxml.declarations.templates.is_instantiation(s):
-    args = []
-    for arg in pygccxml.declarations.templates.args(s):
-      t, d = typeAndDecorators( arg );
-      args.append( renameTypesInSTL( get_alias( t ) ) + d )
-    return pygccxml.declarations.templates.join( pygccxml.declarations.templates.name(s), args ) + typeAndDecorators( s )[1]
-  return s
+def getType(v):
+    if hasattr(v, "type"):
+        return getType(v.type)
+    if hasattr(v, "declaration"):
+        return getType(v.declaration)
+    return v
 
 
-def removeStdAllocator( s ):
-  if pygccxml.declarations.templates.is_instantiation(s):
-    args = []
-    for arg in pygccxml.declarations.templates.args(s):
-      if not arg.startswith("std::allocator"):
-        t, d = typeAndDecorators( arg );
-        args.append( removeStdAllocator( t ) + d )
-    return pygccxml.declarations.templates.join( pygccxml.declarations.templates.name(s), args ) + typeAndDecorators( s )[1]
-  return s
-
-
-def typeAndDecorators( s ):
-  end = ""
-  s = s.strip()
-  ends = [" ", "*", "&", "const"]
-  needToContinue = True
-  while needToContinue:
-    needToContinue = False
-    for e in ends:
-      if s.endswith( e ):
-        end = e + end
-        s = s[:-len(e)]
-        needToContinue = True
-  return (s, end)
-
-
-def get_alias( decl_string, w=True ):
-  s = str(decl_string)
-
-  # drop the :: prefix - it make swig produce invalid code
-  if s.startswith("::"):
-    s = s[2:]
-
-  # normalize string
-  s = normalize( s )
-
-  # workaround a bug - or is it a feature ? - somewhere
-  s = s.replace("complex float", "std::complex<float>")
-  s = s.replace("complex double", "std::complex<double>")
-  s = s.replace("complex long double", "std::complex<long double>")
-
-  (s, end) = typeAndDecorators( s )
-
-  if aliases.has_key( s ):
-#    print >> sys.stderr, s, end, "        ", aliases[s]
-    usedTypes.add( aliases[s] )
-    return aliases[s] + end
-
-  if s.startswith("itk::Templates::"):
-    # that's a explicitly instantiated type. The name is the same than the WraITK
-    # one, so lets use it as a base for WrapITK
-    # Ex: itk::Templates::RGBPixelUC
-    # don't store the new string in s, because we need it unchanged if the type is
-    # explicitly instantiated, but not wrapped
-    new_s = s.replace("::Templates::", "")
-    if new_s.split("::")[0] in aliases.values():
-      usedTypes.add( new_s )
-      return new_s + end
-
-  if s[:s.rfind("::")] in aliases:
-    # take care of subtypes/enum/...
-    alias = aliases[ s[:s.rfind("::")] ] + s[s.rfind("::"):]
-    usedTypes.add( alias )
-    return alias + end
-
-  # replace the types defined in this type, to support std::vector<itkDataObject> for example
-  s = renameTypesInSTL( s )
-
-  # drop the allocator part of the type, because it is not supported by the %template directive with some generators (like tcl)
-  s = removeStdAllocator( s )
-
-  # rename basic_string to std::string to make name shorter
-  s = s.replace("std::basic_string< char, std::char_traits< char > >", "std::string")
-
-  # rename some types not renamed by gccxml (why ?)
-  s = s.replace( "itk::SerieUIDContainer", "std::vector< std::string >")
-  s = s.replace( "itk::FilenamesContainer", "std::vector< std::string >")
-
-  if s.startswith( "itk::") and not notWrappedRegExp.match( s ):
-    warn( 4, "ITK type not wrapped, or currently not known: %s" % s, w )
-
-  usedTypes.add( s )
-  return s + end
+def getDeclarationString(t):
+    t = getType(t)
+    if t.decl_string == "::PyObject *":
+        # don't go further - we want to keep that one as is
+        return "::PyObject *"
+    if isinstance(t, pygccxml.declarations.cpptypes.pointer_t):
+        return getDeclarationString(getType(t.base)) + " *"
+    elif isinstance(t, pygccxml.declarations.cpptypes.const_t):
+        return getDeclarationString(getType(t.base)) + " const"
+    elif isinstance(t, pygccxml.declarations.cpptypes.reference_t):
+        return getDeclarationString(getType(t.base)) + " &"
+    return t.decl_string
+
+
+def renameTypesInSTL(s):
+    if s.startswith("std::") and \
+            pygccxml.declarations.templates.is_instantiation(s):
+        args = []
+        for arg in pygccxml.declarations.templates.args(s):
+            t, d = typeAndDecorators(arg)
+            args.append(renameTypesInSTL(get_alias(t)) + d)
+        return pygccxml.declarations.templates.join(
+            pygccxml.declarations.templates.name(s),
+            args) + typeAndDecorators(s)[1]
+    return s
+
+
+def removeStdAllocator(s):
+    if pygccxml.declarations.templates.is_instantiation(s):
+        args = []
+        for arg in pygccxml.declarations.templates.args(s):
+            if not arg.startswith("std::allocator"):
+                t, d = typeAndDecorators(arg)
+                args.append(removeStdAllocator(t) + d)
+        return pygccxml.declarations.templates.join(
+            pygccxml.declarations.templates.name(s),
+            args) + typeAndDecorators(s)[1]
+    return s
+
+
+def typeAndDecorators(s):
+    end = ""
+    s = s.strip()
+    ends = [" ", "*", "&", "const"]
+    needToContinue = True
+    while needToContinue:
+        needToContinue = False
+        for e in ends:
+            if s.endswith(e):
+                end = e + end
+                s = s[:-len(e)]
+                needToContinue = True
+    return (s, end)
+
+
+def get_alias(decl_string, w=True):
+    s = str(decl_string)
+
+    # drop the :: prefix - it make swig produce invalid code
+    if s.startswith("::"):
+        s = s[2:]
+
+    # normalize string
+    s = normalize(s)
+
+    # workaround a bug - or is it a feature ? - somewhere
+    s = s.replace("complex float", "std::complex<float>")
+    s = s.replace("complex double", "std::complex<double>")
+    s = s.replace("complex long double", "std::complex<long double>")
+
+    (s, end) = typeAndDecorators(s)
+
+    if s in aliases:
+        #    print(s, end, "        ", aliases[s], file=sys.stderr)
+        usedTypes.add(aliases[s])
+        return aliases[s] + end
+
+    if s.startswith("itk::Templates::"):
+        # that's a explicitly instantiated type. The name is the same than
+        # the WraITK one, so lets use it as a base for WrapITK
+        # Ex: itk::Templates::RGBPixelUC
+        # don't store the new string in s, because we need it unchanged if
+        # the type is explicitly instantiated, but not wrapped
+        new_s = s.replace("::Templates::", "")
+        if new_s.split("::")[0] in aliases.values():
+            usedTypes.add(new_s)
+            return new_s + end
+
+    if s[:s.rfind("::")] in aliases:
+        # take care of subtypes/enum/...
+        alias = aliases[s[:s.rfind("::")]] + s[s.rfind("::"):]
+        usedTypes.add(alias)
+        return alias + end
+
+    # replace the types defined in this type, to support
+    # std::vector<itkDataObject> for example
+    s = renameTypesInSTL(s)
+
+    # drop the allocator part of the type, because it is not supported by the
+    # %template directive with some generators (like tcl)
+    s = removeStdAllocator(s)
+
+    # rename basic_string to std::string to make name shorter
+    s = s.replace(
+        "std::basic_string< char, std::char_traits< char > >",
+        "std::string")
+
+    # rename some types not renamed by gccxml (why ?)
+    s = s.replace("itk::SerieUIDContainer", "std::vector< std::string >")
+    s = s.replace("itk::FilenamesContainer", "std::vector< std::string >")
+
+    if s.startswith("itk::") and not notWrappedRegExp.match(s):
+        igenerator_warn(
+            4,
+            "ITK type not wrapped, or currently not known: %s" %
+            s,
+            w)
+
+    usedTypes.add(s)
+    return s + end
 
 
 def load_idx(file_name):
-  f = file(file_name)
-  for l in f:
-    (full_name, alias, module) = re.findall(r'{(.*)} {(.*)} {(.*)}', l)[0]
-    # workaround lack of :: prefix in idx files
-    # TODO: would it be better to remove the :: prefix in the output of pygccxml ?
-    # full_name = "::"+full_name
-    # normalize some basic type names
-    full_name = normalize( full_name )
-    # TODO: add a warning if the type is defined several times
-    aliases[ full_name ] = alias
-    # store the source of the def
-    if typedefSource.has_key( alias ) and file_name != typedefSource[ alias ]:
-      warn( 7, "%s in %s is already defined in %s." % (alias, file_name, typedefSource[ alias ]) )
-    else:
-      typedefSource[ alias ] = file_name
-    # don't declare the typedef - they are included from .include files
-    # print >> outputFile, "typedef %s %s;" % (full_name, alias)
-  f.close()
+    with open(file_name, "r") as f:
+        for l in f:
+            (full_name, alias, module) = \
+                re.findall(r'{(.*)} {(.*)} {(.*)}', l)[0]
+            # workaround lack of :: prefix in idx files
+            # TODO: would it be better to remove the :: prefix in the output of
+            # pygccxml ?
+            # full_name = "::"+full_name
+            # normalize some basic type names
+            full_name = normalize(full_name)
+            # TODO: add a warning if the type is defined several times
+            aliases[full_name] = alias
+            # store the source of the def
+            if alias in typedefSource and file_name != typedefSource[alias]:
+                igenerator_warn(
+                    7, "%s in %s is already defined in %s." %
+                    (alias, file_name, typedefSource[alias]))
+            else:
+                typedefSource[alias] = file_name
+            # don't declare the typedef - they are included from .include files
+            # outputFile.write("typedef %s %s;\n" % (full_name, alias))
 
 mdx_loaded = set()
+
+
 def load_mdx(file_name):
-  if file_name in mdx_loaded:
-    # already loaded - no need to do it again
-    return
-  mdx_loaded.add( file_name )
-  f = file( file_name )
-  ls = f.readlines()
-  f.close()
-  for l in ls :
-    if l.startswith( '%' ) or l.isspace():
-      # exclude the lines which are starting with % - that's not the idx files
-      pass
-    elif l.strip().endswith(".mdx"):
-      load_mdx(os.path.dirname(file_name)+os.sep+l.strip())
-    else:
-      load_idx(os.path.dirname(file_name)+os.sep+l.strip())
+    if file_name in mdx_loaded:
+        # already loaded - no need to do it again
+        return
+    mdx_loaded.add(file_name)
+    with open(file_name, "r") as f:
+        ls = f.readlines()
+    for l in ls:
+        if l.startswith('%') or l.isspace():
+            # exclude the lines which are starting with % - that's not the idx
+            # files
+            pass
+        elif l.strip().endswith(".mdx"):
+            load_mdx(os.path.dirname(file_name) + os.sep + l.strip())
+        else:
+            load_idx(os.path.dirname(file_name) + os.sep + l.strip())
 
 
 def normalize(name):
-  name = name.replace("short unsigned int", "unsigned short")
-  name = name.replace("long unsigned int", "unsigned long")
-  name = name.replace("short int", "short")
-  name = name.replace("long int", "long")
+    name = name.replace("short unsigned int", "unsigned short")
+    name = name.replace("long unsigned int", "unsigned long")
+    name = name.replace("short int", "short")
+    name = name.replace("long int", "long")
 #  name = name.replace("unsigned int", "unsigned")
-  # normalize spaces
-  name = " ".join(name.replace(',', ', ').split())
-  return name
-
-
-def generate_class( typedef, indent=0 ):
-  info("Generating interface for %s." % typedef.name)
-
-  if not typedef.name.startswith("vcl_complex"):
-    super_classes = []
-    for super_class in typedef.type.declaration.bases:
-      super_classes.append( "%s %s" % ( super_class.access, get_alias(super_class.related_class.decl_string) ) )
-    s = ""
-    if super_classes:
-      s = " : " + ", ".join( super_classes )
-    print >> outputFile, "  "*indent, "class %s%s {" % ( typedef.name, s )
-
-    # iterate over access
-    for access in pygccxml.declarations.ACCESS_TYPES.ALL:
-
-      # print the access type
-      print >> outputFile, "  "*indent, "  %s:" % access
-
-      # warnings or no warning?
-      w = access not in options.access_warnings
-
-      # iterate over the members
-      for member in typedef.type.declaration.get_members( access=access ):
-        if isinstance( member, pygccxml.declarations.typedef.typedef_t ):
-          warn( 51, "Member typedef are not supported: %s" % member.name, w )
-        elif isinstance( member, pygccxml.declarations.calldef.member_function_t ):
-          generate_method( typedef, member, indent, w )
-        elif isinstance( member, pygccxml.declarations.calldef.constructor_t ):
-          generate_constructor( typedef, member, indent, w )
-        elif isinstance( member, pygccxml.declarations.calldef.member_operator_t ):
-          generate_method( typedef, member, indent, w )
-        elif isinstance( member, pygccxml.declarations.calldef.destructor_t ):
-          generate_destructor( typedef, member, indent, w )
-        elif isinstance( member, pygccxml.declarations.enumeration.enumeration_t ):
-          generate_nested_enum( typedef, member, indent, w )
-        elif isinstance( member, pygccxml.declarations.variable.variable_t ):
-          warn( 52, "Member variables are not supported: %s" % member.name, w )
-        elif isinstance( member, pygccxml.declarations.class_declaration.class_t ):
-          warn( 53, "Member classes are not supported: %s" % member.name, w )
-        elif isinstance( member, pygccxml.declarations.class_declaration.class_declaration_t ):
-          warn( 53, "Member classes are not supported: %s" % member.name, w )
-        elif isinstance( member, pygccxml.declarations.calldef.casting_operator_t ):
-          warn( 54, "Member casting operators are not supported: %s" % member.name, w )
-        else :
-          warn( 50, "Unknown member type: %s" % repr(member), w )
-
-    # finally, close the class
-    print >> outputFile, "  "*indent, "};"
-    print >> outputFile
-    print >> outputFile
-
-  elif typedef.name == "vcl_complexD":
-    print >> outputFile, vcl_complex_headers["D"]
-  elif typedef.name == "vcl_complexF":
-    print >> outputFile, vcl_complex_headers["F"]
-  elif typedef.name == "vcl_complexLD":
-    print >> outputFile, vcl_complex_headers["LD"]
-  else:
-    # vcl_complex is too difficult to wrap in some cases. Only wrap the constructor.
-    print >> outputFile, "  "*indent, "class %s%s {" % ( typedef.name, s )
-
-    # iterate over access
-    for access in pygccxml.declarations.ACCESS_TYPES.ALL:
-
-      # print the access type
-      print >> outputFile, "  "*indent, "  %s:" % access
-
-      # warnings or no warning?
-      w = access not in options.access_warnings
-      for member in typedef.type.declaration.get_members( access=access ):
-        if isinstance( member, pygccxml.declarations.calldef.constructor_t ):
-          generate_constructor( typedef, member, indent, w )
-        elif isinstance( member, pygccxml.declarations.calldef.destructor_t ):
-          generate_destructor( typedef, member, indent, w )
-    # finally, close the class
-    print >> outputFile, "  "*indent, "};"
-    print >> outputFile
-    print >> outputFile
-
-
-def generate_constructor( typedef, constructor, indent, w ):
-  # iterate over the arguments
-  args = []
-  for arg in constructor.arguments:
-    s = "%s %s" % (get_alias(getDeclarationString(arg), w), arg.name)
-    # append the default value if it exists
-    if arg.default_value:
-      s += " = %s" % arg.default_value
-    # and add the string to the arg list
-    args.append( s )
-  print >> outputFile, "  "*indent, "    %s(%s);" % (typedef.name, ", ".join( args) )
-
-
-def generate_destructor( typedef, destructor, indent, w ):
-  print >> outputFile, "  "*indent, "    ~%s();" % typedef.name
-
-
-def generate_enum( typedef ):
-  name = typedef.name
-  enum = typedef.type.declaration
-  decl_string = typedef.type.decl_string
-  # extract the namespace to put it in c++ code. Without that, the code generated by swig
-  # is wrong because it doesn't include the namespace
-  ns = "::".join( decl_string.split("::")[:-1])
-  print >> outputFile, "%{"
-  print >> outputFile, "using namespace %s;" % ns
-  print >> outputFile, "%}"
-  content = [" %s = %i" % (key, value) for key, value in enum.values]
-  print >> outputFile, "enum %s { %s };" % ( name, ", ".join( content ) )
-
-
-def generate_nested_enum( typedef, enum, indent, w ):
-  content = [" %s = %i" % (key, value) for key, value in enum.values]
-  print >> outputFile, "  "*indent, "    enum %s { %s };" % ( enum.name, ", ".join( content ) )
-
-
-def generate_method( typedef, method, indent, w ):
-  info("Generating interface for method  '%s::%s'." % (typedef.name, method.name) )
-  # avoid the apply method for the class vnl_c_vector: the signature is quite strange
-  # and currently confuse swig :-/
-  if "(" in method.return_type.decl_string :
-    warn( 1, "ignoring method not supported by swig '%s::%s'." % (typedef.name, method.name), w )
-    return
-
-  if ( (typedef.name.startswith('vnl_') and method.name in ["as_ref"])
-       or (typedef.name.startswith('itk') and method.name in ["rBegin", "rEnd", "GetSpacingCallback", "GetOriginCallback", "Begin", "End"]) ) :
-    warn( 3, "ignoring black listed method '%s::%s'." % (typedef.name, method.name), w )
-    return
-
-  # iterate over the arguments
-  args = []
-  for arg in method.arguments:
-    s = "%s %s" % (get_alias(getDeclarationString(arg), w), arg.name)
-    if "(" in s:
-      warn( 1, "ignoring method not supported by swig '%s::%s'." % (typedef.name, method.name), w )
-      return
-    # append the default value if it exists
-    if arg.default_value:
-      s += " = %s" % arg.default_value
-    # and add the string to the arg list
-    args.append( s )
-
-  # find the method decorators
-  static = ""
-  const = ""
-  if method.has_static:
-    static = "static "
-  if method.has_const:
-    const = " const"
-  if method.virtuality != "not virtual":
-    static += "virtual "
-  if method.virtuality == "pure virtual":
-    const += " = 0"
-
-  print >> outputFile, "  "*indent, "    %s%s %s(%s)%s;" % (static, get_alias(getDeclarationString(method.return_type), w), method.name, ", ".join( args), const )
-
-
+    # normalize spaces
+    name = " ".join(name.replace(',', ', ').split())
+    return name
+
+
+def generate_class(typedef, indent=0):
+    info("Generating interface for %s." % typedef.name)
+
+    decls = pygccxml.declarations
+
+    if not typedef.name.startswith("vcl_complex"):
+        super_classes = []
+        for super_class in typedef.type.declaration.bases:
+            super_classes.append(
+                "%s %s" %
+                (super_class.access,
+                 get_alias(
+                     super_class.related_class.decl_string)))
+        s = ""
+        if super_classes:
+            s = " : " + ", ".join(super_classes)
+        outputFile.write("  " * indent)
+        outputFile.write("class %s%s {\n" % (typedef.name, s))
+
+        # iterate over access
+        for access in decls.ACCESS_TYPES.ALL:
+
+            # the access type
+            outputFile.write("  " * indent)
+            outputFile.write("  %s:" % access)
+
+            # warnings or no warning?
+            w = access not in options.access_warnings
+
+            # iterate over the members
+            for member in typedef.type.declaration.get_members(access=access):
+                if isinstance(member, decls.typedef.typedef_t):
+                    igenerator_warn(
+                        51,
+                        "Member typedef are not supported: %s" %
+                        member.name,
+                        w)
+                elif isinstance(member, decls.calldef.member_function_t):
+                    generate_method(typedef, member, indent, w)
+                elif isinstance(member, decls.calldef.constructor_t):
+                    generate_constructor(typedef, member, indent, w)
+                elif isinstance(member, decls.calldef.member_operator_t):
+                    generate_method(typedef, member, indent, w)
+                elif isinstance(member, decls.calldef.destructor_t):
+                    generate_destructor(typedef, member, indent, w)
+                elif isinstance(member, decls.enumeration.enumeration_t):
+                    generate_nested_enum(typedef, member, indent, w)
+                elif isinstance(member, decls.variable.variable_t):
+                    igenerator_warn(
+                        52,
+                        "Member variables are not supported: %s" %
+                        member.name,
+                        w)
+                elif isinstance(member, decls.class_declaration.class_t):
+                    igenerator_warn(
+                        53,
+                        "Member classes are not supported: %s" %
+                        member.name,
+                        w)
+                elif isinstance(
+                        member, decls.class_declaration.class_declaration_t):
+                    igenerator_warn(
+                        53,
+                        "Member classes are not supported: %s" %
+                        member.name,
+                        w)
+                elif isinstance(member, decls.calldef.casting_operator_t):
+                    igenerator_warn(
+                        54,
+                        "Member casting operators are not supported: %s" %
+                        member.name,
+                        w)
+                else:
+                    igenerator_warn(
+                        50,
+                        "Unknown member type: %s" %
+                        repr(member),
+                        w)
+
+        # finally, close the class
+        outputFile.write("  " * indent)
+        outputFile.write("};\n\n\n")
+
+    elif typedef.name == "vcl_complexD":
+        outputFile.write(vcl_complex_headers["D"] + '\n')
+    elif typedef.name == "vcl_complexF":
+        outputFile.write(vcl_complex_headers["F"] + '\n')
+    elif typedef.name == "vcl_complexLD":
+        outputFile.write(vcl_complex_headers["LD"] + '\n')
+    else:
+        # vcl_complex is too difficult to wrap in some cases. Only wrap the
+        # constructor.
+        outputFile.write("  " * indent)
+        outputFile.write("class %s%s {\n" % (typedef.name, s))
+
+        # iterate over access
+        for access in pygccxml.declarations.ACCESS_TYPES.ALL:
+
+            # the access type
+            outputFile.write("  " * indent)
+            outputFile.write("  %s:\n" % access)
+
+            # warnings or no warning?
+            w = access not in options.access_warnings
+            for member in typedef.type.declaration.get_members(access=access):
+                if isinstance(member, decls.calldef.constructor_t):
+                    generate_constructor(typedef, member, indent, w)
+                elif isinstance(member, decls.calldef.destructor_t):
+                    generate_destructor(typedef, member, indent, w)
+        # finally, close the class
+        outputFile.write("  " * indent)
+        outputFile.write("};\n\n\n")
+
+
+def generate_constructor(typedef, constructor, indent, w):
+    # iterate over the arguments
+    args = []
+    for arg in constructor.arguments:
+        s = "%s %s" % (get_alias(getDeclarationString(arg), w), arg.name)
+        # append the default value if it exists
+        if arg.default_value:
+            s += " = %s" % arg.default_value
+        # and add the string to the arg list
+        args.append(s)
+    outputFile.write("  " * indent)
+    outputFile.write("    %s(%s);\n" % (typedef.name, ", ".join(args)))
+
+
+def generate_destructor(typedef, destructor, indent, w):
+    outputFile.write("  " * indent)
+    outputFile.write("    ~%s();\n" % typedef.name)
+
+
+def generate_enum(typedef):
+    name = typedef.name
+    enum = typedef.type.declaration
+    decl_string = typedef.type.decl_string
+    # extract the namespace to put it in c++ code. Without that, the code
+    # generated by swig
+    # is wrong because it doesn't include the namespace
+    ns = "::".join(decl_string.split("::")[:-1])
+    outputFile.write("%{\n")
+    outputFile.write("using namespace %s;\n" % ns)
+    outputFile.write("%}\n")
+    content = [" %s = %i" % (key, value) for key, value in enum.values]
+    outputFile.write("enum %s { %s };\n" % (name, ", ".join(content)))
+
+
+def generate_nested_enum(typedef, enum, indent, w):
+    content = [" %s = %i" % (key, value) for key, value in enum.values]
+    outputFile.write("  " * indent)
+    outputFile.write("    enum %s { %s };\n" % (enum.name, ", ".join(content)))
+
+
+def generate_method(typedef, method, indent, w):
+    info(
+        "Generating interface for method  '%s::%s'." %
+        (typedef.name, method.name))
+    # avoid the apply method for the class vnl_c_vector: the signature is
+    # quite strange and currently confuse swig :-/
+    if "(" in method.return_type.decl_string:
+        igenerator_warn(
+            1, "ignoring method not supported by swig '%s::%s'." %
+            (typedef.name, method.name), w)
+        return
+
+    names = [
+        "rBegin",
+        "rEnd",
+        "GetSpacingCallback",
+        "GetOriginCallback",
+        "Begin",
+        "End"]
+
+    if ((typedef.name.startswith('vnl_') and method.name in ["as_ref"])
+            or (typedef.name.startswith('itk') and method.name in names)):
+        igenerator_warn(
+            3, "ignoring black listed method '%s::%s'." %
+            (typedef.name, method.name), w)
+        return
+
+    # iterate over the arguments
+    args = []
+    for arg in method.arguments:
+        s = "%s %s" % (get_alias(getDeclarationString(arg), w), arg.name)
+        if "(" in s:
+            igenerator_warn(
+                1, "ignoring method not supported by swig '%s::%s'." %
+                (typedef.name, method.name), w)
+            return
+        # append the default value if it exists
+        if arg.default_value:
+            s += " = %s" % arg.default_value
+        # and add the string to the arg list
+        args.append(s)
+
+    # find the method decorators
+    static = ""
+    const = ""
+    if method.has_static:
+        static = "static "
+    if method.has_const:
+        const = " const"
+    if method.virtuality != "not virtual":
+        static += "virtual "
+    if method.virtuality == "pure virtual":
+        const += " = 0"
+
+    outputFile.write("  " * indent)
+    outputFile.write(
+        "    %s%s %s(%s)%s;\n" %
+        (static,
+         get_alias(
+             getDeclarationString(
+                 method.return_type),
+             w),
+            method.name,
+            ", ".join(args),
+            const))
+
+    # Check the method arguments for std::string passed by reference.
+    # In this case, save the name of the argument in the applyFileNames list
+    # for further usage.
+    for arg in method.arguments:
+        # arg.type is an instance, there is no clean API in pygccxml to get the
+        # name of the type as a string. This functionnality needs to be added
+        # to pygccxml. Meanwhile, we can use the __str__() method.
+        if arg.type.__str__() == "std::string &":
+            applyFileNames.append(arg.name)
 
 # init the pygccxml stuff
 pygccxml.declarations.scopedef_t.RECURSIVE_DEFAULT = False
 pygccxml.declarations.scopedef_t.ALLOW_EMPTY_MDECL_WRAPPER = True
-# pass a fake gccxml path: it is not used here, but is required by
-# pygccxml
-pygccxml_config = pygccxml.parser.config.config_t()
-#pygccxml_config = pygccxml.parser.config.config_t("gccxml")
+pygccxml_config = pygccxml.parser.config.gccxml_configuration_t(
+    gccxml_path=options.gccxml_path)
 # create a reader
-pygccxml_reader = pygccxml.parser.source_reader.source_reader_t(pygccxml_config)
+pygccxml_reader = pygccxml.parser.source_reader.source_reader_t(
+    pygccxml_config)
 # and read a xml file
 info("Processing %s." % args[0])
 res = pygccxml_reader.read_xml_file(args[0])
 
-global_ns = pygccxml.declarations.get_global_namespace( res )
+global_ns = pygccxml.declarations.get_global_namespace(res)
 cable_ns = global_ns.namespace('_cable_')
 wrappers_ns = cable_ns.namespace('wrappers')
-# pygccxml.declarations.print_declarations( global_ns )
 
 moduleName = cable_ns.variable('group').value[len('(const char*)"'):-1]
 
 # and begin to write the output
-headerFile = cStringIO.StringIO()
+headerFile = StringIO()
 info("Generating %s header." % args[1])
-print >> headerFile, "// This file is automatically generated."
-print >> headerFile, "// Do not modify this file manually."
-print >> headerFile
-print >> headerFile
+headerFile.write("// This file is automatically generated.\n")
+headerFile.write("// Do not modify this file manually.\n\n\n")
+
+langs = [
+    "CHICKEN",
+    "CSHARP",
+    "GUILE",
+    "JAVA",
+    "LUA",
+    "MODULA3",
+    "MZSCHEME",
+    "OCAML",
+    "PERL",
+    "PERL5",
+    "PHP",
+    "PHP4",
+    "PHP5",
+    "PIKE",
+    "PYTHON",
+    "R",
+    "RUBY",
+    "SEXP",
+    "TCL",
+    "XML"]
 
 # first, define the module
 # [1:-1] is there to drop the quotes
-for lang in ["CHICKEN", "CSHARP", "GUILE", "JAVA", "LUA", "MODULA3", "MZSCHEME", "OCAML", "PERL", "PERL5", "PHP", "PHP4", "PHP5", "PIKE", "PYTHON", "R", "RUBY", "SEXP", "TCL", "XML"]:
-  print >> headerFile, "#ifdef SWIG%s" % lang
-  print >> headerFile, "%%module %s%s" % ( moduleName, lang.title() )
-  print >> headerFile, "#endif"
-print >> headerFile
+for lang in langs:
+    headerFile.write("#ifdef SWIG%s\n" % lang)
+    headerFile.write("%%module %s%s\n" % (moduleName, lang.title()))
+    headerFile.write("#endif\n")
+headerFile.write('\n')
 
 # add the includes
 # use a set to avoid putting many times the same include
 s = set()
-print >> headerFile, "%{"
+headerFile.write("%{\n")
 # the include files passed in option
 for f in options.includes:
-  i = '#include "%s"' % f
-  if not i in s:
-    print >> headerFile, i
-    s.add( i )
+    i = '#include "%s"' % f
+    if i not in s:
+        headerFile.write(i + '\n')
+        s.add(i)
 # and the includes files from other files
 for file_name in options.take_includes:
-  f = file( file_name )
-  for l in f :
-    if l.startswith( '#include' ):
-      i = " ".join(l.strip().split())
-      if not i in s:
-        print >> headerFile, i
-        s.add( i )
-  f.close()
-print >> headerFile, "%}"
-print >> headerFile
-print >> headerFile
+    with open(file_name, "r") as f:
+        for l in f:
+            if l.startswith('#include'):
+                i = " ".join(l.strip().split())
+                if i not in s:
+                    headerFile.write(i + '\n')
+                    s.add(i)
+headerFile.write("%}\n\n\n")
 
 # load the aliases files
-print >> headerFile, "%{"
+headerFile.write("%{\n")
 # the idx files passed in option
 for f in options.idx:
-  load_idx(f)
+    load_idx(f)
 # and the idx files in the mdx ones
 for f in options.mdx:
-  load_mdx(f)
+    load_mdx(f)
 # iterate over all the typedefs in the _cable_::wrappers namespace
 # to fill the alias dict
-for typedef in wrappers_ns.typedefs(): #allow_empty=True):
-  s = str(typedef.type.decl_string)
-  # drop the :: prefix - it make swig produce invalid code
-  if s.startswith("::"):
-    s = s[2:]
-  if not aliases.has_key( s ) :
-    warn( 2, "%s (%s) should be already defined in the idx files." % (s, typedef.name) )
-    aliases[s] = typedef.name
-    # declare the typedef
-    print >> headerFile, "typedef %s %s;" % (s, typedef.name)
-
-print >> headerFile, "%}"
-print >> headerFile
-print >> headerFile
+for typedef in wrappers_ns.typedefs():  # allow_empty=True):
+    s = str(typedef.type.decl_string)
+    # drop the :: prefix - it make swig produce invalid code
+    if s.startswith("::"):
+        s = s[2:]
+    if s not in aliases:
+        igenerator_warn(
+            2, "%s (%s) should be already defined in the idx files." %
+            (s, typedef.name))
+        aliases[s] = typedef.name
+        # declare the typedef
+        headerFile.write("typedef %s %s;\n" % (s, typedef.name))
+
+headerFile.write("%}\n\n\n")
 
 # add the imports
-importFile = cStringIO.StringIO()
+importFile = StringIO()
 for f in options.imports:
-  print >> importFile, "%%import %s" % f
-print >> importFile
-print >> importFile
+    importFile.write("%%import %s\n" % f)
+importFile.write("\n\n")
 
 # add the swig includes
-includeFile = cStringIO.StringIO()
+includeFile = StringIO()
 for f in options.swig_includes:
-  print >> includeFile, "%%include %s" % f
-print >> includeFile
-print >> includeFile
+    includeFile.write("%%include %s\n" % f)
+includeFile.write('\n\n')
 
 
 # iterate over all the typedefs in the _cable_::wrappers namespace
@@ -596,16 +825,26 @@ print >> includeFile
 classes = []
 for typedef in wrappers_ns.typedefs():
 
-  # begin a new class
-  if isinstance( typedef.type.declaration, pygccxml.declarations.class_declaration.class_t ):
-    classes.append( (typedef.name, [get_alias(super_class.related_class.decl_string) for super_class in typedef.type.declaration.bases], typedef) )
+    # begin a new class
+    if isinstance(
+            typedef.type.declaration,
+            pygccxml.declarations.class_declaration.class_t):
 
-  elif isinstance( typedef.type.declaration, pygccxml.declarations.enumeration.enumeration_t ):
-    # warn( 6, "Enum are currently supported only nested in a class." )
-    generate_enum( typedef )
+        classes.append((
+            typedef.name,
+            [get_alias(super_class.related_class.decl_string) for
+                super_class in typedef.type.declaration.bases], typedef))
 
-  else:
-    warn( 5, "Unknown type type: %s" % str(typedef.type.declaration) )
+    elif isinstance(
+            typedef.type.declaration,
+            pygccxml.declarations.enumeration.enumeration_t):
+        # igenerator_warn( 6, "Enum are currently supported only nested in a
+        # class." )
+        generate_enum(typedef)
+
+    else:
+        igenerator_warn(
+            5, "Unknown type type: %s" % str(typedef.type.declaration))
 
 
 # copy the classes in a new ordered list, according to the dependencies
@@ -615,77 +854,89 @@ classes = sorted(classes)
 name_already_in_typedefs = []
 typedefs = []
 while len(classes) != 0:
-  nclasses = []
-  for name, deps, typedef in classes:
-    ok = True
-    for d in deps:
-      if d in name_local_classes and d not in name_already_in_typedefs:
-        ok = False
-    if ok:
-      name_already_in_typedefs.append(name)
-      typedefs.append(typedef)
-    else:
-      nclasses.append( (name, deps, typedef) )
-  classes = nclasses
+    nclasses = []
+    for name, deps, typedef in classes:
+        ok = True
+        for d in deps:
+            if d in name_local_classes and d not in name_already_in_typedefs:
+                ok = False
+        if ok:
+            name_already_in_typedefs.append(name)
+            typedefs.append(typedef)
+        else:
+            nclasses.append((name, deps, typedef))
+    classes = nclasses
 
 
 # now really generate the swig interface
 for typedef in typedefs:
-  # begin a new class
-  generate_class( typedef )
+    # begin a new class
+    generate_class(typedef)
 
 
-if len(warnings) > 0 and options.warningError:
-  sys.exit(1)
+if len(igenerator_warnings) > 0 and options.warningError:
+    sys.exit(1)
 
 
 # search the files to import
 usedSources = set()
 for alias in usedTypes:
-  if typedefSource.has_key( alias ):
-    idxName = os.path.basename( typedefSource[ alias ] )
-    iName = idxName[:-len(".idx")]
-    usedSources.add( iName )
-outputFileName = os.path.basename( args[1] )
+    if alias in typedefSource:
+        idxName = os.path.basename(typedefSource[alias])
+        iName = idxName[:-len(".idx")]
+        usedSources.add(iName)
+outputFileName = os.path.basename(args[1])
 if outputFileName in usedSources:
-  usedSources.remove( outputFileName )
-# print usedSources
+    usedSources.remove(outputFileName)
 for src in usedSources:
-  print >> importFile, "%%import %s.i" % src
-print >> importFile
-print >> importFile
+    importFile.write("%%import %s.i\n" % src)
+importFile.write('\n\n')
 
 
 # create the typedef header
 if options.typedef_output:
-  typedefFile = cStringIO.StringIO()
-  print >> typedefFile, "#ifndef __%sSwigInterface_h" % moduleName
-  print >> typedefFile, "#define __%sSwigInterface_h" % moduleName
-  if options.typedef_input:
-    f = file(options.typedef_input)
-    print >> typedefFile, f.read()
-    f.close()
-  for src in usedSources:
-    print >> typedefFile, '#include "%sSwigInterface.h"' % src
-  print >> typedefFile, "#endif"
-  f = file(options.typedef_output, "w")
-  f.write( typedefFile.getvalue() )
-  f.close()
-
+    typedefFile = StringIO()
+    typedefFile.write("#ifndef __%sSwigInterface_h\n" % moduleName)
+    typedefFile.write("#define __%sSwigInterface_h\n" % moduleName)
+    if options.typedef_input:
+        with open(options.typedef_input, "r") as f:
+            typedefFile.write(f.read() + '\n')
+    for src in usedSources:
+        typedefFile.write('#include "%sSwigInterface.h"\n' % src)
+    typedefFile.write("#endif\n")
+    with open(options.typedef_output, "w") as f:
+        f.write(typedefFile.getvalue())
+
+# When a std::string is passed by reference, we need to add the %apply
+# line with the argument name, and the INOUT command.
+# Use a set() to have remove duplicates, this will work event if we got
+# multiple functions with the same argument name in the same .i file
+# (swig should take care of it).
+applyFileNames = set(applyFileNames)
+for name in applyFileNames:
+    applyFile.write(
+        "%apply (std::string& INOUT) { std::string & " + name + "};\n")
+applyFile.write("\n\n")
 
 # finally, really write the output
-content = headerFile.getvalue()+ importFile.getvalue() + includeFile.getvalue() + outputFile.getvalue()
+content = headerFile.getvalue() + importFile.getvalue() + \
+    includeFile.getvalue() + applyFile.getvalue() + outputFile.getvalue()
 
 if args[1] != '-':
-  if options.keep and os.path.exists( args[1] ) and file( args[1] ).read() == content:
-    info("%s unchanged." % args[1])
-  else:
-    info("Writing %s." % args[1])
-    f = file(args[1], "w")
-    f.write( content )
-    f.close()
+
+    if options.keep and os.path.exists(args[1]):
+        with open(args[1], "r") as f:
+            filecontent = f.read()
+
+    if options.keep and os.path.exists(args[1]) and \
+            filecontent == content:
+        info("%s unchanged." % args[1])
+    else:
+        info("Writing %s." % args[1])
+        with open(args[1], "w") as f:
+            f.write(content)
 else:
-  sys.stdout.write( content )
+    sys.stdout.write(content)
 
 # Stop process time measurement
 info("%s seconds i-generation time." % (time.clock() - t0))
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/LICENSE_1_0.txt b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/LICENSE_1_0.txt
deleted file mode 100644
index 36b7cd9..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/LICENSE_1_0.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Boost Software License - Version 1.0 - August 17th, 2003
-
-Permission is hereby granted, free of charge, to any person or organization
-obtaining a copy of the software and accompanying documentation covered by
-this license (the "Software") to use, reproduce, display, distribute,
-execute, and transmit the Software, and to prepare derivative works of the
-Software, and to permit third-parties to whom the Software is furnished to
-do so, all subject to the following:
-
-The copyright notices in the Software and this entire statement, including
-the above license grant, this restriction and the following disclaimer,
-must be included in all copies of the Software, in whole or in part, and
-all derivative works of the Software, unless such copies or derivative
-works are solely in the form of machine-executable object code generated by
-a source language processor.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/MANIFEST b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/MANIFEST
deleted file mode 100644
index f8dc7f9..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/MANIFEST
+++ /dev/null
@@ -1,553 +0,0 @@
-announcement.txt
-LICENSE_1_0.txt
-MANIFEST
-README.txt
-setup.py
-docs\declarations_uml.png
-docs\definition.rest
-docs\design.rest
-docs\download.rest
-docs\links.rest
-docs\parser_uml.png
-docs\pkg-info.txt
-docs\pygccxml.rest
-docs\pygccxml_uml.vsd
-docs\query_interface.rest
-docs\upgrade_issues.rest
-docs\users.rest
-docs\apidocs\api-objects.txt
-docs\apidocs\class-tree.html
-docs\apidocs\crarr.png
-docs\apidocs\epydoc.css
-docs\apidocs\epydoc.js
-docs\apidocs\help.html
-docs\apidocs\identifier-index.html
-docs\apidocs\index.html
-docs\apidocs\module-tree.html
-docs\apidocs\pygccxml-module.html
-docs\apidocs\pygccxml-pysrc.html
-docs\apidocs\pygccxml.declarations-module.html
-docs\apidocs\pygccxml.declarations-pysrc.html
-docs\apidocs\pygccxml.declarations.algorithm-module.html
-docs\apidocs\pygccxml.declarations.algorithm-pysrc.html
-docs\apidocs\pygccxml.declarations.algorithm.match_declaration_t-class.html
-docs\apidocs\pygccxml.declarations.algorithm.visit_function_has_not_been_found_t-class.html
-docs\apidocs\pygccxml.declarations.algorithms_cache-module.html
-docs\apidocs\pygccxml.declarations.algorithms_cache-pysrc.html
-docs\apidocs\pygccxml.declarations.algorithms_cache.declaration_algs_cache_t-class.html
-docs\apidocs\pygccxml.declarations.algorithms_cache.type_algs_cache_t-class.html
-docs\apidocs\pygccxml.declarations.calldef-module.html
-docs\apidocs\pygccxml.declarations.calldef-pysrc.html
-docs\apidocs\pygccxml.declarations.calldef.argument_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.calldef_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.casting_operator_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.constructor_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.destructor_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.free_calldef_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.free_function_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.free_operator_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.member_calldef_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.member_function_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.member_operator_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.operator_t-class.html
-docs\apidocs\pygccxml.declarations.calldef.VIRTUALITY_TYPES-class.html
-docs\apidocs\pygccxml.declarations.call_invocation-module.html
-docs\apidocs\pygccxml.declarations.call_invocation-pysrc.html
-docs\apidocs\pygccxml.declarations.class_declaration-module.html
-docs\apidocs\pygccxml.declarations.class_declaration-pysrc.html
-docs\apidocs\pygccxml.declarations.class_declaration.ACCESS_TYPES-class.html
-docs\apidocs\pygccxml.declarations.class_declaration.class_declaration_t-class.html
-docs\apidocs\pygccxml.declarations.class_declaration.class_t-class.html
-docs\apidocs\pygccxml.declarations.class_declaration.CLASS_TYPES-class.html
-docs\apidocs\pygccxml.declarations.class_declaration.hierarchy_info_t-class.html
-docs\apidocs\pygccxml.declarations.compilers-module.html
-docs\apidocs\pygccxml.declarations.compilers-pysrc.html
-docs\apidocs\pygccxml.declarations.container_traits-module.html
-docs\apidocs\pygccxml.declarations.container_traits-pysrc.html
-docs\apidocs\pygccxml.declarations.container_traits.container_traits_impl_t-class.html
-docs\apidocs\pygccxml.declarations.container_traits.defaults_eraser-class.html
-docs\apidocs\pygccxml.declarations.container_traits.defaults_eraser.recursive_impl-class.html
-docs\apidocs\pygccxml.declarations.cpptypes-module.html
-docs\apidocs\pygccxml.declarations.cpptypes-pysrc.html
-docs\apidocs\pygccxml.declarations.cpptypes.array_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.bool_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.calldef_type_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.char_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.complex_double_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.complex_float_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.complex_long_double_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.compound_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.const_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.declarated_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.double_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.dummy_type_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.ellipsis_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.float_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.free_function_type_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.fundamental_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.int_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.java_fundamental_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.jboolean_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.jbyte_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.jchar_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.jdouble_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.jfloat_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.jint_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.jlong_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.jshort_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.long_double_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.long_int_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.long_long_int_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.long_long_unsigned_int_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.long_unsigned_int_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.member_function_type_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.member_variable_type_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.pointer_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.reference_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.restrict_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.short_int_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.short_unsigned_int_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.signed_char_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.type_qualifiers_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.type_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.unknown_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.unsigned_char_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.unsigned_int_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.void_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.volatile_t-class.html
-docs\apidocs\pygccxml.declarations.cpptypes.wchar_t-class.html
-docs\apidocs\pygccxml.declarations.declaration-module.html
-docs\apidocs\pygccxml.declarations.declaration-pysrc.html
-docs\apidocs\pygccxml.declarations.declaration.declaration_t-class.html
-docs\apidocs\pygccxml.declarations.declaration.location_t-class.html
-docs\apidocs\pygccxml.declarations.decl_factory-module.html
-docs\apidocs\pygccxml.declarations.decl_factory-pysrc.html
-docs\apidocs\pygccxml.declarations.decl_factory.decl_factory_t-class.html
-docs\apidocs\pygccxml.declarations.decl_printer-module.html
-docs\apidocs\pygccxml.declarations.decl_printer-pysrc.html
-docs\apidocs\pygccxml.declarations.decl_printer.decl_printer_t-class.html
-docs\apidocs\pygccxml.declarations.decl_visitor-module.html
-docs\apidocs\pygccxml.declarations.decl_visitor-pysrc.html
-docs\apidocs\pygccxml.declarations.decl_visitor.decl_visitor_t-class.html
-docs\apidocs\pygccxml.declarations.dependencies-module.html
-docs\apidocs\pygccxml.declarations.dependencies-pysrc.html
-docs\apidocs\pygccxml.declarations.dependencies.dependency_info_t-class.html
-docs\apidocs\pygccxml.declarations.enumeration-module.html
-docs\apidocs\pygccxml.declarations.enumeration-pysrc.html
-docs\apidocs\pygccxml.declarations.enumeration.enumeration_t-class.html
-docs\apidocs\pygccxml.declarations.filtering'-module.html
-docs\apidocs\pygccxml.declarations.filtering'-pysrc.html
-docs\apidocs\pygccxml.declarations.filtering'.filtering-class.html
-docs\apidocs\pygccxml.declarations.function_traits-module.html
-docs\apidocs\pygccxml.declarations.function_traits-pysrc.html
-docs\apidocs\pygccxml.declarations.matcher'-module.html
-docs\apidocs\pygccxml.declarations.matcher'-pysrc.html
-docs\apidocs\pygccxml.declarations.matcher'.matcher-class.html
-docs\apidocs\pygccxml.declarations.matcher.declaration_not_found_t-class.html
-docs\apidocs\pygccxml.declarations.matcher.multiple_declarations_found_t-class.html
-docs\apidocs\pygccxml.declarations.matchers-module.html
-docs\apidocs\pygccxml.declarations.matchers-pysrc.html
-docs\apidocs\pygccxml.declarations.matchers.access_type_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.and_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.calldef_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.custom_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.declaration_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.matcher_base_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.namespace_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.not_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.operator_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.or_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.regex_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.variable_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.matchers.virtuality_type_matcher_t-class.html
-docs\apidocs\pygccxml.declarations.mdecl_wrapper-module.html
-docs\apidocs\pygccxml.declarations.mdecl_wrapper-pysrc.html
-docs\apidocs\pygccxml.declarations.mdecl_wrapper.call_redirector_t-class.html
-docs\apidocs\pygccxml.declarations.mdecl_wrapper.mdecl_wrapper_t-class.html
-docs\apidocs\pygccxml.declarations.namespace-module.html
-docs\apidocs\pygccxml.declarations.namespace-pysrc.html
-docs\apidocs\pygccxml.declarations.namespace.namespace_t-class.html
-docs\apidocs\pygccxml.declarations.pattern_parser-module.html
-docs\apidocs\pygccxml.declarations.pattern_parser-pysrc.html
-docs\apidocs\pygccxml.declarations.pattern_parser.parser_t-class.html
-docs\apidocs\pygccxml.declarations.scopedef-module.html
-docs\apidocs\pygccxml.declarations.scopedef-pysrc.html
-docs\apidocs\pygccxml.declarations.scopedef.scopedef_t-class.html
-docs\apidocs\pygccxml.declarations.templates-module.html
-docs\apidocs\pygccxml.declarations.templates-pysrc.html
-docs\apidocs\pygccxml.declarations.typedef-module.html
-docs\apidocs\pygccxml.declarations.typedef-pysrc.html
-docs\apidocs\pygccxml.declarations.typedef.typedef_t-class.html
-docs\apidocs\pygccxml.declarations.type_traits-module.html
-docs\apidocs\pygccxml.declarations.type_traits-pysrc.html
-docs\apidocs\pygccxml.declarations.type_traits.auto_ptr_traits-class.html
-docs\apidocs\pygccxml.declarations.type_traits.declaration_xxx_traits-class.html
-docs\apidocs\pygccxml.declarations.type_traits.impl_details-class.html
-docs\apidocs\pygccxml.declarations.type_traits.smart_pointer_traits-class.html
-docs\apidocs\pygccxml.declarations.type_visitor-module.html
-docs\apidocs\pygccxml.declarations.type_visitor-pysrc.html
-docs\apidocs\pygccxml.declarations.type_visitor.type_visitor_t-class.html
-docs\apidocs\pygccxml.declarations.variable-module.html
-docs\apidocs\pygccxml.declarations.variable-pysrc.html
-docs\apidocs\pygccxml.declarations.variable.variable_t-class.html
-docs\apidocs\pygccxml.msvc-module.html
-docs\apidocs\pygccxml.msvc-pysrc.html
-docs\apidocs\pygccxml.msvc.bsc-module.html
-docs\apidocs\pygccxml.msvc.bsc-pysrc.html
-docs\apidocs\pygccxml.msvc.bsc.c_wrapper-module.html
-docs\apidocs\pygccxml.msvc.bsc.c_wrapper-pysrc.html
-docs\apidocs\pygccxml.msvc.bsc.c_wrapper.Bsc-class.html
-docs\apidocs\pygccxml.msvc.bsc.c_wrapper.BSC_STAT-class.html
-docs\apidocs\pygccxml.msvc.bsc.c_wrapper.enums-class.html
-docs\apidocs\pygccxml.msvc.bsc.c_wrapper.enums.ATTRIBUTES-class.html
-docs\apidocs\pygccxml.msvc.bsc.c_wrapper.enums.MBF-class.html
-docs\apidocs\pygccxml.msvc.bsc.c_wrapper.enums.TYPES-class.html
-docs\apidocs\pygccxml.msvc.bsc.c_wrapper.IinstInfo-class.html
-docs\apidocs\pygccxml.msvc.bsc.c_wrapper.NiQ-class.html
-docs\apidocs\pygccxml.msvc.bsc.definition_t-class.html
-docs\apidocs\pygccxml.msvc.bsc.instance_t-class.html
-docs\apidocs\pygccxml.msvc.bsc.module_t-class.html
-docs\apidocs\pygccxml.msvc.bsc.reader_t-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details-module.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details-pysrc.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.Bsc-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.bsc_reader_t-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.BSC_STAT-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.definition_t-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.enums-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.enums.ATTRIBUTES-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.enums.MBF-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.enums.TYPES-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.IinstInfo-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.instance_t-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.module_t-class.html
-docs\apidocs\pygccxml.msvc.bsc_impl_details.NiQ-class.html
-docs\apidocs\pygccxml.msvc.common_utils-module.html
-docs\apidocs\pygccxml.msvc.common_utils-pysrc.html
-docs\apidocs\pygccxml.msvc.common_utils.UNDECORATE_NAME_OPTIONS-class.html
-docs\apidocs\pygccxml.msvc.config-module.html
-docs\apidocs\pygccxml.msvc.config-pysrc.html
-docs\apidocs\pygccxml.msvc.config.binaries_searcher_t-class.html
-docs\apidocs\pygccxml.msvc.pdb-module.html
-docs\apidocs\pygccxml.msvc.pdb-pysrc.html
-docs\apidocs\pygccxml.msvc.pdb.enums-module.html
-docs\apidocs\pygccxml.msvc.pdb.enums-pysrc.html
-docs\apidocs\pygccxml.msvc.pdb.enums.BasicType-class.html
-docs\apidocs\pygccxml.msvc.pdb.enums.CV_access_e-class.html
-docs\apidocs\pygccxml.msvc.pdb.enums.DataKind-class.html
-docs\apidocs\pygccxml.msvc.pdb.enums.NameSearchOptions-class.html
-docs\apidocs\pygccxml.msvc.pdb.enums.UdtKind-class.html
-docs\apidocs\pygccxml.msvc.pdb.impl_details-module.html
-docs\apidocs\pygccxml.msvc.pdb.impl_details-pysrc.html
-docs\apidocs\pygccxml.msvc.pdb.impl_details.full_name_splitter_t-class.html
-docs\apidocs\pygccxml.msvc.pdb.loader-module.html
-docs\apidocs\pygccxml.msvc.pdb.loader-pysrc.html
-docs\apidocs\pygccxml.msvc.pdb.loader.decl_loader_t-class.html
-docs\apidocs\pygccxml.msvc.pdb.loader.decl_loader_t.parent_exists_t-class.html
-docs\apidocs\pygccxml.parser-module.html
-docs\apidocs\pygccxml.parser-pysrc.html
-docs\apidocs\pygccxml.parser.config-module.html
-docs\apidocs\pygccxml.parser.config-pysrc.html
-docs\apidocs\pygccxml.parser.config.gccxml_configuration_t-class.html
-docs\apidocs\pygccxml.parser.config.parser_configuration_t-class.html
-docs\apidocs\pygccxml.parser.declarations_cache-module.html
-docs\apidocs\pygccxml.parser.declarations_cache-pysrc.html
-docs\apidocs\pygccxml.parser.declarations_cache.cache_base_t-class.html
-docs\apidocs\pygccxml.parser.declarations_cache.dummy_cache_t-class.html
-docs\apidocs\pygccxml.parser.declarations_cache.file_cache_t-class.html
-docs\apidocs\pygccxml.parser.declarations_cache.record_t-class.html
-docs\apidocs\pygccxml.parser.directory_cache-module.html
-docs\apidocs\pygccxml.parser.directory_cache-pysrc.html
-docs\apidocs\pygccxml.parser.directory_cache.directory_cache_t-class.html
-docs\apidocs\pygccxml.parser.directory_cache.filename_entry_t-class.html
-docs\apidocs\pygccxml.parser.directory_cache.filename_repository_t-class.html
-docs\apidocs\pygccxml.parser.directory_cache.index_entry_t-class.html
-docs\apidocs\pygccxml.parser.etree_scanner-module.html
-docs\apidocs\pygccxml.parser.etree_scanner-pysrc.html
-docs\apidocs\pygccxml.parser.etree_scanner.etree_saxifier_t-class.html
-docs\apidocs\pygccxml.parser.etree_scanner.ietree_scanner_t-class.html
-docs\apidocs\pygccxml.parser.linker-module.html
-docs\apidocs\pygccxml.parser.linker-pysrc.html
-docs\apidocs\pygccxml.parser.linker.linker_t-class.html
-docs\apidocs\pygccxml.parser.patcher-module.html
-docs\apidocs\pygccxml.parser.patcher-pysrc.html
-docs\apidocs\pygccxml.parser.patcher.casting_operator_patcher_t-class.html
-docs\apidocs\pygccxml.parser.patcher.default_argument_patcher_t-class.html
-docs\apidocs\pygccxml.parser.project_reader-module.html
-docs\apidocs\pygccxml.parser.project_reader-pysrc.html
-docs\apidocs\pygccxml.parser.project_reader.COMPILATION_MODE-class.html
-docs\apidocs\pygccxml.parser.project_reader.file_configuration_t-class.html
-docs\apidocs\pygccxml.parser.project_reader.file_configuration_t.CONTENT_TYPE-class.html
-docs\apidocs\pygccxml.parser.project_reader.project_reader_t-class.html
-docs\apidocs\pygccxml.parser.scanner-module.html
-docs\apidocs\pygccxml.parser.scanner-pysrc.html
-docs\apidocs\pygccxml.parser.scanner.scanner_t-class.html
-docs\apidocs\pygccxml.parser.source_reader-module.html
-docs\apidocs\pygccxml.parser.source_reader-pysrc.html
-docs\apidocs\pygccxml.parser.source_reader.gccxml_runtime_error_t-class.html
-docs\apidocs\pygccxml.parser.source_reader.source_reader_t-class.html
-docs\apidocs\pygccxml.utils-module.html
-docs\apidocs\pygccxml.utils-pysrc.html
-docs\apidocs\pygccxml.utils.cached-class.html
-docs\apidocs\pygccxml.utils.enum-class.html
-docs\apidocs\pygccxml.utils.fs_utils-module.html
-docs\apidocs\pygccxml.utils.fs_utils-pysrc.html
-docs\apidocs\pygccxml.utils.fs_utils.base_files_iterator-class.html
-docs\apidocs\pygccxml.utils.fs_utils.directories_walker-class.html
-docs\apidocs\pygccxml.utils.fs_utils.files_walker-class.html
-docs\apidocs\pygccxml.utils.loggers-class.html
-docs\apidocs\redirect.html
-docs\example\example.hpp
-docs\example\example.hpp.rest
-docs\example\example.hpp.xml
-docs\example\example.hpp.xml.rest
-docs\example\example.py
-docs\example\example.py.rest
-docs\example\example.rest
-docs\example\output.txt
-docs\example\output.txt.rest
-docs\history\history.rest
-docs\msvc\msvc.rest
-gccxml-0.9-upgrade\const_variables.7.xml
-gccxml-0.9-upgrade\const_variables.9.xml
-gccxml-0.9-upgrade\const_variables.h
-gccxml-0.9-upgrade\const_variables.h.diff
-gccxml-0.9-upgrade\default_args.7.xml
-gccxml-0.9-upgrade\default_args.9.xml
-gccxml-0.9-upgrade\default_args.h
-gccxml-0.9-upgrade\default_args.h.diff
-gccxml-0.9-upgrade\demangled.7.xml
-gccxml-0.9-upgrade\demangled.9.xml
-gccxml-0.9-upgrade\demangled.h
-gccxml-0.9-upgrade\demangled.h.diff
-gccxml-0.9-upgrade\offset.7.xml
-gccxml-0.9-upgrade\offset.9.xml
-gccxml-0.9-upgrade\offset.h
-gccxml-0.9-upgrade\offset.h.diff
-gccxml-0.9-upgrade\union_and_struct.7.xml
-gccxml-0.9-upgrade\union_and_struct.9.xml
-gccxml-0.9-upgrade\union_and_struct.h
-gccxml-0.9-upgrade\union_and_struct.h.diff
-pygccxml\__init__.py
-pygccxml\__init__.pyc
-pygccxml\declarations\algorithm.py
-pygccxml\declarations\algorithm.pyc
-pygccxml\declarations\algorithms_cache.py
-pygccxml\declarations\algorithms_cache.pyc
-pygccxml\declarations\calldef.py
-pygccxml\declarations\calldef.pyc
-pygccxml\declarations\call_invocation.py
-pygccxml\declarations\call_invocation.pyc
-pygccxml\declarations\class_declaration.py
-pygccxml\declarations\class_declaration.pyc
-pygccxml\declarations\compilers.py
-pygccxml\declarations\compilers.pyc
-pygccxml\declarations\container_traits.py
-pygccxml\declarations\container_traits.pyc
-pygccxml\declarations\cpptypes.py
-pygccxml\declarations\cpptypes.pyc
-pygccxml\declarations\declaration.py
-pygccxml\declarations\declaration.pyc
-pygccxml\declarations\decl_factory.py
-pygccxml\declarations\decl_factory.pyc
-pygccxml\declarations\decl_printer.py
-pygccxml\declarations\decl_printer.pyc
-pygccxml\declarations\decl_visitor.py
-pygccxml\declarations\decl_visitor.pyc
-pygccxml\declarations\dependencies.py
-pygccxml\declarations\dependencies.pyc
-pygccxml\declarations\enumeration.py
-pygccxml\declarations\enumeration.pyc
-pygccxml\declarations\filtering.py
-pygccxml\declarations\filtering.pyc
-pygccxml\declarations\function_traits.py
-pygccxml\declarations\function_traits.pyc
-pygccxml\declarations\matcher.py
-pygccxml\declarations\matcher.pyc
-pygccxml\declarations\matchers.py
-pygccxml\declarations\matchers.pyc
-pygccxml\declarations\mdecl_wrapper.py
-pygccxml\declarations\mdecl_wrapper.pyc
-pygccxml\declarations\namespace.py
-pygccxml\declarations\namespace.pyc
-pygccxml\declarations\pattern_parser.py
-pygccxml\declarations\pattern_parser.pyc
-pygccxml\declarations\scopedef.py
-pygccxml\declarations\scopedef.pyc
-pygccxml\declarations\templates.py
-pygccxml\declarations\templates.pyc
-pygccxml\declarations\typedef.py
-pygccxml\declarations\typedef.pyc
-pygccxml\declarations\type_traits.py
-pygccxml\declarations\type_traits.pyc
-pygccxml\declarations\type_visitor.py
-pygccxml\declarations\type_visitor.pyc
-pygccxml\declarations\variable.py
-pygccxml\declarations\variable.pyc
-pygccxml\declarations\__init__.py
-pygccxml\declarations\__init__.pyc
-pygccxml\msvc\bsc_impl_details.py
-pygccxml\msvc\bsc_impl_details.pyc
-pygccxml\msvc\common_utils.py
-pygccxml\msvc\common_utils.pyc
-pygccxml\msvc\config.py
-pygccxml\msvc\config.pyc
-pygccxml\msvc\__init__.py
-pygccxml\msvc\__init__.pyc
-pygccxml\msvc\bsc\c_wrapper.py
-pygccxml\msvc\bsc\c_wrapper.pyc
-pygccxml\msvc\bsc\__init__.py
-pygccxml\msvc\bsc\__init__.pyc
-pygccxml\msvc\pdb\enums.py
-pygccxml\msvc\pdb\enums.pyc
-pygccxml\msvc\pdb\impl_details.py
-pygccxml\msvc\pdb\impl_details.pyc
-pygccxml\msvc\pdb\kb.txt
-pygccxml\msvc\pdb\loader.py
-pygccxml\msvc\pdb\loader.pyc
-pygccxml\msvc\pdb\__init__.py
-pygccxml\msvc\pdb\__init__.pyc
-pygccxml\parser\config.py
-pygccxml\parser\config.pyc
-pygccxml\parser\declarations_cache.py
-pygccxml\parser\declarations_cache.pyc
-pygccxml\parser\directory_cache.py
-pygccxml\parser\directory_cache.pyc
-pygccxml\parser\etree_scanner.py
-pygccxml\parser\etree_scanner.pyc
-pygccxml\parser\linker.py
-pygccxml\parser\linker.pyc
-pygccxml\parser\patcher.py
-pygccxml\parser\patcher.pyc
-pygccxml\parser\project_reader.py
-pygccxml\parser\project_reader.pyc
-pygccxml\parser\scanner.py
-pygccxml\parser\scanner.pyc
-pygccxml\parser\source_reader.py
-pygccxml\parser\source_reader.pyc
-pygccxml\parser\__init__.py
-pygccxml\parser\__init__.pyc
-pygccxml\utils\fs_utils.py
-pygccxml\utils\fs_utils.pyc
-pygccxml\utils\__init__.py
-pygccxml\utils\__init__.pyc
-unittests\algorithms_cache_tester.py
-unittests\attributes_tester.py
-unittests\autoconfig.py
-unittests\better_templates_matcher_tester.py
-unittests\bit_fields_tester.py
-unittests\bsc_tester.py
-unittests\cached_source_file_tester.py
-unittests\cache_enums_tester.py
-unittests\calldef_matcher_tester.py
-unittests\call_invocation_tester.py
-unittests\complex_types_tester.py
-unittests\copy_constructor_tester.py
-unittests\core_tester.py
-unittests\declarations_cache_tester.py
-unittests\declarations_comparison_tester.py
-unittests\declarations_tester.py
-unittests\declaration_files_tester.py
-unittests\decl_printer_tester.py
-unittests\decl_string_tester.py
-unittests\demangled_tester.py
-unittests\dependencies_tester.py
-unittests\file_cache_tester.py
-unittests\filtering_tester.py
-unittests\filters_tester.py
-unittests\find_container_traits_tester.py
-unittests\free_operators_tester.py
-unittests\function_traits_tester.py
-unittests\gccxml_runner_tester.py
-unittests\has_binary_operator_traits_tester.py
-unittests\hierarchy_traveling.py
-unittests\namespace_matcher_tester.py
-unittests\parser_test_case.py
-unittests\patcher_tester.py
-unittests\pdb_tester.py
-unittests\plain_c_tester.py
-unittests\profile_parser.py
-unittests\project_reader_correctness_tester.py
-unittests\remove_template_defaults_tester.py
-unittests\results.txt
-unittests\source_reader_tester.py
-unittests\start_with_declarations_tester.py
-unittests\string_traits_tester.py
-unittests\templates_tester.py
-unittests\test_all.py
-unittests\test_performance.py
-unittests\text_reader_tester.py
-unittests\timeit_test_parser.py
-unittests\typedefs_tester.py
-unittests\type_as_exception_bug_tester.py
-unittests\type_traits_tester.py
-unittests\unnamed_classes_tester.py
-unittests\unnamed_enums_bug_tester.py
-unittests\variable_matcher_tester.py
-unittests\vector_traits_tester.py
-unittests\xmlfile_reader_tester.py
-unittests\data\abstract_classes.hpp
-unittests\data\attributes.hpp
-unittests\data\better_templates_matcher_tester.hpp
-unittests\data\big.xml.bz2
-unittests\data\big2-new.xml
-unittests\data\big2.xml
-unittests\data\big2.xml.bz2
-unittests\data\bit_fields.hpp
-unittests\data\complex_types.hpp
-unittests\data\core_cache.hpp
-unittests\data\core_class_hierarchy.hpp
-unittests\data\core_class_hierarchy.hpp.xml
-unittests\data\core_diamand_hierarchy_base.hpp
-unittests\data\core_diamand_hierarchy_derived1.hpp
-unittests\data\core_diamand_hierarchy_derived2.hpp
-unittests\data\core_diamand_hierarchy_final_derived.hpp
-unittests\data\core_membership.hpp
-unittests\data\core_ns_join_1.hpp
-unittests\data\core_ns_join_2.hpp
-unittests\data\core_ns_join_3.hpp
-unittests\data\core_overloads_1.hpp
-unittests\data\core_overloads_2.hpp
-unittests\data\core_types.hpp
-unittests\data\covariant_returns.hpp
-unittests\data\declarations_calldef.hpp
-unittests\data\declarations_comparison.hpp
-unittests\data\declarations_enums.hpp
-unittests\data\declarations_for_filtering.hpp
-unittests\data\declarations_variables.hpp
-unittests\data\decl_cache_file1.txt
-unittests\data\decl_cache_file1_duplicate.txt
-unittests\data\decl_cache_file2.txt
-unittests\data\demangled.hpp
-unittests\data\demangled_tester_64bit.xml
-unittests\data\free_operators.hpp
-unittests\data\has_public_binary_operator_traits.hpp
-unittests\data\include_all.hpp
-unittests\data\include_std.hpp
-unittests\data\indexing_suites2.hpp
-unittests\data\noncopyable.hpp
-unittests\data\ogre.1.7.xml
-unittests\data\ogre.1.7.xml.bz2
-unittests\data\ogre1.4.xml
-unittests\data\patcher.hpp
-unittests\data\patcher_tester_64bit.xml
-unittests\data\plain_c.c
-unittests\data\pygccxml.cache
-unittests\data\remove_template_defaults.hpp
-unittests\data\string_traits.hpp
-unittests\data\typedefs1.hpp
-unittests\data\typedefs2.hpp
-unittests\data\typedefs_base.hpp
-unittests\data\type_as_exception_bug.h
-unittests\data\type_traits.hpp
-unittests\data\unnamed_classes.hpp
-unittests\data\unnamed_enums_bug1.hpp
-unittests\data\unnamed_enums_bug2.hpp
-unittests\data\unnamed_ns_bug.hpp
-unittests\data\vector_traits.hpp
-unittests\data\xxx.bsc
-unittests\data\xxx.bsc.bz2
-unittests\data\xxx.pdb.bz2
-unittests\data\msvc_build\all.cpp
-unittests\data\msvc_build\msvc_build.sln
-unittests\data\msvc_build\msvc_build.vcproj
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/PKG-INFO b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/PKG-INFO
deleted file mode 100644
index d0c83ea..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/PKG-INFO
+++ /dev/null
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: pygccxml
-Version: 1.0.0
-Summary: GCC-XML generated file reader
-Home-page: http://www.language-binding.net/pygccxml/pygccxml.html
-Author: Roman Yakovenko
-Author-email: roman.yakovenko at gmail.com
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/README.txt b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/README.txt
deleted file mode 100644
index 74031ee..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/README.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-pygccxml - Reading GCCXML output
-================================
-
-pygccxml is a specialized XML reader that reads the output from GCCXML.
-
-Homepage: http://www.language-binding.net/pygccxml/pygccxml.html
-
-
-Install
--------
-
-The package uses the Python distutils so you can do the usual procedure:
-
-  python setup.py install
-
-For more information about using the distutils see the Python manual
-"Installing Python Modules".
-
-
-Documentation
--------------
-
-For examples and tutorials see the pygccxml web site. An API reference
-is available in the directory docs/apidocs in the source archive.
-
-If you obtained the source code from the subversion repository you
-have to build the API reference yourself. This can be done using the
-setup script:
-
-  python setup.py doc
-
-In order for this to work you need epydoc (http://epydoc.sourceforge.net).
-
-
---------------------------------------------------------------------------
-Copyright 2004-2008 Roman Yakovenko.
-Distributed under the Boost Software License, Version 1.0. (See
-accompanying file LICENSE_1_0.txt or copy at
-http://www.boost.org/LICENSE_1_0.txt)
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/announcement.txt b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/announcement.txt
deleted file mode 100644
index 7fa14fd..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/announcement.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-Hello!
-
-I'm pleased to announce the 1.0 release of pygccxml.
-
-What is pygccxml?
-=================
-
-"...The purpose of the GCC-XML extension is to generate an XML description of a
-C++ program from GCC's internal representation. "
-
--- Introduction to GCC-XML
-
-The purpose of pygccxml is to read a generated file and provide a simple
-framework to navigate C++ declarations, using Python classes.
-
-Where is pygccxml?
-==================
-
-Site: http://language-binding.net/pygccxml/pygccxml.html
-
-Download: http://language-binding.net/pygccxml/download.html
-
-What's new?
-===========
-
-Features
----------
-
-* Support for ellipsis was added.
-
-* New experimental back-end, based on ``.pdb`` (progam database file), was added.
-
-* New high-level API wrapper for ``.bsc`` (browse source code file) was added.
-
-
-Bug fixes
----------
-
-* Search algorithm, for template instantiated classes, was improved.
-
-
-For a more complete list, please see the news:
-http://language-binding.net/pygccxml/history/history.html
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/__init__.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/__init__.py
deleted file mode 100644
index 0daa07b..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/__init__.py
+++ /dev/null
@@ -1,337 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-contains classes that describe different C++ declarations
-"""
-
-import compilers
-
-from dependencies import dependency_info_t
-from declaration import location_t
-from declaration import declaration_t
-from scopedef import scopedef_t
-from enumeration import enumeration_t
-from namespace import namespace_t
-
-from class_declaration import class_t
-from class_declaration import CLASS_TYPES
-from class_declaration import ACCESS_TYPES
-from class_declaration import hierarchy_info_t
-from class_declaration import class_declaration_t
-from class_declaration import class_types
-
-from typedef import typedef_t
-
-from cpptypes import type_t
-from cpptypes import dummy_type_t
-from cpptypes import unknown_t
-from cpptypes import ellipsis_t
-from cpptypes import fundamental_t
-from cpptypes import void_t
-from cpptypes import char_t
-from cpptypes import signed_char_t
-from cpptypes import unsigned_char_t
-from cpptypes import wchar_t
-from cpptypes import short_int_t
-from cpptypes import short_unsigned_int_t
-from cpptypes import bool_t
-from cpptypes import int_t
-from cpptypes import unsigned_int_t
-from cpptypes import long_int_t
-from cpptypes import long_unsigned_int_t
-from cpptypes import long_long_int_t
-from cpptypes import long_long_unsigned_int_t
-from cpptypes import float_t
-from cpptypes import double_t
-from cpptypes import long_double_t
-from cpptypes import FUNDAMENTAL_TYPES
-from cpptypes import compound_t
-from cpptypes import volatile_t
-from cpptypes import const_t
-from cpptypes import pointer_t
-from cpptypes import reference_t
-from cpptypes import restrict_t
-from cpptypes import array_t
-from cpptypes import calldef_type_t
-from cpptypes import free_function_type_t
-from cpptypes import member_function_type_t
-from cpptypes import member_variable_type_t
-from cpptypes import declarated_t
-from cpptypes import type_qualifiers_t
-#java types
-from cpptypes import java_fundamental_t
-from cpptypes import jbyte_t
-from cpptypes import jshort_t
-from cpptypes import jint_t
-from cpptypes import jlong_t
-from cpptypes import jfloat_t
-from cpptypes import jdouble_t
-from cpptypes import jchar_t
-from cpptypes import jboolean_t
-
-
-
-from variable import variable_t
-
-from algorithm import full_name
-from algorithm import full_name_from_declaration_path
-from algorithm import make_flatten
-from algorithm import apply_visitor
-from algorithm import declaration_path
-from algorithm import get_named_parent
-from algorithm import find_declaration
-from algorithm import match_declaration_t
-from algorithm import find_all_declarations
-from algorithm import find_first_declaration
-from algorithm import declaration_files
-from algorithm import visit_function_has_not_been_found_t
-from algorithm import get_global_namespace
-
-from calldef import VIRTUALITY_TYPES
-from calldef import FUNCTION_VIRTUALITY_TYPES
-from calldef import argument_t
-from calldef import calldef_t
-from calldef import member_calldef_t
-from calldef import free_calldef_t
-from calldef import operator_t
-from calldef import member_function_t
-from calldef import constructor_t
-from calldef import destructor_t
-from calldef import member_operator_t
-from calldef import casting_operator_t
-from calldef import free_function_t
-from calldef import free_operator_t
-
-from decl_visitor import decl_visitor_t
-from type_visitor import type_visitor_t
-
-from type_traits import decompose_type
-from type_traits import decompose_class
-
-
-from type_traits import is_enum
-from type_traits import enum_declaration
-from type_traits import enum_traits
-
-from type_traits import is_class
-from type_traits import class_traits
-from type_traits import is_class_declaration
-from type_traits import class_declaration_traits
-
-
-from type_traits import is_bool
-from type_traits import is_same
-from type_traits import is_void
-from type_traits import is_void_pointer
-from type_traits import is_const
-from type_traits import base_type
-from type_traits import is_array
-from type_traits import is_pointer
-from type_traits import is_volatile
-from type_traits import is_integral
-from type_traits import is_reference
-from type_traits import is_arithmetic
-from type_traits import is_fundamental
-from type_traits import is_floating_point
-from type_traits import is_base_and_derived
-from type_traits import is_convertible
-from type_traits import is_noncopyable
-from type_traits import is_std_string
-from type_traits import is_std_wstring
-from type_traits import is_std_ostream
-from type_traits import is_std_wostream
-from type_traits import is_calldef_pointer
-
-from type_traits import is_unary_operator
-from type_traits import is_binary_operator
-
-from type_traits import array_size
-from type_traits import array_item_type
-
-from type_traits import remove_cv
-from type_traits import remove_const
-from type_traits import remove_alias
-from type_traits import remove_pointer
-from type_traits import remove_volatile
-from type_traits import remove_reference
-from type_traits import remove_declarated
-
-from type_traits import has_destructor
-from type_traits import has_public_less
-from type_traits import has_copy_constructor
-has_trivial_copy = has_copy_constructor #backward comp mode will be removed
-from type_traits import has_public_equal
-from type_traits import has_public_assign
-from type_traits import has_public_destructor
-from type_traits import has_public_constructor
-from type_traits import has_trivial_constructor
-from type_traits import find_trivial_constructor
-from type_traits import has_public_binary_operator
-from type_traits import has_any_non_copyconstructor
-
-from type_traits import auto_ptr_traits
-from type_traits import smart_pointer_traits
-
-from container_traits import list_traits
-from container_traits import deque_traits
-from container_traits import queue_traits
-from container_traits import priority_queue_traits
-from container_traits import vector_traits
-from container_traits import stack_traits
-from container_traits import map_traits
-from container_traits import multimap_traits
-from container_traits import hash_map_traits
-from container_traits import hash_multimap_traits
-from container_traits import set_traits
-from container_traits import hash_set_traits
-from container_traits import multiset_traits
-from container_traits import hash_multiset_traits
-from container_traits import find_container_traits
-
-from function_traits import is_same_function
-
-all_container_traits = container_traits.container_traits
-"""tuple of all STD container traits classes"""
-
-sequential_container_traits = \
-[
-    list_traits
-    , deque_traits
-    , queue_traits
-    , priority_queue_traits
-    , vector_traits
-    , stack_traits
-    , set_traits
-    , hash_set_traits
-    , multiset_traits
-    , hash_multiset_traits
-]
-"""list, that contains all STD container traits classes"""
-
-
-import templates
-import call_invocation
-
-from filtering import filtering
-
-from decl_factory import decl_factory_t
-
-from matchers import matcher_base_t
-from matchers import or_matcher_t
-from matchers import and_matcher_t
-from matchers import not_matcher_t
-from matchers import declaration_matcher_t
-from matchers import calldef_matcher_t
-from matchers import namespace_matcher_t
-from matchers import variable_matcher_t
-from matchers import regex_matcher_t
-from matchers import access_type_matcher_t
-from matchers import operator_matcher_t
-from matchers import custom_matcher_t
-from matchers import virtuality_type_matcher_t
-
-#make matchers to look more like functors
-or_matcher = or_matcher_t
-"""see L{or_matcher} for documentation"""
-and_matcher = and_matcher_t
-"""see L{and_matcher} for documentation"""
-not_matcher = not_matcher_t
-"""see L{not_matcher} for documentation"""
-declaration_matcher = declaration_matcher_t
-"""see L{declaration_matcher} for documentation"""
-calldef_matcher = calldef_matcher_t
-"""see L{calldef_matcher} for documentation"""
-namespace_matcher = namespace_matcher_t
-"""see L{namespace_matcher} for documentation"""
-variable_matcher = variable_matcher_t
-"""see L{variable_matcher} for documentation"""
-regex_matcher = regex_matcher_t
-"""see L{regex_matcher} for documentation"""
-access_type_matcher = access_type_matcher_t
-"""see L{access_type_matcher} for documentation"""
-operator_matcher = operator_matcher_t
-"""see L{operator_matcher} for documentation"""
-custom_matcher = custom_matcher_t
-"""see L{custom_matcher} for documentation"""
-virtuality_type_matcher = virtuality_type_matcher_t
-"""see L{virtuality_type_matcher} for documentation"""
-
-from matcher import matcher
-
-from mdecl_wrapper import mdecl_wrapper_t
-
-from decl_printer import decl_printer_t
-from decl_printer import print_declarations
-
-
-import scopedef
-
-scopedef.scopedef_t._impl_all_decl_types = \
-[
-    scopedef.scopedef_t
-    , enumeration_t
-    , namespace_t
-    , class_t
-    , class_declaration_t
-    , typedef_t
-    , variable_t
-    , calldef_t
-    , member_calldef_t
-    , free_calldef_t
-    , operator_t
-    , member_function_t
-    , constructor_t
-    , destructor_t
-    , member_operator_t
-    , casting_operator_t
-    , free_function_t
-    , free_operator_t
-]
-
-__impl_matchers = scopedef.scopedef_t._impl_matchers
-__impl_decl_types = scopedef.scopedef_t._impl_decl_types
-
-__impl_matchers[ scopedef.scopedef_t.decl ] = declaration_matcher_t
-
-__impl_matchers[ scopedef.scopedef_t.class_ ] = declaration_matcher_t
-__impl_decl_types[ scopedef.scopedef_t.class_ ] = class_t
-
-__impl_matchers[ scopedef.scopedef_t.variable ] = variable_matcher_t
-
-__impl_matchers[ scopedef.scopedef_t.calldef ] = calldef_matcher_t
-__impl_decl_types[ scopedef.scopedef_t.calldef ] = calldef_t
-
-__impl_matchers[ scopedef.scopedef_t.operator ] = operator_matcher_t
-__impl_decl_types[ scopedef.scopedef_t.operator ] = operator_t
-
-__impl_matchers[ scopedef.scopedef_t.member_function ] = calldef_matcher_t
-__impl_decl_types[ scopedef.scopedef_t.member_function ] = member_function_t
-
-__impl_matchers[ scopedef.scopedef_t.constructor ] = calldef_matcher_t
-__impl_decl_types[ scopedef.scopedef_t.constructor ] = constructor_t
-
-__impl_matchers[ scopedef.scopedef_t.member_operator ] = operator_matcher_t
-__impl_decl_types[ scopedef.scopedef_t.member_operator ] = member_operator_t
-
-__impl_matchers[ scopedef.scopedef_t.member_operator ] = operator_matcher_t
-__impl_decl_types[ scopedef.scopedef_t.member_operator ] = member_operator_t
-
-__impl_matchers[ scopedef.scopedef_t.casting_operator ] = calldef_matcher_t
-__impl_decl_types[ scopedef.scopedef_t.casting_operator ] = casting_operator_t
-
-__impl_matchers[ scopedef.scopedef_t.enumeration ] = declaration_matcher_t
-__impl_decl_types[ scopedef.scopedef_t.enumeration ] = enumeration_t
-
-__impl_matchers[ scopedef.scopedef_t.typedef ] = declaration_matcher_t
-__impl_decl_types[ scopedef.scopedef_t.typedef ] = typedef_t
-
-__impl_matchers[ namespace_t.namespace ] = namespace_matcher_t
-
-__impl_matchers[ namespace_t.free_function ] = calldef_matcher_t
-__impl_decl_types[ namespace_t.free_function ] = free_function_t
-
-__impl_matchers[ namespace_t.free_operator ] = operator_matcher_t
-__impl_decl_types[ namespace_t.free_operator ] = free_operator_t
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/algorithms_cache.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/algorithms_cache.py
deleted file mode 100644
index 4471eae..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/algorithms_cache.py
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines class that will keep results of different calculations.
-"""
-
-
-class declaration_algs_cache_t( object ):
-    def __init__( self ):
-        object.__init__( self )
-        self._enabled = True
-        self._full_name = None
-        self._full_partial_name = None
-        self._access_type = None
-        self._demangled_name = None
-        self._declaration_path = None
-        self._partial_declaration_path = None
-        self._container_key_type = None
-        self._container_element_type = None
-
-    def disable( self ):
-        self._enabled = False
-
-    def enable( self ):
-        self._enabled = True
-
-    @property
-    def enabled( self ):
-        return self._enabled
-
-    def _get_full_name( self ):
-        return self._full_name
-    def _set_full_name( self, fname ):
-        if not self.enabled:
-            fname = None
-        self._full_name = fname
-    full_name = property( _get_full_name, _set_full_name )
-
-    def _get_full_partial_name( self ):
-        return self._full_partial_name
-    def _set_full_partial_name( self, fname ):
-        if not self.enabled:
-            fname = None
-        self._full_partial_name = fname
-    full_partial_name = property( _get_full_partial_name, _set_full_partial_name )
-
-    def _get_access_type( self ):
-        return self._access_type
-    def _set_access_type( self, access_type ):
-        if not self.enabled:
-            access_type = None
-        self._access_type = access_type
-    access_type = property( _get_access_type, _set_access_type )
-
-    def _get_demangled_name( self ):
-        return self._demangled_name
-    def _set_demangled_name( self, demangled_name ):
-        if not self.enabled:
-            demangled_name = None
-        self._demangled_name = demangled_name
-    demangled_name = property( _get_demangled_name, _set_demangled_name )
-
-    def _get_declaration_path( self ):
-        return self._declaration_path
-    def _set_declaration_path( self, declaration_path ):
-        if not self.enabled:
-            declaration_path = None
-        self._declaration_path = declaration_path
-    declaration_path = property( _get_declaration_path, _set_declaration_path )
-
-    def _get_partial_declaration_path( self ):
-        return self._partial_declaration_path
-    def _set_partial_declaration_path( self, partial_declaration_path ):
-        if not self.enabled:
-            partial_declaration_path = None
-        self._partial_declaration_path = partial_declaration_path
-    partial_declaration_path = property( _get_partial_declaration_path
-                                             , _set_partial_declaration_path )
-
-    def _get_container_element_type( self ):
-        return self._container_element_type
-    def _set_container_element_type( self, etype ):
-        if not self.enabled:
-            etype = None
-        self._container_element_type = etype
-    container_element_type = property( _get_container_element_type, _set_container_element_type )
-
-    def _get_container_key_type( self ):
-        return self._container_key_type
-    def _set_container_key_type( self, ktype ):
-        if not self.enabled:
-            ktype = None
-        self._container_key_type = ktype
-    container_key_type = property( _get_container_key_type, _set_container_key_type )
-
-    def reset( self ):
-        self.full_name = None
-        self.full_partial_name = None
-        self.access_type = None
-        self.demangled_name = None
-        self.declaration_path = None
-        self.partial_declaration_path = None
-        self.container_key_type = None
-        self.container_element_type = None
-
-    def reset_name_based( self ):
-        self.full_name = None
-        self.full_partial_name = None
-        self.demangled_name = None
-        self.declaration_path = None
-        self.partial_declaration_path = None
-        self.container_key_type = None
-        self.container_element_type = None
-
-    def reset_access_type( self ):
-        self.access_type = None
-
-class type_algs_cache_t( object ):
-    enabled = True
-
-    @staticmethod
-    def disable():
-        type_algs_cache_t.enabled = False
-
-    @staticmethod
-    def enable( self ):
-        type_algs_cache_t.enabled = True
-
-    def __init__( self ):
-        object.__init__( self )
-        self._remove_alias = None
-
-    def _get_remove_alias( self ):
-        return self._remove_alias
-    def _set_remove_alias( self, remove_alias ):
-        if not type_algs_cache_t.enabled:
-            remove_alias = None
-        self._remove_alias = remove_alias
-
-    remove_alias = property( _get_remove_alias, _set_remove_alias )
-
-    def reset(self):
-        self.remove_alias = None
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/call_invocation.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/call_invocation.py
deleted file mode 100644
index 1858df4..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/call_invocation.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-free function call parser
-
-This module implements all functionality necessary to parse C++ free function
-invocation. In other words this module is able to extract next information from
-the string like this C{ print_message( message ) }.
-    - name ( print_message )
-    - list of arguments ( message )
-
-This module also defines few convenience function like L{split} and L{join}.
-"""
-
-import pattern_parser
-
-__THE_PARSER = pattern_parser.parser_t( '(', ')', ',' )
-
-def is_call_invocation( decl_string ):
-    """
-    returns True if decl_string is function invocation and False otherwise
-
-    @param decl_string: string that should be checked for pattern presence
-    @type decl_string: str
-
-    @return: bool
-    """
-    global __THE_PARSER
-    return __THE_PARSER.has_pattern( decl_string )
-
-def name( decl_string ):
-    """
-    returns name of function
-
-    @type decl_string: str
-    @return: str
-    """
-    global __THE_PARSER
-    return __THE_PARSER.name( decl_string )
-
-def args( decl_string ):
-    """
-    returns list of function arguments
-
-    @type decl_string: str
-    @return: [str]
-    """
-    global __THE_PARSER
-    return __THE_PARSER.args( decl_string )
-
-NOT_FOUND = __THE_PARSER.NOT_FOUND
-def find_args( text, start=None ):
-    """
-    finds arguments within function invocation.
-
-    @type text: str
-    @return: [ arguments ] or L{NOT_FOUND} if arguments could not be found
-    """
-    global __THE_PARSER
-    return __THE_PARSER.find_args( text, start )
-
-def split( decl_string ):
-    """returns (name, [arguments] )"""
-    global __THE_PARSER
-    return __THE_PARSER.split( decl_string )
-
-def split_recursive( decl_string ):
-    """returns [(name, [arguments])]"""
-    global __THE_PARSER
-    return __THE_PARSER.split_recursive( decl_string )
-
-def join( name, args, arg_separator=None ):
-    """returns name( argument_1, argument_2, ..., argument_n )"""
-    global __THE_PARSER
-    return __THE_PARSER.join( name, args, arg_separator )
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/calldef.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/calldef.py
deleted file mode 100644
index ab95463..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/calldef.py
+++ /dev/null
@@ -1,561 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines classes, that describes "callable" declarations
-
-This modules contains definition for next C++ declarations:
-    - operator
-        - member
-        - free
-    - function
-        - member
-        - free
-    - constructor
-    - destructor
-"""
-
-import cpptypes
-import algorithm
-import declaration
-import type_traits
-import dependencies
-import call_invocation
-
-class VIRTUALITY_TYPES:
-    """class that defines "virtuality" constants"""
-    NOT_VIRTUAL = 'not virtual'
-    VIRTUAL = 'virtual'
-    PURE_VIRTUAL = 'pure virtual'
-    ALL = [NOT_VIRTUAL, VIRTUAL, PURE_VIRTUAL]
-#preserving backward compatebility
-FUNCTION_VIRTUALITY_TYPES = VIRTUALITY_TYPES
-
-#First level in hierarchy of calldef
-class argument_t(object):
-    """
-    class, that describes argument of "callable" declaration
-    """
-
-    def __init__( self, name='', type=None, default_value=None, attributes=None):
-        object.__init__(self)
-        self._name = name
-        self._default_value = default_value
-        self._type = type
-        self._attributes = attributes
-
-    def clone( self, **keywd ):
-        """constructs new argument_t instance
-
-        return argument_t( name=keywd.get( 'name', self.name )
-                           , type=keywd.get( 'type', self.type )
-                           , default_value=keywd.get( 'default_value', self.default_value )
-                           , attributes=keywd.get( 'attributes', self.attributes ) )
-
-        """
-        return argument_t( name=keywd.get( 'name', self.name )
-                           , type=keywd.get( 'type', self.type )
-                           , default_value=keywd.get( 'default_value', self.default_value )
-                           , attributes=keywd.get( 'attributes', self.attributes ) )
-
-    def __str__(self):
-        if self.ellipsis:
-            return "..."
-        else:
-            if self.default_value==None:
-                return "%s %s"%(self.type, self.name)
-            else:
-                return "%s %s=%s"%(self.type, self.name, self.default_value)
-
-    def __eq__(self, other):
-        if not isinstance( other, self.__class__ ):
-            return False
-        return self.name == other.name \
-               and self.default_value == other.default_value \
-               and self.type == other.type
-
-    def __ne__( self, other):
-        return not self.__eq__( other )
-
-    def __lt__(self, other):
-        if not isinstance( other, self.__class__ ):
-            return self.__class__.__name__ < other.__class__.__name__
-        return self.name < other.name \
-               and self.default_value < other.default_value \
-               and self.type < other.type
-
-    def _get_name(self):
-        return self._name
-    def _set_name(self, name):
-        self._name = name
-    name = property( _get_name, _set_name
-                     , doc="""Argument name.
-                     @type: str""" )
-
-    @property
-    def ellipsis(self):
-        """bool, if True argument represents ellipsis ( "..." ) in function definition"""
-        return isinstance( self.type, cpptypes.ellipsis_t )
-
-    def _get_default_value(self):
-        return self._default_value
-    def _set_default_value(self, default_value):
-        self._default_value = default_value
-    default_value = property( _get_default_value, _set_default_value
-                              , doc="""Argument's default value or None.
-                              @type: str""")
-
-    def _get_type(self):
-        return self._type
-    def _set_type(self, type):
-        self._type = type
-    type = property( _get_type, _set_type
-                     , doc="""The type of the argument.
-                     @type: L{type_t}""")
-
-    def _get_attributes( self ):
-        return self._attributes
-    def _set_attributes( self, attributes ):
-        self._attributes = attributes
-    attributes = property( _get_attributes, _set_attributes
-                        , doc="""GCCXML attributes, set using __attribute__((gccxml("...")))
-                        @type: str
-                        """ )
-
-
-class calldef_t( declaration.declaration_t ):
-    """base class for all "callable" declarations"""
-    def __init__( self, name='', arguments=None, exceptions=None, return_type=None, has_extern=False, does_throw=True ):
-        declaration.declaration_t.__init__( self, name )
-        if not arguments:
-            arguments = []
-        self._arguments = arguments
-        if not exceptions:
-            exceptions = []
-        self._does_throw = does_throw
-        self._exceptions = exceptions
-        self._return_type = return_type
-        self._has_extern = has_extern
-        self._demangled_name = None
-
-    def _get__cmp__call_items(self):
-        """implementation details"""
-        raise NotImplementedError()
-
-    def _get__cmp__items( self ):
-        """implementation details"""
-        items = [ self.arguments
-                  , self.return_type
-                  , self.has_extern
-                  , self.does_throw
-                  , self._sorted_list( self.exceptions ) ]
-        items.extend( self._get__cmp__call_items() )
-        return items
-
-    def __eq__(self, other):
-        if not declaration.declaration_t.__eq__( self, other ):
-            return False
-        return self.return_type == other.return_type \
-               and self.arguments == other.arguments \
-               and self.has_extern == other.has_extern \
-               and self.does_throw == other.does_throw \
-               and self._sorted_list( self.exceptions ) \
-                   == other._sorted_list( other.exceptions )
-
-    def _get_arguments(self):
-        return self._arguments
-    def _set_arguments(self, arguments):
-        self._arguments = arguments
-    arguments = property( _get_arguments , _set_arguments
-                          , doc="""The argument list.
-                          @type: list of L{argument_t}""")
-
-    @property
-    def has_ellipsis( self ):
-        return self.arguments and self.arguments[-1].ellipsis
-
-    @property
-    def argument_types( self ):
-        """list of all argument types"""
-        return [ arg.type for arg in self.arguments ]
-
-    @property
-    def required_args(self):
-        """list of all required arguments"""
-        r_args = []
-        for arg in self.arguments:
-            if not arg.default_value:
-                r_args.append( arg )
-            else:
-                break
-        return r_args
-
-    @property
-    def optional_args(self):
-        """list of all optional arguments, the arguments that have default value"""
-        return self.arguments[ len( self.required_args ) : ]
-
-    def _get_does_throw(self):
-        return self._does_throw
-    def _set_does_throw(self, does_throw):
-        self._does_throw = does_throw
-    does_throw = property( _get_does_throw, _set_does_throw,
-                           doc="""If False, than function does not throw any exception.
-                           In this case, function was declared with empty throw
-                           statement.
-                           """)
-
-    def _get_exceptions(self):
-        return self._exceptions
-    def _set_exceptions(self, exceptions):
-        self._exceptions = exceptions
-    exceptions = property( _get_exceptions, _set_exceptions
-                           , doc="""The list of exceptions.
-                           @type: list of L{declaration_t}""")
-
-    def _get_return_type(self):
-        return self._return_type
-    def _set_return_type(self, return_type):
-        self._return_type = return_type
-    return_type = property( _get_return_type, _set_return_type
-                            , doc='''The type of the return value of the "callable" or None (constructors).
-                            @type: L{type_t}
-                            ''')
-    @property
-    def overloads(self):
-        """A list of overloaded "callables" (i.e. other callables with the same name within the same scope.
-
-        @type: list of L{calldef_t}
-        """
-        if not self.parent:
-            return []
-        # finding all functions with the same name
-        return self.parent.calldefs( name=self.name
-                                     , function=lambda decl: not (decl is self )
-                                     , allow_empty=True
-                                     , recursive=False )
-
-    def _get_has_extern(self):
-        return self._has_extern
-    def _set_has_extern(self, has_extern):
-        self._has_extern = has_extern
-    has_extern = property( _get_has_extern, _set_has_extern,
-                           doc="""Was this callable declared as "extern"?
-                           @type: bool
-                           """)
-
-    def __remove_parent_fname( self, demangled ):
-        """implementation details"""
-        demangled = demangled.strip()
-        parent_fname = algorithm.full_name( self.parent )
-        if parent_fname.startswith( '::' ) and not demangled.startswith( '::' ):
-            parent_fname = parent_fname[2:]
-        demangled = demangled[ len( parent_fname ): ]
-        return demangled
-
-    def _get_demangled_name( self ):
-        if not self.demangled:
-            self._demangled_name = ''
-
-        if self._demangled_name:
-            return self._demangled_name
-
-        if self._demangled_name == '':
-            return self.name
-
-        demangled = self.demangled
-        if self.return_type:
-            return_type = type_traits.remove_alias( self.return_type ).decl_string
-
-            if return_type.startswith( '::' ) and not self.demangled.startswith( '::' ):
-                return_type = return_type[2:]
-            demangled = self.demangled
-            if demangled.startswith( return_type ):
-                demangled = demangled[ len( return_type ): ]
-                demangled = demangled.strip()
-        #removing scope
-        demangled_name = call_invocation.name( self.__remove_parent_fname( demangled ) )
-        if demangled_name.startswith( '::' ):
-            demangled_name = demangled_name[2:]
-        #to be on the safe side
-        if demangled_name.startswith( self.name ):
-            self._demangled_name = demangled_name
-            return self._demangled_name
-
-        #well, I am going to try an other strategy
-        fname = algorithm.full_name( self )
-        found = self.demangled.find( fname )
-        if -1 == found:
-            if fname.startswith( '::' ):
-                fname = fname[2:]
-            found = self.demangled.find( fname )
-            if -1 == found:
-                self._demangled_name = ''
-                return self.name
-        demangled_name = call_invocation.name( self.demangled[ found: ] )
-        demangled_name = self.__remove_parent_fname( demangled_name )
-        if demangled_name.startswith( '::' ):
-            demangled_name = demangled_name[2:]
-        #to be on the safe side
-        if demangled_name.startswith( self.name ):
-            self._demangled_name = demangled_name
-            return self._demangled_name
-        #if -1 == found:
-        self._demangled_name = ''
-        return self.name
-
-    demangled_name = property( _get_demangled_name
-                              , doc="returns function demangled name. It can help you to deal with function template instantiations")
-
-    def i_depend_on_them( self, recursive=True ):
-        report_dependency = lambda *args, **keywd: dependencies.dependency_info_t( self, *args, **keywd )
-        answer = []
-        if self.return_type:
-            answer.append( report_dependency( self.return_type, hint="return type" ) )
-        map( lambda arg: answer.append( report_dependency( arg.type ) )
-             , self.arguments )
-        map( lambda exception: answer.append( report_dependency( exception, hint="exception" ) )
-             , self.exceptions )
-        return answer
-
-#Second level in hierarchy of calldef
-class member_calldef_t( calldef_t ):
-    """base class for "callable" declarations that defined within C++ class or struct"""
-    def __init__( self, virtuality=None, has_const=None, has_static=None, *args, **keywords ):
-        calldef_t.__init__( self, *args, **keywords )
-        self._virtuality = virtuality
-        self._has_const = has_const
-        self._has_static = has_static
-
-    def __str__(self):
-        # Get the full name of the calldef...
-        name = algorithm.full_name(self)
-        if name[:2]=="::":
-            name = name[2:]
-        # Add the arguments...
-        args = map(lambda a: str(a), self.arguments)
-        res = "%s(%s)"%(name, ", ".join(args))
-        # Add the return type...
-        if self.return_type!=None:
-            res = "%s %s"%(self.return_type, res)
-        # const?
-        if self.has_const:
-            res += " const"
-        # static?
-        if self.has_static:
-            res = "static "+res
-        # Append the declaration class
-        cls = self.__class__.__name__
-        if cls[-2:]=="_t":
-            cls = cls[:-2]
-        cls = cls.replace( '_', ' ' )
-        return "%s [%s]"%(res, cls)
-
-    def _get__cmp__call_items(self):
-        """implementation details"""
-        return [ self.virtuality, self.has_static, self.has_const ]
-
-    def __eq__(self, other):
-        if not calldef_t.__eq__( self, other ):
-            return False
-        return self.virtuality == other.virtuality \
-               and self.has_static == other.has_static \
-               and self.has_const == other.has_const
-
-    def get_virtuality(self):
-        return self._virtuality
-    def set_virtuality(self, virtuality):
-        assert virtuality in VIRTUALITY_TYPES.ALL
-        self._virtuality = virtuality
-    virtuality = property( get_virtuality, set_virtuality
-                           , doc="""Describes the "virtuality" of the member (as defined by the string constants in the class L{VIRTUALITY_TYPES}).
-                           @type: str""")
-
-    def _get_access_type(self):
-        return self.parent.find_out_member_access_type( self )
-    access_type = property( _get_access_type
-                            , doc="""Return the access type of the member (as defined by the string constants in the class L{ACCESS_TYPES}.
-                            @type: str""")
-
-    def _get_has_const(self):
-        return self._has_const
-    def _set_has_const(self, has_const):
-        self._has_const = has_const
-    has_const = property( _get_has_const, _set_has_const
-                          , doc="""describes, whether "callable" has const modifier or not""")
-
-    def _get_has_static(self):
-        return self._has_static
-    def _set_has_static(self, has_static):
-        self._has_static = has_static
-    has_static = property( _get_has_static, _set_has_static
-                           , doc="""describes, whether "callable" has static modifier or not""")
-
-    def function_type(self):
-        """returns function type. See L{type_t} hierarchy"""
-        if self.has_static:
-            return cpptypes.free_function_type_t( return_type=self.return_type
-                                           , arguments_types=[ arg.type for arg in self.arguments ] )
-        else:
-            return cpptypes.member_function_type_t( class_inst=self.parent
-                                           , return_type=self.return_type
-                                           , arguments_types=[ arg.type for arg in self.arguments ]
-                                           , has_const=self.has_const )
-
-    def create_decl_string(self, with_defaults=True):
-        f_type = self.function_type()
-        if with_defaults:
-            return f_type.decl_string
-        else:
-            return f_type.partial_decl_string
-
-class free_calldef_t( calldef_t ):
-    """base class for "callable" declarations that defined within C++ namespace"""
-    def __init__( self, *args, **keywords ):
-        calldef_t.__init__( self, *args, **keywords )
-
-    def __str__(self):
-        # Get the full name of the calldef...
-        name = algorithm.full_name(self)
-        if name[:2]=="::":
-            name = name[2:]
-        # Add the arguments...
-        args = map(lambda a: str(a), self.arguments)
-        res = "%s(%s)"%(name, ", ".join(args))
-        # Add the return type...
-        if self.return_type!=None:
-            res = "%s %s"%(self.return_type, res)
-        # extern?
-        if self.has_extern:
-            res = "extern "+res
-        # Append the declaration class
-        cls = self.__class__.__name__
-        if cls[-2:]=="_t":
-            cls = cls[:-2]
-        cls = cls.replace( '_', ' ' )
-        return "%s [%s]"%(res, cls)
-
-    def _get__cmp__call_items(self):
-        """implementation details"""
-        return []
-
-    def function_type(self):
-        """returns function type. See L{type_t} hierarchy"""
-        return cpptypes.free_function_type_t( return_type=self.return_type
-                                     , arguments_types=[ arg.type for arg in self.arguments ] )
-
-    def create_decl_string(self, with_defaults=True):
-        f_type = self.function_type()
-        if with_defaults:
-            return f_type.decl_string
-        else:
-            return f_type.partial_decl_string
-
-
-class operator_t(object):
-    """base class for "operator" declarations"""
-    OPERATOR_WORD_LEN = len( 'operator' )
-    def __init__(self):
-        object.__init__(self)
-
-    @property
-    def symbol(self):
-        "operator's symbol. For example: operator+, symbol is equal to '+'"
-        return self.name[operator_t.OPERATOR_WORD_LEN:].strip()
-
-#Third level in hierarchy of calldef
-class member_function_t( member_calldef_t ):
-    """describes member function declaration"""
-    def __init__( self, *args, **keywords ):
-        member_calldef_t.__init__( self, *args, **keywords )
-
-class constructor_t( member_calldef_t ):
-    """describes constructor declaration"""
-    def __init__( self, *args, **keywords ):
-        member_calldef_t.__init__( self, *args, **keywords )
-
-    def __str__(self):
-        # Get the full name of the calldef...
-        name = algorithm.full_name(self)
-        if name[:2]=="::":
-            name = name[2:]
-        # Add the arguments...
-        args = map(lambda a: str(a), self.arguments)
-        res = "%s(%s)"%(name, ", ".join(args))
-        # Append the declaration class
-        cls = 'constructor'
-        if self.is_copy_constructor:
-            cls = 'copy ' + cls
-        return "%s [%s]"%(res, cls)
-
-    @property
-    def is_copy_constructor(self):
-        """returns True if described declaration is copy constructor, otherwise False"""
-        args = self.arguments
-        if 1 != len( args ):
-            return False
-        arg = args[0]
-        if not type_traits.is_reference( arg.type ):
-            return False
-        if not type_traits.is_const( arg.type.base ):
-            return False
-        unaliased = type_traits.remove_alias( arg.type.base )
-        #unaliased now refers to const_t instance
-        if not isinstance( unaliased.base, cpptypes.declarated_t ):
-            return False
-        return id(unaliased.base.declaration) == id(self.parent)
-
-    @property
-    def is_trivial_constructor(self):
-        return not bool( self.arguments )
-
-
-class destructor_t( member_calldef_t ):
-    """describes deconstructor declaration"""
-    def __init__( self, *args, **keywords ):
-        member_calldef_t.__init__( self, *args, **keywords )
-
-class member_operator_t( member_calldef_t, operator_t ):
-    """describes member operator declaration"""
-    def __init__( self, *args, **keywords ):
-        member_calldef_t.__init__( self, *args, **keywords )
-        operator_t.__init__( self, *args, **keywords )
-        self.__class_types = None
-
-class casting_operator_t( member_calldef_t, operator_t ):
-    """describes casting operator declaration"""
-    def __init__( self, *args, **keywords ):
-        member_calldef_t.__init__( self, *args, **keywords )
-        operator_t.__init__( self, *args, **keywords )
-
-class free_function_t( free_calldef_t ):
-    """describes free function declaration"""
-    def __init__( self, *args, **keywords ):
-        free_calldef_t.__init__( self, *args, **keywords )
-
-class free_operator_t( free_calldef_t, operator_t ):
-    """describes free operator declaration"""
-    def __init__( self, *args, **keywords ):
-        free_calldef_t.__init__( self, *args, **keywords )
-        operator_t.__init__( self, *args, **keywords )
-        self.__class_types = None
-
-    @property
-    def class_types( self ):
-        """list of class/class declaration types, extracted from the operator arguments"""
-        if None is self.__class_types:
-            self.__class_types = []
-            for type_ in self.argument_types:
-                decl = None
-                type_ = type_traits.remove_reference( type_ )
-                if type_traits.is_class( type_ ):
-                    decl = type_traits.class_traits.get_declaration( type_ )
-                elif type_traits.is_class_declaration( type_ ):
-                    decl = type_traits.class_declaration_traits.get_declaration( type_ )
-                else:
-                    pass
-                if decl:
-                    self.__class_types.append( decl )
-        return self.__class_types
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/class_declaration.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/class_declaration.py
deleted file mode 100644
index fd9c796..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/class_declaration.py
+++ /dev/null
@@ -1,532 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines classes, that describes C++ classes
-
-This modules contains definition for next C++ declarations:
-    - class definition
-    - class declaration
-    - small helper class for describing C++ class hierarchy
-"""
-
-import scopedef
-import itertools
-import compilers
-import algorithm
-import declaration
-import dependencies
-from pygccxml import utils
-
-class ACCESS_TYPES:
-    """class that defines "access" constants"""
-    PUBLIC = "public"
-    PRIVATE = "private"
-    PROTECTED = "protected"
-    ALL = [ PUBLIC, PRIVATE, PROTECTED ]
-
-class CLASS_TYPES:
-    """class that defines "class" type constants"""
-    CLASS = "class"
-    STRUCT = "struct"
-    UNION = "union"
-    ALL = [ CLASS, STRUCT, UNION ]
-
-def get_partial_name( name ):
-    import templates
-    import container_traits #prevent cyclic dependencies
-    ct = container_traits.find_container_traits( name )
-    if ct:
-        return ct.remove_defaults( name )
-    elif templates.is_instantiation( name ):
-        tmpl_name, args = templates.split( name )
-        for i, arg_name in enumerate( args ):
-            args[i] = get_partial_name( arg_name.strip() )
-        return templates.join( tmpl_name, args )
-    else:
-        return name
-
-
-class hierarchy_info_t( object ):
-    """describes class relationship"""
-    def __init__(self, related_class=None, access=None, is_virtual=False ):
-        """creates class that contains partial information about class relationship"""
-        if related_class:
-            assert( isinstance( related_class, class_t ) )
-        self._related_class = related_class
-        if access:
-            assert( access in ACCESS_TYPES.ALL)
-        self._access=access
-        self._is_virtual = is_virtual
-
-    def __eq__(self, other):
-        if not isinstance( other, hierarchy_info_t ):
-            return False
-        return algorithm.declaration_path( self.related_class ) == algorithm.declaration_path( other.related_class ) \
-               and self.access == other.access \
-               and self.is_virtual == other.is_virtual
-
-    def __ne__( self, other):
-        return not self.__eq__( other )
-
-    def __lt__(self, other):
-        if not isinstance( other, self.__class__ ):
-            return self.__class__.__name__ < other.__class__.__name__
-        return ( algorithm.declaration_path( self.related_class ), self.access, self.is_virtual  ) \
-               < ( algorithm.declaration_path( other.related_class ), other.access, self.is_virtual )
-
-    def _get_related_class(self):
-        return self._related_class
-    def _set_related_class(self, new_related_class):
-        if new_related_class:
-            assert( isinstance( new_related_class, class_t ) )
-        self._related_class = new_related_class
-    related_class = property( _get_related_class, _set_related_class
-                              , doc="reference to base or derived L{class<class_t>}")
-
-    def _get_access(self):
-        return self._access
-    def _set_access(self, new_access):
-        assert( new_access in ACCESS_TYPES.ALL )
-        self._access = new_access
-    access = property( _get_access, _set_access )
-    access_type = property( _get_access, _set_access
-                            , doc="describes L{hierarchy type<ACCESS_TYPES>}")
-
-    #TODO: check whether GCC XML support this and if so parser this information
-    def _get_is_virtual(self):
-        return self._is_virtual
-    def _set_is_virtual(self, new_is_virtual):
-        self._is_virtual = new_is_virtual
-    is_virtual = property( _get_is_virtual, _set_is_virtual
-                           , doc="indicates whether the inheritance is virtual or not")
-
-
-class class_declaration_t( declaration.declaration_t ):
-    """describes class declaration"""
-    def __init__( self, name='' ):
-        """creates class that describes C++ class declaration( and not definition )"""
-        declaration.declaration_t.__init__( self, name )
-        self._aliases = []
-        self._container_traits = None
-        self._container_traits_set = False
-
-    def _get__cmp__items(self):
-        """implementation details"""
-        return []
-
-    def i_depend_on_them( self, recursive=True ):
-        return []
-
-    def _get_aliases(self):
-        return self._aliases
-    def _set_aliases( self, new_aliases ):
-        self._aliases = new_aliases
-    aliases = property( _get_aliases, _set_aliases
-                         , doc="List of L{aliases<typedef_t>} to this instance")
-
-    @property
-    def container_traits( self ):
-        """reference to L{container traits<container_traits.py>} or None"""
-        if self._container_traits_set == False:
-            import container_traits #prevent cyclic dependencies
-            self._container_traits_set = True
-            self._container_traits = container_traits.find_container_traits( self )
-        return self._container_traits
-
-    def _get_partial_name_impl( self ):
-        return get_partial_name( self.name )
-
-class class_t( scopedef.scopedef_t ):
-    """describes class definition"""
-
-    USE_DEMANGLED_AS_NAME = True
-    def __init__( self, name='', class_type=CLASS_TYPES.CLASS, is_abstract=False ):
-        """creates class that describes C++ class definition"""
-        scopedef.scopedef_t.__init__( self, name )
-        if class_type:
-            assert( class_type in CLASS_TYPES.ALL )
-        self._class_type = class_type
-        self._bases = []
-        self._derived = []
-        self._is_abstract = is_abstract
-        self._public_members = []
-        self._private_members = []
-        self._protected_members = []
-        self._aliases = []
-        self._byte_size = 0
-        self._byte_align = 0
-        self._container_traits = None
-        self._container_traits_set = False
-        self._recursive_bases = None
-        self._recursive_derived = None
-
-    def _get_name_impl( self ):
-        if not self._name: #class with empty name
-            return self._name
-        elif class_t.USE_DEMANGLED_AS_NAME and self.demangled and 'GCC' in self.compiler:
-            if not self.cache.demangled_name:
-                fname = algorithm.full_name( self.parent )
-                if fname.startswith( '::' ) and not self.demangled.startswith( '::' ):
-                    fname = fname[2:]
-                if self.demangled.startswith( fname ):
-                    tmp = self.demangled[ len( fname ): ] #demangled::name
-                    if tmp.startswith( '::' ):
-                        tmp = tmp[2:]
-                    if '<' not in tmp and '<' in self._name:
-                        #we have template class, but for some reason demangled
-                        #name doesn't contain any template
-                        #This happens for std::string class, but this breaks
-                        #other cases, because this behaviour is not consistent
-                        self.cache.demangled_name = self._name
-                        return self.cache.demangled_name
-                    else:
-                        self.cache.demangled_name = tmp
-                        return tmp
-                else:
-                    self.cache.demangled_name = self._name
-                    return self._name
-            else:
-                return self.cache.demangled_name
-        else:
-            return self._name
-
-    def __str__(self):
-        name = algorithm.full_name(self)
-        if name[:2]=="::":
-            name = name[2:]
-        return "%s [%s]"%(name, self.class_type)
-
-    def _get__cmp__scope_items(self):
-        """implementation details"""
-        return [ self.class_type
-                 , self._sorted_list( [ algorithm.declaration_path( base.related_class ) for base in self.bases ] )
-                 , self._sorted_list( [ algorithm.declaration_path( derive.related_class ) for derive in self.derived ] )
-                 , self.is_abstract
-                 , self._sorted_list( self.public_members )
-                 , self._sorted_list( self.private_members )
-                 , self._sorted_list( self.protected_members ) ]
-
-    def __eq__(self, other):
-        if not scopedef.scopedef_t.__eq__( self, other ):
-            return False
-        return self.class_type == other.class_type \
-               and self._sorted_list( [ algorithm.declaration_path( base.related_class ) for base in self.bases ] ) \
-                   == other._sorted_list( [ algorithm.declaration_path( base.related_class ) for base in other.bases ] ) \
-               and self._sorted_list( [ algorithm.declaration_path( derive.related_class ) for derive in self.derived ] ) \
-                   == other._sorted_list( [ algorithm.declaration_path( derive.related_class ) for derive in other.derived ] ) \
-               and self.is_abstract == other.is_abstract \
-               and self._sorted_list( self.public_members ) \
-                   == other._sorted_list( other.public_members ) \
-               and self._sorted_list( self.private_members ) \
-                   == other._sorted_list( other.private_members ) \
-               and self._sorted_list( self.protected_members ) \
-                   == self._sorted_list( other.protected_members )
-
-    def _get_class_type(self):
-        return self._class_type
-    def _set_class_type( self, new_class_type):
-        if new_class_type:
-            assert( new_class_type in CLASS_TYPES.ALL )
-        self._class_type = new_class_type
-    class_type = property( _get_class_type, _set_class_type
-                           , doc="describes class L{type<CLASS_TYPES>}")
-
-    def _get_bases(self):
-        return self._bases
-    def _set_bases( self, new_bases ):
-        self._bases = new_bases
-    bases = property( _get_bases, _set_bases
-                      , doc="list of L{base classes<hierarchy_info_t>}")
-
-    @property
-    def recursive_bases(self):
-        """list of all L{base classes<hierarchy_info_t>}"""
-        if self._recursive_bases is None:
-            to_go = self.bases[:]
-            all_bases = []
-            while to_go:
-                base = to_go.pop()
-                if base not in all_bases:
-                    all_bases.append( base )
-                    to_go.extend( base.related_class.bases )
-            self._recursive_bases = all_bases
-        return self._recursive_bases
-
-    def _get_derived(self):
-        return self._derived
-    def _set_derived( self, new_derived ):
-        self._derived = new_derived
-    derived = property( _get_derived, _set_derived
-                        , doc="list of L{derived classes<hierarchy_info_t>}")
-
-    @property
-    def recursive_derived(self):
-        """list of all L{derive classes<hierarchy_info_t>}"""
-        if self._recursive_derived is None:
-            to_go = self.derived[:]
-            all_derived = []
-            while to_go:
-                derive = to_go.pop()
-                if derive not in all_derived:
-                    all_derived.append( derive )
-                    to_go.extend( derive.related_class.derived )
-            self._recursive_derived = all_derived
-        return self._recursive_derived
-
-    def _get_is_abstract(self):
-        if self.compiler == compilers.MSVC_PDB_9:
-            #prevent cyclic dependencies
-            import calldef
-            import function_traits
-            from matchers import virtuality_type_matcher_t as vtmatcher_t
-            filter_pv = vtmatcher_t( calldef.VIRTUALITY_TYPES.PURE_VIRTUAL )
-            if self.calldefs( filter_pv, recursive=False, allow_empty=True ):
-                return True
-            filter_npv = vtmatcher_t( calldef.VIRTUALITY_TYPES.VIRTUAL ) \
-                         | vtmatcher_t( calldef.VIRTUALITY_TYPES.NOT_VIRTUAL )
-            pv_calldefs = []
-            npv_calldefs = []
-
-            npv_calldefs.extend( self.calldefs( filter_npv, recursive=False, allow_empty=True ) )
-            for base in self.recursive_bases:
-                cls = base.related_class
-                pv_calldefs.extend( cls.calldefs( filter_pv, recursive=False, allow_empty=True ) )
-                npv_calldefs.extend( cls.calldefs( filter_npv, recursive=False, allow_empty=True ) )
-
-            for pure_virtual in pv_calldefs:
-                impl_found = filter( lambda f: function_traits.is_same_function( pure_virtual, f )
-                                     , npv_calldefs )
-                if not impl_found:
-                    return True
-            return False
-        else:
-            return self._is_abstract
-    def _set_is_abstract( self, is_abstract ):
-        self._is_abstract = is_abstract
-    is_abstract = property( _get_is_abstract, _set_is_abstract
-                            ,doc="describes whether class abstract or not" )
-
-    def _get_public_members(self):
-        return self._public_members
-    def _set_public_members( self, new_public_members ):
-        self._public_members = new_public_members
-    public_members = property( _get_public_members, _set_public_members
-                               , doc="list of all public L{members<declaration_t>}")
-
-    def _get_private_members(self):
-        return self._private_members
-    def _set_private_members( self, new_private_members ):
-        self._private_members = new_private_members
-    private_members = property( _get_private_members, _set_private_members
-                                , doc="list of all private L{members<declaration_t>}")
-
-    def _get_protected_members(self):
-        return self._protected_members
-    def _set_protected_members( self, new_protected_members ):
-        self._protected_members = new_protected_members
-    protected_members = property( _get_protected_members, _set_protected_members
-                                  , doc="list of all protected L{members<declaration_t>}" )
-
-    def _get_aliases(self):
-        return self._aliases
-    def _set_aliases( self, new_aliases ):
-        self._aliases = new_aliases
-    aliases = property( _get_aliases, _set_aliases
-                         , doc="List of L{aliases<typedef_t>} to this instance")
-
-    def _get_byte_size(self):
-        return self._byte_size
-    def _set_byte_size( self, new_byte_size ):
-        self._byte_size = new_byte_size
-    byte_size = property( _get_byte_size, _set_byte_size
-                          , doc="Size of this class in bytes @type: int")
-
-    def _get_byte_align(self):
-        if self.compiler == compilers.MSVC_PDB_9:
-            compilers.on_missing_functionality( self.compiler, "byte align" )
-        return self._byte_align
-    def _set_byte_align( self, new_byte_align ):
-        self._byte_align = new_byte_align
-    byte_align = property( _get_byte_align, _set_byte_align
-                          , doc="Alignment of this class in bytes @type: int")
-
-    def _get_declarations_impl(self):
-        return self.get_members()
-
-    def get_members( self, access=None):
-        """
-        returns list of members according to access type
-
-        If access equals to None, then returned list will contain all members.
-        You should not modify the list content, otherwise different optimization
-        data will stop work and may to give you wrong results.
-
-        @param access: describes desired members
-        @type access: L{ACCESS_TYPES}
-
-        @return: [ members ]
-        """
-        if access == ACCESS_TYPES.PUBLIC:
-            return self.public_members
-        elif access == ACCESS_TYPES.PROTECTED:
-            return self.protected_members
-        elif access == ACCESS_TYPES.PRIVATE:
-            return self.private_members
-        else:
-            all_members = []
-            all_members.extend( self.public_members )
-            all_members.extend( self.protected_members )
-            all_members.extend( self.private_members )
-            return all_members
-
-    def adopt_declaration( self, decl, access ):
-        """adds new declaration to the class
-
-        @param decl: reference to a L{declaration<declaration_t>}
-
-        @param access: member access type
-        @type access: L{ACCESS_TYPES}
-        """
-        if access == ACCESS_TYPES.PUBLIC:
-            self.public_members.append( decl )
-        elif access == ACCESS_TYPES.PROTECTED:
-            self.protected_members.append( decl )
-        elif access == ACCESS_TYPES.PRIVATE:
-            self.private_members.append( decl )
-        else:
-            raise RuntimeError( "Invalid access type: %s." % access )
-        decl.parent = self
-        decl.cache.reset()
-        decl.cache.access_type = access
-
-    def remove_declaration( self, decl ):
-        """
-        removes decl from  members list
-
-        @param decl: declaration to be removed
-        @type decl: L{declaration_t}
-        """
-        container = None
-        access_type = self.find_out_member_access_type( decl )
-        if access_type == ACCESS_TYPES.PUBLIC:
-            container = self.public_members
-        elif access_type == ACCESS_TYPES.PROTECTED:
-            container = self.protected_members
-        else: #decl.cache.access_type == ACCESS_TYPES.PRVATE
-            container = self.private_members
-        del container[ container.index( decl ) ]
-        decl.cache.reset()
-
-    def find_out_member_access_type( self, member ):
-        """
-        returns member access type
-
-        @param member: member of the class
-        @type member: L{declaration_t}
-
-        @return: L{ACCESS_TYPES}
-        """
-        assert member.parent is self
-        if not member.cache.access_type:
-            access_type = None
-            if member in self.public_members:
-                access_type = ACCESS_TYPES.PUBLIC
-            elif member in self.protected_members:
-                access_type = ACCESS_TYPES.PROTECTED
-            elif member in self.private_members:
-                access_type = ACCESS_TYPES.PRIVATE
-            else:
-                raise RuntimeError( "Unable to find member within internal members list." )
-            member.cache.access_type = access_type
-            return access_type
-        else:
-            return member.cache.access_type
-
-    def __find_out_member_dependencies( self, access_type ):
-        members = self.get_members( access_type )
-        answer = []
-        map( lambda mem: answer.extend( mem.i_depend_on_them(recursive=True) ), members )
-        member_ids = set( map( lambda m: id( m ), members ) )
-        for dependency in answer:
-            if id( dependency.declaration ) in member_ids:
-                dependency.access_type = access_type
-        return answer
-
-    def i_depend_on_them( self, recursive=True ):
-        report_dependency = lambda *args: dependencies.dependency_info_t( self, *args )
-
-        answer = []
-
-        map( lambda base: answer.append( report_dependency( base.related_class, base.access_type, "base class" ) )
-             , self.bases )
-
-        if recursive:
-            map( lambda access_type: answer.extend( self.__find_out_member_dependencies( access_type ) )
-                 , ACCESS_TYPES.ALL )
-
-        return answer
-
-    @property
-    def container_traits( self ):
-        """reference to L{container traits<container_traits.py>} or None"""
-        if self._container_traits_set == False:
-            import container_traits #prevent cyclic dependencies
-            self._container_traits_set = True
-            self._container_traits = container_traits.find_container_traits( self )
-        return self._container_traits
-
-    def find_copy_constructor( self ):
-        copy_ = self.constructors( lambda x: x.is_copy_constructor, recursive=False, allow_empty=True )
-        if copy_:
-            return copy_[0]
-        else:
-            return None
-
-    def find_trivial_constructor( self ):
-        trivial = self.constructors( lambda x: x.is_trivial_constructor, recursive=False, allow_empty=True )
-        if trivial:
-            return trivial[0]
-        else:
-            return None
-
-    def _get_partial_name_impl( self ):
-        import type_traits #prevent cyclic dependencies
-        if type_traits.is_std_string( self ):
-            return 'string'
-        elif type_traits.is_std_wstring( self ):
-            return 'wstring'
-        else:
-            return get_partial_name( self.name )
-
-    def find_noncopyable_vars( self ):
-        """returns list of all noncopyable variables"""
-        import type_traits as tt#prevent cyclic dependencies
-        logger = utils.loggers.cxx_parser
-        mvars = self.vars( lambda v: not v.type_qualifiers.has_static, recursive=False, allow_empty=True )
-        noncopyable_vars = []
-        for mvar in mvars:
-            type_ = tt.remove_reference( mvar.type )
-            if tt.is_const( type_ ):
-                no_const = tt.remove_const( type_ )
-                if tt.is_fundamental( no_const ) or tt.is_enum( no_const):
-                    logger.debug( "__contains_noncopyable_mem_var - %s - TRUE - containes const member variable - fundamental or enum" % self.decl_string )
-                    noncopyable_vars.append( mvar )
-                if tt.is_class( no_const ):
-                    logger.debug( "__contains_noncopyable_mem_var - %s - TRUE - containes const member variable - class" % self.decl_string )
-                    noncopyable_vars.append( mvar )
-                if tt.is_array( no_const ):
-                    logger.debug( "__contains_noncopyable_mem_var - %s - TRUE - containes const member variable - array" % self.decl_string )
-                    noncopyable_vars.append( mvar )
-            if tt.class_traits.is_my_case( type_ ):
-                cls = tt.class_traits.get_declaration( type_ )
-                if tt.is_noncopyable( cls ):
-                    logger.debug( "__contains_noncopyable_mem_var - %s - TRUE - containes member variable - class that is not copyable" % self.decl_string )
-                    noncopyable_vars.append( mvar )
-        logger.debug( "__contains_noncopyable_mem_var - %s - false - doesn't contains noncopyable members" % self.decl_string )
-        return noncopyable_vars
-
-
-class_types = ( class_t, class_declaration_t )
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/container_traits.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/container_traits.py
deleted file mode 100644
index 53061a9..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/container_traits.py
+++ /dev/null
@@ -1,485 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines few algorithms, that deals with different properties of std containers
-"""
-
-import types
-import string
-import calldef
-import cpptypes
-import namespace
-import templates
-import type_traits
-import class_declaration
-
-std_namespaces = ( 'std', 'stdext', '__gnu_cxx' )
-
-class defaults_eraser:
-    @staticmethod
-    def normalize( type_str ):
-        return type_str.replace( ' ', '' )
-
-    @staticmethod
-    def replace_basic_string( cls_name ):
-        strings = {
-              'std::string' : ( 'std::basic_string<char,std::char_traits<char>,std::allocator<char> >'
-                                , 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >' )
-            , 'std::wstring' : ( 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >'
-                                 , 'std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >' ) }
-
-        new_name = cls_name
-        for short_name, long_names in strings.iteritems():
-            for lname in long_names:
-                new_name = new_name.replace( lname, short_name )
-        return new_name
-
-    class recursive_impl:
-        @staticmethod
-        def decorated_call_prefix( cls_name, text, doit ):
-            has_text = cls_name.startswith( text )
-            if has_text:
-                cls_name = cls_name[ len( text ): ]
-            answer = doit( cls_name )
-            if has_text:
-                answer = text + answer
-            return answer
-
-        @staticmethod
-        def decorated_call_suffix( cls_name, text, doit ):
-            has_text = cls_name.endswith( text )
-            if has_text:
-                cls_name = cls_name[: len( text )]
-            answer = doit( cls_name )
-            if has_text:
-                answer = answer + text
-            return answer
-
-        @staticmethod
-        def erase_call( cls_name ):
-            global find_container_traits
-            c_traits = find_container_traits( cls_name )
-            if not c_traits:
-                return cls_name
-            return c_traits.remove_defaults( cls_name )
-
-        @staticmethod
-        def erase_recursive( cls_name ):
-            ri = defaults_eraser.recursive_impl
-            no_std = lambda cls_name: ri.decorated_call_prefix( cls_name, 'std::', ri.erase_call )
-            no_stdext = lambda cls_name: ri.decorated_call_prefix( cls_name, 'stdext::', no_std )
-            no_gnustd = lambda cls_name: ri.decorated_call_prefix( cls_name, '__gnu_cxx::', no_stdext )
-            no_const = lambda cls_name: ri.decorated_call_prefix( cls_name, 'const ', no_gnustd )
-            no_end_const = lambda cls_name: ri.decorated_call_suffix( cls_name, ' const', no_const )
-            return no_end_const( cls_name )
-
-    @staticmethod
-    def erase_recursive( cls_name ):
-        return defaults_eraser.recursive_impl.erase_recursive( cls_name )
-
-    @staticmethod
-    def erase_allocator( cls_name, default_allocator='std::allocator' ):
-        cls_name = defaults_eraser.replace_basic_string( cls_name )
-        c_name, c_args = templates.split( cls_name )
-        if 2 != len( c_args ):
-            return
-        value_type = c_args[0]
-        tmpl = string.Template( "$container< $value_type, $allocator<$value_type> >" )
-        tmpl = tmpl.substitute( container=c_name, value_type=value_type, allocator=default_allocator )
-        if defaults_eraser.normalize( cls_name ) == defaults_eraser.normalize( tmpl ):
-            return templates.join( c_name, [defaults_eraser.erase_recursive( value_type )] )
-
-    @staticmethod
-    def erase_container( cls_name, default_container_name='std::deque' ):
-        cls_name = defaults_eraser.replace_basic_string( cls_name )
-        c_name, c_args = templates.split( cls_name )
-        if 2 != len( c_args ):
-            return
-        value_type = c_args[0]
-        dc_no_defaults = defaults_eraser.erase_recursive( c_args[1] )
-        if defaults_eraser.normalize( dc_no_defaults ) \
-           != defaults_eraser.normalize( templates.join( default_container_name, [value_type] ) ):
-            return
-        return templates.join( c_name, [defaults_eraser.erase_recursive( value_type )] )
-
-    @staticmethod
-    def erase_container_compare( cls_name, default_container_name='std::vector', default_compare='std::less' ):
-        cls_name = defaults_eraser.replace_basic_string( cls_name )
-        c_name, c_args = templates.split( cls_name )
-        if 3 != len( c_args ):
-            return
-        dc_no_defaults = defaults_eraser.erase_recursive( c_args[1] )
-        if defaults_eraser.normalize( dc_no_defaults ) \
-           != defaults_eraser.normalize( templates.join( default_container_name, [c_args[0]] ) ):
-            return
-        dcomp_no_defaults = defaults_eraser.erase_recursive( c_args[2] )
-        if defaults_eraser.normalize( dcomp_no_defaults ) \
-           != defaults_eraser.normalize( templates.join( default_compare, [c_args[0]] ) ):
-            return
-        value_type = defaults_eraser.erase_recursive( c_args[0] )
-        return templates.join( c_name, [value_type] )
-
-    @staticmethod
-    def erase_compare_allocator( cls_name, default_compare='std::less', default_allocator='std::allocator' ):
-        cls_name = defaults_eraser.replace_basic_string( cls_name )
-        c_name, c_args = templates.split( cls_name )
-        if 3 != len( c_args ):
-            return
-        value_type = c_args[0]
-        tmpl = string.Template( "$container< $value_type, $compare<$value_type>, $allocator<$value_type> >" )
-        tmpl = tmpl.substitute( container=c_name
-                                , value_type=value_type
-                                , compare=default_compare
-                                , allocator=default_allocator )
-        if defaults_eraser.normalize( cls_name ) == defaults_eraser.normalize( tmpl ):
-            return templates.join( c_name, [defaults_eraser.erase_recursive( value_type )] )
-
-    @staticmethod
-    def erase_map_compare_allocator( cls_name, default_compare='std::less', default_allocator='std::allocator' ):
-        cls_name = defaults_eraser.replace_basic_string( cls_name )
-        c_name, c_args = templates.split( cls_name )
-        if 4 != len( c_args ):
-            return
-        key_type = c_args[0]
-        mapped_type = c_args[1]
-        tmpls = [
-            string.Template( "$container< $key_type, $mapped_type, $compare<$key_type>, $allocator< std::pair< const $key_type, $mapped_type> > >" )
-            , string.Template( "$container< $key_type, $mapped_type, $compare<$key_type>, $allocator< std::pair< $key_type const, $mapped_type> > >" )
-            , string.Template( "$container< $key_type, $mapped_type, $compare<$key_type>, $allocator< std::pair< $key_type, $mapped_type> > >" )]
-        for tmpl in tmpls:
-            tmpl = tmpl.substitute( container=c_name
-                                    , key_type=key_type
-                                    , mapped_type=mapped_type
-                                    , compare=default_compare
-                                    , allocator=default_allocator )
-            if defaults_eraser.normalize( cls_name ) == defaults_eraser.normalize( tmpl ):
-                return templates.join( c_name
-                                       , [ defaults_eraser.erase_recursive( key_type )
-                                           , defaults_eraser.erase_recursive( mapped_type )] )
-
-
-    @staticmethod
-    def erase_hash_allocator( cls_name ):
-        cls_name = defaults_eraser.replace_basic_string( cls_name )
-        c_name, c_args = templates.split( cls_name )
-        if len( c_args ) < 3:
-            return
-
-        default_hash=None
-        default_less='std::less'
-        default_equal_to='std::equal_to'
-        default_allocator='std::allocator'
-
-        tmpl = None
-        if 3 == len( c_args ):
-            default_hash='hash_compare'
-            tmpl = "$container< $value_type, $hash<$value_type, $less<$value_type> >, $allocator<$value_type> >"
-        elif 4 == len( c_args ):
-            default_hash='hash'
-            tmpl = "$container< $value_type, $hash<$value_type >, $equal_to<$value_type >, $allocator<$value_type> >"
-        else:
-            return
-
-        value_type = c_args[0]
-        tmpl = string.Template( tmpl )
-        for ns in std_namespaces:
-            inst = tmpl.substitute( container=c_name
-                                    , value_type=value_type
-                                    , hash= ns + '::' + default_hash
-                                    , less=default_less
-                                    , equal_to=default_equal_to
-                                    , allocator=default_allocator )
-            if defaults_eraser.normalize( cls_name ) == defaults_eraser.normalize( inst ):
-                return templates.join( c_name, [defaults_eraser.erase_recursive( value_type )] )
-
-
-    @staticmethod
-    def erase_hashmap_compare_allocator( cls_name ):
-        cls_name = defaults_eraser.replace_basic_string( cls_name )
-        c_name, c_args = templates.split( cls_name )
-
-        default_hash=None
-        default_less='std::less'
-        default_allocator='std::allocator'
-        default_equal_to = 'std::equal_to'
-
-        tmpl = None
-        key_type = None
-        mapped_type = None
-        if 2 < len( c_args ):
-            key_type = c_args[0]
-            mapped_type = c_args[1]
-        else:
-            return
-
-        if 4 == len( c_args ):
-            default_hash = 'hash_compare'
-            tmpl = string.Template( "$container< $key_type, $mapped_type, $hash<$key_type, $less<$key_type> >, $allocator< std::pair< const $key_type, $mapped_type> > >" )
-            if key_type.startswith( 'const ' ) or key_type.endswith( ' const' ):
-                tmpl = string.Template( "$container< $key_type, $mapped_type, $hash<$key_type, $less<$key_type> >, $allocator< std::pair< $key_type, $mapped_type> > >" )
-        elif 5 == len( c_args ):
-            default_hash = 'hash'
-            tmpl = string.Template( "$container< $key_type, $mapped_type, $hash<$key_type >, $equal_to<$key_type>, $allocator< $mapped_type> >" )
-            if key_type.startswith( 'const ' ) or key_type.endswith( ' const' ):
-                tmpl = string.Template( "$container< $key_type, $mapped_type, $hash<$key_type >, $equal_to<$key_type>, $allocator< $mapped_type > >" )
-        else:
-            return
-
-        for ns in std_namespaces:
-            inst = tmpl.substitute( container=c_name
-                                    , key_type=key_type
-                                    , mapped_type=mapped_type
-                                    , hash=ns + '::' + default_hash
-                                    , less=default_less
-                                    , equal_to = default_equal_to
-                                    , allocator=default_allocator )
-            if defaults_eraser.normalize( cls_name ) == defaults_eraser.normalize( inst ):
-                return templates.join( c_name
-                                       , [ defaults_eraser.erase_recursive( key_type )
-                                           , defaults_eraser.erase_recursive( mapped_type )] )
-
-
-class container_traits_impl_t:
-    """this class implements the functionality needed for convinient work with
-    STD container classes.
-
-    Implemented functionality:
-        - find out whether a declaration is STD container or not
-        - find out container value( mapped ) type
-
-    This class tries to be useful as much, as possible. For example, for class
-    declaration( and not definition ) it parsers the class name in order to
-    extract all the information.
-    """
-    def __init__( self
-                  , container_name
-                  , element_type_index
-                  , element_type_typedef
-                  , defaults_remover
-                  , key_type_index=None
-                  , key_type_typedef=None ):
-        """
-        container_name - std container name
-        element_type_index - position of value\\mapped type within template
-          arguments list
-        element_type_typedef - class typedef to the value\\mapped type
-        key_type_index - position of key type within template arguments list
-        key_type_typedef - class typedef to the key type
-        """
-        self._name = container_name
-        self.remove_defaults_impl = defaults_remover
-        self.element_type_index = element_type_index
-        self.element_type_typedef = element_type_typedef
-        self.key_type_index = key_type_index
-        self.key_type_typedef = key_type_typedef
-
-    def name(self):
-        return self._name
-
-    def get_container_or_none( self, type ):
-        """returns reference to the class declaration or None"""
-        type = type_traits.remove_alias( type )
-        type = type_traits.remove_cv( type )
-
-        cls = None
-        if isinstance( type, cpptypes.declarated_t ):
-            cls = type_traits.remove_alias( type.declaration )
-        elif isinstance( type, class_declaration.class_t ):
-            cls = type
-        elif isinstance( type, class_declaration.class_declaration_t ):
-            cls = type
-        else:
-            return
-
-        if not cls.name.startswith( self.name() + '<' ):
-            return
-
-        for ns in std_namespaces:
-            if type_traits.impl_details.is_defined_in_xxx( ns, cls ):
-                return cls
-
-    def is_my_case( self, type ):
-        """checks, whether type is STD container or not"""
-        return bool( self.get_container_or_none( type ) )
-
-    def class_declaration( self, type ):
-        """returns reference to the class declaration"""
-        cls = self.get_container_or_none( type )
-        if not cls:
-            raise TypeError( 'Type "%s" is not instantiation of std::%s' % ( type.decl_string, self.name() ) )
-        return cls
-
-    def is_sequence( self, type ):
-        #raise exception if type is not container
-        unused = self.class_declaration( type )
-        return self.key_type_index is None
-
-    def is_mapping( self, type ):
-        return not self.is_sequence( type )
-
-    def __find_xxx_type( self, type, xxx_index, xxx_typedef, cache_property_name ):
-        cls = self.class_declaration( type )
-        result = getattr( cls.cache, cache_property_name )
-        if not result:
-            if isinstance( cls, class_declaration.class_t ):
-                xxx_type = cls.typedef( xxx_typedef, recursive=False ).type
-                result = type_traits.remove_declarated( xxx_type )
-            else:
-                xxx_type_str = templates.args( cls.name )[xxx_index]
-                result = type_traits.impl_details.find_value_type( cls.top_parent, xxx_type_str )
-                if None is result:
-                    raise RuntimeError( "Unable to find out %s '%s' key\\value type."
-                                        % ( self.name(), cls.decl_string ) )
-            setattr( cls.cache, cache_property_name, result )
-        return result
-
-    def element_type( self, type ):
-        """returns reference to the class value\\mapped type declaration"""
-        return self.__find_xxx_type( type
-                                     , self.element_type_index
-                                     , self.element_type_typedef
-                                     , 'container_element_type')
-
-    def key_type( self, type ):
-        """returns reference to the class key type declaration"""
-        if not self.is_mapping( type ):
-            raise TypeError( 'Type "%s" is not "mapping" container' % str( type ) )
-        return self.__find_xxx_type( type
-                                     , self.key_type_index
-                                     , self.key_type_typedef
-                                     , 'container_key_type' )
-
-    def remove_defaults( self, type_or_string ):
-        """remove template defaults from a template class instantiation
-
-        For example:
-            std::vector< int, std::allocator< int > >
-        will become
-            std::vector< int >
-        """
-        name = type_or_string
-        if not isinstance( type_or_string, types.StringTypes ):
-            name = self.class_declaration( type_or_string ).name
-        if not self.remove_defaults_impl:
-            return name
-        no_defaults = self.remove_defaults_impl( name )
-        if not no_defaults:
-            return name
-        else:
-            return no_defaults
-
-create_traits = container_traits_impl_t
-list_traits = create_traits( 'list'
-                             , 0
-                             , 'value_type'
-                             , defaults_eraser.erase_allocator )
-
-deque_traits = create_traits( 'deque'
-                              , 0
-                              , 'value_type'
-                              , defaults_eraser.erase_allocator )
-
-queue_traits = create_traits( 'queue'
-                              , 0
-                              , 'value_type'
-                              , defaults_eraser.erase_container )
-
-priority_queue_traits = create_traits( 'priority_queue'
-                                       , 0
-                                       , 'value_type'
-                                       , defaults_eraser.erase_container_compare )
-
-vector_traits = create_traits( 'vector'
-                               , 0
-                               , 'value_type'
-                               , defaults_eraser.erase_allocator )
-
-stack_traits = create_traits( 'stack'
-                              , 0
-                              , 'value_type'
-                              , defaults_eraser.erase_container )
-
-map_traits = create_traits( 'map'
-                            , 1
-                            , 'mapped_type'
-                            , defaults_eraser.erase_map_compare_allocator
-                            , key_type_index=0
-                            , key_type_typedef='key_type')
-
-multimap_traits = create_traits( 'multimap'
-                                 , 1
-                                 , 'mapped_type'
-                                 , defaults_eraser.erase_map_compare_allocator
-                                 , key_type_index=0
-                                 , key_type_typedef='key_type')
-
-
-hash_map_traits = create_traits( 'hash_map'
-                                 , 1
-                                 , 'mapped_type'
-                                 , defaults_eraser.erase_hashmap_compare_allocator
-                                 , key_type_index=0
-                                 , key_type_typedef='key_type')
-
-
-hash_multimap_traits = create_traits( 'hash_multimap'
-                                      , 1
-                                      , 'mapped_type'
-                                      , defaults_eraser.erase_hashmap_compare_allocator
-                                      , key_type_index=0
-                                      , key_type_typedef='key_type')
-
-set_traits = create_traits( 'set'
-                            , 0
-                            , 'value_type'
-                            , defaults_eraser.erase_compare_allocator)
-
-multiset_traits = create_traits( 'multiset'
-                                 , 0
-                                 , 'value_type'
-                                 , defaults_eraser.erase_compare_allocator )
-
-hash_set_traits = create_traits( 'hash_set'
-                                 , 0
-                                 , 'value_type'
-                                 , defaults_eraser.erase_hash_allocator )
-
-hash_multiset_traits = create_traits( 'hash_multiset'
-                                      , 0
-                                      , 'value_type'
-                                      , defaults_eraser.erase_hash_allocator )
-
-container_traits = (
-      list_traits
-    , deque_traits
-    , queue_traits
-    , priority_queue_traits
-    , vector_traits
-    , stack_traits
-    , map_traits
-    , multimap_traits
-    , hash_map_traits
-    , hash_multimap_traits
-    , set_traits
-    , hash_set_traits
-    , multiset_traits
-    , hash_multiset_traits )
-"""tuple of all STD container traits classes"""
-
-def find_container_traits( cls_or_string ):
-    if isinstance( cls_or_string, types.StringTypes ):
-        if not templates.is_instantiation( cls_or_string ):
-            return None
-        name = templates.name( cls_or_string )
-        if name.startswith( 'std::' ):
-            name = name[ len( 'std::' ): ]
-        for cls_traits in container_traits:
-            if cls_traits.name() == name:
-                return cls_traits
-    else:
-        for cls_traits in container_traits:
-            if cls_traits.is_my_case( cls_or_string ):
-                return cls_traits
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/decl_visitor.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/decl_visitor.py
deleted file mode 100644
index db148e7..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/decl_visitor.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines declarations visitor class interface
-"""
-
-class decl_visitor_t(object):
-    """
-    declarations visitor interface
-
-    All functions within this class should be redefined in derived classes.
-    """
-    def __init__(self):
-        object.__init__(self)
-
-    def visit_member_function( self ):
-        raise NotImplementedError()
-
-    def visit_constructor( self ):
-        raise NotImplementedError()
-
-    def visit_destructor( self ):
-        raise NotImplementedError()
-
-    def visit_member_operator( self ):
-        raise NotImplementedError()
-
-    def visit_casting_operator( self ):
-        raise NotImplementedError()
-
-    def visit_free_function( self ):
-        raise NotImplementedError()
-
-    def visit_free_operator( self ):
-        raise NotImplementedError()
-
-    def visit_class_declaration(self ):
-        raise NotImplementedError()
-
-    def visit_class(self ):
-        raise NotImplementedError()
-
-    def visit_enumeration(self ):
-        raise NotImplementedError()
-
-    def visit_namespace(self ):
-        raise NotImplementedError()
-
-    def visit_typedef(self ):
-        raise NotImplementedError()
-
-    def visit_variable(self ):
-        raise NotImplementedError()
\ No newline at end of file
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/declaration.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/declaration.py
deleted file mode 100644
index 6850dcf..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/declaration.py
+++ /dev/null
@@ -1,277 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines 2 important classes
-
-This module defines:
-* declaration_t - base class for all pygccxml defined classes, which describe
-  a C++ declaration
-* location_t - provides information about physical location of the declaration
-"""
-
-import algorithm
-import templates
-import algorithms_cache
-
-class location_t(object):
-    """provides information about the location of the declaration within the source file"""
-
-    def __init__(self, file_name='', line=-1 ):
-        self._file_name = file_name
-        self._line = line
-
-    def __eq__(self, other):
-        if not isinstance( other, self.__class__ ):
-            return False
-        return self.line == other.line \
-               and self.file_name == other.file_name
-
-    def __ne__( self, other):
-        return not self.__eq__( other )
-
-    def __lt__( self, other ):
-        if not isinstance( other, location_t ):
-            return self.__class__.__name__ < other.__class__.__name__
-        return ( self.file_name, self.line ) < ( other.file_name, other.line )
-
-    def _get_file_name(self):
-        return self._file_name
-    def _set_file_name(self, new_file_name):
-        self._file_name = new_file_name
-    file_name = property( _get_file_name, _set_file_name
-                          , doc="""absolute source file name, type string""" )
-
-    def _get_line( self ):
-        return self._line
-    def _set_line( self, new_line ):
-        self._line = new_line
-    line = property( _get_line, _set_line, doc="""line number, type int""")
-
-    def as_tuple( self ):
-        """return tuple(self.file_name, self.line)"""
-        return (self.file_name, self.line)
-
-class declaration_t( object ):
-    """base class for all classes that represent a C++ declaration"""
-
-    def __init__( self, name='', location=None, is_artificial=False, mangled=None, demangled=None, attributes=None ):
-        self._name = name
-        self._location = location
-        self._is_artificial = is_artificial
-        self._mangled = mangled
-        self._demangled = demangled
-        self._attributes = attributes
-        self._parent = None
-        self._cache = algorithms_cache.declaration_algs_cache_t()
-        self._compiler = None
-        self._partial_name = None
-
-    def __str__(self):
-        """Default __str__ method.
-
-        This version just returns the decl_string and the class.
-        Derived classes may override this method to provide more detailed
-        information.
-
-        A __str__ method for a declaration should always provide enough
-        information so that it uniquely identifies the declaration and
-        the user is able to find the declaration in his source code.
-        """
-        name = self.decl_string
-        if name[:2]=="::":
-            name = name[2:]
-        # Append the declaration class
-        cls = self.__class__.__name__
-        if cls[-2:]=="_t":
-            cls = cls[:-2]
-        cls = cls.replace( '_', ' ' )
-        return "%s [%s]"%(name, cls)
-
-    @staticmethod
-    def _sorted_list( some_list ):
-        """implementation details"""
-        some_list.sort()
-        return some_list
-
-    def _get__cmp__items( self ):
-        """implementation details"""
-        #Every derived class should implement this method. This method should
-        #return a list of items, that should be compared.
-
-        print '_get__cmp__items not implemented for class ', self.__class__.__name__
-        raise NotImplemented()
-
-    def _get__cmp__data(self):
-        """implementation details"""
-        data = [ algorithm.declaration_path( self.parent ), self.name, self.location ]
-        data.extend( self._get__cmp__items() )
-        return data
-
-    def __eq__(self, other):
-        """
-        function will return true, if both declarations refers to the same object.
-        This function could be implemented in terms of _get__cmp__data, but in
-        this case it will downgrade performance. self.mangled property is not
-        compared, because it could be chaned from one compilation time to an
-        other.
-        """
-        if not isinstance( other, self.__class__ ):
-            return False
-        return self.name == other.name \
-               and self.location == other.location \
-               and algorithm.declaration_path( self.parent ) \
-                   == algorithm.declaration_path( other.parent )
-
-    def __ne__( self, other):
-        """return not self.__eq__( other )"""
-        return not self.__eq__( other )
-
-    def __lt__(self, other):
-        """
-        C{if not isinstance( other, self.__class__ ):}
-        C{    return self.__class__.__name__ < other.__class__.__name__}
-        C{return self._get__cmp__data() < other._get__cmp__data()}
-        """
-        if not isinstance( other, self.__class__ ):
-            return self.__class__.__name__ < other.__class__.__name__
-        return self._get__cmp__data() < other._get__cmp__data()
-
-    def _get_name_impl( self ):
-        return self._name
-
-    def _get_name( self ):
-        return self._get_name_impl()
-
-    def _on_rename( self ):
-        pass
-
-    def _set_name( self, new_name ):
-        previous_name = self._name
-        self._name = new_name
-        self._partial_name = None
-        self.cache.reset_name_based()
-        if previous_name: #the was a rename and not initial "set"
-            self._on_rename()
-
-    name = property( _get_name, _set_name
-                     , doc="""Declaration name
-                     @type: str
-                     """)
-
-    def _get_partial_name_impl( self ):
-        return self.name
-
-    @property
-    def partial_name( self ):
-        """declaration name, without template default arguments
-        Right now std containers is the only classes that support this functionality"""
-        if None is self._partial_name:
-            self._partial_name = self._get_partial_name_impl()
-        return self._partial_name
-
-    def _get_parent(self):
-        return self._parent
-    def _set_parent(self, new_parent):
-        if new_parent:
-            assert( isinstance( new_parent, declaration_t ) )
-        self._parent = new_parent
-    parent = property( _get_parent, _set_parent
-                       , doc="""Reference to parent declaration
-                       @type: declaration_t
-                       """)
-
-    def __get_top_parent(self):
-        parent = self.parent
-        me = self
-        while True:
-            if not parent:
-                return me
-            else:
-                me = parent
-                parent = me.parent
-    top_parent = property( __get_top_parent,
-                           doc="""reference to top parent declaration
-                           @type: declaration_t
-                           """ )
-
-    def _get_location( self ):
-        return self._location
-    def _set_location( self, new_location ):
-        self._location = new_location
-    location = property( _get_location, _set_location
-                        , doc="""Location of the declaration within source file
-                        @type: L{location_t}
-                        """)
-
-    def _get_is_artificial( self ):
-        return self._is_artificial
-    def _set_is_artificial( self, new_artificial ):
-        self._is_artificial = new_artificial
-    is_artificial = property( _get_is_artificial, _set_is_artificial
-                              , doc="""Describes whether declaration is compiler generated or not
-                              @type: bool
-                              """)
-
-    def _get_mangled( self ):
-        return self._mangled
-    def _set_mangled( self, mangled ):
-        self._mangled = mangled
-    mangled = property( _get_mangled, _set_mangled
-                        , doc="""Compiler generated declaration name
-                        @type: str
-                        """ )
-
-    def _get_demangled( self ):
-        return self._demangled
-    def _set_demangled( self, demangled ):
-        self._demangled = demangled
-    demangled = property( _get_demangled, _set_demangled
-                        , doc="""Demangled compiler generated declaration name
-                        @type: str
-                        """ )
-
-    def _get_attributes( self ):
-        return self._attributes
-    def _set_attributes( self, attributes ):
-        self._attributes = attributes
-    attributes = property( _get_attributes, _set_attributes
-                        , doc="""GCCXML attributes, set using __attribute__((gccxml("...")))
-                        @type: str
-                        """ )
-
-    def create_decl_string(self, with_defaults=True):
-        return algorithm.full_name( self, with_defaults )
-
-    @property
-    def decl_string(self):
-        """declaration full name"""
-        return self.create_decl_string()
-
-    @property
-    def partial_decl_string(self):
-        """declaration full name"""
-        return self.create_decl_string(with_defaults=False)
-
-    @property
-    def cache( self ):
-        """implementation details
-
-        reference to instance of L{algorithms_cache.algorithms_cache_t} class.
-        """
-        return self._cache
-
-    def i_depend_on_them( self, recursive=True ):
-        """return list of all types and declarations the declaration depends on"""
-        print self
-        raise NotImplementedError()
-
-    def _get_compiler( self ):
-        return self._compiler
-    def _set_compiler( self, compiler ):
-        self._compiler = compiler
-    compiler = property( _get_compiler, _set_compiler
-                        , doc="""compiler name + version
-                        @type: str""" )
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/dependencies.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/dependencies.py
deleted file mode 100644
index e811dba..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/dependencies.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-this module contains class that keeps dependency information of some declaration
-"""
-
-import cpptypes
-
-class dependency_info_t( object ):
-    def __init__( self, declaration, depend_on_it, access_type=None, hint=None ):
-        object.__init__( self )
-        #prevent recursive import
-        import class_declaration
-        assert isinstance( depend_on_it, ( class_declaration.class_t, cpptypes.type_t ) )
-        self._declaration = declaration
-        self._depend_on_it = depend_on_it
-        self._access_type = access_type
-        self._hint = hint
-
-    @property
-    def declaration( self ):
-        return self._declaration
-    #short name
-    decl = declaration
-
-    @property
-    def depend_on_it( self ):
-        return self._depend_on_it
-
-    def _get_access_type( self ):
-        return self._access_type
-    def _set_access_type( self, access_type ):
-        self._access_type = access_type
-    access_type = property( _get_access_type, _set_access_type )
-
-    def __str__( self ):
-        return 'declaration "%s" depends( %s ) on "%s" ' \
-               % ( self.declaration, self.access_type, self.depend_on_it )
-
-    @property
-    def hint(self):
-        """the declaration, that report dependency can put some additional inforamtion
-        about dependency. It can be used later"""
-        return self._hint
-
-    def find_out_depend_on_declaration( self ):
-        """if declaration depends on other declaration and not on some type
-           this function will return reference to it. Otherwise None will be returned
-        """
-        #prevent recursive import
-        from pygccxml import declarations
-
-        if isinstance( self.depend_on_it, declarations.declaration_t ):
-            return self.depend_on_it
-        base_type = declarations.base_type( declarations.remove_alias( self.depend_on_it ) )
-        if isinstance( base_type, cpptypes.declarated_t ):
-            return base_type.declaration
-        return None
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/enumeration.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/enumeration.py
deleted file mode 100644
index e5b90e3..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/enumeration.py
+++ /dev/null
@@ -1,137 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines class, that describes C++ enum
-"""
-
-import copy
-import types
-import compilers
-import declaration
-
-class enumeration_t( declaration.declaration_t ):
-    """
-    describes C++ enum
-    """
-    def __init__( self, name='', values=None ):
-        """creates class that describes C++ enum declaration
-
-        The items of the list 'values' may either be strings containing
-        the enumeration value name or tuples (name, numvalue).
-
-        @param name: Enum name
-        @type name: str
-        @param parent: Parent declaration
-        @type parent: declaration_t
-        @param values: Enumeration values
-        @type values: list
-        """
-        declaration.declaration_t.__init__( self, name )
-
-        # A list of tuples (valname(str), valnum(int)). The order of the list should
-        # be the same as the order in the C/C++ source file.
-        self._values = []
-
-        # Initialize values via property access
-        self.values = values
-        self._byte_size = 0
-        self._byte_align = 0
-
-    def __eq__(self, other):
-        if not declaration.declaration_t.__eq__( self, other ):
-            return False
-        return self.values == other.values
-
-    def _get__cmp__items( self ):
-        """implementation details"""
-        return [self.values]
-
-    def _get_values(self):
-        return copy.copy(self._values)
-    def _set_values(self, values):
-        self._values = []
-        # None is treated like an empty list
-        if (values==None):
-            return
-        # Check that we have indeed a list...
-        if type(values)!=list:
-            raise ValueError, "'values' must be a list (got a %s instead)"%type(values).__name__
-        # Append the items individually. This has the effect that there's
-        # some additional type checking and that a copy of 'values' is stored
-        # and the caller cannot further manipulate the list via his own reference
-        for item in values:
-            if isinstance(item, types.StringTypes):
-                self.append_value(item)
-            elif type(item)==tuple:
-                name,num = item
-                self.append_value(name, num)
-            else:
-                raise ValueError, "'values' contains an invalid item: %s"%item
-    values = property( _get_values, _set_values
-                       , doc="""A list of tuples (valname(str), valnum(int)) that contain the enumeration values.
-                       @type: list""")
-
-    def append_value(self, valuename, valuenum=None):
-        """Append another enumeration value to the enum.
-
-        The numeric value may be None in which case it is automatically determined by
-        increasing the value of the last item.
-
-        When the 'values' attribute is accessed the resulting list will be in the same
-        order as append_value() was called.
-
-        @param valuename: The name of the value.
-        @type valuename: str
-        @param valuenum: The numeric value or None.
-        @type valuenum: int
-        """
-        # No number given? Then use the previous one + 1
-        if valuenum==None:
-            if len(self._values)==0:
-                valuenum = 0
-            else:
-                valuenum = self._values[-1][1]+1
-
-        # Store the new value
-        self._values.append((valuename, int(valuenum)))
-
-    def has_value_name(self, name):
-        """Check if this enum has a particular name among its values.
-
-        @param name: Enumeration value name
-        @type name: str
-        @return: True if there is an enumeration value with the given name
-        """
-        for val,num in self._values:
-            if val==name:
-                return True
-        return False
-
-    def get_name2value_dict( self ):
-        """returns a dictionary, that maps between enum name( key ) and enum value( value )"""
-        x = {}
-        for val, num in self._values:
-            x[val] = num
-        return x
-
-    def i_depend_on_them( self, recursive=True ):
-        return []
-
-    def _get_byte_size(self):
-        return self._byte_size
-    def _set_byte_size( self, new_byte_size ):
-        self._byte_size = new_byte_size
-    byte_size = property( _get_byte_size, _set_byte_size
-                          , doc="Size of this class in bytes @type: int")
-
-    def _get_byte_align(self):
-        if self.compiler == compilers.MSVC_PDB_9:
-            compilers.on_missing_functionality( self.compiler, "byte align" )
-        return self._byte_align
-    def _set_byte_align( self, new_byte_align ):
-        self._byte_align = new_byte_align
-    byte_align = property( _get_byte_align, _set_byte_align
-                          , doc="Alignment of this class in bytes @type: int")
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/function_traits.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/function_traits.py
deleted file mode 100644
index 56bdb50..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/function_traits.py
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines few algorithms, that deals with different properties of functions
-"""
-
-import calldef
-import type_traits
-import class_declaration
-
-def is_same_return_type( f1, f2 ):
-    #covariant returns
-    #The return type of an overriding function shall be either identical to the
-    #return type of the overridden function or covariant with the classes of the
-    #functions. If a function D::f overrides a function B::f, the return types
-    #of the functions are covariant if they satisfy the following criteria:
-
-    #* both are pointers to classes or references to classes
-    #* the class in the return type of B::f is the same class as the class in
-    #  the return type of D::f or, is an unambiguous direct or indirect base
-    #  class of the class in the return type of D::f and is accessible in D
-    #* both pointers or references have the same cv-qualification and the class
-    #  type in the return type of D::f has the same cv-qualification as or less
-    #  cv-qualification than the class type in the return type of B::f.
-
-    if not f1.__class__ is f2.__class__:
-        #it should be assert
-        return False #2 different calldef types
-    if not isinstance( f1, calldef.member_calldef_t ):
-        #for free functions we compare return types as usual
-        return type_traits.is_same( f1.return_type, f2.return_type)
-    if f1.virtuality == calldef.VIRTUALITY_TYPES.NOT_VIRTUAL \
-       or f2.virtuality == calldef.VIRTUALITY_TYPES.NOT_VIRTUAL:
-        #for non-virtual member functions we compare types as usual
-        return type_traits.is_same( f1.return_type, f2.return_type)
-    rt1 = f1.return_type
-    rt2 = f2.return_type
-    if type_traits.is_pointer( rt1 ) and type_traits.is_pointer( rt2 ):
-        rt1 = type_traits.remove_pointer( rt1 )
-        rt2 = type_traits.remove_pointer( rt2 )
-    elif type_traits.is_reference( rt1 ) and type_traits.is_reference( rt2 ):
-        rt1 = type_traits.remove_reference( rt1 )
-        rt2 = type_traits.remove_reference( rt2 )
-    else:
-        return type_traits.is_same( f1.return_type, f2.return_type)
-    if ( type_traits.is_const( rt1 ) and type_traits.is_const( rt2 ) ) \
-       or ( False == type_traits.is_const( rt1 ) and False == type_traits.is_const( rt2 ) ):
-        rt1 = type_traits.remove_const( rt1 )
-        rt2 = type_traits.remove_const( rt2 )
-    else:
-        return False
-    if not type_traits.is_class( rt1 ) or not type_traits.is_class( rt2 ):
-        return type_traits.is_same( rt1, rt2 )
-    c1 = type_traits.class_traits.get_declaration( rt1 )
-    c2 = type_traits.class_traits.get_declaration( rt2 )
-    if c1.class_type == class_declaration.CLASS_TYPES.UNION \
-       or c2.class_type == class_declaration.CLASS_TYPES.UNION:
-        return type_traits.is_same( rt1, rt2 )
-    return type_traits.is_same( c1, c2 ) \
-           or type_traits.is_base_and_derived( c1, c2 ) \
-           or type_traits.is_base_and_derived( c2, c1 )
-
-
-def is_same_function( f1, f2 ):
-    """returns true if f1 and f2 is same function
-
-    Use case: sometimes when user defines some virtual function in base class,
-    it overrides it in a derived one. Sometimes we need to know whether two member
-    functions is actualy same function.
-    """
-    if f1 is f2:
-        return True
-    if not f1.__class__ is f2.__class__:
-        return False
-    if isinstance( f1, calldef.member_calldef_t ) and f1.has_const != f2.has_const:
-        return False
-    if f1.name != f2.name:
-        return False
-    if not is_same_return_type( f1, f2 ):
-        return False
-    if len( f1.arguments ) != len(f2.arguments):
-        return False
-    for f1_arg, f2_arg in zip( f1.arguments, f2.arguments ):
-        if not type_traits.is_same( f1_arg.type, f2_arg.type ):
-            return False
-    return True
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/matchers.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/matchers.py
deleted file mode 100644
index 9fac068..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/matchers.py
+++ /dev/null
@@ -1,527 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines all "built-in" classes that implement declarations compare functionality
-according to some criteria
-"""
-
-import os
-import re
-import types
-import algorithm
-import variable
-import namespace
-import calldef
-import cpptypes
-import templates
-import class_declaration
-from pygccxml import utils
-
-class matcher_base_t(object):
-    """matcher_base_t class defines interface for classes that will implement
-       compare functionality according to some criteria.
-    """
-    def __init__( self ):
-        object.__init__( self )
-
-    def __call__(self, decl):
-        raise NotImplementedError( "matcher must always implement the __call__() method." )
-
-    def __invert__(self):
-        """not-operator (~)"""
-        return not_matcher_t(self)
-
-    def __and__(self, other):
-        """and-operator (&)"""
-        return and_matcher_t([self, other])
-
-    def __or__(self, other):
-        """or-operator (|)"""
-        return or_matcher_t([self, other])
-
-    def __str__( self ):
-        return "base class for all matchers"
-
-class and_matcher_t(matcher_base_t):
-    """Combine several other matchers with "&".
-
-    For example: find all private functions with name XXX
-
-    C{ matcher = access_type_matcher_t( 'private' ) & calldef_matcher_t( name='XXX' ) }
-    """
-    def __init__(self, matchers):
-        matcher_base_t.__init__(self)
-        self.matchers = matchers
-
-    def __call__(self, decl):
-        for matcher in self.matchers:
-            if not matcher(decl):
-                return False
-        return True
-
-    def __str__(self):
-        return " & ".join( map( lambda x: "(%s)" % str( x ), self.matchers ) )
-
-
-class or_matcher_t(matcher_base_t):
-    """Combine several other matchers with "|".
-
-    For example: find all functions and variables with name 'XXX'
-
-    C{ matcher = variable_matcher_t( name='XXX' ) | calldef_matcher_t( name='XXX' ) }
-
-    """
-    def __init__(self, matchers):
-        matcher_base_t.__init__(self)
-        self.matchers = matchers
-
-    def __call__(self, decl):
-        for matcher in self.matchers:
-            if matcher(decl):
-                return True
-        return False
-
-    def __str__(self):
-        return " | ".join( map( lambda x: "(%s)" % str( x ), self.matchers ) )
-
-
-class not_matcher_t(matcher_base_t):
-    """Return the inverse result of matcher, using "~"
-
-    For example: find all private and protected declarations
-
-    C{ matcher = ~access_type_matcher_t( 'private' ) }
-
-    """
-    def __init__(self, matcher):
-        matcher_base_t.__init__(self)
-        self.matcher = matcher
-
-    def __call__(self, decl):
-        return not self.matcher(decl)
-
-    def __str__(self):
-        return "~(%s)"%str(self.matcher)
-
-class declaration_matcher_t( matcher_base_t ):
-    """
-    Instance of this class will match declarations by next criteria:
-          - declaration name, also could be fully qualified name
-            Example: wstring or ::std::wstring
-          - declaration type
-            Example: L{class_t}, L{namespace_t}, L{enumeration_t}
-          - location within file system ( file or directory )
-    """
-    def __init__( self, name=None, decl_type=None, header_dir=None, header_file=None ):
-        """
-        @param decl_type: declaration type to match by. For example L{enumeration_t}.
-        @type decl_type: any class that derives from L{declarations.declaration_t} class
-
-        @param name: declaration name, could be full name.
-        @type name: str
-
-        @param header_dir: absolute directory path
-        @type header_dir: str
-
-        @param header_file: absolute file path
-        @type header_file: str
-
-        """
-        #An other option is that pygccxml will create absolute path using
-        #os.path.abspath function. But I think this is just wrong, because abspath
-        #builds path using current working directory. This behavior is fragile
-        #and very difficult to find a bug.
-        matcher_base_t.__init__( self )
-        self.decl_type = decl_type
-        self.__name = None
-        self.__opt_is_tmpl_inst = None
-        self.__opt_tmpl_name = None
-        self.__opt_is_full_name = None
-        self.__decl_name_only = None
-
-        self._set_name( name )
-
-        self.header_dir = header_dir
-        self.header_file = header_file
-
-        if self.header_dir:
-            self.header_dir = utils.normalize_path( self.header_dir )
-            if not os.path.isabs( self.header_dir ):
-                raise RuntimeError( "Path to header directory should be absolute!" )
-
-        if self.header_file:
-            self.header_file = utils.normalize_path( self.header_file )
-            if not os.path.isabs( self.header_file ):
-                raise RuntimeError( "Path to header file should be absolute!" )
-
-    def _get_name(self):
-        return self.__name
-
-    def _set_name( self, name ):
-        self.__name = name
-        if not self.__name:
-            self.__opt_is_tmpl_inst = None
-            self.__opt_tmpl_name = None
-            self.__opt_is_full_name = None
-            self.__decl_name_only = None
-        else:
-            self.__opt_is_tmpl_inst = templates.is_instantiation( self.__name )
-            self.__opt_tmpl_name = templates.name( self.__name )
-            if self.__opt_is_tmpl_inst:
-                if '::' in self.__opt_tmpl_name:
-                    self.__opt_is_full_name = True
-                    self.__decl_name_only = self.__opt_tmpl_name.split('::')[-1]
-                else:
-                    self.__opt_is_full_name = False
-                    self.__decl_name_only = self.__opt_tmpl_name
-                self.__name = templates.normalize( name )
-            else:
-                if '::' in self.__name:
-                    self.__opt_is_full_name = True
-                    self.__decl_name_only = self.__name.split('::')[-1]
-                else:
-                    self.__opt_is_full_name = False
-                    self.__decl_name_only = self.__name
-
-
-    name = property( _get_name, _set_name )
-
-    def __str__( self ):
-        msg = []
-        if not None is self.decl_type:
-            msg.append( '(decl type==%s)' % self.decl_type.__name__ )
-        if not None is self.name:
-            msg.append( '(name==%s)' % self.name )
-        if not None is self.header_dir:
-            msg.append( '(header dir==%s)' % self.header_dir )
-        if not None is self.header_file:
-            msg.append( '(header file==%s)' % self.header_file )
-        if not msg:
-            msg.append( 'any' )
-        return ' and '.join( msg )
-
-    def __call__( self, decl ):
-        if not None is self.decl_type:
-            if not isinstance( decl, self.decl_type ):
-                return False
-        if not None is self.name:
-            if not self.check_name( decl ):
-                return False
-        if not None is self.header_dir and decl.location:
-            decl_dir = os.path.abspath( os.path.dirname( decl.location.file_name ) )
-            decl_dir = utils.normalize_path( decl_dir )
-            if decl_dir[:len(self.header_dir)] != self.header_dir:
-                return False
-        if not None is self.header_file and decl.location:
-            decl_file = os.path.abspath( decl.location.file_name )
-            decl_file = utils.normalize_path( decl_file )
-            if decl_file != self.header_file:
-                return False
-        return True
-
-    def check_name( self, decl ):
-        assert not None is self.name
-        if self.__opt_is_tmpl_inst:
-            if not self.__opt_is_full_name:
-                if self.name != templates.normalize( decl.name ) \
-                   and self.name != templates.normalize( decl.partial_name ):
-                    return False
-            else:
-                if self.name != templates.normalize( algorithm.full_name( decl, with_defaults=True ) ) \
-                   and self.name != templates.normalize( algorithm.full_name( decl, with_defaults=False ) ):
-                    return False
-        else:
-            if not self.__opt_is_full_name:
-                if self.name != decl.name and self.name != decl.partial_name:
-                    return False
-            else:
-                if self.name != algorithm.full_name( decl, with_defaults=True ) \
-                   and self.name != algorithm.full_name( decl, with_defaults=False ):
-                    return False
-        return True
-
-    def is_full_name(self):
-        return self.__opt_is_full_name
-
-    def _get_decl_name_only(self):
-        return self.__decl_name_only
-    decl_name_only = property( _get_decl_name_only )
-
-class variable_matcher_t( declaration_matcher_t ):
-    """
-    Instance of this class will match variables by next criteria:
-        - L{declaration_matcher_t} criteria
-        - variable type. Example: L{int_t} or 'int'
-    """
-    def __init__( self, name=None, type=None, header_dir=None, header_file=None ):
-        """
-        @param type: variable type
-        @type type: string or instance of L{type_t} derived class
-        """
-        declaration_matcher_t.__init__( self
-                                        , name=name
-                                        , decl_type=variable.variable_t
-                                        , header_dir=header_dir
-                                        , header_file=header_file )
-        self.type = type
-
-    def __call__( self, decl ):
-        if not super( variable_matcher_t, self ).__call__( decl ):
-            return False
-        if not None is self.type:
-            if isinstance( self.type, cpptypes.type_t ):
-                if self.type != decl.type:
-                    return False
-            else:
-                if self.type != decl.type.decl_string:
-                    return False
-        return True
-
-    def __str__( self ):
-        msg = [ super( variable_matcher_t, self ).__str__() ]
-        if msg == [ 'any' ]:
-            msg = []
-        if not None is self.type:
-            msg.append( '(value type==%s)' % str(self.type) )
-        if not msg:
-            msg.append( 'any' )
-        return ' and '.join( msg )
-
-
-class namespace_matcher_t( declaration_matcher_t ):
-    """Instance of this class will match namespaces by name."""
-
-    def __init__( self, name=None ):
-        declaration_matcher_t.__init__( self, name=name, decl_type=namespace.namespace_t)
-
-    def __call__( self, decl ):
-        if self.name and decl.name == '':
-            #unnamed namespace have same name as thier parent, we should prevent
-            #this happens. The price is: user should search for unnamed namespace
-            #directly.
-            return False
-        return super( namespace_matcher_t, self ).__call__( decl )
-
-
-class calldef_matcher_t( declaration_matcher_t ):
-    """
-    Instance of this class will match callable by next criteria:
-        - L{declaration_matcher_t} criteria
-        - return type. Example: L{int_t} or 'int'
-        - argument types
-    """
-
-    def __init__( self, name=None, return_type=None, arg_types=None, decl_type=None, header_dir=None, header_file=None):
-        """
-        @param return_type: callable return type
-        @type return_type: string or instance of L{type_t} derived class
-
-        @param arg_types: list of function argument types. arg_types can contain.
-        Any item within the list could be string or instance of L{type_t} derived
-        class. If you don't want some argument to participate in match you can
-        put None. For example:
-
-        C{ calldef_matcher_t( arg_types=[ 'int &', None ] ) }
-
-        will match all functions that takes 2 arguments, where the first one is
-        reference to integer and second any
-        @type arg_types: list
-        """
-        if None is decl_type:
-            decl_type = calldef.calldef_t
-        declaration_matcher_t.__init__( self
-                                        , name=name
-                                        , decl_type=decl_type
-                                        , header_dir=header_dir
-                                        , header_file=header_file )
-
-        self.return_type = return_type
-        self.arg_types = arg_types
-
-    def __call__( self, decl ):
-        if not super( calldef_matcher_t, self ).__call__( decl ):
-            return False
-        if not None is self.return_type \
-           and not self.__compare_types( self.return_type, decl.return_type ):
-            return False
-        if self.arg_types:
-            if isinstance( self.arg_types, (types.ListType, types.TupleType)):
-                if len(self.arg_types) != len( decl.arguments ):
-                    return False
-                for type_or_str, arg in zip( self.arg_types, decl.arguments ):
-                    if None == type_or_str:
-                        continue
-                    else:
-                        if not self.__compare_types( type_or_str, arg.type ):
-                            return False
-        return True
-
-    def __compare_types( self, type_or_str, type ):
-        assert type_or_str
-        if type is None:
-            return False
-        if isinstance( type_or_str, cpptypes.type_t ):
-            if type_or_str != type:
-                return False
-        else:
-            if type_or_str != type.decl_string:
-                return False
-        return True
-
-    def __str__( self ):
-        msg = [ super( calldef_matcher_t, self ).__str__() ]
-        if msg == [ 'any' ]:
-            msg = []
-        if not None is self.return_type:
-            msg.append( '(return type==%s)' % str(self.return_type) )
-        if self.arg_types:
-            for i in range( len( self.arg_types ) ):
-                if self.arg_types[i] is None:
-                    msg.append( '(arg %d type==any)' % i )
-                else:
-                    msg.append( '(arg %d type==%s)' % ( i, str( self.arg_types[i] ) ) )
-        if not msg:
-            msg.append( 'any' )
-        return ' and '.join( msg )
-
-
-class operator_matcher_t( calldef_matcher_t ):
-    """
-    Instance of this class will match operators by next criteria:
-        - L{calldef_matcher_t} criteria
-        - operator symbol: =, !=, (), [] and etc
-    """
-    def __init__( self, name=None, symbol=None, return_type=None, arg_types=None, decl_type=None, header_dir=None, header_file=None):
-        """
-        @param symbol: operator symbol
-        @type symbol: str
-        """
-        if None is decl_type:
-            decl_type = calldef.operator_t
-        calldef_matcher_t.__init__( self
-                                    , name=name
-                                    , return_type=return_type
-                                    , arg_types=arg_types
-                                    , decl_type=decl_type
-                                    , header_dir=header_dir
-                                    , header_file=header_file)
-        self.symbol = symbol
-
-    def __call__( self, decl ):
-        if not super( operator_matcher_t, self ).__call__( decl ):
-            return False
-        if not None is self.symbol:
-            if self.symbol != decl.symbol:
-                return False
-        return True
-
-    def __str__( self ):
-        msg = [ super( operator_matcher_t, self ).__str__() ]
-        if msg == [ 'any' ]:
-            msg = []
-        if not None is self.symbol:
-            msg.append( '(symbol==%s)' % str(self.symbol) )
-        if not msg:
-            msg.append( 'any' )
-        return ' and '.join( msg )
-
-class regex_matcher_t( matcher_base_t ):
-    """
-    Instance of this class will match declaration using regular expression.
-    User should supply a function that will extract from declaration desired
-    information as string. Later, this matcher will match that string using
-    user regular expression.
-    """
-    def __init__( self, regex, function=None ):
-        """
-        @param regex: regular expression
-        @type regex: string, an instance of this class will compile it for you
-
-        @param function: function that will be called to get an information from
-        declaration as string. As input this function takes 1 argument: reference
-        to declaration. Return value should be string. If function is None, then
-        the matcher will use declaration name.
-
-        """
-        matcher_base_t.__init__(self)
-        self.regex = re.compile( regex )
-        self.function = function
-        if None is self.function:
-            self.function = lambda decl: decl.name
-
-    def __call__( self, decl ):
-        text = self.function( decl )
-        return bool( self.regex.match( text ) )
-
-    def __str__( self ):
-        return '(regex=%s)' % self.regex
-
-class access_type_matcher_t( matcher_base_t ):
-    """
-    Instance of this class will match declaration by its access type: public,
-    private or protected. If declarations does not have access type, for example
-    free function, then False will be returned.
-    """
-
-    def __init__( self, access_type ):
-        """
-        @param access_type: declaration access type
-        @type access_type: L{ACCESS_TYPES} defines few consts for your convinience.
-        Any way you can pass public, private or protected as argument to this function
-        """
-        matcher_base_t.__init__( self )
-        self.access_type = access_type
-
-    def __call__( self, decl ):
-        if not isinstance( decl.parent, class_declaration.class_t ):
-            return False
-        return self.access_type == decl.parent.find_out_member_access_type( decl )
-
-    def __str__( self ):
-        return '(access type=%s)' % self.access_type
-
-class virtuality_type_matcher_t( matcher_base_t ):
-    """
-    Instance of this class will match declaration by its virtuality type: not virtual,
-    virtual or pure virtual. If declarations does not have virtuality type, for example
-    free function, then False will be returned.
-    """
-
-    def __init__( self, virtuality_type ):
-        """
-        @param access_type: declaration access type
-        @type access_type: L{VIRTUALITY_TYPES} defines few consts for your convinience.
-        """
-        matcher_base_t.__init__( self )
-        self.virtuality_type = virtuality_type
-
-    def __call__( self, decl ):
-        if not isinstance( decl.parent, class_declaration.class_t ):
-            return False
-        return self.virtuality_type == decl.virtuality
-
-    def __str__( self ):
-        return '(virtuality type=%s)' % self.virtuality_type
-
-
-class custom_matcher_t( matcher_base_t ):
-    """
-    Instance of this class will match declaration by user custom criteria.
-    """
-
-    def __init__( self, function ):
-        """
-        @param function: callable, that takes single argument - declaration instance
-                         should return True or False
-        """
-        matcher_base_t.__init__( self )
-        self.function = function
-
-    def __call__( self, decl ):
-        return bool( self.function( decl ) )
-
-    def __str__( self ):
-        return '(user criteria)'
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/mdecl_wrapper.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/mdecl_wrapper.py
deleted file mode 100644
index 9c6a7ba..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/mdecl_wrapper.py
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines class L{mdecl_wrapper_t} that allows to work on set of declarations,
-as it was one declaration.
-
-The L{class<mdecl_wrapper_t>} allows user to not write "for" loops within the code.
-"""
-
-import os
-
-class call_redirector_t( object ):
-    """Internal class used to call some function of objects"""
-    def __init__( self, name, decls ):
-        """creates call_redirector_t instance.
-
-        @param name: name of method, to be called on every object in C{decls} list
-        @param decls: list of objects
-        """
-        object.__init__( self )
-        self.name = name
-        self.decls = decls
-
-    def __call__( self, *arguments, **keywords ):
-        """calls method C{self.name} on every object within C{self.decls} list"""
-        for d in self.decls:
-            callable_ = getattr(d, self.name)
-            callable_( *arguments, **keywords )
-
-class mdecl_wrapper_t( object ):
-    """Multiple declarations wrapper.
-
-    The main purpose of this class is to allow an user to work on many
-    declarations, as they were only one single declaration.
-
-    Example:
-    mb = module_builder_t( ... )
-    #lets say we want to exclude all member functions, that returns reference to int:
-    mb.member_functions( return_type='int &' ).exclude()
-
-    "exclude" function will be called on every function that match the criteria.
-    """
-
-    def __init__( self, decls ):
-        """@param decls: list of declarations to operate on.
-        @type decls: list of L{declaration wrappers<decl_wrapper_t>}
-        """
-        object.__init__( self )
-        self.__dict__['declarations'] = decls
-
-    def __nonzero__( self ):
-        return bool( self.declarations )
-
-    def __len__( self ):
-        """returns the number of declarations"""
-        return len( self.declarations )
-
-    def __getitem__( self, index ):
-        """provides access to declaration"""
-        return self.declarations[index]
-
-    def __iter__( self ):
-        return iter(self.declarations)
-
-    def __ensure_attribute( self, name ):
-        invalid_decls = filter( lambda d: not hasattr( d, name ), self.declarations )
-        sep = os.linesep + '    '
-        if invalid_decls:
-            raise RuntimeError( "Next declarations don't have '%s' attribute: %s"
-                                % ( name, sep.join( map( str, invalid_decls ) ) ) )
-
-    def __setattr__( self, name, value ):
-        """Updates the value of attribute on all declarations.
-        @param name: name of attribute
-        @param value: new value of attribute
-        """
-        self.__ensure_attribute( name )
-        for d in self.declarations:
-            setattr( d, name, value )
-
-    def __getattr__( self, name ):
-        """@param name: name of method
-        """
-        return call_redirector_t( name, self.declarations )
-
-    def __contains__( self, item ):
-        return item in self.declarations
-
-    def to_list(self):
-        l = []
-        for d in self.declarations:
-            l.append( d )
-        return l
\ No newline at end of file
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/namespace.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/namespace.py
deleted file mode 100644
index d29c587..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/namespace.py
+++ /dev/null
@@ -1,144 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""defines class, that describes C++ namespace declaration"""
-
-import declaration
-import scopedef
-import algorithm
-
-class namespace_t( scopedef.scopedef_t ):
-    """
-    describes C++ namespace
-    """
-
-    def __init__( self, name='', declarations=None ):
-        """creates class that describes C++ namespace declaration"""
-        scopedef.scopedef_t.__init__( self, name )
-        if not declarations:
-            declarations = []
-        self._declarations = declarations # list of all declarations belongs to this namespace
-
-    def __str__(self):
-        name = algorithm.full_name(self)
-        if name!="::" and name[:2]=="::":
-            name = name[2:]
-        return "%s [namespace]"%name
-
-    def _get__cmp__scope_items(self):
-        """implementation details"""
-        return [ self._sorted_list( self.declarations ) ]
-
-    def _get_declarations_impl(self):
-        return self._declarations
-    def _set_declarations(self, declarations):
-        self._declarations = declarations
-    declarations = property( scopedef.scopedef_t._get_declarations
-                             , _set_declarations
-                             , doc="list of all declarations, defined in the namespace")
-
-    def take_parenting( self, inst ):
-        """Takes parenting from inst and transfers it to self"""
-        if self is inst:
-            return
-        for decl in inst.declarations:
-            decl.parent = self
-            self.declarations.append( decl )
-        inst.declarations = []
-
-    def adopt_declaration( self, decl ):
-        self.declarations.append( decl )
-        decl.parent = self
-        decl.cache.reset()
-
-    def remove_declaration( self, decl ):
-        """
-        removes decl from  members list
-
-        @param decl: declaration to be removed
-        @type decl: L{declaration_t}
-        """
-        del self.declarations[ self.declarations.index( decl ) ]
-        decl.cache.reset()
-        #add more comment about this.
-        #if not keep_parent:
-        #    decl.parent=None
-
-    def namespace( self, name=None, function=None, recursive=None ):
-        """returns reference to namespace declaration, that is matched defined criterias"""
-        return self._find_single( scopedef.scopedef_t._impl_matchers[ namespace_t.namespace ]
-                                  , name=name
-                                  , function=function
-                                  , recursive=recursive )
-    ns = namespace
-
-    def namespaces( self, name=None, function=None, recursive=None, allow_empty=None ):
-        """returns a set of namespace declarations, that are matched defined criterias"""
-        return self._find_multiple( scopedef.scopedef_t._impl_matchers[ namespace_t.namespace ]
-                                    , name=name
-                                    , function=function
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-    nss = namespaces
-
-    def free_function( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to free function declaration, that is matched defined criterias"""
-        return self._find_single( scopedef.scopedef_t._impl_matchers[ namespace_t.free_function ]
-                                  , name=name
-                                  , function=function
-                                  , decl_type=self._impl_decl_types[ namespace_t.free_function ]
-                                  , return_type=return_type
-                                  , arg_types=arg_types
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive )
-    free_fun = free_function
-
-    def free_functions( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of free function declarations, that are matched defined criterias"""
-        return self._find_multiple( scopedef.scopedef_t._impl_matchers[ namespace_t.free_function ]
-                                    , name=name
-                                    , function=function
-                                    , decl_type=self._impl_decl_types[ namespace_t.free_function ]
-                                    , return_type=return_type
-                                    , arg_types=arg_types
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-    free_funs = free_functions
-
-    def free_operator( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to free operator declaration, that is matched defined criterias"""
-        return self._find_single( scopedef.scopedef_t._impl_matchers[ namespace_t.free_operator ]
-                                  , name=self._build_operator_name( name, function, symbol )
-                                  , symbol=symbol
-                                  , function=self._build_operator_function( name, function )
-                                  , decl_type=self._impl_decl_types[ namespace_t.free_operator ]
-                                  , return_type=return_type
-                                  , arg_types=arg_types
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive )
-
-    def free_operators( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of free operator declarations, that are matched defined criterias"""
-        return self._find_multiple( scopedef.scopedef_t._impl_matchers[ namespace_t.free_operator ]
-                                    , name=self._build_operator_name( name, function, symbol )
-                                    , symbol=symbol
-                                    , function=self._build_operator_function( name, function )
-                                    , decl_type=self._impl_decl_types[ namespace_t.free_operator ]
-                                    , return_type=return_type
-                                    , arg_types=arg_types
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-
-    def i_depend_on_them( self, recursive=True ):
-        answer = []
-        if recursive:
-            map( lambda decl: answer.extend( decl.i_depend_on_them() ), self.declarations )
-        return answer
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/pattern_parser.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/pattern_parser.py
deleted file mode 100644
index 858cdca..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/pattern_parser.py
+++ /dev/null
@@ -1,137 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""implementation details"""
-
-import types
-
-class parser_t( object ):
-    """implementation details"""
-    def __init__( self
-                  , pattern_char_begin
-                  , pattern_char_end
-                  , pattern_char_separator ):
-        self.__begin = pattern_char_begin
-        self.__end = pattern_char_end
-        self.__separator = pattern_char_separator
-        #right now parser does not take into account next qualifiers, but it will
-        self.__text_qualifier = '"'
-        self.__char_qualifier = "'"
-        self.__escape = '\\'
-
-    def has_pattern( self, decl_string ):
-        """implementation details"""
-        last_part = decl_string.split( '::' )[-1]
-        return -1 != decl_string.find( self.__begin ) and -1 != last_part.find( self.__end )
-
-    def name( self, decl_string ):
-        """implementation details"""
-        assert isinstance( decl_string, types.StringTypes )
-        if not self.has_pattern( decl_string ):
-            return decl_string
-        args_begin = decl_string.find( self.__begin )
-        return decl_string[0: args_begin].strip()
-
-    def __find_args_separator( self, decl_string, start_pos ):
-        """implementation details"""
-        bracket_depth = 0
-        for index, ch in enumerate( decl_string[start_pos:] ):
-            if ch not in ( self.__begin, self.__end, self.__separator ):
-                continue #I am interested only in < and >
-            elif self.__separator == ch:
-                if not bracket_depth:
-                    return index + start_pos
-            elif self.__begin == ch:
-                bracket_depth += 1
-            elif not bracket_depth:
-                return index + start_pos
-            else:
-                bracket_depth -= 1
-        return -1
-
-    def args( self, decl_string ):
-        """implementation details"""
-        args_begin = decl_string.find( self.__begin )
-        args_end = decl_string.rfind( self.__end )
-        if -1 in ( args_begin, args_end ) or args_begin == args_end:
-            raise RuntimeError( "%s doesn't valid template instantiation string" % decl_string )
-
-        args_only = decl_string[args_begin + 1: args_end ]
-        args = []
-        previous_found, found = 0, 0
-        while True:
-            found = self.__find_args_separator( args_only, previous_found)
-            if -1 == found:
-                args.append( args_only[ previous_found : ] )
-                break
-            #elif decl_string[ found ] == self.__end:
-            #    print args
-            #    raise RuntimeError( "unmatched '%s' token has been found." % self.__end )
-            else:
-                args.append( args_only[ previous_found : found ] )
-            previous_found = found + 1 #skip found sep
-        return [ arg.strip() for arg in args ]
-
-    NOT_FOUND = ( -1, -1 )
-    """implementation details"""
-
-    def find_args(self, text, start=None ):
-        """implementation details"""
-        if start==None:
-            start = 0
-        first_occurance = text.find( self.__begin, start )
-        if first_occurance == -1:
-            return self.NOT_FOUND
-        previous_found, found = first_occurance + 1, 0
-        while True:
-            found = self.__find_args_separator( text, previous_found)
-            if -1 == found:
-                return self.NOT_FOUND
-            elif text[ found ] == self.__end:
-                return ( first_occurance, found )
-            else:
-                previous_found = found + 1 #skip found sep
-
-    def split( self, decl_string ):
-        """implementation details"""
-        assert self.has_pattern( decl_string )
-        return self.name( decl_string ), self.args( decl_string )
-
-    def split_recursive( self, decl_string ):
-        """implementation details"""
-        assert self.has_pattern( decl_string )
-        answer = []
-        to_go = [ decl_string ]
-        while to_go:
-            name, args = self.split( to_go.pop() )
-            answer.append( ( name, args ) )
-            for arg in args:
-                if self.has_pattern( arg ):
-                    to_go.append( arg )
-        return answer
-
-    def join( self, name, args, arg_separator=None ):
-        """implementation details"""
-        if None is arg_separator:
-            arg_separator = ', '
-        args = filter( None, args)
-        args_str = ''
-        if not args:
-            args_str = ' '
-        elif 1 == len( args ):
-            args_str = ' ' + args[0] + ' '
-        else:
-            args_str = ' ' + arg_separator.join( args ) + ' '
-
-        return ''.join( [ name, self.__begin, args_str, self.__end ] )
-
-    def normalize( self, decl_string, arg_separator=None ):
-        """implementation details"""
-        if not self.has_pattern( decl_string ):
-            return decl_string
-        name, args = self.split( decl_string )
-        for i, arg in enumerate( args ):
-            args[i] = self.normalize( arg )
-        return self.join( name, args, arg_separator )
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/scopedef.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/scopedef.py
deleted file mode 100644
index 9564065..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/scopedef.py
+++ /dev/null
@@ -1,650 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines base class for L{namespace_t} and L{class_t} classes
-"""
-
-import time
-import algorithm
-import filtering
-import templates
-import declaration
-import mdecl_wrapper
-from pygccxml import utils
-import matcher as matcher_module
-
-class scopedef_t( declaration.declaration_t ):
-    """Base class for L{namespace_t} and L{class_t} classes.
-
-    This is the base class for all declaration classes that may have
-    children nodes. The children can be accessed via the C{declarations}
-    property.
-
-    Also this class provides "get/select/find" interface. Using this class you
-    can get instance or instances of internal declaration(s).
-
-    You can find declaration(s) using next criteria:
-        1. name - declaration name, could be full qualified name
-        2. header_dir - directory, to which belongs file, that the declaration was declarated in.
-           header_dir should be absolute path.
-        3. header_file - file that the declaration was declarated in.
-        4. function - user ( your ) custom criteria. The interesting thing is that
-           this function will be joined with other arguments ( criteria ).
-        5. recursive - the search declaration range, if True will be search in
-          internal declarations too.
-
-    Every "select" API you can invoke and pass as first argument at declaration
-    name or function. This class will find out correctly what argument represents.
-
-    Example::
-        ns - referrers to global namespace
-        ns.member_function( "do_something ) - will return reference to member
-        function named "do_something". If there is no such function exception
-        will be raised. If there is more then one function exception will be
-        raised too.
-
-    Example 2::
-        ns - referers to global namespace
-        do_smths = ns.member_functions( "do_something ) - will return instance
-        of L{mdecl_wrapper_t} object. This object allows you few things:
-
-        1. To iterate on selected declarations
-        2. To set some property to desired value using one line of code only:
-           do_smths.call_policies = x
-        3. To call some function on every instance using one line of code:
-           do_smths.exclude()
-
-        Pay attention: you can not use "get" functions or properties.
-    """
-
-    RECURSIVE_DEFAULT = True
-    ALLOW_EMPTY_MDECL_WRAPPER = False
-
-    declaration_not_found_t = matcher_module.matcher.declaration_not_found_t
-    multiple_declarations_found_t = matcher_module.matcher.multiple_declarations_found_t
-
-    _impl_matchers = {} #this class variable is used to prevent recursive imports
-    _impl_decl_types = {} #this class variable is used to prevent recursive imports
-    _impl_all_decl_types = [] #this class variable is used to prevent recursive imports
-
-    def __init__( self, name=''):
-        declaration.declaration_t.__init__( self, name )
-
-        self._optimized = False
-        self._type2decls = {}
-        self._type2name2decls = {}
-        self._type2decls_nr = {}
-        self._type2name2decls_nr = {}
-        self._all_decls = None
-        self._all_decls_not_recursive = None
-
-    def _get_logger( self ):
-        return utils.loggers.queries_engine
-    _logger = property( _get_logger, doc="reference to C{queries_engine} logger" )
-
-    def _get__cmp__scope_items(self):
-        """implementation details"""
-        raise NotImplementedError()
-
-    def _get__cmp__items(self):
-        """implementation details"""
-        items = []
-        if self._optimized:
-            #in this case we don't need to build class internal declarations list
-            items.append( self._sorted_list( self._all_decls_not_recursive ) )
-        else:
-            items.append( self._sorted_list( self.declarations ) )
-        items.extend( self._get__cmp__scope_items() )
-        return items
-
-    def __eq__(self, other):
-        if not declaration.declaration_t.__eq__( self, other ):
-            return False
-        return self._sorted_list( self.declarations[:] ) \
-               == other._sorted_list( other.declarations[:] )
-        #self_decls = self._all_decls_not_recursive
-        #if not self._optimized:
-            #self_decls = self._sorted_list( self.declarations[:] )
-        #other_decls = other._all_decls_not_recursive[:]
-        #if not other._optimized:
-            #other_decls = other._sorted_list( other.declarations[:] )
-        #else:
-            #return  self_decls == other_decls
-
-    def _get_declarations_impl(self):
-        raise NotImplementedError()
-
-    def _get_declarations(self):
-        if True == self._optimized:
-            return self._all_decls_not_recursive
-        else:
-            return self._get_declarations_impl()
-    declarations = property( _get_declarations, doc="list of children L{declarations<declaration_t>}" )
-
-    def remove_declaration( self, decl ):
-        raise NotImplementedError()
-
-    def __decl_types( self, decl ):
-        """implementation details"""
-        types = []
-        bases = list( decl.__class__.__bases__ )
-        visited = set()
-        if 'pygccxml' in decl.__class__.__module__:
-            types.append( decl.__class__ )
-        while bases:
-            base = bases.pop()
-            if base is declaration.declaration_t:
-                continue
-            if base in visited:
-                continue
-            if 'pygccxml' not in base.__module__:
-                continue
-            types.append( base )
-            bases.extend( base.__bases__ )
-        return types
-
-    def clear_optimizer(self):
-        """Cleans query optimizer state"""
-        self._optimized = False
-        self._type2decls = {}
-        self._type2name2decls = {}
-        self._type2decls_nr = {}
-        self._type2name2decls_nr = {}
-        self._all_decls = None
-        self._all_decls_not_recursive = None
-
-        map( lambda decl: decl.clear_optimizer()
-             , filter( lambda decl: isinstance( decl, scopedef_t )
-                       ,  self.declarations ) )
-
-    def init_optimizer(self):
-        """Initializes query optimizer state.
-        There are 4 internals hash tables:
-            1. from type to declarations
-            2. from type to declarations for non-recursive queries
-            3. from type to name to declarations
-            4. from type to name to declarations for non-recursive queries
-
-        Almost every query includes declaration type information. Also very
-        common query is to search some declaration(s) by name or full name.
-        Those hashtables allows to search declaration very quick.
-        """
-        if self.name == '::':
-            self._logger.debug( "preparing data structures for query optimizer - started" )
-        start_time = time.clock()
-
-        self.clear_optimizer()
-
-        for dtype in scopedef_t._impl_all_decl_types:
-            self._type2decls[ dtype ] = []
-            self._type2decls_nr[ dtype ] = []
-            self._type2name2decls[ dtype ] = {}
-            self._type2name2decls_nr[ dtype ] = {}
-
-        self._all_decls_not_recursive = self.declarations
-        self._all_decls = algorithm.make_flatten( self._all_decls_not_recursive )
-        for decl in self._all_decls:
-            types = self.__decl_types( decl )
-            for type_ in types:
-                self._type2decls[ type_ ].append( decl )
-                name2decls = self._type2name2decls[ type_ ]
-                if not name2decls.has_key( decl.name ):
-                    name2decls[ decl.name ] = []
-                name2decls[ decl.name ].append( decl )
-                if self is decl.parent:
-                    self._type2decls_nr[ type_ ].append( decl )
-                    name2decls_nr = self._type2name2decls_nr[ type_ ]
-                    if not name2decls_nr.has_key( decl.name ):
-                        name2decls_nr[ decl.name ] = []
-                    name2decls_nr[ decl.name ].append( decl )
-
-        map( lambda decl: decl.init_optimizer()
-             , filter( lambda decl: isinstance( decl, scopedef_t )
-                       ,  self._all_decls_not_recursive ) )
-        if self.name == '::':
-            self._logger.debug( "preparing data structures for query optimizer - done( %f seconds ). "
-                                % ( time.clock() - start_time ) )
-        self._optimized = True
-
-    def _build_operator_function( self, name, function ):
-        if callable( name ):
-            return name
-        else:
-            return function
-
-    def _build_operator_name( self, name, function, symbol ):
-        """implementation details"""
-        def add_operator( sym ):
-            if 'new' in sym or 'delete' in sym:
-                return 'operator ' + sym
-            else:
-                return 'operator'+ sym
-        if callable( name ) and None is function:
-            name = None
-        if name:
-            if not 'operator' in name:
-               name = add_operator( name )
-            return name
-        elif symbol:
-            return add_operator( symbol )
-        return name #both name and symbol are None
-
-    def _on_rename( self ):
-        for decl in self.decls(allow_empty=True):
-            decl.cache.reset_name_based()
-        #I am not sure whether to introduce this or not?
-        #It could be very time consuming operation + it changes optimize query
-        #data structures.
-        #if self.parent:
-        #    if self.parent._optimized:
-        #        self.parent.init_optimizer()
-
-    def __normalize_args( self, **keywds ):
-        """implementation details"""
-        if callable( keywds['name'] ) and None is keywds['function']:
-            keywds['function'] = keywds['name']
-            keywds['name'] = None
-        return keywds
-
-    def __findout_recursive( self, **keywds ):
-        """implementation details"""
-        if None is keywds[ 'recursive' ]:
-            return self.RECURSIVE_DEFAULT
-        else:
-            return keywds[ 'recursive' ]
-
-    def __findout_allow_empty( self, **keywds ):
-        """implementation details"""
-        if None is keywds[ 'allow_empty' ]:
-            return self.ALLOW_EMPTY_MDECL_WRAPPER
-        else:
-            return keywds[ 'allow_empty' ]
-
-    def __findout_decl_type( self, match_class, **keywds ):
-        """implementation details"""
-        if keywds.has_key( 'decl_type' ):
-            return keywds['decl_type']
-
-        matcher_args = keywds.copy()
-        del matcher_args['function']
-        del matcher_args['recursive']
-        if matcher_args.has_key('allow_empty'):
-            del matcher_args['allow_empty']
-
-        matcher = match_class( **matcher_args )
-        if matcher.decl_type:
-            return matcher.decl_type
-        return None
-
-    def __create_matcher( self, match_class, **keywds ):
-        """implementation details"""
-        matcher_args = keywds.copy()
-        del matcher_args['function']
-        del matcher_args['recursive']
-        if matcher_args.has_key('allow_empty'):
-            del matcher_args['allow_empty']
-
-        matcher = match_class( **matcher_args )
-        if keywds['function']:
-            self._logger.debug( 'running query: %s and <user defined function>' % str( matcher ) )
-            return lambda decl: matcher( decl ) and keywds['function'](decl)
-        else:
-            self._logger.debug( 'running query: %s' % str( matcher ) )
-            return matcher
-
-    def __findout_range( self, name, decl_type, recursive ):
-        """implementation details"""
-        if not self._optimized:
-            self._logger.debug( 'running non optimized query - optimization has not been done' )
-            decls = self.declarations
-            if recursive:
-                decls = algorithm.make_flatten( self.declarations )
-            if decl_type:
-                decls = filter( lambda d: isinstance( d, decl_type ), decls )
-            return decls
-
-        if name and templates.is_instantiation( name ):
-            #templates has tricky mode to compare them, so lets check the whole
-            #range
-            name = None
-
-        if name and decl_type:
-            matcher = scopedef_t._impl_matchers[ scopedef_t.decl ]( name=name )
-            if matcher.is_full_name():
-                name = matcher.decl_name_only
-            if recursive:
-                self._logger.debug( 'query has been optimized on type and name' )
-                if self._type2name2decls[decl_type].has_key( name ):
-                    return self._type2name2decls[decl_type][name]
-                else:
-                    return []
-            else:
-                self._logger.debug( 'non recursive query has been optimized on type and name' )
-                if self._type2name2decls_nr[decl_type].has_key( name ):
-                    return self._type2name2decls_nr[decl_type][name]
-                else:
-                    return []
-        elif decl_type:
-            if recursive:
-                self._logger.debug( 'query has been optimized on type' )
-                return self._type2decls[ decl_type ]
-            else:
-                self._logger.debug( 'non recursive query has been optimized on type' )
-                return self._type2decls_nr[ decl_type ]
-        else:
-            if recursive:
-                self._logger.debug( 'query has not been optimized ( hint: query does not contain type and/or name )' )
-                return self._all_decls
-            else:
-                self._logger.debug( 'non recursive query has not been optimized ( hint: query does not contain type and/or name )' )
-                return self._all_decls_not_recursive
-
-    def _find_single( self, match_class, **keywds ):
-        """implementation details"""
-        self._logger.debug( 'find single query execution - started' )
-        start_time = time.clock()
-        norm_keywds = self.__normalize_args( **keywds )
-        matcher = self.__create_matcher( match_class, **norm_keywds )
-        dtype = self.__findout_decl_type( match_class, **norm_keywds )
-        recursive_ = self.__findout_recursive( **norm_keywds )
-        decls = self.__findout_range( norm_keywds['name'], dtype, recursive_ )
-        found = matcher_module.matcher.get_single( matcher, decls, False )
-        self._logger.debug( 'find single query execution - done( %f seconds )' % ( time.clock() - start_time ) )
-        return found
-
-    def _find_multiple( self, match_class, **keywds ):
-        """implementation details"""
-        self._logger.debug( 'find all query execution - started' )
-        start_time = time.clock()
-        norm_keywds = self.__normalize_args( **keywds )
-        matcher = self.__create_matcher( match_class, **norm_keywds )
-        dtype = self.__findout_decl_type( match_class, **norm_keywds )
-        recursive_ = self.__findout_recursive( **norm_keywds )
-        allow_empty = self.__findout_allow_empty( **norm_keywds )
-        decls = self.__findout_range( norm_keywds['name'], dtype, recursive_ )
-        found = matcher_module.matcher.find( matcher, decls, False )
-        mfound = mdecl_wrapper.mdecl_wrapper_t( found )
-        self._logger.debug( '%d declaration(s) that match query' % len(mfound) )
-        self._logger.debug( 'find single query execution - done( %f seconds )'
-                     % ( time.clock() - start_time ) )
-        if not mfound and not allow_empty:
-            raise RuntimeError( "Multi declaration query returned 0 declarations." )
-        return mfound
-
-    def decl( self, name=None, function=None, decl_type=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to declaration, that is matched defined criterias"""
-        return self._find_single( self._impl_matchers[ scopedef_t.decl ]
-                                  , name=name
-                                  , function=function
-                                  , decl_type=decl_type
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive)
-
-    def decls( self, name=None, function=None, decl_type=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of declarations, that are matched defined criterias"""
-        return self._find_multiple( self._impl_matchers[ scopedef_t.decl ]
-                                    , name=name
-                                    , function=function
-                                    , decl_type=decl_type
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-
-    def class_( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to class declaration, that is matched defined criterias"""
-        return self._find_single( self._impl_matchers[ scopedef_t.class_ ]
-                                  , name=name
-                                  , function=function
-                                  , decl_type=self._impl_decl_types[ scopedef_t.class_ ]
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive)
-
-    def classes( self, name=None, function=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of class declarations, that are matched defined criterias"""
-        return self._find_multiple( self._impl_matchers[ scopedef_t.class_ ]
-                                    , name=name
-                                    , function=function
-                                    , decl_type=self._impl_decl_types[ scopedef_t.class_ ]
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-
-    def variable( self, name=None, function=None, type=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to variable declaration, that is matched defined criterias"""
-        return self._find_single( self._impl_matchers[ scopedef_t.variable ]
-                                  , name=name
-                                  , function=function
-                                  , type=type
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive)
-    var = variable #small alias
-
-    def variables( self, name=None, function=None, type=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of variable declarations, that are matched defined criterias"""
-        return self._find_multiple( self._impl_matchers[ scopedef_t.variable ]
-                                    , name=name
-                                    , function=function
-                                    , type=type
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-    vars = variables #small alias
-
-    def calldef( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to "calldef" declaration, that is matched defined criterias"""
-        return self._find_single( self._impl_matchers[ scopedef_t.calldef ]
-                                  , name=name
-                                  , function=function
-                                  , decl_type=self._impl_decl_types[ scopedef_t.calldef ]
-                                  , return_type=return_type
-                                  , arg_types=arg_types
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive )
-
-    def calldefs( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of calldef declarations, that are matched defined criterias"""
-        return self._find_multiple( self._impl_matchers[ scopedef_t.calldef ]
-                                    , name=name
-                                    , function=function
-                                    , decl_type=self._impl_decl_types[ scopedef_t.calldef ]
-                                    , return_type=return_type
-                                    , arg_types=arg_types
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-
-    def operator( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to operator declaration, that is matched defined criterias"""
-        return self._find_single( self._impl_matchers[ scopedef_t.operator ]
-                                  , name=self._build_operator_name( name, function, symbol )
-                                  , symbol=symbol
-                                  , function=self._build_operator_function( name, function )
-                                  , decl_type=self._impl_decl_types[ scopedef_t.operator ]
-                                  , return_type=return_type
-                                  , arg_types=arg_types
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive )
-
-    def operators( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of operator declarations, that are matched defined criterias"""
-        return self._find_multiple( self._impl_matchers[ scopedef_t.operator ]
-                                    , name=self._build_operator_name( name, function, symbol )
-                                    , symbol=symbol
-                                    , function=self._build_operator_function( name, function )
-                                    , decl_type=self._impl_decl_types[ scopedef_t.operator ]
-                                    , return_type=return_type
-                                    , arg_types=arg_types
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-
-    def member_function( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to member declaration, that is matched defined criterias"""
-        return self._find_single( self._impl_matchers[ scopedef_t.member_function ]
-                                  , name=name
-                                  , function=function
-                                  , decl_type=self._impl_decl_types[ scopedef_t.member_function ]
-                                  , return_type=return_type
-                                  , arg_types=arg_types
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive )
-    mem_fun = member_function
-
-    def member_functions( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of member function declarations, that are matched defined criterias"""
-        return self._find_multiple( self._impl_matchers[ scopedef_t.member_function ]
-                                    , name=name
-                                    , function=function
-                                    , decl_type=self._impl_decl_types[ scopedef_t.member_function ]
-                                    , return_type=return_type
-                                    , arg_types=arg_types
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-    mem_funs = member_functions
-
-    def constructor( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to constructor declaration, that is matched defined criterias"""
-        return self._find_single( self._impl_matchers[ scopedef_t.constructor ]
-                                  , name=name
-                                  , function=function
-                                  , decl_type=self._impl_decl_types[ scopedef_t.constructor ]
-                                  , return_type=return_type
-                                  , arg_types=arg_types
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive )
-
-    def constructors( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of constructor declarations, that are matched defined criterias"""
-        return self._find_multiple( self._impl_matchers[ scopedef_t.constructor ]
-                                    , name=name
-                                    , function=function
-                                    , decl_type=self._impl_decl_types[ scopedef_t.constructor ]
-                                    , return_type=return_type
-                                    , arg_types=arg_types
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-
-    def member_operator( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to member operator declaration, that is matched defined criterias"""
-        return self._find_single( self._impl_matchers[ scopedef_t.member_operator ]
-                                  , name=self._build_operator_name( name, function, symbol )
-                                  , symbol=symbol
-                                  , function=self._build_operator_function( name, function )
-                                  , decl_type=self._impl_decl_types[ scopedef_t.member_operator ]
-                                  , return_type=return_type
-                                  , arg_types=arg_types
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive )
-    mem_oper = member_operator
-    def member_operators( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of member operator declarations, that are matched defined criterias"""
-        return self._find_multiple( self._impl_matchers[ scopedef_t.member_operator ]
-                                    , name=self._build_operator_name( name, function, symbol )
-                                    , symbol=symbol
-                                    , function=self._build_operator_function( name, function )
-                                    , decl_type=self._impl_decl_types[ scopedef_t.member_operator ]
-                                    , return_type=return_type
-                                    , arg_types=arg_types
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-    mem_opers = member_operators
-
-    def casting_operator( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to casting operator declaration, that is matched defined criterias"""
-        return self._find_single( self._impl_matchers[ scopedef_t.casting_operator ]
-                                  , name=name
-                                  , function=function
-                                  , decl_type=self._impl_decl_types[ scopedef_t.casting_operator ]
-                                  , return_type=return_type
-                                  , arg_types=arg_types
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive )
-
-    def casting_operators( self, name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of casting operator declarations, that are matched defined criterias"""
-        return self._find_multiple( self._impl_matchers[ scopedef_t.casting_operator ]
-                                    , name=name
-                                    , function=function
-                                    , decl_type=self._impl_decl_types[ scopedef_t.casting_operator ]
-                                    , return_type=return_type
-                                    , arg_types=arg_types
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-
-    def enumeration( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to enumeration declaration, that is matched defined criterias"""
-        return self._find_single( self._impl_matchers[ scopedef_t.enumeration ]
-                                  , name=name
-                                  , function=function
-                                  , decl_type=self._impl_decl_types[ scopedef_t.enumeration ]
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive)
-
-    enum = enumeration
-    """adding small aliase to enumeration method"""
-
-    def enumerations( self, name=None, function=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of enumeration declarations, that are matched defined criterias"""
-        return self._find_multiple( self._impl_matchers[ scopedef_t.enumeration ]
-                                    , name=name
-                                    , function=function
-                                    , decl_type=self._impl_decl_types[ scopedef_t.enumeration ]
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-    #adding small aliase
-    enums = enumerations
-
-    def typedef( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ):
-        """returns reference to typedef declaration, that is matched defined criterias"""
-        return self._find_single( self._impl_matchers[ scopedef_t.typedef ]
-                                  , name=name
-                                  , function=function
-                                  , decl_type=self._impl_decl_types[ scopedef_t.typedef ]
-                                  , header_dir=header_dir
-                                  , header_file=header_file
-                                  , recursive=recursive)
-
-    def typedefs( self, name=None, function=None, header_dir=None, header_file=None, recursive=None, allow_empty=None ):
-        """returns a set of typedef declarations, that are matched defined criterias"""
-        return self._find_multiple( self._impl_matchers[ scopedef_t.typedef ]
-                                    , name=name
-                                    , function=function
-                                    , decl_type=self._impl_decl_types[ scopedef_t.typedef ]
-                                    , header_dir=header_dir
-                                    , header_file=header_file
-                                    , recursive=recursive
-                                    , allow_empty=allow_empty)
-
-    def __getitem__(self, name_or_function):
-        """ Allow simple name based find of decls.  Internally just calls decls() method.
-            @param name_or_function  Name of decl to lookup or finder function.
-        """
-        return self.decls(name_or_function)
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/templates.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/templates.py
deleted file mode 100644
index 3997d85..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/templates.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-template instantiation parser
-
-This module implements all functionality necessary to parse C++ template
-instantiations.In other words this module is able to extract next information from
-the string like this C{ std::vector<int> }.
-    - name ( std::vector )
-    - list of arguments ( int )
-
-This module also defines few convenience function like L{split} and L{join}.
-"""
-
-import pattern_parser
-
-__THE_PARSER = pattern_parser.parser_t( '<', '>', ',' )
-
-def is_instantiation( decl_string ):
-    """
-    returns True if decl_string is template instantiation and False otherwise
-
-    @param decl_string: string that should be checked for pattern presence
-    @type decl_string: str
-
-    @return: bool
-    """
-    global __THE_PARSER
-    return __THE_PARSER.has_pattern( decl_string )
-
-def name( decl_string ):
-    """
-    returns name of instantiated template
-
-    @type decl_string: str
-    @return: str
-    """
-    global __THE_PARSER
-    return __THE_PARSER.name( decl_string )
-
-def args( decl_string ):
-    """
-    returns list of template arguments
-
-    @type decl_string: str
-    @return: [str]
-    """
-    global __THE_PARSER
-    return __THE_PARSER.args( decl_string )
-
-def split( decl_string ):
-    """returns (name, [arguments] )"""
-    global __THE_PARSER
-    return __THE_PARSER.split( decl_string )
-
-def split_recursive( decl_string ):
-    """returns [(name, [arguments])]"""
-    global __THE_PARSER
-    return __THE_PARSER.split_recursive( decl_string )
-
-def join( name, args ):
-    """returns name< argument_1, argument_2, ..., argument_n >"""
-    global __THE_PARSER
-    return __THE_PARSER.join( name, args )
-
-def normalize( decl_string ):
-    """returns decl_string, which contains "normalized" spaces
-
-    this functionality allows to implement comparison of 2 different string
-    which are actually same: x::y< z > and x::y<z>
-    """
-    global __THE_PARSER
-    return __THE_PARSER.normalize( decl_string )
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/type_traits.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/type_traits.py
deleted file mode 100644
index 11e8bd1..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/type_traits.py
+++ /dev/null
@@ -1,1093 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines few algorithms, that deals with different properties of C++ types
-
-Do you aware of boost::type_traits library? pygccxml has functionality similar to
-it. Using functions defined in this module you can
-    - find out some properties of the type
-    - modify type
-
-Those functions are very valuable for code generation. Almost all functions
-within this module works on L{type_t} class hierarchy and\\or L{class_t}.
-"""
-
-import os
-import types
-import matchers
-import typedef
-import calldef
-import cpptypes
-import variable
-import algorithm
-import namespace
-import templates
-import enumeration
-import class_declaration
-from pygccxml import utils
-import types as build_in_types
-
-def __remove_alias(type_):
-    """implementation details"""
-    if isinstance( type_, typedef.typedef_t ):
-        return __remove_alias( type_.type )
-    if isinstance( type_, cpptypes.declarated_t ) and isinstance( type_.declaration, typedef.typedef_t ):
-        return __remove_alias( type_.declaration.type )
-    if isinstance( type_, cpptypes.compound_t ):
-        type_.base = __remove_alias( type_.base )
-        return type_
-    return type_
-
-def remove_alias(type_):
-    """returns type without typedefs"""
-    type_ref = None
-    if isinstance( type_, cpptypes.type_t ):
-        type_ref = type_
-    elif isinstance( type_, typedef.typedef_t ):
-        type_ref = type_.type
-    else:
-        pass #not a valid input, just return it
-    if not type_ref:
-        return type_
-    if type_ref.cache.remove_alias:
-        return type_ref.cache.remove_alias
-    no_alias = __remove_alias( type_ref.clone() )
-    type_ref.cache.remove_alias = no_alias
-    return no_alias
-
-def create_cv_types( base ):
-    """implementation details"""
-    return [ base
-             , cpptypes.const_t( base )
-             , cpptypes.volatile_t( base )
-             , cpptypes.volatile_t( cpptypes.const_t( base ) ) ]
-
-def decompose_type(tp):
-    """implementation details"""
-    #implementation of this function is important
-    if isinstance( tp, cpptypes.compound_t ):
-        return [tp] + decompose_type( tp.base )
-    elif isinstance( tp, typedef.typedef_t ):
-        return decompose_type( tp.type )
-    elif isinstance( tp, cpptypes.declarated_t ) and isinstance( tp.declaration, typedef.typedef_t ):
-        return decompose_type( tp.declaration.type )
-    else:
-        return [tp]
-
-def decompose_class(type):
-    """implementation details"""
-    types = decompose_type( type )
-    return [ tp.__class__ for tp in types ]
-
-def base_type(type):
-    """returns base type.
-
-    For C{const int} will return C{int}
-    """
-    types = decompose_type( type )
-    return types[-1]
-
-def does_match_definition(given, main, secondary ):
-    """implementation details"""
-    assert isinstance( secondary, build_in_types.TupleType )
-    assert 2 == len( secondary ) #general solution could be provided
-    types = decompose_type( given )
-    if isinstance( types[0], main ):
-        return True
-    elif 2 <= len( types ) and \
-       ( ( isinstance( types[0], main ) and isinstance( types[1], secondary ) ) \
-         or ( isinstance( types[1], main ) and isinstance( types[0], secondary ) ) ):
-        return True
-    elif 3 <= len( types ):
-        classes = set( [tp.__class__ for tp in types[:3]] )
-        desired = set( [main] + list( secondary ) )
-        return classes == desired
-    else:
-        return False
-
-def is_bool( type_ ):
-    """returns True, if type represents C{bool}, False otherwise"""
-    return remove_alias( type_ ) in create_cv_types( cpptypes.bool_t() )
-
-def is_void( type ):
-    """returns True, if type represents C{void}, False otherwise"""
-    return remove_alias( type ) in create_cv_types( cpptypes.void_t() )
-
-def is_void_pointer( type ):
-    """returns True, if type represents C{void*}, False otherwise"""
-    return is_same( type, cpptypes.pointer_t( cpptypes.void_t() ) )
-
-def is_integral( type ):
-    """returns True, if type represents C++ integral type, False otherwise"""
-    integral_def = create_cv_types( cpptypes.char_t() )                    \
-                   + create_cv_types( cpptypes.unsigned_char_t() )         \
-                   + create_cv_types( cpptypes.signed_char_t() )           \
-                   + create_cv_types( cpptypes.wchar_t() )                 \
-                   + create_cv_types( cpptypes.short_int_t() )             \
-                   + create_cv_types( cpptypes.short_unsigned_int_t() )    \
-                   + create_cv_types( cpptypes.bool_t() )                  \
-                   + create_cv_types( cpptypes.int_t() )                   \
-                   + create_cv_types( cpptypes.unsigned_int_t() )          \
-                   + create_cv_types( cpptypes.long_int_t() )              \
-                   + create_cv_types( cpptypes.long_unsigned_int_t() )     \
-                   + create_cv_types( cpptypes.long_long_int_t() )         \
-                   + create_cv_types( cpptypes.long_long_unsigned_int_t() )
-
-    return remove_alias( type ) in integral_def
-
-def is_floating_point( type ):
-    """returns True, if type represents C++ floating point type, False otherwise"""
-    float_def = create_cv_types( cpptypes.float_t() )                   \
-                + create_cv_types( cpptypes.double_t() )                \
-                + create_cv_types( cpptypes.long_double_t() )
-
-    return remove_alias( type ) in float_def
-
-def is_arithmetic( type ):
-    """returns True, if type represents C++ integral or floating point type, False otherwise"""
-    return is_integral( type ) or is_floating_point( type )
-
-def is_pointer(type):
-    """returns True, if type represents C++ pointer type, False otherwise"""
-    return does_match_definition( type
-                                  , cpptypes.pointer_t
-                                  , (cpptypes.const_t, cpptypes.volatile_t) )
-
-def is_calldef_pointer(type):
-    """returns True, if type represents pointer to free/member function, False otherwise"""
-    if not is_pointer(type):
-        return False
-    nake_type = remove_alias( type )
-    nake_type = remove_const( nake_type )
-    nake_type = remove_volatile( nake_type )
-    return isinstance( nake_type, cpptypes.compound_t ) \
-           and isinstance( nake_type.base, cpptypes.calldef_type_t )
-
-def remove_pointer(type):
-    """removes pointer from the type definition
-
-    If type is not pointer type, it will be returned as is.
-    """
-    nake_type = remove_alias( type )
-    if not is_pointer( nake_type ):
-        return type
-    elif isinstance( nake_type, cpptypes.volatile_t ) and isinstance( nake_type.base, cpptypes.pointer_t ):
-        return cpptypes.volatile_t( nake_type.base.base )
-    elif isinstance( nake_type, cpptypes.const_t ) and isinstance( nake_type.base, cpptypes.pointer_t ):
-        return cpptypes.const_t( nake_type.base.base )
-    elif isinstance( nake_type.base, cpptypes.calldef_type_t ):
-        return type
-    else:
-        return nake_type.base
-
-def is_reference(type):
-    """returns True, if type represents C++ reference type, False otherwise"""
-    nake_type = remove_alias( type )
-    return isinstance( nake_type, cpptypes.reference_t )
-
-def is_array(type):
-    """returns True, if type represents C++ array type, False otherwise"""
-    nake_type = remove_alias( type )
-    nake_type = remove_reference( nake_type )
-    nake_type = remove_cv( nake_type )
-    return isinstance( nake_type, cpptypes.array_t )
-
-def array_size(type):
-    """returns array size"""
-    nake_type = remove_alias( type )
-    nake_type = remove_reference( nake_type )
-    nake_type = remove_cv( nake_type )
-    assert isinstance( nake_type, cpptypes.array_t )
-    return nake_type.size
-
-def array_item_type(type_):
-    """returns array item type"""
-    if is_array(type_):
-        type_ = remove_alias( type_ )
-        type_ = remove_cv( type_ )
-        return type_.base
-    elif is_pointer( type_ ):
-        return remove_pointer( type_ )
-    else:
-        assert 0
-
-def remove_reference(type):
-    """removes reference from the type definition
-
-    If type is not reference type, it will be returned as is.
-    """
-    nake_type = remove_alias( type )
-    if not is_reference( nake_type ):
-        return type
-    else:
-        return nake_type.base
-
-def is_const(type):
-    """returns True, if type represents C++ const type, False otherwise"""
-    nake_type = remove_alias( type )
-    return isinstance( nake_type, cpptypes.const_t )
-
-def remove_const(type):
-    """removes const from the type definition
-
-    If type is not const type, it will be returned as is
-    """
-
-    nake_type = remove_alias( type )
-    if not is_const( nake_type ):
-        return type
-    else:
-        return nake_type.base
-
-def remove_declarated( type ):
-    """removes type-declaration class-binder L{declarated_t} from the type
-
-    If type is not L{declarated_t}, it will be returned as is
-    """
-    type = remove_alias( type )
-    if isinstance( type, cpptypes.declarated_t ):
-        type = type.declaration
-    return type
-
-def is_same(type1, type2):
-    """returns True, if type1 and type2 are same types"""
-    nake_type1 = remove_declarated( type1 )
-    nake_type2 = remove_declarated( type2 )
-    return nake_type1 == nake_type2
-
-def is_volatile(type):
-    """returns True, if type represents C++ volatile type, False otherwise"""
-    nake_type = remove_alias( type )
-    return isinstance( nake_type, cpptypes.volatile_t )
-
-def remove_volatile(type):
-    """removes volatile from the type definition
-
-    If type is not volatile type, it will be returned as is
-    """
-    nake_type = remove_alias( type )
-    if not is_volatile( nake_type ):
-        return type
-    else:
-        return nake_type.base
-
-def remove_cv(type):
-    """removes const and volatile from the type definition"""
-
-    nake_type = remove_alias(type)
-    if not is_const( nake_type ) and not is_volatile( nake_type ):
-        return type
-    result = nake_type
-    if is_const( nake_type ):
-        result = nake_type.base
-    if is_volatile( result ):
-        result = result.base
-    return result
-
-def is_fundamental(type):
-    """returns True, if type represents C++ fundamental type"""
-    return does_match_definition( type
-                                  , cpptypes.fundamental_t
-                                  , (cpptypes.const_t, cpptypes.volatile_t) )
-
-class declaration_xxx_traits:
-    """this class implements the functionality needed for convinient work with
-    declaration classes
-
-    Implemented functionality:
-        - find out whether a declaration is a desired one
-        - get reference to the declaration
-    """
-    sequence = [ remove_alias, remove_cv, remove_declarated ]
-    def __init__( self, declaration_class ):
-        self.declaration_class = declaration_class
-
-    def __apply_sequence( self, type ):
-        for f in self.sequence:
-            type = f( type )
-        return type
-
-    def is_my_case( self, type ):
-        """returns True, if type represents the desired declaration, False otherwise"""
-        return isinstance( self.__apply_sequence( type ), self.declaration_class )
-
-    def get_declaration( self, type ):
-        """returns reference to the declaration
-
-        Precondition: self.is_my_case( type ) == True
-        """
-        assert self.is_my_case( type )
-        return self.__apply_sequence( type )
-
-enum_traits = declaration_xxx_traits( enumeration.enumeration_t )
-"""implements functionality, needed for convinient work with C++ enums"""
-
-is_enum = enum_traits.is_my_case
-"""returns True, if type represents C++ enumeration declaration, False otherwise"""
-
-enum_declaration = enum_traits.get_declaration
-"""returns reference to enum declaration"""
-
-class_traits = declaration_xxx_traits( class_declaration.class_t )
-"""implements functionality, needed for convinient work with C++ classes"""
-
-is_class = class_traits.is_my_case
-"""returns True, if type represents C++ class definition, False otherwise"""
-
-class_declaration_traits = declaration_xxx_traits( class_declaration.class_declaration_t )
-"""implements functionality, needed for convinient work with C++ class declarations"""
-
-is_class_declaration = class_declaration_traits.is_my_case
-"""returns True, if type represents C++ class declaration, False otherwise"""
-
-def find_trivial_constructor( type ):
-    """returns reference to trivial constructor or None"""
-    assert isinstance( type, class_declaration.class_t )
-    return type.find_trivial_constructor()
-
-def has_trivial_constructor( class_ ):
-    """if class has public trivial constructor, this function will return reference to it, None otherwise"""
-    class_ = class_traits.get_declaration( class_ )
-    trivial = class_.find_trivial_constructor()
-    if trivial and trivial.access_type == 'public':
-        return trivial
-
-def has_copy_constructor( class_ ):
-    """if class has public copy constructor, this function will return reference to it, None otherwise"""
-    class_ = class_traits.get_declaration( class_ )
-    copy_constructor = class_.find_copy_constructor()
-    if copy_constructor and copy_constructor.access_type == 'public':
-        return copy_constructor
-
-def has_destructor(class_):
-    """if class has destructor, this function will return reference to it, None otherwise"""
-    class_ = class_traits.get_declaration( class_ )
-    destructor = class_.decls( decl_type=calldef.destructor_t, recursive=False, allow_empty=True )
-    if destructor:
-        return destructor[0]
-
-def has_public_constructor(class_):
-    """if class has any public constructor, this function will return list of them, otherwise None"""
-    class_ = class_traits.get_declaration(class_)
-    decls = class_.constructors( lambda c: not c.is_copy_constructor and c.access_type == 'public'
-                                 , recursive=False, allow_empty=True )
-    if decls:
-        return decls
-
-def has_public_assign(class_):
-    """returns True, if class has public assign operator, False otherwise"""
-    class_ = class_traits.get_declaration( class_ )
-    decls = class_.mem_opers( lambda o: o.symbol == '=' and o.access_type == 'public'
-                              , recursive=False, allow_empty=True )
-    return bool( decls )
-
-def has_public_destructor(type):
-    """returns True, if class has public destructor, False otherwise"""
-    d = has_destructor( type )
-    return d and d.access_type == 'public'
-
-def is_base_and_derived( based, derived ):
-    """returns True, if there is "base and derived" relationship between classes, False otherwise"""
-    assert isinstance( based, class_declaration.class_t )
-    assert isinstance( derived, ( class_declaration.class_t, tuple ) )
-
-    all_derived = None
-    if isinstance( derived, class_declaration.class_t ):
-        all_derived = ( [derived] )
-    else: #tuple
-        all_derived = derived
-
-    for derived_cls in all_derived:
-        for base_desc in derived_cls.recursive_bases:
-            if base_desc.related_class == based:
-                return True
-    return False
-
-def has_any_non_copyconstructor( type):
-    """if class has any public constructor, which is not copy constructor, this function will return list of them, otherwise None"""
-    class_ = class_traits.get_declaration( type )
-    decls = class_.constructors( lambda c: not c.is_copy_constructor and c.access_type == 'public'
-                                 , recursive=False, allow_empty=True )
-    if decls:
-        return decls
-
-def has_public_binary_operator( type, operator_symbol ):
-    """returns True, if type has public binary operator, otherwise False"""
-    not_artificial = lambda decl: decl.is_artificial == False
-    type = remove_alias( type )
-    type = remove_cv( type )
-    type = remove_declarated( type )
-    assert isinstance( type, class_declaration.class_t )
-
-    if is_std_string( type ) or is_std_wstring( type ):
-        #In some case compare operators of std::basic_string are not instantiated
-        return True
-
-    operators = type.member_operators( function=matchers.custom_matcher_t( not_artificial ) \
-                                                & matchers.access_type_matcher_t( 'public' )
-                                       , symbol=operator_symbol
-                                       , allow_empty=True
-                                       , recursive=False )
-    if operators:
-        return True
-
-    t = cpptypes.declarated_t( type )
-    t = cpptypes.const_t( t )
-    t = cpptypes.reference_t( t )
-    operators = type.top_parent.operators( function=not_artificial
-                                           , arg_types=[t, None]
-                                           , symbol=operator_symbol
-                                           , allow_empty=True
-                                           , recursive=True )
-    if operators:
-        return True
-    for bi in type.recursive_bases:
-        assert isinstance( bi, class_declaration.hierarchy_info_t )
-        if bi.access_type != class_declaration.ACCESS_TYPES.PUBLIC:
-            continue
-        operators = bi.related_class.member_operators( function=matchers.custom_matcher_t( not_artificial ) \
-                                                             & matchers.access_type_matcher_t( 'public' )
-                                                       , symbol=operator_symbol
-                                                       , allow_empty=True
-                                                       , recursive=False )
-        if operators:
-            return True
-    return False
-
-def has_public_equal( type ):
-    """returns True, if class has public operator==, otherwise False"""
-    return has_public_binary_operator( type, '==' )
-
-def has_public_less( type ):
-    """returns True, if class has public operator<, otherwise False"""
-    return has_public_binary_operator( type, '<' )
-
-def is_unary_operator( oper ):
-    """returns True, if operator is unary operator, otherwise False"""
-    #~ definition:
-        #~ memeber in class
-          #~ ret-type operator symbol()
-          #~ ret-type operator [++ --](int)
-        #~ globally
-          #~ ret-type operator symbol( arg )
-          #~ ret-type operator [++ --](X&, int)
-    symbols = [ '!', '&', '~', '*', '+', '++', '-', '--' ]
-    if not isinstance( oper, calldef.operator_t ):
-        return False
-    if oper.symbol not in symbols:
-        return False
-    if isinstance( oper, calldef.member_operator_t ):
-        if 0 == len( oper.arguments ):
-            return True
-        elif oper.symbol in [ '++', '--' ] and isinstance( oper.arguments[0].type, cpptypes.int_t ):
-            return True
-        else:
-            return False
-    else:
-        if 1 == len( oper.arguments ):
-            return True
-        elif oper.symbol in [ '++', '--' ] \
-             and 2 == len( oper.arguments ) \
-             and isinstance( oper.arguments[1].type, cpptypes.int_t ):
-            #may be I need to add additional check whether first argument is reference or not?
-            return True
-        else:
-            return False
-
-def is_binary_operator( oper ):
-    """returns True, if operator is binary operator, otherwise False"""
-    #~ definition:
-        #~ memeber in class
-          #~ ret-type operator symbol(arg)
-        #~ globally
-          #~ ret-type operator symbol( arg1, arg2 )
-    symbols = [ ',', '()', '[]', '!=', '%', '%=', '&', '&&', '&=', '*', '*=', '+', '+='
-                , '-', '-=', '->', '->*', '/', '/=', '<', '<<', '<<=', '<='
-                , '=', '==', '>', '>=', '>>', '>>=', '^', '^=', '|', '|=', '||'
-    ]
-    if not isinstance( oper, calldef.operator_t ):
-        return False
-    if oper.symbol not in symbols:
-        return False
-    if isinstance( oper, calldef.member_operator_t ):
-        if 1 == len( oper.arguments ):
-            return True
-        else:
-            return False
-    else:
-        if 2 == len( oper.arguments ):
-            return True
-        else:
-            return False
-
-class __is_convertible_t:
-    """implementation details"""
-    def __init__( self, source, target ):
-        self.__source = self.__normalize( source )
-        self.__target = self.__normalize( target )
-
-    def __find_class_by_class_declaration( self, class_decl ):
-        found = algorithm.find_declaration( class_decl.parent.declarations
-                                            , name=class_decl.name
-                                            , type=class_declaration.class_t )
-        return found
-
-    def __normalize( self, type_ ):
-        type_ = remove_alias( type_ )
-        bt_of_type = base_type( type_ )
-        if isinstance( bt_of_type, cpptypes.declarated_t ) \
-           and isinstance( bt_of_type.declaration, class_declaration.class_declaration_t ):
-            type_ = type_.clone()
-            bt_of_type = base_type( type_ )
-            bt_of_type.declaration = self.__find_class_by_class_declaration( bt_of_type.declaration )
-        return type_
-
-    def __test_trivial( self, source, target ):
-        if not ( source and target ):
-            return False
-        if is_same( source, target ):
-            return True #X => X
-        if is_const( target ) and is_same( source, target.base ):
-            return True #X => const X
-        if is_reference( target ) and is_same( source, target.base ):
-            return True #X => X&
-        if is_reference( target ) and is_const( target.base ) and is_same( source, target.base.base ):
-            return True #X => const X&
-        if is_same( target, cpptypes.pointer_t( cpptypes.void_t() ) ):
-            if is_integral( source ) or is_enum( source ):
-                return False
-            else:
-                return True #X => void*
-        if is_pointer( source ) and is_pointer( target ):
-            if is_const( target.base ) and is_same( source.base, target.base.base ):
-                return True#X* => const X*
-        if is_reference( source ) and is_reference( target ):
-            if is_const( target.base ) and is_same( source.base, target.base.base ):
-                return True#X& => const X&
-        if not is_const( source ) and is_array( source ) and is_pointer( target ):
-            if is_same( base_type(source), target.base ):
-                return True#X[2] => X*
-        if is_array( source ) and is_pointer( target ) and is_const( target.base ):
-            if is_same( base_type(source), target.base.base ):
-                return True
-
-    def __test_pointer_to_func_or_mv__to__func_or_mv( self, source, target ):
-        if is_pointer( source ) \
-           and is_reference( target ) \
-           and isinstance( target.base
-                           , ( cpptypes.free_function_type_t
-                               , cpptypes.member_function_type_t
-                               , cpptypes.member_variable_type_t ) ) \
-           and is_same( source.base, target.base ):
-                return True
-
-        if is_pointer( source ) \
-           and isinstance( target
-                           , ( cpptypes.free_function_type_t
-                               , cpptypes.member_function_type_t
-                               , cpptypes.member_variable_type_t ) ) \
-           and is_same( source.base, target ):
-                return True
-
-        if is_pointer( target ) \
-           and is_reference( source ) \
-           and isinstance( source.base
-                           , ( cpptypes.free_function_type_t
-                               , cpptypes.member_function_type_t
-                               , cpptypes.member_variable_type_t ) ) \
-           and is_same( source.base, target.base ):
-                return True
-
-        if is_pointer( target ) \
-           and isinstance( source
-                           , ( cpptypes.free_function_type_t
-                               , cpptypes.member_function_type_t
-                               , cpptypes.member_variable_type_t ) ) \
-           and is_same( target.base, source ):
-                return True
-
-
-    def __test_const_x_ref__to__x( self, source, target ):
-        if not is_reference( source ) \
-           or not is_const( source.base ) \
-           or not is_same( source.base.base, target ):
-            return False
-        if is_fundamental( target ):
-            return True
-        if is_enum( target ):
-            return True
-        if isinstance( target, cpptypes.declarated_t ):
-            assert isinstance( target.declaration, class_declaration.class_t )
-            if has_copy_constructor( target.declaration ):
-                return True #we have copy constructor
-        return False
-
-    def __test_const_ref_x__to__y(self, source, target):
-        if not is_reference( source ) or not is_const( source.base ):
-            return False
-        if is_fundamental( source.base.base ) and is_fundamental( target ):
-            return True
-        if is_convertible( source.base.base, cpptypes.int_t() ) and is_enum( target ):
-            return True
-        if isinstance( target, cpptypes.declarated_t ):
-            assert isinstance( target.declaration, class_declaration.class_t )
-            if has_copy_constructor( target.declaration ):
-                return True #we have copy constructor
-        return False
-
-    def __test_ref_x__to__x( self, source, target ):
-        if not is_reference( source ) or not is_same( source.base, target ):
-            return False
-        if is_fundamental( target ):
-            return True
-        if is_enum( target ):
-            return True
-        if isinstance( target, cpptypes.declarated_t ):
-            assert isinstance( target.declaration, class_declaration.class_t )
-            if has_copy_constructor( target.declaration ):
-                return True #we have copy constructor
-        return False
-
-    def __test_ref_x__to__y(self, source, target):
-        if not is_reference( source ):
-            return False
-        if is_fundamental( source.base ) and is_fundamental( target ):
-            return True
-        if is_convertible( source.base, cpptypes.int_t() ) and is_enum( target ):
-            return True
-        if isinstance( target, cpptypes.declarated_t ):
-            assert isinstance( target.declaration, class_declaration.class_t )
-            if has_copy_constructor( target.declaration ):
-                return True #we have copy constructor
-        return False
-
-    def __test_fundamental__to__fundamental(self, source, target):
-        if not is_fundamental( base_type( source ) ) or not is_fundamental( base_type( target ) ):
-            return False
-        if is_void( base_type( source ) ) or is_void( base_type( target ) ):
-            return False
-        if is_fundamental( source ) and is_fundamental( target ):
-            return True
-        if not is_pointer( source ) and is_fundamental( target ):
-            return True
-        if not is_pointer( source ) and is_const( target ) and is_fundamental( target.base ):
-            return True
-        if is_fundamental( source ) \
-           and is_reference( target ) \
-           and is_const( target.base ) \
-           and is_fundamental( target.base.base ):
-            return True #X => const Y&
-        return False
-
-    def __test_derived_to_based( self, source, target ):
-        derived = base_type( source )
-        base = base_type( target )
-        if not ( isinstance( derived, cpptypes.declarated_t ) \
-                 and isinstance( derived.declaration, class_declaration.class_t ) ):
-            return False
-        if not ( isinstance( base, cpptypes.declarated_t ) \
-                 and isinstance( base.declaration, class_declaration.class_t ) ):
-            return False
-        base = base.declaration
-        derived = derived.declaration
-        if not is_base_and_derived( base, derived ):
-            return False
-        for b in derived.recursive_bases:
-            if ( b.related_class is base ) and b.access_type != class_declaration.ACCESS_TYPES.PRIVATE:
-                break
-        else:
-            return False
-
-        base = target
-        derived = source
-        is_both_declarated = lambda x, y: isinstance( x, cpptypes.declarated_t ) \
-                                          and isinstance( y, cpptypes.declarated_t )
-        #d => b
-        if is_both_declarated( base, derived ):
-            return True
-        #d* => b*
-        if is_pointer( derived ) and is_pointer( base ) \
-           and is_both_declarated( base.base, derived.base ):
-            return True
-        #const d* => const b*
-        if is_pointer( derived ) and is_pointer( base ) \
-           and is_const( derived.base ) and is_const( base.base ) \
-           and is_both_declarated( base.base.base, derived.base.base ):
-            return True
-        #d* => const b*
-        if is_pointer( derived ) and is_pointer( base ) \
-           and is_const( derived.base )\
-           and is_both_declarated( base.base.base, derived.base ):
-            return True
-
-        #d& => b&
-        if is_reference( derived ) and is_reference( base ) \
-           and is_both_declarated( base.base, derived.base ):
-            return True
-        #const d& => const b&
-        if is_reference( derived ) and is_reference( base ) \
-           and is_const( derived.base ) and is_const( base.base ) \
-           and is_both_declarated( base.base.base, derived.base.base ):
-            return True
-        #d& => const b&
-        if is_reference( derived ) and is_reference( base ) \
-           and is_const( derived.base )\
-           and is_both_declarated( base.base.base, derived.base ):
-            return True
-        return False
-
-    def is_convertible( self ):
-        source = self.__source
-        target = self.__target
-
-        if self.__test_trivial(source, target):
-            return True
-        if is_array( source ) or is_array( target ):
-            return False
-        if self.__test_const_x_ref__to__x(source, target):
-            return True
-        if self.__test_const_ref_x__to__y(source, target):
-            return True
-        if self.__test_ref_x__to__x(source, target):
-            return True
-        if self.__test_ref_x__to__y(source, target):
-            return True
-        if self.__test_fundamental__to__fundamental( source, target ):
-            return True
-        if self.__test_pointer_to_func_or_mv__to__func_or_mv( source, target ):
-            return True
-        if self.__test_derived_to_based( source, target ):
-            return True
-
-        if isinstance( source, cpptypes.declarated_t ):
-            if isinstance( source.declaration, enumeration.enumeration_t ) \
-               and is_fundamental( target ) \
-               and not is_void( target ):
-                return True # enum could be converted to any integral type
-
-            if isinstance( source.declaration, class_declaration.class_t ):
-                source_inst = source.declaration
-                #class instance could be convertible to something else if it has operator
-                casting_operators = algorithm.find_all_declarations( source_inst.declarations
-                                                                     , type=calldef.casting_operator_t
-                                                                     , recursive=False )
-                if casting_operators:
-                    for operator in casting_operators:
-                        if is_convertible( operator.return_type, target ):
-                            return True
-
-        #may be target is class too, so in this case we should check whether is
-        #has constructor from source
-        if isinstance( target, cpptypes.declarated_t ):
-            if isinstance( target.declaration, class_declaration.class_t ):
-                constructors = algorithm.find_all_declarations( target.declaration.declarations
-                                                                , type=calldef.constructor_t
-                                                                , recursive=False )
-                if constructors:
-                    for constructor in constructors:
-                        if 1 != len( constructor.arguments ):
-                            continue
-                        #TODO: add test to check explicitness
-                        if is_convertible( source, constructor.arguments[0].type ):
-                            return True
-
-        return False
-
-def is_convertible( source, target ):
-    """returns True, if source could be converted to target, otherwise False"""
-    return __is_convertible_t( source, target ).is_convertible()
-
-def __is_noncopyable_single( class_):
-    """implementation details"""
-    #It is not enough to check base classes, we should also to check
-    #member variables.
-    logger = utils.loggers.cxx_parser
-
-    if has_copy_constructor( class_ ) \
-       and has_public_constructor( class_ ) \
-       and has_public_assign( class_ ) \
-       and has_public_destructor( class_ ):
-        msg = os.linesep.join([
-            "__is_noncopyable_single - %s - COPYABLE:" % class_.decl_string
-            , "    trivial copy constructor: yes"
-            , "    public constructor: yes"
-            , "    public assign: yes"
-            , "    public destructor: yes"
-        ])
-        logger.debug( msg )
-        return False
-    if class_.find_noncopyable_vars():
-        logger.debug( "__is_noncopyable_single(TRUE) - %s - contains noncopyable members" % class_.decl_string )
-        return True
-    else:
-        logger.debug( "__is_noncopyable_single(FALSE) - %s - COPYABLE, because is doesn't contains noncopyable members" % class_.decl_string )
-        return False
-
-def is_noncopyable( class_ ):
-    """returns True, if class is noncopyable, False otherwise"""
-    logger = utils.loggers.cxx_parser
-    class_ = class_traits.get_declaration( class_ )
-
-    true_header = "is_noncopyable(TRUE) - %s - " % class_.decl_string
-    false_header = "is_noncopyable(false) - %s - " % class_.decl_string
-
-    if class_.class_type == class_declaration.CLASS_TYPES.UNION:
-        return False
-
-    if class_.is_abstract:
-        logger.debug( true_header + "abstract client" )
-        return True
-
-    #if class has public, user defined copy constructor, than this class is
-    #copyable
-    copy_ = class_.find_copy_constructor()
-    if copy_ and copy_.access_type == 'public' and not copy_.is_artificial:
-        return False
-
-    for base_desc in class_.recursive_bases:
-        assert isinstance( base_desc, class_declaration.hierarchy_info_t )
-        if base_desc.related_class.decl_string in ('::boost::noncopyable', '::boost::noncopyable_::noncopyable' ):
-            logger.debug( true_header + "derives from boost::noncopyable" )
-            return True
-        if not has_copy_constructor( base_desc.related_class ):
-            base_copy_ = base_desc.related_class.find_copy_constructor()
-            if base_copy_:
-                if base_copy_.access_type == 'private':
-                    logger.debug( true_header + "there is private copy constructor" )
-                    return True
-            else:
-                if __is_noncopyable_single( base_desc.related_class ):
-                    logger.debug( true_header + "__is_noncopyable_single returned True" )
-                    return True
-        if __is_noncopyable_single( base_desc.related_class ):
-            logger.debug( true_header + "__is_noncopyable_single returned True" )
-            return True
-
-    if not has_copy_constructor( class_ ):
-        logger.debug( true_header + "does not have trival copy constructor" )
-        return True
-    elif not has_public_constructor( class_ ):
-        logger.debug( true_header + "does not have a public constructor" )
-        return True
-    elif has_destructor( class_ ) and not has_public_destructor( class_ ):
-        logger.debug( true_header + "has private destructor")
-        return True
-    else:
-        return __is_noncopyable_single( class_ )
-
-def is_defined_in_xxx( xxx, cls ):
-    """small helper function, that checks whether class ( C{cls} ) is defined
-    under C{::xxx} namespace"""
-    if not cls.parent:
-        return False
-
-    if not isinstance( cls.parent, namespace.namespace_t ):
-        return False
-
-    if xxx != cls.parent.name:
-        return False
-
-    xxx_ns = cls.parent
-    if not xxx_ns.parent:
-        return False
-
-    if not isinstance( xxx_ns.parent, namespace.namespace_t ):
-        return False
-
-    if '::' != xxx_ns.parent.name:
-        return False
-
-    global_ns = xxx_ns.parent
-    return None is global_ns.parent
-
-class impl_details:
-    """implementation details"""
-    @staticmethod
-    def is_defined_in_xxx( xxx, cls ):
-        """implementation details"""
-        if not cls.parent:
-            return False
-
-        if not isinstance( cls.parent, namespace.namespace_t ):
-            return False
-
-        if xxx != cls.parent.name:
-            return False
-
-        xxx_ns = cls.parent
-        if not xxx_ns.parent:
-            return False
-
-        if not isinstance( xxx_ns.parent, namespace.namespace_t ):
-            return False
-
-        if '::' != xxx_ns.parent.name:
-            return False
-
-        global_ns = xxx_ns.parent
-        return None is global_ns.parent
-
-    @staticmethod
-    def find_value_type( global_ns, value_type_str ):
-        """implementation details"""
-        if not value_type_str.startswith( '::' ):
-            value_type_str = '::' + value_type_str
-        found = global_ns.decls( name=value_type_str
-                                 , function=lambda decl: not isinstance( decl, calldef.calldef_t )
-                                 ,  allow_empty=True )
-        if not found:
-            no_global_ns_value_type_str = value_type_str[2:]
-            if cpptypes.FUNDAMENTAL_TYPES.has_key( no_global_ns_value_type_str ):
-                return cpptypes.FUNDAMENTAL_TYPES[ no_global_ns_value_type_str ]
-            elif is_std_string( value_type_str ):
-                string_ = global_ns.typedef( '::std::string' )
-                return remove_declarated( string_ )
-            elif is_std_wstring( value_type_str ):
-                string_ = global_ns.typedef( '::std::wstring' )
-                return remove_declarated( string_ )
-            else:
-                value_type_str = no_global_ns_value_type_str
-                has_const = value_type_str.startswith( 'const ' )
-                if has_const:
-                    value_type_str = value_type_str[ len('const '): ]
-                has_pointer = value_type_str.endswith( '*' )
-                if has_pointer:
-                    value_type_str = value_type_str[:-1]
-                found = None
-                if has_const or has_pointer:
-                    found = impl_details.find_value_type( global_ns, value_type_str )
-                if not found:
-                    return None
-                else:
-                    if isinstance( found, class_declaration.class_types ):
-                        found = cpptypes.declarated_t( found )
-                    if has_const:
-                        found = cpptypes.const_t( found )
-                    if has_pointer:
-                        found = cpptypes.pointer_t( found )
-                    return found
-        if len( found ) == 1:
-            return found[0]
-        else:
-            return None
-
-class smart_pointer_traits:
-    """implements functionality, needed for convinient work with smart pointers"""
-
-    @staticmethod
-    def is_smart_pointer( type ):
-        """returns True, if type represents instantiation of C{boost::shared_ptr}, False otherwise"""
-        type = remove_alias( type )
-        type = remove_cv( type )
-        type = remove_declarated( type )
-        if not isinstance( type, ( class_declaration.class_declaration_t, class_declaration.class_t ) ):
-            return False
-        if not impl_details.is_defined_in_xxx( 'boost', type ):
-            return False
-        return type.decl_string.startswith( '::boost::shared_ptr<' )
-
-    @staticmethod
-    def value_type( type ):
-        """returns reference to boost::shared_ptr value type"""
-        if not smart_pointer_traits.is_smart_pointer( type ):
-            raise TypeError( 'Type "%s" is not instantiation of boost::shared_ptr' % type.decl_string )
-        type = remove_alias( type )
-        cls = remove_cv( type )
-        cls = remove_declarated( type )
-        if isinstance( cls, class_declaration.class_t ):
-            return remove_declarated( cls.typedef( "value_type", recursive=False ).type )
-        elif not isinstance( cls, ( class_declaration.class_declaration_t, class_declaration.class_t ) ):
-            raise RuntimeError( "Unable to find out shared_ptr value type. shared_ptr class is: %s" % cls.decl_string )
-        else:
-            value_type_str = templates.args( cls.name )[0]
-            ref = impl_details.find_value_type( cls.top_parent, value_type_str )
-            if None is ref:
-                raise RuntimeError( "Unable to find out shared_ptr value type. shared_ptr class is: %s" % cls.decl_string )
-            return ref
-
-class auto_ptr_traits:
-    """implements functionality, needed for convinient work with std::auto_ptr pointers"""
-
-    @staticmethod
-    def is_smart_pointer( type ):
-        """returns True, if type represents instantiation of C{boost::shared_ptr}, False otherwise"""
-        type = remove_alias( type )
-        type = remove_cv( type )
-        type = remove_declarated( type )
-        if not isinstance( type, ( class_declaration.class_declaration_t, class_declaration.class_t ) ):
-            return False
-        if not impl_details.is_defined_in_xxx( 'std', type ):
-            return False
-        return type.decl_string.startswith( '::std::auto_ptr<' )
-
-    @staticmethod
-    def value_type( type ):
-        """returns reference to boost::shared_ptr value type"""
-        if not auto_ptr_traits.is_smart_pointer( type ):
-            raise TypeError( 'Type "%s" is not instantiation of std::auto_ptr' % type.decl_string )
-        type = remove_alias( type )
-        cls = remove_cv( type )
-        cls = remove_declarated( type )
-        if isinstance( cls, class_declaration.class_t ):
-            return remove_declarated( cls.typedef( "element_type", recursive=False ).type )
-        elif not isinstance( cls, ( class_declaration.class_declaration_t, class_declaration.class_t ) ):
-            raise RuntimeError( "Unable to find out auto_ptr value type. auto_ptr class is: %s" % cls.decl_string )
-        else:
-            value_type_str = templates.args( cls.name )[0]
-            ref = impl_details.find_value_type( cls.top_parent, value_type_str )
-            if None is ref:
-                raise RuntimeError( "Unable to find out auto_ptr value type. shared_ptr class is: %s" % cls.decl_string )
-            return ref
-
-
-def is_std_string( type ):
-    """returns True, if type represents C++ std::string, False otherwise"""
-    decl_strings = [
-        '::std::basic_string<char,std::char_traits<char>,std::allocator<char> >'
-        , '::std::basic_string<char, std::char_traits<char>, std::allocator<char> >'
-        , '::std::string' ]
-    if isinstance( type, types.StringTypes ):
-        return type in decl_strings
-    else:
-        type = remove_alias( type )
-        return remove_cv( type ).decl_string in decl_strings
-
-def is_std_wstring( type ):
-    """returns True, if type represents C++ std::wstring, False otherwise"""
-    decl_strings = [
-        '::std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >'
-        , '::std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >'
-        , '::std::wstring' ]
-    if isinstance( type, types.StringTypes ):
-        return type in decl_strings
-    else:
-        type = remove_alias( type )
-        return remove_cv( type ).decl_string in decl_strings
-
-def is_std_ostream( type ):
-    """returns True, if type represents C++ std::string, False otherwise"""
-    decl_strings = [
-        '::std::basic_ostream<char, std::char_traits<char> >'
-        , '::std::basic_ostream<char,std::char_traits<char> >'
-        , '::std::ostream' ]
-    if isinstance( type, types.StringTypes ):
-        return type in decl_strings
-    else:
-        type = remove_alias( type )
-        return remove_cv( type ).decl_string in decl_strings
-
-
-def is_std_wostream( type ):
-    """returns True, if type represents C++ std::string, False otherwise"""
-    decl_strings = [
-        '::std::basic_ostream<wchar_t, std::char_traits<wchar_t> >'
-        , '::std::basic_ostream<wchar_t,std::char_traits<wchar_t> >'
-        , '::std::wostream' ]
-    if isinstance( type, types.StringTypes ):
-        return type in decl_strings
-    else:
-        type = remove_alias( type )
-        return remove_cv( type ).decl_string in decl_strings
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/type_visitor.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/type_visitor.py
deleted file mode 100644
index 619149f..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/type_visitor.py
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines types visitor class interface
-"""
-
-class type_visitor_t(object):
-    """
-    types visitor interface
-
-    All functions within this class should be redefined in derived classes.
-    """
-    def __init__(self):
-        object.__init__(self)
-
-    def visit_void( self ):
-        raise NotImplementedError()
-
-    def visit_char( self ):
-        raise NotImplementedError()
-
-    def visit_unsigned_char( self ):
-        raise NotImplementedError()
-
-    def visit_signed_char( self ):
-        raise NotImplementedError()
-
-    def visit_wchar( self ):
-        raise NotImplementedError()
-
-    def visit_short_int( self ):
-        raise NotImplementedError()
-
-    def visit_short_unsigned_int( self ):
-        raise NotImplementedError()
-
-    def visit_bool( self ):
-        raise NotImplementedError()
-
-    def visit_int( self ):
-        raise NotImplementedError()
-
-    def visit_unsigned_int( self ):
-        raise NotImplementedError()
-
-    def visit_long_int( self ):
-        raise NotImplementedError()
-
-    def visit_long_unsigned_int( self ):
-        raise NotImplementedError()
-
-    def visit_long_long_int( self ):
-        raise NotImplementedError()
-
-    def visit_long_long_unsigned_int( self ):
-        raise NotImplementedError()
-
-    def visit_float( self ):
-        raise NotImplementedError()
-
-    def visit_double( self ):
-        raise NotImplementedError()
-
-    def visit_long_double( self ):
-        raise NotImplementedError()
-
-    def visit_complex_long_double(self):
-        raise NotImplementedError()
-
-    def visit_complex_double(self):
-        raise NotImplementedError()
-
-    def visit_complex_float(self):
-        raise NotImplementedError()
-
-    def visit_jbyte(self):
-        raise NotImplementedError()
-
-    def visit_jshort(self):
-        raise NotImplementedError()
-
-    def visit_jint(self):
-        raise NotImplementedError()
-
-    def visit_jlong(self):
-        raise NotImplementedError()
-
-    def visit_jfloat(self):
-        raise NotImplementedError()
-
-    def visit_jdouble(self):
-        raise NotImplementedError()
-
-    def visit_jchar(self):
-        raise NotImplementedError()
-
-    def visit_jboolean(self):
-        raise NotImplementedError()
-
-    def visit_volatile( self ):
-        raise NotImplementedError()
-
-    def visit_const( self ):
-        raise NotImplementedError()
-
-    def visit_pointer( self ):
-        raise NotImplementedError()
-
-    def visit_reference( self ):
-        raise NotImplementedError()
-
-    def visit_array( self ):
-        raise NotImplementedError()
-
-    def visit_free_function_type( self ):
-        raise NotImplementedError()
-
-    def visit_member_function_type( self ):
-        raise NotImplementedError()
-
-    def visit_member_variable_type( self ):
-        raise NotImplementedError()
-
-    def visit_declarated( self ):
-        raise NotImplementedError()
-
-    def visit_restrict( self ):
-        raise NotImplementedError()
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/variable.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/variable.py
deleted file mode 100644
index 3b32b9b..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/declarations/variable.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines class that describes C++ global and member variable declaration
-"""
-
-import declaration
-import dependencies
-import class_declaration
-
-class variable_t( declaration.declaration_t ):
-    """describes C++ global and member variable declaration"""
-
-    def __init__( self, name='', type=None, type_qualifiers=None, value=None, bits=None):
-        """creates class that describes C++ global or member variable"""
-        declaration.declaration_t.__init__( self, name )
-        self._type = type
-        self._type_qualifiers = type_qualifiers
-        self._value = value
-        self._bits = bits
-        self._byte_offset = 0
-
-    def _get__cmp__items( self ):
-        """implementation details"""
-        return [ self.type, self.type_qualifiers, self.value ]
-
-    def __eq__(self, other):
-        """implementation details"""
-        if not declaration.declaration_t.__eq__( self, other ):
-            return False
-        return self.type == other.type \
-               and self.type_qualifiers == other.type_qualifiers \
-               and self.value == other.value \
-               and self.bits == other.bits
-
-    def _get_type(self):
-        return self._type
-    def _set_type(self, type):
-        self._type = type
-    type = property( _get_type, _set_type
-                     , doc="reference to the variable L{type<type_t>}"    )
-
-    def _get_type_qualifiers(self):
-        return self._type_qualifiers
-    def _set_type_qualifiers(self, type_qualifiers):
-        self._type_qualifiers = type_qualifiers
-    type_qualifiers = property( _get_type_qualifiers, _set_type_qualifiers
-                                , doc="reference to the L{type_qualifiers_t} instance" )
-
-    def _get_value(self):
-        return self._value
-    def _set_value(self, value):
-        self._value = value
-    value = property( _get_value, _set_value
-                      , doc="string, that contains the variable value"    )
-
-    def _get_bits(self):
-        return self._bits
-    def _set_bits(self, bits):
-        self._bits = bits
-    bits = property( _get_bits, _set_bits
-                     , doc="integer, that contains information about how many bit takes bit field")
-
-    def _get_byte_offset(self):
-        return self._byte_offset
-    def _set_byte_offset(self, byte_offset):
-        self._byte_offset = byte_offset
-    byte_offset = property( _get_byte_offset, _set_byte_offset
-                            , doc="integer, offset of the field from the beginning of class.")
-
-
-    @property
-    def access_type(self):
-        if not isinstance( self.parent, class_declaration.class_t ):
-            raise RuntimeError( "access_type functionality only available on member variables and not on global variables" )
-        return self.parent.find_out_member_access_type( self )
-
-    def i_depend_on_them( self, recursive=True ):
-        return [ dependencies.dependency_info_t( self, self.type ) ]
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/bsc_impl_details.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/bsc_impl_details.py
deleted file mode 100644
index a92779d..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/bsc_impl_details.py
+++ /dev/null
@@ -1,568 +0,0 @@
-import os
-import sys
-import ctypes
-import logging
-import msvc_details
-from ctypes import *
-from ctypes.wintypes import ULONG
-from ctypes.wintypes import DWORD
-from ctypes.wintypes import BOOL
-from ctypes.wintypes import BYTE
-from ctypes.wintypes import WORD
-from ctypes.wintypes import UINT
-
-sys.path.append( r'../..' )
-
-from pygccxml import utils
-from pygccxml import declarations
-
-
-STRING = c_char_p
-_libraries = {}
-_libraries['msvcr70.dll'] = CDLL(msvc_details.msvcr_path, mode=RTLD_GLOBAL)
-_libraries['msbsc70.dll'] = CDLL(msvc_details.msbsc_path, mode=RTLD_GLOBAL)
-
-
-qyMac = 9
-refreshAllOp = 4
-qyDervOf = 7
-delOp = 1
-qyImpMembers = 8
-changeOp = 2
-qyRefs = 4
-qyCalls = 2
-changeIinstOp = 3
-qyContains = 1
-qyCalledBy = 3
-noOp = 5
-qyBaseOf = 6
-qyNil = 0
-addOp = 0
-qyDefs = 5
-PULONG = POINTER(ULONG)
-USHORT = c_ushort
-PUSHORT = POINTER(USHORT)
-UCHAR = c_ubyte
-PUCHAR = POINTER(UCHAR)
-PSZ = STRING
-FLOAT = c_float
-PFLOAT = POINTER(FLOAT)
-PBOOL = POINTER(BOOL)
-LPBOOL = POINTER(BOOL)
-PBYTE = POINTER(BYTE)
-LPBYTE = POINTER(BYTE)
-PINT = POINTER(c_int)
-LPINT = POINTER(c_int)
-PWORD = POINTER(WORD)
-LPWORD = POINTER(WORD)
-LPLONG = POINTER(c_long)
-PDWORD = POINTER(DWORD)
-LPDWORD = POINTER(DWORD)
-LPVOID = c_void_p
-LPCVOID = c_void_p
-INT = c_int
-PUINT = POINTER(c_uint)
-ULONG_PTR = POINTER(ULONG)
-NI = ULONG
-IINST = ULONG
-IREF = ULONG
-IDEF = ULONG
-IMOD = USHORT
-LINE = USHORT
-TYP = BYTE
-ATR = USHORT
-ATR32 = ULONG
-MBF = ULONG
-SZ = STRING
-SZ_CONST = STRING
-
-class Bsc(Structure):
-    pass
-
-# values for enumeration 'OPERATION'
-OPERATION = c_int # enum
-class IinstInfo(Structure):
-    pass
-IinstInfo._fields_ = [
-    ('m_iinst', IINST),
-    ('m_szName', SZ_CONST),
-    ('m_ni', NI),
-]
-class BSC_STAT(Structure):
-    pass
-BSC_STAT._fields_ = [
-    ('cDef', ULONG),
-    ('cRef', ULONG),
-    ('cInst', ULONG),
-    ('cMod', ULONG),
-    ('cUseLink', ULONG),
-    ('cBaseLink', ULONG),
-]
-class NiQ(Structure):
-    pass
-NiQ._fields_ = [
-    ('m_iinstOld', IINST),
-    ('m_iInfoNew', IinstInfo),
-    ('m_op', OPERATION),
-    ('m_typ', TYP),
-]
-pfnNotifyChange = CFUNCTYPE(BOOL, POINTER(NiQ), ULONG, ULONG_PTR)
-
-# values for enumeration '_qy_'
-_qy_ = c_int # enum
-QY = _qy_
-Bsc._fields_ = [
-]
-BSCOpen = _libraries['msbsc70.dll'].BSCOpen
-BSCOpen.restype = BOOL
-BSCOpen.argtypes = [SZ_CONST, POINTER(POINTER(Bsc))]
-BSCClose = _libraries['msbsc70.dll'].BSCClose
-BSCClose.restype = BOOL
-BSCClose.argtypes = [POINTER(Bsc)]
-BSCIinstInfo = _libraries['msbsc70.dll'].BSCIinstInfo
-BSCIinstInfo.restype = BOOL
-BSCIinstInfo.argtypes = [POINTER(Bsc), IINST, POINTER(SZ), POINTER(TYP), POINTER(ATR)]
-BSCIrefInfo = _libraries['msbsc70.dll'].BSCIrefInfo
-BSCIrefInfo.restype = BOOL
-BSCIrefInfo.argtypes = [POINTER(Bsc), IREF, POINTER(SZ), POINTER(LINE)]
-BSCIdefInfo = _libraries['msbsc70.dll'].BSCIdefInfo
-BSCIdefInfo.restype = BOOL
-BSCIdefInfo.argtypes = [POINTER(Bsc), IDEF, POINTER(SZ), POINTER(LINE)]
-BSCImodInfo = _libraries['msbsc70.dll'].BSCImodInfo
-BSCImodInfo.restype = BOOL
-BSCImodInfo.argtypes = [POINTER(Bsc), IMOD, POINTER(SZ)]
-BSCSzFrTyp = _libraries['msbsc70.dll'].BSCSzFrTyp
-BSCSzFrTyp.restype = SZ
-BSCSzFrTyp.argtypes = [POINTER(Bsc), TYP]
-BSCSzFrAtr = _libraries['msbsc70.dll'].BSCSzFrAtr
-BSCSzFrAtr.restype = SZ
-BSCSzFrAtr.argtypes = [POINTER(Bsc), ATR]
-BSCGetIinstByvalue = _libraries['msbsc70.dll'].BSCGetIinstByvalue
-BSCGetIinstByvalue.restype = BOOL
-BSCGetIinstByvalue.argtypes = [POINTER(Bsc), SZ, TYP, ATR, POINTER(IINST)]
-BSCGetOverloadArray = _libraries['msbsc70.dll'].BSCGetOverloadArray
-BSCGetOverloadArray.restype = BOOL
-BSCGetOverloadArray.argtypes = [POINTER(Bsc), SZ, MBF, POINTER(POINTER(IINST)), POINTER(ULONG)]
-BSCGetUsedByArray = _libraries['msbsc70.dll'].BSCGetUsedByArray
-BSCGetUsedByArray.restype = BOOL
-BSCGetUsedByArray.argtypes = [POINTER(Bsc), IINST, MBF, POINTER(POINTER(IINST)), POINTER(ULONG)]
-BSCGetUsesArray = _libraries['msbsc70.dll'].BSCGetUsesArray
-BSCGetUsesArray.restype = BOOL
-BSCGetUsesArray.argtypes = [POINTER(Bsc), IINST, MBF, POINTER(POINTER(IINST)), POINTER(ULONG)]
-BSCGetBaseArray = _libraries['msbsc70.dll'].BSCGetBaseArray
-BSCGetBaseArray.restype = BOOL
-BSCGetBaseArray.argtypes = [POINTER(Bsc), IINST, POINTER(POINTER(IINST)), POINTER(ULONG)]
-BSCGetDervArray = _libraries['msbsc70.dll'].BSCGetDervArray
-BSCGetDervArray.restype = BOOL
-BSCGetDervArray.argtypes = [POINTER(Bsc), IINST, POINTER(POINTER(IINST)), POINTER(ULONG)]
-BSCGetMembersArray = _libraries['msbsc70.dll'].BSCGetMembersArray
-BSCGetMembersArray.restype = BOOL
-BSCGetMembersArray.argtypes = [POINTER(Bsc), IINST, MBF, POINTER(POINTER(IINST)), POINTER(ULONG)]
-BSCGetDefArray = _libraries['msbsc70.dll'].BSCGetDefArray
-BSCGetDefArray.restype = BOOL
-BSCGetDefArray.argtypes = [POINTER(Bsc), IINST, POINTER(POINTER(IREF)), POINTER(ULONG)]
-BSCGetRefArray = _libraries['msbsc70.dll'].BSCGetRefArray
-BSCGetRefArray.restype = BOOL
-BSCGetRefArray.argtypes = [POINTER(Bsc), IINST, POINTER(POINTER(IREF)), POINTER(ULONG)]
-BSCGetModuleContents = _libraries['msbsc70.dll'].BSCGetModuleContents
-BSCGetModuleContents.restype = BOOL
-BSCGetModuleContents.argtypes = [POINTER(Bsc), IMOD, MBF, POINTER(POINTER(IINST)), POINTER(ULONG)]
-BSCGetModuleByName = _libraries['msbsc70.dll'].BSCGetModuleByName
-BSCGetModuleByName.restype = BOOL
-BSCGetModuleByName.argtypes = [POINTER(Bsc), SZ, POINTER(IMOD)]
-BSCGetAllModulesArray = _libraries['msbsc70.dll'].BSCGetAllModulesArray
-BSCGetAllModulesArray.restype = BOOL
-BSCGetAllModulesArray.argtypes = [POINTER(Bsc), POINTER(POINTER(IMOD)), POINTER(ULONG)]
-BSCDisposeArray = _libraries['msbsc70.dll'].BSCDisposeArray
-BSCDisposeArray.restype = None
-BSCDisposeArray.argtypes = [POINTER(Bsc), c_void_p]
-BSCFormatDname = _libraries['msbsc70.dll'].BSCFormatDname
-BSCFormatDname.restype = SZ
-BSCFormatDname.argtypes = [POINTER(Bsc), SZ]
-BSCFInstFilter = _libraries['msbsc70.dll'].BSCFInstFilter
-BSCFInstFilter.restype = BOOL
-BSCFInstFilter.argtypes = [POINTER(Bsc), IINST, MBF]
-BSCIinstFrIref = _libraries['msbsc70.dll'].BSCIinstFrIref
-BSCIinstFrIref.restype = IINST
-BSCIinstFrIref.argtypes = [POINTER(Bsc), IREF]
-BSCIinstFrIdef = _libraries['msbsc70.dll'].BSCIinstFrIdef
-BSCIinstFrIdef.restype = IINST
-BSCIinstFrIdef.argtypes = [POINTER(Bsc), IDEF]
-BSCIinstContextIref = _libraries['msbsc70.dll'].BSCIinstContextIref
-BSCIinstContextIref.restype = IINST
-BSCIinstContextIref.argtypes = [POINTER(Bsc), IREF]
-BSCGetStatistics = _libraries['msbsc70.dll'].BSCGetStatistics
-BSCGetStatistics.restype = BOOL
-BSCGetStatistics.argtypes = [POINTER(Bsc), POINTER(BSC_STAT)]
-BSCGetModuleStatistics = _libraries['msbsc70.dll'].BSCGetModuleStatistics
-BSCGetModuleStatistics.restype = BOOL
-BSCGetModuleStatistics.argtypes = [POINTER(Bsc), IMOD, POINTER(BSC_STAT)]
-BSCFCaseSensitive = _libraries['msbsc70.dll'].BSCFCaseSensitive
-BSCFCaseSensitive.restype = BOOL
-BSCFCaseSensitive.argtypes = [POINTER(Bsc)]
-BSCSetCaseSensitivity = _libraries['msbsc70.dll'].BSCSetCaseSensitivity
-BSCSetCaseSensitivity.restype = BOOL
-BSCSetCaseSensitivity.argtypes = [POINTER(Bsc), BOOL]
-BSCGetAllGlobalsArray = _libraries['msbsc70.dll'].BSCGetAllGlobalsArray
-BSCGetAllGlobalsArray.restype = BOOL
-BSCGetAllGlobalsArray.argtypes = [POINTER(Bsc), MBF, POINTER(POINTER(IINST)), POINTER(ULONG)]
-BSCSzFrAtr2 = _libraries['msbsc70.dll'].BSCSzFrAtr2
-BSCSzFrAtr2.restype = SZ
-BSCSzFrAtr2.argtypes = [POINTER(Bsc), ATR32]
-BSCIinstInfo2 = _libraries['msbsc70.dll'].BSCIinstInfo2
-BSCIinstInfo2.restype = BOOL
-BSCIinstInfo2.argtypes = [POINTER(Bsc), IINST, POINTER(SZ), POINTER(TYP), POINTER(ATR32)]
-BSCGetIinstByvalue2 = _libraries['msbsc70.dll'].BSCGetIinstByvalue2
-BSCGetIinstByvalue2.restype = BOOL
-BSCGetIinstByvalue2.argtypes = [POINTER(Bsc), SZ, TYP, ATR32, POINTER(IINST)]
-OpenBSCQuery = _libraries['msbsc70.dll'].OpenBSCQuery
-OpenBSCQuery.restype = BOOL
-OpenBSCQuery.argtypes = [POINTER(Bsc)]
-CloseBSCQuery = _libraries['msbsc70.dll'].CloseBSCQuery
-CloseBSCQuery.restype = BOOL
-CloseBSCQuery.argtypes = []
-BOB = ULONG
-InitBSCQuery = _libraries['msbsc70.dll'].InitBSCQuery
-InitBSCQuery.restype = BOOL
-InitBSCQuery.argtypes = [QY, BOB]
-BobNext = _libraries['msbsc70.dll'].BobNext
-BobNext.restype = BOB
-BobNext.argtypes = []
-BobFrName = _libraries['msbsc70.dll'].BobFrName
-BobFrName.restype = BOB
-BobFrName.argtypes = [SZ]
-LszNameFrBob = _libraries['msbsc70.dll'].LszNameFrBob
-LszNameFrBob.restype = SZ
-LszNameFrBob.argtypes = [BOB]
-CLS = USHORT
-
-class enums:
-    class MBF(utils.enum):
-        NIL       = 0x000
-        VARS      = 0x001
-        FUNCS     = 0x002
-        MACROS    = 0x004
-        TYPES     = 0x008
-        CLASS     = 0x010
-        INCL      = 0x020
-        MSGMAP    = 0x040
-        DIALOGID  = 0x080
-        LIBRARY   = 0x100
-        IMPORT    = 0x200
-        TEMPLATE  = 0x400
-        NAMESPACE = 0x800
-        ALL       = 0xFFF
-
-    class TYPES(utils.enum):
-        FUNCTION  = 0x01
-        LABEL     = 0x02
-        PARAMETER = 0x03
-        VARIABLE  = 0x04
-        CONSTANT  = 0x05
-        MACRO     = 0x06
-        TYPEDEF   = 0x07
-        STRUCNAM  = 0x08
-        ENUMNAM   = 0x09
-        ENUMMEM   = 0x0A
-        UNIONNAM  = 0x0B
-        SEGMENT   = 0x0C
-        GROUP     = 0x0D
-        PROGRAM   = 0x0E
-        CLASSNAM  = 0x0F
-        MEMFUNC   = 0x10
-        MEMVAR    = 0x11
-
-    class ATTRIBUTES(utils.enum):
-        LOCAL     = 0x001
-        STATIC    = 0x002
-        SHARED    = 0x004
-        NEAR      = 0x008
-        COMMON    = 0x010
-        DECL_ONLY = 0x020
-        PUBLIC    = 0x040
-        NAMED     = 0x080
-        MODULE    = 0x100
-        VIRTUAL   = 0x200
-        PRIVATE   = 0x400
-        PROTECT   = 0x800
-
-class definition_t(object):
-    #represents some other symbol
-    def __init__( self, def_id, bsc ):
-        self.__bsc = bsc
-        self.__def_id = def_id
-
-    @property
-    def def_id(self):
-        return self.__def_id
-
-    @utils.cached
-    def location( self ):
-        module = STRING()
-        line = LINE()
-        if not BSCIdefInfo( self.__bsc, self.def_id, byref( module ), byref( line ) ):
-            raise RuntimeError( "Unable to load information about instance(%s)" % str( self.__def_id ) )
-        return (module, line)
-
-    @utils.cached
-    def file_name(self):
-        return self.location[0].value
-
-    @utils.cached
-    def line(self):
-        return self.location[1].value
-
-    def __str__( self ):
-        return self.file_name + ': %d' % self.line + ' name: %s' % self.as_instance.name
-
-    @utils.cached
-    def as_instance(self):
-        return self.__bsc.create_instance( BSCIinstFrIdef( self.__bsc, self.def_id) )
-
-class instance_t(object):
-    #represents some symbol
-    def __init__( self, inst_id, bsc ):
-        self.__bsc = bsc
-        self.__inst_id = inst_id
-
-    @property
-    def inst_id(self):
-        return self.__inst_id
-
-    @utils.cached
-    def name_type_attribute_mangled_name( self ):
-        name = STRING()
-        typ = TYP()
-        attribute = ATR()
-        if not BSCIinstInfo( self.__bsc, self.inst_id, byref( name ), byref( typ ), byref( attribute ) ):
-            raise RuntimeError( "Unable to load information about instance(%s)" % str( self.__inst_id ) )
-        undecorated_name = BSCFormatDname( self.__bsc, name )
-        return undecorated_name, typ, attribute, name.value
-
-
-    @utils.cached
-    def mangled_name(self):
-        return self.name_type_attribute_mangled_name[3]
-
-    @utils.cached
-    def name(self):
-        return self.name_type_attribute_mangled_name[0]
-
-    @utils.cached
-    def type(self):
-        return self.name_type_attribute_mangled_name[1].value
-
-    @utils.cached
-    def attribute(self):
-        return self.name_type_attribute_mangled_name[2].value
-
-    def __str__( self ):
-        tmp = []
-        if enums.TYPES.has_value( self.type ):
-            tmp.append( 'type( "%s" )' % enums.TYPES.name_of( self.type ) )
-        if enums.ATTRIBUTES.has_value( self.attribute ):
-            tmp.append( 'attribute( "%s" )' % enums.ATTRIBUTES.name_of( self.attribute ) )
-        tmp.append( 'name( "%s" )' % self.name )
-        tmp.append( 'mangled name( "%s" )' % self.mangled_name )
-        return ', '.join( tmp )
-
-
-    @utils.cached
-    def definitions( self ):
-        definitions_len = ULONG(0)
-        definitions_ids = pointer( IDEF() )
-
-        if not BSCGetDefArray( self.__bsc, self.inst_id, byref( definitions_ids ), byref( definitions_len ) ):
-            raise RuntimeError( "Unable to call BSCGetDefArray" )
-
-        definitions = map( lambda i: definition_t( definitions_ids[i], self.__bsc )
-                           , range( definitions_len.value ) )
-
-        BSCDisposeArray( self.__bsc, definitions_ids )
-        return definitions
-
-    @utils.cached
-    def members( self ):
-        instances_len = ULONG(0)
-        instances_ids = pointer( IINST() )
-
-        if not BSCGetMembersArray( self.__bsc, self.inst_id, enums.MBF.ALL, byref( instances_ids ), byref( instances_len ) ):
-            raise RuntimeError( "Unable to call BSCGetMembersArray" )
-
-        instances = map( lambda i: self.__bsc.create_instance( instances_ids[i] )
-                         , range( instances_len.value ) )
-
-        BSCDisposeArray( self.__bsc, instances_ids )
-        return instances
-
-    @utils.cached
-    def used_symbols(self):
-        instances_len = ULONG(0)
-        instances_ids = pointer( IINST() )
-
-        if not BSCGetUsesArray( self.__bsc, self.inst_id, enums.MBF.ALL, byref( instances_ids ), byref( instances_len ) ):
-            raise RuntimeError( "Unable to call BSCGetUsesArray" )
-
-        instances = map( lambda i: self.__bsc.create_instance( instances_ids[i] )
-                         , range( instances_len.value ) )
-
-        BSCDisposeArray( self.__bsc, instances_ids )
-        return instances
-
-    @utils.cached
-    def base_classes(self):
-        instances_len = ULONG(0)
-        instances_ids = pointer( IINST() )
-
-        if not BSCGetBaseArray( self.__bsc, self.inst_id, byref( instances_ids ), byref( instances_len ) ):
-            raise RuntimeError( "Unable to call BSCGetBaseArray" )
-
-        instances = map( lambda i: self.__bsc.create_instance( instances_ids[i] )
-                         , range( instances_len.value ) )
-
-        BSCDisposeArray( self.__bsc, instances_ids )
-        return instances
-
-    @utils.cached
-    def derived_classes(self):
-        instances_len = ULONG(0)
-        instances_ids = pointer( IINST() )
-
-        if not BSCGetDervArray( self.__bsc, self.inst_id, byref( instances_ids ), byref( instances_len ) ):
-            raise RuntimeError( "Unable to call BSCGetDervArray" )
-
-        instances = map( lambda i: self.__bsc.create_instance( instances_ids[i] )
-                         , range( instances_len.value ) )
-
-        BSCDisposeArray( self.__bsc, instances_ids )
-        return instances
-
-class module_t(object):
-    #represents file
-    def __init__( self, mod_id, bsc ):
-        self.__bsc = bsc
-        self.__mod_id = mod_id
-
-    @property
-    def mod_id( self ):
-        return self.__mod_id
-
-    @utils.cached
-    def path( self ):
-        name = STRING()
-        BSCImodInfo(self.__bsc, self.__mod_id, byref(name))
-        return name.value
-
-    @utils.cached
-    def instances( self ):
-        instances_len = ULONG(0)
-        instances_ids = pointer( IINST() )
-
-        if not BSCGetModuleContents( self.__bsc, self.mod_id, enums.MBF.ALL, byref( instances_ids ), byref( instances_len ) ):
-            raise RuntimeError( "Unable to call BSCGetModuleContents" )
-
-        instances = map( lambda i: self.__bsc.create_instance( instances_ids[i] )
-                         , range( instances_len.value ) )
-
-        BSCDisposeArray( self.__bsc, instances_ids )
-        return instances
-
-class bsc_reader_t( object ):
-    def __init__( self, bsc_file ):
-        self.logger = utils.loggers.pdb_reader
-        self.logger.setLevel(logging.INFO)
-
-        self.__bsc_file = bsc_file
-        self.__bsc = pointer( Bsc() )
-        if not BSCOpen( self.__bsc_file, byref( self.__bsc ) ):
-            raise RuntimeError( "Unable to open bsc file '%s'" % self.__bsc_file )
-
-        self.__instances_cache = {} #inst id : instance_t
-        self.__bsc.create_instance = lambda inst_id: self.__create_instance( inst_id )
-
-    def __create_instance( self, inst_id ):
-        try:
-            return self.__instances_cache[ inst_id ]
-        except KeyError:
-            inst = instance_t( inst_id, self.__bsc )
-            self.__instances_cache[ inst_id ] = inst
-            return inst
-
-    def query_all_instances( self ):
-        instances_len = ULONG(0)
-        instances = pointer( IINST() )
-
-        if not BSCGetAllGlobalsArray( self.__bsc, enums.MBF.ALL, byref( instances ), byref( instances_len ) ):
-            raise RuntimeError( "Unable to load all globals symbols" )
-        for i in range( instances_len.value ):
-            self.__instances.append( instances[i] )
-        BSCDisposeArray( self.__bsc, instances )
-
-    @utils.cached
-    def is_case_sensitive( self ):
-        return bool( BSCFCaseSensitive( self.__bsc ) )
-
-    @utils.cached
-    def files(self):
-        module_ids = pointer( IMOD() )
-        module_len = ULONG()
-        bs = BSC_STAT()
-
-        if not BSCGetAllModulesArray( self.__bsc, module_ids, byref(module_len) ):
-            raise RuntimeError( "Unable to load all modules" )
-
-        modules = map( lambda i: module_t( module_ids[i], self.__bsc )
-                       , range( module_len.value ) )
-
-        BSCDisposeArray( self.__bsc, module_ids )
-
-        return modules
-
-    def print_stat( self ):
-        stat = BSC_STAT()
-        BSCGetStatistics( self.__bsc, byref( stat ) )
-        for f, t in stat._fields_:
-            print '%s: %s' % ( f, str( getattr( stat, f) ) )
-
-    def print_classes(self, file_name=None):
-        for m in self.files:
-            if file_name and m.path != file_name:
-                continue
-            print 'File: ', m.path
-            if m.instances:
-                print '\tInstances:'
-                for inst in m.instances:
-                    print '\t\t', str(inst)
-                    if inst.definitions:
-                        print '\t\t\tDefinitions:'
-                        for definition in inst.definitions:
-                            print '\t\t\t\t', str( definition )
-                    if inst.members:
-                        print '\t\t\tMembers:'
-                        for member in inst.members:
-                            print '\t\t\t\t', str( member )
-                    if inst.used_symbols:
-                        print '\t\t\tUsed symbols:'
-                        for used_symbol in inst.used_symbols:
-                            print '\t\t\t\t', str( used_symbol )
-                    if inst.base_classes:
-                        print '\t\t\tBase classes:'
-                        for base_class in inst.base_classes:
-                            print '\t\t\t\t', str( base_class )
-                    if inst.derived_classes:
-                        print '\t\t\tDerived classes:'
-                        for derived_class in inst.derived_classes:
-                            print '\t\t\t\t', str( derived_class )
-
-    def __del__( self ):
-        if self.__bsc:
-            BSCClose( self.__bsc )
-
-if __name__ == '__main__':
-    control_bsc = r'xxx.bsc'
-    reader = bsc_reader_t( control_bsc )
-    reader.print_stat()
-    print 'is_case_sensitive', reader.is_case_sensitive
-    #~ reader.query_all_instances()
-    #reader.files
-    reader.print_classes( )#r'c:\dev\produce_pdb\produce_pdb.cpp')
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/__init__.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/__init__.py
deleted file mode 100644
index 2d09ad7..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/__init__.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import os
-import sys
-import ctypes
-import pprint
-import logging
-import comtypes
-import comtypes.client
-
-from . import impl_details
-
-from ... import utils
-from ... import declarations
-from .. import config as msvc_cfg
-
-msdia = comtypes.client.GetModule( msvc_cfg.msdia_path )
-
-#~ comtypes_client_gen_dir = comtypes.client.gen_dir
-#~ try:
-    #~ comtypes.client.gen_dir = None
-    #~ msdia = comtypes.client.GetModule( msvc_cfg.msdia_path )
-#~ finally:
-    #~ comtypes.client.gen_dir = comtypes_client_gen_dir
-
-from loader import decl_loader_t
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/enums.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/enums.py
deleted file mode 100644
index 5c0cfa1..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/enums.py
+++ /dev/null
@@ -1,59 +0,0 @@
-from ... import utils #import utils from pygccxml package
-
-class BasicType(utils.enum):
-    btNoType   = 0
-    btVoid     = 1
-    btChar     = 2
-    btWChar    = 3
-    btInt      = 6
-    btUInt     = 7
-    btFloat    = 8
-    btBCD      = 9
-    btBool     = 10
-    btLong     = 13
-    btULong    = 14
-    btCurrency = 25
-    btDate     = 26
-    btVariant  = 27
-    btComplex  = 28
-    btBit      = 29
-    btBSTR     = 30
-    btHresult  = 31
-
-
-
-
-#Adding code, that was not generated for some reason.
-class UdtKind(utils.enum):
-   UdtStruct, UdtClass, UdtUnion = (0, 1, 2)
-
-class CV_access_e(utils.enum):
-   CV_private, CV_protected, CV_public = (1, 2, 3)
-
-class NameSearchOptions(utils.enum):
-   nsNone               = 0
-   nsfCaseSensitive     = 0x1
-   nsfCaseInsensitive   = 0x2
-   nsfFNameExt          = 0x4
-   nsfRegularExpression = 0x8
-   nsfUndecoratedName   = 0x10
-
-   # For backward compabibility:
-   nsCaseSensitive           = nsfCaseSensitive
-   nsCaseInsensitive         = nsfCaseInsensitive
-   nsFNameExt = nsfFNameExt
-   nsRegularExpression       = nsfRegularExpression | nsfCaseSensitive
-   nsCaseInRegularExpression = nsfRegularExpression | nsfCaseInsensitive
-
-
-class DataKind( utils.enum ):
-   DataIsUnknown        = 0
-   DataIsLocal          = 1
-   DataIsStaticLocal    = 2
-   DataIsParam          = 3
-   DataIsObjectPtr      = 4
-   DataIsFileStatic     = 5
-   DataIsGlobal         = 6
-   DataIsMember         = 7
-   DataIsStaticMember   = 8
-   DataIsConstant       = 9
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/kb.txt b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/kb.txt
deleted file mode 100644
index 601fe04..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/msvc/pdb/kb.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-url: http://www.hightechtalks.com/visual-studio-net-debugging/re-using-dia-sdk-find-360868.html
-Q: how to find out member variable offset?
-A (By Oleg):
-1. Assuming that you have IDiaSymbol interface pointer for the class (UDT) symbol,
-use IDiaSymbol::findChildren (with SymTagData as the tag) to lookup the field
-with the given name (or all fields).
-
-2. IDiaSymbol::findChildren will give you IDiaEnumSymbols interface, which you can use
-to retrieve IDiaSymbol for the field(s).
-
-3. Using the field's IDiaSymbol interface, call IDiaSymbol::get_locationType to determine
-the location of the field.
-If the location is LocIsThisRel, use IDiaSymbol::get_offset to obtain the offset.
-If the location is LocIsStatic, use IDiaSymbol::get_addressSection and IDiaSymbol::get_addressOffset,
-or IDiaSymbol::get_relativeVirtualAddress, or IDiaSymbol::get_virtualAddress to obtain
-the address of the static member.
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/__init__.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/__init__.py
deleted file mode 100644
index af104c1..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/__init__.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""Parser sub-package.
-"""
-
-from config import config_t
-from config import gccxml_configuration_t
-
-from project_reader import COMPILATION_MODE
-from project_reader import project_reader_t
-from project_reader import file_configuration_t
-from project_reader import create_text_fc
-from project_reader import create_source_fc
-from project_reader import create_gccxml_fc
-from project_reader import create_cached_source_fc
-
-from source_reader import source_reader_t
-from source_reader import gccxml_runtime_error_t
-from declarations_cache import cache_base_t
-from declarations_cache import file_cache_t
-from declarations_cache import dummy_cache_t
-from directory_cache import directory_cache_t
-#shortcut
-CONTENT_TYPE = file_configuration_t.CONTENT_TYPE
-
-
-def parse( files
-           , config=None
-           , compilation_mode=COMPILATION_MODE.FILE_BY_FILE
-           , cache=None ):
-    """Parse header files.
-
-    @param files: The header files that should be parsed
-    @type files: list of str
-    @param config: Configuration object or None
-    @type config: L{config_t}
-    @param compilation_mode: Determines whether the files are parsed individually or as one single chunk
-    @type compilation_mode: L{COMPILATION_MODE}
-    @param cache: Declaration cache (None=no cache)
-    @type cache: L{cache_base_t} or str
-    @returns: Declarations
-    """
-
-    if not config:
-        config = config_t()
-    parser = project_reader_t( config=config, cache=cache )
-    answer = parser.read_files(files, compilation_mode)
-    return answer
-
-def parse_string(content, config=None):
-    if not config:
-        config = config_t()
-    parser = project_reader_t(config )
-    return parser.read_string(content)
-
-def parse_xml_file( content, config=None ):
-    parser = source_reader_t( config )
-    return parser.read_xml_file( content )
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/config.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/config.py
deleted file mode 100644
index 896b924..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/config.py
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""This module contains the implementation of the L{config_t} class.
-"""
-
-import os
-import sys
-import copy
-
-class parser_configuration_t(object):
-    """Configuration object to collect parameters for invoking C++ parser
-
-    This class serves as a base class for the parameters that can be used
-    to customize the call to C++ parser. This class also allows users to work with
-    relative files paths. In this case files are searched in the following order:
-
-    1. current directory
-
-    2. working directory
-
-    3. additional include paths specified by the user
-
-    """
-    def __init__( self
-                  , working_directory='.'
-                  , include_paths=None
-                  , define_symbols=None
-                  , undefine_symbols=None
-                  , cflags=""
-                  , compiler=None):
-        """Constructor.
-        """
-        object.__init__( self )
-        self.__working_directory = working_directory
-
-        if not include_paths:
-            include_paths = []
-        self.__include_paths = include_paths
-
-        if not define_symbols:
-            define_symbols = []
-        self.__define_symbols = define_symbols
-
-        if not undefine_symbols:
-            undefine_symbols = []
-        self.__undefine_symbols = undefine_symbols
-
-        self.__cflags = cflags
-
-        self.__compiler = compiler
-
-    def clone(self):
-        raise NotImplementedError( self.__class__.__name__ )
-
-    def __get_working_directory(self):
-        return self.__working_directory
-    def __set_working_directory(self, working_dir):
-        self.__working_directory=working_dir
-    working_directory = property( __get_working_directory, __set_working_directory )
-
-    @property
-    def include_paths(self):
-        """list of include paths to look for header files"""
-        return self.__include_paths
-
-    @property
-    def define_symbols(self):
-        """list of "define" directives """
-        return self.__define_symbols
-
-    @property
-    def undefine_symbols(self):
-        """list of "undefine" directives """
-        return self.__undefine_symbols
-
-    @property
-    def compiler(self):
-        """compiler name to simulate"""
-        return self.__compiler
-
-    def __get_cflags(self):
-        return self.__cflags
-    def __set_cflags(self, val):
-        self.__cflags = val
-    cflags = property( __get_cflags, __set_cflags
-                      , doc="additional flags to pass to compiler" )
-
-    def __ensure_dir_exists( self, dir_path, meaning ):
-        if os.path.isdir( dir_path ):
-            return
-        msg = None
-        if os.path.exists( self.working_directory ):
-            raise RuntimeError( '%s("%s") does not exist!' % ( meaning, dir_path ) )
-        else:
-            raise RuntimeError( '%s("%s") should be "directory", not a file.' % ( meaning, dir_path ) )
-
-
-    def raise_on_wrong_settings( self ):
-        """validates the configuration settings and raises RuntimeError on error"""
-        self.__ensure_dir_exists( self.working_directory, 'working directory' )
-        map( lambda idir: self.__ensure_dir_exists( idir, 'include directory' )
-             , self.include_paths )
-
-
-class gccxml_configuration_t(parser_configuration_t):
-    """Configuration object to collect parameters for invoking gccxml.
-
-    This class serves as a container for the parameters that can be used
-    to customize the call to gccxml.
-    """
-    def __init__( self
-                  , gccxml_path=''
-                  , working_directory='.'
-                  , include_paths=None
-                  , define_symbols=None
-                  , undefine_symbols=None
-                  , start_with_declarations=None
-                  , ignore_gccxml_output=False
-                  , cflags=""
-                  , compiler=None):
-        """Constructor.
-        """
-        parser_configuration_t.__init__( self
-                                         , working_directory=working_directory
-                                         , include_paths=include_paths
-                                         , define_symbols=define_symbols
-                                         , undefine_symbols=undefine_symbols
-                                         , cflags=cflags
-                                         , compiler=compiler)
-
-        self.__gccxml_path = gccxml_path
-
-        if not start_with_declarations:
-            start_with_declarations = []
-        self.__start_with_declarations = start_with_declarations
-
-        self.__ignore_gccxml_output = ignore_gccxml_output
-
-    def clone(self):
-        return copy.deepcopy( self )
-
-    def __get_gccxml_path(self):
-        return self.__gccxml_path
-    def __set_gccxml_path(self, new_path ):
-        self.__gccxml_path = new_path
-    gccxml_path = property( __get_gccxml_path, __set_gccxml_path
-                            , doc="gccxml binary location" )
-
-    @property
-    def start_with_declarations(self):
-        """list of declarations gccxml should start with, when it dumps declaration tree"""
-        return self.__start_with_declarations
-
-    def __get_ignore_gccxml_output(self):
-        return self.__ignore_gccxml_output
-    def __set_ignore_gccxml_output(self, val=True):
-        self.__ignore_gccxml_output = val
-    ignore_gccxml_output = property( __get_ignore_gccxml_output, __set_ignore_gccxml_output
-                                    , doc="set this property to True, if you want pygccxml to ignore any error\\warning that comes from gccxml" )
-
-
-    def raise_on_wrong_settings( self ):
-        return
-        super( gccxml_configuration_t, self ).raise_on_wrong_settings()
-        if os.path.isfile( self.gccxml_path ):
-            return
-        if sys.platform == 'win32':
-            gccxml_name = 'gccxml' + '.exe'
-            environment_var_delimiter = ';'
-        elif sys.platform == 'linux2' or sys.platform == 'darwin':
-            gccxml_name = 'gccxml'
-            environment_var_delimiter = ':'
-        else:
-            raise RuntimeError( 'unable to find out location of gccxml' )
-        may_be_gccxml = os.path.join( self.gccxml_path, gccxml_name )
-        if os.path.isfile( may_be_gccxml ):
-            self.gccxml_path = may_be_gccxml
-        else:
-            for path in os.environ['PATH'].split( environment_var_delimiter ):
-                gccxml_path = os.path.join( path, gccxml_name )
-                if os.path.isfile( gccxml_path ):
-                    self.gccxml_path = gccxml_path
-                    break
-            else:
-                msg = 'gccxml_path("%s") should exists or to be a valid file name.' \
-                      % self.gccxml_path
-                raise RuntimeError( msg )
-
-config_t = gccxml_configuration_t #backward computability
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/declarations_cache.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/declarations_cache.py
deleted file mode 100644
index 4323888..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/declarations_cache.py
+++ /dev/null
@@ -1,240 +0,0 @@
-#! /usr/bin/python
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-import os
-try:
-  import hashlib as md5
-except:
-  import md5
-import time
-import cPickle
-from pygccxml import utils
-import config as cxx_parsers_cfg
-
-def file_signature( filename ):
-    if not os.path.isfile( filename ):
-        return None
-    if not os.path.exists( filename ):
-        return None
-    # Extend here to use md5 hash for signature
-    # - This change allows duplicate autogenerated files to be recognized
-    #return os.path.getmtime( source )
-    sig = md5.new()
-    f = file(filename,'r')
-    sig.update(f.read())
-    f.close()
-    return sig.hexdigest()
-
-def configuration_signature( config ):
-    """ Return a signature for a configuration (config_t)
-        object.  This can then be used as a key in the cache.
-        This method must take into account anything about
-        a configuration that could cause the declarations generated
-        to be different between runs.
-    """
-    sig = md5.new()
-    if isinstance( config, cxx_parsers_cfg.gccxml_configuration_t ):
-        sig.update(str(config.gccxml_path))
-    sig.update(str(config.working_directory))
-    if isinstance( config, cxx_parsers_cfg.gccxml_configuration_t ):
-        sig.update(str(config.cflags))
-    for p in config.include_paths:
-        sig.update(str(p))
-    for s in config.define_symbols:
-        sig.update(str(s))
-    for u in config.undefine_symbols:
-        sig.update(str(u))
-    return sig.hexdigest()
-
-class cache_base_t( object ):
-    logger = utils.loggers.declarations_cache
-
-    def __init__( self ):
-        object.__init__(self)
-
-    def flush(self):
-        """ Flush (write out) the cache to disk if needed. """
-        raise NotImplementedError()
-
-    def update(self, source_file, configuration, declarations, included_files):
-        """ Update cache entry.
-        @param source_file: path to the C++ source file being parsed
-        @param configuration: configuration used in parsing (config_t)
-        @param declarations: declaration tree found when parsing
-        @param included_files: files included by parsing.
-        """
-        raise NotImplementedError()
-
-    def cached_value(self, source_file, configuration):
-        """ Return declarations we have cached for the source_file and configuration
-            given.
-        @param source_file: path to the C++ source file being parsed.
-        @param configuration: configuration to use for parsing (config_t)
-        """
-        raise NotImplementedError()
-
-class record_t( object ):
-    def __init__( self
-                  , source_signature
-                  , config_signature
-                  , included_files
-                  , included_files_signature
-                  , declarations ):
-        self.__source_signature = source_signature
-        self.__config_signature = config_signature
-        self.__included_files = included_files
-        self.__included_files_signature = included_files_signature
-        self.__declarations = declarations
-        self.__was_hit = True # Track if there was a cache hit
-
-    def _get_was_hit(self):
-        return self.__was_hit
-    def _set_was_hit(self, was_hit):
-        self.__was_hit = was_hit
-    was_hit = property( _get_was_hit, _set_was_hit )
-
-    def key(self):
-        return ( self.__source_signature, self.__config_signature)
-
-    @staticmethod
-    def create_key( source_file, configuration ):
-        return ( file_signature(source_file)
-                 , configuration_signature(configuration))
-
-    def __source_signature(self):
-        return self.__source_signature
-    source_signature = property( __source_signature )
-
-    def __config_signature(self):
-        return self.__config_signature
-    config_signature = property( __config_signature )
-
-    def __included_files(self):
-        return self.__included_files
-    included_files = property( __included_files )
-
-    def __included_files_signature(self):
-        return self.__included_files_signature
-    included_files_signature = property( __included_files_signature )
-
-    def __declarations(self):
-        return self.__declarations
-    declarations = property( __declarations )
-
-class file_cache_t( cache_base_t ):
-    """ Cache implementation to store data in a pickled form in a file.
-        This class contains some cache logic that keeps track of which entries
-        have been 'hit' in the cache and if an entry has not been hit then
-        it is deleted at the time of the flush().  This keeps the cache from
-        growing larger when files change and are not used again.
-    """
-
-    def __init__( self, name ):
-        """
-        @param name: name of the cache file.
-        """
-        cache_base_t.__init__( self )
-        self.__name = name                              # Name of cache file
-        self.__cache = self.__load( self.__name )       # Map record_key to record_t
-        self.__needs_flushed = not bool( self.__cache ) # If empty then we need to flush
-        for entry in self.__cache.itervalues(): # Clear hit flags
-            entry.was_hit = False
-
-    @staticmethod
-    def __load( file_name ):
-        " Load pickled cache from file and return the object. "
-        cache = None
-        if os.path.exists( file_name ) and not os.path.isfile( file_name ):
-            raise RuntimeError( 'Cache should be initialized with valid full file name' )
-        if not os.path.exists( file_name ):
-            file( file_name, 'w+b' ).close()
-            return {}
-        cache_file_obj = file( file_name, 'rb' )
-        try:
-            file_cache_t.logger.info( 'Loading cache file "%s".' % file_name )
-            start_time = time.clock()
-            cache = cPickle.load( cache_file_obj )
-            file_cache_t.logger.debug( "Cache file has been loaded in %.1f secs"%( time.clock() - start_time ) )
-            file_cache_t.logger.debug( "Found cache in file: [%s]  entries: %s"
-                               % ( file_name, len( cache.keys() ) ) )
-        except Exception, error:
-            file_cache_t.logger.exception( "Error occured while reading cache file: %s", error )
-            cache_file_obj.close()
-            file_cache_t.logger.info( "Invalid cache file: [%s]  Regenerating." % file_name )
-            file(file_name, 'w+b').close()   # Create empty file
-            cache = {}                       # Empty cache
-        return cache
-
-    def flush(self):
-        # If not marked as needing flushed, then return immediately
-        if not self.__needs_flushed:
-            self.logger.debug("Cache did not change, ignoring flush.")
-            return
-
-        # Remove entries that did not get a cache hit
-        num_removed = 0
-        for key in self.__cache.keys():
-            if not self.__cache[key].was_hit:
-                num_removed += 1
-                del self.__cache[key]
-        if num_removed > 0:
-            self.logger.debug(  "There are %s removed entries from cache." % num_removed )
-        # Save out the cache to disk
-        cache_file = file( self.__name, 'w+b' )
-        cPickle.dump( self.__cache, cache_file, cPickle.HIGHEST_PROTOCOL )
-        cache_file.close()
-
-    def update(self, source_file, configuration, declarations, included_files):
-        """ Update a cached record with the current key and value contents. """
-        record = record_t( source_signature=file_signature(source_file)
-                           , config_signature=configuration_signature(configuration)
-                           , included_files=included_files
-                           , included_files_signature=map( file_signature, included_files)
-                           , declarations=declarations
-                        )
-        # Switched over to holding full record in cache so we don't have
-        # to keep creating records in the next method.
-        self.__cache[ record.key() ] = record
-        self.__cache[ record.key() ].was_hit = True
-        self.__needs_flushed = True
-
-    def cached_value(self, source_file, configuration):
-        """ Attempt to lookup the cached decls for the given file and configuration.
-            If not found or signature check fails, returns None.
-        """
-        key = record_t.create_key(source_file, configuration)
-        if not self.__cache.has_key( key ):
-            return None
-        record = self.__cache[key]
-        if self.__is_valid_signature( record ):
-            record.was_hit = True                  # Record cache hit
-            return record.declarations
-        else: #some file has been changed
-            del self.__cache[key]
-            return None
-
-    def __is_valid_signature( self, record ):
-        # This is now part of key
-        #if self.__signature( record.source_file ) != record.source_file_signature:
-        #    return False
-        for index, included_file in enumerate( record.included_files ):
-            if file_signature( included_file ) != record.included_files_signature[index]:
-                return False
-        return True
-
-
-class dummy_cache_t( cache_base_t ):
-    def __init__( self ):
-        cache_base_t.__init__(self)
-
-    def flush(self):
-        pass
-
-    def update(self, source_file, configuration, declarations, included_files):
-        pass
-
-    def cached_value(self, source_file, configuration):
-        return None
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/directory_cache.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/directory_cache.py
deleted file mode 100644
index f2fa5b8..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/directory_cache.py
+++ /dev/null
@@ -1,531 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-#
-# The initial version of the directory_cache_t class was written
-# by Matthias Baas (baas at ira.uka.de).
-
-"""Directory cache implementation.
-
-This module contains the implementation of a cache that uses individual
-files stored in a dedicated cache directory to store the cached contents.
-The cache class is L{directory_cache_t} which can be passed to the C{cache}
-argument of the L{parse()} function.
-"""
-
-import os, os.path, gzip
-try:
-  import hashlib as md5
-except:
-  import md5
-import cPickle
-import declarations_cache
-
-class index_entry_t:
-    """Entry of the index table in the directory cache index.
-
-    Each cached header file (i.e. each *.cache file) has a corresponding
-    index_entry_t object. This object is used to determine whether the
-    cache file with the declarations is still valid or not.
-
-    This class is a helper class for the directory_cache_t class.
-    """
-
-    def __init__( self, filesigs, configsig ):
-        """Constructor.
-
-        filesigs is a list of tuples (fileid, sig)...
-        configsig is the signature of the configuration object.
-        """
-        self.filesigs = filesigs
-        self.configsig = configsig
-
-    def __getstate__(self):
-        return (self.filesigs, self.configsig)
-
-    def __setstate__(self, state):
-        self.filesigs, self.configsig = state
-
-
-class directory_cache_t ( declarations_cache.cache_base_t ):
-    """Cache class that stores its data as multiple files inside a directory.
-
-    The cache stores one index file called "index.dat" which is always
-    read by the cache when the cache object is created. Each header file
-    will have its corresponding *.cache file that stores the declarations
-    found in the header file. The index file is used to determine whether
-    a *.cache file is still valid or not (by checking if one of the dependent
-    files (i.e. the header file itself and all included files) have been
-    modified since the last run).
-    """
-
-    def __init__( self, dir="cache", compression=False, md5_sigs=True ):
-        """Constructor.
-
-        dir is the cache directory (it is created if it does not exist).
-        If compression is set to True the cache files will be compressed
-        using gzip.
-        md5_sigs determines whether file modifications is checked by
-        computing a md5 digest or by checking the modification date.
-        """
-        declarations_cache.cache_base_t.__init__(self)
-
-        # Cache directory
-        self.__dir = os.path.abspath(dir)
-
-        # Flag that determines whether the cache files will be compressed
-        self.__compression = compression
-
-        # Flag that determines whether the signature is a md5 digest or
-        # the modification time
-        # (this flag is passed to the filename_repository_t class)
-        self.__md5_sigs = md5_sigs
-
-        # Filename repository
-        self.__filename_rep = filename_repository_t(self.__md5_sigs)
-
-        # Index dictionary (Key is the value returned by _create_cache_key()
-        # (which is based on the header file name) and value is an
-        # index_entry_t object)
-        self.__index = {}
-
-        # Flag that indicates whether the index was modified
-        self.__modified_flag = False
-
-        # Check if dir refers to an existing file...
-        if os.path.isfile(self.__dir):
-            raise ValueError, "Cannot use %s as cache directory. There is already a file with that name."%self.__dir
-
-        # Load the cache or create the cache directory...
-        if os.path.isdir(self.__dir):
-            self._load()
-        else:
-            # Create the cache directory...
-            os.mkdir(self.__dir)
-
-    def flush(self):
-        """Save the index table to disk."""
-
-        self._save()
-#        self.__filename_rep._dump()
-
-    def update(self, source_file, configuration, declarations, included_files):
-        """Replace a cache entry by a new value.
-
-        @param source_file: Header file name.
-        @type source_file: str
-        @param configuration: Configuration  object.
-        @type configuration: L{config_t}
-        @param declarations: Declarations contained in the header file.
-        @type declarations: picklable object
-        @param included_files: Dependent files
-        @type included_files: list of str
-        """
-        # Normlize all paths...
-        source_file = os.path.normpath(source_file)
-        included_files = map(lambda p: os.path.normpath(p), included_files)
-
-        # Create the list of dependent files. This is the included_files list
-        # + the source file. Duplicate names are removed.
-        dependent_files = {}
-        for name in [source_file]+included_files:
-            dependent_files[name] = 1
-        dependent_files = dependent_files.keys()
-
-        key = self._create_cache_key(source_file)
-        # Remove an existing entry (if there is one)
-        # After calling this method, it is guaranteed that __index[key]
-        # does not exist anymore.
-        self._remove_entry(source_file, key)
-
-        # Create a new entry...
-
-        # Create the sigs of all dependent files...
-        filesigs = []
-        for filename in dependent_files:
-            id_,sig = self.__filename_rep.acquire_filename(filename)
-            filesigs.append((id_,sig))
-
-        configsig = self._create_config_signature(configuration)
-        entry = index_entry_t(filesigs, configsig)
-        self.__index[key] = entry
-        self.__modified_flag = True
-
-        # Write the declarations into the cache file...
-        cachefilename = self._create_cache_filename(source_file)
-        self._write_file(cachefilename, declarations)
-
-
-    def cached_value(self, source_file, configuration):
-        """Return the cached declarations or None.
-
-        @param source_file: Header file name
-        @type source_file: str
-        @param configuration: Configuration object
-        @type configuration: L{config_t}
-        @return: Cached declarations or None
-        """
-
-        # Check if the cache contains an entry for source_file
-        key = self._create_cache_key(source_file)
-        entry = self.__index.get(key)
-        if entry==None:
-#            print "CACHE: %s: Not cached"%source_file
-            return None
-
-        # Check if the entry is still valid. It is not valid if:
-        #  - the source_file has been updated
-        #  - the configuration object has changed (i.e. the header is parsed
-        #    by gccxml with different settings which may influence the
-        #    declarations)
-        #  - the included files have been updated
-        #    (this list is part of the cache entry as it cannot be known
-        #    by the caller when cached_value() is called. It was instead
-        #    passed to update())
-
-        # Check if the config is different...
-        configsig = self._create_config_signature(configuration)
-        if configsig!=entry.configsig:
-#            print "CACHE: %s: Config mismatch"%source_file
-            return None
-
-        # Check if any of the dependent files has been modified...
-        for id_, sig in entry.filesigs:
-            if self.__filename_rep.is_file_modified(id_, sig):
-#                print "CACHE: %s: Entry not up to date"%source_file
-                return None
-
-        # Load and return the cached declarations
-        cachefilename = self._create_cache_filename(source_file)
-        decls = self._read_file(cachefilename)
-
-#        print "CACHE: Using cached decls for",source_file
-        return decls
-
-    def _load(self):
-        """Load the cache.
-
-        Loads the file index.dat which contains the index table and
-        the file name repository.
-
-        This method is called by the constructor.
-        """
-
-        indexfilename = os.path.join(self.__dir, "index.dat")
-        if os.path.exists(indexfilename):
-            data = self._read_file(indexfilename)
-            self.__index = data[0]
-            self.__filename_rep = data[1]
-            if self.__filename_rep._md5_sigs!=self.__md5_sigs:
-                print "CACHE: Warning: md5_sigs stored in the cache is set to %s."%self.__filename_rep._md5_sigs
-                print "       Please remove the cache to change this setting."
-                self.__md5_sigs = self.__filename_rep._md5_sigs
-        else:
-            self.__index = {}
-            self.__filename_rep = filename_repository_t(self.__md5_sigs)
-
-        self.__modified_flag = False
-
-    def _save(self):
-        """Save the cache index if it was modified.
-
-        Saves the index table and the file name repository in the file
-        index.dat.
-        """
-        if self.__modified_flag:
-            self.__filename_rep.update_id_counter()
-            indexfilename = os.path.join(self.__dir, "index.dat")
-            self._write_file(indexfilename, (self.__index,self.__filename_rep))
-            self.__modified_flag = False
-
-    def _read_file(self, filename):
-        """Read a Python object from a cache file.
-
-        Reads a pickled object from disk and returns it.
-
-        @param filename: Name of the file that should be read.
-        @type filename: str
-        @returns: Unpickled file contents
-        """
-        if self.__compression:
-            f = gzip.GzipFile(filename, "rb")
-        else:
-            f = file(filename, "rb")
-        res = cPickle.load(f)
-        f.close()
-        return res
-
-    def _write_file(self, filename, data):
-        """Write a data item into a file.
-
-        The data object is written to a file using the pickle mechanism.
-
-        @param filename: Output file name
-        @type filename: str
-        @param data: A Python object that will be pickled
-        @type data: picklable object
-        """
-        if self.__compression:
-            f = gzip.GzipFile(filename, "wb")
-        else:
-            f = file(filename, "wb")
-        cPickle.dump(data, f, cPickle.HIGHEST_PROTOCOL)
-        f.close()
-
-    def _remove_entry(self, source_file, key):
-        """Remove an entry from the cache.
-
-        source_file is the name of the header and key is its corresponding
-        cache key (obtained by a call to L{_create_cache_key()}).
-        The entry is removed from the index table, any referenced file
-        name is released and the cache file is deleted.
-
-        If key references a non-existing entry, the method returns
-        immediately.
-
-        @param source_file: Header file name
-        @type source_file: str
-        @param key: Key value for the specified header file
-        @type key: hashable object
-        """
-
-        entry = self.__index.get(key)
-        if entry==None:
-            return
-
-        # Release the referenced files...
-        for id_, sig in entry.filesigs:
-            self.__filename_rep.release_filename(id_)
-
-        # Remove the cache entry...
-        del self.__index[key]
-        self.__modified_flag = True
-
-        # Delete the corresponding cache file...
-        cachefilename = self._create_cache_filename(source_file)
-        try:
-            os.remove(cachefilename)
-        except OSError, e:
-            print "Could not remove cache file (%s)"%e
-
-
-    def _create_cache_key(self, source_file):
-        """Return the cache key for a header file.
-
-        @param source_file: Header file name
-        @type source_file: str
-        @returns: Key for the given header file
-        @rtype: str
-        """
-        path, name = os.path.split(source_file)
-        return name+str(hash(path))
-
-    def _create_cache_filename(self, source_file):
-        """Return the cache file name for a header file.
-
-        @param source_file: Header file name
-        @type source_file: str
-        @returns: Cache file name (*.cache)
-        @rtype: str
-        """
-        res = self._create_cache_key(source_file)+".cache"
-        return os.path.join(self.__dir, res)
-
-    def _create_config_signature(self, config):
-        """Return the signature for a config object.
-
-        The signature is computed as md5 digest of the contents of
-        working_directory, include_paths, define_symbols and
-        undefine_symbols.
-
-        @param config: Configuration object
-        @type config: L{config_t}
-        @returns: Signature
-        @rtype: str
-        """
-        m = md5.new()
-        m.update(config.working_directory)
-        map(lambda p: m.update(p), config.include_paths)
-        map(lambda p: m.update(p), config.define_symbols)
-        map(lambda p: m.update(p), config.undefine_symbols)
-        map(lambda p: m.update(p), config.cflags)
-        return m.digest()
-
-
-
-
-class filename_entry_t:
-    """This is a record stored in the filename_repository_t class.
-
-    The class is an internal class used in the implementation of the
-    filename_repository_t class and it just serves as a container for
-    the file name and the reference count.
-    """
-
-    def __init__( self, filename ):
-        """Constructor.
-
-        The reference count is initially set to 0.
-        """
-        # Filename
-        self.filename = filename
-        # Reference count
-        self.refcount = 0
-
-        # Cached signature value for the file.
-        # If sig_valid flag is False, the signature still has to be computed,
-        # otherwise the cached value can be used.
-        # These attributes must not be pickled!
-        self.sig_valid = False
-        self.signature = None
-
-    def __getstate__(self):
-        # Only pickle filename and refcount
-        return (self.filename, self.refcount)
-
-    def __setstate__(self, state):
-        self.filename, self.refcount = state
-        self.sig_valid = False
-        self.signature = None
-
-    def inc_ref_count(self):
-        """Increase the reference count by 1."""
-        self.refcount += 1
-
-    def dec_ref_count(self):
-        """Decrease the reference count by 1 and return the new count."""
-        self.refcount -= 1
-        return self.refcount
-
-
-class filename_repository_t:
-    """File name repository.
-
-    This class stores file names and can check whether a file has been
-    modified or not since a previous call.
-    A file name is stored by calling acquire_filename() which returns
-    an ID and a signature of the file. The signature can later be used
-    to check if the file was modified by calling is_file_modified().
-    If the file name is no longer required release_filename() should be
-    called so that the entry can be removed from the repository.
-    """
-
-    def __init__( self, md5_sigs ):
-        """Constructor.
-        """
-
-        # Flag that determines whether the signature is a md5 digest or
-        # the modification time
-        # (this flag is passed to the filename_repository_t class)
-        self._md5_sigs = md5_sigs
-
-        # ID lookup table (key: filename / value: id_)
-        self.__id_lut = {}
-
-        # Entry dictionary (key: id_ / value: filename_entry_t)
-        # This dictionary contains the actual data.
-        # It must always hold that each entry in __entries has a corresponding
-        # entry in __id_lut (i.e. the keys in __id_lut must be the names
-        # stored in __entries)
-        self.__entries = {}
-
-        # A counter for new ids
-        self.__next_id = 1
-
-    def acquire_filename(self, name):
-        """Acquire a file name and return its id and its signature.
-        """
-        id_ = self.__id_lut.get(name)
-        # Is this a new entry?
-        if id_==None:
-            # then create one...
-            id_ = self.__next_id
-            self.__next_id += 1
-            self.__id_lut[name] = id_
-            entry = filename_entry_t(name)
-            self.__entries[id_] = entry
-        else:
-            # otherwise obtain the entry...
-            entry = self.__entries[id_]
-
-        entry.inc_ref_count()
-        return id_, self._get_signature(entry)
-
-    def release_filename(self, id_):
-        """Release a file name.
-        """
-        entry = self.__entries.get(id_)
-        if entry==None:
-            raise ValueError, "Invalid filename id (%d)"%id_
-
-        # Decrease reference count and check if the entry has to be removed...
-        if entry.dec_ref_count()==0:
-            del self.__entries[id_]
-            del self.__id_lut[entry.filename]
-
-    def is_file_modified(self, id_, signature):
-        """Check if the file referred to by id_ has been modified.
-        """
-        entry = self.__entries.get(id_)
-        if entry==None:
-            raise ValueError, "Invalid filename id_ (%d)"%id_
-
-        # Is the signature already known?
-        if entry.sig_valid:
-            # use the cached signature
-            filesig = entry.signature
-        else:
-            # compute the signature and store it
-            filesig = self._get_signature(entry)
-            entry.signature = filesig
-            entry.sig_valid = True
-
-        return filesig!=signature
-
-    def update_id_counter(self):
-        """Update the id_ counter so that it doesn't grow forever.
-        """
-        if len(self.__entries)==0:
-            self.__next_id = 1
-        else:
-            self.__next_id = max(self.__entries.keys())+1
-
-    def _get_signature(self, entry):
-        """Return the signature of the file stored in entry.
-        """
-        if self._md5_sigs:
-            # return md5 digest of the file content...
-            if not os.path.exists(entry.filename):
-                return None
-            try:
-                f = file(entry.filename)
-            except IOError, e:
-                print "Cannot determine md5 digest:",e
-                return None
-            data = f.read()
-            f.close()
-            return md5.new(data).digest()
-        else:
-            # return file modification date...
-            try:
-                return os.path.getmtime(entry.filename)
-            except OSError, e:
-                return None
-
-    def _dump(self):
-        """Dump contents for debugging/testing.
-        """
-
-        print 70*"-"
-        print "ID lookup table:"
-        for name in self.__id_lut:
-            id_ = self.__id_lut[name]
-            print "  %s -> %d"%(name, id_)
-
-        print 70*"-"
-        print "%-4s %-60s %s"%("ID", "Filename", "Refcount")
-        print 70*"-"
-        for id_ in self.__entries:
-            entry = self.__entries[id_]
-            print "%04d %-60s %d"%(id_, entry.filename, entry.refcount)
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/linker.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/linker.py
deleted file mode 100644
index 61fd46d..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/linker.py
+++ /dev/null
@@ -1,271 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-import types
-from pygccxml.declarations import *
-
-class linker_t( decl_visitor_t, type_visitor_t, object ):
-    def __init__( self, decls, types, access, membership, files ):
-        decl_visitor_t.__init__(self)
-        type_visitor_t.__init__(self)
-        object.__init__(self)
-
-        self.__decls = decls
-        self.__types = types
-        self.__access = access
-        self.__membership = membership
-        self.__files = files
-        self.__inst = None
-
-        self.__compiler = None
-        if self.__decls:
-            for d in self.__decls.itervalues():
-                self.__compiler = d.compiler
-                break
-
-    def _get_inst(self):
-        return self.__inst
-    def _set_inst(self, inst):
-        self.__inst = inst
-        #use inst, to reduce attribute access time
-        if isinstance( inst, declaration_t ) and inst.location:
-            inst.location.file_name = self.__files[inst.location.file_name]
-    instance = property( _get_inst, _set_inst )
-
-    def __link_type(self, type_id):
-        if type_id is None:
-            return None #in some situations type_id is None, return_type of constructor or destructor
-        elif self.__types.has_key( type_id ):
-            return self.__types[type_id]
-        elif self.__decls.has_key( type_id ):
-            base = declarated_t( declaration=self.__decls[ type_id ] )
-            self.__types[type_id] = base
-            return base
-        elif '...' == type_id:
-            return ellipsis_t()
-        else:
-            return unknown_t()
-
-    def __link_compound_type(self):
-        self.__inst.base = self.__link_type( self.__inst.base )
-
-    def __link_members(self):
-        if not self.__membership.has_key( id(self.__inst) ):
-            return
-        for member in self.__membership[ id(self.__inst) ]:
-            if not self.__access.has_key( member ):
-                continue
-            access = self.__access[member]
-            if not self.__decls.has_key( member ):
-                continue
-            decl = self.__decls[member]
-            if isinstance( self.__inst, class_t ):
-                self.__inst.adopt_declaration( decl, access )
-            else:
-                self.__inst.adopt_declaration( decl )
-
-    def __link_calldef(self):
-        self.__inst.return_type = self.__link_type( self.__inst.return_type )
-        if isinstance( self.__inst, type_t ):
-            linked_args = [ self.__link_type( arg ) for arg in self.__inst.arguments_types ]
-            self.__inst.arguments_types = linked_args
-        else:
-            for arg in self.__inst.arguments:
-                arg.type = self.__link_type(arg.type)
-            for index in range( len( self.__inst.exceptions ) ):
-                try:
-                    self.__inst.exceptions[index] = self.__decls[ self.__inst.exceptions[index] ]
-                except KeyError:
-                    self.__inst.exceptions[index] = self.__link_type( self.__inst.exceptions[index] )
-
-    def visit_member_function( self ):
-        self.__link_calldef()
-
-    def visit_constructor( self ):
-        self.__link_calldef()
-
-    def visit_destructor( self ):
-        self.__link_calldef()
-
-    def visit_member_operator( self ):
-        self.__link_calldef()
-
-    def visit_casting_operator( self ):
-        self.__link_calldef()
-        #will be fixed by patcher. It is needed because of demangled name taken into account
-        #self.__inst._name = 'operator ' + self.__inst.return_type.decl_string
-
-    def visit_free_function( self ):
-        self.__link_calldef()
-
-    def visit_free_operator( self ):
-        self.__link_calldef()
-
-    def visit_class_declaration(self ):
-        pass
-
-    def visit_class(self ):
-        self.__link_members()
-        #GCC-XML sometimes generates constructors with names that does not match
-        #class name. I think this is because those constructors are compiler
-        #generated. I need to find out more about this and to talk with Brad
-
-        new_name = self.__inst._name
-        if templates.is_instantiation( new_name ):
-            new_name = templates.name( new_name )
-
-        for decl in self.__inst.declarations:
-            if not isinstance( decl, constructor_t ):
-                continue
-            if '.' in decl._name or '$' in decl._name:
-                decl._name = new_name
-
-        bases = self.__inst.bases.split()
-        self.__inst.bases = []
-        for base in bases:
-            #it could be "_5" or "protected:_5"
-            data = base.split(':')
-            base_decl = self.__decls[ data[-1] ]
-            access = ACCESS_TYPES.PUBLIC
-            if 2 == len( data ):
-                access = data[0]
-            self.__inst.bases.append( hierarchy_info_t( base_decl, access ) )
-            base_decl.derived.append( hierarchy_info_t( self.__inst, access ) )
-
-    def visit_enumeration(self ):
-        pass
-
-    def visit_namespace(self ):
-        self.__link_members()
-
-    def visit_typedef(self ):
-        self.__inst.type = self.__link_type(self.__inst.type)
-
-    def visit_variable(self ):
-        self.__inst.type = self.__link_type(self.__inst.type)
-
-    def visit_void( self ):
-        pass
-
-    def visit_char( self ):
-        pass
-
-    def visit_signed_char( self ):
-        pass
-
-    def visit_unsigned_char( self ):
-        pass
-
-    def visit_wchar( self ):
-        pass
-
-    def visit_short_int( self ):
-        pass
-
-    def visit_short_unsigned_int( self ):
-        pass
-
-    def visit_bool( self ):
-        pass
-
-    def visit_int( self ):
-        pass
-
-    def visit_unsigned_int( self ):
-        pass
-
-    def visit_long_int( self ):
-        pass
-
-    def visit_long_unsigned_int( self ):
-        pass
-
-    def visit_long_long_int( self ):
-        pass
-
-    def visit_long_long_unsigned_int( self ):
-        pass
-
-    def visit_float( self ):
-        pass
-
-    def visit_double( self ):
-        pass
-
-    def visit_long_double( self ):
-        pass
-
-    def visit_complex_long_double(self):
-        pass
-
-    def visit_complex_double(self):
-        pass
-
-    def visit_complex_float(self):
-        pass
-
-    def visit_jbyte(self):
-        pass
-
-    def visit_jshort(self):
-        pass
-
-    def visit_jint(self):
-        pass
-
-    def visit_jlong(self):
-        pass
-
-    def visit_jfloat(self):
-        pass
-
-    def visit_jdouble(self):
-        pass
-
-    def visit_jchar(self):
-        pass
-
-    def visit_jboolean(self):
-        pass
-
-    def visit_volatile( self ):
-        self.__link_compound_type()
-
-    def visit_const( self ):
-        self.__link_compound_type()
-
-    def visit_pointer( self ):
-        if '0.9' in self.__compiler and isinstance( self.__inst.base, member_variable_type_t ):
-            original_inst = self.__inst
-            self.__inst = self.__inst.base
-            self.visit_member_variable_type()
-            self.__inst = original_inst
-        else:
-            self.__link_compound_type()
-
-    def visit_reference( self ):
-        self.__link_compound_type()
-
-    def visit_array( self ):
-        self.__link_compound_type()
-
-    def visit_free_function_type( self ):
-        self.__link_calldef()
-
-    def visit_member_function_type( self ):
-        self.__link_calldef()
-        if isinstance( self.__inst, type_t ):
-            self.__inst.class_inst = self.__link_type( self.__inst.class_inst )
-
-    def visit_member_variable_type( self ):
-        self.__inst.variable_type = self.__link_type( self.__inst.variable_type )
-        self.__link_compound_type()
-
-    def visit_declarated( self ):
-        if isinstance( self.__inst.declaration, types.StringTypes ):
-            self.__inst.declaration = self.__decls[self.__inst.declaration]
-
-    def visit_restrict( self ):
-        self.__link_compound_type()
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/patcher.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/patcher.py
deleted file mode 100644
index 46a842e..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/patcher.py
+++ /dev/null
@@ -1,188 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-from pygccxml import utils
-from pygccxml import declarations
-
-
-class default_argument_patcher_t( object ):
-    def __init__( self, enums ):
-        object.__init__( self )
-        self.__enums = enums
-
-    def __call__(self, decl):
-        for arg in decl.arguments:
-            if not arg.default_value:
-                continue
-            fixer = self.__find_fixer( decl, arg )
-            if fixer:
-                arg.default_value = fixer( decl, arg )
-
-    def __find_fixer(self, func, arg):
-        if not arg.default_value:
-            return False
-        elif self.__is_unqualified_enum( func, arg ):
-            return self.__fix_unqualified_enum
-        elif self.__is_double_call( func, arg ):
-            return self.__fix_double_call
-        elif self.__is_invalid_integral( func, arg ):
-            return self.__fix_invalid_integral
-        elif self.__is_constructor_call( func, arg ):
-            return self.__fix_constructor_call
-        else:
-            return None
-
-    def __join_names( self, prefix, suffix ):
-        if prefix == '::':
-            return '::' + suffix
-        else:
-            return prefix + '::' + suffix
-
-    def __is_unqualified_enum(self, func, arg):
-        type_ = declarations.remove_reference( declarations.remove_cv( arg.type ) )
-        if not declarations.is_enum( type_ ):
-            return False
-        enum_type = declarations.enum_declaration( type_ )
-        return enum_type.has_value_name( arg.default_value )
-
-    def __fix_unqualified_enum( self, func, arg):
-        type_ = declarations.remove_reference( declarations.remove_cv( arg.type ) )
-        enum_type = declarations.enum_declaration( type_ )
-        return self.__join_names( enum_type.parent.decl_string, arg.default_value )
-
-    def __is_invalid_integral(self, func, arg):
-        type_ = declarations.remove_reference( declarations.remove_cv( arg.type ) )
-        if not declarations.is_integral( type_ ):
-            return False
-        try:
-            int( arg.default_value )
-            return False
-        except:
-            return True
-
-    def __fix_invalid_integral(self, func, arg):
-        try:
-            int( arg.default_value )
-            return arg.default_value
-        except:
-            pass
-
-        try:
-            int( arg.default_value, 16 )
-            if 64 == utils.get_architecture():
-                #on 64 bit architecture, gccxml reports 0fffff, which is valid number
-                #the problem is that in this case it is so buggy so pygccxml can not fix it
-                #users will have to fix the default value manually
-                return arg.default_value
-            default_value = arg.default_value.lower()
-            found_hex = filter( lambda ch: ch in 'abcdef', default_value )
-            if found_hex and not default_value.startswith( '0x' ):
-                int( '0x' + default_value, 16 )
-                return '0x' + default_value
-        except:
-            pass
-
-        #may be we deal with enum
-        parent = func.parent
-        while parent:
-            found = self.__find_enum( parent, arg.default_value )
-            if found:
-                if declarations.is_fundamental( arg.type ) and ' ' in arg.type.decl_string:
-                    template = '(%s)(%s)'
-                else:
-                    template = '%s(%s)'
-                return template % ( arg.type.decl_string
-                                    , self.__join_names( found.parent.decl_string, arg.default_value ) )
-            else:
-                parent = parent.parent
-        return arg.default_value
-
-    def __find_enum( self, scope, default_value ):
-        #this algorithm could be improved: it could take into account
-        #1. unnamed namespaced
-        #2. location within files
-
-        for enum in self.__enums:
-            if enum.parent is scope and enum.has_value_name( default_value ):
-                return enum
-        return None
-
-    def __is_double_call( self, func, arg ):
-        call_invocation = declarations.call_invocation
-        dv = arg.default_value
-        found1 = call_invocation.find_args( dv )
-        if found1 == call_invocation.NOT_FOUND:
-            return False
-        found2 = call_invocation.find_args( dv, found1[1] + 1 )
-        if found2 == call_invocation.NOT_FOUND:
-            return False
-        args1 = call_invocation.args( dv[ found1[0] : found1[1] + 1 ] )
-        args2 = call_invocation.args( dv[ found2[0] : found2[1] + 1 ] )
-        return len(args1) == len(args2)
-
-    def __fix_double_call( self, func, arg ):
-        call_invocation = declarations.call_invocation
-        dv = arg.default_value
-        found1 = call_invocation.find_args( dv )
-        found2 = call_invocation.find_args( dv, found1[1] + 1 )
-        #args1 = call_invocation.args( dv[ found1[0] : found1[1] + 1 ] )
-        args2 = call_invocation.args( dv[ found2[0] : found2[1] + 1 ] )
-        return call_invocation.join( dv[:found1[0]], args2 )
-
-    def __is_constructor_call( self, func, arg ):
-        #if '0.9' in func.compiler:
-        #    return False
-        call_invocation = declarations.call_invocation
-        dv = arg.default_value
-        if not call_invocation.is_call_invocation( dv ):
-            return False
-        name = call_invocation.name( dv )
-        base_type = declarations.base_type( arg.type )
-        if not isinstance( base_type, declarations.declarated_t ):
-            return False
-        decl = base_type.declaration
-        return decl.name == name \
-               or ( isinstance( decl, declarations.class_t ) \
-                    and name in map( lambda typedef: typedef.name, decl.aliases ) )
-
-    def __fix_constructor_call( self, func, arg ):
-        call_invocation = declarations.call_invocation
-        dv = arg.default_value
-        if not call_invocation.is_call_invocation( dv ):
-            return False
-        base_type = declarations.base_type( arg.type )
-        decl = base_type.declaration
-        name, args = call_invocation.split( dv )
-        if decl.name != name:
-            #we have some alias to the class
-            relevant_typedefs = filter( lambda typedef: typedef.name == name
-                                        , decl.aliases )
-            if 1 == len( relevant_typedefs ):
-                f_q_name = self.__join_names( declarations.full_name( relevant_typedefs[0].parent )
-                                              , name )
-            else:#in this case we can not say which typedef user uses:
-                f_q_name = self.__join_names( declarations.full_name( decl.parent )
-                                              , decl.name )
-        else:
-            f_q_name = self.__join_names( declarations.full_name( decl.parent ), name )
-
-        return call_invocation.join( f_q_name, args )
-
-class casting_operator_patcher_t( object ):
-    def __init__( self ):
-        object.__init__( self )
-
-    def __call__(self, decl):
-        decl.name = 'operator ' + decl.return_type.decl_string
-
-_casting_oper_patcher_ = casting_operator_patcher_t()
-
-def fix_calldef_decls(decls, enums):
-    default_arg_patcher = default_argument_patcher_t(enums)
-    #decls should be flat list of all declarations, you want to apply patch on
-    for decl in decls:
-        default_arg_patcher( decl )
-        if isinstance( decl, declarations.casting_operator_t):
-            _casting_oper_patcher_( decl )
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/scanner.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/scanner.py
deleted file mode 100644
index ee00a3b..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/scanner.py
+++ /dev/null
@@ -1,539 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-import os
-import types
-import pprint
-import xml.sax
-import warnings
-import xml.sax.handler
-from pygccxml.declarations import *
-from pygccxml import utils
-
-##convention
-#XML_NN - XML Node Name
-#XML_AN - XML Attribute Name
-#also those constants are sorted for easy searching.
-XML_AN_ABSTRACT = "abstract"
-XML_AN_ACCESS = "access"
-XML_AN_ALIGN = "align"
-XML_AN_ARTIFICIAL = "artificial"
-XML_AN_ATTRIBUTES = "attributes"
-XML_AN_BASE_TYPE = "basetype"
-XML_AN_BASES = "bases"
-XML_AN_BITS = "bits"
-XML_AN_CONST = "const"
-XML_AN_CONTEXT = "context"
-XML_AN_CVS_REVISION = "cvs_revision"
-XML_AN_DEFAULT = "default"
-XML_AN_DEMANGLED = "demangled"
-XML_AN_EXTERN = "extern"
-XML_AN_FILE = "file"
-XML_AN_ID = "id"
-XML_AN_INCOMPLETE = "incomplete"
-XML_AN_INIT = "init"
-XML_AN_LINE = "line"
-XML_AN_MANGLED = "mangled"
-XML_AN_MAX = "max"
-XML_AN_MEMBERS = "members"
-XML_AN_MUTABLE = "mutable"
-XML_AN_NAME = "name"
-XML_AN_OFFSET = "offset"
-XML_AN_PURE_VIRTUAL = "pure_virtual"
-XML_AN_RESTRICT = "restrict"
-XML_AN_RETURNS = "returns"
-XML_AN_SIZE = "size"
-XML_AN_STATIC = "static"
-XML_AN_THROW = "throw"
-XML_AN_TYPE = "type"
-XML_AN_VIRTUAL = "virtual"
-XML_AN_VOLATILE = "volatile"
-XML_NN_ARGUMENT = "Argument"
-XML_NN_ARRAY_TYPE = "ArrayType"
-XML_NN_CASTING_OPERATOR = "Converter"
-XML_NN_CLASS = "Class"
-XML_NN_CONSTRUCTOR = "Constructor"
-XML_NN_CV_QUALIFIED_TYPE = "CvQualifiedType"
-XML_NN_DESTRUCTOR = "Destructor"
-XML_NN_ELLIPSIS = "Ellipsis"
-XML_NN_ENUMERATION = "Enumeration"
-XML_NN_ENUMERATION_VALUE = "EnumValue"
-XML_NN_FIELD = "Field"
-XML_NN_FILE = "File"
-XML_NN_FUNCTION = "Function"
-XML_NN_FUNCTION_TYPE = "FunctionType"
-XML_NN_FUNDAMENTAL_TYPE = "FundamentalType"
-XML_NN_FREE_OPERATOR = "OperatorFunction"
-XML_NN_GCC_XML = "GCC_XML"
-XML_NN_MEMBER_OPERATOR = "OperatorMethod"
-XML_NN_METHOD = "Method"
-XML_NN_METHOD_TYPE = "MethodType"
-XML_NN_NAMESPACE = "Namespace"
-XML_NN_OFFSET_TYPE = "OffsetType"
-XML_NN_POINTER_TYPE = "PointerType"
-XML_NN_REFERENCE_TYPE = "ReferenceType"
-XML_NN_ROOT = "GCC_XML"
-XML_NN_STRUCT = "Struct"
-XML_NN_TYPEDEF = "Typedef"
-XML_NN_UNION = "Union"
-XML_NN_VARIABLE = "Variable"
-
-class scanner_t( xml.sax.handler.ContentHandler ):
-    def __init__(self, gccxml_file, decl_factory, *args ):
-        xml.sax.handler.ContentHandler.__init__(self, *args )
-        self.logger = utils.loggers.gccxml
-        self.gccxml_file = gccxml_file
-        #defining parsing tables
-        self.__readers = {
-               XML_NN_FILE : self.__read_file
-               , XML_NN_NAMESPACE : self.__read_namespace
-               , XML_NN_ENUMERATION : self.__read_enumeration
-               , XML_NN_ENUMERATION_VALUE : self.__read_enumeration_value
-               , XML_NN_ARRAY_TYPE : self.__read_array_type
-               , XML_NN_CV_QUALIFIED_TYPE : self.__read_cv_qualified_type
-               , XML_NN_POINTER_TYPE : self.__read_pointer_type
-               , XML_NN_REFERENCE_TYPE : self.__read_reference_type
-               , XML_NN_FUNDAMENTAL_TYPE : self.__read_fundamental_type
-               , XML_NN_ARGUMENT : self.__read_argument
-               , XML_NN_FUNCTION_TYPE : self.__read_function_type
-               , XML_NN_METHOD_TYPE : self.__read_method_type
-               , XML_NN_OFFSET_TYPE : self.__read_offset_type
-               , XML_NN_TYPEDEF : self.__read_typedef
-               , XML_NN_VARIABLE : self.__read_variable
-               , XML_NN_CLASS : self.__read_class
-               , XML_NN_STRUCT : self.__read_struct
-               , XML_NN_UNION : self.__read_union
-               , XML_NN_FIELD : self.__read_field
-               , XML_NN_CASTING_OPERATOR : self.__read_casting_operator
-               , XML_NN_CONSTRUCTOR : self.__read_constructor
-               , XML_NN_DESTRUCTOR : self.__read_destructor
-               , XML_NN_FUNCTION : self.__read_function
-               , XML_NN_FREE_OPERATOR : self.__read_free_operator
-               , XML_NN_MEMBER_OPERATOR : self.__read_member_operator
-               , XML_NN_METHOD : self.__read_method
-               , XML_NN_GCC_XML : self.__read_version
-               , XML_NN_ELLIPSIS : self.__read_ellipsis
-        }
-        self.deep_declarations = [
-            XML_NN_CASTING_OPERATOR
-            , XML_NN_CONSTRUCTOR
-            , XML_NN_DESTRUCTOR
-            , XML_NN_ENUMERATION
-            , XML_NN_FILE
-            , XML_NN_FUNCTION
-            , XML_NN_FREE_OPERATOR
-            , XML_NN_MEMBER_OPERATOR
-            , XML_NN_METHOD
-            , XML_NN_FUNCTION_TYPE
-            , XML_NN_METHOD_TYPE
-        ]
-
-        assert isinstance( decl_factory, decl_factory_t )
-        self.__decl_factory = decl_factory
-
-        #mapping from id -> decl
-        self.__declarations = {}
-        #list of all read declarations
-        self.__calldefs = []
-        #list of enums I need later
-        self.__enums = []
-        #mapping from id -> type
-        self.__types = {}
-        #mapping from id -> file
-        self.__files = {}
-        #mapping between decl id -> access
-        self.__access = {}
-        #current object under construction
-        self.__inst = None
-        #mapping from id to members
-        self.__members = {}
-
-        self.__compiler = None
-
-    def read( self ):
-        xml.sax.parse( self.gccxml_file, self )
-
-    def endDocument( self ):
-        #updating membership
-        members_mapping = {}
-        for gccxml_id, members in self.__members.iteritems():
-            decl = self.__declarations.get( gccxml_id, None )
-            if not decl or not isinstance( decl, scopedef_t):
-                continue
-            members_mapping[ id( decl ) ] = members
-        self.__members = members_mapping
-
-    def declarations(self):
-        return self.__declarations
-
-    def calldefs( self ):
-        return self.__calldefs
-
-    def enums(self):
-        return self.__enums
-
-    def types(self):
-        return self.__types
-
-    def files(self):
-        return self.__files
-
-    def access(self):
-        return self.__access
-
-    def members(self):
-        return self.__members
-
-    def startElementNS(self, name, qname, attrs):
-        return self.startElement( name[1], attrs )
-
-    def endElementNS(self, name, qname):
-        return self.endElement( name[1] )
-
-    def startElement(self, name, attrs):
-        try:
-            if name not in self.__readers:
-                return
-            obj = self.__readers[name]( attrs )
-            if not obj:
-                return #it means that we worked on internals
-                       #for example EnumValue of function argument
-            if name in self.deep_declarations:
-                self.__inst = obj
-            self.__read_access( attrs )
-            element_id = attrs.get(XML_AN_ID, None)
-            if isinstance( obj, declaration_t ):
-                obj.compiler = self.__compiler
-                self.__update_membership( attrs )
-                self.__declarations[ element_id ] = obj
-                if not isinstance( obj, namespace_t ):
-                    self.__read_location( obj, attrs )
-                if isinstance( obj, class_t):
-                    self.__read_bases( obj, attrs )
-                self.__read_artificial(obj, attrs)
-                self.__read_mangled( obj, attrs)
-                self.__read_demangled( obj, attrs)
-                self.__read_attributes(obj, attrs)
-
-            elif isinstance( obj, type_t ):
-                self.__types[ element_id ] = obj
-                self.__read_byte_size(obj, attrs)
-                self.__read_byte_align(obj, attrs)
-            elif isinstance( obj, types.StringTypes ):
-                self.__files[ element_id ] = obj
-            else:
-                self.logger.warning( 'Unknown object type has been found.'
-                                     + ' Please report this bug to pygccxml development team.' )
-        except Exception, error:
-            msg = 'error occured, while parsing element with name "%s" and attrs "%s".'
-            msg = msg + os.linesep + 'Error: %s.' % str( error )
-            self.logger.error( msg % ( name, pprint.pformat( attrs.keys() ) ) )
-            raise
-
-    def endElement(self, name):
-        if name in self.deep_declarations:
-            self.__inst = None
-
-    def __read_location(self, decl, attrs):
-        decl.location = location_t( file_name=attrs[XML_AN_FILE], line=int(attrs[XML_AN_LINE]))
-
-    def __update_membership(self, attrs):
-        parent = attrs.get( XML_AN_CONTEXT, None )
-        if not parent:
-            return
-        if not self.__members.has_key( parent ):
-            self.__members[ parent ] = []
-        self.__members[parent].append( attrs[XML_AN_ID] )
-
-    def __read_members(self, decl, attrs ):
-        decl.declarations = attrs.get(XML_AN_MEMBERS, "")
-
-    def __read_bases(self, decl, attrs ):
-        decl.bases = attrs.get( XML_AN_BASES, "" )
-
-    def __read_artificial( self, decl, attrs ):
-        decl.is_artificial = attrs.get( XML_AN_ARTIFICIAL, False )
-
-    def __read_mangled( self, decl, attrs ):
-        decl.mangled = attrs.get( XML_AN_MANGLED, None )
-
-    def __read_demangled( self, decl, attrs ):
-        decl.demangled = attrs.get( XML_AN_DEMANGLED, None )
-
-    def __read_attributes( self, decl, attrs ):
-        decl.attributes = attrs.get( XML_AN_ATTRIBUTES, None )
-
-    def __read_access( self, attrs ):
-        self.__access[ attrs[XML_AN_ID] ] = attrs.get( XML_AN_ACCESS, ACCESS_TYPES.PUBLIC )
-
-    def __read_byte_size (self, decl, attrs):
-        "Using duck typing to set the size instead of in constructor"
-        size = attrs.get(XML_AN_SIZE, 0)
-        decl.byte_size = int(size)/8 # Make sure the size is in bytes instead of bits
-
-    def __read_byte_offset (self, decl, attrs):
-        "Using duck typing to set the offset instead of in constructor"
-        offset = attrs.get(XML_AN_OFFSET, 0)
-        decl.byte_offset = int(offset)/8 # Make sure the size is in bytes instead of bits
-
-    def __read_byte_align (self, decl, attrs):
-        "Using duck typing to set the alignment"
-        align = attrs.get(XML_AN_ALIGN, 0)
-        decl.byte_align = int(align)/8 # Make sure the size is in bytes instead of bits
-
-    def __read_root(self, attrs):
-        pass
-
-    def __read_file( self, attrs ):
-        return attrs.get( XML_AN_NAME, '' )
-
-    def __read_namespace(self, attrs):
-        ns_name = attrs.get( XML_AN_NAME, '' )
-        if '.' in ns_name:
-            #if '.' in namespace then this is mangled namespace -> in c++ namespace{...}
-            #that is almost true: gcc mangale name using top file name.
-            #almost all files has '.' in name
-            ns_name = ''
-        return self.__decl_factory.create_namespace( name=ns_name )
-
-    def __read_enumeration(self, attrs):
-        enum_name = attrs.get( XML_AN_NAME, '' )
-        if '$_' in enum_name or '._' in enum_name:
-            #it means that this is unnamed enum. in c++ enum{ x };
-            enum_name = ''
-        decl = self.__decl_factory.create_enumeration( name=enum_name )
-        self.__read_byte_size(decl, attrs)
-        self.__read_byte_align(decl, attrs)
-        self.__enums.append( decl )
-        return decl
-
-    def __read_enumeration_value( self, attrs ):
-        name = attrs.get( XML_AN_NAME, '' )
-        num = int(attrs[XML_AN_INIT])
-        self.__inst.append_value(name, num)
-
-    def __guess_int_value( self, value_as_str ):
-        #returns instance of int or None
-        #if gcc compiled the code, than it is correct!
-        numeric_suffix_letters = 'UuLlFf'
-        for s in numeric_suffix_letters:
-            value_as_str = value_as_str.replace( s, '' )
-        try:
-            return int( value_as_str )
-        except ValueError:
-            try:
-                return int( value_as_str, 16 )
-            except ValueError:
-                return None
-
-    def __read_array_type( self, attrs ):
-        type_ = attrs[ XML_AN_TYPE ]
-        size = self.__guess_int_value( attrs.get(XML_AN_MAX, '' ) )
-        if size is None:
-            size = array_t.SIZE_UNKNOWN
-            msg = 'unable to find out array size from expression "%s"' % attrs[ XML_AN_MAX ]
-            # warning is absolutely useless without much clue
-            # warnings.warn( msg )
-        return array_t( type_, size + 1 )
-
-    def __read_cv_qualified_type( self, attrs ):
-        if attrs.has_key( XML_AN_CONST ):
-            return const_t( attrs[XML_AN_TYPE] )
-        elif attrs.has_key( XML_AN_VOLATILE ):
-            return volatile_t( attrs[XML_AN_TYPE] )
-        elif attrs.has_key( XML_AN_RESTRICT ):
-            return restrict_t( attrs[XML_AN_TYPE] )
-        else:
-            assert 0
-
-    def __read_pointer_type( self, attrs ):
-        return pointer_t( attrs[XML_AN_TYPE] )
-
-    def __read_reference_type( self, attrs ):
-        return reference_t( attrs[XML_AN_TYPE] )
-
-    def __read_fundamental_type(self, attrs ):
-        try:
-            return FUNDAMENTAL_TYPES[ attrs.get( XML_AN_NAME, '' ) ]
-        except KeyError:
-            raise RuntimeError( "pygccxml error: unable to find fundamental type with name '%s'."
-                                % attrs.get( XML_AN_NAME, '' ) )
-
-    def __read_offset_type( self,attrs ):
-        base = attrs[ XML_AN_BASE_TYPE ]
-        type_ = attrs[ XML_AN_TYPE ]
-        if '0.9' in self.__compiler:
-            return pointer_t( member_variable_type_t( class_inst=base, variable_type=type_ ) )
-        else:
-            return member_variable_type_t( class_inst=base, variable_type=type_ )
-
-    def __read_argument( self, attrs ):
-        if isinstance( self.__inst, calldef_type_t ):
-            self.__inst.arguments_types.append( attrs[XML_AN_TYPE] )
-        else:
-            argument = argument_t()
-            argument.name = attrs.get( XML_AN_NAME, 'arg%d' % len(self.__inst.arguments) )
-            argument.type = attrs[XML_AN_TYPE]
-            argument.default_value = attrs.get( XML_AN_DEFAULT, None )
-            self.__read_attributes( argument, attrs )
-            if argument.default_value == '<gccxml-cast-expr>':
-                argument.default_value = None
-            self.__inst.arguments.append( argument )
-
-    def __read_ellipsis( self, attrs ):
-        if isinstance( self.__inst, calldef_type_t ):
-            self.__inst.arguments_types.append( '...' )
-        else:
-            argument = argument_t( type='...' )
-            self.__inst.arguments.append( argument )
-
-    def __read_calldef( self, calldef, attrs, is_declaration ):
-        #destructor for example doesn't have return type
-        calldef.return_type =  attrs.get( XML_AN_RETURNS, None )
-        if is_declaration:
-            self.__calldefs.append( calldef )
-            calldef.name = attrs.get(XML_AN_NAME, '')
-            calldef.has_extern = attrs.get( XML_AN_EXTERN, False )
-            throw_stmt = attrs.get( XML_AN_THROW, None )
-            if None is throw_stmt:
-                calldef.does_throw = True
-                calldef.exceptions = []
-            elif "" == throw_stmt:
-                calldef.does_throw = False
-                calldef.exceptions = []
-            else:
-                calldef.does_throw = True
-                calldef.exceptions = throw_stmt.split()
-
-    def __read_member_function( self, calldef, attrs, is_declaration ):
-        self.__read_calldef( calldef, attrs, is_declaration )
-        calldef.has_const = attrs.get( XML_AN_CONST, False )
-        if is_declaration:
-            calldef.has_static = attrs.get( XML_AN_STATIC, False )
-            if attrs.has_key( XML_AN_PURE_VIRTUAL ):
-                calldef.virtuality = VIRTUALITY_TYPES.PURE_VIRTUAL
-            elif attrs.has_key( XML_AN_VIRTUAL ):
-                calldef.virtuality = VIRTUALITY_TYPES.VIRTUAL
-            else:
-                calldef.virtuality = VIRTUALITY_TYPES.NOT_VIRTUAL
-        else:
-            calldef.class_inst = attrs[XML_AN_BASE_TYPE]
-
-    def __read_function_type(self, attrs):
-        answer = free_function_type_t()
-        self.__read_calldef( answer, attrs, False )
-        return answer
-
-    def __read_method_type(self, attrs):
-        answer = member_function_type_t()
-        self.__read_member_function( answer, attrs, False )
-        return answer
-
-    def __read_typedef(self, attrs ):
-        return self.__decl_factory.create_typedef( name=attrs.get( XML_AN_NAME, '' ), type=attrs[XML_AN_TYPE])
-
-    def __read_variable(self, attrs ):
-        type_qualifiers = type_qualifiers_t()
-        type_qualifiers.has_mutable = attrs.get(XML_AN_MUTABLE, False)
-        type_qualifiers.has_static = attrs.get(XML_AN_EXTERN, False)
-        bits = attrs.get( XML_AN_BITS, None )
-        if bits:
-            bits = int( bits )
-        decl = self.__decl_factory.create_variable( name=attrs.get( XML_AN_NAME, '' )
-                                                    , type=attrs[XML_AN_TYPE]
-                                                    , type_qualifiers=type_qualifiers
-                                                    , value=attrs.get( XML_AN_INIT, None )
-                                                    , bits=bits)
-        self.__read_byte_offset(decl, attrs)
-        return decl
-
-    __read_field = __read_variable #just a synonim
-
-    def __read_class_impl(self, class_type, attrs):
-        decl = None
-        name = attrs.get(XML_AN_NAME, '')
-        if '$' in name or '.' in name:
-            name = ''
-        if attrs.has_key( XML_AN_INCOMPLETE ):
-            decl = self.__decl_factory.create_class_declaration(name=name)
-        else:
-            decl = self.__decl_factory.create_class( name=name, class_type=class_type )
-            if attrs.get( XML_AN_ABSTRACT, False ):
-                decl.is_abstract = True
-            else:
-                decl.is_abstract = False
-        self.__read_byte_size(decl, attrs)
-        self.__read_byte_align(decl, attrs)
-        return decl
-
-    def __read_class( self, attrs ):
-        return self.__read_class_impl( CLASS_TYPES.CLASS, attrs )
-
-    def __read_struct( self, attrs ):
-        return self.__read_class_impl( CLASS_TYPES.STRUCT, attrs )
-
-    def __read_union( self, attrs ):
-        return self.__read_class_impl( CLASS_TYPES.UNION, attrs )
-
-    def __read_casting_operator(self, attrs ):
-        operator = self.__decl_factory.create_casting_operator()
-        self.__read_member_function( operator, attrs, True )
-        return operator
-
-    def __read_constructor( self, attrs ):
-        constructor = self.__decl_factory.create_constructor()
-        self.__read_member_function( constructor, attrs, True )
-        return constructor
-
-    def __read_function(self, attrs):
-        gfunction = self.__decl_factory.create_free_function()
-        self.__read_calldef( gfunction, attrs, True )
-        return gfunction
-
-    def __read_method(self, attrs):
-        mfunction = self.__decl_factory.create_member_function()
-        self.__read_member_function( mfunction, attrs, True )
-        return mfunction
-
-    def __read_destructor(self, attrs):
-        destructor = self.__decl_factory.create_destructor()
-        self.__read_member_function( destructor, attrs, True )
-        destructor.name = '~' + destructor.name
-        return destructor
-
-    def __read_free_operator(self, attrs ):
-        operator = self.__decl_factory.create_free_operator()
-        self.__read_member_function( operator, attrs, True )
-        if 'new' in operator.name or 'delete' in operator.name:
-            operator.name = 'operator ' + operator.name
-        else:
-            operator.name = 'operator' + operator.name
-        return operator
-
-    def __read_member_operator(self, attrs):
-        operator = self.__decl_factory.create_member_operator()
-        self.__read_member_function( operator, attrs, True )
-        if 'new' in operator.name or 'delete' in operator.name:
-            operator.name = 'operator ' + operator.name
-        else:
-            operator.name = 'operator' + operator.name
-        return operator
-
-    def __read_version(self, attrs):
-        logger = utils.loggers.cxx_parser
-
-        version = float( attrs.get(XML_AN_CVS_REVISION, 0.6) )
-        if version is None:
-            logger.info ( 'GCCXML version - 0.6' )
-            self.__compiler = compilers.GCC_XML_06
-        elif version <= 1.114:
-            logger.info ( 'GCCXML version - 0.7' )
-            self.__compiler = compilers.GCC_XML_07
-        elif version in ( 1.115, 1.116, 1.117, 1.118, 1.119, 1.120, 1.121 ):
-            logger.info ( 'GCCXML version - 0.9 BUGGY' )
-            self.__compiler = compilers.GCC_XML_09_BUGGY
-        else:
-            logger.info ( 'GCCXML version - 0.9' )
-            self.__compiler = compilers.GCC_XML_09
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/source_reader.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/source_reader.py
deleted file mode 100644
index 129c34b..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/source_reader.py
+++ /dev/null
@@ -1,345 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-import os
-import sys
-import linker
-import config
-import patcher
-import pygccxml.utils
-
-try: #select the faster xml parser
-    from etree_scanner import etree_scanner_t as scanner_t
-except:
-    from scanner import scanner_t
-
-import declarations_cache
-from pygccxml import utils
-from pygccxml.declarations import *
-
-class gccxml_runtime_error_t( RuntimeError ):
-    def __init__( self, msg ):
-        RuntimeError.__init__( self, msg )
-
-def bind_aliases( decls ):
-    """
-    This function binds between class and it's typedefs.
-
-    @param decls: list of all declarations
-    @type all_classes: list of L{declaration_t} items
-
-    @return: None
-    """
-    visited = set()
-    typedefs = filter( lambda decl: isinstance( decl, typedef_t ), decls )
-    for decl in typedefs:
-        type_ = remove_alias( decl.type )
-        if not isinstance( type_, declarated_t ):
-            continue
-        cls_inst = type_.declaration
-        if not isinstance( cls_inst, class_types ):
-            continue
-        if id( cls_inst ) not in visited:
-            visited.add( id( cls_inst ) )
-            del cls_inst.aliases[:]
-        cls_inst.aliases.append( decl )
-
-class source_reader_t:
-    """
-    This class reads C++ source code and returns declarations tree.
-
-    This class is the only class that have an intime knowledge about GCC-XML.
-    It has only one responsibility: it calls GCC-XML with a source file specified
-    by user and creates declarations tree. The implementation of this class is split
-    to 2 classes:
-
-    1. L{scanner_t} - this class scans the "XML" file, generated by GCC-XML and
-       creates `pygccxml`_ declarations and types classes. After the xml file has
-       been processed declarations and type class instances keeps references to
-       each other using GCC-XML generated id's.
-
-    2. L{linker_t} - this class contains logic for replacing GCC-XML generated
-       ids with references to declarations or type class instances.
-    """
-    def __init__( self, config, cache=None, decl_factory=None ):
-        """
-        @param config: instance of L{config_t} class, that contains GCC-XML
-                       configuration
-        @type config: L{config_t}
-
-        @param cache: reference to cache object, that will be updated after
-                      file has been parsed.
-        @param cache: instance of class, that derives from {cache_base_t}
-
-        @param decl_factory: declarations factory, if not given default
-                             declarations factory L{decl_factory_t} will be used
-        """
-        self.logger = utils.loggers.cxx_parser
-        self.__search_directories = []
-        self.__config = config
-        self.__search_directories.append( config.working_directory )
-        self.__search_directories.extend( config.include_paths )
-        if not cache:
-            cache = declarations_cache.dummy_cache_t()
-        self.__dcache = cache
-        self.__config.raise_on_wrong_settings()
-        self.__decl_factory = decl_factory
-        if not decl_factory:
-            self.__decl_factory = decl_factory_t()
-
-    def __create_command_line(self, file, xmlfile):
-        assert isinstance( self.__config, config.config_t )
-        #returns
-        cmd = []
-        #first is gccxml executable
-        if 'win32' in sys.platform:
-            cmd.append( '"%s"' % os.path.normpath( self.__config.gccxml_path ) )
-        else:
-            cmd.append(  '%s' % os.path.normpath( self.__config.gccxml_path ) )
-
-        # Add all cflags passed
-        if self.__config.cflags != "":
-            cmd.append(" %s "%self.__config.cflags)
-        #second all additional includes directories
-        cmd.append( ''.join( [' -I"%s"' % search_dir for search_dir in self.__search_directories] ) )
-        #third all additional defined symbols
-        cmd.append( ''.join( [' -D"%s"' % defined_symbol for defined_symbol in self.__config.define_symbols] ) )
-        cmd.append( ''.join( [' -U"%s"' % undefined_symbol for undefined_symbol in self.__config.undefine_symbols] ) )
-        #fourth source file
-        cmd.append( '"%s"' % file )
-        #five destination file
-        cmd.append( '-fxml="%s"' % xmlfile )
-        if self.__config.start_with_declarations:
-            cmd.append( '-fxml-start="%s"' % ','.join( self.__config.start_with_declarations ) )
-        # Specify compiler if asked to
-        if self.__config.compiler:
-            cmd.append( " --gccxml-compiler %s" % self.__config.compiler )
-        cmd_line = ' '.join(cmd)
-        if 'win32' in sys.platform :
-            cmd_line = '"%s"' % cmd_line
-        self.logger.info( 'gccxml cmd: %s' % cmd_line )
-        return cmd_line
-
-    def create_xml_file( self, header, destination=None ):
-        """
-        This function will return the file name of the file, created by GCC-XML
-        for "header" file. If destination_file_path is not None, then this file
-        path will be used and returned.
-
-        @param header: path to source file, that should be parsed
-        @type header: str
-
-        @param destination: if given, will be used as target file/path for
-                            GCC-XML generated file.
-        @type destination: str
-
-        @return: path to GCC-XML generated file
-        """
-        gccxml_file = destination
-        # If file specified, remove it to start else create new file name
-        if gccxml_file:
-            pygccxml.utils.remove_file_no_raise( gccxml_file )
-        else:
-            gccxml_file = pygccxml.utils.create_temp_file_name( suffix='.xml' )
-        try:
-            ffname = header
-            if not os.path.isabs( ffname ):
-                  ffname = self.__file_full_name(header)
-            command_line = self.__create_command_line( ffname, gccxml_file )
-            input_, output = os.popen4( command_line )
-            input_.close()
-            gccxml_reports = []
-            while True:
-                  data = output.readline()
-                  gccxml_reports.append( data )
-                  if not data:
-                       break
-            exit_status = output.close()
-            gccxml_msg = ''.join(gccxml_reports)
-            if self.__config.ignore_gccxml_output:
-                if not os.path.isfile(gccxml_file):
-                    raise gccxml_runtime_error_t( "Error occured while running GCC-XML: %s status:%s" % (gccxml_msg, exit_status) )
-            else:
-                if gccxml_msg or exit_status or not os.path.isfile(gccxml_file):
-                    raise gccxml_runtime_error_t( "Error occured while running GCC-XML: %s" % gccxml_msg )
-        except Exception, error:
-            pygccxml.utils.remove_file_no_raise( gccxml_file )
-            raise error
-        return gccxml_file
-
-    def create_xml_file_from_string( self, content, destination=None ):
-        """
-        Creates XML file from text.
-
-        @param content: C++ source code
-        @type content: str
-
-        @param destination: file name for GCC-XML generated file
-        @type destination: str
-
-        @return: returns file name of GCC-XML generated file
-        """
-        header_file = pygccxml.utils.create_temp_file_name( suffix='.h' )
-        gccxml_file = None
-        try:
-            header_file_obj = file(header_file, 'w+')
-            header_file_obj.write( content )
-            header_file_obj.close()
-            gccxml_file = self.create_xml_file( header_file, destination )
-        finally:
-            pygccxml.utils.remove_file_no_raise( header_file )
-        return gccxml_file
-
-    def read_file( self, source_file ):
-        if isinstance( self.__config, config.gccxml_configuration_t ):
-            return self.read_gccxml_file( source_file )
-        else:
-            return self.read_synopsis_file( source_file )
-
-    def read_gccxml_file(self, source_file):
-        """
-        Reads C++ source file and returns declarations tree
-
-        @param source_file: path to C++ source file
-        @type source_file: str
-        """
-        declarations, types = None, None
-        gccxml_file = ''
-        try:
-            ffname = self.__file_full_name(source_file)
-            self.logger.debug( "Reading source file: [%s]." % ffname )
-            declarations = self.__dcache.cached_value( ffname, self.__config )
-            if not declarations:
-                self.logger.debug( "File has not been found in cache, parsing..." )
-                gccxml_file = self.create_xml_file( ffname )
-                declarations, files = self.__parse_gccxml_created_file( gccxml_file )
-                self.__dcache.update( ffname, self.__config, declarations, files )
-            else:
-                self.logger.debug( "File has not been changed, reading declarations from cache." )
-        except Exception, error:
-            if gccxml_file:
-                pygccxml.utils.remove_file_no_raise( gccxml_file )
-            raise error
-        if gccxml_file:
-            pygccxml.utils.remove_file_no_raise( gccxml_file )
-        return declarations
-
-    def read_xml_file(self, gccxml_created_file):
-        """
-        Reads GCC-XML generated XML file.
-
-        @param gccxml_created_file: path to GCC-XML generated file
-        @type gccxml_created_file: str
-
-        @return: declarations tree
-        """
-        assert(self.__config!=None)
-
-        ffname = self.__file_full_name(gccxml_created_file)
-        self.logger.debug( "Reading xml file: [%s]" % gccxml_created_file )
-        declarations = self.__dcache.cached_value( ffname, self.__config )
-        if not declarations:
-            self.logger.debug( "File has not been found in cache, parsing..." )
-            declarations, files = self.__parse_gccxml_created_file( ffname )
-            self.__dcache.update( ffname, self.__config, declarations, [] )
-        else:
-            self.logger.debug( "File has not been changed, reading declarations from cache." )
-
-        return declarations
-
-    def read_string(self, content):
-        """
-        Reads Python string, that contains valid C++ code, and returns
-        declarations tree.
-        """
-        header_file = pygccxml.utils.create_temp_file_name( suffix='.h' )
-        header_file_obj = file(header_file, 'w+')
-        header_file_obj.write( content )
-        header_file_obj.close()
-        declarations = None
-        try:
-            declarations = self.read_file( header_file )
-        except Exception, error:
-            pygccxml.utils.remove_file_no_raise( header_file )
-            raise error
-        pygccxml.utils.remove_file_no_raise( header_file )
-        return declarations
-
-    def __file_full_name( self, file ):
-        if os.path.isfile( file ):
-            return file
-        for path in self.__search_directories:
-            file_path = os.path.join( path, file )
-            if os.path.isfile( file_path ):
-                  return file_path
-        raise RuntimeError( "pygccxml error: file '%s' does not exist" % file )
-
-    def __produce_full_file( self, file_path ):
-        if 'win' in sys.platform or 'linux' in sys.platform:
-            file_path = file_path.replace( r'\/', os.path.sep )
-        if os.path.isabs( file_path ):
-            return file_path
-        try:
-            abs_file_path = os.path.realpath( os.path.join( self.__config.working_directory, file_path ) )
-            if os.path.exists( abs_file_path ):
-                return os.path.normpath( abs_file_path )
-            return file_path
-        except Exception:
-            return file_path
-
-    def __parse_gccxml_created_file( self, gccxml_file ):
-        scanner_ = scanner_t( gccxml_file, self.__decl_factory )
-        scanner_.read()
-        decls = scanner_.declarations()
-        types = scanner_.types()
-        files = {}
-        for file_id, file_path in scanner_.files().iteritems():
-            files[file_id] = self.__produce_full_file(file_path)
-        linker_ = linker.linker_t( decls=decls
-                                   , types=types
-                                   , access=scanner_.access()
-                                   , membership=scanner_.members()
-                                   , files=files )
-        for type_ in types.values():
-            #I need this copy because internaly linker change types collection
-            linker_.instance = type_
-            apply_visitor( linker_, type_ )
-        for decl in decls.itervalues():
-            linker_.instance = decl
-            apply_visitor( linker_, decl )
-        bind_aliases( decls.itervalues() )
-        #some times gccxml report typedefs defined in no namespace
-        #it happens for example in next situation
-        #template< typename X>
-        #void ddd(){ typedef typename X::Y YY;}
-        #if I will fail on this bug next time, the right way to fix it may be different
-        patcher.fix_calldef_decls( scanner_.calldefs(), scanner_.enums() )
-        decls = filter( lambda inst: isinstance( inst, namespace_t ) and not inst.parent
-                        , decls.itervalues()  )
-        return ( decls, files.values() )
-
-    def read_synopsis_file( self, source_file ):
-        import synopsis_scanner
-        from Synopsis import AST
-        from Synopsis.Parsers import Cxx
-
-        ffname = self.__file_full_name(source_file)
-
-        cppflags = []
-        map( lambda dpath: cppflags.append( '-I %s' % dpath )
-             , self.__config.include_paths )
-        map( lambda define: cppflags.append( '-D %s' % define )
-             , self.__config.define_symbols )
-        map( lambda define: cppflags.append( '-U %s' % define )
-             , self.__config.undefine_symbols )
-
-        cxx = Cxx.Parser( preprocess=True, cppflags=cppflags )
-        ast = AST.AST()
-        cxx.process( ast, input=[source_file] )
-        scanner = synopsis_scanner.scanner_t( ast, self.__decl_factory )
-        scanner.visitAST( ast )
-        declarations = [scanner.global_ns]
-        self.__dcache.update( ffname, self.__config, declarations, [] )
-        return declarations
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/utils/__init__.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/utils/__init__.py
deleted file mode 100644
index 92d93c7..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/utils/__init__.py
+++ /dev/null
@@ -1,156 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-"""
-defines logger classes and few convinience methods, not related to the declarations
-tree
-"""
-
-import os
-import sys
-import logging
-import tempfile
-from fs_utils import files_walker
-from fs_utils import directories_walker
-
-def _create_logger_( name ):
-    """implementation details"""
-    logger = logging.getLogger(name)
-    handler = logging.StreamHandler()
-    #handler.setFormatter( logging.Formatter( os.linesep + '%(levelname)s %(message)s' ) )
-    handler.setFormatter( logging.Formatter( '%(levelname)s %(message)s' ) )
-    logger.addHandler(handler)
-    logger.setLevel(logging.WARNING)
-    return logger
-
-class loggers:
-    """class-namespace, defines few loggers classes, used in the project"""
-
-    cxx_parser = _create_logger_( 'pygccxml.cxx_parser' )
-    """logger for C++ parser functionality
-
-    If you set this logger level to DEBUG, you will be able to see the exact
-    command line, used to invoke GCC-XML  and errors that occures during XML parsing
-    """
-
-    gccxml = cxx_parser #backward compatability
-
-    pdb_reader = _create_logger_( 'pygccxml.pdb_reader' )
-    """logger for MS .pdb file reader functionality
-    """
-
-
-    queries_engine = _create_logger_( 'pygccxml.queries_engine' )
-    """logger for query engine functionality.
-
-    If you set this logger level to DEBUG, you will be able to see what queries
-    you do against declarations tree, measure performance and may be even to improve it.
-    Query engine reports queries and whether they are optimized or not.
-    """
-
-    declarations_cache = _create_logger_( 'pygccxml.declarations_cache' )
-    """logger for declarations tree cache functionality
-
-    If you set this logger level to DEBUG, you will be able to see what is exactly
-    happens, when you read the declarations from cache file. You will be able to
-    decide, whether it worse for you to use this or that cache strategy.
-    """
-
-    root = logging.getLogger( 'pygccxml' )
-    """root logger exists for your convinience only"""
-
-    all = [ root, cxx_parser, queries_engine, declarations_cache, pdb_reader ]
-    """contains all logger classes, defined by the class"""
-
-def remove_file_no_raise(file_name ):
-    """removes file from disk, if exception is raised, it silently ignores it"""
-    try:
-        if os.path.exists(file_name):
-            os.remove( file_name )
-    except Exception, error:
-        loggers.root.error( "Error ocured while removing temprorary created file('%s'): %s"
-                            % ( file_name, str( error ) ) )
-
-def create_temp_file_name(suffix, prefix=None, dir=None):
-    """small convinience function that creates temporal file.
-
-    This function is a wrapper aroung Python built-in function - tempfile.mkstemp
-    """
-    if not prefix:
-        prefix = tempfile.template
-    fd, name = tempfile.mkstemp( suffix=suffix, prefix=prefix, dir=dir )
-    file_obj = os.fdopen( fd )
-    file_obj.close()
-    return name
-
-def normalize_path( some_path ):
-    """return os.path.normpath( os.path.normcase( some_path ) )"""
-    return os.path.normpath( os.path.normcase( some_path ) )
-
-def get_architecture():
-    """returns computer architecture: 32 or 64.
-
-    The guess is based on maxint.
-    """
-    if sys.maxint == 2147483647:
-        return 32
-    elif sys.maxint == 9223372036854775807:
-        return 64
-    else:
-        raise RuntimeError( "Unknown architecture" )
-
-
-#The following code is cut-and-paste from this post:
-#http://groups.google.com/group/comp.lang.python/browse_thread/thread/5b71896c06bd0f76/
-#Thanks to Michele Simionato, for it
-class cached(property):
-    'Convert a method into a cached attribute'
-    def __init__(self, method):
-        private = '_' + method.__name__
-        def fget(s):
-            try:
-                return getattr(s, private)
-            except AttributeError:
-                value = method(s)
-                setattr(s, private, value)
-                return value
-        def fdel(s):
-            del s.__dict__[private]
-        super(cached, self).__init__(fget, fdel=fdel)
-
-    @staticmethod
-    def reset(self):
-        cls = self.__class__
-        for name in dir(cls):
-            attr = getattr(cls, name)
-            if isinstance(attr, cached):
-                delattr(self, name)
-
-class enum( object ):
-    """Usage example:
-        class fruits(enum):
-            apple = 0
-            orange = 1
-
-        fruits.has_value( 1 )
-        fruits.name_of( 1 )
-    """
-
-    @classmethod
-    def has_value( cls, enum_numeric_value ):
-        for name, value in cls.__dict__.iteritems():
-            if enum_numeric_value == value:
-                return True
-        else:
-            return False
-
-    @classmethod
-    def name_of( cls, enum_numeric_value ):
-        for name, value in cls.__dict__.iteritems():
-            if enum_numeric_value == value:
-                return name
-        else:
-            raise RuntimeError( 'Unable to find name for value(%d) in enumeration "%s"'
-                                % ( enum_numeric_value, cls.__name__ ) )
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/utils/fs_utils.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/utils/fs_utils.py
deleted file mode 100644
index 3d01e31..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/utils/fs_utils.py
+++ /dev/null
@@ -1,136 +0,0 @@
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-import os
-from types import *
-
-##If you want include files that doesn't have extension then use filter like '*.'
-
-def _make_list( argument ):
-    if type(argument) in StringTypes:
-        if argument:
-            return [argument]
-        else:
-            return []
-    elif type(argument) is ListType:
-        return argument
-    else:
-        raise TypeError( 'Argument "%s" must be or list of strings or string.' % argument )
-
-class base_files_iterator:
-    def __init__(self, file_exts, is_include_exts = True):
-        self.__file_exts = _make_list( file_exts )
-        self.__is_include_exts = is_include_exts
-
-    def _is_to_skip(self, file_path):
-        if not self.__file_exts:
-            return 0
-        file_ext = os.path.splitext( file_path )[1]
-        if not file_ext:
-            file_ext = '.' + file_ext
-        file_ext = '*' + file_ext
-        if file_ext.lower() in self.__file_exts:
-            return not self.__is_include_exts
-        else:
-            return self.__is_include_exts
-
-    def _subdirectories_and_files(self, directory_path):
-        files, directories = [], []
-        directory_contents = os.listdir(directory_path)
-        for object_name in directory_contents:
-            object_path = os.path.join(directory_path, object_name)
-            if os.path.isfile( object_path ) and not self._is_to_skip( object_path ):
-                files.append( object_path )
-            elif os.path.isdir( object_path ):
-                directories.append( object_path )
-            else:
-                pass
-        return directories, files
-
-    def __iter__(self):
-        raise NotImplementedError
-
-    def next(self):
-        raise NotImplementedError
-
-    def restart(self):
-        raise NotImplementedError
-
-class files_walker(base_files_iterator):
-    def __init__(self, directories, file_ext_filter = '', is_include_filter = True, is_recursive = True):
-        base_files_iterator.__init__(self, file_ext_filter, is_include_filter)
-        self.__directories = _make_list( directories )
-        self.__is_recursive = is_recursive
-        self.__file_generator = None
-
-    def __walk(self):
-        directories = self.__directories[:]
-        while directories:
-            sub_directories, files = self._subdirectories_and_files( directories.pop(0) )
-            if self.__is_recursive:
-                for directory in sub_directories:
-                    directories.append( directory )
-            for file_os in files:
-                yield file_os
-
-    def __iter__(self):
-        self.__file_generator = self.__walk()
-        return self
-
-    def next(self):
-        return self.__file_generator.next()
-
-    def restart(self):
-        self.__file_generator = None
-
-
-class directories_walker:
-    def __init__(self, directories, is_recursive = 1):
-        self.__directories = []
-        for root in _make_list( directories ):
-            self.__directories.extend( self.__sub_directories( root ) )
-        self.__is_recursive = is_recursive
-        self.__directory_generator = None
-
-    def __sub_directories(self, directory_path):
-        sub_directories = []
-        directory_contains = os.listdir(directory_path)
-        for object_in_directory in directory_contains:
-            full_path = os.path.join(directory_path, object_in_directory)
-            if os.path.isdir( full_path ):
-                sub_directories.append( full_path )
-        return sub_directories
-
-    def __walk(self):
-        directories = self.__directories[:]
-        for curr_directory in directories:
-            yield curr_directory
-            if self.__is_recursive:
-                for f in directories_walker( [curr_directory], True ):
-                    yield f
-
-    def __iter__(self):
-        self.__directory_generator = self.__walk()
-        return self
-
-    def next(self):
-        return self.__directory_generator.next()
-
-    def restart(self):
-        self.__directory_generator = None
-
-
-if '__main__' == __name__:
-    pass
-    #lFileCount = 0
-    #for file_os in files_iterator( r'C:\Program Files\Microsoft Visual Studio\VC98\Include\stlport', ['*.h', '*.'], True, False):
-        #print file_os
-        #lFileCount += 1
-    #print lFileCount
-
-    #~ for directory in directories_iterator( '/home/roman/language-binding', False ):
-        #~ print directory
-    #~ for directory in directories_iterator( '/home/roman/language-binding', True ):
-        #~ print directory
diff --git a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/setup.py b/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/setup.py
deleted file mode 100644
index b435aa7..0000000
--- a/Utilities/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/setup.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2004-2008 Roman Yakovenko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-import sys, os, os.path
-from distutils import sysconfig
-from distutils.core import setup
-from distutils.cmd import Command
-
-def generate_doc():
-    """Generate the epydoc reference manual.
-    """
-    print "Generating epydoc files..."
-
-    from epydoc.docbuilder import build_doc_index
-    from epydoc.docwriter.html import HTMLWriter
-
-    docindex = build_doc_index(['pygccxml'])
-    html_writer = HTMLWriter( docindex
-                              , prj_name='pygccxml'
-                              , prj_url='http://www.language-binding.net'
-                              , show_private=False
-                              , show_frames=False)
-
-    html_writer.write( os.path.join('docs', 'apidocs') )
-
-class doc_cmd(Command):
-    """This is a new distutils command 'doc' to build the epydoc manual.
-    """
-
-    description = 'build the API reference using epydoc'
-    user_options = [('no-doc', None, "don't run epydoc")]
-    boolean_options = ['no-doc']
-
-    def initialize_options (self):
-        self.no_doc = 0
-
-    def finalize_options (self):
-        pass
-
-    def run(self):
-        if self.no_doc:
-            return
-        generate_doc()
-
-
-# Generate the doc when a source distribution is created
-if sys.argv[-1]=="sdist":
-    generate_doc()
-
-
-setup( name = "pygccxml",
-       version = "1.0.0",
-       description = "GCC-XML generated file reader",
-       author = "Roman Yakovenko",
-       author_email = "roman.yakovenko at gmail.com",
-       url = 'http://www.language-binding.net/pygccxml/pygccxml.html',
-       packages = [ 'pygccxml',
-                    'pygccxml.declarations',
-                    'pygccxml.parser',
-                    'pygccxml.msvc',
-                    'pygccxml.msvc.bsc',
-                    'pygccxml.msvc.pdb',
-                    'pygccxml.utils' ],
-       cmdclass = {"doc" : doc_cmd}
-)
diff --git a/Utilities/ITK/Wrapping/Generators/Tcl/CreateLanguageSupport.cmake b/Utilities/ITK/Wrapping/Generators/Tcl/CreateLanguageSupport.cmake
index d2cf899..990af7e 100644
--- a/Utilities/ITK/Wrapping/Generators/Tcl/CreateLanguageSupport.cmake
+++ b/Utilities/ITK/Wrapping/Generators/Tcl/CreateLanguageSupport.cmake
@@ -12,7 +12,7 @@ macro(END_WRAPPER_LIBRARY_TCL)
 
   set(modules )
 
-  foreach(source ${WRAPPER_LIBRARY_CABLESWIG_INPUTS})
+  foreach(source ${WRAPPER_LIBRARY_SWIG_INPUTS})
 
     get_filename_component(base_name ${source} NAME_WE)
     string(REGEX REPLACE "^wrap_" "" group_name "${base_name}")
diff --git a/Utilities/ITK/Wrapping/Generators/Tcl/TCLGetInterp.i b/Utilities/ITK/Wrapping/Generators/Tcl/TCLGetInterp.i
index ad84670..d1c7daa 100644
--- a/Utilities/ITK/Wrapping/Generators/Tcl/TCLGetInterp.i
+++ b/Utilities/ITK/Wrapping/Generators/Tcl/TCLGetInterp.i
@@ -77,7 +77,7 @@ namespace std {
 %}
 
 // import fake itk command
-// because itkCommand will be wrapped elsewhere by cableswig
+// because itkCommand will be wrapped elsewhere by swig
 %import "itkCommand.i"
 
 //  create an itkJavaCommand that has an Execute method that
diff --git a/Utilities/ITK/Wrapping/TypedefMacros.cmake b/Utilities/ITK/Wrapping/TypedefMacros.cmake
index 27b818b..c844415 100644
--- a/Utilities/ITK/Wrapping/TypedefMacros.cmake
+++ b/Utilities/ITK/Wrapping/TypedefMacros.cmake
@@ -1,5 +1,5 @@
 ################################################################################
-# Macro definitions for creating proper CableSwig input files from wrap_*.cmake
+# Macro definitions for creating proper Swig input files from wrap_*.cmake
 # files.
 # This file includes definitions for the macros to call from a CMakeList file
 # to cause wrap_*.cmake files to be turned into CXX files, and definitions for
@@ -69,20 +69,16 @@ macro(itk_wrap_module library_name)
   # not the full path or file name.
   set(WRAPPER_LIBRARY_GROUPS )
 
-  # WRAPPER_LIBRARY_CABLESWIG_INPUTS. List of C++ source files to be used
-  # as input for CableSwig. This list is then appended to by
+  # WRAPPER_LIBRARY_SWIG_INPUTS. List of C++ source files to be used
+  # as input for Swig. This list is then appended to by
   # WRAPPER_LIBRARY_AUTO_INCLUDE_WRAP_FILES. A full path to each input is required.
-  set(WRAPPER_LIBRARY_CABLESWIG_INPUTS )
+  set(WRAPPER_LIBRARY_SWIG_INPUTS )
 
   # WRAPPER_SWIG_LIBRARY_FILES. List of swig .swg files to pass to cswig to control
   # type handling and so forth. A full path to each include is required.
   # The itk.swg file and the library file for the current library are implicitly added.
   set(WRAPPER_SWIG_LIBRARY_FILES )
 
-  # WRAPPER_LIBRARY_SWIG_INPUTS. SWIG input files to be fed to swig (not
-  # CableSwig). A full path to each input is required.
-  set(WRAPPER_LIBRARY_SWIG_INPUTS )
-
   # WRAPPER_LIBRARY_CXX_SOURCES. C++ sources to be compiled and linked in
   # to the wrapper library (with no prior processing by swig, etc.)
   # A full path to each input is required.
@@ -153,7 +149,7 @@ macro(itk_auto_load_submodules)
 
   # Include the wrap_*.cmake files in WRAPPER_LIBRARY_SOURCE_DIR. This causes
   # corresponding wrap_*.cxx files to be generated WRAPPER_LIBRARY_OUTPUT_DIR,
-  # and added to the WRAPPER_LIBRARY_CABLESWIG_INPUTS list.
+  # and added to the WRAPPER_LIBRARY_SWIG_INPUTS list.
   # In addition, this causes the other required wrap_*.cxx files for the entire
   # library and each wrapper language to be created.
   # Finally, this macro causes the language support files for the templates and
@@ -284,7 +280,7 @@ macro(itk_end_wrap_submodule)
   # Write the file, inless the included cmake file told us not to.
   # A file might declare WRAPPER_DO_NOT_CREATE_CXX if that cmake file
   # provides a custom wrap_*.cxx file and manually appends it to the
-  # WRAPPER_LIBRARY_CABLESWIG_INPUTS list; thus that file would not
+  # WRAPPER_LIBRARY_SWIG_INPUTS list; thus that file would not
   # need or want any cxx file generated.
 #   if(NOT WRAPPER_DO_NOT_CREATE_CXX)
 #     WRITE_WRAP_CXX("wrap_${module}.cxx")
@@ -405,7 +401,7 @@ macro(itk_wrap_named_class class swig_name)
 endmacro()
 
 macro(itk_wrap_simple_class class)
-  # Similar to itk_wrap_class in that it generates typedefs for CableSwig input.
+  # Similar to itk_wrap_class in that it generates typedefs for Swig input.
   # However, since no templates need to be declared, there's no need for
   # itk_wrap_class ... (declare templates) .. itk_end_wrap_class. Instead
   # itk_wrap_simple_class takes care of it all.
@@ -425,7 +421,7 @@ endmacro()
 
 
 macro(itk_wrap_named_simple_class class swig_name)
-  # Similar to itk_wrap_named_class in that it generates typedefs for CableSwig input.
+  # Similar to itk_wrap_named_class in that it generates typedefs for Swig input.
   # However, since no templates need to be declared, there's no need for
   # itk_wrap_class ... (declare templates) .. itk_end_wrap_class. Instead
   # itk_wrap_named_simple_class takes care of it all.
@@ -469,7 +465,7 @@ endmacro()
 macro(itk_end_wrap_class)
   # Parse through the list of WRAPPER_TEMPLATES set up by the macros at the bottom
   # of this file, turning them into proper C++ type definitions suitable for
-  # input to CableSwig. The C++ definitions are stored in WRAPPER_TYPEDEFS.
+  # input to Swig. The C++ definitions are stored in WRAPPER_TYPEDEFS.
   #
   # Global vars used: WRAPPER_CLASS WRAPPER_WRAP_METHOD WRAPPER_TEMPLATES WRAPPER_SWIG_NAME
   # Global vars modified: WRAPPER_TYPEDEFS
@@ -560,7 +556,7 @@ endmacro()
 # Macros which cause one or more template instantiations to be added to the
 # WRAPPER_TEMPLATES list. This list is initialized by the macro itk_wrap_class above,
 # and used by the macro itk_end_wrap_class to produce the wrap_xxx.cxx files with
-# the correct templates. These cxx files serve as the CableSwig inputs.
+# the correct templates. These cxx files serve as the Swig inputs.
 ################################################################################
 
 macro(itk_wrap_template name types)
@@ -798,182 +794,3 @@ macro(itk_wrap_filter_dims var_name dimension_condition)
     INTERSECTION(${var_name} "${dimension_condition}" "${ITK_WRAP_DIMS}")
   endif()
 endmacro()
-
-
-# deprecated macros
-macro(WRAP_LIBRARIES)
-  message("Deprecation warning: WRAP_LIBRARIES is replaced by itk_wrap_modules.")
-  itk_wrap_modules()
-endmacro()
-
-macro(END_WRAP_LIBRARIES)
-  message("Deprecation warning: END_WRAP_LIBRARIES is replaced by itk_end_wrap_modules.")
-  itk_end_wrap_modules()
-endmacro()
-
-macro(WRAP_LIBRARY library_name)
-  message("Deprecation warning: WRAP_LIBRARY is replaced by itk_wrap_module.")
-  itk_wrap_module("${library_name}")
-endmacro()
-
-macro(END_WRAP_LIBRARY )
-  message("Deprecation warning: END_WRAP_LIBRARY is replaced by itk_end_wrap_module.")
-  itk_end_wrap_module("${library_name}")
-endmacro()
-
-macro(AUTO_INCLUDE_MODULES)
-  message("Deprecation warning: AUTO_INCLUDE_MODULES is replaced by itk_auto_load_submodules.")
-  itk_auto_load_submodules()
-endmacro()
-
-macro(WRAP_MODULE module)
-  message("Deprecation warning: WRAP_MODULE is replaced by itk_wrap_submodule.")
-  itk_wrap_submodule("${module}")
-endmacro()
-
-macro(END_WRAP_MODULE)
-  message("Deprecation warning: END_WRAP_MODULE is replaced by itk_end_wrap_submodule.")
-  itk_end_wrap_submodule()
-endmacro()
-
-macro(WRAP_CLASS class)
-  message("Deprecation warning: WRAP_CLASS is replaced by itk_wrap_class.")
-  itk_wrap_class("${class}" "${ARGN}")
-endmacro()
-
-macro(WRAP_NAMED_CLASS class swig_name)
-  message("Deprecation warning: WRAP_NAMED_CLASS is replaced by itk_wrap_named_class.")
-  itk_wrap_named_class("${class}" "${swig_name}" "${ARGN}")
-endmacro()
-
-macro(WRAP_NON_TEMPLATE_CLASS class)
-  message("Deprecation warning: WRAP_NON_TEMPLATE_CLASS is replaced by itk_wrap_simple_class.")
-  itk_wrap_simple_class("${class}" "${ARGN}")
-endmacro()
-
-macro(WRAP_NAMED_NON_TEMPLATE_CLASS class swig_name)
-  message("Deprecation warning: WRAP_NAMED_NON_TEMPLATE_CLASS is replaced by itk_wrap_named_simple_class.")
-  itk_wrap_named_simple_class("${class}" "${swig_name}" "${ARGN}")
-endmacro()
-
-macro(WRAP_INCLUDE include_file)
-  message("Deprecation warning: WRAP_INCLUDE is replaced by itk_wrap_include.")
-  itk_wrap_include("${include_file}")
-endmacro()
-
-macro(END_WRAP_CLASS)
-  message("Deprecation warning: END_WRAP_CLASS is replaced by itk_end_wrap_class.")
-  itk_end_wrap_class()
-endmacro()
-
-macro(ADD_ONE_TYPEDEF wrap_method wrap_class swig_name)
-  message("Deprecation warning: ADD_ONE_TYPEDEF is replaced by itk_wrap_one_type.")
-  itk_wrap_one_type("${wrap_method}" "${wrap_class}" "${swig_name}")
-endmacro()
-
-macro(WRAP_TEMPLATE name type)
-  message("Deprecation warning: WRAP_TEMPLATE is replaced by itk_wrap_template.")
-  itk_wrap_template("${name}" "${type}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER param_type param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER is replaced by itk_wrap_template.")
-  itk_wrap_image_filter("${param_type}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_ALL_TYPES param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_ALL_TYPES() is replaced by itk_wrap_template(\"\${WRAP_ITK_ALL_TYPES}\").")
-  itk_wrap_image_filter("${WRAP_ITK_ALL_TYPES}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_SCALAR param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_SCALAR() is replaced by itk_wrap_template(\"\${WRAP_ITK_SCALAR}\").")
-  itk_wrap_image_filter("${WRAP_ITK_SCALAR}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_VECTOR param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_VECTOR() is replaced by itk_wrap_template(\"\${WRAP_ITK_VECTOR}\").")
-  itk_wrap_image_filter("${WRAP_ITK_VECTOR}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_USIGN_INT param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_USIGN_INT() is replaced by itk_wrap_template(\"\${WRAP_ITK_USIGN_INT}\").")
-  itk_wrap_image_filter("${WRAP_ITK_USIGN_INT}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_SIGN_INT param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_SIGN_INT() is replaced by itk_wrap_template(\"\${WRAP_ITK_SIGN_INT}\").")
-  itk_wrap_image_filter("${WRAP_ITK_SIGN_INT}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_INT param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_INT() is replaced by itk_wrap_template(\"\${WRAP_ITK_INT}\").")
-  itk_wrap_image_filter("${WRAP_ITK_INT}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_REAL param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_REAL() is replaced by itk_wrap_template(\"\${WRAP_ITK_REAL}\").")
-  itk_wrap_image_filter("${WRAP_ITK_REAL}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_RGB param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_RGB() is replaced by itk_wrap_template(\"\${WRAP_ITK_RGB}\").")
-  itk_wrap_image_filter("${WRAP_ITK_RGB}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_RGBA param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_RGBA() is replaced by itk_wrap_template(\"\${WRAP_ITK_RGBA}\").")
-  itk_wrap_image_filter("${WRAP_ITK_RGBA}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_VECTOR_REAL param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_VECTOR_REAL() is replaced by itk_wrap_template(\"\${WRAP_ITK_VECTOR_REAL}\").")
-  itk_wrap_image_filter("${WRAP_ITK_VECTOR_REAL}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_COV_VECTOR_REAL param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_COV_VECTOR_REAL() is replaced by itk_wrap_template(\"\${WRAP_ITK_COV_VECTOR_REAL}\").")
-  itk_wrap_image_filter("${WRAP_ITK_COV_VECTOR_REAL}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_COMPLEX_REAL param_count)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_COMPLEX_REAL() is replaced by itk_wrap_template(\"\${WRAP_ITK_COMPLEX_REAL}\").")
-  itk_wrap_image_filter("${WRAP_ITK_COMPLEX_REAL}" ${param_count} "${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_COMBINATIONS)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_COMBINATIONS is replaced by itk_wrap_image_filter_combinations.")
-  itk_wrap_image_filter_combinations("${ARGN}")
-endmacro()
-
-macro(WRAP_IMAGE_FILTER_TYPES)
-  message("Deprecation warning: WRAP_IMAGE_FILTER_TYPES is replaced by itk_wrap_image_filter_types.")
-  itk_wrap_image_filter_types("${ARGN}")
-endmacro()
-
-macro(FILTER_DIMS)
-  message("Deprecation warning: FILTER_DIMS is replaced by itk_wrap_filter_dims.")
-  itk_wrap_filter_dims("${ARGN}")
-endmacro()
-
-macro(BEGIN_WRAPPER_LIBRARY library_name)
-  message("Deprecation warning: BEGIN_WRAPPER_LIBRARY is replaced by itk_wrap_module.")
-  itk_wrap_module("${library_name}")
-endmacro()
-
-macro(WRAPPER_LIBRARY_CREATE_LIBRARY)
-  message("Deprecation warning: WRAPPER_LIBRARY_CREATE_LIBRARY is replaced by itk_end_wrap_module.")
-  itk_end_wrap_module()
-endmacro()
-
-macro(WRAPPER_LIBRARY_CREATE_WRAP_FILES)
-  message("Deprecation warning: WRAPPER_LIBRARY_CREATE_WRAP_FILES is replaced by itk_auto_load_submodules.")
-  itk_auto_load_submodules()
-endmacro()
-
-macro(INCLUDE_WRAP_CMAKE module)
-  message("Deprecation warning: INCLUDE_WRAP_CMAKE is replaced by itk_load_submodule.")
-  itk_load_submodule("${module}")
-endmacro()
-
-set(WRAP_ITK_DIMS "${ITK_WRAP_DIMS}" CACHE INTERNAL "deprecated - do not use" FORCE)
diff --git a/Utilities/ITK/Wrapping/WrapITKConfig.cmake.in b/Utilities/ITK/Wrapping/WrapITKConfig.cmake.in
index b8995ad..4ff8a18 100644
--- a/Utilities/ITK/Wrapping/WrapITKConfig.cmake.in
+++ b/Utilities/ITK/Wrapping/WrapITKConfig.cmake.in
@@ -22,11 +22,6 @@ if(EXISTS "${possible_swig_dir}")
 set(SWIG_DIR "${possible_swig_dir}"  CACHE PATH "Path to Swig build or install")
 endif()
 
-# set WrapITK version
-set(WrapITK_VERSION_MAJOR @WrapITK_VERSION_MAJOR@)
-set(WrapITK_VERSION_MINOR @WrapITK_VERSION_MINOR@)
-set(WrapITK_VERSION_PATCH @WrapITK_VERSION_PATCH@)
-
 # Set up the rest of the variables that WrapITK was built with.
 set(ITK_WRAP_unsigned_char @ITK_WRAP_unsigned_char@ CACHE BOOL "Wrap unsigned char type")
 set(ITK_WRAP_unsigned_short @ITK_WRAP_unsigned_short@ CACHE BOOL "Wrap unsigned short type")
diff --git a/Utilities/ITK/Wrapping/WrapITKTypes.cmake b/Utilities/ITK/Wrapping/WrapITKTypes.cmake
index cc0a896..13ec599 100644
--- a/Utilities/ITK/Wrapping/WrapITKTypes.cmake
+++ b/Utilities/ITK/Wrapping/WrapITKTypes.cmake
@@ -4,7 +4,6 @@
 # itk::Command has to be available in all ITK wrapped files
 set(WRAPPER_DEFAULT_INCLUDE
   itkCommand.h
-  itkStatisticsLabelObject.h
 )
 
 # define some macro to help creation of types vars
@@ -243,22 +242,28 @@ WRAP_TYPE("itk::Point" "P")
 END_WRAP_TYPE()
 set(itk_Wrap_Point ${WRAPPER_TEMPLATES})
 
-WRAP_TYPE("itk::LevelSetNode" "LSN")
-  # Only make level set nodes for the selected image pixel types
-  foreach(d ${ITK_WRAP_DIMS})
-    foreach(type ${WRAP_ITK_SCALAR})
-      ADD_TEMPLATE("${ITKM_${type}}${d}"  "${ITKT_${type}},${d}")
+if(ITK_BUILD_DEFAULT_MODULES OR ITKGroup_Filtering)
+  # Needed by Modules/Filtering/FastMarching/wrapping/itkLevelSetNode.wrap
+  WRAP_TYPE("itk::LevelSetNode" "LSN")
+    # Only make level set nodes for the selected image pixel types
+    foreach(d ${ITK_WRAP_DIMS})
+      foreach(type ${WRAP_ITK_SCALAR})
+        ADD_TEMPLATE("${ITKM_${type}}${d}"  "${ITKT_${type}},${d}")
+      endforeach()
     endforeach()
-  endforeach()
-END_WRAP_TYPE()
-set(itk_Wrap_LevelSetNode ${WRAPPER_TEMPLATES})
-
-WRAP_TYPE("itk::FlatStructuringElement" "SE")
-  foreach(d ${ITK_WRAP_DIMS})
-    ADD_TEMPLATE("${d}"  "${d}")
-  endforeach()
-END_WRAP_TYPE()
-set(itk_Wrap_StructuringElement ${WRAPPER_TEMPLATES})
+  END_WRAP_TYPE()
+  set(itk_Wrap_LevelSetNode ${WRAPPER_TEMPLATES})
+endif()
+
+if(ITK_BUILD_DEFAULT_MODULES OR ITKGroup_Filtering)
+  # Needed by Modules/Filtering/MathematicalMorphology/wrapping/itkFlatStructuringElement.wrap
+  WRAP_TYPE("itk::FlatStructuringElement" "SE")
+    foreach(d ${ITK_WRAP_DIMS})
+      ADD_TEMPLATE("${d}"  "${d}")
+    endforeach()
+  END_WRAP_TYPE()
+  set(itk_Wrap_StructuringElement ${WRAPPER_TEMPLATES})
+endif()
 
 WRAP_TYPE("itk::SpatialObject" "SO")
   foreach(d ${ITK_WRAP_DIMS})
@@ -273,11 +278,14 @@ WRAP_TYPE("itk::Statistics::Histogram" "H")
 END_WRAP_TYPE()
 set(itk_Wrap_Histogram ${WRAPPER_TEMPLATES})
 
-WRAP_TYPE("itk::LabelMap" "LM")
-  foreach(d ${ITK_WRAP_DIMS})
-    ADD_TEMPLATE("${d}" "itk::StatisticsLabelObject< ${ITKT_UL}, ${d} >")
-endforeach()
-END_WRAP_TYPE()
-set(itk_Wrap_LabelMap ${WRAPPER_TEMPLATES})
+if(ITK_BUILD_DEFAULT_MODULES OR ITKGroup_Filtering)
+  # Needed by Modules/Filtering/LabelMap/wrapping/ITKLabelMapBase.wrap
+  WRAP_TYPE("itk::LabelMap" "LM")
+    foreach(d ${ITK_WRAP_DIMS})
+      ADD_TEMPLATE("${d}" "itk::StatisticsLabelObject< ${ITKT_UL}, ${d} >")
+  endforeach()
+  END_WRAP_TYPE()
+  set(itk_Wrap_LabelMap ${WRAPPER_TEMPLATES})
+endif()
 
 #------------------------------------------------------------------------------
diff --git a/Utilities/ITK/Wrapping/itkWrapSetup.cmake b/Utilities/ITK/Wrapping/itkWrapSetup.cmake
index b6c9126..8251027 100644
--- a/Utilities/ITK/Wrapping/itkWrapSetup.cmake
+++ b/Utilities/ITK/Wrapping/itkWrapSetup.cmake
@@ -1,23 +1,21 @@
-
-# Make it easier to enable the main supported languages, by providing the option even when
-# the Wrapping directory has not yet been included
-option(ITK_WRAP_PYTHON "Build python support" OFF)
-
-option(ITK_WRAPPING "Build external languages support" OFF)
-mark_as_advanced(ITK_WRAPPING)
-
 # check whether we should go in the wrapping folder, even with ITK_WRAPPING is OFF
+# ITK_WRAPPING is an internal variable that indicates wrapping for any
+# language will be attempted.
 if(NOT ITK_WRAPPING_REACHED)
   if(ITK_WRAP_PYTHON OR ITK_WRAP_JAVA)
     # force ITK_WRAPPING to ON
-    unset(ITK_WRAPPING CACHE)
-    option(ITK_WRAPPING "Build external languages support" ON)
-    mark_as_advanced(ITK_WRAPPING)
+    set(ITK_WRAPPING ON CACHE INTERNAL "Build external languages support" FORCE)
   endif()
 endif()
 
 if(ITK_WRAPPING)
   if(NOT ITK_BUILD_SHARED_LIBS)
-    message(FATAL_ERROR "Wrapping requires a shared build, change BUILD_SHARED_LIBS to ON")
+    message(WARNING "Wrapping requires a shared build, changing BUILD_SHARED_LIBS to ON")
+    set(BUILD_SHARED_LIBS ON CACHE BOOL "Build ITK with shared libraries." FORCE )
+  endif()
+
+  if(ITK_USE_64BITS_IDS AND WIN32)
+    message(FATAL_ERROR "Wrapping with ITK_USE_64BITS_IDS is not supported on Windows.
+    Please turn OFF ITK_USE_64BITS_IDS.")
   endif()
 endif()
diff --git a/Utilities/otbkml/CMakeLists.txt b/Utilities/otbkml/CMakeLists.txt
index 8b956a2..3565b50 100644
--- a/Utilities/otbkml/CMakeLists.txt
+++ b/Utilities/otbkml/CMakeLists.txt
@@ -161,7 +161,6 @@ set(libzlib_src_la_SOURCES "")
 if(WIN32)
   if(NOT BORLAND)
 #    if(NOT CYGWIN)
-      if(NOT MINGW)
         include_directories("${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib-1.2.3.src")
         set(libzlib_src_la_SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib-1.2.3.src")
         set(libzlib_src_la_SOURCES
@@ -178,8 +177,7 @@ if(WIN32)
                 ${libzlib_src_la_SOURCES_DIR}/uncompr.c
                 ${libzlib_src_la_SOURCES_DIR}/zutil.c )
          set(LIBKML_COMPILE_ZLIB ON)
-      endif()
-#    endif()
+#      endif()
   endif()
 endif()
 if(APPLE)
diff --git a/Utilities/otbkml/src/kml/base/file_win32.cc b/Utilities/otbkml/src/kml/base/file_win32.cc
index 82b95a4..f451be1 100644
--- a/Utilities/otbkml/src/kml/base/file_win32.cc
+++ b/Utilities/otbkml/src/kml/base/file_win32.cc
@@ -32,7 +32,9 @@
 #include "kml/base/file.h"
 #include <windows.h>
 #include <tchar.h>
+#ifndef __MINGW32__
 #include <xstring>
+#endif
 #include <algorithm>
 
 namespace kmlbase {
@@ -40,7 +42,11 @@ namespace kmlbase {
 // Internal to the win32 file class. We need a conversion from string to
 // LPCWSTR.
 static std::wstring Str2Wstr(const string& str) {
-  std::wstring wstr(str.length(), L'');
+#ifndef __MINGW32__
+   std::wstring wstr(str.length(), L'');
+#else
+	std::wstring wstr(str.length(), L' ');
+#endif
   std::copy(str.begin(), str.end(), wstr.begin());
   return wstr;
 }
diff --git a/Utilities/otbmuparser/muParserBytecode.cpp b/Utilities/otbmuparser/muParserBytecode.cpp
index 2c35de4..7e969f8 100644
--- a/Utilities/otbmuparser/muParserBytecode.cpp
+++ b/Utilities/otbmuparser/muParserBytecode.cpp
@@ -30,6 +30,7 @@
 #include <stack>
 #include <vector>
 #include <iostream>
+#include <algorithm>
 
 #include "muParserDef.h"
 #include "muParserError.h"
diff --git a/Utilities/otbopenjpeg/libopenjpeg/openjpeg.c b/Utilities/otbopenjpeg/libopenjpeg/openjpeg.c
index 4470887..1038c9b 100644
--- a/Utilities/otbopenjpeg/libopenjpeg/openjpeg.c
+++ b/Utilities/otbopenjpeg/libopenjpeg/openjpeg.c
@@ -174,7 +174,7 @@ opj_bool opj_seek_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
 
 /* ---------------------------------------------------------------------- */
 #ifdef _WIN32
-#ifndef OPJ_STATIC
+#if !defined(OPJ_STATIC) && !defined(__MINGW32__)
 BOOL APIENTRY
 DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
 
diff --git a/Utilities/otbopenjpeg/libopenjpeg/openjpeg.h b/Utilities/otbopenjpeg/libopenjpeg/openjpeg.h
index e48a915..82263d8 100644
--- a/Utilities/otbopenjpeg/libopenjpeg/openjpeg.h
+++ b/Utilities/otbopenjpeg/libopenjpeg/openjpeg.h
@@ -1526,7 +1526,7 @@ OPJ_API opj_jp2_metadata_t* OPJ_CALLCONV opj_get_jp2_metadata(opj_codec_t *p_cod
 OPJ_API opj_jp2_index_t* OPJ_CALLCONV opj_get_jp2_index(opj_codec_t *p_codec);
 
 /* >>OTB */
-OPJ_API opj_image_t* OPJ_CALLCONV opj_image_create0();
+//OPJ_API opj_image_t* OPJ_CALLCONV opj_image_create0();
 OPJ_API void opj_copy_image_header(const opj_image_t* p_image_src, opj_image_t* p_image_dest);
 /* <<OTB */
 
diff --git a/Utilities/otbossim/include/ossim/projection/ossimRS1SarModel.h b/Utilities/otbossim/include/ossim/projection/ossimRS1SarModel.h
index 534760c..ac548d0 100644
--- a/Utilities/otbossim/include/ossim/projection/ossimRS1SarModel.h
+++ b/Utilities/otbossim/include/ossim/projection/ossimRS1SarModel.h
@@ -7,7 +7,7 @@
 // Description:
 //
 // Sensor Model for Radarsat1 SAR sensor.
-// 
+//
 //*******************************************************************
 //  $Id:$
 
@@ -25,7 +25,10 @@
 #include <ossim/base/ossimLagrangeInterpolator.h>
 #include <ossim/support_data/ossimCeosData.h>
 
-class NEWMAT::Matrix;
+namespace NEWMAT
+{
+class Matrix;
+}
 
 //*****************************************************************************
 // CLASS:  ossimRS1SarModel
@@ -37,7 +40,7 @@ public:
    ossimRS1SarModel(const ossimFilename& imageDir);
 
    virtual ~ossimRS1SarModel();
-   
+
    enum ImagingMode
    {
       UNKNOWN_MODE = 0,
@@ -59,25 +62,25 @@ public:
       ASCENDING,
       DESCENDING
    };
-   
+
    //! Fulfills ossimObject base-class pure virtuals. Saves modeling info to KWL.
    //! Returns true if successful.
    virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=NULL) const;
-   
+
    //! Fulfills ossimObject base-class pure virtuals. Reads modeling info from KWL.
    //! Returns true if successful.
    virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=NULL);
 
    //! Establishes geographic 3D point given image line, sample and ellipsoid height.
-   virtual void lineSampleHeightToWorld(const ossimDpt& imagePt, 
-                                        const double& heightAboveEllipsoid, 
+   virtual void lineSampleHeightToWorld(const ossimDpt& imagePt,
+                                        const double& heightAboveEllipsoid,
                                         ossimGpt& worldPt) const;
 
    //! Given an image point, returns a ray originating at some arbitrarily high
    //! point (in this model at the sensor position) and pointing towards the target.
    virtual void imagingRay(const ossimDpt& image_point, ossimEcefRay& image_ray) const;
 
-   inline virtual bool useForward() const { return false; } //!image to ground faster 
+   inline virtual bool useForward() const { return false; } //!image to ground faster
 
    //!  Returns pointer to a new instance, copy of this.
    virtual ossimObject* dup() const { return 0; } // TBR
@@ -93,7 +96,7 @@ protected:
    void establishVehicleSpace();
    void interpolatedScanORP(const ossimDpt& orp, ossimEcefPoint& orp_ecf) const;
    void deallocateMemory();
-   
+
    ossimRefPtr<ossimCeosData> theCeosData;
    ossimRefPtr<ossimLagrangeInterpolator> theArpPosInterp;   // in ECF
    ossimRefPtr<ossimLagrangeInterpolator> theArpVelInterp;   // in ECF
@@ -115,13 +118,13 @@ protected:
    double          theTimePerLine;    // seconds
    DirectionFlag   theDirectionFlag;
    double          theSrGrCoeff[6];
-   ossimDpt        thePixelSpacing; 
+   ossimDpt        thePixelSpacing;
    //***
    // Additional data members used for scan-mode imagery:
    //***
    ossimDblGrid    theLatGrid;
    ossimDblGrid    theLonGrid;
-   
+
    //***
    // Adjustable Parameters:
    //***
@@ -131,7 +134,7 @@ protected:
    double          theLineScale;
    double          theSkew;
    double          theOrientation; // degrees
-   
+
    //***
    // Adjustable model parameters array indexes:
    //***
@@ -150,4 +153,3 @@ protected:
 
 
 #endif
-
diff --git a/Utilities/otbossim/src/ossim/imaging/ossimTiling.cpp b/Utilities/otbossim/src/ossim/imaging/ossimTiling.cpp
index 8b35f7c..d5e4d75 100644
--- a/Utilities/otbossim/src/ossim/imaging/ossimTiling.cpp
+++ b/Utilities/otbossim/src/ossim/imaging/ossimTiling.cpp
@@ -932,7 +932,8 @@ std::ostream& ossimTiling::print(std::ostream& out) const
 
    if (theMapProjection.valid())
    {
-      out << "\ntheMapProjection:\n" << theMapProjection->print(out);
+	   out << "\ntheMapProjection:\n";
+       theMapProjection->print(out);
    }
    else
    {
diff --git a/Utilities/otbossim/src/ossim/projection/ossimNitfProjectionFactory.cpp b/Utilities/otbossim/src/ossim/projection/ossimNitfProjectionFactory.cpp
index 834d41d..306066b 100644
--- a/Utilities/otbossim/src/ossim/projection/ossimNitfProjectionFactory.cpp
+++ b/Utilities/otbossim/src/ossim/projection/ossimNitfProjectionFactory.cpp
@@ -282,14 +282,14 @@ ossimProjection* ossimNitfProjectionFactory::makeGeographic(
 
       if (traceDebug() && proj)
       {
-         ossimNotify(ossimNotifyLevel_DEBUG)
-            << "ossimNitfProjectionFactory::makeGeographic DEBUG:"
-            << "\nUpper left corner:   " << gpts[0]
-            << "\nUpper right corner:  " << gpts[1]
-            << "\nLower right corner:  " << gpts[2]
-            << "\nLower left corner:   " << gpts[3] << endl
-            << proj->print(ossimNotify(ossimNotifyLevel_DEBUG))
-            << std::endl;
+		  ossimNotify(ossimNotifyLevel_DEBUG)
+			  << "ossimNitfProjectionFactory::makeGeographic DEBUG:"
+			  << "\nUpper left corner:   " << gpts[0]
+			  << "\nUpper right corner:  " << gpts[1]
+			  << "\nLower right corner:  " << gpts[2]
+			  << "\nLower left corner:   " << gpts[3] << std::endl;
+		  proj->print(ossimNotify(ossimNotifyLevel_DEBUG));
+		  ossimNotify(ossimNotifyLevel_DEBUG) << std::endl;
       }
       
    } // matches: if (hdr)
diff --git a/Utilities/otbossimplugins/ossim/ossimPleiadesDimapSupportData.cpp b/Utilities/otbossimplugins/ossim/ossimPleiadesDimapSupportData.cpp
index d9f3d85..a4424c3 100644
--- a/Utilities/otbossimplugins/ossim/ossimPleiadesDimapSupportData.cpp
+++ b/Utilities/otbossimplugins/ossim/ossimPleiadesDimapSupportData.cpp
@@ -146,6 +146,8 @@ namespace ossimplugins
        theIncidenceAngle(),
        theViewingAngle(),
        theAzimuthAngle(),
+       theAlongTrackIncidenceAngle(),
+       theAcrossTrackIncidenceAngle(),                                          
 
        theImageSize(0, 0),
        theTileSize(0, 0),
@@ -185,6 +187,12 @@ namespace ossimplugins
        theLineDenCoeff(),
        theSampNumCoeff(),
        theSampDenCoeff(),
+       
+       theTimeRangeStart(),
+       theTimeRangeEnd(),
+       theLinePeriod(0.0),
+       theSwathFirstCol(0),
+       theSwathLastCol(0),
 
        theRefGroundPoint(0.0, 0.0, 0.0),
        theRefImagePoint(0.0, 0.0)
@@ -219,6 +227,9 @@ namespace ossimplugins
       theViewingAngle.clear();
       theAzimuthAngle.clear();
 
+      theAlongTrackIncidenceAngle.clear();
+      theAcrossTrackIncidenceAngle.clear();
+
       theImageSize.makeNan();
       theTileSize.makeNan();
       theNumberOfMegaTilesInRow = 0;
@@ -252,8 +263,8 @@ namespace ossimplugins
       theErrBiasX = 0.0;
       theErrBiasY = 0.0;
       theErrRand = 0.0;
-      theLineOffset = 0;
-      theSampOffset = 0;
+      theLineOffset = 0.0;
+      theSampOffset = 0.0;
       theLatOffset = 0.0;
       theLonOffset = 0.0;
       theHeightOffset = 0.0;
@@ -267,6 +278,12 @@ namespace ossimplugins
       theSampNumCoeff.clear();
       theSampDenCoeff.clear();
       theSpecId = "";
+      
+      theTimeRangeStart = "";
+      theTimeRangeEnd = "";
+      theLinePeriod = 0.0;
+      theSwathFirstCol = 0;
+      theSwathLastCol = 0;
    }
 
    void ossimPleiadesDimapSupportData::printInfo(ostream& os) const
@@ -294,6 +311,8 @@ namespace ossimplugins
          << "\n  Incidence Angle (TopCenter, Center, BottomCenter):   " << getVectorFloat64AsString(theIncidenceAngle)
          << "\n  Viewing Angle (TopCenter, Center, BottomCenter):     " << getVectorFloat64AsString(theViewingAngle)
          << "\n  Azimuth Angle (TopCenter, Center, BottomCenter):     " << getVectorFloat64AsString(theAzimuthAngle)
+         << "\n  Along track incidence angle (TopCenter, Center, BottomCenter):     " << getVectorFloat64AsString(theAlongTrackIncidenceAngle)
+         << "\n  Across track incidence angle (TopCenter, Center, BottomCenter):     " << getVectorFloat64AsString(theAcrossTrackIncidenceAngle)
          << "\n  Sun Azimuth (TopCenter, Center, BottomCenter):       " << getVectorFloat64AsString(theSunAzimuth)
          << "\n  Sun Elevation (TopCenter, Center, BottomCenter):     " << getVectorFloat64AsString(theSunElevation)
 
@@ -332,6 +351,14 @@ namespace ossimplugins
          << "\n     theErrBiasY: " << theErrBiasY
          << "\n     theErrRand: " << theErrRand
          << "\n"
+         
+         << "\n  Acquisition time parameters (only valid for SENSOR product):"
+         << "\n     TimeRangeStart: "<< theTimeRangeStart
+         << "\n     TimeRangeEnd: "<< theTimeRangeEnd
+         << "\n     LinePeriod: "<< theLinePeriod
+         << "\n     SwathFirstCol: "<< theSwathFirstCol
+         << "\n     SwathLastCol: "<< theSwathLastCol
+         << "\n"
          << "\n---------------------------------------------------------"
          << "\n  " << std::endl;
    }
@@ -635,6 +662,17 @@ namespace ossimplugins
       va = theViewingAngle;
    }
 
+  void ossimPleiadesDimapSupportData::getAcrossTrackIncidenceAngle(std::vector<ossim_float64>& act) const
+   {
+      act = theAcrossTrackIncidenceAngle;
+   }
+
+  void ossimPleiadesDimapSupportData::getAlongTrackIncidenceAngle(std::vector<ossim_float64>& alt) const
+   {
+      alt = theAlongTrackIncidenceAngle;
+   }
+
+
    void ossimPleiadesDimapSupportData::getRefGroundPoint(ossimGpt& gp) const
    {
       gp = theRefGroundPoint;
@@ -833,6 +871,38 @@ namespace ossimplugins
               static_cast<ossim_uint32>(theAzimuthAngle.size()),
               true);
 
+
+      tempString = "";
+      for(idx = 0; idx <  theAlongTrackIncidenceAngle.size(); ++idx)
+      {
+         tempString += (ossimString::toString(theAlongTrackIncidenceAngle[idx]) + " ");
+      }
+      kwl.add(prefix,
+              "along_track_incidence_angle",
+              tempString,
+              true);
+
+       kwl.add(prefix,
+              "number_of_along_track_incidence_angle",
+              static_cast<ossim_uint32>(theAlongTrackIncidenceAngle.size()),
+              true);
+
+
+      tempString = "";
+      for(idx = 0; idx <  theAcrossTrackIncidenceAngle.size(); ++idx)
+      {
+         tempString += (ossimString::toString(theAcrossTrackIncidenceAngle[idx]) + " ");
+      }
+      kwl.add(prefix,
+              "across_track_incidence_angle",
+              tempString,
+              true);
+
+       kwl.add(prefix,
+              "number_of_across_track_incidence_angle",
+              static_cast<ossim_uint32>(theAcrossTrackIncidenceAngle.size()),
+              true);
+
       kwl.add(prefix,
               "ul_ground_point",
               ossimString::toString(theUlCorner.latd()) + " " +
@@ -901,7 +971,35 @@ namespace ossimplugins
               "solar_irradiance",
               tempString,
               true);
-
+      
+      // Some geometric parameters exist only in the case of a SENSOR image
+      if (theProcessingLevelString == "SENSOR")
+      {
+        kwl.add(prefix,
+                "time_range_start",
+                theTimeRangeStart,
+                true);
+
+        kwl.add(prefix,
+                "time_range_end",
+                theTimeRangeEnd,
+                true);
+        
+        kwl.add(prefix,
+                "line_period",
+                ossimString::toString(theLinePeriod),
+                true);
+        
+        kwl.add(prefix,
+                "swath_first_col",
+                theSwathFirstCol,
+                true);
+        kwl.add(prefix,
+                "swath_last_col",
+                theSwathLastCol,
+                true);
+      }
+      
       return true;
    }
 
@@ -1019,6 +1117,33 @@ namespace ossimplugins
          }
       }
 
+      total =  ossimString(kwl.find(prefix,"number_of_along_track_incidence_angle")).toUInt32();
+      theAlongTrackIncidenceAngle.resize(total);
+      tempString = kwl.find(prefix,"along_track_incidence_angle");
+      if(tempString != "")
+      {
+         std::istringstream in(tempString.string());
+         ossimString tempValue;
+         for(idx = 0; idx < theAlongTrackIncidenceAngle.size();++idx)
+         {
+            in >> tempValue.string();
+            theAlongTrackIncidenceAngle[idx] = tempValue.toDouble();
+         }
+      }
+
+      total =  ossimString(kwl.find(prefix,"number_of_across_track_incidence_angle")).toUInt32();
+      theAcrossTrackIncidenceAngle.resize(total);
+      tempString = kwl.find(prefix,"across_track_incidence_angle");
+      if(tempString != "")
+      {
+         std::istringstream in(tempString.string());
+         ossimString tempValue;
+         for(idx = 0; idx < theAcrossTrackIncidenceAngle.size();++idx)
+         {
+            in >> tempValue.string();
+            theAcrossTrackIncidenceAngle[idx] = tempValue.toDouble();
+         }
+      }
 
       theUlCorner =createGround( kwl.find(prefix, "ul_ground_point"));
       theUrCorner =createGround( kwl.find(prefix, "ur_ground_point"));
@@ -1067,6 +1192,16 @@ namespace ossimplugins
             theSolarIrradiance[idx] = tempValue.toDouble();
          }
       }
+      
+      // Some geometric parameters exist only in the case of a SENSOR image
+      if (theProcessingLevelString == "SENSOR")
+      {
+        theTimeRangeStart = ossimString(kwl.find(prefix,"time_range_start"));
+        theTimeRangeEnd   = ossimString(kwl.find(prefix,"time_range_end"));
+        theLinePeriod     = ossimString(kwl.find(prefix,"line_period")).toDouble();
+        theSwathFirstCol  = ossimString(kwl.find(prefix,"swath_first_col")).toInt32();
+        theSwathLastCol   = ossimString(kwl.find(prefix,"swath_last_col")).toInt32();
+      }
 
       return true;
    }
@@ -1739,7 +1874,10 @@ namespace ossimplugins
       {
          return false;
       }
-      theSampOffset = nodeValue.toInt32();
+      // Pleiades metadata assume that the coordinate of the center of
+      // the upper-left pixel is (1,1), so we remove 1 to get back to
+      // OSSIM convention.
+      theSampOffset = nodeValue.toDouble()-1;
 
       if (theDIMAPVersion == OSSIM_PLEIADES_DIMAPv1)
       {
@@ -1769,7 +1907,10 @@ namespace ossimplugins
       {
          return false;
       }
-      theLineOffset = nodeValue.toInt32();
+      // Pleiades metadata assume that the coordinate of the center of
+      // the upper-left pixel is (1,1), so we remove 1 to get back to
+      // OSSIM convention.
+      theLineOffset = nodeValue.toDouble()-1;
 
       return true;
    }
@@ -2328,7 +2469,7 @@ namespace ossimplugins
 
    bool  ossimPleiadesDimapSupportData::parseGeometricData(ossimRefPtr<ossimXmlDocument> xmlDocument)
    {
-      ossimString xpath;
+      ossimString xpath, nodeValue;
       vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
 
       xml_nodes.clear();
@@ -2463,9 +2604,149 @@ namespace ossimplugins
          }
          theAzimuthAngle.push_back(sub_nodes[0]->getText().toDouble());
 
+         //---
+         // Fetch the along track incidence angle :
+         //---
+         sub_nodes.clear();
+         if (theDIMAPVersion == OSSIM_PLEIADES_DIMAPv1)
+         {
+            xpath = "Incidences/ALONG_TRACK_INCIDENCE";
+         }
+         else
+         {
+            xpath = "Acquisition_Angles/INCIDENCE_ANGLE_ALONG_TRACK";
+         }
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
+            }
+            return false;
+         }
+         theAlongTrackIncidenceAngle.push_back(sub_nodes[0]->getText().toDouble());
+
+         //---
+         // Fetch the across track incidence angle :
+         //---
+         sub_nodes.clear();
+         if (theDIMAPVersion == OSSIM_PLEIADES_DIMAPv1)
+         {
+            xpath = "Incidences/ORTHO_TRACK_INCIDENCE";
+         }
+         else
+         {
+            xpath = "Acquisition_Angles/INCIDENCE_ANGLE_ACROSS_TRACK";
+         }
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
+            }
+            return false;
+         }
+         theAcrossTrackIncidenceAngle.push_back(sub_nodes[0]->getText().toDouble());
+
          ++node;
       }
-
+      
+      if (theProcessingLevelString == "SENSOR")
+      {
+        // check that this product is SENSOR (some tags are not present in ORTHO)
+        //---
+        // Fetch the time stamp of the first line:
+        //---
+        if (theDIMAPVersion == OSSIM_PLEIADES_DIMAPv1)
+        {
+          xpath = "/Geometric_Data/Sensor_Model_Characteristics/UTC_Sensor_Model_Range/START";
+        }
+        else
+        {
+          xpath = "/Geometric_Data/Refined_Model/Time/Time_Range/START";
+        }
+        xpath = theXmlDocumentRoot + xpath;
+        if (!readOneXmlNode(xmlDocument, xpath, theTimeRangeStart))
+        {
+            return false;
+        }
+        
+        //---
+        // Fetch the time stamp of the last line:
+        //---
+        if (theDIMAPVersion == OSSIM_PLEIADES_DIMAPv1)
+        {
+          xpath = "/Geometric_Data/Sensor_Model_Characteristics/UTC_Sensor_Model_Range/END";
+        }
+        else
+        {
+          xpath = "/Geometric_Data/Refined_Model/Time/Time_Range/END";
+        }
+        xpath = theXmlDocumentRoot + xpath;
+        if (!readOneXmlNode(xmlDocument, xpath, theTimeRangeEnd))
+        {
+            return false;
+        }
+        
+        //---
+        // Fetch the line period:
+        //---
+        if (theDIMAPVersion == OSSIM_PLEIADES_DIMAPv1)
+        {
+          xpath = "/Geometric_Data/Sensor_Model_Characteristics/SENSOR_LINE_PERIOD";
+        }
+        else
+        {
+          xpath = "/Geometric_Data/Refined_Model/Time/Time_Stamp/LINE_PERIOD";
+        }
+        xpath = theXmlDocumentRoot + xpath;
+        if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+        {
+            return false;
+        }
+        theLinePeriod = nodeValue.toDouble();
+        
+        //---
+        // Fetch the swath first col:
+        //---
+        if (theDIMAPVersion == OSSIM_PLEIADES_DIMAPv1)
+        {
+          xpath = "/Geometric_Data/Sensor_Model_Characteristics/Sensor_Viewing_Model/Position_In_Retina/FIRST_COL";
+        }
+        else
+        {
+          xpath = "/Geometric_Data/Refined_Model/Geometric_Calibration/Instrument_Calibration/Swath_Range/FIRST_COL";
+        }
+        xpath = theXmlDocumentRoot + xpath;
+        if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+        {
+            return false;
+        }
+        theSwathFirstCol = nodeValue.toInt32();
+        
+        //---
+        // Fetch the swath last col:
+        //---
+        if (theDIMAPVersion == OSSIM_PLEIADES_DIMAPv1)
+        {
+          xpath = "/Geometric_Data/Sensor_Model_Characteristics/Sensor_Viewing_Model/Position_In_Retina/LAST_COL";
+        }
+        else
+        {
+          xpath = "/Geometric_Data/Refined_Model/Geometric_Calibration/Instrument_Calibration/Swath_Range/LAST_COL";
+        }
+        xpath = theXmlDocumentRoot + xpath;
+        if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+        {
+            return false;
+        }
+        theSwathLastCol = nodeValue.toInt32();
+      }
+      
       return true;
    }
 
@@ -2585,6 +2866,9 @@ namespace ossimplugins
         {
            return false;
         }
+        
+        // TODO : fetch (if any in v1) the other acquisition time parameters
+        
       }
       else
       {
@@ -2611,6 +2895,7 @@ namespace ossimplugins
         }
 
         theAcquisitionDate = firstLineImagingDate + "T" + firstLineImagingTime;
+        
       }
 
       return true;
diff --git a/Utilities/otbossimplugins/ossim/ossimPleiadesDimapSupportData.h b/Utilities/otbossimplugins/ossim/ossimPleiadesDimapSupportData.h
index 3b3e99b..c3965a9 100644
--- a/Utilities/otbossimplugins/ossim/ossimPleiadesDimapSupportData.h
+++ b/Utilities/otbossimplugins/ossim/ossimPleiadesDimapSupportData.h
@@ -114,6 +114,10 @@ namespace ossimplugins
          void          getIncidenceAngle(std::vector<ossim_float64>& ia)     const;
          void          getViewingAngle(std::vector<ossim_float64>& va)       const;
 
+         //Along and across track incidence angle
+         void getAcrossTrackIncidenceAngle(std::vector<ossim_float64>& act) const;
+         void getAlongTrackIncidenceAngle(std::vector<ossim_float64>& alt) const;
+
          //---
          // Corner points:
          //---
@@ -152,7 +156,13 @@ namespace ossimplugins
          double getLatScale()        const {return theLatScale;};
          double getLonScale()        const {return theLonScale;};
          double getHeightScale()     const {return theHeightScale;};
-
+         
+         
+         ossimString    getTimeRangeStart() const {return theTimeRangeStart;};
+         ossimString    getTimeRangeEnd()   const {return theTimeRangeEnd;};
+         ossim_float64  getLinePeriod()     const {return theLinePeriod;};
+         ossim_int32    getSwathFirstCol()  const {return theSwathFirstCol;};
+         ossim_int32    getSwathLastCol()   const {return theSwathLastCol;}; 
 
 
       private:
@@ -176,6 +186,9 @@ namespace ossimplugins
          std::vector<ossim_float64>  theIncidenceAngle;
          std::vector<ossim_float64>  theViewingAngle;
          std::vector<ossim_float64>  theAzimuthAngle;
+
+         std::vector<ossim_float64> theAlongTrackIncidenceAngle;
+         std::vector<ossim_float64> theAcrossTrackIncidenceAngle;
    
          ossimIpt                    theImageSize;
          ossimIpt                    theTileSize;
@@ -206,8 +219,8 @@ namespace ossimplugins
          double    theErrBiasX;
          double    theErrBiasY;
          double    theErrRand;
-         ossim_int32 theLineOffset;
-         ossim_int32 theSampOffset;
+         double    theLineOffset;
+         double    theSampOffset;
          double    theLatOffset;
          double    theLonOffset;
          double    theHeightOffset;
@@ -221,6 +234,14 @@ namespace ossimplugins
          std::vector<double> theLineDenCoeff;
          std::vector<double> theSampNumCoeff;
          std::vector<double> theSampDenCoeff;
+         
+         // Additional metadata used to enhance pansharpening
+         ossimString    theTimeRangeStart;
+         ossimString    theTimeRangeEnd;
+         ossim_float64  theLinePeriod;
+         ossim_int32    theSwathFirstCol;
+         ossim_int32    theSwathLastCol;
+         
 
 
          //--- TODO MSD Check if it is necessary to keep that
diff --git a/Utilities/otbossimplugins/ossim/ossimPluginProjectionFactory.cpp b/Utilities/otbossimplugins/ossim/ossimPluginProjectionFactory.cpp
index 13175c9..0da1b33 100644
--- a/Utilities/otbossimplugins/ossim/ossimPluginProjectionFactory.cpp
+++ b/Utilities/otbossimplugins/ossim/ossimPluginProjectionFactory.cpp
@@ -9,7 +9,12 @@
 //----------------------------------------------------------------------------
 // $Id$
 
-
+//***
+// Note to programmer: To add a new model, search this file for "ADD_MODEL"
+// to locate places requiring editing. Functional example below...
+//
+// ADD_MODEL: Include all sensor model headers here:
+//***
 #include "ossimPluginProjectionFactory.h"
 #include <ossim/base/ossimKeywordNames.h>
 #include <ossim/base/ossimRefPtr.h>
@@ -24,6 +29,7 @@
 #include "ossimPleiadesModel.h"
 #include <ossim/base/ossimNotifyContext.h>
 #include "ossimTileMapModel.h"
+#include "ossimSpot6Model.h"
 
 //***
 // Define Trace flags for use within this file:
@@ -252,6 +258,49 @@ ossimProjection* ossimPluginProjectionFactory::createProjection(
      }
    }
 
+   if(traceDebug())
+   {
+      ossimNotify(ossimNotifyLevel_DEBUG)
+             << MODULE << " DEBUG: testing ossimSpot6Model" << std::endl;
+   }
+
+   // Spot6
+   if ( !projection )
+   {
+      ossimRefPtr<ossimSpot6Model> model = new ossimSpot6Model();
+      if ( model->open(filename) )
+      {
+         projection = model.get(); 
+      }
+      else
+      {
+         model = 0;
+      }
+   }
+
+   //***
+   // ADD_MODEL: (Please leave this comment for the next programmer)
+   //***
+   //if(traceDebug())
+   //{
+    //  ossimNotify(ossimNotifyLevel_DEBUG)
+     //        << MODULE << " DEBUG: testing MY_NEW_MODEL" << std::endl;
+   //}
+
+   // MY_NEW_MODEL
+   //if ( !projection )
+   //{
+    //  ossimRefPtr<MY_NEW_MODEL> model = new MY_NEW_MODEL();
+     // if ( model->open(filename) )
+      //{
+       //  projection = model.get();
+      //}
+   //   else
+   //   {
+  //       model = 0;
+  //    }
+   //}
+
    return projection.release();
 }
 
@@ -306,6 +355,17 @@ ossimProjection* ossimPluginProjectionFactory::createProjection(
    {
      return new ossimPleiadesModel;
    }
+   else if (name == STATIC_TYPE_NAME(ossimSpot6Model))
+   {
+     return new ossimSpot6Model;
+   }
+
+   //***
+   // ADD_MODEL: (Please leave this comment for the next programmer)
+   //***
+//   if(name == MY_NEW_MODEL)
+//      return new myNewModel;
+
 
    if(traceDebug())
    {
@@ -405,6 +465,26 @@ ossimProjection* ossimPluginProjectionFactory::createProjection(
             result = 0;
          }
       }
+      else if (type == "ossimSpot6Model")
+      {
+         result = new ossimSpot6Model();
+         if ( !result->loadState(kwl, prefix) )
+         {
+            result = 0;
+         }
+      }
+
+   //***
+   // ADD_MODEL: (Please leave this comment for the next programmer)
+   //***
+//      else if (type == "ossimSpot6Model")
+//      {
+//         result = new ossimSpot6Model();
+//         if ( !result->loadState(kwl, prefix) )
+//         {
+//            result = 0;
+//         }
+//      }
 
    }
 
@@ -442,6 +522,12 @@ void ossimPluginProjectionFactory::getTypeNameList(std::vector<ossimString>& typ
    typeList.push_back(STATIC_TYPE_NAME(ossimFormosatModel));
    typeList.push_back(STATIC_TYPE_NAME(ossimTileMapModel));
    typeList.push_back(STATIC_TYPE_NAME(ossimPleiadesModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimSpot6Model));
+
+   //***
+   // ADD_MODEL: Please leave this comment for the next programmer. Add above.
+   //***
+   //typeList.push_back(STATIC_TYPE_NAME(MY_NEW_MODEL));
 }
 
 bool ossimPluginProjectionFactory::isTileMap(const ossimFilename& filename)const
diff --git a/Utilities/otbossimplugins/ossim/ossimSpot6DimapSupportData.cpp b/Utilities/otbossimplugins/ossim/ossimSpot6DimapSupportData.cpp
new file mode 100644
index 0000000..d730421
--- /dev/null
+++ b/Utilities/otbossimplugins/ossim/ossimSpot6DimapSupportData.cpp
@@ -0,0 +1,2217 @@
+//*******************************************************************
+// Copyright (C) 2014  Centre National Etudes Spatiales
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 3 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// Author : Christophe Palmann (christophe.palmann at c-s.fr)
+//
+// Description:
+//
+// Contains declaration of class ossimSpot6DimapSupportData
+//
+//*****************************************************************************
+
+#include <ossimSpot6DimapSupportData.h>
+#include <ossim/base/ossimKeywordlist.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimTrace.h>
+
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimXmlDocument.h>
+#include <ossim/base/ossimXmlAttribute.h>
+#include <ossim/base/ossimXmlNode.h>
+
+#include <ossimPluginCommon.h>
+#include <ossim/base/ossimCommon.h>
+
+#include <ossim/base/ossimDatum.h>
+#include <ossim/base/ossimNotifyContext.h>
+
+#include <cstdio>
+#include <cstdlib>
+#include <iostream>
+#include <iterator>
+#include <sstream>
+
+
+// Define Trace flags for use within this file:
+static ossimTrace traceExec  ("ossimSpot6DimapSupportData:exec");
+static ossimTrace traceDebug ("ossimSpot6DimapSupportData:debug");
+
+static std::string getVectorFloat64AsString(std::vector<ossim_float64> in)
+{
+   std::vector<ossim_float64>::iterator it;
+   std::stringstream strTmp;
+
+   for ( it=in.begin() ; it < in.end(); it++ )
+   {
+      strTmp << " " << (*it);
+   }
+
+   return strTmp.str();
+}
+
+static std::string getVectorDoubleAsString(std::vector<double> in)
+{
+   std::vector<double>::iterator it;
+   std::stringstream strTmp;
+
+   for ( it=in.begin() ; it < in.end(); it++ )
+   {
+      strTmp << " " << (*it);
+   }
+
+   return strTmp.str();
+}
+
+static std::string getVectorStringAsString(std::vector<ossimString> in)
+{
+   std::vector<ossimString>::iterator it;
+   std::stringstream strTmp;
+
+   for ( it=in.begin() ; it < in.end(); it++ )
+   {
+      strTmp << " " << (*it);
+   }
+
+   return strTmp.str();
+}
+
+
+
+namespace ossimplugins
+{
+
+   static bool readOneXmlNode(ossimRefPtr<ossimXmlDocument> xmlDocument,
+                              ossimString xpath,
+                              ossimString& nodeValue)
+   {
+      vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
+
+      xmlDocument->findNodes(xpath, xml_nodes);
+      if (xml_nodes.size() == 0)
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << " DEBUG:"
+                                                << "\nCould not find: " << xpath << std::endl;
+         }
+         return false;
+      }
+      if (xml_nodes.size() != 1)
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << " DEBUG:"
+                                                << "\nMore than one node value with " << xpath << std::endl;
+         }
+         return false;
+      }
+      nodeValue = xml_nodes[0]->getText();
+      return true;
+   }
+
+   ossimSpot6DimapSupportData::ossimSpot6DimapSupportData ()
+      :ossimErrorStatusInterface(),
+       theDIMAPVersion(OSSIM_Spot6_UNKNOWN),
+       theMetadataSubProfile(OSSIM_Spot6_METADATA_SUBPROFILE_UNKNOWN),
+       theProductIsOk(false),
+       theRpcIsOk(false),
+       theXmlDocumentRoot(),
+
+       theSensorID(),
+       theImageID(),
+       theProductionDate(),
+       theAcquisitionDate(),
+       theInstrument(),
+       theInstrumentIndex(),
+       theProcessingLevelString(),
+       theSpectralProcessingString(),
+
+       theSunAzimuth(),
+       theSunElevation(),
+       theIncidenceAngle(),
+       theViewingAngle(),
+       theAzimuthAngle(),
+
+       theImageSize(0, 0),
+       theTileSize(0, 0),
+       theNumberOfMegaTilesInRow(0),
+       theNumberOfMegaTilesInCol(0),
+       theNumberOfMegaTiles(0),
+       theMultiDataFile(),
+
+       theNumBands(0),
+       theBandOrder(),
+
+       thePhysicalBias(),
+       thePhysicalGain(),
+       theSolarIrradiance(),
+
+       theUlCorner(),
+       theUrCorner(),
+       theLrCorner(),
+       theLlCorner(),
+
+       theSpecId(),
+       theErrBias(0),
+       theErrBiasX(0),
+       theErrBiasY(0),
+       theErrRand(0),
+       theLineOffset(0),
+       theSampOffset(0),
+       theLatOffset(0),
+       theLonOffset(0),
+       theHeightOffset(0),
+       theLineScale(0),
+       theSampScale(0),
+       theLatScale(0),
+       theLonScale(0),
+       theHeightScale(0),
+       theLineNumCoeff(),
+       theLineDenCoeff(),
+       theSampNumCoeff(),
+       theSampDenCoeff(),
+
+       theRefGroundPoint(0.0, 0.0, 0.0),
+       theRefImagePoint(0.0, 0.0)
+   {
+   }
+
+   ossimSpot6DimapSupportData::~ossimSpot6DimapSupportData ()
+   {
+   }
+
+
+   void ossimSpot6DimapSupportData::clearFields()
+   {
+      clearErrorStatus();
+      theDIMAPVersion = OSSIM_Spot6_UNKNOWN;
+      theMetadataSubProfile = OSSIM_Spot6_METADATA_SUBPROFILE_UNKNOWN;
+      theProductIsOk = false;
+      theRpcIsOk = false;
+      theXmlDocumentRoot = "";
+      theImageID = "";
+      theSensorID="";
+      theProductionDate = "";
+      theAcquisitionDate = "";
+      theInstrument = "";
+      theInstrumentIndex = "";
+      theProcessingLevelString = "";
+      theSpectralProcessingString = "";
+
+      theSunAzimuth.clear();
+      theSunElevation.clear();
+      theIncidenceAngle.clear();
+      theViewingAngle.clear();
+      theAzimuthAngle.clear();
+
+      theImageSize.makeNan();
+      theTileSize.makeNan();
+      theNumberOfMegaTilesInRow = 0;
+      theNumberOfMegaTilesInCol = 0;
+      theNumberOfMegaTiles = 0;
+      ossimString msg = "";
+      theMultiDataFile.setBooleanValue(false, msg);
+
+      theNumBands = 0;
+      theBandOrder.clear();
+
+      thePhysicalBias.clear();
+      thePhysicalGain.clear();
+      theSolarIrradiance.clear();
+
+      //---
+      // Corner points:
+      //---
+      theUlCorner.makeNan();
+      theUrCorner.makeNan();
+      theLrCorner.makeNan();
+      theLlCorner.makeNan();
+
+      theRefGroundPoint.makeNan();
+      theRefImagePoint.makeNan();
+
+      //---
+      // RPC model parameters
+      //---
+      theErrBias = 0.0;
+      theErrBiasX = 0.0;
+      theErrBiasY = 0.0;
+      theErrRand = 0.0;
+      theLineOffset = 0;
+      theSampOffset = 0;
+      theLatOffset = 0.0;
+      theLonOffset = 0.0;
+      theHeightOffset = 0.0;
+      theLineScale = 0.0;
+      theSampScale = 0.0;
+      theLatScale = 0.0;
+      theLonScale = 0.0;
+      theHeightScale = 0.0;
+      theLineNumCoeff.clear();
+      theLineDenCoeff.clear();
+      theSampNumCoeff.clear();
+      theSampDenCoeff.clear();
+      theSpecId = "";
+   }
+
+   void ossimSpot6DimapSupportData::printInfo(ostream& os) const
+   {
+
+      os << "\n----------------- Info on Spot6 Image -------------------"
+         << "\n  "
+         << "\n  Job Number (ID):      " << theImageID
+         << "\n  Acquisition Date:     " << theAcquisitionDate
+         << "\n  Instrument:           " << theInstrument
+         << "\n  Instrument Index:     " << theInstrumentIndex
+         << "\n  Production Date:      " << theProductionDate
+         << "\n  Processing Level:     " << theProcessingLevelString
+         << "\n  Spectral Processing:  " << theSpectralProcessingString
+
+         << "\n  Number of Bands:      " << theNumBands
+         << "\n  Bands Display Order:  " << getVectorStringAsString(theBandOrder)
+
+         << "\n  Image Size:           " << theImageSize
+         << "\n  Tile Size:            " << theTileSize
+         << "\n  Number Of Tiles (Row, Col): " << theNumberOfMegaTiles << " ("
+         << theNumberOfMegaTilesInRow << ", "
+         << theNumberOfMegaTilesInCol << ")"
+
+         << "\n  Incidence Angle (TopCenter, Center, BottomCenter):   " << getVectorFloat64AsString(theIncidenceAngle)
+         << "\n  Viewing Angle (TopCenter, Center, BottomCenter):     " << getVectorFloat64AsString(theViewingAngle)
+         << "\n  Azimuth Angle (TopCenter, Center, BottomCenter):     " << getVectorFloat64AsString(theAzimuthAngle)
+         << "\n  Sun Azimuth (TopCenter, Center, BottomCenter):       " << getVectorFloat64AsString(theSunAzimuth)
+         << "\n  Sun Elevation (TopCenter, Center, BottomCenter):     " << getVectorFloat64AsString(theSunElevation)
+
+         << "\n  Physical Bias (for each band):     " << getVectorFloat64AsString(thePhysicalBias)
+         << "\n  Physical Gain (for each band):     " << getVectorFloat64AsString(thePhysicalGain)
+         << "\n  Solar Irradiance (for each band):  " << getVectorFloat64AsString(theSolarIrradiance)
+
+         << "\n  Geo Center Point:     " << theRefGroundPoint
+         // TODO add RefImagePoint if necessary
+
+         << "\n  Corner Points:"
+         << "\n     UL: " << theUlCorner
+         << "\n     UR: " << theUrCorner
+         << "\n     LR: " << theLrCorner
+         << "\n     LL: " << theLlCorner
+         << "\n"
+
+         << "\n  RPC model parameters:"
+         << "\n     RPC ID: " << theSpecId
+         << "\n     SampNumCoeff: " << getVectorDoubleAsString(theSampNumCoeff)
+         << "\n     SampDenCoeff: " << getVectorDoubleAsString(theSampDenCoeff)
+         << "\n     LineNumCoeff: " << getVectorDoubleAsString(theLineNumCoeff)
+         << "\n     LineDenCoeff: " << getVectorDoubleAsString(theLineDenCoeff)
+         << "\n     LonScale: " << theLonScale
+         << "\n     LonOffset: " << theLonOffset
+         << "\n     LatScale: " << theLatScale
+         << "\n     LonScale: " << theLonScale
+         << "\n     HeightScale: " << theHeightScale
+         << "\n     HeightOffset: " << theHeightOffset
+         << "\n     SampScale: " << theSampScale
+         << "\n     SampOffset: " << theSampOffset
+         << "\n     LineScale: " << theLineScale
+         << "\n     LineOffset: " << theLineOffset
+         << "\n     theErrBias: " << theErrBias
+         << "\n     theErrBiasX: " << theErrBiasX
+         << "\n     theErrBiasY: " << theErrBiasY
+         << "\n     theErrRand: " << theErrRand
+         << "\n"
+         << "\n---------------------------------------------------------"
+         << "\n  " << std::endl;
+   }
+
+   bool ossimSpot6DimapSupportData::parseXmlFile(const ossimFilename& file)
+   {
+      static const char MODULE[] = "ossimSpot6DimapSupportData::parseXmlFile";
+      //traceDebug.setTraceFlag(true);
+
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nFile: " << file << std::endl;
+      }
+
+      if (allMetadataRead())
+         clearFields();
+
+      //---
+      // Instantiate the file reading:
+      //---
+      ossim_int64 fileSize = file.fileSize();
+      std::ifstream in(file.c_str(), std::ios::binary|std::ios::in);
+      std::vector<char> fullBuffer;
+      ossimString bufferedIo;
+      if(in.good()&&(fileSize > 0))
+      {
+         char buf[100];
+         fullBuffer.resize(fileSize);
+         in.read(buf, std::min((ossim_int64)100, fileSize));
+         if(!in.fail())
+         {
+            ossimString testString = ossimString(buf,
+                                                 buf + in.gcount());
+            if(testString.contains("xml"))
+            {
+               in.seekg(0);
+               in.read(&fullBuffer.front(), (std::streamsize)fullBuffer.size());
+               if(!in.fail())
+               {
+                  bufferedIo = ossimString(fullBuffer.begin(),
+                                           fullBuffer.begin()+in.gcount());
+               }
+            }
+         }
+      }
+      else
+      {
+         return false;
+      }
+      //---
+      // Instantiate the XML parser:
+      //---
+      ossimRefPtr<ossimXmlDocument> xmlDocument;
+
+      if(bufferedIo.empty())
+      {
+         xmlDocument = new ossimXmlDocument(file);
+      }
+      else
+      {
+         xmlDocument = new ossimXmlDocument;
+         std::istringstream inStringStream(bufferedIo.string());
+         if(!xmlDocument->read(inStringStream))
+         {
+            return false;
+         }
+      }
+      if (xmlDocument->getErrorStatus())
+      {
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+               << "\nUnable to parse xml file" << std::endl;
+         }
+         setErrorStatus();
+         return false;
+      }
+
+      if (!parseMetadataIdentificationDIMAPv2(xmlDocument) )
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+               << "\nparseMetadataIdentification failed.  Returning false"
+               << std::endl;
+         }
+         return false;
+      }
+
+
+      if (theMetadataSubProfile == OSSIM_Spot6_METADATA_SUBPROFILE_PRODUCT)
+      {
+         if (theProductIsOk)
+            clearFields();
+
+         if (!parseDatasetIdentification(xmlDocument))
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_FATAL)
+                  << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+                  << "\nparseDatasetdentification failed.  Returning false" << std::endl;
+            }
+            return false;
+         }
+
+         if (!parseDatasetContent(xmlDocument))
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+               << "\nparseDatasetContent failed.  Returning false" << std::endl;
+            return false;
+         }
+
+         if (!parseProductInformation(xmlDocument))
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_FATAL)
+                  << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+                  << "\nparseProductInformation failed.  Returning false" << std::endl;
+            }
+            return false;
+         }
+
+         if (!parseCoordinateReferenceSystem(xmlDocument))
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_FATAL)
+                  << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+                  << "\nparseCoordinateReferenceSystem failed.  Returning false" << std::endl;
+            }
+            return false;
+         }
+
+         if (!parseGeoposition(xmlDocument))
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_FATAL)
+                  << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+                  << "\nparseGeoposition failed.  Returning false" << std::endl;
+            }
+            return false;
+         }
+
+         if (!parseProcessingInformation(xmlDocument))
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_FATAL)
+                  << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+                  << "\nparseProcessingInformation failed.  Returning false" << std::endl;
+            }
+            return false;
+         }
+
+         if (!parseRasterData(xmlDocument))
+         {
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_FATAL)
+                  << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+                  << "\nparseRasterData failed.  Returning false" << std::endl;
+            }
+            return false;
+         }
+
+         if (!parseRadiometricData(xmlDocument))
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+               << "\nparseRadiometricData failed.  Returning false" << std::endl;
+            return false;
+         }
+
+         if (!parseGeometricData(xmlDocument))
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+               << "\nparseGeometricData failed.  Returning false" << std::endl;
+            return false;
+         }
+
+         if (!parseQualityAssessment(xmlDocument))
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+               << "\nparseQualityAssessment failed.  Returning false" << std::endl;
+            return false;
+         }
+
+         if (!parseDatasetSources(xmlDocument))
+         {
+            ossimNotify(ossimNotifyLevel_FATAL)
+               << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+               << "\nparseDatasetSources failed.  Returning false" << std::endl;
+            return false;
+         }
+
+         theProductIsOk = true;
+      }
+
+      if (theMetadataSubProfile == OSSIM_Spot6_METADATA_SUBPROFILE_RPC)
+      {
+         // Parse RPC file
+         if (theProcessingLevelString == "SENSOR")
+         {
+            if (parseRPCMetadata(xmlDocument) == false)
+            {
+               ossimNotify(ossimNotifyLevel_FATAL)
+                  << MODULE << " DEBUG:" << "ossimSpot6DimapSupportData::parseXmlFile:"
+                  << "\nparseRPCMetadata initialization failed.  Returning false" << std::endl;
+               return false;
+            }
+            theRpcIsOk = true;
+         }
+         else
+            theRpcIsOk = true;
+      }
+
+      if (theProcessingLevelString != "SENSOR")
+         theRpcIsOk = true;
+
+      if (traceDebug() && allMetadataRead())
+      {
+         printInfo(ossimNotify(ossimNotifyLevel_DEBUG));
+         ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG: exited..." << std::endl;
+      }
+
+      return true;
+   }
+
+   ossimString ossimSpot6DimapSupportData::getProcessingLevel() const
+   {
+      return theProcessingLevelString;
+   }
+
+   ossimString ossimSpot6DimapSupportData::getSensorID() const
+   {
+      return theSensorID;
+   }
+
+   ossimString ossimSpot6DimapSupportData::getAcquisitionDate() const
+   {
+      return theAcquisitionDate;
+   }
+
+   ossimString ossimSpot6DimapSupportData::getProductionDate() const
+   {
+      return theProductionDate;
+   }
+
+   ossimString ossimSpot6DimapSupportData::getImageID() const
+   {
+      return theImageID;
+   }
+
+   ossimString ossimSpot6DimapSupportData::getInstrument() const
+   {
+      return theInstrument;
+   }
+
+   ossimString ossimSpot6DimapSupportData::getInstrumentIndex() const
+   {
+      return theInstrumentIndex;
+   }
+
+   void ossimSpot6DimapSupportData::getSunAzimuth(std::vector<ossim_float64>& az) const
+   {
+      az = theSunAzimuth;
+   }
+
+   void ossimSpot6DimapSupportData::getSunElevation(std::vector<ossim_float64>& el) const
+   {
+      el = theSunElevation;
+   }
+
+   void ossimSpot6DimapSupportData::getImageSize(ossimIpt& sz) const
+   {
+      sz = theImageSize;
+   }
+
+   ossim_uint32 ossimSpot6DimapSupportData::getNumberOfBands() const
+   {
+      return theNumBands;
+   }
+
+   void ossimSpot6DimapSupportData::getIncidenceAngle(std::vector<ossim_float64>& ia) const
+   {
+      ia = theIncidenceAngle;
+   }
+
+   void ossimSpot6DimapSupportData::getViewingAngle(std::vector<ossim_float64>& va) const
+   {
+      va = theViewingAngle;
+   }
+
+   void ossimSpot6DimapSupportData::getRefGroundPoint(ossimGpt& gp) const
+   {
+      gp = theRefGroundPoint;
+   }
+
+   void ossimSpot6DimapSupportData::getRefImagePoint(ossimDpt& rp) const
+   {
+      rp = theRefImagePoint;
+   }
+
+   void ossimSpot6DimapSupportData::getUlCorner(ossimGpt& pt) const
+   {
+      pt = theUlCorner;
+   }
+
+   void ossimSpot6DimapSupportData::getUrCorner(ossimGpt& pt) const
+   {
+      pt = theUrCorner;
+   }
+
+   void ossimSpot6DimapSupportData::getLrCorner(ossimGpt& pt) const
+   {
+      pt = theLrCorner;
+   }
+
+   void ossimSpot6DimapSupportData::getLlCorner(ossimGpt& pt) const
+   {
+      pt = theLlCorner;
+   }
+
+   void ossimSpot6DimapSupportData::getImageRect(ossimDrect& rect)const
+   {
+      rect = ossimDrect(0.0, 0.0, theImageSize.x-1.0, theImageSize.y-1.0);
+   }
+
+
+   bool ossimSpot6DimapSupportData::saveState(ossimKeywordlist& kwl,
+                                                 const char* prefix)const
+   {
+      ossimString tempString;
+      ossim_uint32 idx = 0;
+
+      kwl.add(prefix,
+              ossimKeywordNames::TYPE_KW,
+              "ossimSpot6DimapSupportData",
+              true);
+
+      tempString = "";
+      for(idx = 0; idx < theSunAzimuth.size(); ++idx)
+      {
+         tempString += (ossimString::toString(theSunAzimuth[idx]) + " ");
+      }
+
+      kwl.add(prefix,
+              ossimKeywordNames::AZIMUTH_ANGLE_KW,
+              tempString,
+              true);
+
+      kwl.add(prefix,
+              "number_of_azimuth_angle",
+              static_cast<ossim_uint32>(theSunAzimuth.size()),
+              true);
+
+      tempString = "";
+      for(idx = 0; idx <  theSunElevation.size(); ++idx)
+      {
+         tempString += (ossimString::toString(theSunElevation[idx]) + " ");
+      }
+
+      kwl.add(prefix,
+              ossimKeywordNames::ELEVATION_ANGLE_KW,
+              tempString,
+              true);
+
+      kwl.add(prefix,
+              "number_of_elevation_angle",
+              static_cast<ossim_uint32>(theSunElevation.size()),
+              true);
+
+      //---
+      // Note: since this is a new keyword, use the point.toString as there is
+      // no backwards compatibility issues.
+      //---
+
+      kwl.add(prefix,
+              "image_size",
+              ossimString::toString(theImageSize.x) + " " +
+              ossimString::toString(theImageSize.y),
+              true);
+
+      kwl.add(prefix,
+              "reference_ground_point",
+              ossimString::toString(theRefGroundPoint.latd()) + " " +
+              ossimString::toString(theRefGroundPoint.lond()) + " " +
+              ossimString::toString(theRefGroundPoint.height()) + " " +
+              theRefGroundPoint.datum()->code(),
+              true);
+
+      kwl.add(prefix,
+              "reference_image_point",
+              ossimString::toString(theRefImagePoint.x) + " " +
+              ossimString::toString(theRefImagePoint.y),
+              true);
+
+      kwl.add(prefix,
+              ossimKeywordNames::NUMBER_BANDS_KW,
+              theNumBands,
+              true);
+
+      tempString = "";
+      for(idx = 0; idx <  theBandOrder.size(); ++idx)
+      {
+         tempString += (theBandOrder[idx] + " ");
+      }
+
+      kwl.add(prefix,
+              "band_name_list",
+              tempString,
+              true);
+
+      kwl.add(prefix,
+              "image_id",
+              theImageID,
+              true);
+
+      kwl.add(prefix,
+              "processing_level",
+              theProcessingLevelString,
+              true);
+
+      kwl.add(prefix,
+              "instrument",
+              theInstrument,
+              true);
+
+      kwl.add(prefix,
+              "instrument_index",
+              theInstrumentIndex,
+              true);
+
+      kwl.add(prefix,
+              ossimKeywordNames::IMAGE_DATE_KW,
+              theAcquisitionDate,
+              true);
+
+      kwl.add(prefix,
+              "production_date",
+              theProductionDate,
+              true);
+
+      tempString = "";
+      for(idx = 0; idx <  theIncidenceAngle.size(); ++idx)
+      {
+         tempString += (ossimString::toString(theIncidenceAngle[idx]) + " ");
+      }
+
+      kwl.add(prefix,
+              "incident_angle",
+              tempString,
+              true);
+
+      kwl.add(prefix,
+              "number_of_incident_angle",
+              static_cast<ossim_uint32>(theIncidenceAngle.size()),
+              true);
+
+      tempString = "";
+      for(idx = 0; idx <  theViewingAngle.size(); ++idx)
+      {
+         tempString += (ossimString::toString(theViewingAngle[idx]) + " ");
+      }
+
+      kwl.add(prefix,
+              "viewing_angle",
+              tempString,
+              true);
+
+      kwl.add(prefix,
+              "number_of_viewing_angle",
+              static_cast<ossim_uint32>(theViewingAngle.size()),
+              true);
+
+      tempString = "";
+      for(idx = 0; idx <  theAzimuthAngle.size(); ++idx)
+      {
+         tempString += (ossimString::toString(theAzimuthAngle[idx]) + " ");
+      }
+
+      kwl.add(prefix,
+              "scene_orientation",
+              tempString,
+              true);
+
+      kwl.add(prefix,
+              "number_of_scene_orientation",
+              static_cast<ossim_uint32>(theAzimuthAngle.size()),
+              true);
+
+      kwl.add(prefix,
+              "ul_ground_point",
+              ossimString::toString(theUlCorner.latd()) + " " +
+              ossimString::toString(theUlCorner.lond()) + " " +
+              ossimString::toString(theUlCorner.height()) + " " +
+              theUlCorner.datum()->code(),
+              true);
+
+      kwl.add(prefix,
+              "ur_ground_point",
+              ossimString::toString(theUrCorner.latd()) + " " +
+              ossimString::toString(theUrCorner.lond()) + " " +
+              ossimString::toString(theUrCorner.height()) + " " +
+              theUrCorner.datum()->code(),
+              true);
+
+      kwl.add(prefix,
+              "lr_ground_point",
+              ossimString::toString(theLrCorner.latd()) + " " +
+              ossimString::toString(theLrCorner.lond()) + " " +
+              ossimString::toString(theLrCorner.height()) + " " +
+              theLrCorner.datum()->code(),
+              true);
+
+      kwl.add(prefix,
+              "ll_ground_point",
+              ossimString::toString(theLlCorner.latd()) + " " +
+              ossimString::toString(theLlCorner.lond()) + " " +
+              ossimString::toString(theLlCorner.height()) + " " +
+              theLlCorner.datum()->code(),
+              true);
+
+      kwl.add(prefix,
+              "sensorID",
+              theSensorID,
+              true);
+
+
+      tempString = "";
+      for(idx = 0; idx < thePhysicalBias.size(); ++idx)
+      {
+         tempString += (ossimString::toString(thePhysicalBias[idx]) + " ");
+      }
+      kwl.add(prefix,
+              "physical_bias",
+              tempString,
+              true);
+
+      tempString = "";
+      for(idx = 0; idx < thePhysicalGain.size(); ++idx)
+      {
+         tempString += (ossimString::toString(thePhysicalGain[idx]) + " ");
+      }
+      kwl.add(prefix,
+              "physical_gain",
+              tempString,
+              true);
+
+      tempString = "";
+      for(idx = 0; idx < theSolarIrradiance.size(); ++idx)
+      {
+         tempString += (ossimString::toString(theSolarIrradiance[idx]) + " ");
+      }
+
+      kwl.add(prefix,
+              "solar_irradiance",
+              tempString,
+              true);
+
+      return true;
+   }
+
+   bool ossimSpot6DimapSupportData::loadState(const ossimKeywordlist& kwl,
+                                                 const char* prefix)
+   {
+      ossim_uint32 idx = 0;
+      ossim_uint32 total;
+      ossimString tempString;
+
+      clearFields();
+
+
+      ossimString type = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
+
+      if(type != "ossimSpot6DimapSupportData")
+      {
+         return false;
+      }
+
+      total =  ossimString(kwl.find(prefix,"number_of_azimuth_angle")).toUInt32();
+      theSunAzimuth.resize(total);
+      tempString = kwl.find(prefix,ossimKeywordNames::AZIMUTH_ANGLE_KW);
+      if(tempString != "")
+      {
+         std::istringstream in(tempString.string());
+         ossimString tempValue;
+         for(idx = 0; idx < theSunAzimuth.size();++idx)
+         {
+            in >> tempValue.string();
+            theSunAzimuth[idx] = tempValue.toDouble();
+         }
+      }
+
+      total =  ossimString(kwl.find(prefix,"number_of_elevation_angle")).toUInt32();
+      theSunElevation.resize(total);
+      tempString = kwl.find(prefix,ossimKeywordNames::ELEVATION_ANGLE_KW);
+      if(tempString != "")
+      {
+         std::istringstream in(tempString.string());
+         ossimString tempValue;
+         for(idx = 0; idx < theSunElevation.size();++idx)
+         {
+            in >> tempValue.string();
+            theSunElevation[idx] = tempValue.toDouble();
+         }
+      }
+
+      theImageSize      = createIpt(kwl.find(prefix, "image_size"));
+      theRefGroundPoint = createGround(kwl.find(prefix, "reference_ground_point"));
+      theRefImagePoint  = createDpt(kwl.find(prefix, "reference_image_point"));
+
+      theNumBands        = ossimString(kwl.find(prefix, ossimKeywordNames::NUMBER_BANDS_KW)).toUInt32();
+
+      theBandOrder.resize(theNumBands);
+      tempString = kwl.find(prefix,"band_name_list");
+      if(tempString != "")
+      {
+         std::istringstream in(tempString.string());
+         ossimString tempValue;
+         for(idx = 0; idx < theBandOrder.size();++idx)
+         {
+            in >> tempValue.string();
+            theBandOrder[idx] = tempValue;
+         }
+      }
+
+      theAcquisitionDate = kwl.find(prefix, ossimKeywordNames::IMAGE_DATE_KW);
+      theProductionDate  = kwl.find(prefix, "production_date");
+      theImageID         = kwl.find(prefix, "image_id");
+      theInstrument      = kwl.find(prefix, "instrument");
+      theInstrumentIndex = kwl.find(prefix, "instrument_index");
+   
+      total =  ossimString(kwl.find(prefix,"number_of_incident_angle")).toUInt32();
+      theIncidenceAngle.resize(total);
+      tempString = kwl.find(prefix,"incident_angle");
+      if(tempString != "")
+      {
+         std::istringstream in(tempString.string());
+         ossimString tempValue;
+         for(idx = 0; idx < theIncidenceAngle.size();++idx)
+         {
+            in >> tempValue.string();
+            theIncidenceAngle[idx] = tempValue.toDouble();
+         }
+      }
+
+      total =  ossimString(kwl.find(prefix,"number_of_viewing_angle")).toUInt32();
+      theViewingAngle.resize(total);
+      tempString = kwl.find(prefix,"viewing_angle");
+      if(tempString != "")
+      {
+         std::istringstream in(tempString.string());
+         ossimString tempValue;
+         for(idx = 0; idx < theViewingAngle.size();++idx)
+         {
+            in >> tempValue.string();
+            theViewingAngle[idx] = tempValue.toDouble();
+         }
+      }
+
+      total =  ossimString(kwl.find(prefix,"number_of_scene_orientation")).toUInt32();
+      theAzimuthAngle.resize(total);
+      tempString = kwl.find(prefix,"scene_orientation");
+      if(tempString != "")
+      {
+         std::istringstream in(tempString.string());
+         ossimString tempValue;
+         for(idx = 0; idx < theAzimuthAngle.size();++idx)
+         {
+            in >> tempValue.string();
+            theAzimuthAngle[idx] = tempValue.toDouble();
+         }
+      }
+
+
+      theUlCorner =createGround( kwl.find(prefix, "ul_ground_point"));
+      theUrCorner =createGround( kwl.find(prefix, "ur_ground_point"));
+      theLrCorner =createGround( kwl.find(prefix, "lr_ground_point"));
+      theLlCorner =createGround( kwl.find(prefix, "ll_ground_point"));
+
+      theSensorID = ossimString(kwl.find(prefix, "sensorID"));
+
+      theProcessingLevelString = ossimString(kwl.find(prefix, "processing_level"));
+
+      thePhysicalBias.resize(theNumBands);
+      tempString = kwl.find(prefix,"physical_bias");
+      if(tempString != "")
+      {
+         std::istringstream in(tempString.string());
+         ossimString tempValue;
+         for(idx = 0; idx < thePhysicalBias.size();++idx)
+         {
+            in >> tempValue.string();
+            thePhysicalBias[idx] = tempValue.toDouble();
+         }
+      }
+
+      thePhysicalGain.resize(theNumBands);
+      tempString = kwl.find(prefix,"physical_gain");
+      if(tempString != "")
+      {
+         std::istringstream in(tempString.string());
+         ossimString tempValue;
+         for(idx = 0; idx < thePhysicalGain.size();++idx)
+         {
+            in >> tempValue.string();
+            thePhysicalGain[idx] = tempValue.toDouble();
+         }
+      }
+
+      theSolarIrradiance.resize(theNumBands);
+      tempString = kwl.find(prefix,"solar_irradiance");
+      if(tempString != "")
+      {
+         std::istringstream in(tempString.string());
+         ossimString tempValue;
+         for(idx = 0; idx < theSolarIrradiance.size();++idx)
+         {
+            in >> tempValue.string();
+            theSolarIrradiance[idx] = tempValue.toDouble();
+         }
+      }
+
+      return true;
+   }
+
+   ossimGpt ossimSpot6DimapSupportData::createGround(const ossimString& s)const
+   {
+      std::istringstream in(s.string());
+      ossimString lat, lon, height;
+      ossimString code;
+
+      in >> lat.string() >> lon.string() >> height.string() >> code.string();
+
+      return ossimGpt(lat.toDouble(),
+                      lon.toDouble(),
+                      height.toDouble(),
+                      ossimDatumFactory::instance()->create(code));
+
+   }
+
+   ossimDpt ossimSpot6DimapSupportData::createDpt(const ossimString& s)const
+   {
+      std::istringstream in(s.string());
+      ossimString x, y;
+      ossimString code;
+
+      in >> x.string() >> y.string();
+
+      return ossimDpt(x.toDouble(), y.toDouble());
+
+   }
+
+   ossimIpt ossimSpot6DimapSupportData::createIpt(const ossimString& s)const
+   {
+      std::istringstream in(s.string());
+      ossimString x, y;
+      ossimString code;
+
+      in >> x.string() >> y.string();
+
+      return ossimIpt(x.toInt(), y.toInt());
+
+   }
+
+   bool ossimSpot6DimapSupportData::parseProductInformation(
+      ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      ossimString xpath;
+      vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
+
+      //---
+      // Fetch the Image ID:
+      //---
+      xpath = "/Product_Information/Delivery_Identification/JOB_ID";  //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, theImageID))
+      {
+         return false;
+      }
+
+      //---
+      // Fetch the ProductionDate:
+      //---
+      xpath = "/Product_Information/Delivery_Identification/PRODUCTION_DATE"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, theProductionDate))
+      {
+         return false;
+      }
+
+      return true;
+   }
+
+   bool ossimSpot6DimapSupportData::parseDatasetContent(
+      ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      ossimString xpath, nodeValue;
+      vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
+
+      //---
+      // Corner points:
+      //---
+      xml_nodes.clear();
+      xpath = "/Dataset_Content/Dataset_Extent/Vertex";
+      xpath = theXmlDocumentRoot + xpath;
+      xmlDocument->findNodes(xpath, xml_nodes);
+      if (xml_nodes.size() != 4)
+      {
+         setErrorStatus();
+         return false;
+      }
+      std::vector<ossimRefPtr<ossimXmlNode> >::iterator node = xml_nodes.begin();
+      while (node != xml_nodes.end())
+      {
+         ossimGpt gpt;
+         ossimDpt ipt;
+
+         std::vector<ossimRefPtr<ossimXmlNode> > sub_nodes;
+         xpath = "LAT";
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            return false;
+         }
+         gpt.lat = sub_nodes[0]->getText().toDouble();
+
+         sub_nodes.clear();
+         xpath = "LON";
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            return false;
+         }
+         gpt.lon = sub_nodes[0]->getText().toDouble();
+         gpt.hgt = 0.0; // assumed
+
+         sub_nodes.clear();
+         xpath = "ROW";
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            return false;
+         }
+         ipt.line = sub_nodes[0]->getText().toDouble() - 1.0;
+
+         sub_nodes.clear();
+         xpath = "COL";
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            return false;
+         }
+         ipt.samp = sub_nodes[0]->getText().toDouble() - 1.0;
+
+         if (ipt.line < 1.0)
+            if (ipt.samp < 1.0)
+               theUlCorner = gpt;
+            else
+               theUrCorner = gpt;
+         else
+            if (ipt.samp < 1.0)
+               theLlCorner = gpt;
+            else
+               theLrCorner = gpt;
+
+         ++node;
+      }
+
+
+
+      //---
+      // Center of frame.
+      //---
+      theRefGroundPoint.hgt = 0.0; // TODO needs to be looked up
+
+      if (!readOneXmlNode(xmlDocument,
+                             theXmlDocumentRoot + "/Dataset_Content/Dataset_Extent/Center/LON", // DIMAPv2
+                             nodeValue))
+      {
+            return false;
+      }
+      theRefGroundPoint.lon = nodeValue.toDouble();
+
+      if (!readOneXmlNode(xmlDocument, theXmlDocumentRoot + "/Dataset_Content/Dataset_Extent/Center/LAT", nodeValue)) // DIMAPv2
+         {
+            return false;
+         }
+      theRefGroundPoint.lat = nodeValue.toDouble();
+
+      return true;
+   }
+
+   bool ossimSpot6DimapSupportData::parseRadiometricData(
+      ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      ossimString xpath;
+      std::vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
+      std::vector<ossimRefPtr<ossimXmlNode> > sub_nodes;
+      std::vector<ossimRefPtr<ossimXmlNode> >::iterator node;
+
+      //---
+      // Fetch the gain and bias for each spectral band:
+      //---
+      thePhysicalGain.assign(theNumBands, 1.000);
+      thePhysicalBias.assign(theNumBands, 0.000);
+
+      xml_nodes.clear();
+      xpath = "/Radiometric_Data/Radiometric_Calibration/Instrument_Calibration/Band_Measurement_List/Band_Radiance";  //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      xmlDocument->findNodes(xpath, xml_nodes);
+
+      node = xml_nodes.begin();
+      while (node != xml_nodes.end())
+      {
+         sub_nodes.clear();
+         xpath = "BAND_ID";
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            return false;
+         }
+
+         ossimString bandName = sub_nodes[0]->getText();
+         ossim_uint32 bandIndex;
+         if (bandName == "B0")
+            bandIndex = 0;
+         else
+            if (bandName == "B1")
+               bandIndex = 1;
+            else
+               if (bandName == "B2")
+                  bandIndex = 2;
+               else
+                  if (bandName == "B3")
+                     bandIndex = 3;
+                  else
+                     if (bandName == "P") bandIndex = 0;
+                     else
+                     {
+                        ossimNotify(ossimNotifyLevel_WARN)
+                           << "ossimSpot6DimapSupportData::parseRadiometricMetadata ERROR: Band ID is incorrect\n";
+                     }
+
+         if ((bandIndex >= theNumBands ) )
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimSpot6DimapSupportData::parseRadiometricMetadata ERROR: Band index outside of range\n";
+            return false;
+         }
+
+         sub_nodes.clear();
+	 xpath = "BIAS"; //DIMAPv2
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            return false;
+         }
+         thePhysicalBias[bandIndex] = sub_nodes[0]->getText().toDouble();
+
+         sub_nodes.clear();
+	 xpath = "GAIN"; //DIMAPv2
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            return false;
+         }
+         thePhysicalGain[bandIndex] = sub_nodes[0]->getText().toDouble();
+
+         ++node;
+      }
+
+      // Initialize to 999 : we find this value in some DIMAPv2 file
+      // and there is no such tag in DIMAPv1 file
+      theSolarIrradiance.assign(theNumBands, 999.000);
+
+      xml_nodes.clear();
+      xpath = "/Radiometric_Data/Radiometric_Calibration/Instrument_Calibration/Band_Measurement_List/Band_Solar_Irradiance";
+      xpath = theXmlDocumentRoot + xpath;
+      xmlDocument->findNodes(xpath, xml_nodes);
+
+      node = xml_nodes.begin();
+      while (node != xml_nodes.end())
+      {
+         sub_nodes.clear();
+         xpath = "BAND_ID";
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            return false;
+         }
+
+         ossimString bandName = sub_nodes[0]->getText();
+         ossim_uint32 bandIndex;
+         if (bandName == "B0")
+            bandIndex = 0;
+         else
+            if (bandName == "B1")
+               if (theNumBands != 1)
+                  bandIndex = 1;
+               else
+                  bandIndex = 0;
+            else
+               if (bandName == "B2")
+                  if (theNumBands != 1)
+                     bandIndex = 2;
+                  else
+                     bandIndex = 0;
+               else
+                  if (bandName == "B3")
+                     if (theNumBands != 1)
+                        bandIndex = 3;
+                     else
+                        bandIndex = 0;
+                  else
+                     if (bandName == "P")
+                        bandIndex = 0;
+                     else
+                     {
+                        ossimNotify(ossimNotifyLevel_WARN)
+                           << "ossimSpot6DimapSupportData::parseRadiometricMetadata ERROR: Band ID is incorrect\n";
+                     }
+
+         if ((bandIndex >= theNumBands))
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimSpot6DimapSupportData::parseRadiometricMetadata ERROR: Band index outside of range 2\n";
+            return false;
+         }
+
+         sub_nodes.clear();
+         xpath = "VALUE";
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            return false;
+         }
+         theSolarIrradiance[bandIndex] = sub_nodes[0]->getText().toDouble();
+
+         ++node;
+      }
+
+      return true;
+   }
+
+
+   bool ossimSpot6DimapSupportData::parseRPCMetadata(
+      ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      static const char MODULE[] = "ossimSpot6DimapSupportData::parseRPCMetadata";
+      ossimString xpath, nodeValue;
+      vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
+
+      //---
+      // Fetch the Global RFM - Direct Model - Bias:
+      //---
+      xpath = "/Rational_Function_Model/Resource_Reference/RESOURCE_ID"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG: Could not find: " << xpath << std::endl;
+         return false;
+      }
+      theSpecId = nodeValue;
+
+      //---
+      // Fetch the Global RFM - Inverse Model:
+      //---
+      xml_nodes.clear();
+      xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      xmlDocument->findNodes(xpath, xml_nodes);
+      if (xml_nodes.empty())
+      {
+        setErrorStatus();
+        if(traceDebug())
+        {
+           ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG: Could not find: " << xpath << std::endl;
+        }
+        return false;
+      }
+
+      for (ossim_uint32 it = 1; it < 21; it ++)
+        {
+           std::ostringstream valueStr;
+           valueStr << it;
+
+           xml_nodes.clear();
+           xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/LINE_NUM_COEFF_"; //DIMAPv2
+           xpath = theXmlDocumentRoot + xpath;
+           xpath = xpath + valueStr.str();
+           xmlDocument->findNodes(xpath, xml_nodes);
+           if (xml_nodes.size() == 0)
+           {
+              setErrorStatus();
+              if(traceDebug())
+              {
+                 ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
+              }
+              return false;
+           }
+           theLineNumCoeff.push_back(xml_nodes[0]->getText().toDouble());
+
+           xml_nodes.clear();
+           xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/LINE_DEN_COEFF_"; //DIMAPv2
+           xpath = theXmlDocumentRoot + xpath;
+           xpath = xpath + valueStr.str();
+           xmlDocument->findNodes(xpath, xml_nodes);
+           if (xml_nodes.size() == 0)
+           {
+              setErrorStatus();
+              if(traceDebug())
+              {
+                 ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
+              }
+              return false;
+           }
+           theLineDenCoeff.push_back(xml_nodes[0]->getText().toDouble());
+
+           xml_nodes.clear();
+           xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/SAMP_NUM_COEFF_"; //DIMAPv2
+           xpath = theXmlDocumentRoot + xpath;
+           xpath = xpath + valueStr.str();
+           xmlDocument->findNodes(xpath, xml_nodes);
+           if (xml_nodes.size() == 0)
+           {
+              setErrorStatus();
+              if(traceDebug())
+              {
+                 ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
+              }
+              return false;
+           }
+           theSampNumCoeff.push_back(xml_nodes[0]->getText().toDouble());
+
+           xml_nodes.clear();
+           xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/SAMP_DEN_COEFF_"; //DIMAPv2
+           xpath = theXmlDocumentRoot + xpath;
+           xpath = xpath + valueStr.str();
+           xmlDocument->findNodes(xpath, xml_nodes);
+           if (xml_nodes.size() == 0)
+           {
+              setErrorStatus();
+              if(traceDebug())
+              {
+                 ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
+              }
+              return false;
+           }
+           theSampDenCoeff.push_back(xml_nodes[0]->getText().toDouble());
+        }
+
+
+      //---
+      // Fetch the Global RFM - Inverse Model - Bias:
+      //---
+      xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/ERR_BIAS_ROW"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theErrBiasX = nodeValue.toDouble();
+      xpath = "/Rational_Function_Model/Global_RFM/Inverse_Model/ERR_BIAS_COL"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theErrBiasY = nodeValue.toDouble();
+
+      //---
+      // Fetch the Global RFM validity parameters :
+      //---
+
+      xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LONG_SCALE"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theLonScale = nodeValue.toDouble();
+
+      xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LONG_OFF"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theLonOffset = nodeValue.toDouble();
+
+      xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LAT_SCALE"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theLatScale = nodeValue.toDouble();
+
+      xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LAT_OFF"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theLatOffset = nodeValue.toDouble();
+	
+      xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/HEIGHT_SCALE";
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theHeightScale = nodeValue.toDouble();
+
+      xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/HEIGHT_OFF"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theHeightOffset = nodeValue.toDouble();
+
+      xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/SAMP_SCALE"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theSampScale = nodeValue.toDouble();
+
+      xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/SAMP_OFF"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theSampOffset = nodeValue.toInt32();
+
+      xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LINE_SCALE"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theLineScale = nodeValue.toDouble();
+
+      xpath = "/Rational_Function_Model/Global_RFM/RFM_Validity/LINE_OFF"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theLineOffset = nodeValue.toInt32();
+
+      return true;
+   }
+
+   bool ossimSpot6DimapSupportData::parseMetadataIdentificationDIMAPv2(ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      static const char MODULE[] = "ossimSpot6DimapSupportData::parseMetadataIdentification";
+
+      vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
+      ossimString xpath, nodeValue;
+      theXmlDocumentRoot = "/DIMAP_Document";
+
+      //---
+      // Get the version string which can be used as a key for parsing.
+      //---
+      xml_nodes.clear();
+      xpath = "/Metadata_Identification/METADATA_FORMAT";
+      xpath = theXmlDocumentRoot + xpath;
+      xmlDocument->findNodes(xpath, xml_nodes);
+      if (xml_nodes.size() == 0)
+      {
+
+         // FIXME MSD: used to support Spot6/Pleiades samples from SPOT-IMAGES website which are not coherent
+         // with the specification (28/09/2012). Should be remove when first data will be available and sample
+         // replaced.
+         theXmlDocumentRoot = "/SPOT_DIMAP_Document";
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nTry to use the old root: " << theXmlDocumentRoot << endl;
+         }
+
+         xml_nodes.clear();
+         xpath = "/Metadata_Identification/METADATA_FORMAT";
+         xpath = theXmlDocumentRoot + xpath;
+         xmlDocument->findNodes(xpath, xml_nodes);
+         if (xml_nodes.size() == 0)
+         {
+            // FIXME MSD: used to support spot6/peiades samples from SPOT-IMAGES website which are not coherent
+            // with the specification (28/09/2012). Should be remove when first data will be available and sample
+            // replaced.
+            theXmlDocumentRoot = "/Dimap_Document";
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nTry to use the new root: " << theXmlDocumentRoot << endl;
+            }
+
+            xml_nodes.clear();
+            xpath = "/Metadata_Identification/METADATA_FORMAT";
+            xpath = theXmlDocumentRoot + xpath;
+            xmlDocument->findNodes(xpath, xml_nodes);
+            if (xml_nodes.size() == 0)
+            {
+               setErrorStatus();
+               if (traceDebug())
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << endl;
+               }
+               return false;
+            }
+         }
+      }
+
+      ossimString attribute = "version";
+      ossimString value;
+      xml_nodes[0]->getAttributeValue(value, attribute);
+      if (value != "2.0")
+      {
+         setErrorStatus();
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "WARNING: DIMAP metadata version is not correct!" << std::endl;
+         }
+         return false;
+      }
+
+      //---
+      // Check that it is a valid SPOT DIMAPv2 file
+      //---
+      xpath = "/Metadata_Identification/METADATA_PROFILE";
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+
+      ossimString metadataProfile;
+      if (  (nodeValue != "S6_SENSOR") 
+            && (nodeValue != "S6_ORTHO") 
+            && (nodeValue != "S6_MOSAIC") ) 
+      {
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "DEBUG:\n Not a Spot6 DIMAPv2 file: metadata profile is incorrect!" << std::endl;
+         }
+         return false;
+      }
+      else
+         metadataProfile = nodeValue;
+
+      //---
+      // Get the subprofile
+      //---
+      xpath = "/Metadata_Identification/METADATA_SUBPROFILE";
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+
+      if ((nodeValue == "PRODUCT")) 
+         theMetadataSubProfile = OSSIM_Spot6_METADATA_SUBPROFILE_PRODUCT;
+      else if ( (nodeValue == "RPC") && (metadataProfile == "S6_SENSOR") ) 
+         theMetadataSubProfile = OSSIM_Spot6_METADATA_SUBPROFILE_RPC;
+      else
+      {
+         theMetadataSubProfile = OSSIM_Spot6_METADATA_SUBPROFILE_UNKNOWN;
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG)
+               << "DEBUG:\n Not a Spot6 DIMAPv2 file: metadata subprofile is incorrect !" << std::endl;
+         }
+         return false;
+      }
+
+      theDIMAPVersion = OSSIM_Spot6_DIMAPv2;
+
+      return true;
+   }
+
+   bool ossimSpot6DimapSupportData::parseDatasetIdentification(ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      return true;
+   }
+
+   bool ossimSpot6DimapSupportData::parseCoordinateReferenceSystem(ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      return true;
+   }
+
+   bool ossimSpot6DimapSupportData::parseGeoposition(ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      return true;
+   }
+
+   bool ossimSpot6DimapSupportData::parseProcessingInformation(ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      static const char MODULE[] = "ossimSpot6DimapSupportData::parseProcessingInformation";
+
+      vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
+      ossimString xpath, nodeValue;
+
+      //---
+      // Fetch the Processing Level:
+      //---
+      xpath = "/Processing_Information/Product_Settings/PROCESSING_LEVEL"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, theProcessingLevelString))
+      {
+         return false;
+      }
+
+      //---
+      // Fetch the Spectral Processing:
+      //---
+      xpath = "/Processing_Information/Product_Settings/PROCESSING_LEVEL"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, theSpectralProcessingString))
+      {
+         return false;
+      }
+
+      return true;
+   }
+
+   bool  ossimSpot6DimapSupportData::parseRasterData(ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      static const char MODULE[] = "ossimSpot6DimapSupportData::parseRasterData";
+      vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
+      ossimString xpath, nodeValue;
+      //---
+      // Fetch if the product file is linked to one or many JP2 files:
+      //---
+      xpath = "/Raster_Data/Data_Access/DATA_FILE_TILES"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+            return false;
+      }
+      theMultiDataFile.setValue(nodeValue);
+
+      //---
+      // Fetch the MegaImageSize:
+      //---
+      xpath = "/Raster_Data/Raster_Dimensions/NCOLS";  //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theImageSize.samp = nodeValue.toInt();
+
+      xpath = "/Raster_Data/Raster_Dimensions/NROWS"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theImageSize.line = nodeValue.toInt();
+
+      if (theMultiDataFile.getBoolean())
+      {
+         //---
+         // Fetch the Number of MegaTiles:
+         //---
+	 xpath = "/Raster_Data/Raster_Dimensions/Tile_Set/NTILES"; //DIMAPv2
+         xpath = theXmlDocumentRoot + xpath;
+         if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+         {
+            return false;
+         }
+         theNumberOfMegaTiles = nodeValue.toUInt32();
+
+         //---
+         // Fetch the Number of MegaTiles in X and Y:
+         //---
+
+           xml_nodes.clear();
+           xpath = "/Raster_Data/Raster_Dimensions/Tile_Set/Regular_Tiling/NTILES_COUNT"; //DIMAPv2
+           xpath = theXmlDocumentRoot + xpath;
+           xmlDocument->findNodes(xpath, xml_nodes);
+           if (xml_nodes.size() == 0)
+           {
+              setErrorStatus();
+              if (traceDebug())
+              {
+                 ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG: \nCould not find: " << xpath << std::endl;
+              }
+              return false;
+           }
+
+           ossimString value;
+           ossimString attribute = "ntiles_x";  
+           if (!xml_nodes[0]->getAttributeValue(value, attribute))
+           {
+             attribute = "ntiles_R";
+             xml_nodes[0]->getAttributeValue(value, attribute);
+           }
+           theNumberOfMegaTilesInRow = value.toUInt32();
+
+           attribute = "ntiles_y";
+           if (!xml_nodes[0]->getAttributeValue(value, attribute))
+           {
+             attribute = "ntiles_C";
+             xml_nodes[0]->getAttributeValue(value, attribute);
+           }
+           theNumberOfMegaTilesInCol = value.toUInt32();
+
+         if (theNumberOfMegaTilesInRow * theNumberOfMegaTilesInCol != theNumberOfMegaTiles)
+         {
+            setErrorStatus();
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG: \nIncoherent number of tiles: " << xpath << std::endl;
+            }
+            return false;
+         }
+
+         //---
+         // Fetch the size of MegaTiles:
+         //---
+         xml_nodes.clear();
+         xpath = "/Raster_Data/Raster_Dimensions/Tile_Set/Regular_Tiling/NTILES_SIZE";
+         xpath = theXmlDocumentRoot + xpath;
+         xmlDocument->findNodes(xpath, xml_nodes);
+         if (xml_nodes.size() == 0)
+           {
+              setErrorStatus();
+              if (traceDebug())
+              {
+                 ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
+              }
+              return false;
+           }
+
+  
+         attribute = "nrows";
+         xml_nodes[0]->getAttributeValue(value, attribute);
+         theTileSize.line = value.toUInt32();
+
+         attribute = "ncols";
+         xml_nodes[0]->getAttributeValue(value, attribute);
+         theTileSize.samp = value.toUInt32();
+      }
+
+      //--- TODO_MSD is it useful in the case of RPC model ???
+      // We will make the RefImagePoint the zero base center of the image.  This
+      // is used by the ossimSensorModel::worldToLineSample iterative loop as
+      // the starting point.  Since the ossimSensorModel does not know of the
+      // sub image we make it zero base. (comments from spot)
+      //---
+      theRefImagePoint.line = theImageSize.line / 2.0;
+      theRefImagePoint.samp = theImageSize.samp / 2.0;
+
+      //---
+      // Fetch number of bands
+      //---
+      xpath = "/Raster_Data/Raster_Dimensions/NBANDS"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+      theNumBands = nodeValue.toUInt32();
+
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nNumber of bands: " << theNumBands << std::endl;
+      }
+
+      //---
+      // Fetch Band Display Order
+      //---
+      xml_nodes.clear();
+      xpath = "/Raster_Data/Raster_Display/Band_Display_Order/RED_CHANNEL"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      xmlDocument->findNodes(xpath, xml_nodes);
+      if (xml_nodes.size() == 0)
+      {
+         setErrorStatus();
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
+         }
+         return false;
+      }
+      theBandOrder.push_back(xml_nodes[0]->getText());
+
+      if (theNumBands > 1)
+      {
+         xml_nodes.clear();
+	 xpath = "/Raster_Data/Raster_Display/Band_Display_Order/GREEN_CHANNEL"; //DIMAPv2
+         xpath = theXmlDocumentRoot + xpath;
+         xmlDocument->findNodes(xpath, xml_nodes);
+         if (xml_nodes.size() == 0)
+         {
+            setErrorStatus();
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
+            }
+            return false;
+         }
+         theBandOrder.push_back(xml_nodes[0]->getText());
+
+         xml_nodes.clear();
+	 xpath = "/Raster_Data/Raster_Display/Band_Display_Order/BLUE_CHANNEL"; //DIMAPv2
+         xpath = theXmlDocumentRoot + xpath;
+         xmlDocument->findNodes(xpath, xml_nodes);
+         if (xml_nodes.size() == 0)
+         {
+            setErrorStatus();
+            if (traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
+            }
+            return false;
+         }
+         theBandOrder.push_back(xml_nodes[0]->getText());
+
+         if (theNumBands > 3)
+         {
+            xml_nodes.clear();
+	    xpath = "/Raster_Data/Raster_Display/Band_Display_Order/ALPHA_CHANNEL"; //DIMAPv2
+            xpath = theXmlDocumentRoot + xpath;
+            xmlDocument->findNodes(xpath, xml_nodes);
+            if (xml_nodes.size() == 0)
+            {
+               setErrorStatus();
+               if (traceDebug())
+               {
+                  ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " DEBUG:" << "\nCould not find: " << xpath << std::endl;
+               }
+               return false;
+            }
+
+            theBandOrder.push_back(xml_nodes[0]->getText());
+         }
+      }
+
+      return true;
+   }
+
+   bool  ossimSpot6DimapSupportData::parseGeometricData(ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      ossimString xpath;
+      vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
+
+      xml_nodes.clear();
+      xpath = "/Geometric_Data/Use_Area/Located_Geometric_Values"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      xmlDocument->findNodes(xpath, xml_nodes);
+      if (xml_nodes.size() != 9 )
+      {
+         setErrorStatus();
+         if(traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
+         }
+         return false;
+      }
+
+      std::vector<ossimRefPtr<ossimXmlNode> >::iterator node = xml_nodes.begin();
+      while (node != xml_nodes.end())
+      {
+         std::vector<ossimRefPtr<ossimXmlNode> > sub_nodes;
+
+         //---
+         // Fetch the Sun Azimuth:
+         //---
+         xpath = "Solar_Incidences/SUN_AZIMUTH";
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
+            }
+            return false;
+         }
+         theSunAzimuth.push_back(sub_nodes[0]->getText().toDouble());
+
+         //---
+         // Fetch the Sun Elevation:
+         //---
+         sub_nodes.clear();
+         xpath = "Solar_Incidences/SUN_ELEVATION";
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
+            }
+            return false;
+         }
+         theSunElevation.push_back(sub_nodes[0]->getText().toDouble());
+
+         //---
+         // Fetch the Incidence Angle:
+         //---
+         sub_nodes.clear();
+	 xpath = "Acquisition_Angles/INCIDENCE_ANGLE";  //DIMAPv2
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
+            }
+            return false;
+         }
+         theIncidenceAngle.push_back(sub_nodes[0]->getText().toDouble());
+
+         //---
+         // Fetch the Viewing Angle:
+         //---
+         sub_nodes.clear();	 
+         xpath = "Acquisition_Angles/VIEWING_ANGLE"; //DIMAPv2
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
+            }
+            return false;
+         }
+         theViewingAngle.push_back(sub_nodes[0]->getText().toDouble());
+
+         //---
+         // Fetch the Azimuth Angle:
+         //---
+         sub_nodes.clear();	
+	 xpath = "Acquisition_Angles/AZIMUTH_ANGLE"; //DIMAPv2
+         (*node)->findChildNodes(xpath, sub_nodes);
+         if (sub_nodes.size() == 0)
+         {
+            setErrorStatus();
+            if(traceDebug())
+            {
+               ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nCould not find: " << xpath << std::endl;
+            }
+            return false;
+         }
+         theAzimuthAngle.push_back(sub_nodes[0]->getText().toDouble());
+
+         ++node;
+      }
+
+      return true;
+   }
+
+   bool ossimSpot6DimapSupportData::parseQualityAssessment(ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      return true;
+   }
+
+   bool ossimSpot6DimapSupportData::parseDatasetSources(ossimRefPtr<ossimXmlDocument> xmlDocument)
+   {
+      static const char MODULE[] = "ossimSpot6DimapSupportData::parseDatasetSources";
+      ossimString xpath, nodeValue;
+      vector<ossimRefPtr<ossimXmlNode> > xml_nodes;
+
+      //---
+      // Fetch the mission index (1A ou 1B) ?
+      // and generate theSensorID
+      //---
+      xpath = "/Dataset_Sources/Source_Identification/Strip_Source/MISSION";
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+
+      if (nodeValue != "SPOT") 
+      {
+         setErrorStatus();
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nNot a SPOT mission!"<< std::endl; 
+         }
+         return false;
+      }
+
+      //---
+      // Fetch the mission index (1A ou 1B) ?
+      // and generate theSensorID
+      //---
+      xpath = "/Dataset_Sources/Source_Identification/Strip_Source/MISSION_INDEX"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, nodeValue))
+      {
+         return false;
+      }
+
+      if (nodeValue == "6")        
+         theSensorID = "SPOT 6";    
+      else
+      {
+         setErrorStatus();
+         if (traceDebug())
+         {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG:\nNot a valid sensorID!"<< std::endl;
+         }
+         return false;
+      }
+
+      //---
+      // Fetch the Instrument:
+      //---
+      xpath = "/Dataset_Sources/Source_Identification/Strip_Source/INSTRUMENT";	
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, theInstrument))
+      {
+         return false;
+      }
+
+      //---
+      // Fetch the Instrument Index:
+      //---
+      xpath = "/Dataset_Sources/Source_Identification/Strip_Source/INSTRUMENT_INDEX"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, theInstrumentIndex))
+      {
+         return false;
+      }
+
+      //---
+      // Fetch the Imaging Date:
+      //---
+      ossimString firstLineImagingDate;
+      xpath = "/Dataset_Sources/Source_Identification/Strip_Source/IMAGING_DATE"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, firstLineImagingDate))
+        {
+           return false;
+        }
+
+      //---
+      // Fetch the Imaging Time:
+      //---
+      ossimString firstLineImagingTime;
+      xpath = "/Dataset_Sources/Source_Identification/Strip_Source/IMAGING_TIME"; //DIMAPv2
+      xpath = theXmlDocumentRoot + xpath;
+      if (!readOneXmlNode(xmlDocument, xpath, firstLineImagingTime))
+        {
+           return false;
+        }
+
+      theAcquisitionDate = firstLineImagingDate + "T" + firstLineImagingTime;
+
+      return true;
+   }
+
+}
diff --git a/Utilities/otbossimplugins/ossim/ossimSpot6DimapSupportData.h b/Utilities/otbossimplugins/ossim/ossimSpot6DimapSupportData.h
new file mode 100644
index 0000000..3f8411f
--- /dev/null
+++ b/Utilities/otbossimplugins/ossim/ossimSpot6DimapSupportData.h
@@ -0,0 +1,350 @@
+//*******************************************************************
+// Copyright (C) 2014  Centre National Etudes Spatiales
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 3 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// Author : Christophe Palmann (christophe.palmann at c-s.fr)
+//
+// Description:
+//
+// Contains declaration of class ossimSpot6DimapSupportData
+//
+//*****************************************************************************
+#ifndef ossimSpot6DimapSupportData_HEADER
+#define ossimSpot6DimapSupportData_HEADER
+
+#include <ossimPluginConstants.h>
+
+#include <ossim/base/ossimConstants.h>
+#include <ossim/base/ossimIpt.h>
+#include <ossim/base/ossimObject.h>
+#include <ossim/base/ossimString.h>
+
+#include <ossim/base/ossimErrorStatusInterface.h>
+
+#include <ossim/base/ossimBooleanProperty.h>
+#include <ossim/base/ossimFilename.h>
+
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimDpt.h>
+#include <ossim/base/ossimDpt3d.h>
+#include <ossim/base/ossimDrect.h>
+#include <ossim/base/ossimGpt.h>
+
+
+#include <vector>
+#include <iostream>
+
+
+class ossimKeywordlist;
+class ossimXmlDocument;
+
+namespace ossimplugins
+{
+   class OSSIM_PLUGINS_DLL ossimSpot6DimapSupportData : public ossimObject,
+      public ossimErrorStatusInterface
+      {
+      public:
+         enum ossimSpot6DIMAPVersion
+         {
+            OSSIM_Spot6_UNKNOWN,
+            OSSIM_Spot6_DIMAPv2
+         };
+
+         /** metadata subprofile type */
+         enum ossimSpot6MetadataSubProfile
+         {
+            OSSIM_Spot6_METADATA_SUBPROFILE_UNKNOWN = 0,
+            OSSIM_Spot6_METADATA_SUBPROFILE_PRODUCT = 1,
+            OSSIM_Spot6_METADATA_SUBPROFILE_RPC = 2
+         };
+
+         ossimSpot6DimapSupportData();
+
+         virtual ~ossimSpot6DimapSupportData();
+
+         void clearFields();
+
+         bool parseXmlFile(const ossimFilename& file);
+
+         //---
+         // Convenient method to print important image info:
+         //---
+         void  printInfo (ostream& os) const;
+
+         /**
+          * Method to save the state of the object to a keyword list.
+          * Return true if ok or false on error.
+          */
+         virtual bool saveState(ossimKeywordlist& kwl,
+                                const char* prefix = 0)const;
+         /**
+          * Method to the load (recreate) the state of the object from a keyword
+          * list.  Return true if ok or false on error.
+          */
+         virtual bool loadState(const ossimKeywordlist& kwl,
+                                const char* prefix = 0);
+
+         ossimString   getSensorID()                            const;
+         ossimString   getProcessingLevel()                     const;
+         ossimString   getAcquisitionDate()                     const;
+         ossimString   getProductionDate()                      const;
+         ossimString   getImageID()                             const;
+         ossimString   getInstrument()                          const;
+         ossimString   getInstrumentIndex()                     const;
+
+         ossim_uint32  getNumberOfBands()                       const;
+         void          getSunAzimuth(std::vector<ossim_float64>& az)         const;
+         void          getSunElevation(std::vector<ossim_float64>& el)       const;
+         void          getImageSize(ossimIpt& sz)               const;
+
+         void          getIncidenceAngle(std::vector<ossim_float64>& ia)     const;
+         void          getViewingAngle(std::vector<ossim_float64>& va)       const;
+
+         //---
+         // Corner points:
+         //---
+         void getUlCorner(ossimGpt& pt) const;
+         void getUrCorner(ossimGpt& pt) const;
+         void getLrCorner(ossimGpt& pt) const;
+         void getLlCorner(ossimGpt& pt) const;
+
+         //---
+         // Image center point:
+         //---
+
+         /** Center of frame, sub image if there is one. */
+         void getRefGroundPoint(ossimGpt& gp)         const;
+
+         /** zero base center point */
+         void getRefImagePoint(ossimDpt& rp)          const;
+
+         /** Zero based image rectangle, sub image if there is one. */
+         void getImageRect(ossimDrect& rect)const;
+
+         bool allMetadataRead(){return (theProductIsOk && theRpcIsOk);};
+
+         std::vector<double> getLineNumCoeff() const {return theLineNumCoeff;};
+         std::vector<double> getLineDenCoeff() const {return theLineDenCoeff;};
+         std::vector<double> getSampNumCoeff() const {return theSampNumCoeff;};
+         std::vector<double> getSampDenCoeff() const {return theSampDenCoeff;};
+
+         ossim_int32 getLineOffset() const {return theLineOffset;};
+         ossim_int32 getSampOffset() const {return theSampOffset;};
+         double getLatOffset()       const {return theLatOffset;};
+         double getLonOffset()       const {return theLonOffset;};
+         double getHeightOffset()    const {return theHeightOffset;};
+         double getLineScale()       const {return theLineScale;};
+         double getSampScale()       const {return theSampScale;};
+         double getLatScale()        const {return theLatScale;};
+         double getLonScale()        const {return theLonScale;};
+         double getHeightScale()     const {return theHeightScale;};
+
+
+
+      private:
+         ossimSpot6DIMAPVersion theDIMAPVersion;
+         ossimSpot6MetadataSubProfile theMetadataSubProfile; // only for DIMAPv2
+         bool theProductIsOk;
+         bool theRpcIsOk;
+         ossimString theXmlDocumentRoot;
+
+         ossimString                 theSensorID;
+         ossimString                 theImageID;
+         ossimString                 theProductionDate;
+         ossimString                 theAcquisitionDate;
+         ossimString                 theInstrument;
+         ossimString                 theInstrumentIndex;
+         ossimString                 theProcessingLevelString;
+         ossimString                 theSpectralProcessingString;
+
+         std::vector<ossim_float64>  theSunAzimuth;
+         std::vector<ossim_float64>  theSunElevation;
+         std::vector<ossim_float64>  theIncidenceAngle;
+         std::vector<ossim_float64>  theViewingAngle;
+         std::vector<ossim_float64>  theAzimuthAngle;
+   
+         ossimIpt                    theImageSize;
+         ossimIpt                    theTileSize;
+         ossim_uint32                theNumberOfMegaTilesInRow;
+         ossim_uint32                theNumberOfMegaTilesInCol;
+         ossim_uint32                theNumberOfMegaTiles;
+         ossimBooleanProperty        theMultiDataFile;
+
+         ossim_uint32                theNumBands;
+         std::vector<ossimString>    theBandOrder;
+
+         /** Calibration information for radiometric corrections*/
+         std::vector<ossim_float64> thePhysicalBias;
+         std::vector<ossim_float64> thePhysicalGain;
+         std::vector<ossim_float64> theSolarIrradiance;
+
+         //---
+         // Corner points:
+         //---
+         ossimGpt theUlCorner;
+         ossimGpt theUrCorner;
+         ossimGpt theLrCorner;
+         ossimGpt theLlCorner;
+
+         // RPC parameters
+         ossimString theSpecId;
+         double    theErrBias;
+         double    theErrBiasX;
+         double    theErrBiasY;
+         double    theErrRand;
+         ossim_int32 theLineOffset;
+         ossim_int32 theSampOffset;
+         double    theLatOffset;
+         double    theLonOffset;
+         double    theHeightOffset;
+         double    theLineScale;
+         double    theSampScale;
+         double    theLatScale;
+         double    theLonScale;
+         double    theHeightScale;
+
+         std::vector<double> theLineNumCoeff;
+         std::vector<double> theLineDenCoeff;
+         std::vector<double> theSampNumCoeff;
+         std::vector<double> theSampDenCoeff;
+
+
+         //--- TODO MSD Check if it is necessary to keep that
+         /** Center of frame on ground, if sub image it's the center of that. */
+         ossimGpt                    theRefGroundPoint;
+
+         /** Zero based center of frame. */
+         ossimDpt                    theRefImagePoint;
+
+
+         ossimGpt createGround(const ossimString& s)const;
+         ossimDpt createDpt(const ossimString& s)const;
+         ossimIpt createIpt(const ossimString& s)const;
+         //---
+
+         bool parseRPCMetadata(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         bool parseMetadataIdentificationDIMAPv2(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         /**
+          * Dataset Identification:
+          *
+          * From xml section:
+          * /Dimap_Document/Dataset_Identification/
+          *
+          * NOT YET USED
+          *
+          * @return true.
+          */
+         bool parseDatasetIdentification(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         /**
+          * Dataset Content:
+          *
+          * From xml section:
+          * /Dimap_Document/Dataset_Content/
+          *
+          * Initializes:
+          * theRefGroundPoint
+          * theUlCorner
+          * theUrCorner
+          * theLrCorner
+          * theLlCorner
+          *
+          * Note that the theRefGroundPoint will be the zero based center of
+          * the whole mega image.
+          * Note that the corners will be the corners of the whole mega image.
+          * @return true on success, false if not found.
+          */
+         bool parseDatasetContent(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         /**
+          * Product Information:
+          *
+          * From xml section:
+          * /Dimap_Document/Product_Information/
+          *
+          * Initializes:
+          * theImageID
+          * theProductionDate
+          *
+          * @return true on success, false if not found.
+          */
+         bool parseProductInformation(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         /**
+          * Coordinate Reference System:
+          *
+          * From xml section:
+          * /Dimap_Document/Coordinate_Reference_System/
+          *
+          * NOT YET USED
+          *
+          * @return true.
+          */
+         bool parseCoordinateReferenceSystem(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         /**
+          * Geoposition:
+          *
+          * From xml section:
+          * /Dimap_Document/Geoposition/
+          *
+          * NOT YET USED
+          *
+          * @return true.
+          */
+         bool parseGeoposition(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         /**
+          * Processing Information:
+          *
+          * From xml section:
+          * /Dimap_Document/Processing_Information/
+          *
+          * Initializes:
+          * theProcessingLevel
+          * theSpectralProcessing
+          *
+          * @return true on success, false if not found.
+          */
+         bool parseProcessingInformation(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         bool parseRasterData(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         bool parseRadiometricData(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         bool parseGeometricData(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         /**
+          * QualityAssessment:
+          *
+          * From xml section:
+          * /Dimap_Document/Quality_Assessment/
+          *
+          * NOT YET USED
+          *
+          * @return true.
+          */
+         bool parseQualityAssessment(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+         bool parseDatasetSources(ossimRefPtr<ossimXmlDocument> xmlDocument);
+
+
+
+      };
+}
+#endif /* #ifndef ossimSpot6DimapSupportData_HEADER */
diff --git a/Utilities/otbossimplugins/ossim/ossimSpot6Model.cpp b/Utilities/otbossimplugins/ossim/ossimSpot6Model.cpp
new file mode 100644
index 0000000..2210b71
--- /dev/null
+++ b/Utilities/otbossimplugins/ossim/ossimSpot6Model.cpp
@@ -0,0 +1,372 @@
+//*******************************************************************
+// Copyright (C) 2014  Centre National Etudes Spatiales
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 3 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// Author : Christophe Palmann (christophe.palmann at c-s.fr)
+//
+// Description:
+//
+// Contains definition of class ossimSpot6Model
+//
+//*****************************************************************************
+
+#include "ossimSpot6Model.h"
+
+#include <cmath>
+#include <cstdio>
+
+#include <ossimSpot6Model.h>
+#include <ossimSpot6DimapSupportData.h>
+
+#include <ossimPluginCommon.h>
+
+#include <ossim/base/ossimCommon.h>
+#include <ossim/base/ossimFilename.h>
+#include <ossim/base/ossimKeywordNames.h>
+#include <ossim/base/ossimNotify.h>
+#include <ossim/base/ossimRefPtr.h>
+#include <ossim/base/ossimString.h>
+#include <ossim/base/ossimTrace.h>
+#include <ossim/base/ossimXmlDocument.h>
+#include <ossim/base/ossimXmlNode.h>
+#include <ossim/support_data/ossimSupportFilesList.h>
+
+
+namespace ossimplugins
+{
+
+// Define Trace flags for use within this file:
+   static ossimTrace traceExec  ("ossimSpot6Model:exec");
+   static ossimTrace traceDebug ("ossimSpot6Model:debug");
+
+
+   RTTI_DEF1(ossimSpot6Model, "ossimSpot6Model", ossimRpcModel);
+
+//*************************************************************************************************
+// Constructor
+//*************************************************************************************************
+   ossimSpot6Model::ossimSpot6Model()
+      :ossimRpcModel      (),
+       theSupportData        (0)
+   {
+      for (unsigned int i = 0; i < 20; i++)
+      {
+         theLineDenCoef[i] = 0.0;
+         theLineNumCoef[i] = 0.0;
+         theSampNumCoef[i] = 0.0;
+         theSampDenCoef[i] = 0.0;
+      }
+   }
+
+//*************************************************************************************************
+// Constructor
+//*************************************************************************************************
+   ossimSpot6Model::ossimSpot6Model(const ossimSpot6Model& rhs)
+      :ossimRpcModel      (rhs),
+       theSupportData        (0)
+   {
+   }
+
+//*************************************************************************************************
+// Destructor
+//*************************************************************************************************
+   ossimSpot6Model::~ossimSpot6Model()
+   {
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG DESTRUCTOR: ~ossimSpot6Model(): entering..." << std::endl;
+
+      theSupportData = 0;
+
+      if (traceExec())  ossimNotify(ossimNotifyLevel_DEBUG) << "DEBUG DESTRUCTOR: ~ossimSpot6Model(): returning..." << std::endl;
+   }
+//*************************************************************************************************
+// Infamous DUP
+//*************************************************************************************************
+   ossimObject* ossimSpot6Model::dup() const
+   {
+      return new ossimSpot6Model(*this);
+   }
+
+//*************************************************************************************************
+// Print
+//*************************************************************************************************
+   std::ostream& ossimSpot6Model::print(std::ostream& out) const
+   {
+      // Capture stream flags since we are going to mess with them.
+      std::ios_base::fmtflags f = out.flags();
+
+      out << "\nDump of ossimSpot6Model at address " << (hex) << this
+          << (dec)
+          << "\n------------------------------------------------"
+          << "\n  theImageID            = " << theImageID
+          << "\n  theImageSize          = " << theImageSize
+          << "\n  theRefGndPt           = " << theRefGndPt
+          << "\n  theRefImgPt           = " << theRefImgPt
+          << "\n  theProcessingLevel    = " << theSupportData->getProcessingLevel()
+          << "\n------------------------------------------------"
+          << "\n  " << endl;
+
+      // Set the flags back.
+      out.flags(f);
+
+      if (theSupportData->getProcessingLevel() == "SENSOR")
+         return ossimRpcModel::print(out);
+      else
+         return out;
+   }
+
+//*************************************************************************************************
+// Save State
+//*************************************************************************************************
+   bool ossimSpot6Model::saveState(ossimKeywordlist& kwl,
+                                      const char* prefix) const
+   {
+      if(theSupportData.valid())
+      {
+         ossimString supportPrefix = ossimString(prefix) + "support_data.";
+         theSupportData->saveState(kwl, supportPrefix);
+      }
+
+      // If only it is a sensor product we save parameters from RPC model, its avoid to
+      // propagate a empty RPC model
+      if (theSupportData->getProcessingLevel() == "SENSOR")
+      {
+         ossimRpcModel::saveState(kwl, prefix);
+         return true;
+      }
+      else
+      {
+         kwl.add(prefix, "sensor", theSensorID, true);
+         return true;
+      }
+   }
+
+//*************************************************************************************************
+// Load State
+//*************************************************************************************************
+   bool ossimSpot6Model::loadState(const ossimKeywordlist& kwl,
+                                      const char* prefix)
+   {
+      if(!theSupportData)
+      {
+         theSupportData = new ossimSpot6DimapSupportData;
+      }
+
+      ossimString supportPrefix = ossimString(prefix) + "support_data.";
+      theSupportData->loadState(kwl, supportPrefix);
+
+      // If only it is a sensor product we load parameters from RPC model only, its avoid to
+      // add a empty RPC model
+      if (theSupportData->getProcessingLevel() == "SENSOR")
+      {
+         ossimRpcModel::loadState(kwl, prefix);
+         return true;
+      }
+      else
+      {
+         return true;
+      }
+   }
+
+
+
+   bool
+   ossimSpot6Model::open(const ossimFilename& file)
+   {
+      static const char MODULE[] = "ossimSpot6Model::open";
+      //traceDebug.setTraceFlag(true);
+
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entered...\n";
+      }
+
+      // Make the gsd nan so it gets computed.
+      theGSD.makeNan();
+
+      bool result = false;
+
+      // Filename used.
+      ossimFilename DIMxmlFile;
+      ossimFilename RPCxmlFile;
+
+      // Generate metadata and rpc filename
+      if ( (file.ext().downcase() != "jp2" && file.ext().downcase() != "tif")
+          || !file.exists())
+      {
+         //not a valid file
+         return false;
+      }
+      else
+      {
+        // DIMAPv2
+        DIMxmlFile = file.path();
+        RPCxmlFile = file.path();
+        ossimFilename DIMxmlFileTmp = file.file();
+        ossimFilename RPCxmlFileTmp;
+
+        DIMxmlFileTmp = DIMxmlFileTmp.file().replaceStrThatMatch("^IMG_", "DIM_");
+        DIMxmlFileTmp = DIMxmlFileTmp.replaceStrThatMatch("_R[0-9]+C[0-9]+\\.(JP2|TIF)$", ".XML");
+        // Check if it is an XML extension
+        if( DIMxmlFileTmp.ext() != "XML")
+          return false;
+
+        RPCxmlFileTmp = DIMxmlFileTmp.file().replaceStrThatMatch("^DIM_", "RPC_");
+
+        DIMxmlFile = DIMxmlFile.dirCat(DIMxmlFileTmp);
+        RPCxmlFile = RPCxmlFile.dirCat(RPCxmlFileTmp);
+
+        if (!DIMxmlFile.exists())
+        {
+          if (traceDebug())
+          {
+            ossimNotify(ossimNotifyLevel_DEBUG) << "SPOT main DIMAP file " << DIMxmlFile << " doesn't exist ...\n";
+          }
+          return false;
+        }
+      }
+
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << "Metadata xml file: " << DIMxmlFile << "\n";
+         ossimNotify(ossimNotifyLevel_DEBUG) << "RPC xml file: " << RPCxmlFile << "\n";
+      }
+
+      ossimString processingLevel;
+      // Parse the metadata xml file
+      if ( !theSupportData.valid() )
+         theSupportData = new ossimSpot6DimapSupportData();
+
+      if(!theSupportData->parseXmlFile(DIMxmlFile))
+      {
+         theSupportData = 0; // ossimRefPtr
+         if (traceDebug())
+         {
+           ossimNotify(ossimNotifyLevel_DEBUG) << "ossimSpot6Model::open DEBUG:"
+                                               << "\nCould not open correctly DIMAP file" << std::endl;
+         }
+         return false;
+      }
+
+      theSensorID = theSupportData->getSensorID();
+      theImageID = theSupportData->getImageID();
+      // Get the processing level (ORTHO or SENSOR or perhaps MOSAIC ?)
+      processingLevel = theSupportData->getProcessingLevel();
+
+      // Parse the RPC xml file if necessary
+      if (RPCxmlFile.exists() && processingLevel == "SENSOR")
+      {
+         if (!theSupportData->parseXmlFile(RPCxmlFile))
+         {
+            theSupportData = 0; // ossimRefPtr
+            ossimNotify(ossimNotifyLevel_WARN) << "ossimSpot6Model::open WARNING:"
+                                               << "\nCould not open correctly RPC file" << std::endl;
+            return false;
+         }
+
+         thePolyType = B;
+
+         for (unsigned int i = 0 ; i < 20; i++ )
+         {
+            theLineNumCoef[i] = theSupportData->getLineNumCoeff()[i];
+            theLineDenCoef[i] = theSupportData->getLineDenCoeff()[i];
+            theSampNumCoef[i] = theSupportData->getSampNumCoeff()[i];
+            theSampDenCoef[i] = theSupportData->getSampDenCoeff()[i];
+         }
+
+         theLineScale  = theSupportData->getLineScale();
+         theSampScale  = theSupportData->getSampScale();
+         theLatScale   = theSupportData->getLatScale();
+         theLonScale   = theSupportData->getLonScale();
+         theHgtScale   = theSupportData->getHeightScale();
+         theLineOffset = theSupportData->getLineOffset();
+         theSampOffset = theSupportData->getSampOffset();
+         theLatOffset  = theSupportData->getLatOffset();
+         theLonOffset  = theSupportData->getLonOffset();
+         theHgtOffset  = theSupportData->getHeightOffset();
+      }
+
+      // TODO MSD Check if this part is necessary
+      _productXmlFile = DIMxmlFile;
+      ossimSupportFilesList::instance()->add(_productXmlFile);
+
+      // TODO MSD WARNING File with multi tiles are not well managed
+      theSupportData->getImageRect(theImageClipRect);
+      theSupportData->getImageSize(theImageSize);
+
+      finishConstruction();
+      clearErrorStatus();
+
+      result = true;
+      if (traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " exit status = " << (result ? "true" : "false\n") << std::endl;
+      }
+
+      /*std::cout << "---------------------------" << std::endl;
+        print(std::cout);
+        std::cout << "---------------------------" << std::endl;*/
+      return result;
+   }
+
+//*************************************************************************************************
+//! Collects common code among all parsers
+//*************************************************************************************************
+   void ossimSpot6Model::finishConstruction()
+   {
+      theImageSize.line = theImageClipRect.height();
+      theImageSize.samp = theImageClipRect.width();
+      theRefImgPt.line = theImageClipRect.midPoint().y;
+      theRefImgPt.samp = theImageClipRect.midPoint().x;
+      theRefGndPt.lat = theLatOffset;
+      theRefGndPt.lon = theLonOffset;
+      theRefGndPt.hgt = theHgtOffset;
+
+      //---
+      // NOTE:  We must call "updateModel()" to set parameter used by base
+      // ossimRpcModel prior to calling lineSampleHeightToWorld or all
+      // the world points will be same.
+      //---
+      updateModel();
+
+      ossimGpt v0, v1, v2, v3;
+      lineSampleHeightToWorld(theImageClipRect.ul(), theHgtOffset, v0);
+      lineSampleHeightToWorld(theImageClipRect.ur(), theHgtOffset, v1);
+      lineSampleHeightToWorld(theImageClipRect.lr(), theHgtOffset, v2);
+      lineSampleHeightToWorld(theImageClipRect.ll(), theHgtOffset, v3);
+
+      theBoundGndPolygon = ossimPolygon (ossimDpt(v0), ossimDpt(v1), ossimDpt(v2), ossimDpt(v3));
+
+      // Set the ground reference point using the model.
+      lineSampleHeightToWorld(theRefImgPt, theHgtOffset, theRefGndPt);
+
+      if( theGSD.hasNans() )
+      {
+         try
+         {
+            // This will set theGSD and theMeanGSD. Method throws ossimException.
+            computeGsd();
+         }
+         catch (const ossimException& e)
+         {
+            ossimNotify(ossimNotifyLevel_WARN)
+               << "ossimSpot6Model::finishConstruction -- caught exception:\n"
+               << e.what() << std::endl;
+         }
+      }
+   }
+
+}
+
diff --git a/Utilities/otbossimplugins/ossim/ossimSpot6Model.h b/Utilities/otbossimplugins/ossim/ossimSpot6Model.h
new file mode 100644
index 0000000..12c9709
--- /dev/null
+++ b/Utilities/otbossimplugins/ossim/ossimSpot6Model.h
@@ -0,0 +1,114 @@
+//*******************************************************************
+// Copyright (C) 2014  Centre National Etudes Spatiales
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 3 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// Author : Christophe Palmann (christophe.palmann at c-s.fr)
+//
+// Description:
+//
+// Contains declaration of class ossimSpot6Model.
+//
+//*****************************************************************************
+// FIXME $Id: ossimSpot5Model.h 15766 2009-10-20 12:37:09Z gpotts $
+#ifndef ossimSpot6Model_HEADER
+#define ossimSpot6Model_HEADER
+
+#include <ossimPluginConstants.h>
+
+#include <ossim/projection/ossimRpcModel.h>
+#include "ossimSpot6DimapSupportData.h"
+
+#include <ossim/base/ossimFilename.h>
+
+#include <iostream>
+
+
+namespace ossimplugins
+{
+   class ossimSpot6DimapSupportData;
+
+   class OSSIM_PLUGINS_DLL ossimSpot6Model : public ossimRpcModel
+   {
+   public:
+      /*!
+       * CONSTRUCTORS:
+       */
+      /** @brief default constructor */
+      ossimSpot6Model();
+
+      /** @brief copy constructor */
+      ossimSpot6Model(const ossimSpot6Model& rhs);
+
+      /** @brief Destructor */
+      virtual ~ossimSpot6Model();
+
+      bool open(const ossimFilename& file);
+
+      /*!
+       * Returns pointer to a new instance, copy of this.
+       * Not implemented yet!  Returns NULL...
+       */
+      virtual ossimObject* dup() const;
+
+      /*!
+       * Extends base-class implementation. Dumps contents of object to ostream.
+       */
+      virtual std::ostream& print(std::ostream& out) const;
+
+      /*!
+       * Fulfills ossimObject base-class pure virtuals. Loads and saves geometry
+       * KWL files. Returns true if successful.
+       */
+      virtual bool saveState(ossimKeywordlist& kwl,
+                             const char* prefix=NULL) const;
+
+      virtual bool loadState(const ossimKeywordlist& kwl,
+                             const char* prefix=NULL);
+
+      void setSupportData(ossimSpot6DimapSupportData* supportData)
+      {
+         theSupportData = supportData;
+      }
+      ossimSpot6DimapSupportData* getSupportData()
+      {
+         return theSupportData.get();
+      }
+      const ossimSpot6DimapSupportData* getSupportData()const
+      {
+         return theSupportData.get();
+      }
+
+   protected:
+
+      bool parseMetaData(const ossimFilename& file);
+
+      bool parseRpcData (const ossimFilename& file);
+
+      // In the future
+      //bool parseJP2File (const ossimFilename& file);
+
+      void finishConstruction();
+
+      ossimRefPtr<ossimSpot6DimapSupportData> theSupportData;
+
+      ossimFilename _productXmlFile;
+
+
+      TYPE_DATA
+         };
+}
+#endif /* #ifndef ossimSpot6Model_HEADER */
+
diff --git a/Utilities/otbsiftfast/libsiftfast.cpp b/Utilities/otbsiftfast/libsiftfast.cpp
index 04d563c..1c32b24 100644
--- a/Utilities/otbsiftfast/libsiftfast.cpp
+++ b/Utilities/otbsiftfast/libsiftfast.cpp
@@ -594,7 +594,7 @@ void ConvBuffer(float* buf, float* kernel, int bufsize, int ksize)
 typedef vector<float*> LISTBUF;
 static LISTBUF  s_listconvbuf; //TODO, make 16 byte aligned
 static int s_convbufsize = 0; // the size of all the buffers in s_listconvbuf
-static int SIFT_ALIGNED16(s_convmask[4]) = {0xffffffff,0xffffffff,0xffffffff,0};
+static int SIFT_ALIGNED16(s_convmask[4]) = {static_cast<int>(0xffffffff),static_cast<int>(0xffffffff),static_cast<int>(0xffffffff),0};
 
 struct myaccum { float SIFT_ALIGNED16(faccum[2][4]); };
 
@@ -1750,7 +1750,7 @@ vec_float4 C-style expressions
 
 DEF_CONST(CF4_0,        0.0f) 
 DEF_CONST(CF4_2,        2.0f) 
-DEI_CONST(CI4_SIGN,     0x80000000u)
+DEI_CONST(CI4_SIGN,     static_cast<int>(0x80000000u))
 DEF_CONST(CF4__1,       -1.0f) 
 DEF_CONST(CF4_1,        1.0f) 
 DEF_CONST(CF4_SMALL,    1.0E-35f) 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/otb.git



More information about the Pkg-grass-devel mailing list