From 4a2691ffdbc9067f2ebf55489b5dcf3aee6e3ea0 Mon Sep 17 00:00:00 2001 From: Victor Poughon <victor.poughon@cnes.fr> Date: Thu, 7 Jun 2018 17:56:32 +0200 Subject: [PATCH] ENH: Replace ITK_NULLPTR by nullptr --- .../GeometriesChangeSpatialReference.cxx | 6 +- Examples/Filtering/GeometriesFilter.cxx | 6 +- Examples/IO/OGRWrappersExample.cxx | 2 +- .../Learning/SEMModelEstimatorExample.cxx | 4 +- Examples/Learning/SOMExample.cxx | 2 +- .../Projections/OrthoRectificationExample.cxx | 4 +- Examples/Projections/SensorModelExample.cxx | 4 +- .../LAIAndPROSAILToSensorResponse.cxx | 6 +- Examples/Tutorials/OrthoFusion.cxx | 4 +- .../CurlAdapters/src/otbCurlHelper.cxx | 2 +- .../include/otbOGRDataSourceWrapper.h | 6 +- .../GdalAdapters/include/otbOGRHelpers.h | 4 +- .../GdalAdapters/include/otbOGRLayerWrapper.h | 6 +- .../src/otbGeometriesToGeometriesFilter.cxx | 2 +- .../src/otbOGRDataSourceWrapper.cxx | 12 +-- .../GdalAdapters/src/otbOGRLayerWrapper.cxx | 2 +- .../test/otbOGRDataSourceWrapperNew.cxx | 16 ++-- ...tbOGRExtendedFilenameToOptionsGDALTest.cxx | 4 +- .../src/otbDEMConvertAdapter.cxx | 2 +- .../OSSIMAdapters/src/otbDEMHandler.cxx | 8 +- .../OSSIMAdapters/src/otbDateTimeAdapter.cxx | 2 +- .../OSSIMAdapters/src/otbEllipsoidAdapter.cxx | 2 +- .../src/otbGeometricSarSensorModelAdapter.cxx | 6 +- .../OSSIMAdapters/src/otbImageKeywordlist.cxx | 6 +- .../src/otbMapProjectionAdapter.cxx | 20 ++--- .../src/otbPlatformPositionAdapter.cxx | 6 +- .../src/otbSarSensorModelAdapter.cxx | 14 ++-- .../src/otbSensorModelAdapter.cxx | 34 ++++----- .../app/otbComputeConfusionMatrix.cxx | 2 +- .../otbComputeOGRLayersFeaturesStatistics.cxx | 4 +- .../app/otbOGRLayerClassifier.cxx | 6 +- .../app/otbHomologousPointsExtraction.cxx | 4 +- .../AppImageUtils/app/otbExtractROI.cxx | 2 +- .../app/otbGenerateRPCSensorModel.cxx | 2 +- .../app/otbRefineSensorModel.cxx | 2 +- .../app/otbLSMSSegmentation.cxx | 6 +- .../app/otbLSMSVectorization.cxx | 8 +- .../AppSegmentation/app/otbSegmentation.cxx | 4 +- .../AppStereo/app/otbStereoFramework.cxx | 6 +- .../include/otbCommandLineArgumentParser.h | 4 +- .../src/otbCommandLineArgumentParser.cxx | 2 +- .../otbImageAndVectorImageOperationFilter.txx | 2 +- ...bImageToModulusAndDirectionImageFilter.txx | 4 +- .../Common/include/otbImportImageFilter.txx | 2 +- .../Common/include/otbModelComponentBase.txx | 12 +-- .../Common/src/otbConfigurationManager.cxx | 2 +- .../Common/src/otbExtendedFilenameHelper.cxx | 2 +- .../Core/Common/src/otbFilterWatcherBase.cxx | 2 +- Modules/Core/Common/src/otbSystem.cxx | 4 +- .../Core/Common/src/otbWriterWatcherBase.cxx | 2 +- Modules/Core/Common/test/otbSystemTest.cxx | 4 +- Modules/Core/ImageBase/src/otbImageIOBase.cxx | 2 +- .../test/otbMultiChannelExtractROI.cxx | 4 +- .../test/otbMultiToMonoChannelExtractROI.cxx | 2 +- .../otbBSplineInterpolateImageFunction.txx | 2 +- .../otbGenericInterpolateImageFunction.txx | 14 ++-- .../include/otbAttributesMapLabelObject.h | 2 +- ...tbAttributesMapLabelObjectWithClassLabel.h | 2 +- ...otbImageToLabelMapWithAttributesFilter.txx | 4 +- .../LabelMap/include/otbLabelMapSource.txx | 2 +- .../include/otbLabelMapToSampleListFilter.txx | 2 +- .../include/otbLabelObjectToPolygonFunctor.h | 2 +- .../otbShapeAttributesLabelMapFilter.txx | 2 +- .../ObjectList/include/otbImageListSource.txx | 2 +- .../include/otbImageListToImageFilter.txx | 2 +- .../include/otbImageListToImageListFilter.txx | 2 +- .../otbImageListToSingleImageFilter.txx | 2 +- .../include/otbImageToImageListFilter.txx | 2 +- .../include/otbObjectListSource.txx | 2 +- .../otbObjectListToObjectListFilter.txx | 2 +- .../include/otbImageToPointSetFilter.txx | 2 +- .../PointSet/include/otbPointSetSource.txx | 2 +- .../include/otbPointSetToPointSetFilter.txx | 2 +- .../include/otbLineSpatialObject.h | 4 +- .../include/otbLineSpatialObject.txx | 2 +- .../include/otbSpatialObjectSource.txx | 2 +- .../otbSpatialObjectToImageDrawingFilter.txx | 2 +- .../src/otbPipelineMemoryPrintCalculator.cxx | 2 +- .../include/otbCompositeTransform.txx | 4 +- .../include/otbGenericMapProjection.txx | 2 +- .../include/otbGenericRSTransform.txx | 16 ++-- .../src/otbGeoInformationConversion.cxx | 6 +- .../test/otbCreateProjectionWithOSSIM.cxx | 4 +- .../test/otbCreateProjectionWithOTB.cxx | 4 +- .../Transform/test/otbGenericRSTransform.cxx | 8 +- .../test/otbGenericRSTransformWithSRID.cxx | 4 +- .../VectorDataBase/include/otbDataNode.txx | 2 +- .../include/otbDataNodeImageFunction.txx | 2 +- .../include/otbDataNodeVectorDataFunction.txx | 2 +- .../include/otbVectorDataIOBase.h | 2 +- .../include/otbVectorDataProperties.h | 2 +- .../include/otbVectorDataSource.txx | 2 +- .../src/otbVectorDataKeywordlist.cxx | 4 +- .../Core/VectorDataBase/test/otbPolygon.cxx | 2 +- .../otbLabeledSampleLocalizationGenerator.txx | 2 +- .../include/otbLikelihoodPathListFilter.txx | 2 +- ...bModulusAndDirectionImageToImageFilter.txx | 4 +- .../test/otbAlignImageToPath.cxx | 2 +- .../test/otbBreakAngularPathListFilter.cxx | 2 +- .../test/otbLikelihoodPathListFilter.cxx | 2 +- .../test/otbLinkPathListFilter.cxx | 2 +- .../test/otbRemoveTortuousPathListFilter.cxx | 2 +- .../test/otbSimplifyPathListFilter.cxx | 2 +- ...mageToSIFTKeyPointSetFilterOutputAscii.cxx | 2 +- .../otbHoughTransform2DLinesImageFilter.txx | 2 +- .../otbLineDetectorImageFilterBase.txx | 8 +- .../Edge/include/otbLineSegmentDetector.txx | 2 +- ...PixelSuppressionByDirectionImageFilter.txx | 4 +- .../include/otbSFSTexturesImageFilter.txx | 12 +-- ...otbScalarImageToAdvancedTexturesFilter.txx | 20 ++--- ...ScalarImageToHigherOrderTexturesFilter.txx | 22 +++--- .../otbScalarImageToTexturesFilter.txx | 16 ++-- ...ScalarImageToHigherOrderTexturesFilter.cxx | 10 +-- ...orNeighborhoodJoinHistogramImageFilter.txx | 4 +- ...ckLeiblerSupervizedDistanceImageFilter.txx | 12 +-- ...tivariateAlterationDetectorImageFilter.txx | 4 +- .../otbAngularProjectionBinaryImageFilter.txx | 4 +- .../otbAngularProjectionImageFilter.txx | 2 +- .../otbAngularProjectionSetImageFilter.txx | 2 +- .../otbSparseWvltToAngleMapperListFilter.txx | 2 +- ...tbBinaryFunctorNeighborhoodImageFilter.txx | 4 +- .../otbChangeInformationImageFilter.txx | 2 +- .../include/otbGridResampleImageFilter.txx | 2 +- .../include/otbMaskedIteratorDecorator.txx | 2 +- .../include/otbPrintableImageFilter.txx | 2 +- ...treamingMatrixTransposeMatrixImageFilter.h | 4 +- .../test/otbChangeInformationImageFilter.cxx | 2 +- .../test/otbMaskedIteratorDecorator.cxx | 4 +- .../test/otbRegionProjectionResampler.cxx | 4 +- .../Path/include/otbDrawPathListFilter.txx | 2 +- .../otbImageFittingPolygonListFilter.txx | 2 +- .../Path/include/otbImageToPathListFilter.txx | 2 +- .../Path/include/otbPathFunction.txx | 2 +- .../otbPathListToHistogramGenerator.txx | 2 +- .../otbVectorizationPathListFilter.txx | 4 +- ...RegionImageToRectangularPathListFilter.cxx | 2 +- ...ltiChannelsPolarimetricSynthesisFilter.cxx | 8 +- ...ltiChannelsPolarimetricSynthesisFilter.cxx | 8 +- .../otbGenericRSResampleImageFilter.txx | 4 +- .../include/otbGeometriesProjectionFilter.txx | 2 +- .../otbImageToEnvelopeVectorDataFilter.txx | 2 +- .../include/otbOrthoRectificationFilter.txx | 2 +- .../include/otbVectorDataTransformFilter.txx | 2 +- .../src/otbGeometriesProjectionFilter.cxx | 2 +- ...CPsToRPCSensorModelImageFilterAndOrtho.cxx | 4 +- .../test/otbGenericRSResampleImageFilter.cxx | 2 +- .../test/otbGenericRSTransformFromImage.cxx | 4 +- .../test/otbOrthoRectificationFilter.cxx | 4 +- .../Projection/test/otbSensorModel.cxx | 10 +-- .../include/otbListSampleGenerator.txx | 4 +- ...tbListSampleToBalancedListSampleFilter.txx | 2 +- .../otbListSampleToHistogramListGenerator.txx | 2 +- .../otbListSampleToListSampleFilter.txx | 2 +- ...eToVariableDimensionHistogramGenerator.txx | 2 +- .../otbConcatenateVectorDataFilter.txx | 4 +- ...torDataToSpecificDescriptionFilterBase.txx | 2 +- .../otbVectorDataToVectorDataFilter.txx | 2 +- .../src/otbFuzzyDescriptorsModelManager.cxx | 4 +- .../include/otbFusionImageBase.h | 6 +- .../otbLmvmPanSharpeningFusionImageFilter.txx | 4 +- ...impleRcsPanSharpeningFusionImageFilter.txx | 4 +- .../include/otbSparseUnmixingImageFilter.txx | 2 +- .../otbImageToOSMVectorDataGenerator.txx | 2 +- .../Carto/include/otbMapFileProductWriter.txx | 2 +- .../src/otbOSMDataToVectorDataGenerator.cxx | 8 +- Modules/IO/IOBSQ/src/otbBSQImageIO.cxx | 8 +- .../IO/IOGDAL/include/otbOGRVectorDataIO.h | 2 +- .../IO/IOGDAL/src/otbGDALDatasetWrapper.cxx | 6 +- .../src/otbGDALDriverManagerWrapper.cxx | 12 +-- Modules/IO/IOGDAL/src/otbGDALImageIO.cxx | 60 +++++++-------- .../IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx | 6 +- Modules/IO/IOGDAL/src/otbOGRIOHelper.cxx | 38 +++++----- Modules/IO/IOGDAL/src/otbOGRVectorDataIO.cxx | 34 ++++----- .../test/otbGDALImageIOTestWriteMetadata.cxx | 10 +-- .../IO/IOGDAL/test/otbGDALReadPxlComplex.cxx | 4 +- Modules/IO/IOKML/include/otbKMLVectorDataIO.h | 2 +- Modules/IO/IOKML/src/otbKMLVectorDataIO.cxx | 36 ++++----- Modules/IO/IOLUM/src/otbLUMImageIO.cxx | 10 +-- Modules/IO/IOMSTAR/src/otbMSTARImageIO.cxx | 64 ++++++++-------- Modules/IO/IOONERA/src/otbONERAImageIO.cxx | 4 +- Modules/IO/IORAD/src/otbRADImageIO.cxx | 10 +-- .../IO/IOTileMap/src/otbTileMapImageIO.cxx | 10 +-- .../include/otbStatisticsXMLFileReader.txx | 12 +-- .../include/otbStatisticsXMLFileWriter.txx | 4 +- .../IO/ImageIO/include/otbImageFileWriter.txx | 4 +- .../otbScalarBufferToImageFileWriter.txx | 2 +- Modules/IO/ImageIO/src/otbImageIOFactory.cxx | 2 +- .../IO/ImageIO/test/otbImageIOFactoryNew.cxx | 4 +- .../otbScalarBufferToImageFileWriterTest.cxx | 2 +- .../KMZWriter/include/otbKmzProductWriter.txx | 6 +- Modules/IO/TestKernel/include/otbTestHelper.h | 4 +- Modules/IO/TestKernel/src/otbTestDriver.cxx | 4 +- Modules/IO/TestKernel/src/otbTestHelper.cxx | 74 +++++++++---------- .../include/otbVectorDataFileReader.txx | 2 +- .../include/otbVectorDataFileWriter.txx | 6 +- .../src/otbVectorDataIOFactory.cxx | 2 +- .../otbDSFusionOfClassifiersImageFilter.txx | 2 +- .../include/otbJointMassOfBeliefFilter.txx | 2 +- .../include/otbAutoencoderModel.h | 4 +- ...otbDimensionalityReductionModelFactory.txx | 2 +- .../otbImageDimensionalityReductionFilter.txx | 4 +- .../include/otbPCAModel.h | 4 +- .../include/otbSOMModel.h | 2 +- .../include/otbGaussianModelComponent.txx | 4 +- .../include/otbImageClassificationFilter.txx | 4 +- .../otbKMeansImageClassificationFilter.txx | 2 +- .../include/otbMachineLearningModel.h | 8 +- .../include/otbMachineLearningModel.txx | 10 +-- .../LearningBase/include/otbSEMClassifier.txx | 10 +-- .../Markov/include/otbMRFSamplerRandomMAP.h | 12 +-- .../include/otbMarkovRandomFieldFilter.txx | 4 +- .../otbSOMImageClassificationFilter.txx | 2 +- .../otbOGRDataToClassStatisticsFilter.txx | 10 +-- .../otbOGRDataToSamplePositionFilter.txx | 2 +- .../otbPersistentSamplingFilterBase.txx | 14 ++-- .../include/otbBoostMachineLearningModel.h | 2 +- .../include/otbBoostMachineLearningModel.txx | 8 +- .../otbDecisionTreeMachineLearningModel.h | 2 +- .../otbDecisionTreeMachineLearningModel.txx | 8 +- ...bGradientBoostedTreeMachineLearningModel.h | 2 +- ...radientBoostedTreeMachineLearningModel.txx | 6 +- ...otbKNearestNeighborsMachineLearningModel.h | 2 +- ...bKNearestNeighborsMachineLearningModel.txx | 4 +- .../include/otbLibSVMMachineLearningModel.h | 2 +- .../include/otbLibSVMMachineLearningModel.txx | 20 ++--- .../otbMachineLearningModelFactory.txx | 2 +- .../otbNeuralNetworkMachineLearningModel.h | 2 +- .../otbNeuralNetworkMachineLearningModel.txx | 16 ++-- .../otbNormalBayesMachineLearningModel.h | 2 +- .../otbNormalBayesMachineLearningModel.txx | 6 +- .../Supervised/include/otbOpenCVUtils.h | 2 +- .../otbRandomForestsMachineLearningModel.h | 2 +- .../otbRandomForestsMachineLearningModel.txx | 8 +- .../include/otbSVMMachineLearningModel.h | 2 +- .../include/otbSVMMachineLearningModel.txx | 8 +- ...tbSharkRandomForestsMachineLearningModel.h | 4 +- ...SharkRandomForestsMachineLearningModel.txx | 10 +-- .../otbSharkKMeansMachineLearningModel.h | 4 +- .../otbSharkKMeansMachineLearningModel.txx | 10 +-- .../include/otbImageListToRCC8GraphFilter.txx | 2 +- .../otbPolygonListToRCC8GraphFilter.txx | 2 +- .../RCC8/include/otbRCC8GraphFileWriter.txx | 2 +- .../OBIA/RCC8/include/otbRCC8GraphSource.txx | 2 +- ...ectanceToSurfaceReflectanceImageFilter.txx | 4 +- ...eAdjacencyEffectCorrectionSchemeFilter.txx | 2 +- .../src/otbAeronetFileReader.cxx | 2 +- .../src/otbSpectralSensitivityReader.cxx | 4 +- .../test/otbSIXSTraitsTest.cxx | 2 +- .../include/otbReduceSpectralResponse.txx | 2 +- ...bSurfaceReflectanceToReflectanceFilter.txx | 2 +- .../Simulation/src/otbProspectModel.cxx | 6 +- .../Simulation/src/otbSailModel.cxx | 12 +-- .../otbDisparityMapEstimationMethod.txx | 8 +- .../include/otbDisparityMapMedianFilter.txx | 8 +- .../include/otbDisparityMapTo3DFilter.txx | 10 +-- .../include/otbDisparityMapToDEMFilter.txx | 18 ++--- .../include/otbDisparityTranslateFilter.txx | 16 ++-- .../otbFineRegistrationImageFilter.txx | 8 +- .../otbMultiDisparityMapTo3DFilter.txx | 6 +- .../include/otbNCCRegistrationFunction.txx | 4 +- .../otbPixelWiseBlockMatchingImageFilter.txx | 24 +++--- .../otbSubPixelDisparityImageFilter.txx | 18 ++--- ...hTransformToDisplacementFieldGenerator.txx | 2 +- .../include/otbAdhesionCorrectionFilter.txx | 12 +-- .../include/otbBijectionCoherencyFilter.txx | 8 +- .../include/otbMulti3DMapToDEMFilter.txx | 10 +-- ...bStereoSensorModelToElevationMapFilter.txx | 6 +- ...eorectificationDisplacementFieldSource.txx | 4 +- .../Stereo/test/otbMulti3DMapToDEMFilter.cxx | 8 +- ...bConnectedComponentMuParserFunctorTest.cxx | 4 +- .../otbLabelImageRegionMergingFilter.txx | 4 +- .../otbLabelImageRegionPruningFilter.txx | 4 +- .../otbLabelImageToOGRDataSourceFilter.txx | 12 +-- .../otbLabelImageToVectorDataFilter.txx | 12 +-- .../include/otbLabelMapToVectorDataFilter.txx | 2 +- .../otbOGRDataSourceToLabelImageFilter.txx | 6 +- .../otbPersistentImageToOGRLayerFilter.txx | 2 +- .../include/otbRasterizeVectorDataFilter.h | 2 +- .../include/otbRasterizeVectorDataFilter.txx | 18 ++--- .../include/otbVectorDataToLabelImageFilter.h | 2 +- .../otbVectorDataToLabelImageFilter.txx | 22 +++--- ...ctorDataToLabelMapWithAttributesFilter.txx | 2 +- ...esicMorphologyDecompositionImageFilter.txx | 4 +- ...ativeToMultiScaleCharacteristicsFilter.txx | 2 +- .../otbOGRLayerStreamStitchingFilter.txx | 4 +- .../test/otbOGRLayerStreamStitchingFilter.cxx | 2 +- .../Ice/include/otbGlImageActor.h | 2 +- Modules/Visualization/Ice/include/otbGlView.h | 4 +- .../Ice/src/otbFragmentShaderRegistry.cxx | 4 +- .../Ice/src/otbGlVectorActor.cxx | 10 +-- .../Ice/src/otbGlVersionChecker.cxx | 12 +-- Modules/Visualization/Ice/src/otbGlView.cxx | 2 +- .../Ice/src/otbStandardShader.cxx | 4 +- .../Visualization/IceViewer/src/otbIce.cxx | 4 +- .../IceViewer/src/otbIceViewer.cxx | 14 ++-- .../src/otbWrapperApplication.cxx | 26 +++---- .../src/otbWrapperApplicationRegistry.cxx | 12 +-- .../otbWrapperComplexInputImageParameter.cxx | 6 +- .../otbWrapperComplexOutputImageParameter.cxx | 2 +- .../src/otbWrapperInputImageParameter.cxx | 6 +- .../otbWrapperInputProcessXMLParameter.cxx | 20 ++--- .../otbWrapperInputVectorDataParameter.cxx | 4 +- .../otbWrapperOutputProcessXMLParameter.cxx | 10 +-- .../src/otbWrapperParameterGroup.cxx | 6 +- .../src/otbApplicationLauncherCommandLine.cxx | 14 ++-- .../src/otbWrapperCommandLineLauncher.cxx | 6 +- .../QtWidget/src/otbApplicationLauncherQt.cxx | 2 +- .../src/otbWrapperQtWidgetChoiceParameter.cxx | 8 +- ...bWrapperQtWidgetInputFilenameParameter.cxx | 6 +- .../otbWrapperQtWidgetInputImageParameter.cxx | 6 +- ...rapperQtWidgetInputVectorDataParameter.cxx | 6 +- .../otbWrapperQtWidgetParameterFactory.cxx | 6 +- .../src/otbWrapperQtWidgetParameterGroup.cxx | 6 +- .../src/otbWrapperQtWidgetProgressReport.cxx | 2 +- .../Wrappers/SWIG/src/python/itkPyCommand.cxx | 6 +- 315 files changed, 964 insertions(+), 964 deletions(-) diff --git a/Examples/Filtering/GeometriesChangeSpatialReference.cxx b/Examples/Filtering/GeometriesChangeSpatialReference.cxx index d7543f6083..1d865038e9 100644 --- a/Examples/Filtering/GeometriesChangeSpatialReference.cxx +++ b/Examples/Filtering/GeometriesChangeSpatialReference.cxx @@ -65,7 +65,7 @@ private: otb::ogr::UniqueGeometryPtr ReprojectTransformationFunctor::operator()(OGRGeometry const* in) const { - otb::ogr::UniqueGeometryPtr out(in ? in->clone() : ITK_NULLPTR); + otb::ogr::UniqueGeometryPtr out(in ? in->clone() : nullptr); if (out) { const OGRErr err = out->transform(m_reprojector.get()); @@ -207,7 +207,7 @@ int main (int argc, char **argv) otb::ogr::DataSource::Pointer output = options.workingInplace ? input - : options.outputIsStdout ? ITK_NULLPTR + : options.outputIsStdout ? nullptr : otb::ogr::DataSource::New( options.outputFile, otb::ogr::DataSource::Modes::Update_LayerCreateOnly); std::cout << "input: " << otb::ogr::version_proxy::GetFileListAsStringVector(&input->ogr())[0] << " should be: " << options.inputFile << "\n"; if (output) @@ -234,7 +234,7 @@ int main (int argc, char **argv) } else { - filter->UpdateOutputData(ITK_NULLPTR); + filter->UpdateOutputData(nullptr); assert(filter->GetOutput() && "output not set"); filter->GetOutput()->Print(std::cout, 0); } diff --git a/Examples/Filtering/GeometriesFilter.cxx b/Examples/Filtering/GeometriesFilter.cxx index e579d975f4..922d05e5ec 100644 --- a/Examples/Filtering/GeometriesFilter.cxx +++ b/Examples/Filtering/GeometriesFilter.cxx @@ -35,7 +35,7 @@ struct SwapXYFunctor typedef OGRGeometry TransformedElementType; otb::ogr::UniqueGeometryPtr operator()(OGRGeometry const* in) const { - otb::ogr::UniqueGeometryPtr out(in ? in->clone() : ITK_NULLPTR); + otb::ogr::UniqueGeometryPtr out(in ? in->clone() : nullptr); if (out) { #if GDAL_VERSION_NUM >= 1900 @@ -74,7 +74,7 @@ int main (int argc, char **argv) otb::ogr::DataSource::Pointer output = workingInplace ? input - : outputIsStdout ? ITK_NULLPTR + : outputIsStdout ? nullptr : otb::ogr::DataSource::New( outputFile, otb::ogr::DataSource::Modes::Update_LayerCreateOnly); std::cout << "input: " << otb::ogr::version_proxy::GetFileListAsStringVector(&input->ogr())[0] << " should be: " << inputFile << "\n"; if (output) @@ -97,7 +97,7 @@ int main (int argc, char **argv) } else { - filter->UpdateOutputData(ITK_NULLPTR); + filter->UpdateOutputData(nullptr); assert(filter->GetOutput() && "output not set"); filter->GetOutput()->Print(std::cout, 0); } diff --git a/Examples/IO/OGRWrappersExample.cxx b/Examples/IO/OGRWrappersExample.cxx index 4bf88e171c..b85300da10 100644 --- a/Examples/IO/OGRWrappersExample.cxx +++ b/Examples/IO/OGRWrappersExample.cxx @@ -109,7 +109,7 @@ int main(int argc, char * argv[]) otb::ogr::DataSource::Pointer destination = otb::ogr::DataSource::New( argv[2], otb::ogr::DataSource::Modes::Update_LayerCreateOnly); otb::ogr::Layer destLayer = destination->CreateLayer( - argv[2], ITK_NULLPTR, wkbMultiPolygon); + argv[2], nullptr, wkbMultiPolygon); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex diff --git a/Examples/Learning/SEMModelEstimatorExample.cxx b/Examples/Learning/SEMModelEstimatorExample.cxx index 65ec496047..e9a8318c5a 100644 --- a/Examples/Learning/SEMModelEstimatorExample.cxx +++ b/Examples/Learning/SEMModelEstimatorExample.cxx @@ -102,7 +102,7 @@ int main(int argc, char * argv[]) // Software Guide : EndCodeSnippet char * fileNameIn = argv[1]; - char * fileNameImgInit = ITK_NULLPTR; + char * fileNameImgInit = nullptr; char * fileNameOut = argv[2]; int numberOfClasses = atoi(argv[3]); int numberOfIteration = atoi(argv[4]); @@ -148,7 +148,7 @@ int main(int argc, char * argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - if (fileNameImgInit != ITK_NULLPTR) + if (fileNameImgInit != nullptr) { typedef otb::ImageFileReader<OutputImageType> ImgInitReaderType; ImgInitReaderType::Pointer segReader = ImgInitReaderType::New(); diff --git a/Examples/Learning/SOMExample.cxx b/Examples/Learning/SOMExample.cxx index 814214c493..fa2994d30a 100644 --- a/Examples/Learning/SOMExample.cxx +++ b/Examples/Learning/SOMExample.cxx @@ -408,7 +408,7 @@ int main(int itkNotUsed(argc), char* argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - if (actMapFileName != ITK_NULLPTR) + if (actMapFileName != nullptr) { ActivationWriterType::Pointer actWriter = ActivationWriterType::New(); actWriter->SetFileName(actMapFileName); diff --git a/Examples/Projections/OrthoRectificationExample.cxx b/Examples/Projections/OrthoRectificationExample.cxx index 27038c4365..2f5ec3b0e4 100644 --- a/Examples/Projections/OrthoRectificationExample.cxx +++ b/Examples/Projections/OrthoRectificationExample.cxx @@ -155,8 +155,8 @@ int main(int argc, char* argv[]) orthoRectifFilter->SetDisplacementFieldSpacing(gridSpacing); ImageType::PointType origin; - origin[0] = strtod(argv[5], ITK_NULLPTR); - origin[1] = strtod(argv[6], ITK_NULLPTR); + origin[0] = strtod(argv[5], nullptr); + origin[1] = strtod(argv[6], nullptr); orthoRectifFilter->SetOutputOrigin(origin); // Software Guide : EndCodeSnippet diff --git a/Examples/Projections/SensorModelExample.cxx b/Examples/Projections/SensorModelExample.cxx index 2fab615191..5618dd8402 100644 --- a/Examples/Projections/SensorModelExample.cxx +++ b/Examples/Projections/SensorModelExample.cxx @@ -187,8 +187,8 @@ int main(int argc, char* argv[]) spacing[1] = -0.00001; ImageType::PointType origin; - origin[0] = strtod(argv[3], ITK_NULLPTR); //longitude - origin[1] = strtod(argv[4], ITK_NULLPTR); //latitude + origin[0] = strtod(argv[3], nullptr); //longitude + origin[1] = strtod(argv[4], nullptr); //latitude ImageType::RegionType region; diff --git a/Examples/Simulation/LAIAndPROSAILToSensorResponse.cxx b/Examples/Simulation/LAIAndPROSAILToSensorResponse.cxx index e61faf0608..23907b46a3 100644 --- a/Examples/Simulation/LAIAndPROSAILToSensorResponse.cxx +++ b/Examples/Simulation/LAIAndPROSAILToSensorResponse.cxx @@ -133,7 +133,7 @@ public: protected: ImageUniqueValuesCalculator() { - m_Image = ITK_NULLPTR; + m_Image = nullptr; } ~ImageUniqueValuesCalculator() ITK_OVERRIDE { @@ -472,7 +472,7 @@ private: int main(int argc, char *argv[]) { - char *cmifname = ITK_NULLPTR; + char *cmifname = nullptr; if (argc != 10) { if (argc == 11) // cloud mask filename optional parameter @@ -807,7 +807,7 @@ int main(int argc, char *argv[]) miReader->UpdateOutputInformation(); MaskImageType::Pointer maskImage = miReader->GetOutput(); - if (cmifname != ITK_NULLPTR) + if (cmifname != nullptr) { MaskReaderType::Pointer cmiReader = MaskReaderType::New(); diff --git a/Examples/Tutorials/OrthoFusion.cxx b/Examples/Tutorials/OrthoFusion.cxx index eb583fd48e..8227160f40 100644 --- a/Examples/Tutorials/OrthoFusion.cxx +++ b/Examples/Tutorials/OrthoFusion.cxx @@ -142,8 +142,8 @@ int main(int argc, char* argv[]) spacing[1] = atof(argv[11]); ImageType::PointType origin; - origin[0] = strtod(argv[6], ITK_NULLPTR); - origin[1] = strtod(argv[7], ITK_NULLPTR); + origin[0] = strtod(argv[6], nullptr); + origin[1] = strtod(argv[7], nullptr); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex diff --git a/Modules/Adapters/CurlAdapters/src/otbCurlHelper.cxx b/Modules/Adapters/CurlAdapters/src/otbCurlHelper.cxx index 39bd3f0706..2022d1e6fb 100644 --- a/Modules/Adapters/CurlAdapters/src/otbCurlHelper.cxx +++ b/Modules/Adapters/CurlAdapters/src/otbCurlHelper.cxx @@ -178,7 +178,7 @@ public: { m_File = fopen(infname, "wb"); - if (m_File == ITK_NULLPTR) + if (m_File == nullptr) { itkExceptionMacro(<<" otbCurlHelper::FileResource : failed to open the file ."<< infname); } diff --git a/Modules/Adapters/GdalAdapters/include/otbOGRDataSourceWrapper.h b/Modules/Adapters/GdalAdapters/include/otbOGRDataSourceWrapper.h index b06a173fd9..2456e38858 100644 --- a/Modules/Adapters/GdalAdapters/include/otbOGRDataSourceWrapper.h +++ b/Modules/Adapters/GdalAdapters/include/otbOGRDataSourceWrapper.h @@ -283,7 +283,7 @@ public: * \return the extent of all layers * \throw itk::ExceptionObject if the layers extents can not be retrieved. */ - OGREnvelope GetGlobalExtent(bool force = false, std::string * outwkt=ITK_NULLPTR) const; + OGREnvelope GetGlobalExtent(bool force = false, std::string * outwkt=nullptr) const; /** Grafts data and information from one data source to another. * \deprecated \c OGRLayer has an embedded input iterator. As a consequence, @@ -330,7 +330,7 @@ public: */ Layer CreateLayer( std::string const& name, - OGRSpatialReference * poSpatialRef = ITK_NULLPTR, + OGRSpatialReference * poSpatialRef = nullptr, OGRwkbGeometryType eGType = wkbUnknown, std::vector<std::string> const& papszOptions = std::vector<std::string>()); @@ -473,7 +473,7 @@ public: * \see <em>Imperfect C++</em>, Matthew Wilson, Addisson-Welsey, par 24.6 */ operator int boolean ::* () const { - return m_DataSource ? &boolean::i : ITK_NULLPTR; + return m_DataSource ? &boolean::i : nullptr; } /** Flushes all changes to disk. diff --git a/Modules/Adapters/GdalAdapters/include/otbOGRHelpers.h b/Modules/Adapters/GdalAdapters/include/otbOGRHelpers.h index ffb39f2707..010a9cbe83 100644 --- a/Modules/Adapters/GdalAdapters/include/otbOGRHelpers.h +++ b/Modules/Adapters/GdalAdapters/include/otbOGRHelpers.h @@ -82,7 +82,7 @@ struct OTBGdalAdapters_EXPORT StringListConverter { m_raw.push_back(b->c_str()); } - m_raw.push_back(ITK_NULLPTR); + m_raw.push_back(nullptr); assert(CSLCount(const_cast <char**>(&m_raw[0])) == static_cast<int>(boost::size(strings))); } /** @@ -91,7 +91,7 @@ struct OTBGdalAdapters_EXPORT StringListConverter char ** to_ogr() const { return m_raw.size() == 1 - ? ITK_NULLPTR + ? nullptr : const_cast <char**>(&m_raw[0]); } private: diff --git a/Modules/Adapters/GdalAdapters/include/otbOGRLayerWrapper.h b/Modules/Adapters/GdalAdapters/include/otbOGRLayerWrapper.h index 8ebd74cc85..1a111523fe 100644 --- a/Modules/Adapters/GdalAdapters/include/otbOGRLayerWrapper.h +++ b/Modules/Adapters/GdalAdapters/include/otbOGRLayerWrapper.h @@ -234,7 +234,7 @@ public: */ operator int boolean ::* () const { - return m_Layer ? &boolean::i : ITK_NULLPTR; + return m_Layer ? &boolean::i : nullptr; } /** Access to raw \c OGRLayer. @@ -336,12 +336,12 @@ public: struct enabler {}; public: feature_iter() - : m_Layer(ITK_NULLPTR), m_Crt(ITK_NULLPTR) {} + : m_Layer(nullptr), m_Crt(nullptr) {} explicit feature_iter(otb::ogr::Layer & layer) : m_Layer(&layer), m_Crt(layer.GetNextFeature()) {} template <class OtherValue> feature_iter( feature_iter<OtherValue> const& other, - typename boost::enable_if<boost::is_convertible<OtherValue*,Value*> >::type* = ITK_NULLPTR + typename boost::enable_if<boost::is_convertible<OtherValue*,Value*> >::type* = nullptr ) : m_Layer(other.m_Layer), m_Crt(other.m_Crt) {} diff --git a/Modules/Adapters/GdalAdapters/src/otbGeometriesToGeometriesFilter.cxx b/Modules/Adapters/GdalAdapters/src/otbGeometriesToGeometriesFilter.cxx index a01d804f3d..7d35337ae3 100644 --- a/Modules/Adapters/GdalAdapters/src/otbGeometriesToGeometriesFilter.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbGeometriesToGeometriesFilter.cxx @@ -218,7 +218,7 @@ void otb::GeometriesToGeometriesFilter::GenerateData(void ) OGRSpatialReference* otb::GeometriesToGeometriesFilter::DoDefineNewLayerSpatialReference( ogr::Layer const& itkNotUsed(source)) const { - return ITK_NULLPTR; + return nullptr; } /*virtual*/ diff --git a/Modules/Adapters/GdalAdapters/src/otbOGRDataSourceWrapper.cxx b/Modules/Adapters/GdalAdapters/src/otbOGRDataSourceWrapper.cxx index 49ce77ba13..813176ba07 100644 --- a/Modules/Adapters/GdalAdapters/src/otbOGRDataSourceWrapper.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbOGRDataSourceWrapper.cxx @@ -44,7 +44,7 @@ bool otb::ogr::DataSource::Clear() { - Reset(ITK_NULLPTR); + Reset(nullptr); return true; } @@ -111,7 +111,7 @@ char const* DeduceDriverName(std::string filename) boost::bind(&ExtensionDriverAssociation::Matches, _1, extension)); if (whichIt == boost::end(k_ExtensionDriverMap)) { - return ITK_NULLPTR; // nothing found + return nullptr; // nothing found } return whichIt->driverName; } @@ -119,7 +119,7 @@ char const* DeduceDriverName(std::string filename) otb::ogr::DataSource::DataSource() -: m_DataSource(ITK_NULLPTR), +: m_DataSource(nullptr), m_LayerOptions() , m_OpenMode(Modes::Update_LayerUpdate), m_FirstModifiableLayerID(0) @@ -231,7 +231,7 @@ otb::ogr::DataSource::New(std::string const& datasourceName, Modes::type mode) ogr::version_proxy::GDALDatasetType * ds = ogr::version_proxy::Open( simpleFileName.c_str() , true ); - bool ds_exists = (ds!=ITK_NULLPTR); + bool ds_exists = (ds!=nullptr); ogr::version_proxy::Close(ds); @@ -398,7 +398,7 @@ otb::ogr::Layer otb::ogr::DataSource::CreateLayer( } itkGenericExceptionMacro(<< "GDALDataset opening mode not supported"); - return Layer(ITK_NULLPTR, false); // keep compiler happy + return Layer(nullptr, false); // keep compiler happy } otb::ogr::Layer otb::ogr::DataSource::CopyLayer( @@ -614,7 +614,7 @@ otb::ogr::Layer otb::ogr::DataSource::ExecuteSQL( // Cannot use the deleter made for result sets obtained from // GDALDataset::ExecuteSQL because it checks for non-nullity.... // *sigh* - return otb::ogr::Layer(ITK_NULLPTR, modifiable); + return otb::ogr::Layer(nullptr, modifiable); #endif } return otb::ogr::Layer(layer_ptr, *m_DataSource, modifiable); diff --git a/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx b/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx index f307f45742..4a9596a021 100644 --- a/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbOGRLayerWrapper.cxx @@ -279,7 +279,7 @@ OGRSpatialReference const* otb::ogr::Layer::GetSpatialRef() const std::string otb::ogr::Layer::GetProjectionRef() const { assert(m_Layer && "OGRLayer not initialized"); - char * wkt = ITK_NULLPTR; + char * wkt = nullptr; OGRSpatialReference const* srs = GetSpatialRef(); if(srs) { diff --git a/Modules/Adapters/GdalAdapters/test/otbOGRDataSourceWrapperNew.cxx b/Modules/Adapters/GdalAdapters/test/otbOGRDataSourceWrapperNew.cxx index 296dc0a5f3..82e0719143 100644 --- a/Modules/Adapters/GdalAdapters/test/otbOGRDataSourceWrapperNew.cxx +++ b/Modules/Adapters/GdalAdapters/test/otbOGRDataSourceWrapperNew.cxx @@ -191,7 +191,7 @@ BOOST_AUTO_TEST_CASE(OGRDataSource_shp_overwrite) ogr::DataSource::Pointer ds = ogr::DataSource::New(filename, ogr::DataSource::Modes::Overwrite); BOOST_ASSERT(ds); - ogr::Layer l = ds -> CreateLayer(layer1, ITK_NULLPTR, wkbPoint); + ogr::Layer l = ds -> CreateLayer(layer1, nullptr, wkbPoint); OGRFeatureDefn & defn = l.GetLayerDefn(); l.CreateField(k_f0); l.CreateField(k_f1); @@ -225,7 +225,7 @@ BOOST_AUTO_TEST_CASE(OGRDataSource_shp_overwrite) ogr::DataSource::Pointer ds = ogr::DataSource::New(filename, ogr::DataSource::Modes::Overwrite); BOOST_ASSERT(ds); - ogr::Layer l = ds -> CreateLayer(layer1, ITK_NULLPTR, wkbPoint); + ogr::Layer l = ds -> CreateLayer(layer1, nullptr, wkbPoint); OGRFeatureDefn & defn = l.GetLayerDefn(); l.CreateField(k_f0); l.CreateField(k_f1); @@ -476,7 +476,7 @@ BOOST_AUTO_TEST_CASE(OGRDataSource_sqlite_overwrite) ogr::DataSource::Pointer ds = ogr::DataSource::New(filename, ogr::DataSource::Modes::Overwrite); BOOST_ASSERT(ds); - ogr::Layer l = ds -> CreateLayer(layer1, ITK_NULLPTR, wkbPoint); + ogr::Layer l = ds -> CreateLayer(layer1, nullptr, wkbPoint); OGRFeatureDefn & defn = l.GetLayerDefn(); l.CreateField(k_f0); l.CreateField(k_f1); @@ -510,7 +510,7 @@ BOOST_AUTO_TEST_CASE(OGRDataSource_sqlite_overwrite) ogr::DataSource::Pointer ds = ogr::DataSource::New(filename, ogr::DataSource::Modes::Overwrite); BOOST_ASSERT(ds); - ogr::Layer l = ds -> CreateLayer(layer1, ITK_NULLPTR, wkbPoint); + ogr::Layer l = ds -> CreateLayer(layer1, nullptr, wkbPoint); OGRFeatureDefn & defn = l.GetLayerDefn(); l.CreateField(k_f0); l.CreateField(k_f1); @@ -603,7 +603,7 @@ BOOST_AUTO_TEST_CASE(OGRDataSource_sqlite_overwrite) // Check that we can read the file BOOST_ASSERT(ds); - ogr::Layer l = ds -> CreateLayer(layer1, ITK_NULLPTR, wkbPoint); + ogr::Layer l = ds -> CreateLayer(layer1, nullptr, wkbPoint); BOOST_CHECK_EQUAL(l.GetFeatureCount(true), 0); // OGRFeatureDefn & defn = l.GetLayerDefn(); @@ -678,7 +678,7 @@ BOOST_AUTO_TEST_CASE(Add_n_Del_Fields) ogr::FieldDefn f5(*defn.GetFieldDefn(5)); BOOST_CHECK_EQUAL(f5, k_f5); - BOOST_CHECK_EQUAL(defn.GetFieldDefn(6), (void*)ITK_NULLPTR); + BOOST_CHECK_EQUAL(defn.GetFieldDefn(6), (void*)nullptr); } #if GDAL_VERSION_NUM >= 1900 @@ -802,7 +802,7 @@ BOOST_AUTO_TEST_CASE(OGRDataSource_new_shp_with_features) const std::string k_shp = "SomeShapeFileWithFeatures"; ogr::DataSource::Pointer ds = ogr::DataSource::New(k_shp+".shp", ogr::DataSource::Modes::Overwrite); - ogr::Layer l = ds -> CreateLayer(k_one, ITK_NULLPTR, wkbPoint); + ogr::Layer l = ds -> CreateLayer(k_one, nullptr, wkbPoint); OGRFeatureDefn & defn = l.GetLayerDefn(); l.CreateField(k_f0); @@ -840,7 +840,7 @@ BOOST_AUTO_TEST_CASE(Local_Geometries) BOOST_AUTO_TEST_CASE(Add_n_Read_Geometries) { ogr::DataSource::Pointer ds = ogr::DataSource::New(); - ogr::Layer l = ds -> CreateLayer(k_one, ITK_NULLPTR, wkbPoint); + ogr::Layer l = ds -> CreateLayer(k_one, nullptr, wkbPoint); OGRFeatureDefn & defn = l.GetLayerDefn(); for (int u=-10; u!=10; ++u) { diff --git a/Modules/Adapters/GdalAdapters/test/otbOGRExtendedFilenameToOptionsGDALTest.cxx b/Modules/Adapters/GdalAdapters/test/otbOGRExtendedFilenameToOptionsGDALTest.cxx index 37368ea118..27526135e2 100644 --- a/Modules/Adapters/GdalAdapters/test/otbOGRExtendedFilenameToOptionsGDALTest.cxx +++ b/Modules/Adapters/GdalAdapters/test/otbOGRExtendedFilenameToOptionsGDALTest.cxx @@ -45,7 +45,7 @@ int otbOGRExtendedFileNameGDALLayer(int , char* argv[]) { auto test = otb::ogr::DataSource::New( argv[1] , otb::ogr::DataSource::Modes::Update_LayerOverwrite); test->CreateLayer( "2layertest" , - ITK_NULLPTR , + nullptr , wkbUnknown ); std::string error = CPLGetLastErrorMsg(); if ( error.find( "does not support layer creation option layeroption" ) ) @@ -58,7 +58,7 @@ int otbOGRExtendedFileNameGDALLayerOption(int , char* argv[]) auto test = otb::ogr::DataSource::New( argv[1] , otb::ogr::DataSource::Modes::Update_LayerOverwrite); std::vector<std::string> option { "vectorlayeroption=OPTION" }; test->CreateLayer( "2layertest" , - ITK_NULLPTR , + nullptr , wkbUnknown , option ); std::string error = CPLGetLastErrorMsg(); diff --git a/Modules/Adapters/OSSIMAdapters/src/otbDEMConvertAdapter.cxx b/Modules/Adapters/OSSIMAdapters/src/otbDEMConvertAdapter.cxx index b826543bd5..cb40530ebe 100644 --- a/Modules/Adapters/OSSIMAdapters/src/otbDEMConvertAdapter.cxx +++ b/Modules/Adapters/OSSIMAdapters/src/otbDEMConvertAdapter.cxx @@ -92,7 +92,7 @@ int DEMConvertAdapter::Convert(std::string tempFilename, std::string output) ih->initialize(); ossimRefPtr<ossimImageSource> source = ih.get(); - ossimRefPtr<ossimBandSelector> bs = ITK_NULLPTR; + ossimRefPtr<ossimBandSelector> bs = nullptr; // Get the image rectangle for the rrLevel selected. diff --git a/Modules/Adapters/OSSIMAdapters/src/otbDEMHandler.cxx b/Modules/Adapters/OSSIMAdapters/src/otbDEMHandler.cxx index c57ca657d8..4a4b9bd8e5 100644 --- a/Modules/Adapters/OSSIMAdapters/src/otbDEMHandler.cxx +++ b/Modules/Adapters/OSSIMAdapters/src/otbDEMHandler.cxx @@ -51,15 +51,15 @@ namespace otb { /** Initialize the singleton */ -DEMHandler::Pointer DEMHandler::m_Singleton = ITK_NULLPTR; +DEMHandler::Pointer DEMHandler::m_Singleton = nullptr; DEMHandler::Pointer DEMHandler::Instance() { - if(m_Singleton.GetPointer() == ITK_NULLPTR) + if(m_Singleton.GetPointer() == nullptr) { m_Singleton = itk::ObjectFactory<Self>::Create(); - if(m_Singleton.GetPointer() == ITK_NULLPTR) + if(m_Singleton.GetPointer() == nullptr) { m_Singleton = new DEMHandler; } @@ -152,7 +152,7 @@ bool DEMHandler ::OpenGeoidFile(const char* geoidFile) { - if ((ossimGeoidManager::instance()->findGeoidByShortName("geoid1996")) == ITK_NULLPTR) + if ((ossimGeoidManager::instance()->findGeoidByShortName("geoid1996")) == nullptr) { otbMsgDevMacro(<< "Opening geoid: " << geoidFile); ossimFilename geoid(geoidFile); diff --git a/Modules/Adapters/OSSIMAdapters/src/otbDateTimeAdapter.cxx b/Modules/Adapters/OSSIMAdapters/src/otbDateTimeAdapter.cxx index 662ce35b70..558f712ec9 100644 --- a/Modules/Adapters/OSSIMAdapters/src/otbDateTimeAdapter.cxx +++ b/Modules/Adapters/OSSIMAdapters/src/otbDateTimeAdapter.cxx @@ -32,7 +32,7 @@ DateTimeAdapter::DateTimeAdapter() DateTimeAdapter::~DateTimeAdapter() { - if (m_LocalTm != ITK_NULLPTR) + if (m_LocalTm != nullptr) { delete m_LocalTm; } diff --git a/Modules/Adapters/OSSIMAdapters/src/otbEllipsoidAdapter.cxx b/Modules/Adapters/OSSIMAdapters/src/otbEllipsoidAdapter.cxx index b5633c2378..4056d6838b 100644 --- a/Modules/Adapters/OSSIMAdapters/src/otbEllipsoidAdapter.cxx +++ b/Modules/Adapters/OSSIMAdapters/src/otbEllipsoidAdapter.cxx @@ -44,7 +44,7 @@ EllipsoidAdapter::EllipsoidAdapter() EllipsoidAdapter::~EllipsoidAdapter() { - if (m_Ellipsoid != ITK_NULLPTR) + if (m_Ellipsoid != nullptr) { delete m_Ellipsoid; } diff --git a/Modules/Adapters/OSSIMAdapters/src/otbGeometricSarSensorModelAdapter.cxx b/Modules/Adapters/OSSIMAdapters/src/otbGeometricSarSensorModelAdapter.cxx index b77743ad70..90e6908dc0 100644 --- a/Modules/Adapters/OSSIMAdapters/src/otbGeometricSarSensorModelAdapter.cxx +++ b/Modules/Adapters/OSSIMAdapters/src/otbGeometricSarSensorModelAdapter.cxx @@ -45,16 +45,16 @@ namespace otb { GeometricSarSensorModelAdapter::GeometricSarSensorModelAdapter(): - m_SensorModel(ITK_NULLPTR) + m_SensorModel(nullptr) { } GeometricSarSensorModelAdapter::~GeometricSarSensorModelAdapter() { - if (m_SensorModel != ITK_NULLPTR) + if (m_SensorModel != nullptr) { delete m_SensorModel; - m_SensorModel = ITK_NULLPTR; + m_SensorModel = nullptr; } } diff --git a/Modules/Adapters/OSSIMAdapters/src/otbImageKeywordlist.cxx b/Modules/Adapters/OSSIMAdapters/src/otbImageKeywordlist.cxx index 0294d5f744..d8860bd582 100644 --- a/Modules/Adapters/OSSIMAdapters/src/otbImageKeywordlist.cxx +++ b/Modules/Adapters/OSSIMAdapters/src/otbImageKeywordlist.cxx @@ -359,15 +359,15 @@ ReadGeometryFromRPCTag(const std::string& filename) // try to use GeoTiff RPC tag if present. // Warning : RPC in subdatasets are not supported - GDALDriverH identifyDriverH = GDALIdentifyDriver(filename.c_str(), ITK_NULLPTR); - if(identifyDriverH == ITK_NULLPTR) + GDALDriverH identifyDriverH = GDALIdentifyDriver(filename.c_str(), nullptr); + if(identifyDriverH == nullptr) { // 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 != ITK_NULLPTR) + if (datasetH != nullptr) { GDALDataset* dataset = static_cast<GDALDataset*>(datasetH); GDALRPCInfo rpcStruct; diff --git a/Modules/Adapters/OSSIMAdapters/src/otbMapProjectionAdapter.cxx b/Modules/Adapters/OSSIMAdapters/src/otbMapProjectionAdapter.cxx index 54785258d0..df3e6c1a97 100644 --- a/Modules/Adapters/OSSIMAdapters/src/otbMapProjectionAdapter.cxx +++ b/Modules/Adapters/OSSIMAdapters/src/otbMapProjectionAdapter.cxx @@ -76,13 +76,13 @@ namespace otb { MapProjectionAdapter::MapProjectionAdapter(): - m_MapProjection(ITK_NULLPTR), m_ProjectionRefWkt(""), m_ReinstanciateProjection(true) + m_MapProjection(nullptr), m_ProjectionRefWkt(""), m_ReinstanciateProjection(true) { } MapProjectionAdapter::~MapProjectionAdapter() { - if (m_MapProjection != ITK_NULLPTR) + if (m_MapProjection != nullptr) { delete m_MapProjection; } @@ -91,7 +91,7 @@ MapProjectionAdapter::~MapProjectionAdapter() MapProjectionAdapter::InternalMapProjectionPointer MapProjectionAdapter::GetMapProjection() { itkDebugMacro("returning MapProjection address " << this->m_MapProjection); - if ((m_ReinstanciateProjection) || (m_MapProjection == ITK_NULLPTR)) + if ((m_ReinstanciateProjection) || (m_MapProjection == nullptr)) { this->InstantiateProjection(); } @@ -102,7 +102,7 @@ MapProjectionAdapter::InternalMapProjectionPointer MapProjectionAdapter::GetMapP MapProjectionAdapter::InternalMapProjectionConstPointer MapProjectionAdapter::GetMapProjection() const { itkDebugMacro("returning MapProjection address " << this->m_MapProjection); - if ((m_ReinstanciateProjection) || (m_MapProjection == ITK_NULLPTR)) + if ((m_ReinstanciateProjection) || (m_MapProjection == nullptr)) { itkExceptionMacro(<< "m_MapProjection not up-to-date, call InstantiateProjection() first"); } @@ -114,7 +114,7 @@ std::string MapProjectionAdapter::GetWkt() const { ossimKeywordlist kwl; this->GetMapProjection(); - if (m_MapProjection == ITK_NULLPTR) + if (m_MapProjection == nullptr) { return ""; } @@ -227,7 +227,7 @@ std::string MapProjectionAdapter::GetParameter(const std::string& key) const bool MapProjectionAdapter::InstantiateProjection() { - if ((this->m_ReinstanciateProjection) || (m_MapProjection == ITK_NULLPTR)) + if ((this->m_ReinstanciateProjection) || (m_MapProjection == nullptr)) { ossimKeywordlist kwl; ossimOgcWktTranslator wktTranslator; @@ -258,7 +258,7 @@ bool MapProjectionAdapter::InstantiateProjection() // ossimUtmProjection for example) ossimString name(m_ProjectionRefWkt); m_MapProjection = ossimMapProjectionFactory::instance()->createProjection(name); - if (m_MapProjection == ITK_NULLPTR) + if (m_MapProjection == nullptr) { // Trying directly extending the m_ProjectionRefWkt (convert the // Utm to ossimUtmProjection for example) @@ -268,7 +268,7 @@ bool MapProjectionAdapter::InstantiateProjection() m_MapProjection = ossimMapProjectionFactory::instance()->createProjection(extendedName); } - if (m_MapProjection == ITK_NULLPTR) return false; + if (m_MapProjection == nullptr) return false; } @@ -282,7 +282,7 @@ bool MapProjectionAdapter::InstantiateProjection() void MapProjectionAdapter::InverseTransform(double x, double y, double z, double& lon, double& lat, double& h) { - if (m_MapProjection == ITK_NULLPTR) + if (m_MapProjection == nullptr) { otbMsgDevMacro(<< "WARNING: Using identity"); lon = x; @@ -306,7 +306,7 @@ void MapProjectionAdapter::InverseTransform(double x, double y, double z, void MapProjectionAdapter::ForwardTransform(double lon, double lat, double h, double& x, double& y, double& z) { - if (m_MapProjection == ITK_NULLPTR) + if (m_MapProjection == nullptr) { otbMsgDevMacro(<< "WARNING: Using identity"); x = lon; diff --git a/Modules/Adapters/OSSIMAdapters/src/otbPlatformPositionAdapter.cxx b/Modules/Adapters/OSSIMAdapters/src/otbPlatformPositionAdapter.cxx index fcfac9eeca..f64795a1d5 100644 --- a/Modules/Adapters/OSSIMAdapters/src/otbPlatformPositionAdapter.cxx +++ b/Modules/Adapters/OSSIMAdapters/src/otbPlatformPositionAdapter.cxx @@ -33,16 +33,16 @@ namespace otb { PlatformPositionAdapter::PlatformPositionAdapter(): - m_SensorModel(ITK_NULLPTR) + m_SensorModel(nullptr) { } PlatformPositionAdapter::~PlatformPositionAdapter() { - if (m_SensorModel != ITK_NULLPTR) + if (m_SensorModel != nullptr) { delete m_SensorModel; - m_SensorModel = ITK_NULLPTR; + m_SensorModel = nullptr; } } diff --git a/Modules/Adapters/OSSIMAdapters/src/otbSarSensorModelAdapter.cxx b/Modules/Adapters/OSSIMAdapters/src/otbSarSensorModelAdapter.cxx index 8f035b3f2e..61d7f20e77 100644 --- a/Modules/Adapters/OSSIMAdapters/src/otbSarSensorModelAdapter.cxx +++ b/Modules/Adapters/OSSIMAdapters/src/otbSarSensorModelAdapter.cxx @@ -44,7 +44,7 @@ namespace otb { SarSensorModelAdapter::SarSensorModelAdapter(): - m_SensorModel(ITK_NULLPTR) + m_SensorModel(nullptr) { } @@ -66,7 +66,7 @@ bool SarSensorModelAdapter::LoadState(const ImageKeywordlist& image_kwl) bool SarSensorModelAdapter::SaveState(ImageKeywordlist & image_kwl) { - if(m_SensorModel.get() != ITK_NULLPTR) + if(m_SensorModel.get() != nullptr) { ossimKeywordlist geom; @@ -86,12 +86,12 @@ bool SarSensorModelAdapter::SaveState(ImageKeywordlist & image_kwl) bool SarSensorModelAdapter::IsValidSensorModel() const { - return m_SensorModel.get() != ITK_NULLPTR; + return m_SensorModel.get() != nullptr; } bool SarSensorModelAdapter::Deburst(std::vector<std::pair<unsigned long, unsigned long> > & lines) { - if(m_SensorModel.get() != ITK_NULLPTR) + if(m_SensorModel.get() != nullptr) { return m_SensorModel->deburst(lines); } @@ -111,7 +111,7 @@ void SarSensorModelAdapter::DeburstLineToImageLine(const std::vector<std::pair<u bool SarSensorModelAdapter::WorldToLineSampleYZ(const Point3DType & inGeoPoint, Point2DType & cr, Point2DType & yz) const { - if(m_SensorModel.get() == ITK_NULLPTR) + if(m_SensorModel.get() == nullptr) { return false; } @@ -139,7 +139,7 @@ bool SarSensorModelAdapter::WorldToLineSampleYZ(const Point3DType & inGeoPoint, bool SarSensorModelAdapter::WorldToLineSample(const Point3DType & inGeoPoint, Point2DType & cr) const { - if(m_SensorModel.get() == ITK_NULLPTR) + if(m_SensorModel.get() == nullptr) { return false; } @@ -185,7 +185,7 @@ bool SarSensorModelAdapter::WorldToSatPositionAndVelocity(const Point3DType & in Point3DType & satellitePosition, Point3DType & satelliteVelocity) const { - if(m_SensorModel.get() == ITK_NULLPTR) + if(m_SensorModel.get() == nullptr) { return false; } diff --git a/Modules/Adapters/OSSIMAdapters/src/otbSensorModelAdapter.cxx b/Modules/Adapters/OSSIMAdapters/src/otbSensorModelAdapter.cxx index be87fad9d6..205628157c 100644 --- a/Modules/Adapters/OSSIMAdapters/src/otbSensorModelAdapter.cxx +++ b/Modules/Adapters/OSSIMAdapters/src/otbSensorModelAdapter.cxx @@ -54,7 +54,7 @@ namespace otb { SensorModelAdapter::SensorModelAdapter(): - m_SensorModel(ITK_NULLPTR), m_TiePoints(ITK_NULLPTR) // FIXME keeping the original value but... + m_SensorModel(nullptr), m_TiePoints(nullptr) // FIXME keeping the original value but... { m_DEMHandler = DEMHandler::Instance(); m_TiePoints = new ossimTieGptSet(); @@ -75,7 +75,7 @@ void SensorModelAdapter::CreateProjection(const ImageKeywordlist& image_kwl) otbMsgDevMacro(<< "* type: " << geom.find("type")); m_SensorModel = ossimSensorModelFactory::instance()->createProjection(geom); - if (m_SensorModel == ITK_NULLPTR) + if (m_SensorModel == nullptr) { m_SensorModel = ossimplugins::ossimPluginProjectionFactory::instance()->createProjection(geom); } @@ -83,13 +83,13 @@ void SensorModelAdapter::CreateProjection(const ImageKeywordlist& image_kwl) bool SensorModelAdapter::IsValidSensorModel() const { - return m_SensorModel != ITK_NULLPTR; + return m_SensorModel != nullptr; } void SensorModelAdapter::ForwardTransformPoint(double x, double y, double z, double& lon, double& lat, double& h) const { - if (this->m_SensorModel == ITK_NULLPTR) + if (this->m_SensorModel == nullptr) { itkExceptionMacro(<< "ForwardTransformPoint(): Invalid sensor model (m_SensorModel pointer is null)"); } @@ -108,7 +108,7 @@ void SensorModelAdapter::ForwardTransformPoint(double x, double y, double z, void SensorModelAdapter::ForwardTransformPoint(double x, double y, double& lon, double& lat, double& h) const { - if (this->m_SensorModel == ITK_NULLPTR) + if (this->m_SensorModel == nullptr) { itkExceptionMacro(<< "ForwardTransformPoint(): Invalid sensor model (m_SensorModel pointer is null)"); } @@ -127,7 +127,7 @@ void SensorModelAdapter::ForwardTransformPoint(double x, double y, void SensorModelAdapter::InverseTransformPoint(double lon, double lat, double h, double& x, double& y, double& z) const { - if (this->m_SensorModel == ITK_NULLPTR) + if (this->m_SensorModel == nullptr) { itkExceptionMacro(<< "InverseTransformPoint(): Invalid sensor model (m_SensorModel pointer is null)"); } @@ -147,7 +147,7 @@ void SensorModelAdapter::InverseTransformPoint(double lon, double lat, double h, void SensorModelAdapter::InverseTransformPoint(double lon, double lat, double& x, double& y, double& z) const { - if (this->m_SensorModel == ITK_NULLPTR) + if (this->m_SensorModel == nullptr) { itkExceptionMacro(<< "InverseTransformPoint(): Invalid sensor model (m_SensorModel pointer is null)"); } @@ -202,7 +202,7 @@ double SensorModelAdapter::Optimize() { double precision = 0.; // If tie points and model are allocated - if(m_SensorModel != ITK_NULLPTR) + if(m_SensorModel != nullptr) { // try to retrieve a sensor model @@ -211,15 +211,15 @@ double SensorModelAdapter::Optimize() ossimRpcProjection * simpleRpcModel = dynamic_cast<ossimRpcProjection *>(m_SensorModel); //Handle exceptions - if ( (sensorModel == ITK_NULLPTR ) && (simpleRpcModel == ITK_NULLPTR ) ) + if ( (sensorModel == nullptr ) && (simpleRpcModel == nullptr ) ) itkExceptionMacro(<< "Optimize(): error, both dynamic_cast from ossimProjection* to ossimSensorModel* / ossimRpcProjection* failed."); - if(sensorModel != ITK_NULLPTR ) + if(sensorModel != nullptr ) { // Call optimize fit precision = sensorModel->optimizeFit(*m_TiePoints); } - else if (simpleRpcModel != ITK_NULLPTR) + else if (simpleRpcModel != nullptr) { // Call optimize fit precision = simpleRpcModel->optimizeFit(*m_TiePoints); @@ -238,19 +238,19 @@ bool SensorModelAdapter::ReadGeomFile(const std::string & infile) m_SensorModel = ossimSensorModelFactory::instance()->createProjection(geom); - if (m_SensorModel == ITK_NULLPTR) + if (m_SensorModel == nullptr) { m_SensorModel = ossimplugins::ossimPluginProjectionFactory::instance()->createProjection(geom); } // otbMsgDevMacro(<< "ReadGeomFile("<<geom<<") -> " << m_SensorModel); - return (m_SensorModel != ITK_NULLPTR); + return (m_SensorModel != nullptr); } bool SensorModelAdapter::WriteGeomFile(const std::string & outfile) { // If tie points and model are allocated - if(m_SensorModel != ITK_NULLPTR) + if(m_SensorModel != nullptr) { // try to retrieve a sensor model ossimSensorModel * sensorModel = dynamic_cast<ossimSensorModel *>(m_SensorModel); @@ -258,17 +258,17 @@ bool SensorModelAdapter::WriteGeomFile(const std::string & outfile) ossimRpcProjection * simpleRpcModel = dynamic_cast<ossimRpcProjection *>(m_SensorModel); //Handle exceptions - if ( (sensorModel == ITK_NULLPTR ) && (simpleRpcModel == ITK_NULLPTR ) ) + if ( (sensorModel == nullptr ) && (simpleRpcModel == nullptr ) ) itkExceptionMacro(<< "Optimize(): error, both dynamic_cast from ossimProjection* to ossimSensorModel* / ossimRpcProjection* failed."); ossimKeywordlist geom; bool success = false; - if(sensorModel != ITK_NULLPTR ) + if(sensorModel != nullptr ) { // Save state success = sensorModel->saveState(geom); } - else if (simpleRpcModel != ITK_NULLPTR) + else if (simpleRpcModel != nullptr) { // Save state success = simpleRpcModel->saveState(geom); diff --git a/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx b/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx index d009f21f0a..987fc76338 100644 --- a/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx +++ b/Modules/Applications/AppClassification/app/otbComputeConfusionMatrix.cxx @@ -88,7 +88,7 @@ protected: ComputeConfusionMatrix() { - m_Input = ITK_NULLPTR; + m_Input = nullptr; } private: diff --git a/Modules/Applications/AppClassification/app/otbComputeOGRLayersFeaturesStatistics.cxx b/Modules/Applications/AppClassification/app/otbComputeOGRLayersFeaturesStatistics.cxx index 0774475d1d..f6a3d9f9d2 100644 --- a/Modules/Applications/AppClassification/app/otbComputeOGRLayersFeaturesStatistics.cxx +++ b/Modules/Applications/AppClassification/app/otbComputeOGRLayersFeaturesStatistics.cxx @@ -82,7 +82,7 @@ private: std::string shapefile = GetParameterString("inshp"); otb::ogr::DataSource::Pointer ogrDS; - otb::ogr::Layer layer(ITK_NULLPTR, false); + otb::ogr::Layer layer(nullptr, false); OGRSpatialReference oSRS(""); std::vector<std::string> options; @@ -146,7 +146,7 @@ private: featValue.push_back(mv); feature = layer.ogr().GetNextFeature(); - goesOn = feature.addr() != ITK_NULLPTR; + goesOn = feature.addr() != nullptr; } MeasurementType mean; mean.SetSize(nbFeatures); diff --git a/Modules/Applications/AppClassification/app/otbOGRLayerClassifier.cxx b/Modules/Applications/AppClassification/app/otbOGRLayerClassifier.cxx index 86a2d7066d..045836b9e4 100644 --- a/Modules/Applications/AppClassification/app/otbOGRLayerClassifier.cxx +++ b/Modules/Applications/AppClassification/app/otbOGRLayerClassifier.cxx @@ -101,7 +101,7 @@ private: std::string shapefile = GetParameterString("inshp"); otb::ogr::DataSource::Pointer ogrDS; - otb::ogr::Layer layer(ITK_NULLPTR, false); + otb::ogr::Layer layer(nullptr, false); OGRSpatialReference oSRS(""); std::vector<std::string> options; @@ -183,7 +183,7 @@ private: input->PushBack(mv); target->PushBack(feature.ogr().GetFieldAsInteger("class")); feature = layer.ogr().GetNextFeature(); - goesOn = feature.addr() != ITK_NULLPTR; + goesOn = feature.addr() != nullptr; } ShiftScaleFilterType::Pointer trainingShiftScaleFilter = ShiftScaleFilterType::New(); @@ -223,7 +223,7 @@ private: feature2.ogr().SetField(GetParameterString("cfield").c_str(),(int)labelListSample->GetMeasurementVector(count)[0]); layer2.SetFeature(feature2); feature2 = layer2.ogr().GetNextFeature(); - goesOn2 = feature2.addr() != ITK_NULLPTR; + goesOn2 = feature2.addr() != nullptr; count++; } diff --git a/Modules/Applications/AppDescriptors/app/otbHomologousPointsExtraction.cxx b/Modules/Applications/AppDescriptors/app/otbHomologousPointsExtraction.cxx index 4c9e3bbc45..38df1e80ef 100644 --- a/Modules/Applications/AppDescriptors/app/otbHomologousPointsExtraction.cxx +++ b/Modules/Applications/AppDescriptors/app/otbHomologousPointsExtraction.cxx @@ -205,7 +205,7 @@ private: } - void Match(FloatImageType * im1, FloatImageType * im2, RSTransformType * rsTransform, RSTransformType * rsTransform1ToWGS84,RSTransformType * rsTransform2ToWGS84, std::ofstream & file, OGRMultiLineString * mls = ITK_NULLPTR) + void Match(FloatImageType * im1, FloatImageType * im2, RSTransformType * rsTransform, RSTransformType * rsTransform1ToWGS84,RSTransformType * rsTransform2ToWGS84, std::ofstream & file, OGRMultiLineString * mls = nullptr) { MatchingFilterType::Pointer matchingFilter = MatchingFilterType::New(); @@ -504,7 +504,7 @@ private: if(IsParameterEnabled("outvector")) { // Create the datasource (for matches export) - otb::ogr::Layer layer(ITK_NULLPTR, false); + otb::ogr::Layer layer(nullptr, false); otb::ogr::DataSource::Pointer ogrDS; ogrDS = otb::ogr::DataSource::New(GetParameterString("outvector"), otb::ogr::DataSource::Modes::Overwrite); diff --git a/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx b/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx index adcb2f3f43..d5f22f9b35 100644 --- a/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx +++ b/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx @@ -292,7 +292,7 @@ private: ListViewParameter *clParam = dynamic_cast<ListViewParameter*>(GetParameterByKey("cl")); // Update the values of the channels to be selected if nbComponents is changed - if (clParam != ITK_NULLPTR && clParam->GetNbChoices() != nbComponents) + if (clParam != nullptr && clParam->GetNbChoices() != nbComponents) { ClearChoices("cl"); for (unsigned int idx = 0; idx < nbComponents; ++idx) diff --git a/Modules/Applications/AppProjection/app/otbGenerateRPCSensorModel.cxx b/Modules/Applications/AppProjection/app/otbGenerateRPCSensorModel.cxx index c4b4b58d7d..f2ab235065 100644 --- a/Modules/Applications/AppProjection/app/otbGenerateRPCSensorModel.cxx +++ b/Modules/Applications/AppProjection/app/otbGenerateRPCSensorModel.cxx @@ -260,7 +260,7 @@ private: if(IsParameterEnabled("outvector")) { // Create the datasource (for matches export) - otb::ogr::Layer layer(ITK_NULLPTR, false); + otb::ogr::Layer layer(nullptr, false); otb::ogr::DataSource::Pointer ogrDS; ogrDS = otb::ogr::DataSource::New(GetParameterString("outvector"), otb::ogr::DataSource::Modes::Overwrite); diff --git a/Modules/Applications/AppProjection/app/otbRefineSensorModel.cxx b/Modules/Applications/AppProjection/app/otbRefineSensorModel.cxx index 653a4b77b8..3d7c54197f 100644 --- a/Modules/Applications/AppProjection/app/otbRefineSensorModel.cxx +++ b/Modules/Applications/AppProjection/app/otbRefineSensorModel.cxx @@ -324,7 +324,7 @@ private: if(IsParameterEnabled("outvector")) { // Create the datasource (for matches export) - otb::ogr::Layer layer(ITK_NULLPTR, false); + otb::ogr::Layer layer(nullptr, false); otb::ogr::DataSource::Pointer ogrDS; ogrDS = otb::ogr::DataSource::New(GetParameterString("outvector"), otb::ogr::DataSource::Modes::Overwrite); diff --git a/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx b/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx index 290b393e84..8999170a29 100644 --- a/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx +++ b/Modules/Applications/AppSegmentation/app/otbLSMSSegmentation.cxx @@ -633,7 +633,7 @@ private: WriteTile(changeLabel->GetOutput(),row,column,"RELAB"); // Remove previous tile (not needed anymore) - readerIn = ITK_NULLPTR; // release the input file + readerIn = nullptr; // release the input file RemoveFile(tileIn); } } @@ -690,7 +690,7 @@ private: m_FilesToRemoveAfterExecute.push_back(tmpfile); // Clean previous tiles (not needed anymore) - readerIn = ITK_NULLPTR; // release the input file + readerIn = nullptr; // release the input file RemoveFile(tileIn); } } @@ -725,7 +725,7 @@ private: void AfterExecuteAndWriteOutputs() override { // Release input files - // finalReader = ITK_NULLPTR; + // finalReader = nullptr; if(GetParameterInt("cleanup")) { diff --git a/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx b/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx index 9881309a6b..94c40f0228 100644 --- a/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx +++ b/Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx @@ -178,7 +178,7 @@ private: std::vector<ImageType::PixelType>sum2(regionCount+1,defaultValue); otb::ogr::DataSource::Pointer ogrDS; - otb::ogr::Layer layer(ITK_NULLPTR, false); + otb::ogr::Layer layer(nullptr, false); OGRSpatialReference oSRS(projRef.c_str()); std::vector<std::string> options; @@ -282,7 +282,7 @@ private: std::ostringstream sqloss; sqloss.str(""); sqloss<<"SELECT * FROM \""<<layername<<"\" ORDER BY label"; - otb::ogr::Layer layerTmp=ogrDS->ExecuteSQL(sqloss.str().c_str(), ITK_NULLPTR, ITK_NULLPTR); + otb::ogr::Layer layerTmp=ogrDS->ExecuteSQL(sqloss.str().c_str(), nullptr, nullptr); otb::ogr::Feature firstFeature = layerTmp.ogr().GetNextFeature(); //Geometry fusion @@ -295,7 +295,7 @@ private: OGRMultiPolygon geomToMerge; geomToMerge.addGeometry(firstFeature.GetGeometry()); bool merging = true; - otb::ogr::Feature nextFeature(ITK_NULLPTR); + otb::ogr::Feature nextFeature(nullptr); bool haveMerged=false; while(merging) @@ -369,7 +369,7 @@ private: if(extension==".shp"){ sqloss.str(""); sqloss<<"REPACK "<<layername; - ogrDS->ogr().ExecuteSQL(sqloss.str().c_str(), ITK_NULLPTR, ITK_NULLPTR); + ogrDS->ogr().ExecuteSQL(sqloss.str().c_str(), nullptr, nullptr); } ogrDS->SyncToDisk(); diff --git a/Modules/Applications/AppSegmentation/app/otbSegmentation.cxx b/Modules/Applications/AppSegmentation/app/otbSegmentation.cxx index 2e86378055..0103fee6b2 100644 --- a/Modules/Applications/AppSegmentation/app/otbSegmentation.cxx +++ b/Modules/Applications/AppSegmentation/app/otbSegmentation.cxx @@ -461,7 +461,7 @@ private: const std::string segType = GetParameterString("filter"); otb::ogr::DataSource::Pointer ogrDS; - otb::ogr::Layer layer(ITK_NULLPTR, false); + otb::ogr::Layer layer(nullptr, false); std::string projRef = GetParameterFloatVectorImage("in")->GetProjectionRef(); @@ -695,7 +695,7 @@ private: std::string shpLayerName = itksys::SystemTools::GetFilenameWithoutExtension(GetParameterString("mode.vector.out")); std::string repack("REPACK "); repack = repack + shpLayerName; - ogrDS->ExecuteSQL(repack, ITK_NULLPTR, ITK_NULLPTR); + ogrDS->ExecuteSQL(repack, nullptr, nullptr); } } } diff --git a/Modules/Applications/AppStereo/app/otbStereoFramework.cxx b/Modules/Applications/AppStereo/app/otbStereoFramework.cxx index 01cd7ad687..b389719c66 100644 --- a/Modules/Applications/AppStereo/app/otbStereoFramework.cxx +++ b/Modules/Applications/AppStereo/app/otbStereoFramework.cxx @@ -954,9 +954,9 @@ private: } // Compute disparities - FilterType* blockMatcherFilterPointer = ITK_NULLPTR; - FilterType* invBlockMatcherFilterPointer = ITK_NULLPTR; - FilterType* subPixelFilterPointer = ITK_NULLPTR; + FilterType* blockMatcherFilterPointer = nullptr; + FilterType* invBlockMatcherFilterPointer = nullptr; + FilterType* subPixelFilterPointer = nullptr; BijectionFilterType::Pointer bijectFilter; // pointer diff --git a/Modules/Core/CommandLineParser/include/otbCommandLineArgumentParser.h b/Modules/Core/CommandLineParser/include/otbCommandLineArgumentParser.h index 0132979d2f..564329357a 100644 --- a/Modules/Core/CommandLineParser/include/otbCommandLineArgumentParser.h +++ b/Modules/Core/CommandLineParser/include/otbCommandLineArgumentParser.h @@ -240,12 +240,12 @@ public: /** Add a new option with fixed number of parameters */ void AddOption(const std::string& name, const std::string& comment, - const std::string& synonym = ITK_NULLPTR, + const std::string& synonym = nullptr, int nParameters = 1, bool obligatory = true); /** Add a new option with unknown number of parameters */ - void AddOptionNParams(const std::string& name, const std::string& comment, const std::string& synonym = ITK_NULLPTR, bool obligatory = true); + void AddOptionNParams(const std::string& name, const std::string& comment, const std::string& synonym = nullptr, bool obligatory = true); /** Interpret options from the command line */ void ParseCommandLine(int argc, char *argv[], diff --git a/Modules/Core/CommandLineParser/src/otbCommandLineArgumentParser.cxx b/Modules/Core/CommandLineParser/src/otbCommandLineArgumentParser.cxx index aee515ccc7..faf4742af2 100644 --- a/Modules/Core/CommandLineParser/src/otbCommandLineArgumentParser.cxx +++ b/Modules/Core/CommandLineParser/src/otbCommandLineArgumentParser.cxx @@ -283,7 +283,7 @@ bool CommandLineArgumentParser::TryParseCommandLine(int argc, char *argv[], bool goOnFlag(true); while (goOnFlag == true) { - if (argv[i + 1] != ITK_NULLPTR) + if (argv[i + 1] != nullptr) { std::string strArgv = std::string(argv[i + 1]); if (strArgv[0] == '-' ) diff --git a/Modules/Core/Common/include/otbImageAndVectorImageOperationFilter.txx b/Modules/Core/Common/include/otbImageAndVectorImageOperationFilter.txx index 0950462894..89e1133992 100644 --- a/Modules/Core/Common/include/otbImageAndVectorImageOperationFilter.txx +++ b/Modules/Core/Common/include/otbImageAndVectorImageOperationFilter.txx @@ -72,7 +72,7 @@ const typename ImageAndVectorImageOperationFilter<TInputImage, TVectorInputImage ImageAndVectorImageOperationFilter<TInputImage, TVectorInputImage, TOutputImage> ::GetVectorInput() { - if (this->GetNumberOfInputs() < 2) return ITK_NULLPTR; + if (this->GetNumberOfInputs() < 2) return nullptr; return dynamic_cast<const VectorInputImageType*>(this->itk::ProcessObject::GetInput(1)); } diff --git a/Modules/Core/Common/include/otbImageToModulusAndDirectionImageFilter.txx b/Modules/Core/Common/include/otbImageToModulusAndDirectionImageFilter.txx index 2ab39c3b8d..ab571da29e 100644 --- a/Modules/Core/Common/include/otbImageToModulusAndDirectionImageFilter.txx +++ b/Modules/Core/Common/include/otbImageToModulusAndDirectionImageFilter.txx @@ -65,7 +65,7 @@ GetOutput() { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *> (this->itk::ProcessObject::GetOutput(0)); @@ -95,7 +95,7 @@ GetOutputDirection() { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageDirectionType *> (this->itk::ProcessObject::GetOutput(1)); diff --git a/Modules/Core/Common/include/otbImportImageFilter.txx b/Modules/Core/Common/include/otbImportImageFilter.txx index 204899ac41..f6affce633 100644 --- a/Modules/Core/Common/include/otbImportImageFilter.txx +++ b/Modules/Core/Common/include/otbImportImageFilter.txx @@ -44,7 +44,7 @@ ImportImageFilter<TOutputImage> } m_Direction.SetIdentity(); - m_ImportPointer = ITK_NULLPTR; + m_ImportPointer = nullptr; m_FilterManageMemory = false; m_Size = 0; } diff --git a/Modules/Core/Common/include/otbModelComponentBase.txx b/Modules/Core/Common/include/otbModelComponentBase.txx index 74bf396ded..11ba6164ba 100644 --- a/Modules/Core/Common/include/otbModelComponentBase.txx +++ b/Modules/Core/Common/include/otbModelComponentBase.txx @@ -36,9 +36,9 @@ template<class TSample> ModelComponentBase<TSample> ::ModelComponentBase() { - m_Sample = ITK_NULLPTR; - m_PdfFunction = ITK_NULLPTR; - m_CdfFunction = ITK_NULLPTR; + m_Sample = nullptr; + m_PdfFunction = nullptr; + m_CdfFunction = nullptr; m_SampleModified = 0; } @@ -50,7 +50,7 @@ ModelComponentBase<TSample> Superclass::PrintSelf(os, indent); os << indent << "Sample: "; - if (m_Sample != ITK_NULLPTR) + if (m_Sample != nullptr) { os << m_Sample << std::endl; } @@ -60,7 +60,7 @@ ModelComponentBase<TSample> } os << indent << "Membership Function for pdf: "; - if (m_PdfFunction != ITK_NULLPTR) + if (m_PdfFunction != nullptr) { os << m_PdfFunction << std::endl; } @@ -70,7 +70,7 @@ ModelComponentBase<TSample> } os << indent << "Membership Function for cdf: "; - if (m_CdfFunction != ITK_NULLPTR) + if (m_CdfFunction != nullptr) { os << m_CdfFunction << std::endl; } diff --git a/Modules/Core/Common/src/otbConfigurationManager.cxx b/Modules/Core/Common/src/otbConfigurationManager.cxx index d12d183362..c72d1d3dbc 100644 --- a/Modules/Core/Common/src/otbConfigurationManager.cxx +++ b/Modules/Core/Common/src/otbConfigurationManager.cxx @@ -54,7 +54,7 @@ ConfigurationManager::RAMValueType ConfigurationManager::GetMaxRAMHint() if(itksys::SystemTools::GetEnv("OTB_MAX_RAM_HINT",svalue)) { - unsigned long int tmp = strtoul(svalue.c_str(),ITK_NULLPTR,10); + unsigned long int tmp = strtoul(svalue.c_str(),nullptr,10); if(tmp) { diff --git a/Modules/Core/Common/src/otbExtendedFilenameHelper.cxx b/Modules/Core/Common/src/otbExtendedFilenameHelper.cxx index e92e2b05fb..6895ab02ee 100644 --- a/Modules/Core/Common/src/otbExtendedFilenameHelper.cxx +++ b/Modules/Core/Common/src/otbExtendedFilenameHelper.cxx @@ -29,7 +29,7 @@ void ExtendedFilenameHelper ::SetExtendedFileName(const char *extFname) { - if (extFname == ITK_NULLPTR) + if (extFname == nullptr) { itkGenericExceptionMacro( << "Filename is NULL" ); } diff --git a/Modules/Core/Common/src/otbFilterWatcherBase.cxx b/Modules/Core/Common/src/otbFilterWatcherBase.cxx index 2e4f9644bb..de42f57ed0 100644 --- a/Modules/Core/Common/src/otbFilterWatcherBase.cxx +++ b/Modules/Core/Common/src/otbFilterWatcherBase.cxx @@ -27,7 +27,7 @@ namespace otb FilterWatcherBase ::FilterWatcherBase() : m_Comment("Not watching an object"), - m_Process(ITK_NULLPTR), + m_Process(nullptr), m_StartTag(0), m_EndTag(0), m_ProgressTag(0), diff --git a/Modules/Core/Common/src/otbSystem.cxx b/Modules/Core/Common/src/otbSystem.cxx index e67d773cec..391818d5cd 100644 --- a/Modules/Core/Common/src/otbSystem.cxx +++ b/Modules/Core/Common/src/otbSystem.cxx @@ -127,9 +127,9 @@ std::vector<std::string> System::Readdir(const std::string& pszPath) if (pszPath.empty() == true) path = "."; - if ((hDir = opendir(path.c_str())) != ITK_NULLPTR) + if ((hDir = opendir(path.c_str())) != nullptr) { - while ((psDirEntry = readdir(hDir)) != ITK_NULLPTR) + while ((psDirEntry = readdir(hDir)) != nullptr) { listFileFind.push_back(psDirEntry->d_name); } diff --git a/Modules/Core/Common/src/otbWriterWatcherBase.cxx b/Modules/Core/Common/src/otbWriterWatcherBase.cxx index a2fcf9e0cd..6234a72850 100644 --- a/Modules/Core/Common/src/otbWriterWatcherBase.cxx +++ b/Modules/Core/Common/src/otbWriterWatcherBase.cxx @@ -29,7 +29,7 @@ WriterWatcherBase { // Initialize state m_Comment = "Not watching any object"; - m_Process = ITK_NULLPTR; + m_Process = nullptr; m_StartFilterTag = 0; m_EndFilterTag = 0; m_ProgressFilterTag = 0; diff --git a/Modules/Core/Common/test/otbSystemTest.cxx b/Modules/Core/Common/test/otbSystemTest.cxx index 801a5968a9..156d300df6 100644 --- a/Modules/Core/Common/test/otbSystemTest.cxx +++ b/Modules/Core/Common/test/otbSystemTest.cxx @@ -32,10 +32,10 @@ int otbSystemTest(int itkNotUsed(argc), char * argv[]) std::ostringstream msg; // Check instantiation test - otb::System * var(ITK_NULLPTR); + otb::System * var(nullptr); var = new otb::System(); delete var; - var = ITK_NULLPTR; + var = nullptr; if (itksys::SystemTools::FileExists(inputFileName, true) == false) { diff --git a/Modules/Core/ImageBase/src/otbImageIOBase.cxx b/Modules/Core/ImageBase/src/otbImageIOBase.cxx index d88d601fd6..a0d13a52ad 100644 --- a/Modules/Core/ImageBase/src/otbImageIOBase.cxx +++ b/Modules/Core/ImageBase/src/otbImageIOBase.cxx @@ -91,7 +91,7 @@ void ImageIOBase::Resize(const unsigned int numDimensions, const unsigned int* dimensions) { m_NumberOfDimensions = numDimensions; - if (dimensions != ITK_NULLPTR) + if (dimensions != nullptr) { for (unsigned int i=0; i < m_NumberOfDimensions; i++) { diff --git a/Modules/Core/ImageBase/test/otbMultiChannelExtractROI.cxx b/Modules/Core/ImageBase/test/otbMultiChannelExtractROI.cxx index 7edf68e919..03aa4f7c1c 100644 --- a/Modules/Core/ImageBase/test/otbMultiChannelExtractROI.cxx +++ b/Modules/Core/ImageBase/test/otbMultiChannelExtractROI.cxx @@ -40,7 +40,7 @@ int generic_otbMultiChannelExtractROI(int itkNotUsed(argc), char * argv[], const typename ExtractROIFilterType::Pointer extractROIFilter = ExtractROIFilterType::New(); int cpt(0), nbcanaux(0); - while (argv[cpt] != ITK_NULLPTR) + while (argv[cpt] != nullptr) { std::string strArgv(argv[cpt]); if (strArgv == "-startX") @@ -79,7 +79,7 @@ int generic_otbMultiChannelExtractROI(int itkNotUsed(argc), char * argv[], const bool searchChannels(true); while (searchChannels == true) { - if (argv[cpt] == ITK_NULLPTR) + if (argv[cpt] == nullptr) { searchChannels = false; } diff --git a/Modules/Core/ImageBase/test/otbMultiToMonoChannelExtractROI.cxx b/Modules/Core/ImageBase/test/otbMultiToMonoChannelExtractROI.cxx index a47f7b3cdb..fd61daa89c 100644 --- a/Modules/Core/ImageBase/test/otbMultiToMonoChannelExtractROI.cxx +++ b/Modules/Core/ImageBase/test/otbMultiToMonoChannelExtractROI.cxx @@ -36,7 +36,7 @@ int generic_otbMultiToMonoChannelExtractROI(int itkNotUsed(argc), typename ExtractROIFilterType::Pointer extractROIFilter = ExtractROIFilterType::New(); int cpt(0); - while (argv[cpt] != ITK_NULLPTR) + while (argv[cpt] != nullptr) { std::string strArgv(argv[cpt]); if (strArgv == "-startX") diff --git a/Modules/Core/Interpolation/include/otbBSplineInterpolateImageFunction.txx b/Modules/Core/Interpolation/include/otbBSplineInterpolateImageFunction.txx index 28b393767d..34c0963815 100644 --- a/Modules/Core/Interpolation/include/otbBSplineInterpolateImageFunction.txx +++ b/Modules/Core/Interpolation/include/otbBSplineInterpolateImageFunction.txx @@ -98,7 +98,7 @@ BSplineInterpolateImageFunction<TImageType, TCoordRep, TCoefficientType> } else { - m_Coefficients = ITK_NULLPTR; + m_Coefficients = nullptr; } } diff --git a/Modules/Core/Interpolation/include/otbGenericInterpolateImageFunction.txx b/Modules/Core/Interpolation/include/otbGenericInterpolateImageFunction.txx index 19aed276de..08c5d98b54 100644 --- a/Modules/Core/Interpolation/include/otbGenericInterpolateImageFunction.txx +++ b/Modules/Core/Interpolation/include/otbGenericInterpolateImageFunction.txx @@ -33,8 +33,8 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo { m_WindowSize = 1; this->SetRadius(1); - m_OffsetTable = ITK_NULLPTR; - m_WeightOffsetTable = ITK_NULLPTR; + m_OffsetTable = nullptr; + m_WeightOffsetTable = nullptr; m_TablesHaveBeenGenerated = false; m_NormalizeWeight = false; } @@ -54,21 +54,21 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo ::ResetOffsetTable() { // Clear the offset table - if (m_OffsetTable != ITK_NULLPTR) + if (m_OffsetTable != nullptr) { delete[] m_OffsetTable; - m_OffsetTable = ITK_NULLPTR; + m_OffsetTable = nullptr; } // Clear the weights tales - if (m_WeightOffsetTable != ITK_NULLPTR) + if (m_WeightOffsetTable != nullptr) { for (unsigned int i = 0; i < m_OffsetTableSize; ++i) { delete[] m_WeightOffsetTable[i]; } delete[] m_WeightOffsetTable; - m_WeightOffsetTable = ITK_NULLPTR; + m_WeightOffsetTable = nullptr; } } @@ -126,7 +126,7 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo // Initialize the neighborhood SizeType radius; radius.Fill(this->GetRadius()); - if (this->GetInputImage() != ITK_NULLPTR) + if (this->GetInputImage() != nullptr) { IteratorType it = IteratorType(radius, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion()); // Compute the offset tables (we ignore all the zero indices diff --git a/Modules/Core/LabelMap/include/otbAttributesMapLabelObject.h b/Modules/Core/LabelMap/include/otbAttributesMapLabelObject.h index 4918ff363d..24871c20bd 100644 --- a/Modules/Core/LabelMap/include/otbAttributesMapLabelObject.h +++ b/Modules/Core/LabelMap/include/otbAttributesMapLabelObject.h @@ -277,7 +277,7 @@ public: // copy the data of the current type if possible const Self * src = dynamic_cast<const Self *>(lo); - if (src == ITK_NULLPTR) + if (src == nullptr) { return; } diff --git a/Modules/Core/LabelMap/include/otbAttributesMapLabelObjectWithClassLabel.h b/Modules/Core/LabelMap/include/otbAttributesMapLabelObjectWithClassLabel.h index f9d822cdd6..97cf3a5580 100644 --- a/Modules/Core/LabelMap/include/otbAttributesMapLabelObjectWithClassLabel.h +++ b/Modules/Core/LabelMap/include/otbAttributesMapLabelObjectWithClassLabel.h @@ -111,7 +111,7 @@ public: // copy the data of the current type if possible const Self * src = dynamic_cast<const Self *>( lo ); - if( src == ITK_NULLPTR ) + if( src == nullptr ) { return; } diff --git a/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.txx b/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.txx index 7a758eb711..a21ad1bc69 100644 --- a/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.txx +++ b/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.txx @@ -79,7 +79,7 @@ ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabel, TO { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageType* > @@ -93,7 +93,7 @@ ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabel, TO { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const LabeledImageType* > diff --git a/Modules/Core/LabelMap/include/otbLabelMapSource.txx b/Modules/Core/LabelMap/include/otbLabelMapSource.txx index 888293e55b..99da44f698 100644 --- a/Modules/Core/LabelMap/include/otbLabelMapSource.txx +++ b/Modules/Core/LabelMap/include/otbLabelMapSource.txx @@ -65,7 +65,7 @@ LabelMapSource<TOutputLabelMap> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputLabelMapType *> (this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Core/LabelMap/include/otbLabelMapToSampleListFilter.txx b/Modules/Core/LabelMap/include/otbLabelMapToSampleListFilter.txx index ff12ae488b..0c58b9ff4d 100644 --- a/Modules/Core/LabelMap/include/otbLabelMapToSampleListFilter.txx +++ b/Modules/Core/LabelMap/include/otbLabelMapToSampleListFilter.txx @@ -73,7 +73,7 @@ LabelMapToSampleListFilter<TInputLabelMap,TOutputListSample,TMeasurementFunctor> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputLabelMapType* > diff --git a/Modules/Core/LabelMap/include/otbLabelObjectToPolygonFunctor.h b/Modules/Core/LabelMap/include/otbLabelObjectToPolygonFunctor.h index f04c37961d..dcddceaeb3 100644 --- a/Modules/Core/LabelMap/include/otbLabelObjectToPolygonFunctor.h +++ b/Modules/Core/LabelMap/include/otbLabelObjectToPolygonFunctor.h @@ -120,7 +120,7 @@ public: } /** Constructor */ - LabelObjectToPolygonFunctor() : m_Polygon(ITK_NULLPTR), + LabelObjectToPolygonFunctor() : m_Polygon(nullptr), m_CurrentState(UP_LEFT), m_PositionFlag(LEFT_END), m_StartingPoint(), diff --git a/Modules/Core/LabelMap/include/otbShapeAttributesLabelMapFilter.txx b/Modules/Core/LabelMap/include/otbShapeAttributesLabelMapFilter.txx index 6393feda96..54b9349e2c 100644 --- a/Modules/Core/LabelMap/include/otbShapeAttributesLabelMapFilter.txx +++ b/Modules/Core/LabelMap/include/otbShapeAttributesLabelMapFilter.txx @@ -47,7 +47,7 @@ ShapeAttributesLabelObjectFunctor<TLabelObject, TLabelImage> m_ComputeFlusser(true), m_ComputePolygon(true), m_ReducedAttributeSet(true), - m_LabelImage(ITK_NULLPTR) + m_LabelImage(nullptr) {} /** The comparator (!=) */ diff --git a/Modules/Core/ObjectList/include/otbImageListSource.txx b/Modules/Core/ObjectList/include/otbImageListSource.txx index b6e75d7402..74d1cb6d08 100644 --- a/Modules/Core/ObjectList/include/otbImageListSource.txx +++ b/Modules/Core/ObjectList/include/otbImageListSource.txx @@ -46,7 +46,7 @@ ImageListSource<TOutputImage> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageListType *> (this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Core/ObjectList/include/otbImageListToImageFilter.txx b/Modules/Core/ObjectList/include/otbImageListToImageFilter.txx index b12e5d408e..dd941f3f20 100644 --- a/Modules/Core/ObjectList/include/otbImageListToImageFilter.txx +++ b/Modules/Core/ObjectList/include/otbImageListToImageFilter.txx @@ -59,7 +59,7 @@ ImageListToImageFilter<TInputImage, TOutputImage> if (this->GetNumberOfInputs() < 1) { // exit - return ITK_NULLPTR; + return nullptr; } // else return the first input return static_cast<InputImageListType *> diff --git a/Modules/Core/ObjectList/include/otbImageListToImageListFilter.txx b/Modules/Core/ObjectList/include/otbImageListToImageListFilter.txx index 358f7b4883..df0c723bc5 100644 --- a/Modules/Core/ObjectList/include/otbImageListToImageListFilter.txx +++ b/Modules/Core/ObjectList/include/otbImageListToImageListFilter.txx @@ -59,7 +59,7 @@ ImageListToImageListFilter<TInputImage, TOutputImage> if (this->GetNumberOfInputs() < 1) { // exit - return ITK_NULLPTR; + return nullptr; } // else return the first input return static_cast<InputImageListType *> diff --git a/Modules/Core/ObjectList/include/otbImageListToSingleImageFilter.txx b/Modules/Core/ObjectList/include/otbImageListToSingleImageFilter.txx index 98fcbe56a4..3ad9e1593c 100644 --- a/Modules/Core/ObjectList/include/otbImageListToSingleImageFilter.txx +++ b/Modules/Core/ObjectList/include/otbImageListToSingleImageFilter.txx @@ -50,7 +50,7 @@ ImageListToSingleImageFilter<TImageType> if (this->GetNumberOfInputs() != 1) { // exit - return ITK_NULLPTR; + return nullptr; } // else return the first input return static_cast<OutputImagePointerType>( diff --git a/Modules/Core/ObjectList/include/otbImageToImageListFilter.txx b/Modules/Core/ObjectList/include/otbImageToImageListFilter.txx index d94a60f52b..36432c7590 100644 --- a/Modules/Core/ObjectList/include/otbImageToImageListFilter.txx +++ b/Modules/Core/ObjectList/include/otbImageToImageListFilter.txx @@ -59,7 +59,7 @@ ImageToImageListFilter<TInputImage, TOutputImage> if (this->GetNumberOfInputs() < 1) { // exit - return ITK_NULLPTR; + return nullptr; } // else return the first input return static_cast<TInputImage *> diff --git a/Modules/Core/ObjectList/include/otbObjectListSource.txx b/Modules/Core/ObjectList/include/otbObjectListSource.txx index 10bf6116a7..1bfa2d3a82 100644 --- a/Modules/Core/ObjectList/include/otbObjectListSource.txx +++ b/Modules/Core/ObjectList/include/otbObjectListSource.txx @@ -65,7 +65,7 @@ ObjectListSource<TOutputList> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TOutputList*> diff --git a/Modules/Core/ObjectList/include/otbObjectListToObjectListFilter.txx b/Modules/Core/ObjectList/include/otbObjectListToObjectListFilter.txx index 2104ebf4ea..0db61c009d 100644 --- a/Modules/Core/ObjectList/include/otbObjectListToObjectListFilter.txx +++ b/Modules/Core/ObjectList/include/otbObjectListToObjectListFilter.txx @@ -54,7 +54,7 @@ ObjectListToObjectListFilter<TInputList, TOutputList> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputList *> diff --git a/Modules/Core/PointSet/include/otbImageToPointSetFilter.txx b/Modules/Core/PointSet/include/otbImageToPointSetFilter.txx index 91e3d755f6..884113dbb6 100644 --- a/Modules/Core/PointSet/include/otbImageToPointSetFilter.txx +++ b/Modules/Core/PointSet/include/otbImageToPointSetFilter.txx @@ -97,7 +97,7 @@ const typename ImageToPointSetFilter<TInputImage, TOutputPointSet>::InputImageTy ImageToPointSetFilter<TInputImage, TOutputPointSet> ::GetInput(void) { - if (this->GetNumberOfInputs() < 1) return ITK_NULLPTR; + if (this->GetNumberOfInputs() < 1) return nullptr; return dynamic_cast<const InputImageType*> (this->ProcessObjectType::GetInput(0)); diff --git a/Modules/Core/PointSet/include/otbPointSetSource.txx b/Modules/Core/PointSet/include/otbPointSetSource.txx index 99ff0b4490..2aad45741e 100644 --- a/Modules/Core/PointSet/include/otbPointSetSource.txx +++ b/Modules/Core/PointSet/include/otbPointSetSource.txx @@ -66,7 +66,7 @@ PointSetSource<TOutputPointSet> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TOutputPointSet*> diff --git a/Modules/Core/PointSet/include/otbPointSetToPointSetFilter.txx b/Modules/Core/PointSet/include/otbPointSetToPointSetFilter.txx index cec7d2a065..3a93d570f4 100644 --- a/Modules/Core/PointSet/include/otbPointSetToPointSetFilter.txx +++ b/Modules/Core/PointSet/include/otbPointSetToPointSetFilter.txx @@ -88,7 +88,7 @@ typename PointSetToPointSetFilter<TInputPointSet, TOutputPointSet>::InputPointSe PointSetToPointSetFilter<TInputPointSet, TOutputPointSet> ::GetInput(void) { - if (this->GetNumberOfInputs() < 1) return ITK_NULLPTR; + if (this->GetNumberOfInputs() < 1) return nullptr; return static_cast<InputPointSetType*> (this->ProcessObjectType::GetInput(0)); diff --git a/Modules/Core/SpatialObjects/include/otbLineSpatialObject.h b/Modules/Core/SpatialObjects/include/otbLineSpatialObject.h index 536f2b305b..2256f93c89 100644 --- a/Modules/Core/SpatialObjects/include/otbLineSpatialObject.h +++ b/Modules/Core/SpatialObjects/include/otbLineSpatialObject.h @@ -94,14 +94,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 = ITK_NULLPTR) const override; + unsigned int depth = 0, char * name = nullptr) const override; /** 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 = ITK_NULLPTR) const override; + unsigned int depth = 0, char * name = nullptr) const override; /** Returns true if the point is inside the line, false otherwise. */ bool IsInside(const PointType& point, diff --git a/Modules/Core/SpatialObjects/include/otbLineSpatialObject.txx b/Modules/Core/SpatialObjects/include/otbLineSpatialObject.txx index e015a2120b..5cd5e52337 100644 --- a/Modules/Core/SpatialObjects/include/otbLineSpatialObject.txx +++ b/Modules/Core/SpatialObjects/include/otbLineSpatialObject.txx @@ -226,7 +226,7 @@ LineSpatialObject<VDimension> { // otbMsgDevMacro( "Checking the point [" << point << "] is on the Line" ); - if (name == ITK_NULLPTR) + if (name == nullptr) { if (IsInside(point)) { diff --git a/Modules/Core/SpatialObjects/include/otbSpatialObjectSource.txx b/Modules/Core/SpatialObjects/include/otbSpatialObjectSource.txx index 953923678f..03443b15f5 100644 --- a/Modules/Core/SpatialObjects/include/otbSpatialObjectSource.txx +++ b/Modules/Core/SpatialObjects/include/otbSpatialObjectSource.txx @@ -46,7 +46,7 @@ SpatialObjectSource<TSpatialObject> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<SpatialObjectType *> (this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Core/SpatialObjects/include/otbSpatialObjectToImageDrawingFilter.txx b/Modules/Core/SpatialObjects/include/otbSpatialObjectToImageDrawingFilter.txx index 70991ea191..cd29810f73 100644 --- a/Modules/Core/SpatialObjects/include/otbSpatialObjectToImageDrawingFilter.txx +++ b/Modules/Core/SpatialObjects/include/otbSpatialObjectToImageDrawingFilter.txx @@ -85,7 +85,7 @@ SpatialObjectToImageDrawingFilter<TInputSpatialObject, TOutputImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputSpatialObject *> diff --git a/Modules/Core/Streaming/src/otbPipelineMemoryPrintCalculator.cxx b/Modules/Core/Streaming/src/otbPipelineMemoryPrintCalculator.cxx index 4d629c4c69..af8390554b 100644 --- a/Modules/Core/Streaming/src/otbPipelineMemoryPrintCalculator.cxx +++ b/Modules/Core/Streaming/src/otbPipelineMemoryPrintCalculator.cxx @@ -36,7 +36,7 @@ const double PipelineMemoryPrintCalculator::MegabyteToByte = vcl_pow(2.0, 20); PipelineMemoryPrintCalculator ::PipelineMemoryPrintCalculator() : m_MemoryPrint(0), - m_DataToWrite(ITK_NULLPTR), + m_DataToWrite(nullptr), m_BiasCorrectionFactor(1.), m_VisitedProcessObjects() {} diff --git a/Modules/Core/Transform/include/otbCompositeTransform.txx b/Modules/Core/Transform/include/otbCompositeTransform.txx index df2ea39c57..76ff270d45 100644 --- a/Modules/Core/Transform/include/otbCompositeTransform.txx +++ b/Modules/Core/Transform/include/otbCompositeTransform.txx @@ -43,8 +43,8 @@ CompositeTransform<TFirstTransform, NOutputDimensions> ::CompositeTransform() : Superclass(ParametersDimension) { - m_FirstTransform = ITK_NULLPTR; - m_SecondTransform = ITK_NULLPTR; + m_FirstTransform = nullptr; + m_SecondTransform = nullptr; } template<class TFirstTransform, diff --git a/Modules/Core/Transform/include/otbGenericMapProjection.txx b/Modules/Core/Transform/include/otbGenericMapProjection.txx index 0adedc2a2f..9d25594acd 100644 --- a/Modules/Core/Transform/include/otbGenericMapProjection.txx +++ b/Modules/Core/Transform/include/otbGenericMapProjection.txx @@ -133,7 +133,7 @@ bool GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions> ::IsProjectionDefined() const { - return (m_MapProjection->GetMapProjection() != ITK_NULLPTR); + return (m_MapProjection->GetMapProjection() != nullptr); } template<TransformDirection::TransformationDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions, diff --git a/Modules/Core/Transform/include/otbGenericRSTransform.txx b/Modules/Core/Transform/include/otbGenericRSTransform.txx index 29d72901c2..879cba0d6d 100644 --- a/Modules/Core/Transform/include/otbGenericRSTransform.txx +++ b/Modules/Core/Transform/include/otbGenericRSTransform.txx @@ -46,9 +46,9 @@ GenericRSTransform<TScalarType, NInputDimensions, NOutputDimensions> m_OutputSpacing.Fill(1); m_OutputOrigin.Fill(0); - m_Transform = ITK_NULLPTR; - m_InputTransform = ITK_NULLPTR; - m_OutputTransform = ITK_NULLPTR; + m_Transform = nullptr; + m_InputTransform = nullptr; + m_OutputTransform = nullptr; m_TransformUpToDate = false; m_TransformAccuracy = Projection::UNKNOWN; } @@ -99,8 +99,8 @@ GenericRSTransform<TScalarType, NInputDimensions, NOutputDimensions> otbMsgDevMacro(<< " * Output Spacing: " << m_OutputSpacing); //Make sure that the state is clean: - m_InputTransform = ITK_NULLPTR; - m_OutputTransform = ITK_NULLPTR; + m_InputTransform = nullptr; + m_OutputTransform = nullptr; bool firstTransformGiveGeo = true; bool inputTransformIsSensor = false; @@ -161,8 +161,8 @@ GenericRSTransform<TScalarType, NInputDimensions, NOutputDimensions> m_InputTransform = itk::IdentityTransform<double, NInputDimensions>::New(); // firstTransformGiveGeo = false; - OGRSpatialReferenceH hSRS = ITK_NULLPTR; - hSRS = OSRNewSpatialReference(ITK_NULLPTR); + OGRSpatialReferenceH hSRS = nullptr; + hSRS = OSRNewSpatialReference(nullptr); const char * wktString = m_InputProjectionRef.c_str(); if (OSRImportFromWkt(hSRS, (char **) &wktString) != OGRERR_NONE) { @@ -286,7 +286,7 @@ GenericRSTransform<TScalarType, NInputDimensions, NOutputDimensions> ::GetInverse(Self * inverseTransform) const { // Test the inverseTransform pointer - if (inverseTransform == ITK_NULLPTR) + if (inverseTransform == nullptr) { return false; } diff --git a/Modules/Core/Transform/src/otbGeoInformationConversion.cxx b/Modules/Core/Transform/src/otbGeoInformationConversion.cxx index 4beb0cd9ec..239a08c319 100644 --- a/Modules/Core/Transform/src/otbGeoInformationConversion.cxx +++ b/Modules/Core/Transform/src/otbGeoInformationConversion.cxx @@ -32,12 +32,12 @@ namespace otb std::string GeoInformationConversion::ToWKT(int srid) { - char * wkt = ITK_NULLPTR; + char * wkt = nullptr; std::string ret; // Build the srs from the epsg number - OGRSpatialReferenceH hSRS = ITK_NULLPTR; - hSRS = OSRNewSpatialReference(ITK_NULLPTR); + OGRSpatialReferenceH hSRS = nullptr; + hSRS = OSRNewSpatialReference(nullptr); if (OSRImportFromEPSG(hSRS, srid ) == OGRERR_NONE) { diff --git a/Modules/Core/Transform/test/otbCreateProjectionWithOSSIM.cxx b/Modules/Core/Transform/test/otbCreateProjectionWithOSSIM.cxx index 3a8f9cb8ef..9e0543810a 100644 --- a/Modules/Core/Transform/test/otbCreateProjectionWithOSSIM.cxx +++ b/Modules/Core/Transform/test/otbCreateProjectionWithOSSIM.cxx @@ -85,9 +85,9 @@ int otbCreateProjectionWithOSSIM(int argc, char* argv[]) ossimGpt ossimGPoint(0, 0); ossimDpt ossimDPoint; otbGenericMsgDebugMacro(<< "Creating projection..."); - ossimProjection * model = ITK_NULLPTR; + ossimProjection * model = nullptr; model = ossimProjectionFactoryRegistry::instance()->createProjection(geom); - if (model == ITK_NULLPTR) + if (model == nullptr) { itkGenericExceptionMacro(<< "Invalid Model * == NULL !"); } diff --git a/Modules/Core/Transform/test/otbCreateProjectionWithOTB.cxx b/Modules/Core/Transform/test/otbCreateProjectionWithOTB.cxx index d70edcd15c..ffa2d34cbc 100644 --- a/Modules/Core/Transform/test/otbCreateProjectionWithOTB.cxx +++ b/Modules/Core/Transform/test/otbCreateProjectionWithOTB.cxx @@ -90,10 +90,10 @@ int otbCreateProjectionWithOTB(int argc, char* argv[]) ossimGpt ossimGPoint(0, 0); ossimDpt ossimDPoint; - ossimProjection * model = ITK_NULLPTR; + ossimProjection * model = nullptr; otbGenericMsgDebugMacro(<< "Creating projection..."); model = ossimProjectionFactoryRegistry::instance()->createProjection(geom); - if (model == ITK_NULLPTR) + if (model == nullptr) { itkGenericExceptionMacro(<< "Invalid Model * == NULL !"); } diff --git a/Modules/Core/Transform/test/otbGenericRSTransform.cxx b/Modules/Core/Transform/test/otbGenericRSTransform.cxx index 8e32fcdf3d..56c4f96caa 100644 --- a/Modules/Core/Transform/test/otbGenericRSTransform.cxx +++ b/Modules/Core/Transform/test/otbGenericRSTransform.cxx @@ -41,13 +41,13 @@ int otbGenericRSTransform(int itkNotUsed(argc), char* argv[]) // Build wgs ref oSRS.SetWellKnownGeogCS("WGS84"); - char * wgsRef = ITK_NULLPTR; + char * wgsRef = nullptr; oSRS.exportToWkt(&wgsRef); // Build UTM ref oSRS.SetProjCS("UTM"); oSRS.SetUTM(31, true); - char * utmRef = ITK_NULLPTR; + char * utmRef = nullptr; oSRS.exportToWkt(&utmRef); // Build Lambert II ref @@ -59,7 +59,7 @@ int otbGenericRSTransform(int itkNotUsed(argc), char* argv[]) double falseNorthingL2 = 2200000; oSRS.SetProjCS("Lambert II "); oSRS.SetLCC(stdParallel1, stdParallel2, originLatL2, originLongL2, falseEastingL2, falseNorthingL2); - char * lambertRef = ITK_NULLPTR; + char * lambertRef = nullptr; oSRS.exportToWkt(&lambertRef); // Build the Transmercator ref @@ -69,7 +69,7 @@ int otbGenericRSTransform(int itkNotUsed(argc), char* argv[]) oSRS.SetProjCS("Transmercator "); oSRS.SetWellKnownGeogCS("WGS84"); oSRS.SetTM(originLatTmt, originLongTmt, 1, 0, 0); - char * tmtRef = ITK_NULLPTR; + char * tmtRef = nullptr; oSRS.exportToWkt(&tmtRef); TransformType::Pointer wgs2utm = TransformType::New(); diff --git a/Modules/Core/Transform/test/otbGenericRSTransformWithSRID.cxx b/Modules/Core/Transform/test/otbGenericRSTransformWithSRID.cxx index 0eabbf3e22..6860d7c1bd 100644 --- a/Modules/Core/Transform/test/otbGenericRSTransformWithSRID.cxx +++ b/Modules/Core/Transform/test/otbGenericRSTransformWithSRID.cxx @@ -53,7 +53,7 @@ int otbGenericRSTransformWithSRID(int itkNotUsed(argc), char* argv[]) double falseNorthingL2 = 2200000; oSRS.SetProjCS("Lambert II "); oSRS.SetLCC(stdParallel1, stdParallel2, originLatL2, originLongL2, falseEastingL2, falseNorthingL2); - char * lambertRef = ITK_NULLPTR; + char * lambertRef = nullptr; oSRS.exportToWkt(&lambertRef); // Build the Transmercator ref @@ -63,7 +63,7 @@ int otbGenericRSTransformWithSRID(int itkNotUsed(argc), char* argv[]) oSRS.SetProjCS("Transmercator "); oSRS.SetWellKnownGeogCS("WGS84"); oSRS.SetTM(originLatTmt, originLongTmt, 1, 0, 0); - char * tmtRef = ITK_NULLPTR; + char * tmtRef = nullptr; oSRS.exportToWkt(&tmtRef); TransformType::Pointer wgs2utm = TransformType::New(); diff --git a/Modules/Core/VectorDataBase/include/otbDataNode.txx b/Modules/Core/VectorDataBase/include/otbDataNode.txx index afa07ba7aa..a31ddfbc5b 100644 --- a/Modules/Core/VectorDataBase/include/otbDataNode.txx +++ b/Modules/Core/VectorDataBase/include/otbDataNode.txx @@ -605,7 +605,7 @@ DataNode<TPrecision, VDimension, TValuePrecision> default: break; } - return ITK_NULLPTR; + return nullptr; } template <class TPrecision, unsigned int VDimension, class TValuePrecision> diff --git a/Modules/Core/VectorDataBase/include/otbDataNodeImageFunction.txx b/Modules/Core/VectorDataBase/include/otbDataNodeImageFunction.txx index 3fc44e92c5..681c4ccf21 100644 --- a/Modules/Core/VectorDataBase/include/otbDataNodeImageFunction.txx +++ b/Modules/Core/VectorDataBase/include/otbDataNodeImageFunction.txx @@ -33,7 +33,7 @@ template <class TImage, class TOutput, class TCoordRep, class TPrecision> DataNodeImageFunction<TImage, TOutput, TCoordRep, TPrecision> ::DataNodeImageFunction() { - m_Image = ITK_NULLPTR; + m_Image = nullptr; m_StartIndex.Fill(0); m_EndIndex.Fill(0); m_StartContinuousIndex.Fill(0.0f); diff --git a/Modules/Core/VectorDataBase/include/otbDataNodeVectorDataFunction.txx b/Modules/Core/VectorDataBase/include/otbDataNodeVectorDataFunction.txx index 3b7484a22c..fc09a14f7a 100644 --- a/Modules/Core/VectorDataBase/include/otbDataNodeVectorDataFunction.txx +++ b/Modules/Core/VectorDataBase/include/otbDataNodeVectorDataFunction.txx @@ -33,7 +33,7 @@ template <class TOutput, class TCoordRep, class TPrecision> DataNodeVectorDataFunction<TOutput, TCoordRep, TPrecision> ::DataNodeVectorDataFunction() { - m_VectorData = ITK_NULLPTR; + m_VectorData = nullptr; } diff --git a/Modules/Core/VectorDataBase/include/otbVectorDataIOBase.h b/Modules/Core/VectorDataBase/include/otbVectorDataIOBase.h index fac29ae71b..2b245043e2 100644 --- a/Modules/Core/VectorDataBase/include/otbVectorDataIOBase.h +++ b/Modules/Core/VectorDataBase/include/otbVectorDataIOBase.h @@ -149,7 +149,7 @@ public: /** Writes the data to disk from the memory buffer provided. Make sure * that the IORegions has been set properly. The buffer is cast to a * pointer to the beginning of the image data. */ - virtual void Write(const itk::DataObject* data, char ** papszOptions = ITK_NULLPTR) = 0; + virtual void Write(const itk::DataObject* data, char ** papszOptions = nullptr) = 0; protected: VectorDataIOBase(); diff --git a/Modules/Core/VectorDataBase/include/otbVectorDataProperties.h b/Modules/Core/VectorDataBase/include/otbVectorDataProperties.h index 59f22cca0e..75b8a72ccb 100644 --- a/Modules/Core/VectorDataBase/include/otbVectorDataProperties.h +++ b/Modules/Core/VectorDataBase/include/otbVectorDataProperties.h @@ -84,7 +84,7 @@ public: void ComputeBoundingRegion(); protected: /** Constructor */ - VectorDataProperties() : m_VectorDataObject(ITK_NULLPTR) {}; + VectorDataProperties() : m_VectorDataObject(nullptr) {}; /** Destructor */ ~VectorDataProperties() override {} /**PrintSelf method */ diff --git a/Modules/Core/VectorDataBase/include/otbVectorDataSource.txx b/Modules/Core/VectorDataBase/include/otbVectorDataSource.txx index 7f05da1f92..2a8f3d40e6 100644 --- a/Modules/Core/VectorDataBase/include/otbVectorDataSource.txx +++ b/Modules/Core/VectorDataBase/include/otbVectorDataSource.txx @@ -110,7 +110,7 @@ VectorDataSource<TOutputVectorData> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputVectorDataType *> (this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Core/VectorDataBase/src/otbVectorDataKeywordlist.cxx b/Modules/Core/VectorDataBase/src/otbVectorDataKeywordlist.cxx index 9bc3cee372..39c3623e1a 100644 --- a/Modules/Core/VectorDataBase/src/otbVectorDataKeywordlist.cxx +++ b/Modules/Core/VectorDataBase/src/otbVectorDataKeywordlist.cxx @@ -461,7 +461,7 @@ VectorDataKeywordlist } case OFTString: { - if (field.second.String != ITK_NULLPTR) + if (field.second.String != nullptr) { output << field.second.String; } @@ -525,7 +525,7 @@ VectorDataKeywordlist } case OFTString: { - if (field.second.String != ITK_NULLPTR) + if (field.second.String != nullptr) { CPLFree(outField.second.String); outField.second.String = CPLStrdup(field.second.String); diff --git a/Modules/Core/VectorDataBase/test/otbPolygon.cxx b/Modules/Core/VectorDataBase/test/otbPolygon.cxx index c49961417e..4266f562ca 100644 --- a/Modules/Core/VectorDataBase/test/otbPolygon.cxx +++ b/Modules/Core/VectorDataBase/test/otbPolygon.cxx @@ -40,7 +40,7 @@ int otbPolygon(int itkNotUsed(argc), char * argv[]) // Reading vertices from command line int cpt = 2; bool first = true; - while (argv[cpt] != ITK_NULLPTR && argv[cpt + 1] != ITK_NULLPTR) + while (argv[cpt] != nullptr && argv[cpt + 1] != nullptr) { if (argv[cpt][0] == 'n') { diff --git a/Modules/Detection/ObjectDetection/include/otbLabeledSampleLocalizationGenerator.txx b/Modules/Detection/ObjectDetection/include/otbLabeledSampleLocalizationGenerator.txx index d43aca63a4..0045af00e4 100644 --- a/Modules/Detection/ObjectDetection/include/otbLabeledSampleLocalizationGenerator.txx +++ b/Modules/Detection/ObjectDetection/include/otbLabeledSampleLocalizationGenerator.txx @@ -72,7 +72,7 @@ LabeledSampleLocalizationGenerator<TVectorData> { if (this->GetNumberOfInputs() < idx) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const VectorDataType *>(this->Superclass::GetInput(idx)); diff --git a/Modules/Detection/RoadExtraction/include/otbLikelihoodPathListFilter.txx b/Modules/Detection/RoadExtraction/include/otbLikelihoodPathListFilter.txx index 93ad6ad537..99e40bc8f3 100644 --- a/Modules/Detection/RoadExtraction/include/otbLikelihoodPathListFilter.txx +++ b/Modules/Detection/RoadExtraction/include/otbLikelihoodPathListFilter.txx @@ -53,7 +53,7 @@ LikelihoodPathListFilter<TPath, TImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const ImageType *>(this->itk::ProcessObject::GetInput(1)); } diff --git a/Modules/Detection/RoadExtraction/include/otbModulusAndDirectionImageToImageFilter.txx b/Modules/Detection/RoadExtraction/include/otbModulusAndDirectionImageToImageFilter.txx index 447a419f7a..aed6e93c4b 100644 --- a/Modules/Detection/RoadExtraction/include/otbModulusAndDirectionImageToImageFilter.txx +++ b/Modules/Detection/RoadExtraction/include/otbModulusAndDirectionImageToImageFilter.txx @@ -70,7 +70,7 @@ GetInput(void) { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *> @@ -86,7 +86,7 @@ GetInputDirection(void) { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImageDirection *> diff --git a/Modules/Detection/RoadExtraction/test/otbAlignImageToPath.cxx b/Modules/Detection/RoadExtraction/test/otbAlignImageToPath.cxx index 76919ef3ae..ddf7853ed3 100644 --- a/Modules/Detection/RoadExtraction/test/otbAlignImageToPath.cxx +++ b/Modules/Detection/RoadExtraction/test/otbAlignImageToPath.cxx @@ -111,7 +111,7 @@ int otbAlignImageToPath(int itkNotUsed(argc), char * argv[]) otbGenericMsgDebugMacro(<< "Writing :"); FILE *file = fopen(outputFilename, "w"); - if (file == ITK_NULLPTR) + if (file == nullptr) { fprintf(stderr, "Error, can't open file"); exit(-1); diff --git a/Modules/Detection/RoadExtraction/test/otbBreakAngularPathListFilter.cxx b/Modules/Detection/RoadExtraction/test/otbBreakAngularPathListFilter.cxx index f9bf0f1135..a14e6c6f58 100644 --- a/Modules/Detection/RoadExtraction/test/otbBreakAngularPathListFilter.cxx +++ b/Modules/Detection/RoadExtraction/test/otbBreakAngularPathListFilter.cxx @@ -48,7 +48,7 @@ int otbBreakAngularPathListFilter(int itkNotUsed(argc), char * argv[]) ++cpt; ListPoints.clear(); - while (argv[cpt] != ITK_NULLPTR) + while (argv[cpt] != nullptr) { if (argv[cpt][0] == '|') { diff --git a/Modules/Detection/RoadExtraction/test/otbLikelihoodPathListFilter.cxx b/Modules/Detection/RoadExtraction/test/otbLikelihoodPathListFilter.cxx index 23e9a9b411..93bb9433e0 100644 --- a/Modules/Detection/RoadExtraction/test/otbLikelihoodPathListFilter.cxx +++ b/Modules/Detection/RoadExtraction/test/otbLikelihoodPathListFilter.cxx @@ -42,7 +42,7 @@ int otbLikelihoodPathListFilter(int itkNotUsed(argc), char * argv[]) int cpt = 3; ListPoints.clear(); - while (argv[cpt] != ITK_NULLPTR) + while (argv[cpt] != nullptr) { if (argv[cpt][0] == '|') { diff --git a/Modules/Detection/RoadExtraction/test/otbLinkPathListFilter.cxx b/Modules/Detection/RoadExtraction/test/otbLinkPathListFilter.cxx index 07e3f54043..907974b52a 100644 --- a/Modules/Detection/RoadExtraction/test/otbLinkPathListFilter.cxx +++ b/Modules/Detection/RoadExtraction/test/otbLinkPathListFilter.cxx @@ -43,7 +43,7 @@ int otbLinkPathListFilter(int itkNotUsed(argc), char * argv[]) int cpt = 4; ListPoints.clear(); - while (argv[cpt] != ITK_NULLPTR) + while (argv[cpt] != nullptr) { if (argv[cpt][0] == '|') { diff --git a/Modules/Detection/RoadExtraction/test/otbRemoveTortuousPathListFilter.cxx b/Modules/Detection/RoadExtraction/test/otbRemoveTortuousPathListFilter.cxx index 217219e241..2c14be3ea0 100644 --- a/Modules/Detection/RoadExtraction/test/otbRemoveTortuousPathListFilter.cxx +++ b/Modules/Detection/RoadExtraction/test/otbRemoveTortuousPathListFilter.cxx @@ -38,7 +38,7 @@ int otbRemoveTortuousPathListFilter(int itkNotUsed(argc), char * argv[]) int cpt = 3; ListPoints.clear(); - while (argv[cpt] != ITK_NULLPTR) + while (argv[cpt] != nullptr) { if (argv[cpt][0] == '|') { diff --git a/Modules/Detection/RoadExtraction/test/otbSimplifyPathListFilter.cxx b/Modules/Detection/RoadExtraction/test/otbSimplifyPathListFilter.cxx index ea929a5938..f156b9beb1 100644 --- a/Modules/Detection/RoadExtraction/test/otbSimplifyPathListFilter.cxx +++ b/Modules/Detection/RoadExtraction/test/otbSimplifyPathListFilter.cxx @@ -38,7 +38,7 @@ int otbSimplifyPathListFilter(int itkNotUsed(argc), char * argv[]) int cpt = 3; ListPoints.clear(); - while (argv[cpt] != ITK_NULLPTR) + while (argv[cpt] != nullptr) { if (argv[cpt][0] == '|') { diff --git a/Modules/Feature/Descriptors/test/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx b/Modules/Feature/Descriptors/test/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx index e4d2110fb2..7b88ab646a 100644 --- a/Modules/Feature/Descriptors/test/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx +++ b/Modules/Feature/Descriptors/test/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx @@ -69,7 +69,7 @@ int otbImageToSIFTKeyPointSetFilterOutputAscii(int itkNotUsed(argc), char * argv filter->Update(); PointsIteratorType pIt = filter->GetOutput()->GetPoints()->Begin(); - if (filter->GetOutput()->GetPointData() == ITK_NULLPTR) + if (filter->GetOutput()->GetPointData() == nullptr) { std::cerr << "No sift point found!" << std::endl; return EXIT_FAILURE; //Avoid the subsequent segfault, but need to check if that what the test want to do diff --git a/Modules/Feature/Edge/include/otbHoughTransform2DLinesImageFilter.txx b/Modules/Feature/Edge/include/otbHoughTransform2DLinesImageFilter.txx index 7f8aa38e98..893e1829c7 100644 --- a/Modules/Feature/Edge/include/otbHoughTransform2DLinesImageFilter.txx +++ b/Modules/Feature/Edge/include/otbHoughTransform2DLinesImageFilter.txx @@ -53,7 +53,7 @@ HoughTransform2DLinesImageFilter<TInputPixelType, TOutputPixelType> m_Variance = 5; m_OldModifiedTime = 0; m_OldNumberOfLines = 0; - m_SimplifyAccumulator = ITK_NULLPTR; + m_SimplifyAccumulator = nullptr; } template<typename TInputPixelType, typename TOutputPixelType> diff --git a/Modules/Feature/Edge/include/otbLineDetectorImageFilterBase.txx b/Modules/Feature/Edge/include/otbLineDetectorImageFilterBase.txx index 7fb19ba39c..b5ca1a2661 100644 --- a/Modules/Feature/Edge/include/otbLineDetectorImageFilterBase.txx +++ b/Modules/Feature/Edge/include/otbLineDetectorImageFilterBase.txx @@ -293,11 +293,11 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In // Contains for the 4 directions the the pixels belonging to each zone //std::vector<double> PixelValues[NB_DIR][NB_ZONE]; // ROMAIN - std::vector<double>** PixelValues = ITK_NULLPTR; + std::vector<double>** PixelValues = nullptr; PixelValues = new std::vector<double>*[NB_DIR]; for (unsigned int i = 0; i < NB_DIR; ++i) { - PixelValues[i] = ITK_NULLPTR; + PixelValues[i] = nullptr; PixelValues[i] = new std::vector<double>[NB_ZONE]; } //otbMsgDevMacro( << "\tCentre Xc/Yc="<<Xc<<" "<<Yc<<" Yc12/Yc13="<<Yc12<<" "<<Yc13); @@ -380,10 +380,10 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In for (unsigned int i = 0; i < NB_DIR; ++i) { delete[] PixelValues[i]; - PixelValues[i] = ITK_NULLPTR; + PixelValues[i] = nullptr; } delete[] PixelValues; - PixelValues = ITK_NULLPTR; + PixelValues = nullptr; } } diff --git a/Modules/Feature/Edge/include/otbLineSegmentDetector.txx b/Modules/Feature/Edge/include/otbLineSegmentDetector.txx index 2ce4b86e14..b2a181823a 100644 --- a/Modules/Feature/Edge/include/otbLineSegmentDetector.txx +++ b/Modules/Feature/Edge/include/otbLineSegmentDetector.txx @@ -80,7 +80,7 @@ LineSegmentDetector<TInputImage, TPrecision> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageType *>(this->Superclass::GetInput(0)); diff --git a/Modules/Feature/Edge/include/otbPixelSuppressionByDirectionImageFilter.txx b/Modules/Feature/Edge/include/otbPixelSuppressionByDirectionImageFilter.txx index 464f273b6f..807a04901c 100644 --- a/Modules/Feature/Edge/include/otbPixelSuppressionByDirectionImageFilter.txx +++ b/Modules/Feature/Edge/include/otbPixelSuppressionByDirectionImageFilter.txx @@ -72,7 +72,7 @@ PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *> @@ -87,7 +87,7 @@ PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *> diff --git a/Modules/Feature/Textures/include/otbSFSTexturesImageFilter.txx b/Modules/Feature/Textures/include/otbSFSTexturesImageFilter.txx index 94d87f2ae5..c52d07d491 100644 --- a/Modules/Feature/Textures/include/otbSFSTexturesImageFilter.txx +++ b/Modules/Feature/Textures/include/otbSFSTexturesImageFilter.txx @@ -79,7 +79,7 @@ SFSTexturesImageFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } if (this->GetTexturesStatus()[0] == false) { @@ -111,7 +111,7 @@ SFSTexturesImageFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } if (this->GetTexturesStatus()[1] == false) { @@ -143,7 +143,7 @@ SFSTexturesImageFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 3) { - return ITK_NULLPTR; + return nullptr; } if (this->GetTexturesStatus()[2] == false) { @@ -176,7 +176,7 @@ SFSTexturesImageFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 4) { - return ITK_NULLPTR; + return nullptr; } if (this->GetTexturesStatus()[3] == false) { @@ -208,7 +208,7 @@ SFSTexturesImageFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 5) { - return ITK_NULLPTR; + return nullptr; } if (this->GetTexturesStatus()[4] == false) { @@ -240,7 +240,7 @@ SFSTexturesImageFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 6) { - return ITK_NULLPTR; + return nullptr; } if (this->GetTexturesStatus()[5] == false) { diff --git a/Modules/Feature/Textures/include/otbScalarImageToAdvancedTexturesFilter.txx b/Modules/Feature/Textures/include/otbScalarImageToAdvancedTexturesFilter.txx index 43ab8ca08e..447170e096 100644 --- a/Modules/Feature/Textures/include/otbScalarImageToAdvancedTexturesFilter.txx +++ b/Modules/Feature/Textures/include/otbScalarImageToAdvancedTexturesFilter.txx @@ -74,7 +74,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(0)); } @@ -87,7 +87,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(1)); } @@ -100,7 +100,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(2)); } @@ -113,7 +113,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 4) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(3)); } @@ -126,7 +126,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 5) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(4)); } @@ -139,7 +139,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 6) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(5)); } @@ -152,7 +152,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 7) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(6)); } @@ -165,7 +165,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 8) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(7)); } @@ -178,7 +178,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 9) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(8)); } @@ -191,7 +191,7 @@ ScalarImageToAdvancedTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 10) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(9)); } diff --git a/Modules/Feature/Textures/include/otbScalarImageToHigherOrderTexturesFilter.txx b/Modules/Feature/Textures/include/otbScalarImageToHigherOrderTexturesFilter.txx index 9c7aed6895..8ca02b8e89 100644 --- a/Modules/Feature/Textures/include/otbScalarImageToHigherOrderTexturesFilter.txx +++ b/Modules/Feature/Textures/include/otbScalarImageToHigherOrderTexturesFilter.txx @@ -93,7 +93,7 @@ ScalarImageToHigherOrderTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(0)); } @@ -106,7 +106,7 @@ ScalarImageToHigherOrderTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(1)); } @@ -119,7 +119,7 @@ ScalarImageToHigherOrderTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(2)); } @@ -132,7 +132,7 @@ ScalarImageToHigherOrderTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 4) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(3)); } @@ -145,7 +145,7 @@ ScalarImageToHigherOrderTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 5) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(4)); } @@ -158,7 +158,7 @@ ScalarImageToHigherOrderTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 6) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(5)); } @@ -171,7 +171,7 @@ ScalarImageToHigherOrderTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 7) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(6)); } @@ -184,7 +184,7 @@ ScalarImageToHigherOrderTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 8) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(7)); } @@ -197,7 +197,7 @@ ScalarImageToHigherOrderTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 9) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(8)); } @@ -210,7 +210,7 @@ ScalarImageToHigherOrderTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 10) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(9)); } @@ -223,7 +223,7 @@ ScalarImageToHigherOrderTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 11) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(10)); } diff --git a/Modules/Feature/Textures/include/otbScalarImageToTexturesFilter.txx b/Modules/Feature/Textures/include/otbScalarImageToTexturesFilter.txx index e7473f705a..229dd4da1f 100644 --- a/Modules/Feature/Textures/include/otbScalarImageToTexturesFilter.txx +++ b/Modules/Feature/Textures/include/otbScalarImageToTexturesFilter.txx @@ -75,7 +75,7 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(0)); } @@ -88,7 +88,7 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(1)); } @@ -101,7 +101,7 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(2)); } @@ -114,7 +114,7 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 4) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(3)); } @@ -127,7 +127,7 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 5) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(4)); } @@ -140,7 +140,7 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 6) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(5)); } @@ -153,7 +153,7 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 7) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(6)); } @@ -166,7 +166,7 @@ ScalarImageToTexturesFilter<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 8) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->GetOutput(7)); } diff --git a/Modules/Feature/Textures/test/otbScalarImageToHigherOrderTexturesFilter.cxx b/Modules/Feature/Textures/test/otbScalarImageToHigherOrderTexturesFilter.cxx index 800e721192..8c6a7a2623 100644 --- a/Modules/Feature/Textures/test/otbScalarImageToHigherOrderTexturesFilter.cxx +++ b/Modules/Feature/Textures/test/otbScalarImageToHigherOrderTexturesFilter.cxx @@ -221,15 +221,15 @@ int otbScalarImageToHigherOrderTexturesFilter(int argc, char * argv[]) std::cout << "Testing radius = " << radius << " and default offsets" << std::endl; ImageType::Pointer inputImage = ReadInputImage(infname); - std::vector<ImageType::Pointer> results = Compute(inputImage, nbBins, radius, ITK_NULLPTR); + std::vector<ImageType::Pointer> results = Compute(inputImage, nbBins, radius, nullptr); - if ( ValidateAt(inputImage, results, nbBins, radius, ITK_NULLPTR, 7, 11) == EXIT_FAILURE ) + if ( ValidateAt(inputImage, results, nbBins, radius, nullptr, 7, 11) == EXIT_FAILURE ) return EXIT_FAILURE; - if ( ValidateAt(inputImage, results, nbBins, radius, ITK_NULLPTR, 5, 5) == EXIT_FAILURE ) + if ( ValidateAt(inputImage, results, nbBins, radius, nullptr, 5, 5) == EXIT_FAILURE ) return EXIT_FAILURE; - if ( ValidateAt(inputImage, results, nbBins, radius, ITK_NULLPTR, 7, 11) == EXIT_FAILURE ) + if ( ValidateAt(inputImage, results, nbBins, radius, nullptr, 7, 11) == EXIT_FAILURE ) return EXIT_FAILURE; - if ( ValidateAt(inputImage, results, nbBins, radius, ITK_NULLPTR, 10, 5) == EXIT_FAILURE ) + if ( ValidateAt(inputImage, results, nbBins, radius, nullptr, 10, 5) == EXIT_FAILURE ) return EXIT_FAILURE; } diff --git a/Modules/Filtering/ChangeDetection/include/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx b/Modules/Filtering/ChangeDetection/include/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx index 5fc70d7fae..8cc83055d0 100644 --- a/Modules/Filtering/ChangeDetection/include/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx +++ b/Modules/Filtering/ChangeDetection/include/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx @@ -77,7 +77,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage1 *>(this->itk::ProcessObject::GetInput(0)); } @@ -90,7 +90,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage2 *>(this->itk::ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/ChangeDetection/include/otbKullbackLeiblerSupervizedDistanceImageFilter.txx b/Modules/Filtering/ChangeDetection/include/otbKullbackLeiblerSupervizedDistanceImageFilter.txx index db7fda1ccb..58c8485b23 100644 --- a/Modules/Filtering/ChangeDetection/include/otbKullbackLeiblerSupervizedDistanceImageFilter.txx +++ b/Modules/Filtering/ChangeDetection/include/otbKullbackLeiblerSupervizedDistanceImageFilter.txx @@ -35,8 +35,8 @@ template <class TInput1, class TInput2, class TInputROIImage, class TOutput> KullbackLeiblerSupervizedDistance<TInput1, TInput2, TInputROIImage, TOutput> ::KullbackLeiblerSupervizedDistance () { - m_CumROI1 = ITK_NULLPTR; - m_CumROI2 = ITK_NULLPTR; + m_CumROI1 = nullptr; + m_CumROI2 = nullptr; } template <class TInput1, class TInput2, class TInputROIImage, class TOutput> @@ -44,10 +44,10 @@ KullbackLeiblerSupervizedDistance<TInput1, TInput2, TInputROIImage, TOutput> ::~KullbackLeiblerSupervizedDistance () { delete m_CumROI1; - m_CumROI1 = ITK_NULLPTR; + m_CumROI1 = nullptr; delete m_CumROI2; - m_CumROI2 = ITK_NULLPTR; + m_CumROI2 = nullptr; } template <class TInput1, class TInput2, class TInputROIImage, class TOutput> @@ -68,7 +68,7 @@ KullbackLeiblerSupervizedDistance<TInput1, TInput2, TInputROIImage, TOutput> conversion1->SetROIImage(imgROI); conversion1->Update(); - if (m_CumROI1 != ITK_NULLPTR) delete m_CumROI1; + if (m_CumROI1 != nullptr) delete m_CumROI1; m_CumROI1 = new CumulantsForEdgeworth<ROIInputType1> (conversion1->GetOutput()); @@ -91,7 +91,7 @@ KullbackLeiblerSupervizedDistance<TInput1, TInput2, TInputROIImage, TOutput> conversion2->SetROIImage(imgROI); conversion2->Update(); - if (m_CumROI2 != ITK_NULLPTR) delete m_CumROI2; + if (m_CumROI2 != nullptr) delete m_CumROI2; m_CumROI2 = new CumulantsForEdgeworth<ROIInputType2> (conversion2->GetOutput()); diff --git a/Modules/Filtering/ChangeDetection/include/otbMultivariateAlterationDetectorImageFilter.txx b/Modules/Filtering/ChangeDetection/include/otbMultivariateAlterationDetectorImageFilter.txx index 37f0da21e0..6506c91cca 100644 --- a/Modules/Filtering/ChangeDetection/include/otbMultivariateAlterationDetectorImageFilter.txx +++ b/Modules/Filtering/ChangeDetection/include/otbMultivariateAlterationDetectorImageFilter.txx @@ -57,7 +57,7 @@ MultivariateAlterationDetectorImageFilter<TInputImage, TOutputImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(0)); } @@ -79,7 +79,7 @@ MultivariateAlterationDetectorImageFilter<TInputImage, TOutputImage> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionBinaryImageFilter.txx b/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionBinaryImageFilter.txx index 684440ec52..bd4ee67c12 100644 --- a/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionBinaryImageFilter.txx +++ b/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionBinaryImageFilter.txx @@ -59,7 +59,7 @@ AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision > { if ( this->GetNumberOfInputs() < 1 ) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage * > (this->itk::ProcessObject::GetInput(0) ); @@ -72,7 +72,7 @@ AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision > { if ( this->GetNumberOfInputs() < 2 ) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage * > (this->itk::ProcessObject::GetInput(1)); diff --git a/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionImageFilter.txx b/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionImageFilter.txx index 18dc435a33..bb9195c9c0 100644 --- a/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionImageFilter.txx +++ b/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionImageFilter.txx @@ -53,7 +53,7 @@ AngularProjectionImageFilter< TInputImage, TOutputImage, TAngleArray, TPrecision { if ( i >= this->GetNumberOfInputs() ) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageType * > diff --git a/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionSetImageFilter.txx b/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionSetImageFilter.txx index 7199f92469..7bbda45c4f 100644 --- a/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionSetImageFilter.txx +++ b/Modules/Filtering/DimensionalityReduction/include/otbAngularProjectionSetImageFilter.txx @@ -56,7 +56,7 @@ AngularProjectionSetImageFilter< TInputImage, TOutputImage, TAngleList, TPrecisi { if ( i >= this->GetNumberOfInputs() ) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageType * > diff --git a/Modules/Filtering/DimensionalityReduction/include/otbSparseWvltToAngleMapperListFilter.txx b/Modules/Filtering/DimensionalityReduction/include/otbSparseWvltToAngleMapperListFilter.txx index c00855d896..70a12f8d31 100644 --- a/Modules/Filtering/DimensionalityReduction/include/otbSparseWvltToAngleMapperListFilter.txx +++ b/Modules/Filtering/DimensionalityReduction/include/otbSparseWvltToAngleMapperListFilter.txx @@ -58,7 +58,7 @@ SparseWvltToAngleMapperListFilter< TInputImageList, TOutputSampleList, VNbInputI { if ( i >= this->GetNumberOfInputs() ) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageListType * > diff --git a/Modules/Filtering/ImageManipulation/include/otbBinaryFunctorNeighborhoodImageFilter.txx b/Modules/Filtering/ImageManipulation/include/otbBinaryFunctorNeighborhoodImageFilter.txx index 208fcf06ab..a451d910ef 100644 --- a/Modules/Filtering/ImageManipulation/include/otbBinaryFunctorNeighborhoodImageFilter.txx +++ b/Modules/Filtering/ImageManipulation/include/otbBinaryFunctorNeighborhoodImageFilter.txx @@ -75,7 +75,7 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1, TInputImage2, TOutputImage, T { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage1 *>(this->itk::ProcessObject::GetInput(0)); } @@ -88,7 +88,7 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1, TInputImage2, TOutputImage, T { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage2 *>(this->itk::ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/ImageManipulation/include/otbChangeInformationImageFilter.txx b/Modules/Filtering/ImageManipulation/include/otbChangeInformationImageFilter.txx index 83f2c74772..c4453be608 100644 --- a/Modules/Filtering/ImageManipulation/include/otbChangeInformationImageFilter.txx +++ b/Modules/Filtering/ImageManipulation/include/otbChangeInformationImageFilter.txx @@ -78,7 +78,7 @@ ChangeInformationImageFilter<TInputImage> // enable this key for metadata change m_ChangedKeys.insert(key); itk::MetaDataDictionary &dict = this->GetMetaDataDictionary(); - if (value == ITK_NULLPTR) + if (value == nullptr) { // Remove meta-data from dictionary dict.Erase(key); diff --git a/Modules/Filtering/ImageManipulation/include/otbGridResampleImageFilter.txx b/Modules/Filtering/ImageManipulation/include/otbGridResampleImageFilter.txx index dced764cd8..a8cad22025 100644 --- a/Modules/Filtering/ImageManipulation/include/otbGridResampleImageFilter.txx +++ b/Modules/Filtering/ImageManipulation/include/otbGridResampleImageFilter.txx @@ -388,7 +388,7 @@ GridResampleImageFilter<TInputImage, TOutputImage, TInterpolatorPrecision> ::AfterThreadedGenerateData() { // Disconnect input image from the interpolator - m_Interpolator->SetInputImage(ITK_NULLPTR); + m_Interpolator->SetInputImage(nullptr); } diff --git a/Modules/Filtering/ImageManipulation/include/otbMaskedIteratorDecorator.txx b/Modules/Filtering/ImageManipulation/include/otbMaskedIteratorDecorator.txx index c00a8c1090..24ab50bd2a 100644 --- a/Modules/Filtering/ImageManipulation/include/otbMaskedIteratorDecorator.txx +++ b/Modules/Filtering/ImageManipulation/include/otbMaskedIteratorDecorator.txx @@ -34,7 +34,7 @@ MaskedIteratorDecorator<TIteratorType,TMaskIteratorType> const RegionType& region) { m_ItImage = TIteratorType(image,region); - if (mask == ITK_NULLPTR) + if (mask == nullptr) { m_UseMask = false; } diff --git a/Modules/Filtering/ImageManipulation/include/otbPrintableImageFilter.txx b/Modules/Filtering/ImageManipulation/include/otbPrintableImageFilter.txx index 91f60a73be..fb17ea44e7 100644 --- a/Modules/Filtering/ImageManipulation/include/otbPrintableImageFilter.txx +++ b/Modules/Filtering/ImageManipulation/include/otbPrintableImageFilter.txx @@ -81,7 +81,7 @@ PrintableImageFilter<TInputImage, TMaskImage> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<MaskImageType *>(this->itk::ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/ImageManipulation/include/otbStreamingMatrixTransposeMatrixImageFilter.h b/Modules/Filtering/ImageManipulation/include/otbStreamingMatrixTransposeMatrixImageFilter.h index f79ead12bb..732265ffd4 100644 --- a/Modules/Filtering/ImageManipulation/include/otbStreamingMatrixTransposeMatrixImageFilter.h +++ b/Modules/Filtering/ImageManipulation/include/otbStreamingMatrixTransposeMatrixImageFilter.h @@ -149,7 +149,7 @@ public: { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } else return (static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(0))); } @@ -158,7 +158,7 @@ public: { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } else return (static_cast<const TInputImage2 *>(this->itk::ProcessObject::GetInput(1))); } diff --git a/Modules/Filtering/ImageManipulation/test/otbChangeInformationImageFilter.cxx b/Modules/Filtering/ImageManipulation/test/otbChangeInformationImageFilter.cxx index 55c1312ea6..7804c34491 100644 --- a/Modules/Filtering/ImageManipulation/test/otbChangeInformationImageFilter.cxx +++ b/Modules/Filtering/ImageManipulation/test/otbChangeInformationImageFilter.cxx @@ -39,7 +39,7 @@ int otbChangeInformationImageFilter(int itkNotUsed(argc), char * argv[]) std::string newProj("Fake ProjRef"); filter->SetOutputMetaData<std::string>(otb::MetaDataKey::ProjectionRefKey,&newProj); // erase that choice - filter->SetOutputMetaData<std::string>(otb::MetaDataKey::ProjectionRefKey,ITK_NULLPTR); + filter->SetOutputMetaData<std::string>(otb::MetaDataKey::ProjectionRefKey,nullptr); // add a no data to the image std::vector<bool> flags; flags.push_back(true); diff --git a/Modules/Filtering/ImageManipulation/test/otbMaskedIteratorDecorator.cxx b/Modules/Filtering/ImageManipulation/test/otbMaskedIteratorDecorator.cxx index 9bc9baa3f7..9f3362d1d4 100644 --- a/Modules/Filtering/ImageManipulation/test/otbMaskedIteratorDecorator.cxx +++ b/Modules/Filtering/ImageManipulation/test/otbMaskedIteratorDecorator.cxx @@ -348,12 +348,12 @@ int otbMaskedIteratorDecoratorExtended(int itkNotUsed(argc), char * itkNotUsed(a std::cout << std::endl << "itk::ImageRegionIterator without mask: "; ret = TripleTest< itk::ImageRegionIterator<ImageType>, - itk::ImageRegionIterator<MaskType> >(image, ITK_NULLPTR, region); + itk::ImageRegionIterator<MaskType> >(image, nullptr, region); retGlobal = (ret == EXIT_FAILURE ? EXIT_FAILURE : retGlobal); std::cout << std::endl << "itk::ImageRegionConstIterator without mask: "; ret = TripleTest< itk::ImageRegionConstIterator<ImageType>, - itk::ImageRegionConstIterator<MaskType> >(image, ITK_NULLPTR, region); + itk::ImageRegionConstIterator<MaskType> >(image, nullptr, region); retGlobal = (ret == EXIT_FAILURE ? EXIT_FAILURE : retGlobal); return retGlobal; diff --git a/Modules/Filtering/ImageManipulation/test/otbRegionProjectionResampler.cxx b/Modules/Filtering/ImageManipulation/test/otbRegionProjectionResampler.cxx index 99febb9d6f..13b1415613 100644 --- a/Modules/Filtering/ImageManipulation/test/otbRegionProjectionResampler.cxx +++ b/Modules/Filtering/ImageManipulation/test/otbRegionProjectionResampler.cxx @@ -110,8 +110,8 @@ int otbRegionProjectionResampler(int argc, char* argv[]) spacing[0] = atof(argv[8]); spacing[1] = atof(argv[9]); - origin[0] = strtod(argv[3], ITK_NULLPTR); // origin longitude. - origin[1] = strtod(argv[4], ITK_NULLPTR); // origin latitude. + origin[0] = strtod(argv[3], nullptr); // origin longitude. + origin[1] = strtod(argv[4], nullptr); // origin latitude. otbGenericMsgDebugMacro(<< "Origin " << origin); diff --git a/Modules/Filtering/Path/include/otbDrawPathListFilter.txx b/Modules/Filtering/Path/include/otbDrawPathListFilter.txx index 1570557847..364d284cc2 100644 --- a/Modules/Filtering/Path/include/otbDrawPathListFilter.txx +++ b/Modules/Filtering/Path/include/otbDrawPathListFilter.txx @@ -59,7 +59,7 @@ DrawPathListFilter<TInputImage, TInputPath, TOutputImage> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputPathListType *>(this->ProcessObjectType::GetInput(1)); } diff --git a/Modules/Filtering/Path/include/otbImageFittingPolygonListFilter.txx b/Modules/Filtering/Path/include/otbImageFittingPolygonListFilter.txx index 681f9d977f..2b7fa336c2 100644 --- a/Modules/Filtering/Path/include/otbImageFittingPolygonListFilter.txx +++ b/Modules/Filtering/Path/include/otbImageFittingPolygonListFilter.txx @@ -56,7 +56,7 @@ ImageFittingPolygonListFilter<TPath, TImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const ImageType *>(this->itk::ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/Path/include/otbImageToPathListFilter.txx b/Modules/Filtering/Path/include/otbImageToPathListFilter.txx index 5d18ff591d..21d3cfd9d6 100644 --- a/Modules/Filtering/Path/include/otbImageToPathListFilter.txx +++ b/Modules/Filtering/Path/include/otbImageToPathListFilter.txx @@ -61,7 +61,7 @@ ImageToPathListFilter<TInputImage, TOutputPath> if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *> diff --git a/Modules/Filtering/Path/include/otbPathFunction.txx b/Modules/Filtering/Path/include/otbPathFunction.txx index 676378ca1b..739e2809b0 100644 --- a/Modules/Filtering/Path/include/otbPathFunction.txx +++ b/Modules/Filtering/Path/include/otbPathFunction.txx @@ -33,7 +33,7 @@ template <class TInputPath, class TOutput> PathFunction<TInputPath, TOutput> ::PathFunction() { - m_Path = ITK_NULLPTR; + m_Path = nullptr; } /** diff --git a/Modules/Filtering/Path/include/otbPathListToHistogramGenerator.txx b/Modules/Filtering/Path/include/otbPathListToHistogramGenerator.txx index 5c2e0d3ea3..32f6f0ae8f 100644 --- a/Modules/Filtering/Path/include/otbPathListToHistogramGenerator.txx +++ b/Modules/Filtering/Path/include/otbPathListToHistogramGenerator.txx @@ -56,7 +56,7 @@ PathListToHistogramGenerator<TPath, TFunction> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const PathListType* > (this->itk::ProcessObject::GetInput(0) ); diff --git a/Modules/Filtering/Path/include/otbVectorizationPathListFilter.txx b/Modules/Filtering/Path/include/otbVectorizationPathListFilter.txx index 772a97811e..37ea20dc86 100644 --- a/Modules/Filtering/Path/include/otbVectorizationPathListFilter.txx +++ b/Modules/Filtering/Path/include/otbVectorizationPathListFilter.txx @@ -55,7 +55,7 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputModulus*>(this->itk::ProcessObject::GetInput(0)); } @@ -76,7 +76,7 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputDirection *>(this->itk::ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/Path/test/otbRegionImageToRectangularPathListFilter.cxx b/Modules/Filtering/Path/test/otbRegionImageToRectangularPathListFilter.cxx index 6bb92987e7..db98c84985 100644 --- a/Modules/Filtering/Path/test/otbRegionImageToRectangularPathListFilter.cxx +++ b/Modules/Filtering/Path/test/otbRegionImageToRectangularPathListFilter.cxx @@ -65,7 +65,7 @@ int otbRegionImageToRectangularPathListFilter(int itkNotUsed(argc), char * argv[ ListType::Iterator listIt = pathList->Begin(); FILE *file = fopen(outputFilename, "w"); - if (file == ITK_NULLPTR) + if (file == nullptr) { fprintf(stderr, "Error, can't open file"); exit(-1); diff --git a/Modules/Filtering/Polarimetry/test/otbMultiChannelsPolarimetricSynthesisFilter.cxx b/Modules/Filtering/Polarimetry/test/otbMultiChannelsPolarimetricSynthesisFilter.cxx index a2b1936dcd..7cf722d5d4 100644 --- a/Modules/Filtering/Polarimetry/test/otbMultiChannelsPolarimetricSynthesisFilter.cxx +++ b/Modules/Filtering/Polarimetry/test/otbMultiChannelsPolarimetricSynthesisFilter.cxx @@ -37,10 +37,10 @@ int otbMultiChannelsPolarimetricSynthesisFilter(int itkNotUsed(argc), char * arg const char * outputFilename = argv[4]; - double PsiI = strtod(argv[5], ITK_NULLPTR); - double KhiI = strtod(argv[6], ITK_NULLPTR); - double PsiR = strtod(argv[7], ITK_NULLPTR); - double KhiR = strtod(argv[8], ITK_NULLPTR); + double PsiI = strtod(argv[5], nullptr); + double KhiI = strtod(argv[6], nullptr); + double PsiR = strtod(argv[7], nullptr); + double KhiR = strtod(argv[8], nullptr); typedef std::complex <double> InputPixelType; typedef double OutputPixelType; diff --git a/Modules/Filtering/Polarimetry/test/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx b/Modules/Filtering/Polarimetry/test/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx index aeb1f99209..51e9678959 100644 --- a/Modules/Filtering/Polarimetry/test/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx +++ b/Modules/Filtering/Polarimetry/test/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx @@ -34,10 +34,10 @@ int otbVectorMultiChannelsPolarimetricSynthesisFilter(int itkNotUsed(argc), char const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - double PsiI = strtod(argv[3], ITK_NULLPTR); - double KhiI = strtod(argv[4], ITK_NULLPTR); - double PsiR = strtod(argv[5], ITK_NULLPTR); - double KhiR = strtod(argv[6], ITK_NULLPTR); + double PsiI = strtod(argv[3], nullptr); + double KhiI = strtod(argv[4], nullptr); + double PsiR = strtod(argv[5], nullptr); + double KhiR = strtod(argv[6], nullptr); typedef std::complex <double> InputPixelType; typedef double OutputPixelType; diff --git a/Modules/Filtering/Projection/include/otbGenericRSResampleImageFilter.txx b/Modules/Filtering/Projection/include/otbGenericRSResampleImageFilter.txx index ee70f41a72..1743cdb354 100644 --- a/Modules/Filtering/Projection/include/otbGenericRSResampleImageFilter.txx +++ b/Modules/Filtering/Projection/include/otbGenericRSResampleImageFilter.txx @@ -298,12 +298,12 @@ GenericRSResampleImageFilter<TInputImage, TOutputImage> bool hem = (geoPoint[1]>1e-10)?true:false; // Build the output UTM projection ref - OGRSpatialReferenceH oSRS = OSRNewSpatialReference(ITK_NULLPTR); + OGRSpatialReferenceH oSRS = OSRNewSpatialReference(nullptr); OSRSetProjCS(oSRS, "UTM"); OSRSetWellKnownGeogCS(oSRS, "WGS84"); OSRSetUTM(oSRS, zone, hem); - char * utmRefC = ITK_NULLPTR; + char * utmRefC = nullptr; OSRExportToWkt(oSRS, &utmRefC); projectionRef = utmRefC; diff --git a/Modules/Filtering/Projection/include/otbGeometriesProjectionFilter.txx b/Modules/Filtering/Projection/include/otbGeometriesProjectionFilter.txx index 425b2adbe8..6a492cacdb 100644 --- a/Modules/Filtering/Projection/include/otbGeometriesProjectionFilter.txx +++ b/Modules/Filtering/Projection/include/otbGeometriesProjectionFilter.txx @@ -37,7 +37,7 @@ otb::ogr::UniqueGeometryPtr otb::internal::ReprojectTransformationFunctor::ByCopy::operator()(TGeometry const* in) const { boost::interprocess::unique_ptr<TGeometry, ogr::internal::GeometryDeleter> - out(in ? static_cast <TGeometry*>(in->clone()) : ITK_NULLPTR); // OGR clone doesn't use covariant return ... + out(in ? static_cast <TGeometry*>(in->clone()) : nullptr); // OGR clone doesn't use covariant return ... if (out) m_Reprojector.do_transform(*out); ogr::UniqueGeometryPtr res(out.release()); diff --git a/Modules/Filtering/Projection/include/otbImageToEnvelopeVectorDataFilter.txx b/Modules/Filtering/Projection/include/otbImageToEnvelopeVectorDataFilter.txx index e47d831beb..bbacb2321b 100644 --- a/Modules/Filtering/Projection/include/otbImageToEnvelopeVectorDataFilter.txx +++ b/Modules/Filtering/Projection/include/otbImageToEnvelopeVectorDataFilter.txx @@ -57,7 +57,7 @@ const TInputImage * ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData> ::GetInput(void) { - if (this->GetNumberOfInputs() < 1) return ITK_NULLPTR; + if (this->GetNumberOfInputs() < 1) return nullptr; return dynamic_cast<const InputImageType*> (this->itk::ProcessObject::GetInput(0)); diff --git a/Modules/Filtering/Projection/include/otbOrthoRectificationFilter.txx b/Modules/Filtering/Projection/include/otbOrthoRectificationFilter.txx index a872efdd92..f085c66b2a 100644 --- a/Modules/Filtering/Projection/include/otbOrthoRectificationFilter.txx +++ b/Modules/Filtering/Projection/include/otbOrthoRectificationFilter.txx @@ -29,7 +29,7 @@ namespace otb template <class TInputImage, class TOutputImage, class TMapProjection, class TInterpolatorPrecision> OrthoRectificationFilter<TInputImage, TOutputImage, TMapProjection, TInterpolatorPrecision> -::OrthoRectificationFilter(): m_MapProjection(ITK_NULLPTR) +::OrthoRectificationFilter(): m_MapProjection(nullptr) {} template <class TInputImage, class TOutputImage, class TMapProjection, class TInterpolatorPrecision> diff --git a/Modules/Filtering/Projection/include/otbVectorDataTransformFilter.txx b/Modules/Filtering/Projection/include/otbVectorDataTransformFilter.txx index 2ab6aac53f..a134de82df 100644 --- a/Modules/Filtering/Projection/include/otbVectorDataTransformFilter.txx +++ b/Modules/Filtering/Projection/include/otbVectorDataTransformFilter.txx @@ -41,7 +41,7 @@ VectorDataTransformFilter<TInputVectorData, TOutputVectorData> // use the otb::Transform or we loose the capability of using all the existing // itk transform, so we just keep it as NULL and you have to be careful not // to burn yourself when using it. - m_Transform = ITK_NULLPTR; + m_Transform = nullptr; } /** diff --git a/Modules/Filtering/Projection/src/otbGeometriesProjectionFilter.cxx b/Modules/Filtering/Projection/src/otbGeometriesProjectionFilter.cxx index cb28af8590..4dcf3c8ad2 100644 --- a/Modules/Filtering/Projection/src/otbGeometriesProjectionFilter.cxx +++ b/Modules/Filtering/Projection/src/otbGeometriesProjectionFilter.cxx @@ -219,7 +219,7 @@ OGRSpatialReference* otb::GeometriesProjectionFilter::DoDefineNewLayerSpatialRef } else { - return ITK_NULLPTR; + return nullptr; } } diff --git a/Modules/Filtering/Projection/test/otbGCPsToRPCSensorModelImageFilterAndOrtho.cxx b/Modules/Filtering/Projection/test/otbGCPsToRPCSensorModelImageFilterAndOrtho.cxx index b1ea7fb5eb..45b9380d13 100644 --- a/Modules/Filtering/Projection/test/otbGCPsToRPCSensorModelImageFilterAndOrtho.cxx +++ b/Modules/Filtering/Projection/test/otbGCPsToRPCSensorModelImageFilterAndOrtho.cxx @@ -110,8 +110,8 @@ int otbGCPsToRPCSensorModelImageFilterAndOrtho(int argc, char* argv[]) orthoRectifFilter->SetOutputSpacing(spacing); ImageType::PointType origin; - origin[0] = strtod(argv[3], ITK_NULLPTR); //Origin easting - origin[1] = strtod(argv[4], ITK_NULLPTR); //Origin northing + origin[0] = strtod(argv[3], nullptr); //Origin easting + origin[1] = strtod(argv[4], nullptr); //Origin northing orthoRectifFilter->SetOutputOrigin(origin); utmMapProjection->SetZone(atoi(argv[9])); diff --git a/Modules/Filtering/Projection/test/otbGenericRSResampleImageFilter.cxx b/Modules/Filtering/Projection/test/otbGenericRSResampleImageFilter.cxx index 7d2f44a535..0873af5c24 100644 --- a/Modules/Filtering/Projection/test/otbGenericRSResampleImageFilter.cxx +++ b/Modules/Filtering/Projection/test/otbGenericRSResampleImageFilter.cxx @@ -88,7 +88,7 @@ int otbGenericRSResampleImageFilter(int itkNotUsed(argc), char* argv[]) OGRSpatialReference oSRS; oSRS.SetProjCS("UTM"); oSRS.SetUTM(31, true); - char * utmRef = ITK_NULLPTR; + char * utmRef = nullptr; oSRS.exportToWkt(&utmRef); // Displacement Field spacing diff --git a/Modules/Filtering/Projection/test/otbGenericRSTransformFromImage.cxx b/Modules/Filtering/Projection/test/otbGenericRSTransformFromImage.cxx index 011c61e02e..ca424402ad 100644 --- a/Modules/Filtering/Projection/test/otbGenericRSTransformFromImage.cxx +++ b/Modules/Filtering/Projection/test/otbGenericRSTransformFromImage.cxx @@ -59,7 +59,7 @@ int otbGenericRSTransformFromImage(int itkNotUsed(argc), char* argv[]) // Build wgs ref OGRSpatialReference oSRS; oSRS.SetWellKnownGeogCS("WGS84"); - char * wgsRef = ITK_NULLPTR; + char * wgsRef = nullptr; oSRS.exportToWkt(&wgsRef); // Instantiate WGS->Image transform @@ -109,7 +109,7 @@ int otbGenericRSTransformImageAndMNTToWGS84ConversionChecking(int itkNotUsed(arg // Build wgs ref OGRSpatialReference oSRS; oSRS.SetWellKnownGeogCS("WGS84"); - char * wgsRef = ITK_NULLPTR; + char * wgsRef = nullptr; oSRS.exportToWkt(&wgsRef); DistanceType::Pointer distance = DistanceType::New(); diff --git a/Modules/Filtering/Projection/test/otbOrthoRectificationFilter.cxx b/Modules/Filtering/Projection/test/otbOrthoRectificationFilter.cxx index b8cf511f5d..2939b824f3 100644 --- a/Modules/Filtering/Projection/test/otbOrthoRectificationFilter.cxx +++ b/Modules/Filtering/Projection/test/otbOrthoRectificationFilter.cxx @@ -115,8 +115,8 @@ int otbOrthoRectificationFilter(int argc, char* argv[]) orthoRectifFilter->SetOutputSpacing(spacing); VectorImageType::PointType origin; - origin[0] = strtod(argv[3], ITK_NULLPTR); //Origin easting - origin[1] = strtod(argv[4], ITK_NULLPTR); //Origin northing + origin[0] = strtod(argv[3], nullptr); //Origin easting + origin[1] = strtod(argv[4], nullptr); //Origin northing orthoRectifFilter->SetOutputOrigin(origin); utmMapProjection->SetZone(atoi(argv[9])); diff --git a/Modules/Filtering/Projection/test/otbSensorModel.cxx b/Modules/Filtering/Projection/test/otbSensorModel.cxx index ebcf057705..6f9aad30e8 100644 --- a/Modules/Filtering/Projection/test/otbSensorModel.cxx +++ b/Modules/Filtering/Projection/test/otbSensorModel.cxx @@ -68,11 +68,11 @@ int produceGCP(char * outputgcpfilename, const otb::ImageKeywordlist& kwlist, bo kwlist.convertToOSSIMKeywordlist(ossimKwlist); ossimProjection* ossimSensorModel = ossimSensorModelFactory::instance()->createProjection(ossimKwlist); - if (ossimSensorModel == ITK_NULLPTR) + if (ossimSensorModel == nullptr) { ossimSensorModel = ossimplugins::ossimPluginProjectionFactory::instance()->createProjection(ossimKwlist); } - if (ossimSensorModel == ITK_NULLPTR) // Model validity + if (ossimSensorModel == nullptr) // Model validity { std::cerr << "Invalid sensor model (ossimSensorModel is NULL)" << std::endl; return EXIT_FAILURE; @@ -219,7 +219,7 @@ int otbSensorModel(int argc, char* argv[]) // Build wgs ref OGRSpatialReference oSRS; oSRS.SetWellKnownGeogCS("WGS84"); - char * wgsRef = ITK_NULLPTR; + char * wgsRef = nullptr; oSRS.exportToWkt(&wgsRef); typedef otb::GenericRSTransform<> GRSTransformType; @@ -254,11 +254,11 @@ int otbSensorModel(int argc, char* argv[]) kwlist.convertToOSSIMKeywordlist(ossimKwlist); ossimProjection* ossimSensorModel = ossimSensorModelFactory::instance()->createProjection(ossimKwlist); - if (ossimSensorModel == ITK_NULLPTR) + if (ossimSensorModel == nullptr) { ossimSensorModel = ossimplugins::ossimPluginProjectionFactory::instance()->createProjection(ossimKwlist); } - if (ossimSensorModel == ITK_NULLPTR) // Model validity + if (ossimSensorModel == nullptr) // Model validity { std::cerr << "Invalid sensor model (ossimSensorModel is NULL)" << std::endl; return EXIT_FAILURE; diff --git a/Modules/Filtering/Statistics/include/otbListSampleGenerator.txx b/Modules/Filtering/Statistics/include/otbListSampleGenerator.txx index d1fc246236..7f17e073b1 100644 --- a/Modules/Filtering/Statistics/include/otbListSampleGenerator.txx +++ b/Modules/Filtering/Statistics/include/otbListSampleGenerator.txx @@ -100,7 +100,7 @@ ListSampleGenerator<TImage, TVectorData> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const ImageType *>(this->ProcessObject::GetInput(0)); @@ -124,7 +124,7 @@ ListSampleGenerator<TImage, TVectorData> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const VectorDataType *>(this->ProcessObject::GetInput(1)); diff --git a/Modules/Filtering/Statistics/include/otbListSampleToBalancedListSampleFilter.txx b/Modules/Filtering/Statistics/include/otbListSampleToBalancedListSampleFilter.txx index a7d70a349e..19dc683975 100644 --- a/Modules/Filtering/Statistics/include/otbListSampleToBalancedListSampleFilter.txx +++ b/Modules/Filtering/Statistics/include/otbListSampleToBalancedListSampleFilter.txx @@ -89,7 +89,7 @@ ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutput { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const LabelSampleListType* > diff --git a/Modules/Filtering/Statistics/include/otbListSampleToHistogramListGenerator.txx b/Modules/Filtering/Statistics/include/otbListSampleToHistogramListGenerator.txx index 81f671bbc4..3d147197c0 100644 --- a/Modules/Filtering/Statistics/include/otbListSampleToHistogramListGenerator.txx +++ b/Modules/Filtering/Statistics/include/otbListSampleToHistogramListGenerator.txx @@ -71,7 +71,7 @@ ListSampleToHistogramListGenerator<TListSample,THistogramMeasurement, TFrequency { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const ListSampleType* > (this->itk::ProcessObject::GetInput(0) ); diff --git a/Modules/Filtering/Statistics/include/otbListSampleToListSampleFilter.txx b/Modules/Filtering/Statistics/include/otbListSampleToListSampleFilter.txx index a5d8d81338..be6f811e3d 100644 --- a/Modules/Filtering/Statistics/include/otbListSampleToListSampleFilter.txx +++ b/Modules/Filtering/Statistics/include/otbListSampleToListSampleFilter.txx @@ -52,7 +52,7 @@ ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputSampleListType * > diff --git a/Modules/Filtering/Statistics/include/otbListSampleToVariableDimensionHistogramGenerator.txx b/Modules/Filtering/Statistics/include/otbListSampleToVariableDimensionHistogramGenerator.txx index 6991fb1012..f7b5de355a 100644 --- a/Modules/Filtering/Statistics/include/otbListSampleToVariableDimensionHistogramGenerator.txx +++ b/Modules/Filtering/Statistics/include/otbListSampleToVariableDimensionHistogramGenerator.txx @@ -66,7 +66,7 @@ ListSampleToVariableDimensionHistogramGenerator<TListSample, THistogramMeasureme { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const ListSampleType* > (this->itk::ProcessObject::GetInput(0) ); diff --git a/Modules/Filtering/VectorDataManipulation/include/otbConcatenateVectorDataFilter.txx b/Modules/Filtering/VectorDataManipulation/include/otbConcatenateVectorDataFilter.txx index ac33263fab..54c87548ad 100644 --- a/Modules/Filtering/VectorDataManipulation/include/otbConcatenateVectorDataFilter.txx +++ b/Modules/Filtering/VectorDataManipulation/include/otbConcatenateVectorDataFilter.txx @@ -73,7 +73,7 @@ ConcatenateVectorDataFilter<TVectorData> { if (this->GetNumberOfInputs() < idx) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const VectorDataType *>(this->Superclass::GetInput(idx)); } @@ -125,7 +125,7 @@ void ConcatenateVectorDataFilter<TVectorData> ::ProcessNode(TreeNodeType * source, DataNodeType * outputDocument) { - if (source == ITK_NULLPTR) + if (source == nullptr) return; diff --git a/Modules/Filtering/VectorDataManipulation/include/otbVectorDataToSpecificDescriptionFilterBase.txx b/Modules/Filtering/VectorDataManipulation/include/otbVectorDataToSpecificDescriptionFilterBase.txx index c80d3c4f5a..08fc1bdae0 100644 --- a/Modules/Filtering/VectorDataManipulation/include/otbVectorDataToSpecificDescriptionFilterBase.txx +++ b/Modules/Filtering/VectorDataManipulation/include/otbVectorDataToSpecificDescriptionFilterBase.txx @@ -54,7 +54,7 @@ VectorDataToSpecificDescriptionFilterBase<TVectorData> { if (this->GetNumberOfInputs() < idx+2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const DataObject *> diff --git a/Modules/Filtering/VectorDataManipulation/include/otbVectorDataToVectorDataFilter.txx b/Modules/Filtering/VectorDataManipulation/include/otbVectorDataToVectorDataFilter.txx index 6c0c5dae1f..8d8f881e1a 100644 --- a/Modules/Filtering/VectorDataManipulation/include/otbVectorDataToVectorDataFilter.txx +++ b/Modules/Filtering/VectorDataManipulation/include/otbVectorDataToVectorDataFilter.txx @@ -56,7 +56,7 @@ VectorDataToVectorDataFilter<TInputVectorData, TOutputVectorData> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputVectorData *> diff --git a/Modules/Fusion/Fuzzy/src/otbFuzzyDescriptorsModelManager.cxx b/Modules/Fusion/Fuzzy/src/otbFuzzyDescriptorsModelManager.cxx index 8810a004fc..902b98423d 100644 --- a/Modules/Fusion/Fuzzy/src/otbFuzzyDescriptorsModelManager.cxx +++ b/Modules/Fusion/Fuzzy/src/otbFuzzyDescriptorsModelManager.cxx @@ -123,7 +123,7 @@ FuzzyDescriptorsModelManager // Iterate through the tree to get all the stats for( TiXmlElement* currentStat = root.FirstChildElement().ToElement(); - currentStat != ITK_NULLPTR; + currentStat != nullptr; currentStat = currentStat->NextSiblingElement() ) { PairType currentDescriptor; @@ -136,7 +136,7 @@ FuzzyDescriptorsModelManager ParameterType param; for( TiXmlElement* sample = currentStat->FirstChildElement("Parameter"); - sample != ITK_NULLPTR; + sample != nullptr; sample = sample->NextSiblingElement() ) { // Get the current value of the descriptor diff --git a/Modules/Fusion/PanSharpening/include/otbFusionImageBase.h b/Modules/Fusion/PanSharpening/include/otbFusionImageBase.h index 12ed49e7bd..2e7429281c 100644 --- a/Modules/Fusion/PanSharpening/include/otbFusionImageBase.h +++ b/Modules/Fusion/PanSharpening/include/otbFusionImageBase.h @@ -101,7 +101,7 @@ public: { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } else return (static_cast<const InputMultiSpectralImageType *>(this->itk::ProcessObject::GetInput(0))); } @@ -110,7 +110,7 @@ public: { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } else return (static_cast<const InputMultiSpectralInterpImageType *>(this->itk::ProcessObject::GetInput(1))); } @@ -119,7 +119,7 @@ public: { if (this->GetNumberOfInputs() < 3) { - return ITK_NULLPTR; + return nullptr; } else return (static_cast<const InputPanchroImageType *>(this->itk::ProcessObject::GetInput(2))); } diff --git a/Modules/Fusion/PanSharpening/include/otbLmvmPanSharpeningFusionImageFilter.txx b/Modules/Fusion/PanSharpening/include/otbLmvmPanSharpeningFusionImageFilter.txx index 82974b8c53..11aadef45a 100644 --- a/Modules/Fusion/PanSharpening/include/otbLmvmPanSharpeningFusionImageFilter.txx +++ b/Modules/Fusion/PanSharpening/include/otbLmvmPanSharpeningFusionImageFilter.txx @@ -87,7 +87,7 @@ LmvmPanSharpeningFusionImageFilter { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TPanImageType *> @@ -116,7 +116,7 @@ LmvmPanSharpeningFusionImageFilter { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TXsImageType *> diff --git a/Modules/Fusion/PanSharpening/include/otbSimpleRcsPanSharpeningFusionImageFilter.txx b/Modules/Fusion/PanSharpening/include/otbSimpleRcsPanSharpeningFusionImageFilter.txx index 779db3e5e1..6218dd0d3a 100644 --- a/Modules/Fusion/PanSharpening/include/otbSimpleRcsPanSharpeningFusionImageFilter.txx +++ b/Modules/Fusion/PanSharpening/include/otbSimpleRcsPanSharpeningFusionImageFilter.txx @@ -68,7 +68,7 @@ SimpleRcsPanSharpeningFusionImageFilter { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TPanImageType *> @@ -97,7 +97,7 @@ SimpleRcsPanSharpeningFusionImageFilter { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TXsImageType *> diff --git a/Modules/Hyperspectral/Unmixing/include/otbSparseUnmixingImageFilter.txx b/Modules/Hyperspectral/Unmixing/include/otbSparseUnmixingImageFilter.txx index 98e0b5bd27..150725421e 100644 --- a/Modules/Hyperspectral/Unmixing/include/otbSparseUnmixingImageFilter.txx +++ b/Modules/Hyperspectral/Unmixing/include/otbSparseUnmixingImageFilter.txx @@ -78,7 +78,7 @@ SparseUnmixingImageFilter< TInputImage, TOutputImage, VNbInputImage, TPrecision, { if ( i >= this->GetNumberOfInputs() ) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageType * > diff --git a/Modules/IO/Carto/include/otbImageToOSMVectorDataGenerator.txx b/Modules/IO/Carto/include/otbImageToOSMVectorDataGenerator.txx index f162d1037f..69952eedc8 100644 --- a/Modules/IO/Carto/include/otbImageToOSMVectorDataGenerator.txx +++ b/Modules/IO/Carto/include/otbImageToOSMVectorDataGenerator.txx @@ -60,7 +60,7 @@ ImageToOSMVectorDataGenerator<TImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const ImageType* > diff --git a/Modules/IO/Carto/include/otbMapFileProductWriter.txx b/Modules/IO/Carto/include/otbMapFileProductWriter.txx index 85157ad032..8bc2c3c942 100644 --- a/Modules/IO/Carto/include/otbMapFileProductWriter.txx +++ b/Modules/IO/Carto/include/otbMapFileProductWriter.txx @@ -87,7 +87,7 @@ MapFileProductWriter<TInputImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage * > diff --git a/Modules/IO/Carto/src/otbOSMDataToVectorDataGenerator.cxx b/Modules/IO/Carto/src/otbOSMDataToVectorDataGenerator.cxx index 98654ab995..83e9a28b8d 100644 --- a/Modules/IO/Carto/src/otbOSMDataToVectorDataGenerator.cxx +++ b/Modules/IO/Carto/src/otbOSMDataToVectorDataGenerator.cxx @@ -142,7 +142,7 @@ void OSMDataToVectorDataGenerator::ParseXmlFile() // Iterate through the tree to get all the nodes and store them in // a std::map for( TiXmlElement* node = root.FirstChild("node").ToElement(); - node != ITK_NULLPTR && strcmp(node->Value(),"node")==0; + node != nullptr && strcmp(node->Value(),"node")==0; node = node->NextSiblingElement() ) { int id = 0; @@ -171,7 +171,7 @@ void OSMDataToVectorDataGenerator::ParseXmlFile() // Iterate through the tree to get all the fields ways with tag k=key for( TiXmlElement* currentLayer = root.FirstChildElement("way").ToElement(); - currentLayer != ITK_NULLPTR && strcmp(currentLayer->Value(),"way") ==0; + currentLayer != nullptr && strcmp(currentLayer->Value(),"way") ==0; currentLayer = currentLayer->NextSiblingElement() ) { bool foundKey = false; @@ -183,7 +183,7 @@ void OSMDataToVectorDataGenerator::ParseXmlFile() // Iterate through the node tag to find the "key" for( TiXmlElement* currentTag = currentLayer->FirstChild("tag")->ToElement(); - currentTag != ITK_NULLPTR; + currentTag != nullptr; currentTag = currentTag->NextSiblingElement() ) { std::string result = currentTag->Attribute("k"); @@ -214,7 +214,7 @@ void OSMDataToVectorDataGenerator::ParseXmlFile() // put the current layer pointer to the beginning for( TiXmlElement* currentNode = currentLayer->FirstChildElement("nd"); - currentNode != ITK_NULLPTR; + currentNode != nullptr; currentNode = currentNode->NextSiblingElement() ) { int value=0; diff --git a/Modules/IO/IOBSQ/src/otbBSQImageIO.cxx b/Modules/IO/IOBSQ/src/otbBSQImageIO.cxx index 144c1c38c2..54d6cc29ff 100644 --- a/Modules/IO/IOBSQ/src/otbBSQImageIO.cxx +++ b/Modules/IO/IOBSQ/src/otbBSQImageIO.cxx @@ -57,7 +57,7 @@ BSQImageIO::BSQImageIO() // (consistency between ImageIO, see Mantis #942) m_Origin[0] = 0.5; m_Origin[1] = 0.5; - m_ChannelsFile = ITK_NULLPTR; + m_ChannelsFile = nullptr; m_FlagWriteImageInformation = true; this->AddSupportedWriteExtension(".hd"); @@ -74,7 +74,7 @@ BSQImageIO::~BSQImageIO() { m_HeaderFile.close(); } - if (m_ChannelsFile != ITK_NULLPTR) + if (m_ChannelsFile != nullptr) { for (unsigned int numComponent = 0; numComponent < this->GetNumberOfComponents(); numComponent++) { @@ -155,7 +155,7 @@ void BSQImageIO::Read(void* buffer) step = step * (unsigned long) (this->GetComponentSize()); char * value = new char[numberOfBytesToBeRead]; - if (value == ITK_NULLPTR) + if (value == nullptr) { itkExceptionMacro(<< "BSQImageIO::Read(): Bad alloc"); return; @@ -531,7 +531,7 @@ void BSQImageIO::Write(const void* buffer) const char * p = static_cast<const char *>(buffer); char* value = new char[numberOfBytesToBeWrite]; - if (value == ITK_NULLPTR) + if (value == nullptr) { itkExceptionMacro(<< "Memory allocation error"); return; diff --git a/Modules/IO/IOGDAL/include/otbOGRVectorDataIO.h b/Modules/IO/IOGDAL/include/otbOGRVectorDataIO.h index 2344ef6fca..eccfbe4faf 100644 --- a/Modules/IO/IOGDAL/include/otbOGRVectorDataIO.h +++ b/Modules/IO/IOGDAL/include/otbOGRVectorDataIO.h @@ -103,7 +103,7 @@ public: bool CanWriteFile(const char*) const override; /** Writes the data to disk from the memory buffer provided */ - void Write(const itk::DataObject* data, char ** papszOptions = ITK_NULLPTR) override; + void Write(const itk::DataObject* data, char ** papszOptions = nullptr) override; protected: /** Constructor.*/ diff --git a/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx b/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx index 0532201afa..fb953b5bcc 100644 --- a/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx @@ -29,7 +29,7 @@ namespace otb { GDALDatasetWrapper -::GDALDatasetWrapper(): m_Dataset(ITK_NULLPTR) +::GDALDatasetWrapper(): m_Dataset(nullptr) { } @@ -44,7 +44,7 @@ GDALDatasetWrapper // GDALDriverManagerWrapper::Open(). So, it should be destroyed by // GDALClose() (see // http://gdal.org/classGDALDataset.html#a4d110533d799bac7dcfad3c41d30c0e7). - m_Dataset = ITK_NULLPTR; + m_Dataset = nullptr; } } @@ -69,7 +69,7 @@ GDALDatasetWrapper bool GDALDatasetWrapper::IsJPEG2000() const { - if (m_Dataset == ITK_NULLPTR) + if (m_Dataset == nullptr) { return false; } diff --git a/Modules/IO/IOGDAL/src/otbGDALDriverManagerWrapper.cxx b/Modules/IO/IOGDAL/src/otbGDALDriverManagerWrapper.cxx index 289201afcd..d29052b235 100644 --- a/Modules/IO/IOGDAL/src/otbGDALDriverManagerWrapper.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALDriverManagerWrapper.cxx @@ -32,7 +32,7 @@ GDALDriverManagerWrapper::GDALDriverManagerWrapper() { GDALAllRegister(); - GDALDriver* driver = ITK_NULLPTR; + GDALDriver* driver = nullptr; // Ignore incompatible Jpeg2000 drivers (Jasper) driver = GetGDALDriverManager()->GetDriverByName( "JPEG2000" ); @@ -66,8 +66,8 @@ GDALDriverManagerWrapper::Open( std::string filename ) const } // test if a driver can identify the dataset - GDALDriverH identifyDriverH = GDALIdentifyDriver(filename.c_str(), ITK_NULLPTR); - if(identifyDriverH == ITK_NULLPTR) + GDALDriverH identifyDriverH = GDALIdentifyDriver(filename.c_str(), nullptr); + if(identifyDriverH == nullptr) { // don't try to open it and exit return datasetWrapper; @@ -86,7 +86,7 @@ GDALDriverManagerWrapper::Open( std::string filename ) const GDALDatasetH dataset = GDALOpen(filename.c_str(), GA_ReadOnly); - if (dataset != ITK_NULLPTR) + if (dataset != nullptr) { datasetWrapper = GDALDatasetWrapper::New(); datasetWrapper->m_Dataset = static_cast<GDALDataset*>(dataset); @@ -103,14 +103,14 @@ GDALDriverManagerWrapper::Create( std::string driverShortName, std::string filen GDALDatasetWrapper::Pointer datasetWrapper; GDALDriver* driver = GetDriverByName( driverShortName ); - if(driver != ITK_NULLPTR) + if(driver != nullptr) { GDALDataset* dataset = driver->Create(filename.c_str(), nXSize, nYSize, nBands, eType, papszOptions ); - if (dataset != ITK_NULLPTR) + if (dataset != nullptr) { datasetWrapper = GDALDatasetWrapper::New(); datasetWrapper->m_Dataset = dataset; diff --git a/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx b/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx index 4f55f67b2b..dd235496ad 100644 --- a/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx @@ -121,7 +121,7 @@ GDALImageIO::~GDALImageIO() bool GDALImageIO::CanReadFile(const char* file) { // First check the extension - if (file == ITK_NULLPTR) + if (file == nullptr) { return false; } @@ -150,7 +150,7 @@ void GDALImageIO::Read(void* buffer) unsigned char *p = static_cast<unsigned char *>(buffer); // Check if conversion succeed - if (p == ITK_NULLPTR) + if (p == nullptr) { itkExceptionMacro(<< "Buffer passed to GDALImageIO for reading is NULL."); return; @@ -262,7 +262,7 @@ void GDALImageIO::Read(void* buffer) m_PxType->pixType, nbBands, // We want to read all bands - ITK_NULLPTR, + nullptr, pixelOffset, lineOffset, bandOffset); @@ -293,7 +293,7 @@ bool GDALImageIO::GetSubDatasetInfo(std::vector<std::string> &names, std::vector (strcmp(m_Dataset->GetDataSet()->GetDriver()->GetDescription(),"HDF5") == 0) || (strcmp(m_Dataset->GetDataSet()->GetDriver()->GetDescription(),"SENTINEL2") == 0) ) ) { - for (int cpt = 0; papszMetadata[cpt] != ITK_NULLPTR; ++cpt) + for (int cpt = 0; papszMetadata[cpt] != nullptr; ++cpt) { std::string key, name; if (System::ParseHdfSubsetName(papszMetadata[cpt], key, name)) @@ -444,7 +444,7 @@ void GDALImageIO::InternalReadImageInformation() std::vector<std::string> names; if( CSLCount(papszMetadata) > 0 ) { - for( int cpt = 0; papszMetadata[cpt] != ITK_NULLPTR; ++cpt ) + for( int cpt = 0; papszMetadata[cpt] != nullptr; ++cpt ) { std::string key, name; if (System::ParseHdfSubsetName(papszMetadata[cpt], key, name)) @@ -710,7 +710,7 @@ void GDALImageIO::InternalReadImageInformation() if (m_NumberOfDimensions == 3) m_Spacing[2] = 1; - char** papszMetadata = dataset->GetMetadata(ITK_NULLPTR); + char** papszMetadata = dataset->GetMetadata(nullptr); /* -------------------------------------------------------------------- */ /* Report general info. */ @@ -734,16 +734,16 @@ void GDALImageIO::InternalReadImageInformation() /* -------------------------------------------------------------------- */ /* Get the projection coordinate system of the image : ProjectionRef */ /* -------------------------------------------------------------------- */ - if (dataset->GetProjectionRef() != ITK_NULLPTR && !std::string(dataset->GetProjectionRef()).empty()) + if (dataset->GetProjectionRef() != nullptr && !std::string(dataset->GetProjectionRef()).empty()) { - OGRSpatialReferenceH pSR = OSRNewSpatialReference(ITK_NULLPTR); + OGRSpatialReferenceH pSR = OSRNewSpatialReference(nullptr); - const char * pszProjection = ITK_NULLPTR; + const char * pszProjection = nullptr; pszProjection = dataset->GetProjectionRef(); if (OSRImportFromWkt(pSR, (char **) (&pszProjection)) == OGRERR_NONE) { - char * pszPrettyWkt = ITK_NULLPTR; + char * pszPrettyWkt = nullptr; OSRExportToPrettyWkt(pSR, &pszPrettyWkt, FALSE); itk::EncapsulateMetaData<std::string> (dict, MetaDataKey::ProjectionRefKey, @@ -757,10 +757,10 @@ void GDALImageIO::InternalReadImageInformation() static_cast<std::string>(dataset->GetProjectionRef())); } - if (pSR != ITK_NULLPTR) + if (pSR != nullptr) { OSRRelease(pSR); - pSR = ITK_NULLPTR; + pSR = nullptr; } } else @@ -788,7 +788,7 @@ void GDALImageIO::InternalReadImageInformation() // assert( gcpProj!=NULL ); - if( gcpProj!=ITK_NULLPTR ) + if( gcpProj!=nullptr ) gcpProjectionKey = gcpProj; } @@ -885,12 +885,12 @@ void GDALImageIO::InternalReadImageInformation() /* Report metadata. */ /* -------------------------------------------------------------------- */ - papszMetadata = dataset->GetMetadata(ITK_NULLPTR); + papszMetadata = dataset->GetMetadata(nullptr); if (CSLCount(papszMetadata) > 0) { std::string key; - for (int cpt = 0; papszMetadata[cpt] != ITK_NULLPTR; ++cpt) + for (int cpt = 0; papszMetadata[cpt] != nullptr; ++cpt) { std::ostringstream lStream; lStream << MetaDataKey::MetadataKey << cpt; @@ -904,7 +904,7 @@ void GDALImageIO::InternalReadImageInformation() /* Special case for JPEG2000, also look in the GML boxes */ if (m_Dataset->IsJPEG2000()) { - char **gmlMetadata = ITK_NULLPTR; + char **gmlMetadata = nullptr; GDALJP2Metadata jp2Metadata; if (jp2Metadata.ReadAndParse(m_FileName.c_str())) { @@ -918,7 +918,7 @@ void GDALImageIO::InternalReadImageInformation() std::string key; int cptOffset = CSLCount(papszMetadata); - for (int cpt = 0; gmlMetadata[cpt] != ITK_NULLPTR; ++cpt) + for (int cpt = 0; gmlMetadata[cpt] != nullptr; ++cpt) { std::ostringstream lStream; lStream << MetaDataKey::MetadataKey << (cpt+cptOffset); @@ -941,7 +941,7 @@ void GDALImageIO::InternalReadImageInformation() { std::string key; - for (int cpt = 0; papszMetadata[cpt] != ITK_NULLPTR; ++cpt) + for (int cpt = 0; papszMetadata[cpt] != nullptr; ++cpt) { std::ostringstream lStream; lStream << MetaDataKey::SubMetadataKey << cpt; @@ -1001,7 +1001,7 @@ void GDALImageIO::InternalReadImageInformation() GDALRasterBandH hBand; hBand = GDALGetRasterBand(dataset, iBand + 1); if ((GDALGetRasterColorInterpretation(hBand) == GCI_PaletteIndex) - && (hTable = GDALGetRasterColorTable(hBand)) != ITK_NULLPTR) + && (hTable = GDALGetRasterColorTable(hBand)) != nullptr) { // Mantis: 1049 : OTB does not handle tif with NBITS=1 properly @@ -1086,7 +1086,7 @@ void GDALImageIO::InternalReadImageInformation() bool GDALImageIO::CanWriteFile(const char* name) { // First check the filename - if (name == ITK_NULLPTR) + if (name == nullptr) { return false; } @@ -1102,8 +1102,8 @@ bool GDALImageIO::CanWriteFile(const char* name) // Check the driver for support of Create or at least CreateCopy GDALDriver* driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName(gdalDriverShortName); - if ( GDALGetMetadataItem( driver, GDAL_DCAP_CREATE, ITK_NULLPTR ) == ITK_NULLPTR - && GDALGetMetadataItem( driver, GDAL_DCAP_CREATECOPY, ITK_NULLPTR ) == ITK_NULLPTR ) + if ( GDALGetMetadataItem( driver, GDAL_DCAP_CREATE, nullptr ) == nullptr + && GDALGetMetadataItem( driver, GDAL_DCAP_CREATECOPY, nullptr ) == nullptr ) { otbLogMacro(Warning,<< "GDAL driver " << GDALGetDriverShortName(driver) << " does not support writing"); return false; @@ -1117,11 +1117,11 @@ bool GDALImageIO::CanStreamWrite() std::string gdalDriverShortName = FilenameToGdalDriverShortName(m_FileName); GDALDriver* driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName(gdalDriverShortName); - if (driver == ITK_NULLPTR) + if (driver == nullptr) { m_CanStreamWrite = false; } - if ( GDALGetMetadataItem( driver, GDAL_DCAP_CREATE, ITK_NULLPTR ) != ITK_NULLPTR ) + if ( GDALGetMetadataItem( driver, GDAL_DCAP_CREATE, nullptr ) != nullptr ) { m_CanStreamWrite = true; } @@ -1142,7 +1142,7 @@ void GDALImageIO::Write(const void* buffer) } // Check if conversion succeed - if (buffer == ITK_NULLPTR) + if (buffer == nullptr) { itkExceptionMacro(<< "Null buffer passed to GDALImageIO for writing."); return; @@ -1184,7 +1184,7 @@ void GDALImageIO::Write(const void* buffer) m_PxType->pixType, m_NbBands, // We want to write all bands - ITK_NULLPTR, + nullptr, // Pixel offset // is nbComp * BytePerPixel m_BytePerPixel * m_NbBands, @@ -1215,7 +1215,7 @@ void GDALImageIO::Write(const void* buffer) std::string realFileName = GetGdalWriteImageFileName(gdalDriverShortName, m_FileName); GDALDriver* driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName(gdalDriverShortName); - if (driver == ITK_NULLPTR) + if (driver == nullptr) { itkExceptionMacro(<< "Unable to instantiate driver " << gdalDriverShortName << " to write " << m_FileName); } @@ -1223,7 +1223,7 @@ void GDALImageIO::Write(const void* buffer) GDALCreationOptionsType creationOptions = m_CreationOptions; GDALDataset* hOutputDS = driver->CreateCopy( realFileName.c_str(), m_Dataset->GetDataSet(), FALSE, otb::ogr::StringListConverter(creationOptions).to_ogr(), - ITK_NULLPTR, ITK_NULLPTR ); + nullptr, nullptr ); if(!hOutputDS) { itkExceptionMacro(<< "Error while writing image (GDAL format) '" @@ -1541,7 +1541,7 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer) unsigned int equalityPos = svalue.find_first_of('='); std::string tag = svalue.substr(0, equalityPos); std::string value = svalue.substr(equalityPos + 1); - dataset->SetMetadataItem(tag.c_str(), value.c_str(), ITK_NULLPTR); + dataset->SetMetadataItem(tag.c_str(), value.c_str(), nullptr); } } @@ -1594,7 +1594,7 @@ std::string GDALImageIO::FilenameToGdalDriverShortName(const std::string& name) else if ( extension == ".j2k" || extension == ".jp2" || extension == ".jpx") { // Try different JPEG2000 drivers - GDALDriver *driver = ITK_NULLPTR; + GDALDriver *driver = nullptr; driver = GDALDriverManagerWrapper::GetInstance().GetDriverByName("JP2OpenJPEG"); if (driver) { diff --git a/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx b/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx index 7b6608c87e..b88b582f28 100644 --- a/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx @@ -76,10 +76,10 @@ GDAL_COMPRESSION_NAMES[ GDAL_COMPRESSION_COUNT ] = std::string GetConfigOption( const char * key ) { - const char * value = CPLGetConfigOption( key, ITK_NULLPTR ); + const char * value = CPLGetConfigOption( key, nullptr ); return - value==ITK_NULLPTR + value==nullptr ? std::string() : std::string( value ); } @@ -553,7 +553,7 @@ GDALOverviewsBuilder static_cast< int >( m_NbResolutions - 1 ), &ovwlist.front(), 0, // All bands - ITK_NULLPTR, // All bands + nullptr, // All bands ( GDALProgressFunc )otb_UpdateGDALProgress, this ); diff --git a/Modules/IO/IOGDAL/src/otbOGRIOHelper.cxx b/Modules/IO/IOGDAL/src/otbOGRIOHelper.cxx index 52a61732f8..c27c152502 100644 --- a/Modules/IO/IOGDAL/src/otbOGRIOHelper.cxx +++ b/Modules/IO/IOGDAL/src/otbOGRIOHelper.cxx @@ -34,7 +34,7 @@ OGRIOHelper { OGRPoint * ogrPoint = (OGRPoint *) ogrGeometry; - if (ogrPoint == ITK_NULLPTR) + if (ogrPoint == nullptr) { itkGenericExceptionMacro(<< "Failed to convert OGRGeometry to OGRPoint"); } @@ -63,7 +63,7 @@ OGRIOHelper { OGRLineString * ogrLine = (OGRLineString *) ogrGeometry; - if (ogrLine == ITK_NULLPTR) + if (ogrLine == nullptr) { itkGenericExceptionMacro(<< "Failed to convert OGRGeometry to OGRLine"); } @@ -105,7 +105,7 @@ OGRIOHelper { OGRPolygon * ogrPolygon = (OGRPolygon *) ogrGeometry; - if (ogrPolygon == ITK_NULLPTR) + if (ogrPolygon == nullptr) { itkGenericExceptionMacro(<< "Failed to convert OGRGeometry to OGRPolygon"); } @@ -190,7 +190,7 @@ void OGRIOHelper unsigned int counter = 0; otb::Stopwatch chrono = otb::Stopwatch::StartNew(); - while ((feature = layer->GetNextFeature()) != ITK_NULLPTR) + while ((feature = layer->GetNextFeature()) != nullptr) { // A pointer to the current multi-geometry @@ -199,7 +199,7 @@ void OGRIOHelper /** Temporary geometry container */ OGRGeometry * geometry = feature->GetGeometryRef(); - if (geometry == ITK_NULLPTR) + if (geometry == nullptr) { OGRFeature::DestroyFeature(feature); ++counter; @@ -676,7 +676,7 @@ unsigned int OGRIOHelper kwl); // Create the field once - if (ogrCurrentLayer != ITK_NULLPTR && !fieldsAddedToOGRLayer) + if (ogrCurrentLayer != nullptr && !fieldsAddedToOGRLayer) { // Take into account the fields stored in the // vectordatakeywordlist @@ -712,8 +712,8 @@ unsigned int OGRIOHelper } case DOCUMENT: { - ogrCurrentLayer = m_DataSource->CreateLayer(dataNode->GetNodeId(), oSRS, wkbUnknown, ITK_NULLPTR); - if (ogrCurrentLayer == ITK_NULLPTR) + ogrCurrentLayer = m_DataSource->CreateLayer(dataNode->GetNodeId(), oSRS, wkbUnknown, nullptr); + if (ogrCurrentLayer == nullptr) { //itkExceptionMacro(<<"Failed to create layer "<<dataNode->GetNodeId()); std::cout << "Failed to create layer " << dataNode->GetNodeId() << std::endl; @@ -744,7 +744,7 @@ unsigned int OGRIOHelper } //Save it in the structure - if (ogrCollection == ITK_NULLPTR) + if (ogrCollection == nullptr) { OGRFeature *ogrFeature; ogrFeature = OGRFeature::CreateFeature(ogrCurrentLayer->GetLayerDefn()); @@ -802,7 +802,7 @@ unsigned int OGRIOHelper } //Save it in the structure - if (ogrCollection == ITK_NULLPTR) + if (ogrCollection == nullptr) { OGRFeature *ogrFeature; ogrFeature = OGRFeature::CreateFeature(ogrCurrentLayer->GetLayerDefn()); @@ -887,7 +887,7 @@ unsigned int OGRIOHelper } //Save it in the structure - if (ogrCollection == ITK_NULLPTR) + if (ogrCollection == nullptr) { OGRFeature *ogrFeature; ogrFeature = OGRFeature::CreateFeature(ogrCurrentLayer->GetLayerDefn()); @@ -920,7 +920,7 @@ unsigned int OGRIOHelper } case FEATURE_MULTIPOINT: { - if (ogrCollection != ITK_NULLPTR) + if (ogrCollection != nullptr) { itkExceptionMacro(<< "Problem while creating multipoint."); } @@ -943,7 +943,7 @@ unsigned int OGRIOHelper } case FEATURE_MULTILINE: { - if (ogrCollection != ITK_NULLPTR) + if (ogrCollection != nullptr) { itkExceptionMacro(<< "Problem while creating multiline."); } @@ -968,7 +968,7 @@ unsigned int OGRIOHelper } case FEATURE_MULTIPOLYGON: { - if (ogrCollection != ITK_NULLPTR) + if (ogrCollection != nullptr) { itkExceptionMacro(<< "Problem while creating multipolygon."); } @@ -991,7 +991,7 @@ unsigned int OGRIOHelper } case FEATURE_COLLECTION: { - if (ogrCollection != ITK_NULLPTR) + if (ogrCollection != nullptr) { itkExceptionMacro(<< "Problem while creating collection."); } @@ -1033,7 +1033,7 @@ std::vector<OGRLayer*> OGRIOHelper { // Create the in memory datasource if NULL - if (inMemoryDataSource == ITK_NULLPTR) + if (inMemoryDataSource == nullptr) { const char * driverName = "Memory"; ogr::version_proxy::GDALDriverType * ogrDriver = ogr::version_proxy::GetDriverByName(driverName); @@ -1059,7 +1059,7 @@ std::vector<OGRLayer*> OGRIOHelper kwl); // Create the field once - if (ogrCurrentLayer != ITK_NULLPTR && !fieldsAddedToOGRLayer) + if (ogrCurrentLayer != nullptr && !fieldsAddedToOGRLayer) { // Take into account the fields stored in the // vectordatakeywordlist @@ -1090,8 +1090,8 @@ std::vector<OGRLayer*> OGRIOHelper case DOCUMENT: { ogrCurrentLayer = inMemoryDataSource->CreateLayer(dataNode->GetNodeId(), oSRS, - wkbUnknown, ITK_NULLPTR); - if (ogrCurrentLayer == ITK_NULLPTR) + wkbUnknown, nullptr); + if (ogrCurrentLayer == nullptr) { std::cout << "Failed to create layer " << dataNode->GetNodeId() << std::endl; } diff --git a/Modules/IO/IOGDAL/src/otbOGRVectorDataIO.cxx b/Modules/IO/IOGDAL/src/otbOGRVectorDataIO.cxx index b0866eedc1..348c1e1b51 100644 --- a/Modules/IO/IOGDAL/src/otbOGRVectorDataIO.cxx +++ b/Modules/IO/IOGDAL/src/otbOGRVectorDataIO.cxx @@ -35,7 +35,7 @@ namespace otb OGRVectorDataIO ::OGRVectorDataIO() : - m_DataSource(ITK_NULLPTR) + m_DataSource(nullptr) { // OGR factory registration OGRRegisterAll(); @@ -44,7 +44,7 @@ OGRVectorDataIO OGRVectorDataIO::~OGRVectorDataIO() { - if (m_DataSource != ITK_NULLPTR) + if (m_DataSource != nullptr) { this->CloseInternalDataSource(); } @@ -56,7 +56,7 @@ OGRVectorDataIO::CanReadFile(const char* filename) const { otb::ogr::version_proxy::GDALDatasetType * poDS = ogr::version_proxy::Open(filename, true); - if (poDS == ITK_NULLPTR) + if (poDS == nullptr) { std::cerr<<"Can not read file "<<filename<<" with GDALOpen"<<std::endl; return false; @@ -88,14 +88,14 @@ OGRVectorDataIO itkExceptionMacro(<<"Failed to dynamic cast to otb::VectorData (this should never happen)"); } - if (m_DataSource != ITK_NULLPTR) + if (m_DataSource != nullptr) { this->CloseInternalDataSource(); } m_DataSource = ogr::version_proxy::Open(this->m_FileName.c_str(),true); - if (m_DataSource == ITK_NULLPTR) + if (m_DataSource == nullptr) { itkExceptionMacro(<< "Failed to open data file " << this->m_FileName); } @@ -110,11 +110,11 @@ OGRVectorDataIO DataTreePointerType tree = data->GetDataTree(); DataNodePointerType root = tree->GetRoot()->Get(); - OGRSpatialReference * oSRS = ITK_NULLPTR; + OGRSpatialReference * oSRS = nullptr; //We take the assumption that the spatial reference is common to all layers oSRS = m_DataSource->GetLayer(0)->GetSpatialRef(); - if (oSRS != ITK_NULLPTR) + if (oSRS != nullptr) { char * projectionRefChar; oSRS->exportToWkt(&projectionRefChar); @@ -185,7 +185,7 @@ void OGRVectorDataIO::CloseInternalDataSource() { assert(m_DataSource != NULL && "m_DataSource cannot be NULL"); ogr::version_proxy::Close(m_DataSource); - m_DataSource = ITK_NULLPTR; + m_DataSource = nullptr; } @@ -218,13 +218,13 @@ void OGRVectorDataIO::Write(const itk::DataObject* datag, char ** /** unused */) ogr::version_proxy::GDALDriverType * ogrDriver = ogr::version_proxy::GetDriverByName(this->GetOGRDriverName(this->m_FileName).data()); - if (ogrDriver == ITK_NULLPTR) + if (ogrDriver == nullptr) { itkExceptionMacro(<< "No OGR driver found to write file " << this->m_FileName); } // free an existing previous data source, if any - if (m_DataSource != ITK_NULLPTR) + if (m_DataSource != nullptr) { ogr::version_proxy::Close(m_DataSource); } @@ -236,7 +236,7 @@ void OGRVectorDataIO::Write(const itk::DataObject* datag, char ** /** unused */) m_DataSource = ogr::version_proxy::Create(ogrDriver,this->m_FileName.c_str()); // check the created data source - if (m_DataSource == ITK_NULLPTR) + if (m_DataSource == nullptr) { itkExceptionMacro( << "Failed to create OGR data source for file " << this->m_FileName << @@ -258,7 +258,7 @@ void OGRVectorDataIO::Write(const itk::DataObject* datag, char ** /** unused */) } //TODO georeference here from OGRSpatialReference http://www.gdal.org/ogr/classOGRDataSource.html - OGRSpatialReference * oSRS = ITK_NULLPTR; + OGRSpatialReference * oSRS = nullptr; if (projectionInformationAvailable) { oSRS = static_cast<OGRSpatialReference *>(OSRNewSpatialReference(projectionRefWkt.c_str())); @@ -266,16 +266,16 @@ void OGRVectorDataIO::Write(const itk::DataObject* datag, char ** /** unused */) // Retrieving root node DataTreeConstPointerType tree = data->GetDataTree(); - if (tree->GetRoot() == ITK_NULLPTR) + if (tree->GetRoot() == nullptr) { itkExceptionMacro(<< "Data tree is empty: Root == NULL"); } DataNodePointerType root = tree->GetRoot()->Get(); unsigned int layerKept; - OGRLayer * ogrCurrentLayer = ITK_NULLPTR; + OGRLayer * ogrCurrentLayer = nullptr; // OGRFeatureVectorType ogrFeatures; - OGRGeometryCollection * ogrCollection = ITK_NULLPTR; + OGRGeometryCollection * ogrCollection = nullptr; // OGRGeometry * ogrCurrentGeometry = NULL; // Get the input tree root @@ -289,9 +289,9 @@ void OGRVectorDataIO::Write(const itk::DataObject* datag, char ** /** unused */) (void)layerKept; // keep compiler happy otb::ogr::version_proxy::Close(m_DataSource); - m_DataSource = ITK_NULLPTR; + m_DataSource = nullptr; - if (oSRS != ITK_NULLPTR) + if (oSRS != nullptr) { OSRRelease(oSRS); } diff --git a/Modules/IO/IOGDAL/test/otbGDALImageIOTestWriteMetadata.cxx b/Modules/IO/IOGDAL/test/otbGDALImageIOTestWriteMetadata.cxx index 788dade306..4cf71e19fc 100644 --- a/Modules/IO/IOGDAL/test/otbGDALImageIOTestWriteMetadata.cxx +++ b/Modules/IO/IOGDAL/test/otbGDALImageIOTestWriteMetadata.cxx @@ -465,7 +465,7 @@ bool writeReadDatasetMetadata(std::string filename, std::vector<std::string> opt GDALAllRegister(); poDriver = GetGDALDriverManager()->GetDriverByName(pszFormat); - if( poDriver == ITK_NULLPTR ) + if( poDriver == nullptr ) { std::cout << "impossible to get the driver" <<std::endl; return false; @@ -484,14 +484,14 @@ bool writeReadDatasetMetadata(std::string filename, std::vector<std::string> opt } GDALDataset *poDstDS; - char **papszOptions = ITK_NULLPTR; + char **papszOptions = nullptr; // Create dataset poDstDS = poDriver->Create( filename.c_str(), 128, 128, 1, GDT_Byte, papszOptions ); OGRSpatialReference oSRS_GCP; - char *pszSRS_WKT_GCP = ITK_NULLPTR; + char *pszSRS_WKT_GCP = nullptr; oSRS_GCP.SetWellKnownGeogCS( "WGS84" ); oSRS_GCP.exportToWkt( &pszSRS_WKT_GCP ); @@ -525,7 +525,7 @@ bool writeReadDatasetMetadata(std::string filename, std::vector<std::string> opt // Set ProjectionRef OGRSpatialReference oSRS_ProjRef; - char *pszSRS_WKT_ProjRef = ITK_NULLPTR; + char *pszSRS_WKT_ProjRef = nullptr; if (setProjectionRef || setProjectionRef_UTM) { oSRS_ProjRef.SetWellKnownGeogCS( "WGS84" ); @@ -598,7 +598,7 @@ bool writeReadDatasetMetadata(std::string filename, std::vector<std::string> opt GDALDataset *poDataset; poDataset = (GDALDataset *) GDALOpen( filename.c_str(), GA_ReadOnly ); - if( poDataset == ITK_NULLPTR ) + if( poDataset == nullptr ) return false; // Get some information from file diff --git a/Modules/IO/IOGDAL/test/otbGDALReadPxlComplex.cxx b/Modules/IO/IOGDAL/test/otbGDALReadPxlComplex.cxx index 6a58f74027..66ce9a48df 100644 --- a/Modules/IO/IOGDAL/test/otbGDALReadPxlComplex.cxx +++ b/Modules/IO/IOGDAL/test/otbGDALReadPxlComplex.cxx @@ -59,7 +59,7 @@ int otbGDALReadPxlComplexGeneric(int argc, char * argv[]) GDALAllRegister(); poDataset = (GDALDataset *) GDALOpen( argv[1], GA_ReadOnly ); - if( poDataset == ITK_NULLPTR ) + if( poDataset == nullptr ) return EXIT_FAILURE; // Get some information from file @@ -91,7 +91,7 @@ int otbGDALReadPxlComplexGeneric(int argc, char * argv[]) loadBuffer, // pData sizeX, sizeY, pxlTypeInFile, - nbBand, ITK_NULLPTR, + nbBand, nullptr, pixelOffset, lineOffset, bandOffset); // Check if gdal call succeed if (lCrGdal == CE_Failure) diff --git a/Modules/IO/IOKML/include/otbKMLVectorDataIO.h b/Modules/IO/IOKML/include/otbKMLVectorDataIO.h index c991edea6c..99179b0c58 100644 --- a/Modules/IO/IOKML/include/otbKMLVectorDataIO.h +++ b/Modules/IO/IOKML/include/otbKMLVectorDataIO.h @@ -102,7 +102,7 @@ public: bool CanWriteFile(const char*) const override; /** Writes the data to disk from the data structure provided */ - void Write(const itk::DataObject* data, char ** papszOptions = ITK_NULLPTR) override; + void Write(const itk::DataObject* data, char ** papszOptions = nullptr) override; protected: /** Constructor.*/ diff --git a/Modules/IO/IOKML/src/otbKMLVectorDataIO.cxx b/Modules/IO/IOKML/src/otbKMLVectorDataIO.cxx index 7b65796f21..32b5c7e5ad 100644 --- a/Modules/IO/IOKML/src/otbKMLVectorDataIO.cxx +++ b/Modules/IO/IOKML/src/otbKMLVectorDataIO.cxx @@ -105,7 +105,7 @@ KMLVectorDataIO::PrintIndented(const std::string& item, int depth) void KMLVectorDataIO::WalkFeature(const kmldom::FeaturePtr& feature, DataNodePointerType father) { - DataNodePointerType node = ITK_NULLPTR; + DataNodePointerType node = nullptr; if (!feature) return; @@ -130,7 +130,7 @@ void KMLVectorDataIO::WalkContainer(const kmldom::ContainerPtr& container, DataNodePointerType father) { - DataNodePointerType node = ITK_NULLPTR; + DataNodePointerType node = nullptr; for (size_t i = 0; i < container->get_feature_array_size(); ++i) { @@ -204,7 +204,7 @@ KMLVectorDataIO::WalkGeometry(const kmldom::GeometryPtr& geometry, DataNodePoint { // Creation of a node - DataNodePointerType node = ITK_NULLPTR; + DataNodePointerType node = nullptr; if (!geometry) { @@ -271,7 +271,7 @@ KMLVectorDataIO ::ConvertGeometryToPointNode(const kmldom::GeometryPtr& geometry) { - if (geometry == ITK_NULLPTR) + if (geometry == nullptr) { itkGenericExceptionMacro(<< "Failed to convert kmldom::GeometryPtr to PointNode"); } @@ -303,7 +303,7 @@ KMLVectorDataIO ::ConvertGeometryToLineStringNode(const kmldom::GeometryPtr& geometry) { - if (geometry == ITK_NULLPTR) + if (geometry == nullptr) { itkGenericExceptionMacro(<< "Failed to convert kmldom::GeometryPtr to LineNode"); } @@ -339,7 +339,7 @@ KMLVectorDataIO ::ConvertGeometryToLinearRingNode(const kmldom::GeometryPtr& geometry) { - if (geometry == ITK_NULLPTR) + if (geometry == nullptr) { itkGenericExceptionMacro(<< "Failed to convert kmldom::GeometryPtr to LineNode"); } @@ -375,7 +375,7 @@ KMLVectorDataIO ::ConvertGeometryToPolygonNode(const kmldom::GeometryPtr& geometry) { - if (geometry == ITK_NULLPTR) + if (geometry == nullptr) { itkGenericExceptionMacro(<< "Failed to convert kmldom::GeometryPtr to LineNode"); } @@ -556,7 +556,7 @@ void KMLVectorDataIO::Write(const itk::DataObject* datag, char ** itkNotUsed(pap //Create the factory kmldom::KmlFactory* factory = kmldom::KmlFactory::GetFactory(); - if (factory == ITK_NULLPTR) + if (factory == nullptr) { itkExceptionMacro(<< "Impossible to create the KML Factory to write file " << this->m_FileName); } @@ -572,9 +572,9 @@ void KMLVectorDataIO::Write(const itk::DataObject* datag, char ** itkNotUsed(pap TreeIteratorType it(tree); it.GoToBegin(); - kmldom::DocumentPtr currentDocument = ITK_NULLPTR; - kmldom::FolderPtr currentFolder = ITK_NULLPTR; - kmldom::MultiGeometryPtr currentMultiGeometry = ITK_NULLPTR; + kmldom::DocumentPtr currentDocument = nullptr; + kmldom::FolderPtr currentFolder = nullptr; + kmldom::MultiGeometryPtr currentMultiGeometry = nullptr; InternalTreeNodeType * inputRoot = const_cast<InternalTreeNodeType *>(tree->GetRoot()); ProcessNodeWrite(inputRoot, factory, kml, currentDocument, currentFolder, currentMultiGeometry); @@ -673,7 +673,7 @@ void KMLVectorDataIO::ProcessNodeWrite(InternalTreeNodeType * source, kmldom::PointPtr point = factory->CreatePoint(); point->set_coordinates(coordinates); - if (currentMultiGeometry != ITK_NULLPTR) + if (currentMultiGeometry != nullptr) { currentMultiGeometry->add_geometry(point); } @@ -682,7 +682,7 @@ void KMLVectorDataIO::ProcessNodeWrite(InternalTreeNodeType * source, kmldom::PlacemarkPtr placemark = factory->CreatePlacemark(); placemark->set_geometry(point); - if (currentFolder != ITK_NULLPTR) + if (currentFolder != nullptr) { currentFolder->add_feature(placemark); } @@ -720,7 +720,7 @@ void KMLVectorDataIO::ProcessNodeWrite(InternalTreeNodeType * source, ++vIt; } - if (currentMultiGeometry != ITK_NULLPTR) + if (currentMultiGeometry != nullptr) { currentMultiGeometry->add_geometry(line); } @@ -728,7 +728,7 @@ void KMLVectorDataIO::ProcessNodeWrite(InternalTreeNodeType * source, { kmldom::PlacemarkPtr placemark = factory->CreatePlacemark(); placemark->set_geometry(line); - if (currentFolder != ITK_NULLPTR) + if (currentFolder != nullptr) { currentFolder->add_feature(placemark); } @@ -839,7 +839,7 @@ void KMLVectorDataIO::ProcessNodeWrite(InternalTreeNodeType * source, innerboundaryis->clear_linearring(); } - if (currentMultiGeometry != ITK_NULLPTR) + if (currentMultiGeometry != nullptr) { currentMultiGeometry->add_geometry(polygon); } @@ -847,7 +847,7 @@ void KMLVectorDataIO::ProcessNodeWrite(InternalTreeNodeType * source, { kmldom::PlacemarkPtr placemark = factory->CreatePlacemark(); placemark->set_geometry(polygon); - if (currentFolder != ITK_NULLPTR) + if (currentFolder != nullptr) { currentFolder->add_feature(placemark); } @@ -865,7 +865,7 @@ void KMLVectorDataIO::ProcessNodeWrite(InternalTreeNodeType * source, currentMultiGeometry = multi; kmldom::PlacemarkPtr placemark = factory->CreatePlacemark(); placemark->set_geometry(multi); - if (currentFolder != ITK_NULLPTR) + if (currentFolder != nullptr) { currentFolder->add_feature(placemark); } diff --git a/Modules/IO/IOLUM/src/otbLUMImageIO.cxx b/Modules/IO/IOLUM/src/otbLUMImageIO.cxx index 9485c35ed8..2b90ae26c3 100644 --- a/Modules/IO/IOLUM/src/otbLUMImageIO.cxx +++ b/Modules/IO/IOLUM/src/otbLUMImageIO.cxx @@ -415,7 +415,7 @@ void LUMImageIO::WriteImageInformation() m_File.write(value, headerLength); } delete[] value; - value = ITK_NULLPTR; + value = nullptr; //Set m_TypeLum if (0) {} otbSetTypeLumMacro(CHAR, "08BI", "08LI") @@ -467,7 +467,7 @@ int LUMImageIO::CaiGetTypeLum(const char * type_code, taille = -1; int nbbits = -1; ind = 0; - pch0 = ITK_NULLPTR; + pch0 = nullptr; std::string str_type_code(type_code); while ((trouve == -1) && (ind < m_CaiLumTyp.size())) @@ -502,17 +502,17 @@ int LUMImageIO::CaiGetTypeLum(const char * type_code, pch0 = const_cast<char *>(strstr(type_code, "U")); if (taille == 1) { - if (pch0 == ITK_NULLPTR) sprintf(cod_pix, "OCT"); + if (pch0 == nullptr) sprintf(cod_pix, "OCT"); else sprintf(cod_pix, "UOCT"); } else if (taille == 2) { - if (pch0 == ITK_NULLPTR) sprintf(cod_pix, "I2"); + if (pch0 == nullptr) sprintf(cod_pix, "I2"); else sprintf(cod_pix, "UI2"); } else if (taille == 4) { - if (pch0 == ITK_NULLPTR) sprintf(cod_pix, "I4"); + if (pch0 == nullptr) sprintf(cod_pix, "I4"); else sprintf(cod_pix, "UI4"); } else taille = -1; diff --git a/Modules/IO/IOMSTAR/src/otbMSTARImageIO.cxx b/Modules/IO/IOMSTAR/src/otbMSTARImageIO.cxx index 7bcf4f1611..bb4f646929 100644 --- a/Modules/IO/IOMSTAR/src/otbMSTARImageIO.cxx +++ b/Modules/IO/IOMSTAR/src/otbMSTARImageIO.cxx @@ -63,9 +63,9 @@ MSTARImageIO::MSTARImageIO() m_BytePerPixel = 0; - MSTARfp = ITK_NULLPTR; /* Input FILE ptr to MSTAR image file */ - HDRfp = ITK_NULLPTR; /* Output FILE ptr to MSTAR header file */ - RAWfp = ITK_NULLPTR; + MSTARfp = nullptr; /* Input FILE ptr to MSTAR image file */ + HDRfp = nullptr; /* Output FILE ptr to MSTAR header file */ + RAWfp = nullptr; i = 0; j = 0; @@ -86,13 +86,13 @@ MSTARImageIO::MSTARImageIO() littleushortval = 0; littlefloatval = 0.; - MSTARname = ITK_NULLPTR; /* Input MSTAR filename */ + MSTARname = nullptr; /* Input MSTAR filename */ - tptr = ITK_NULLPTR; /* Temp buffer ptr */ - phdr = ITK_NULLPTR; /* Ptr to buffer to hold Phoenix header */ + tptr = nullptr; /* Temp buffer ptr */ + phdr = nullptr; /* Ptr to buffer to hold Phoenix header */ - FSCENEdata = ITK_NULLPTR; /* Ptr to Fullscene data buffer */ - CHIPdata = ITK_NULLPTR; /* Ptr to CHIp data buffer */ + FSCENEdata = nullptr; /* Ptr to Fullscene data buffer */ + CHIPdata = nullptr; /* Ptr to CHIp data buffer */ @@ -101,10 +101,10 @@ MSTARImageIO::MSTARImageIO() /** Destructor */ MSTARImageIO::~MSTARImageIO() { - if (phdr != ITK_NULLPTR) + if (phdr != nullptr) { free(phdr); - phdr = ITK_NULLPTR; + phdr = nullptr; } } @@ -120,7 +120,7 @@ bool MSTARImageIO::CanReadFile(const char* filename) MSTARname = filename; MSTARfp = fopen(MSTARname, "rb"); - if (MSTARfp == ITK_NULLPTR) + if (MSTARfp == nullptr) { otbMsgDevMacro(<< "\nError: Unable to open [" << MSTARname << "] for reading!\n"); return false; @@ -136,18 +136,18 @@ bool MSTARImageIO::CanReadFile(const char* filename) { otbMsgDevMacro(<< "\nError: Unable in reading [" << MSTARname << "] header... Only read ["<< returnVal <<" of 1024 bytes !\n"); fclose(MSTARfp); - MSTARfp = ITK_NULLPTR; + MSTARfp = nullptr; return false; } rewind(MSTARfp); /* Extract Phoenix Summary header length */ tptr = (char *) strstr(tbuff, "PhoenixHeaderLength= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { // fprintf(stderr,"Can not determine Phoenix header length!\n"); fclose(MSTARfp); - MSTARfp = ITK_NULLPTR; + MSTARfp = nullptr; return false; } else @@ -157,11 +157,11 @@ bool MSTARImageIO::CanReadFile(const char* filename) /* Check for and extract native header length */ tptr = (char *) strstr(tbuff, "native_header_length= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { // fprintf(stderr,"Can not determine native header length!\n"); fclose(MSTARfp); - MSTARfp = ITK_NULLPTR; + MSTARfp = nullptr; return false; } else @@ -171,7 +171,7 @@ bool MSTARImageIO::CanReadFile(const char* filename) /* Extract MSTAR column width */ tptr = (char *) strstr(tbuff, "NumberOfColumns= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { otbMsgDevMacro(<< "Error: Can not determine MSTAR image width"); fclose(MSTARfp); @@ -185,11 +185,11 @@ bool MSTARImageIO::CanReadFile(const char* filename) /* Extract MSTAR row height */ tptr = (char *) strstr(tbuff, "NumberOfRows= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { otbMsgDevMacro(<< "Error: Can not determine MSTAR image height!"); fclose(MSTARfp); - MSTARfp = ITK_NULLPTR; + MSTARfp = nullptr; return false; } else @@ -240,7 +240,7 @@ bool MSTARImageIO::CanReadFile(const char* filename) // free(phdr); fclose(MSTARfp); - MSTARfp = ITK_NULLPTR; + MSTARfp = nullptr; otbMsgDevMacro(<< "Can read MSTAR"); return bool(true); } @@ -270,7 +270,7 @@ void MSTARImageIO::Read(void* buffer) { MSTARfp = fopen(MSTARname, "rb"); - if (MSTARfp == ITK_NULLPTR) + if (MSTARfp == nullptr) { itkExceptionMacro(<< "Error: Unable to open file for reading!\n\n " << m_FileName.c_str() << ")."); } @@ -290,7 +290,7 @@ void MSTARImageIO::Read(void* buffer) /* Extract Phoenix Summary header length */ tptr = (char *) strstr(tbuff, "PhoenixHeaderLength= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { fclose(MSTARfp); itkExceptionMacro(<< "Error: Can not determine Phoenix header length!"); @@ -302,7 +302,7 @@ void MSTARImageIO::Read(void* buffer) /* Check for and extract native header length */ tptr = (char *) strstr(tbuff, "native_header_length= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { fclose(MSTARfp); itkExceptionMacro(<< "Can not determine native header length!\n"); @@ -314,7 +314,7 @@ void MSTARImageIO::Read(void* buffer) /* Extract MSTAR column width */ tptr = (char *) strstr(tbuff, "NumberOfColumns= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { fclose(MSTARfp); itkExceptionMacro(<< "Error: Can not determine MSTAR image width"); @@ -327,7 +327,7 @@ void MSTARImageIO::Read(void* buffer) /* Extract MSTAR row height */ tptr = (char *) strstr(tbuff, "NumberOfRows= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { fclose(MSTARfp); itkExceptionMacro(<< "Error: Can not determine MSTAR image height!"); @@ -434,7 +434,7 @@ void MSTARImageIO::Read(void* buffer) bytesPerImage = totchunks * sizeof(float); CHIPdata = (float *) malloc(bytesPerImage); - if (CHIPdata == (float *) ITK_NULLPTR) + if (CHIPdata == (float *) nullptr) { fclose(MSTARfp); itkExceptionMacro("Error: Unable to malloc CHIP memory!\n"); @@ -479,7 +479,7 @@ void MSTARImageIO::Read(void* buffer) case FSCENE_IMAGE: bytesPerImage = nchunks * sizeof(short); FSCENEdata = (unsigned short *) malloc(bytesPerImage); - if (FSCENEdata == (unsigned short *) ITK_NULLPTR) + if (FSCENEdata == (unsigned short *) nullptr) { fclose(MSTARfp); itkExceptionMacro(<< "Error: Unable to malloc fullscene memory!\n"); @@ -590,7 +590,7 @@ void MSTARImageIO::ReadImageInformation() MSTARname = m_FileName.c_str(); MSTARfp = fopen(MSTARname, "rb"); - if (MSTARfp == ITK_NULLPTR) + if (MSTARfp == nullptr) { itkExceptionMacro(<< "Error: Unable to open file for reading!\n\n " << m_FileName.c_str()); } @@ -610,7 +610,7 @@ void MSTARImageIO::ReadImageInformation() /* Extract Phoenix Summary header length */ tptr = (char *) strstr(tbuff, "PhoenixHeaderLength= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { fclose(MSTARfp); itkExceptionMacro(<< "Error: Can not determine Phoenix header length!"); @@ -622,7 +622,7 @@ void MSTARImageIO::ReadImageInformation() /* Check for and extract native header length */ tptr = (char *) strstr(tbuff, "native_header_length= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { fclose(MSTARfp); itkExceptionMacro(<< "Can not determine native header length!\n"); @@ -634,7 +634,7 @@ void MSTARImageIO::ReadImageInformation() /* Extract MSTAR column width */ tptr = (char *) strstr(tbuff, "NumberOfColumns= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { fclose(MSTARfp); itkExceptionMacro(<< "Error: Can not determine MSTAR image width"); @@ -647,7 +647,7 @@ void MSTARImageIO::ReadImageInformation() /* Extract MSTAR row height */ tptr = (char *) strstr(tbuff, "NumberOfRows= "); - if (tptr == (char *) ITK_NULLPTR) + if (tptr == (char *) nullptr) { fclose(MSTARfp); itkExceptionMacro(<< "Error: Can not determine MSTAR image height!"); diff --git a/Modules/IO/IOONERA/src/otbONERAImageIO.cxx b/Modules/IO/IOONERA/src/otbONERAImageIO.cxx index b1c18b4230..4c7979b5f5 100644 --- a/Modules/IO/IOONERA/src/otbONERAImageIO.cxx +++ b/Modules/IO/IOONERA/src/otbONERAImageIO.cxx @@ -233,7 +233,7 @@ void ONERAImageIO::Read(void* buffer) } delete[] value; - value = ITK_NULLPTR; + value = nullptr; } @@ -517,7 +517,7 @@ void ONERAImageIO::Write(const void* buffer) } delete[] tempmemory; - tempmemory = ITK_NULLPTR; + tempmemory = nullptr; } // To be consistent with the behavior of GDALImageIO diff --git a/Modules/IO/IORAD/src/otbRADImageIO.cxx b/Modules/IO/IORAD/src/otbRADImageIO.cxx index 0f7c44a62c..0a8ebfc428 100644 --- a/Modules/IO/IORAD/src/otbRADImageIO.cxx +++ b/Modules/IO/IORAD/src/otbRADImageIO.cxx @@ -64,7 +64,7 @@ RADImageIO::RADImageIO() // (consistency between ImageIO, see Mantis #942) m_Origin[0] = 0.5; m_Origin[1] = 0.5; - m_ChannelsFile = ITK_NULLPTR; + m_ChannelsFile = nullptr; m_FlagWriteImageInformation = true; this->AddSupportedWriteExtension(".rad"); @@ -82,7 +82,7 @@ RADImageIO::~RADImageIO() { m_HeaderFile.close(); } - if (m_ChannelsFile != ITK_NULLPTR) + if (m_ChannelsFile != nullptr) { for (unsigned int numChannel = 0; numChannel < m_NbOfChannels; ++numChannel) { @@ -161,7 +161,7 @@ void RADImageIO::Read(void* buffer) step = step * (unsigned long) (this->GetComponentSize()); char * value = new char[numberOfBytesToBeRead]; - if (value == ITK_NULLPTR) + if (value == nullptr) { itkExceptionMacro(<< "RADImageIO::Read(): Bad alloc"); return; @@ -223,7 +223,7 @@ void RADImageIO::Read(void* buffer) } delete[] value; - value = ITK_NULLPTR; + value = nullptr; } @@ -547,7 +547,7 @@ void RADImageIO::Write(const void* buffer) const char * p = static_cast<const char *>(buffer); char* value = new char[numberOfBytesToBeWrite]; - if (value == ITK_NULLPTR) + if (value == nullptr) { itkExceptionMacro(<< "RADImageIO::Write : Bad Alloc"); return; diff --git a/Modules/IO/IOTileMap/src/otbTileMapImageIO.cxx b/Modules/IO/IOTileMap/src/otbTileMapImageIO.cxx index 3c781f7803..6eaf94fbd8 100644 --- a/Modules/IO/IOTileMap/src/otbTileMapImageIO.cxx +++ b/Modules/IO/IOTileMap/src/otbTileMapImageIO.cxx @@ -107,7 +107,7 @@ TileMapImageIO::~TileMapImageIO() bool TileMapImageIO::CanReadFile(const char* file) { // First check the extension - if (file == ITK_NULLPTR) + if (file == nullptr) { itkDebugMacro(<< "No filename specified."); return false; @@ -148,7 +148,7 @@ void TileMapImageIO::PrintSelf(std::ostream& os, itk::Indent indent) const void TileMapImageIO::Read(void* buffer) { unsigned char * p = static_cast<unsigned char *>(buffer); - if (p == ITK_NULLPTR) + if (p == nullptr) { itkExceptionMacro(<< "Memory allocation error"); return; @@ -355,7 +355,7 @@ void TileMapImageIO::GenerateBuffer(unsigned char *p) void TileMapImageIO::ReadTile(const std::string& filename, void * buffer) { otbMsgDevMacro(<< "Retrieving " << filename); - unsigned char * bufferCacheFault = ITK_NULLPTR; + unsigned char * bufferCacheFault = nullptr; otb::ImageIOBase::Pointer imageIO; imageIO = otb::GDALImageIO::New(); @@ -531,7 +531,7 @@ void TileMapImageIO::ReadImageInformation() bool TileMapImageIO::CanWriteFile(const char* name) { // First if filename is provided - if (name == ITK_NULLPTR) + if (name == nullptr) { itkDebugMacro(<< "No filename specified."); return false; @@ -556,7 +556,7 @@ void TileMapImageIO::Write(const void* buffer) { const unsigned char * p = static_cast<const unsigned char *>(buffer); - if (p == ITK_NULLPTR) + if (p == nullptr) { itkExceptionMacro(<< "Memory allocation error"); return; diff --git a/Modules/IO/IOXML/include/otbStatisticsXMLFileReader.txx b/Modules/IO/IOXML/include/otbStatisticsXMLFileReader.txx index 3ae91783eb..186ab47bd1 100644 --- a/Modules/IO/IOXML/include/otbStatisticsXMLFileReader.txx +++ b/Modules/IO/IOXML/include/otbStatisticsXMLFileReader.txx @@ -183,7 +183,7 @@ StatisticsXMLFileReader<TMeasurementVector> { // Iterate through the tree to get all the stats for( TiXmlElement* currentStat = root->FirstChildElement(); - currentStat != ITK_NULLPTR; + currentStat != nullptr; currentStat = currentStat->NextSiblingElement() ) { InputDataType currentStatisticVector; @@ -197,7 +197,7 @@ StatisticsXMLFileReader<TMeasurementVector> std::vector<double> tempMeasurementVector; for( TiXmlElement* sample = currentStat->FirstChildElement("StatisticVector"); - sample != ITK_NULLPTR; + sample != nullptr; sample = sample->NextSiblingElement() ) { // Get the current value of the statistic vector @@ -224,24 +224,24 @@ StatisticsXMLFileReader<TMeasurementVector> { // Iterate through the tree to get all the stats for( TiXmlElement* currentStat = root->FirstChildElement(); - currentStat != ITK_NULLPTR; + currentStat != nullptr; currentStat = currentStat->NextSiblingElement() ) { GenericMapType currentMap; std::string currentName(currentStat->Attribute("name")); for( TiXmlElement* sample = currentStat->FirstChildElement("StatisticMap"); - sample != ITK_NULLPTR; + sample != nullptr; sample = sample->NextSiblingElement() ) { // Get the current pair of the statistic map const char *c_key = sample->Attribute("key"); const char *c_value = sample->Attribute("value"); - if (c_key == ITK_NULLPTR) + if (c_key == nullptr) { itkExceptionMacro("'key' attribute not found in StatisticMap !"); } - if (c_value == ITK_NULLPTR) + if (c_value == nullptr) { itkExceptionMacro("'value' attribute not found in StatisticMap !"); } diff --git a/Modules/IO/IOXML/include/otbStatisticsXMLFileWriter.txx b/Modules/IO/IOXML/include/otbStatisticsXMLFileWriter.txx index b20416b4d7..0d6e659374 100644 --- a/Modules/IO/IOXML/include/otbStatisticsXMLFileWriter.txx +++ b/Modules/IO/IOXML/include/otbStatisticsXMLFileWriter.txx @@ -85,7 +85,7 @@ StatisticsXMLFileWriter<TMeasurementVector> TiXmlDeclaration* decl = new TiXmlDeclaration( "1.0", "", "" ); doc.LinkEndChild( decl ); - TiXmlElement * root = ITK_NULLPTR; + TiXmlElement * root = nullptr; if (m_MeasurementVectorContainer.size()) { root = new TiXmlElement( "FeatureStatistics"); @@ -114,7 +114,7 @@ StatisticsXMLFileWriter<TMeasurementVector> } // Iterate on map containers - TiXmlElement * mapRoot = ITK_NULLPTR; + TiXmlElement * mapRoot = nullptr; if (m_GenericMapContainer.size()) { mapRoot = new TiXmlElement( "GeneralStatistics"); diff --git a/Modules/IO/ImageIO/include/otbImageFileWriter.txx b/Modules/IO/ImageIO/include/otbImageFileWriter.txx index f61c624d02..2a2a325555 100644 --- a/Modules/IO/ImageIO/include/otbImageFileWriter.txx +++ b/Modules/IO/ImageIO/include/otbImageFileWriter.txx @@ -257,7 +257,7 @@ ImageFileWriter<TInputImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageType*>(this->ProcessObject::GetInput(0)); @@ -841,7 +841,7 @@ ImageFileWriter<TInputImage> { this->m_FilenameHelper->SetExtendedFileName(extendedFileName); m_FileName = this->m_FilenameHelper->GetSimpleFileName(); - m_ImageIO = ITK_NULLPTR; + m_ImageIO = nullptr; this->Modified(); } diff --git a/Modules/IO/ImageIO/include/otbScalarBufferToImageFileWriter.txx b/Modules/IO/ImageIO/include/otbScalarBufferToImageFileWriter.txx index 32cf104ba1..e18329a002 100644 --- a/Modules/IO/ImageIO/include/otbScalarBufferToImageFileWriter.txx +++ b/Modules/IO/ImageIO/include/otbScalarBufferToImageFileWriter.txx @@ -31,7 +31,7 @@ namespace otb { template<class TBufferType, class TOutputPixelType> ScalarBufferToImageFileWriter<TBufferType, TOutputPixelType> -::ScalarBufferToImageFileWriter() : m_Buffer(ITK_NULLPTR), m_NumberOfChannels(0), m_InverseXSpacing(false) +::ScalarBufferToImageFileWriter() : m_Buffer(nullptr), m_NumberOfChannels(0), m_InverseXSpacing(false) { m_Writer = WriterType::New(); m_ImageSize.Fill(0); diff --git a/Modules/IO/ImageIO/src/otbImageIOFactory.cxx b/Modules/IO/ImageIO/src/otbImageIOFactory.cxx index 1f084b6afd..dd22485095 100644 --- a/Modules/IO/ImageIO/src/otbImageIOFactory.cxx +++ b/Modules/IO/ImageIO/src/otbImageIOFactory.cxx @@ -77,7 +77,7 @@ ImageIOFactory::CreateImageIO(const char* path, FileModeType mode) } } } - return ITK_NULLPTR; + return nullptr; } void diff --git a/Modules/IO/ImageIO/test/otbImageIOFactoryNew.cxx b/Modules/IO/ImageIO/test/otbImageIOFactoryNew.cxx index 20405c7488..8acb329a32 100644 --- a/Modules/IO/ImageIO/test/otbImageIOFactoryNew.cxx +++ b/Modules/IO/ImageIO/test/otbImageIOFactoryNew.cxx @@ -28,6 +28,6 @@ int otbImageIOFactoryNew(int itkNotUsed(argc), char * itkNotUsed(argv) []) { otb::ImageIOFactory *lImageIOFactory; - lImageIOFactory = ITK_NULLPTR; - return lImageIOFactory != ITK_NULLPTR; //to avoid unused variable warning + lImageIOFactory = nullptr; + return lImageIOFactory != nullptr; //to avoid unused variable warning } diff --git a/Modules/IO/ImageIO/test/otbScalarBufferToImageFileWriterTest.cxx b/Modules/IO/ImageIO/test/otbScalarBufferToImageFileWriterTest.cxx index cf0df83e63..b52b307359 100644 --- a/Modules/IO/ImageIO/test/otbScalarBufferToImageFileWriterTest.cxx +++ b/Modules/IO/ImageIO/test/otbScalarBufferToImageFileWriterTest.cxx @@ -60,7 +60,7 @@ int otbScalarBufferToImageFileWriterTest(int itkNotUsed(argc), char* argv[]) filter->Update(); delete[] tab; - tab = ITK_NULLPTR; + tab = nullptr; return EXIT_SUCCESS; } diff --git a/Modules/IO/KMZWriter/include/otbKmzProductWriter.txx b/Modules/IO/KMZWriter/include/otbKmzProductWriter.txx index 483cc84e6e..5e54d1e86d 100644 --- a/Modules/IO/KMZWriter/include/otbKmzProductWriter.txx +++ b/Modules/IO/KMZWriter/include/otbKmzProductWriter.txx @@ -50,7 +50,7 @@ KmzProductWriter<TInputImage> { // Reset the boost::intrusive_ptr<KmzFile> : // TODO : when upgrading boost > 1.42 use method release(). - m_KmzFile = ITK_NULLPTR; + m_KmzFile = nullptr; } /** @@ -87,7 +87,7 @@ KmzProductWriter<TInputImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage * > @@ -273,7 +273,7 @@ KmzProductWriter<TInputImage> // Build wgs ref to compute long/lat OGRSpatialReference oSRS; oSRS.SetWellKnownGeogCS("WGS84"); - char * wgsRef = ITK_NULLPTR; + char * wgsRef = nullptr; oSRS.exportToWkt(&wgsRef); // Update image base information diff --git a/Modules/IO/TestKernel/include/otbTestHelper.h b/Modules/IO/TestKernel/include/otbTestHelper.h index 0bf593400f..fe7c39636c 100644 --- a/Modules/IO/TestKernel/include/otbTestHelper.h +++ b/Modules/IO/TestKernel/include/otbTestHelper.h @@ -163,8 +163,8 @@ private: OGRLayer * test_poLayer, const char *test_pszWHERE, OGRGeometry *test_poSpatialFilter, int& nbdiff) const; - static void DumpOGRFeature(FILE* fileid, OGRFeature* feature, char** papszOptions = ITK_NULLPTR); - static void DumpOGRGeometry(FILE* fileid, OGRGeometry* geometry, const char * pszPrefix, char** papszOptions = ITK_NULLPTR); + static void DumpOGRFeature(FILE* fileid, OGRFeature* feature, char** papszOptions = nullptr); + static void DumpOGRGeometry(FILE* fileid, OGRGeometry* geometry, const char * pszPrefix, char** papszOptions = nullptr); double m_ToleranceDiffValue; double m_Epsilon; diff --git a/Modules/IO/TestKernel/src/otbTestDriver.cxx b/Modules/IO/TestKernel/src/otbTestDriver.cxx index 349a224db4..aa0732f02d 100644 --- a/Modules/IO/TestKernel/src/otbTestDriver.cxx +++ b/Modules/IO/TestKernel/src/otbTestDriver.cxx @@ -180,7 +180,7 @@ int main(int ac, char* av[]) { argv[i + 1] = remainingArgs[i]; } - argv[remainingArgs.size() + 1] = ITK_NULLPTR; + argv[remainingArgs.size() + 1] = nullptr; /** Call to the otbTestMain */ return otbTestMain(static_cast<int>(remainingArgs.size()), argv); @@ -198,7 +198,7 @@ int Execute(int argc, char * argv[]) itksysProcess_SetPipeShared(process, itksysProcess_Pipe_STDOUT, true); itksysProcess_SetPipeShared(process, itksysProcess_Pipe_STDERR, true); itksysProcess_Execute(process); - itksysProcess_WaitForExit(process, ITK_NULLPTR); + itksysProcess_WaitForExit(process, nullptr); int retCode = itksysProcess_GetExitValue(process); return retCode; } diff --git a/Modules/IO/TestKernel/src/otbTestHelper.cxx b/Modules/IO/TestKernel/src/otbTestHelper.cxx index a7c84deb09..df603c78aa 100644 --- a/Modules/IO/TestKernel/src/otbTestHelper.cxx +++ b/Modules/IO/TestKernel/src/otbTestHelper.cxx @@ -1727,31 +1727,31 @@ int TestHelper::RegressionTestOgrFile(const char *testOgrFilename, const char *b /* -------------------------------------------------------------------- */ /* Open data source. */ /* -------------------------------------------------------------------- */ - otb::ogr::version_proxy::GDALDatasetType *ref_poDS = ITK_NULLPTR; - otb::ogr::version_proxy::GDALDriverType * ref_poDriver = ITK_NULLPTR; + otb::ogr::version_proxy::GDALDatasetType *ref_poDS = nullptr; + otb::ogr::version_proxy::GDALDriverType * ref_poDriver = nullptr; //OGRGeometry * ref_poSpatialFilter = NULL; - otb::ogr::version_proxy::GDALDatasetType *test_poDS = ITK_NULLPTR; - otb::ogr::version_proxy::GDALDriverType * test_poDriver = ITK_NULLPTR; + otb::ogr::version_proxy::GDALDatasetType *test_poDS = nullptr; + otb::ogr::version_proxy::GDALDriverType * test_poDriver = nullptr; //OGRGeometry * test_poSpatialFilter = NULL; ref_poDS = otb::ogr::version_proxy::Open(ref_pszDataSource, false); - if (ref_poDS == ITK_NULLPTR && !bReadOnly) + if (ref_poDS == nullptr && !bReadOnly) { ref_poDS = otb::ogr::version_proxy::Open(ref_pszDataSource, true); bReadOnly = TRUE; - if (ref_poDS != ITK_NULLPTR && m_ReportErrors) + if (ref_poDS != nullptr && m_ReportErrors) { std::cout << "Had to open REF data source read-only."<<std::endl; } } test_poDS = otb::ogr::version_proxy::Open(ref_pszDataSource, bReadOnly); - if (test_poDS == ITK_NULLPTR && !bReadOnly) + if (test_poDS == nullptr && !bReadOnly) { test_poDS = otb::ogr::version_proxy::Open(ref_pszDataSource, bReadOnly); bReadOnly = TRUE; - if (test_poDS != ITK_NULLPTR && m_ReportErrors) + if (test_poDS != nullptr && m_ReportErrors) { std::cout << "Had to open TEST data source read-only."<<std::endl; } @@ -1759,7 +1759,7 @@ int TestHelper::RegressionTestOgrFile(const char *testOgrFilename, const char *b /* -------------------------------------------------------------------- */ /* Report failure */ /* -------------------------------------------------------------------- */ - if (ref_poDS == ITK_NULLPTR) + if (ref_poDS == nullptr) { if (m_ReportErrors) @@ -1778,7 +1778,7 @@ int TestHelper::RegressionTestOgrFile(const char *testOgrFilename, const char *b ref_poDriver = ref_poDS->GetDriver(); CPLAssert(ref_poDriver != NULL); - if (test_poDS == ITK_NULLPTR) + if (test_poDS == nullptr) { if (m_ReportErrors) { @@ -1834,14 +1834,14 @@ int TestHelper::RegressionTestOgrFile(const char *testOgrFilename, const char *b OGRLayer *ref_poLayer = ref_poDS->GetLayer(iLayer); OGRLayer *test_poLayer = test_poDS->GetLayer(iLayer); - if (ref_poLayer == ITK_NULLPTR) + if (ref_poLayer == nullptr) { if (m_ReportErrors) std::cout << "FAILURE: Couldn't fetch advertised layer " << iLayer << " for REF data source" << std::endl; return (1); } - if (test_poLayer == ITK_NULLPTR) + if (test_poLayer == nullptr) { if (m_ReportErrors) std::cout << "FAILURE: Couldn't fetch advertised layer " << iLayer << @@ -1850,20 +1850,20 @@ int TestHelper::RegressionTestOgrFile(const char *testOgrFilename, const char *b } //Check Layer inforamtion - ogrReportOnLayer(ref_poLayer, ITK_NULLPTR, ITK_NULLPTR, test_poLayer, ITK_NULLPTR, ITK_NULLPTR, nbdiff); + ogrReportOnLayer(ref_poLayer, nullptr, nullptr, test_poLayer, nullptr, nullptr, nbdiff); //If no difference, check the feature if (nbdiff == 0) { - OGRFeature * ref_poFeature = ITK_NULLPTR; - OGRFeature * test_poFeature = ITK_NULLPTR; + OGRFeature * ref_poFeature = nullptr; + OGRFeature * test_poFeature = nullptr; std::string basefilename(test_pszDataSource); int nbFeature(0); std::stringstream oss2; oss2.str(""); oss2 << iLayer; - while ((ref_poFeature = ref_poLayer->GetNextFeature()) != ITK_NULLPTR) + while ((ref_poFeature = ref_poLayer->GetNextFeature()) != nullptr) { test_poFeature = test_poLayer->GetNextFeature(); std::stringstream oss; @@ -1874,9 +1874,9 @@ int TestHelper::RegressionTestOgrFile(const char *testOgrFilename, const char *b + "_ref.txt"; std::string test_filename = basefilename + "_temporary_layer_" + oss2.str() + "_feature_" + oss.str() + "_test.txt"; - FILE *ref_f(ITK_NULLPTR); + FILE *ref_f(nullptr); ref_f = fopen(ref_filename.c_str(), "w"); - if (ref_f == ITK_NULLPTR) + if (ref_f == nullptr) { itkGenericExceptionMacro(<< "Impossible to create ASCII file <" << ref_filename << ">."); } @@ -1884,9 +1884,9 @@ int TestHelper::RegressionTestOgrFile(const char *testOgrFilename, const char *b OGRFeature::DestroyFeature( ref_poFeature ); fclose(ref_f); - FILE *test_f(ITK_NULLPTR); + FILE *test_f(nullptr); test_f = fopen(test_filename.c_str(), "w"); - if (test_f == ITK_NULLPTR) + if (test_f == nullptr) { itkGenericExceptionMacro(<< "Impossible to create ASCII file <" << test_filename << ">."); } @@ -1919,7 +1919,7 @@ int TestHelper::RegressionTestOgrFile(const char *testOgrFilename, const char *b void TestHelper::DumpOGRFeature(FILE* fpOut, OGRFeature* feature, char** papszOptions) { - if (fpOut == ITK_NULLPTR) fpOut = stdout; + if (fpOut == nullptr) fpOut = stdout; if(!feature) { @@ -1931,7 +1931,7 @@ void TestHelper::DumpOGRFeature(FILE* fpOut, OGRFeature* feature, char** papszOp const char* pszDisplayFields = CSLFetchNameValue(papszOptions, "DISPLAY_FIELDS"); - if (pszDisplayFields == ITK_NULLPTR || CSLTestBoolean(pszDisplayFields)) + if (pszDisplayFields == nullptr || CSLTestBoolean(pszDisplayFields)) { for (int iField = 0; iField < feature->GetFieldCount(); iField++) { @@ -1947,21 +1947,21 @@ void TestHelper::DumpOGRFeature(FILE* fpOut, OGRFeature* feature, char** papszOp } } - if (feature->GetStyleString() != ITK_NULLPTR) + if (feature->GetStyleString() != nullptr) { const char* pszDisplayStyle = CSLFetchNameValue(papszOptions, "DISPLAY_STYLE"); - if (pszDisplayStyle == ITK_NULLPTR || CSLTestBoolean(pszDisplayStyle)) + if (pszDisplayStyle == nullptr || CSLTestBoolean(pszDisplayStyle)) { fprintf(fpOut, " Style = %s\n", feature->GetStyleString()); } } - if (feature->GetGeometryRef() != ITK_NULLPTR) + if (feature->GetGeometryRef() != nullptr) { const char* pszDisplayGeometry = CSLFetchNameValue(papszOptions, "DISPLAY_GEOMETRY"); - if (!(pszDisplayGeometry != ITK_NULLPTR && EQUAL(pszDisplayGeometry, "NO"))) + if (!(pszDisplayGeometry != nullptr && EQUAL(pszDisplayGeometry, "NO"))) { DumpOGRGeometry(fpOut, feature->GetGeometryRef(), " ", papszOptions); } @@ -1972,15 +1972,15 @@ void TestHelper::DumpOGRFeature(FILE* fpOut, OGRFeature* feature, char** papszOp void TestHelper::DumpOGRGeometry(FILE* fp, OGRGeometry* geometry, const char * pszPrefix, char** papszOptions) { - char *pszWkt = ITK_NULLPTR; + char *pszWkt = nullptr; - if (pszPrefix == ITK_NULLPTR) pszPrefix = ""; + if (pszPrefix == nullptr) pszPrefix = ""; - if (fp == ITK_NULLPTR) fp = stdout; + if (fp == nullptr) fp = stdout; const char* pszDisplayGeometry = CSLFetchNameValue(papszOptions, "DISPLAY_GEOMETRY"); - if (pszDisplayGeometry != ITK_NULLPTR && EQUAL(pszDisplayGeometry, "SUMMARY")) + if (pszDisplayGeometry != nullptr && EQUAL(pszDisplayGeometry, "SUMMARY")) { OGRLineString * poLine; OGRPolygon * poPoly; @@ -2049,7 +2049,7 @@ void TestHelper::DumpOGRGeometry(FILE* fp, OGRGeometry* geometry, const char * p break; } } - else if (pszDisplayGeometry == ITK_NULLPTR || CSLTestBoolean(pszDisplayGeometry) || + else if (pszDisplayGeometry == nullptr || CSLTestBoolean(pszDisplayGeometry) || EQUAL(pszDisplayGeometry, "WKT")) { if (geometry->exportToWkt(&pszWkt) == OGRERR_NONE) @@ -2548,13 +2548,13 @@ void TestHelper::ogrReportOnLayer(OGRLayer * ref_poLayer, /* -------------------------------------------------------------------- */ otbCheckStringValue("pszWHERE", ref_pszWHERE, test_pszWHERE, nbdiff, m_ReportErrors); - if (ref_pszWHERE != ITK_NULLPTR) ref_poLayer->SetAttributeFilter(ref_pszWHERE); + if (ref_pszWHERE != nullptr) ref_poLayer->SetAttributeFilter(ref_pszWHERE); - if (ref_poSpatialFilter != ITK_NULLPTR) ref_poLayer->SetSpatialFilter(ref_poSpatialFilter); + if (ref_poSpatialFilter != nullptr) ref_poLayer->SetSpatialFilter(ref_poSpatialFilter); - if (test_pszWHERE != ITK_NULLPTR) test_poLayer->SetAttributeFilter(test_pszWHERE); + if (test_pszWHERE != nullptr) test_poLayer->SetAttributeFilter(test_pszWHERE); - if (test_poSpatialFilter != ITK_NULLPTR) test_poLayer->SetSpatialFilter(test_poSpatialFilter); + if (test_poSpatialFilter != nullptr) test_poLayer->SetSpatialFilter(test_poSpatialFilter); /* -------------------------------------------------------------------- */ /* Report various overall information. */ @@ -2585,12 +2585,12 @@ void TestHelper::ogrReportOnLayer(OGRLayer * ref_poLayer, char *ref_pszWKT; char *test_pszWKT; - if (ref_poLayer->GetSpatialRef() == ITK_NULLPTR) ref_pszWKT = CPLStrdup("(unknown)"); + if (ref_poLayer->GetSpatialRef() == nullptr) ref_pszWKT = CPLStrdup("(unknown)"); else { ref_poLayer->GetSpatialRef()->exportToPrettyWkt(&ref_pszWKT); } - if (test_poLayer->GetSpatialRef() == ITK_NULLPTR) test_pszWKT = CPLStrdup("(unknown)"); + if (test_poLayer->GetSpatialRef() == nullptr) test_pszWKT = CPLStrdup("(unknown)"); else { test_poLayer->GetSpatialRef()->exportToPrettyWkt(&test_pszWKT); diff --git a/Modules/IO/VectorDataIO/include/otbVectorDataFileReader.txx b/Modules/IO/VectorDataIO/include/otbVectorDataFileReader.txx index b6553a7f82..222c813c57 100644 --- a/Modules/IO/VectorDataIO/include/otbVectorDataFileReader.txx +++ b/Modules/IO/VectorDataIO/include/otbVectorDataFileReader.txx @@ -40,7 +40,7 @@ namespace otb template <class TOutputVectorData> VectorDataFileReader<TOutputVectorData> ::VectorDataFileReader() : - m_VectorDataIO(ITK_NULLPTR), + m_VectorDataIO(nullptr), m_UserSpecifiedVectorDataIO(false), m_FileName("") { diff --git a/Modules/IO/VectorDataIO/include/otbVectorDataFileWriter.txx b/Modules/IO/VectorDataIO/include/otbVectorDataFileWriter.txx index 11e42aa6cd..d0d66eed74 100644 --- a/Modules/IO/VectorDataIO/include/otbVectorDataFileWriter.txx +++ b/Modules/IO/VectorDataIO/include/otbVectorDataFileWriter.txx @@ -37,7 +37,7 @@ template <class TInputVectorData> VectorDataFileWriter<TInputVectorData> ::VectorDataFileWriter() : m_FileName(""), - m_VectorDataIO(ITK_NULLPTR), + m_VectorDataIO(nullptr), m_UserSpecifiedVectorDataIO(false), m_FactorySpecifiedVectorDataIO(false) { @@ -70,7 +70,7 @@ VectorDataFileWriter<TInputVectorData> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TInputVectorData*> @@ -97,7 +97,7 @@ VectorDataFileWriter<TInputVectorData> itkDebugMacro(<< "Writing a vector data file"); // Make sure input is available - if (input == ITK_NULLPTR) + if (input == nullptr) { itkExceptionMacro(<< "No input to writer!"); } diff --git a/Modules/IO/VectorDataIO/src/otbVectorDataIOFactory.cxx b/Modules/IO/VectorDataIO/src/otbVectorDataIOFactory.cxx index 611fe71761..6082c2a9ed 100644 --- a/Modules/IO/VectorDataIO/src/otbVectorDataIOFactory.cxx +++ b/Modules/IO/VectorDataIO/src/otbVectorDataIOFactory.cxx @@ -77,7 +77,7 @@ VectorDataIOFactory } } - return ITK_NULLPTR; + return nullptr; } void diff --git a/Modules/Learning/DempsterShafer/include/otbDSFusionOfClassifiersImageFilter.txx b/Modules/Learning/DempsterShafer/include/otbDSFusionOfClassifiersImageFilter.txx index 4fb4231f94..cf618e75c2 100644 --- a/Modules/Learning/DempsterShafer/include/otbDSFusionOfClassifiersImageFilter.txx +++ b/Modules/Learning/DempsterShafer/include/otbDSFusionOfClassifiersImageFilter.txx @@ -62,7 +62,7 @@ DSFusionOfClassifiersImageFilter<TInputImage, TOutputImage, TMaskImage> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const MaskImageType *>(this->itk::ProcessObject::GetInput(1)); } diff --git a/Modules/Learning/DempsterShafer/include/otbJointMassOfBeliefFilter.txx b/Modules/Learning/DempsterShafer/include/otbJointMassOfBeliefFilter.txx index 7bfe40c961..35b893df34 100644 --- a/Modules/Learning/DempsterShafer/include/otbJointMassOfBeliefFilter.txx +++ b/Modules/Learning/DempsterShafer/include/otbJointMassOfBeliefFilter.txx @@ -86,7 +86,7 @@ JointMassOfBeliefFilter<TMassFunction> { if(this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<MassFunctionType *>(this->itk::ProcessObject::GetOutput(0)); } diff --git a/Modules/Learning/DimensionalityReductionLearning/include/otbAutoencoderModel.h b/Modules/Learning/DimensionalityReductionLearning/include/otbAutoencoderModel.h index 5fe7ec2f27..69446f002b 100644 --- a/Modules/Learning/DimensionalityReductionLearning/include/otbAutoencoderModel.h +++ b/Modules/Learning/DimensionalityReductionLearning/include/otbAutoencoderModel.h @@ -154,14 +154,14 @@ protected: virtual TargetSampleType DoPredict( const InputSampleType& input, - ConfidenceValueType * quality = ITK_NULLPTR) const override; + ConfidenceValueType * quality = nullptr) const override; virtual void DoPredictBatch( const InputListSampleType *, const unsigned int & startIndex, const unsigned int & size, TargetListSampleType *, - ConfidenceListSampleType * quality = ITK_NULLPTR) const override; + ConfidenceListSampleType * quality = nullptr) const override; private: /** Internal Network */ diff --git a/Modules/Learning/DimensionalityReductionLearning/include/otbDimensionalityReductionModelFactory.txx b/Modules/Learning/DimensionalityReductionLearning/include/otbDimensionalityReductionModelFactory.txx index 451fce5b7c..0760e15142 100644 --- a/Modules/Learning/DimensionalityReductionLearning/include/otbDimensionalityReductionModelFactory.txx +++ b/Modules/Learning/DimensionalityReductionLearning/include/otbDimensionalityReductionModelFactory.txx @@ -97,7 +97,7 @@ DimensionalityReductionModelFactory<TInputValue,TOutputValue> } } } - return ITK_NULLPTR; + return nullptr; } template <class TInputValue, class TOutputValue> diff --git a/Modules/Learning/DimensionalityReductionLearning/include/otbImageDimensionalityReductionFilter.txx b/Modules/Learning/DimensionalityReductionLearning/include/otbImageDimensionalityReductionFilter.txx index 140a8cd874..b48a264a36 100644 --- a/Modules/Learning/DimensionalityReductionLearning/include/otbImageDimensionalityReductionFilter.txx +++ b/Modules/Learning/DimensionalityReductionLearning/include/otbImageDimensionalityReductionFilter.txx @@ -59,7 +59,7 @@ ImageDimensionalityReductionFilter<TInputImage, TOutputImage, TMaskImage> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const MaskImageType *>(this->itk::ProcessObject::GetInput(1)); } @@ -72,7 +72,7 @@ ImageDimensionalityReductionFilter<TInputImage, TOutputImage, TMaskImage> { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<ConfidenceImageType *>(this->itk::ProcessObject::GetOutput(1)); } diff --git a/Modules/Learning/DimensionalityReductionLearning/include/otbPCAModel.h b/Modules/Learning/DimensionalityReductionLearning/include/otbPCAModel.h index cfecceb390..501a4618d4 100644 --- a/Modules/Learning/DimensionalityReductionLearning/include/otbPCAModel.h +++ b/Modules/Learning/DimensionalityReductionLearning/include/otbPCAModel.h @@ -94,14 +94,14 @@ protected: virtual TargetSampleType DoPredict( const InputSampleType& input, - ConfidenceValueType * quality = ITK_NULLPTR) const override; + ConfidenceValueType * quality = nullptr) const override; virtual void DoPredictBatch( const InputListSampleType *, const unsigned int & startIndex, const unsigned int & size, TargetListSampleType *, - ConfidenceListSampleType * quality = ITK_NULLPTR) const override; + ConfidenceListSampleType * quality = nullptr) const override; private: shark::LinearModel<> m_Encoder; diff --git a/Modules/Learning/DimensionalityReductionLearning/include/otbSOMModel.h b/Modules/Learning/DimensionalityReductionLearning/include/otbSOMModel.h index e7c77a245c..d1f2ec37ce 100644 --- a/Modules/Learning/DimensionalityReductionLearning/include/otbSOMModel.h +++ b/Modules/Learning/DimensionalityReductionLearning/include/otbSOMModel.h @@ -118,7 +118,7 @@ private: virtual TargetSampleType DoPredict( const InputSampleType& input, - ConfidenceValueType * quality = ITK_NULLPTR) const override; + ConfidenceValueType * quality = nullptr) const override; /** Map size (width, height) */ SizeType m_MapSize; diff --git a/Modules/Learning/LearningBase/include/otbGaussianModelComponent.txx b/Modules/Learning/LearningBase/include/otbGaussianModelComponent.txx index 122d9fbe03..ada1f2d3c5 100644 --- a/Modules/Learning/LearningBase/include/otbGaussianModelComponent.txx +++ b/Modules/Learning/LearningBase/include/otbGaussianModelComponent.txx @@ -37,8 +37,8 @@ template<class TSample> GaussianModelComponent<TSample> ::GaussianModelComponent() { - m_CovarianceEstimator = ITK_NULLPTR; - m_GaussianMembershipFunction = ITK_NULLPTR; + m_CovarianceEstimator = nullptr; + m_GaussianMembershipFunction = nullptr; } template<class TSample> diff --git a/Modules/Learning/LearningBase/include/otbImageClassificationFilter.txx b/Modules/Learning/LearningBase/include/otbImageClassificationFilter.txx index bc49d13f67..3306f71872 100644 --- a/Modules/Learning/LearningBase/include/otbImageClassificationFilter.txx +++ b/Modules/Learning/LearningBase/include/otbImageClassificationFilter.txx @@ -61,7 +61,7 @@ ImageClassificationFilter<TInputImage, TOutputImage, TMaskImage> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const MaskImageType *>(this->itk::ProcessObject::GetInput(1)); } @@ -74,7 +74,7 @@ ImageClassificationFilter<TInputImage, TOutputImage, TMaskImage> { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<ConfidenceImageType *>(this->itk::ProcessObject::GetOutput(1)); } diff --git a/Modules/Learning/LearningBase/include/otbKMeansImageClassificationFilter.txx b/Modules/Learning/LearningBase/include/otbKMeansImageClassificationFilter.txx index 0109665150..98a1b9ae80 100644 --- a/Modules/Learning/LearningBase/include/otbKMeansImageClassificationFilter.txx +++ b/Modules/Learning/LearningBase/include/otbKMeansImageClassificationFilter.txx @@ -55,7 +55,7 @@ KMeansImageClassificationFilter<TInputImage, TOutputImage, VMaxSampleDimension, { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const MaskImageType *>(this->itk::ProcessObject::GetInput(1)); } diff --git a/Modules/Learning/LearningBase/include/otbMachineLearningModel.h b/Modules/Learning/LearningBase/include/otbMachineLearningModel.h index 49e409ec8f..f2fd4e46b4 100644 --- a/Modules/Learning/LearningBase/include/otbMachineLearningModel.h +++ b/Modules/Learning/LearningBase/include/otbMachineLearningModel.h @@ -114,7 +114,7 @@ public: * quality value, or NULL * \return The predicted label */ - TargetSampleType Predict(const InputSampleType& input, ConfidenceValueType *quality = ITK_NULLPTR) const; + TargetSampleType Predict(const InputSampleType& input, ConfidenceValueType *quality = nullptr) const; /**\name Set and get the dimension of the model for dimensionality reduction models */ //@{ @@ -130,7 +130,7 @@ public: * Note that this method will be multi-threaded if OTB is built * with OpenMP. */ - typename TargetListSampleType::Pointer PredictBatch(const InputListSampleType * input, ConfidenceListSampleType * quality = ITK_NULLPTR) const; + typename TargetListSampleType::Pointer PredictBatch(const InputListSampleType * input, ConfidenceListSampleType * quality = nullptr) const; /**\name Classification model file manipulation */ //@{ @@ -230,7 +230,7 @@ private: * Also set m_IsDoPredictBatchMultiThreaded to true if internal * implementation allows for parallel batch prediction. */ - virtual void DoPredictBatch(const InputListSampleType * input, const unsigned int & startIndex, const unsigned int & size, TargetListSampleType * target, ConfidenceListSampleType * quality = ITK_NULLPTR) const; + virtual void DoPredictBatch(const InputListSampleType * input, const unsigned int & startIndex, const unsigned int & size, TargetListSampleType * target, ConfidenceListSampleType * quality = nullptr) const; /** Actual implementation of single sample prediction * \param input sample to predict @@ -238,7 +238,7 @@ private: * or NULL * \return The predicted label */ - virtual TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType * quality= ITK_NULLPTR) const = 0; + virtual TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType * quality= nullptr) const = 0; MachineLearningModel(const Self &); //purposely not implemented void operator =(const Self&); //purposely not implemented diff --git a/Modules/Learning/LearningBase/include/otbMachineLearningModel.txx b/Modules/Learning/LearningBase/include/otbMachineLearningModel.txx index a983cb2fa0..46b7f60016 100644 --- a/Modules/Learning/LearningBase/include/otbMachineLearningModel.txx +++ b/Modules/Learning/LearningBase/include/otbMachineLearningModel.txx @@ -84,7 +84,7 @@ MachineLearningModel<TInputValue,TOutputValue,TConfidenceValue> typename TargetListSampleType::Pointer targets = TargetListSampleType::New(); targets->Resize(input->Size()); - if(quality!=ITK_NULLPTR) + if(quality!=nullptr) { quality->Clear(); quality->Resize(input->Size()); @@ -137,18 +137,18 @@ void MachineLearningModel<TInputValue,TOutputValue,TConfidenceValue> ::DoPredictBatch(const InputListSampleType * input, const unsigned int & startIndex, const unsigned int & size, TargetListSampleType * targets, ConfidenceListSampleType * quality) const { - assert(input != ITK_NULLPTR); - assert(targets != ITK_NULLPTR); + assert(input != nullptr); + assert(targets != nullptr); assert(input->Size()==targets->Size()&&"Input sample list and target label list do not have the same size."); - assert(((quality==ITK_NULLPTR)||(quality->Size()==input->Size()))&&"Quality samples list is not null and does not have the same size as input samples list"); + assert(((quality==nullptr)||(quality->Size()==input->Size()))&&"Quality samples list is not null and does not have the same size as input samples list"); if(startIndex+size>input->Size()) { itkExceptionMacro(<<"requested range ["<<startIndex<<", "<<startIndex+size<<"[ partially outside input sample list range.[0,"<<input->Size()<<"["); } - if(quality != ITK_NULLPTR) + if(quality != nullptr) { for(unsigned int id = startIndex;id<startIndex+size;++id) { diff --git a/Modules/Learning/LearningBase/include/otbSEMClassifier.txx b/Modules/Learning/LearningBase/include/otbSEMClassifier.txx index cf81faa93b..5e926710ea 100644 --- a/Modules/Learning/LearningBase/include/otbSEMClassifier.txx +++ b/Modules/Learning/LearningBase/include/otbSEMClassifier.txx @@ -44,15 +44,15 @@ SEMClassifier<TInputImage, TOutputImage> m_TerminationCode = NOT_CONVERGED; m_ExternalLabels = 0; m_ComponentDeclared = 0; - m_Sample = ITK_NULLPTR; + m_Sample = nullptr; m_NbSamples = 0; - m_SampleList = ITK_NULLPTR; + m_SampleList = nullptr; m_NbChange = 0; m_TerminationThreshold = 1E-5; m_Neighborhood = 1; - m_OutputImage = ITK_NULLPTR; - m_Output = ITK_NULLPTR; + m_OutputImage = nullptr; + m_Output = nullptr; } @@ -166,7 +166,7 @@ SEMClassifier<TInputImage, TOutputImage> typename TInputImage::SizeType size = imgLabels->GetBufferedRegion().GetSize(); int theSize = (int) size[0] * size[1]; - if (m_Sample == ITK_NULLPTR) + if (m_Sample == nullptr) { m_ClassLabels.resize(theSize); diff --git a/Modules/Learning/Markov/include/otbMRFSamplerRandomMAP.h b/Modules/Learning/Markov/include/otbMRFSamplerRandomMAP.h index 5c37d94230..c2c94fa5e9 100644 --- a/Modules/Learning/Markov/include/otbMRFSamplerRandomMAP.h +++ b/Modules/Learning/Markov/include/otbMRFSamplerRandomMAP.h @@ -77,8 +77,8 @@ public: if ((nClasses != this->m_NumberOfClasses) || (m_EnergiesInvalid == true)) { this->m_NumberOfClasses = nClasses; - if (m_Energy != ITK_NULLPTR) free(m_Energy); - if (m_RepartitionFunction != ITK_NULLPTR) free(m_RepartitionFunction); + if (m_Energy != nullptr) free(m_Energy); + if (m_RepartitionFunction != nullptr) free(m_RepartitionFunction); m_Energy = (double *) calloc(this->m_NumberOfClasses, sizeof(double)); m_RepartitionFunction = (double *) calloc(this->m_NumberOfClasses, sizeof(double)); this->Modified(); @@ -159,8 +159,8 @@ public: protected: // The constructor and destructor. MRFSamplerRandomMAP() : - m_RepartitionFunction(ITK_NULLPTR), - m_Energy(ITK_NULLPTR), + m_RepartitionFunction(nullptr), + m_Energy(nullptr), m_EnergiesInvalid(true) { m_Generator = RandomGeneratorType::GetInstance(); @@ -168,8 +168,8 @@ protected: } ~MRFSamplerRandomMAP() override { - if (m_Energy != ITK_NULLPTR) free(m_Energy); - if (m_RepartitionFunction != ITK_NULLPTR) free(m_RepartitionFunction); + if (m_Energy != nullptr) free(m_Energy); + if (m_RepartitionFunction != nullptr) free(m_RepartitionFunction); } private: diff --git a/Modules/Learning/Markov/include/otbMarkovRandomFieldFilter.txx b/Modules/Learning/Markov/include/otbMarkovRandomFieldFilter.txx index 054db878f1..0e7833f4ce 100644 --- a/Modules/Learning/Markov/include/otbMarkovRandomFieldFilter.txx +++ b/Modules/Learning/Markov/include/otbMarkovRandomFieldFilter.txx @@ -82,7 +82,7 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TrainingImageType *> (this->itk::ProcessObject::GetInput(1)); @@ -321,7 +321,7 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage> - 2 * m_InputImageNeighborhoodRadius[i]); } - srand((unsigned) time(ITK_NULLPTR)); + srand((unsigned) time(nullptr)); if (!m_EnergyRegularization) { diff --git a/Modules/Learning/SOM/include/otbSOMImageClassificationFilter.txx b/Modules/Learning/SOM/include/otbSOMImageClassificationFilter.txx index df641d33fb..b5942d37a4 100644 --- a/Modules/Learning/SOM/include/otbSOMImageClassificationFilter.txx +++ b/Modules/Learning/SOM/include/otbSOMImageClassificationFilter.txx @@ -55,7 +55,7 @@ SOMImageClassificationFilter<TInputImage, TOutputImage, TSOMMap, TMaskImage> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const MaskImageType *>(this->itk::ProcessObject::GetInput(1)); } diff --git a/Modules/Learning/Sampling/include/otbOGRDataToClassStatisticsFilter.txx b/Modules/Learning/Sampling/include/otbOGRDataToClassStatisticsFilter.txx index 31c04c30cd..9aeb389a01 100644 --- a/Modules/Learning/Sampling/include/otbOGRDataToClassStatisticsFilter.txx +++ b/Modules/Learning/Sampling/include/otbOGRDataToClassStatisticsFilter.txx @@ -43,7 +43,7 @@ PersistentOGRDataToClassStatisticsFilter<TInputImage,TMaskImage> ::Synthetize(void) { otb::ogr::DataSource* vectors = const_cast<otb::ogr::DataSource*>(this->GetOGRData()); - vectors->GetLayer(this->GetLayerIndex()).SetSpatialFilter(ITK_NULLPTR); + vectors->GetLayer(this->GetLayerIndex()).SetSpatialFilter(nullptr); ClassCountMapType &classCount = this->GetClassCountOutput()->Get(); PolygonSizeMapType &polygonSize = this->GetPolygonSizeOutput()->Get(); @@ -108,7 +108,7 @@ PersistentOGRDataToClassStatisticsFilter<TInputImage,TMaskImage> { if (this->GetNumberOfOutputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const ClassCountObjectType *>(this->itk::ProcessObject::GetOutput(1)); } @@ -120,7 +120,7 @@ PersistentOGRDataToClassStatisticsFilter<TInputImage,TMaskImage> { if (this->GetNumberOfOutputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<ClassCountObjectType *>(this->itk::ProcessObject::GetOutput(1)); } @@ -132,7 +132,7 @@ PersistentOGRDataToClassStatisticsFilter<TInputImage,TMaskImage> { if (this->GetNumberOfOutputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const PolygonSizeObjectType *>(this->itk::ProcessObject::GetOutput(2)); } @@ -144,7 +144,7 @@ PersistentOGRDataToClassStatisticsFilter<TInputImage,TMaskImage> { if (this->GetNumberOfOutputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<PolygonSizeObjectType *>(this->itk::ProcessObject::GetOutput(2)); } diff --git a/Modules/Learning/Sampling/include/otbOGRDataToSamplePositionFilter.txx b/Modules/Learning/Sampling/include/otbOGRDataToSamplePositionFilter.txx index cc70bcbb95..949b4d45f5 100644 --- a/Modules/Learning/Sampling/include/otbOGRDataToSamplePositionFilter.txx +++ b/Modules/Learning/Sampling/include/otbOGRDataToSamplePositionFilter.txx @@ -249,7 +249,7 @@ PersistentOGRDataToSamplePositionFilter<TInputImage,TMaskImage,TSampler> tmpLayers[m_ClassPartition[className]].CreateFeature( dstFeature ); } - inLayer.SetSpatialFilter(ITK_NULLPTR); + inLayer.SetSpatialFilter(nullptr); } template<class TInputImage, class TMaskImage, class TSampler> diff --git a/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx b/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx index 502438a0d2..15b54b5bbb 100644 --- a/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx +++ b/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx @@ -209,7 +209,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage> this->m_InMemoryInputs.clear(); this->m_InMemoryInputs.reserve(numberOfThreads); std::string tmpLayerName("thread"); - OGRSpatialReference * oSRS = ITK_NULLPTR; + OGRSpatialReference * oSRS = nullptr; if (inLayer.GetSpatialRef()) { oSRS = inLayer.GetSpatialRef()->Clone(); @@ -399,14 +399,14 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage> case wkbPoint25D: { OGRPoint* castPoint = dynamic_cast<OGRPoint*>(geom); - if (castPoint == ITK_NULLPTR) break; + if (castPoint == nullptr) break; imgPoint[0] = castPoint->getX(); imgPoint[1] = castPoint->getY(); const TInputImage* img = this->GetInput(); const TMaskImage* mask = this->GetMask(); img->TransformPhysicalPointToIndex(imgPoint,imgIndex); - if ((mask == ITK_NULLPTR) || mask->GetPixel(imgIndex)) + if ((mask == nullptr) || mask->GetPixel(imgIndex)) { this->ProcessSample(feature, imgIndex, imgPoint, threadid); } @@ -417,7 +417,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage> { OGRLineString* castLineString = dynamic_cast<OGRLineString*>(geom); - if (castLineString == ITK_NULLPTR) break; + if (castLineString == nullptr) break; this->ProcessLine(feature,castLineString,region,threadid); break; } @@ -425,7 +425,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage> case wkbPolygon25D: { OGRPolygon* castPolygon = dynamic_cast<OGRPolygon*>(geom); - if (castPolygon == ITK_NULLPTR) break; + if (castPolygon == nullptr) break; this->ProcessPolygon(feature,castPolygon,region,threadid); break; } @@ -759,7 +759,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage> } } - inLayer.SetSpatialFilter(ITK_NULLPTR); + inLayer.SetSpatialFilter(nullptr); } template<class TInputImage, class TMaskImage> @@ -795,7 +795,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage> { std::string projectionRefWkt = this->GetInput()->GetProjectionRef(); bool projectionInformationAvailable = !projectionRefWkt.empty(); - OGRSpatialReference * oSRS = ITK_NULLPTR; + OGRSpatialReference * oSRS = nullptr; if(projectionInformationAvailable) { oSRS = static_cast<OGRSpatialReference *>(OSRNewSpatialReference(projectionRefWkt.c_str())); diff --git a/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.h b/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.h index 36c22666d5..3afccd4e40 100644 --- a/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.h +++ b/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.h @@ -124,7 +124,7 @@ protected: ~BoostMachineLearningModel() override; /** Predict values using the model */ - TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=ITK_NULLPTR) const override; + TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr) const override; /** PrintSelf method */ diff --git a/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.txx index 09d703a9de..b022e0c240 100644 --- a/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbBoostMachineLearningModel.txx @@ -94,7 +94,7 @@ BoostMachineLearningModel<TInputValue,TOutputValue> cv::noArray(), var_type)); #else - CvBoostParams params = CvBoostParams(m_BoostType, m_WeakCount, m_WeightTrimRate, m_MaxDepth, false, ITK_NULLPTR); + CvBoostParams params = CvBoostParams(m_BoostType, m_WeakCount, m_WeightTrimRate, m_MaxDepth, false, nullptr); params.split_criteria = m_SplitCrit; m_BoostModel->train(samples,CV_ROW_SAMPLE,labels,cv::Mat(),cv::Mat(),var_type,cv::Mat(),params); #endif @@ -122,7 +122,7 @@ BoostMachineLearningModel<TInputValue,TOutputValue> result = m_BoostModel->predict(sample,missing); #endif - if (quality != ITK_NULLPTR) + if (quality != nullptr) { (*quality) = static_cast<ConfidenceValueType>( #ifdef OTB_OPENCV_3 @@ -150,7 +150,7 @@ BoostMachineLearningModel<TInputValue,TOutputValue> fs.release(); #else if (name == "") - m_BoostModel->save(filename.c_str(), ITK_NULLPTR); + m_BoostModel->save(filename.c_str(), nullptr); else m_BoostModel->save(filename.c_str(), name.c_str()); #endif @@ -166,7 +166,7 @@ BoostMachineLearningModel<TInputValue,TOutputValue> m_BoostModel->read(name.empty() ? fs.getFirstTopLevelNode() : fs[name]); #else if (name == "") - m_BoostModel->load(filename.c_str(), ITK_NULLPTR); + m_BoostModel->load(filename.c_str(), nullptr); else m_BoostModel->load(filename.c_str(), name.c_str()); #endif diff --git a/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.h b/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.h index fc47f21405..4ba3ca1918 100644 --- a/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.h +++ b/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.h @@ -179,7 +179,7 @@ protected: ~DecisionTreeMachineLearningModel() override; /** Predict values using the model */ - TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=ITK_NULLPTR) const override; + TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr) const override; /** PrintSelf method */ void PrintSelf(std::ostream& os, itk::Indent indent) const override; diff --git a/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.txx index e84e5f9262..055839026b 100644 --- a/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbDecisionTreeMachineLearningModel.txx @@ -103,7 +103,7 @@ DecisionTreeMachineLearningModel<TInputValue,TOutputValue> cv::noArray(), var_type)); #else - float * priors = m_Priors.empty() ? ITK_NULLPTR : &m_Priors.front(); + float * priors = m_Priors.empty() ? nullptr : &m_Priors.front(); CvDTreeParams params = CvDTreeParams(m_MaxDepth, m_MinSampleCount, m_RegressionAccuracy, m_UseSurrogates, m_MaxCategories, m_CVFolds, m_Use1seRule, m_TruncatePrunedTree, priors); @@ -133,7 +133,7 @@ DecisionTreeMachineLearningModel<TInputValue,TOutputValue> target[0] = static_cast<TOutputValue>(result); - if (quality != ITK_NULLPTR) + if (quality != nullptr) { if (!this->m_ConfidenceIndex) { @@ -157,7 +157,7 @@ DecisionTreeMachineLearningModel<TInputValue,TOutputValue> fs.release(); #else if (name == "") - m_DTreeModel->save(filename.c_str(), ITK_NULLPTR); + m_DTreeModel->save(filename.c_str(), nullptr); else m_DTreeModel->save(filename.c_str(), name.c_str()); #endif @@ -173,7 +173,7 @@ DecisionTreeMachineLearningModel<TInputValue,TOutputValue> m_DTreeModel->read(name.empty() ? fs.getFirstTopLevelNode() : fs[name]); #else if (name == "") - m_DTreeModel->load(filename.c_str(), ITK_NULLPTR); + m_DTreeModel->load(filename.c_str(), nullptr); else m_DTreeModel->load(filename.c_str(), name.c_str()); #endif diff --git a/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.h b/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.h index 19bbab10de..8de3e6bbe6 100644 --- a/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.h +++ b/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.h @@ -130,7 +130,7 @@ protected: ~GradientBoostedTreeMachineLearningModel() override; /** Predict values using the model */ - TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=ITK_NULLPTR) const override; + TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr) const override; /** PrintSelf method */ diff --git a/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.txx index 5f1380332d..12a82d9ee2 100644 --- a/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbGradientBoostedTreeMachineLearningModel.txx @@ -96,7 +96,7 @@ GradientBoostedTreeMachineLearningModel<TInputValue,TOutputValue> target[0] = static_cast<TOutputValue>(result); - if (quality != ITK_NULLPTR) + if (quality != nullptr) { if (!this->m_ConfidenceIndex) { @@ -113,7 +113,7 @@ GradientBoostedTreeMachineLearningModel<TInputValue,TOutputValue> ::Save(const std::string & filename, const std::string & name) { if (name == "") - m_GBTreeModel->save(filename.c_str(), ITK_NULLPTR); + m_GBTreeModel->save(filename.c_str(), nullptr); else m_GBTreeModel->save(filename.c_str(), name.c_str()); } @@ -124,7 +124,7 @@ GradientBoostedTreeMachineLearningModel<TInputValue,TOutputValue> ::Load(const std::string & filename, const std::string & name) { if (name == "") - m_GBTreeModel->load(filename.c_str(), ITK_NULLPTR); + m_GBTreeModel->load(filename.c_str(), nullptr); else m_GBTreeModel->load(filename.c_str(), name.c_str()); } diff --git a/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.h b/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.h index d23411d923..ca52fc5850 100644 --- a/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.h +++ b/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.h @@ -104,7 +104,7 @@ protected: ~KNearestNeighborsMachineLearningModel() override; /** Predict values using the model */ - TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=ITK_NULLPTR) const override; + TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr) const override; /** PrintSelf method */ diff --git a/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.txx index 3b6dc52a25..53b33424d5 100644 --- a/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbKNearestNeighborsMachineLearningModel.txx @@ -119,10 +119,10 @@ KNearestNeighborsMachineLearningModel<TInputValue,TTargetValue> #ifdef OTB_OPENCV_3 result = m_KNearestModel->findNearest(sample, m_K, cv::noArray(), nearest, cv::noArray()); #else - result = m_KNearestModel->find_nearest(sample, m_K,ITK_NULLPTR,ITK_NULLPTR,&nearest,ITK_NULLPTR); + result = m_KNearestModel->find_nearest(sample, m_K,nullptr,nullptr,&nearest,nullptr); #endif // compute quality if asked (only happens in classification mode) - if (quality != ITK_NULLPTR) + if (quality != nullptr) { assert(!this->m_RegressionMode); unsigned int accuracy = 0; diff --git a/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.h b/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.h index 8d96b2a179..173c928cdc 100644 --- a/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.h +++ b/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.h @@ -272,7 +272,7 @@ protected: ~LibSVMMachineLearningModel() override; /** Predict values using the model */ - TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=ITK_NULLPTR) const override; + TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr) const override; /** PrintSelf method */ void PrintSelf(std::ostream& os, itk::Indent indent) const override; diff --git a/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx index 1d1c03e39a..762aa0cb7a 100644 --- a/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.txx @@ -58,14 +58,14 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue> LibSVMMachineLearningModel<TInputValue,TOutputValue>::CM_INDEX; this->m_Parameters.nr_weight = 0; - this->m_Parameters.weight_label = ITK_NULLPTR; - this->m_Parameters.weight = ITK_NULLPTR; + this->m_Parameters.weight_label = nullptr; + this->m_Parameters.weight = nullptr; - this->m_Model = ITK_NULLPTR; + this->m_Model = nullptr; this->m_Problem.l = 0; - this->m_Problem.y = ITK_NULLPTR; - this->m_Problem.x = ITK_NULLPTR; + this->m_Problem.y = nullptr; + this->m_Problem.x = nullptr; #ifndef NDEBUG svm_set_print_string_function(&otb::Utils::PrintNothing); #endif @@ -130,7 +130,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue> x[input.Size()].index = -1; x[input.Size()].value = 0; - if (quality != ITK_NULLPTR) + if (quality != nullptr) { if (!this->m_ConfidenceIndex) { @@ -222,7 +222,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue> { this->DeleteModel(); m_Model = svm_load_model(filename.c_str()); - if (m_Model == ITK_NULLPTR) + if (m_Model == nullptr) { itkExceptionMacro(<< "Problem while loading SVM model " << filename); } @@ -388,7 +388,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue> if (m_Problem.y) { delete[] m_Problem.y; - m_Problem.y = ITK_NULLPTR; + m_Problem.y = nullptr; } if (m_Problem.x) { @@ -400,7 +400,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue> } } delete[] m_Problem.x; - m_Problem.x = ITK_NULLPTR; + m_Problem.x = nullptr; } m_Problem.l = 0; } @@ -414,7 +414,7 @@ LibSVMMachineLearningModel<TInputValue,TOutputValue> { svm_free_and_destroy_model(&m_Model); } - m_Model = ITK_NULLPTR; + m_Model = nullptr; } template <class TInputValue, class TOutputValue> diff --git a/Modules/Learning/Supervised/include/otbMachineLearningModelFactory.txx b/Modules/Learning/Supervised/include/otbMachineLearningModelFactory.txx index 760096feaf..31cb1a288e 100644 --- a/Modules/Learning/Supervised/include/otbMachineLearningModelFactory.txx +++ b/Modules/Learning/Supervised/include/otbMachineLearningModelFactory.txx @@ -95,7 +95,7 @@ for(typename std::list<MachineLearningModelTypePointer>::iterator k = possibleMa } } - return ITK_NULLPTR; + return nullptr; } template <class TInputValue, class TOutputValue> diff --git a/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.h b/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.h index 44a1bad585..917d650f6d 100644 --- a/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.h +++ b/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.h @@ -178,7 +178,7 @@ protected: ~NeuralNetworkMachineLearningModel() override; /** Predict values using the model */ - TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=ITK_NULLPTR) const override; + TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr) const override; void LabelsToMat(const TargetListSampleType * listSample, cv::Mat & output); diff --git a/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.txx index 6b157752f0..644e2b35bd 100644 --- a/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbNeuralNetworkMachineLearningModel.txx @@ -47,7 +47,7 @@ NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::NeuralNetworkMachi m_TermCriteriaType(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS), m_MaxIter(1000), m_Epsilon(0.01), - m_CvMatOfLabels(ITK_NULLPTR) + m_CvMatOfLabels(nullptr) { this->m_ConfidenceIndex = true; this->m_IsRegressionSupported = true; @@ -83,7 +83,7 @@ void NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::LabelsToMat(c cv::Mat & output) { unsigned int nbSamples = 0; - if (labels != ITK_NULLPTR) + if (labels != nullptr) { nbSamples = labels->Size(); } @@ -278,7 +278,7 @@ typename NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::TargetSam } } - if (quality != ITK_NULLPTR) + if (quality != nullptr) { (*quality) = static_cast<ConfidenceValueType>(maxResponse) - static_cast<ConfidenceValueType>(secondResponse); } @@ -293,7 +293,7 @@ void NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::Save(const st cv::FileStorage fs(filename, cv::FileStorage::WRITE); fs << (name.empty() ? m_ANNModel->getDefaultName() : cv::String(name)) << "{"; m_ANNModel->write(fs); - if (m_CvMatOfLabels != ITK_NULLPTR) + if (m_CvMatOfLabels != nullptr) { std::string labelsName("class_labels"); fs.writeObj(labelsName,m_CvMatOfLabels); @@ -305,15 +305,15 @@ void NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::Save(const st if ( !name.empty() ) lname = name.c_str(); - CvFileStorage* fs = ITK_NULLPTR; - fs = cvOpenFileStorage(filename.c_str(), ITK_NULLPTR, CV_STORAGE_WRITE); + CvFileStorage* fs = nullptr; + fs = cvOpenFileStorage(filename.c_str(), nullptr, CV_STORAGE_WRITE); if ( !fs ) { itkExceptionMacro("Could not open the file " << filename << " for writing"); } m_ANNModel->write(fs, lname); - if (m_CvMatOfLabels != ITK_NULLPTR) + if (m_CvMatOfLabels != nullptr) cvWrite(fs, "class_labels", m_CvMatOfLabels); cvReleaseFileStorage(&fs); @@ -331,7 +331,7 @@ void NeuralNetworkMachineLearningModel<TInputValue, TOutputValue>::Load(const st m_CvMatOfLabels = (CvMat*)cvReadByName( *fs, *model_node, "class_labels" ); fs.release(); #else - const char* lname = ITK_NULLPTR; + const char* lname = nullptr; if ( !name.empty() ) lname = name.c_str(); diff --git a/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.h b/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.h index da1ae46c05..660135367c 100644 --- a/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.h +++ b/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.h @@ -84,7 +84,7 @@ protected: ~NormalBayesMachineLearningModel() override; /** Predict values using the model */ - TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=ITK_NULLPTR) const override; + TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr) const override; /** PrintSelf method */ diff --git a/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.txx index a197785054..1a47e4cf43 100644 --- a/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbNormalBayesMachineLearningModel.txx @@ -100,7 +100,7 @@ NormalBayesMachineLearningModel<TInputValue,TOutputValue> target[0] = static_cast<TOutputValue>(result); - if (quality != ITK_NULLPTR) + if (quality != nullptr) { if (!this->HasConfidenceIndex()) { @@ -123,7 +123,7 @@ NormalBayesMachineLearningModel<TInputValue,TOutputValue> fs.release(); #else if (name == "") - m_NormalBayesModel->save(filename.c_str(), ITK_NULLPTR); + m_NormalBayesModel->save(filename.c_str(), nullptr); else m_NormalBayesModel->save(filename.c_str(), name.c_str()); #endif @@ -139,7 +139,7 @@ NormalBayesMachineLearningModel<TInputValue,TOutputValue> m_NormalBayesModel->read(name.empty() ? fs.getFirstTopLevelNode() : fs[name]); #else if (name == "") - m_NormalBayesModel->load(filename.c_str(), ITK_NULLPTR); + m_NormalBayesModel->load(filename.c_str(), nullptr); else m_NormalBayesModel->load(filename.c_str(), name.c_str()); #endif diff --git a/Modules/Learning/Supervised/include/otbOpenCVUtils.h b/Modules/Learning/Supervised/include/otbOpenCVUtils.h index 6e5dc07406..e2bfeefe54 100644 --- a/Modules/Learning/Supervised/include/otbOpenCVUtils.h +++ b/Modules/Learning/Supervised/include/otbOpenCVUtils.h @@ -88,7 +88,7 @@ namespace otb unsigned int sampleIdx = 0; // Check for valid listSample - if(listSample != ITK_NULLPTR && listSample->Size() > 0) + if(listSample != nullptr && listSample->Size() > 0) { // Retrieve samples count unsigned int sampleCount = listSample->Size(); diff --git a/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.h b/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.h index 4dd7f0c828..8bd10366d6 100644 --- a/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.h +++ b/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.h @@ -138,7 +138,7 @@ protected: ~RandomForestsMachineLearningModel() override; /** Predict values using the model */ - TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=ITK_NULLPTR) const override; + TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr) const override; /** PrintSelf method */ diff --git a/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.txx index 646bc5936b..0e046cc76a 100644 --- a/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbRandomForestsMachineLearningModel.txx @@ -147,7 +147,7 @@ RandomForestsMachineLearningModel<TInputValue,TOutputValue> cv::noArray(), var_type)); #else - float * priors = m_Priors.empty() ? ITK_NULLPTR : &m_Priors.front(); + float * priors = m_Priors.empty() ? nullptr : &m_Priors.front(); CvRTParams params = CvRTParams(m_MaxDepth, // max depth m_MinSampleCount, // min sample count @@ -183,7 +183,7 @@ RandomForestsMachineLearningModel<TInputValue,TOutputValue> target[0] = static_cast<TOutputValue>(result); - if (quality != ITK_NULLPTR) + if (quality != nullptr) { if(m_ComputeMargin) (*quality) = m_RFModel->predict_margin(sample); @@ -206,7 +206,7 @@ RandomForestsMachineLearningModel<TInputValue,TOutputValue> fs.release(); #else if (name == "") - m_RFModel->save(filename.c_str(), ITK_NULLPTR); + m_RFModel->save(filename.c_str(), nullptr); else m_RFModel->save(filename.c_str(), name.c_str()); #endif @@ -222,7 +222,7 @@ RandomForestsMachineLearningModel<TInputValue,TOutputValue> m_RFModel->read(name.empty() ? fs.getFirstTopLevelNode() : fs[name]); #else if (name == "") - m_RFModel->load(filename.c_str(), ITK_NULLPTR); + m_RFModel->load(filename.c_str(), nullptr); else m_RFModel->load(filename.c_str(), name.c_str()); #endif diff --git a/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.h b/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.h index d0c36eeb3b..2dc0b213d2 100644 --- a/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.h +++ b/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.h @@ -141,7 +141,7 @@ protected: ~SVMMachineLearningModel() override; /** Predict values using the model */ - TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=ITK_NULLPTR) const override; + TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr) const override; /** PrintSelf method */ diff --git a/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.txx index 2ff1154102..b2cb6d2626 100644 --- a/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbSVMMachineLearningModel.txx @@ -140,7 +140,7 @@ SVMMachineLearningModel<TInputValue,TOutputValue> #else // Set up SVM's parameters CvTermCriteria term_crit = cvTermCriteria(m_TermCriteriaType, m_MaxIter, m_Epsilon); - CvSVMParams params( m_SVMType, m_KernelType, m_Degree, m_Gamma, m_Coef0, m_C, m_Nu, m_P, ITK_NULLPTR , term_crit ); + CvSVMParams params( m_SVMType, m_KernelType, m_Degree, m_Gamma, m_Coef0, m_C, m_Nu, m_P, nullptr , term_crit ); // Train the SVM if (!m_ParameterOptimization) @@ -190,7 +190,7 @@ SVMMachineLearningModel<TInputValue,TOutputValue> target[0] = static_cast<TOutputValue>(result); - if (quality != ITK_NULLPTR) + if (quality != nullptr) { #ifdef OTB_OPENCV_3 (*quality) = m_SVMModel->predict(sample,cv::noArray(),cv::ml::StatModel::RAW_OUTPUT); @@ -214,7 +214,7 @@ SVMMachineLearningModel<TInputValue,TOutputValue> fs.release(); #else if (name == "") - m_SVMModel->save(filename.c_str(), ITK_NULLPTR); + m_SVMModel->save(filename.c_str(), nullptr); else m_SVMModel->save(filename.c_str(), name.c_str()); #endif @@ -230,7 +230,7 @@ SVMMachineLearningModel<TInputValue,TOutputValue> m_SVMModel->read(name.empty() ? fs.getFirstTopLevelNode() : fs[name]); #else if (name == "") - m_SVMModel->load(filename.c_str(), ITK_NULLPTR); + m_SVMModel->load(filename.c_str(), nullptr); else m_SVMModel->load(filename.c_str(), name.c_str()); #endif diff --git a/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.h b/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.h index 41015ee9dc..9be6467bf7 100644 --- a/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.h +++ b/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.h @@ -149,10 +149,10 @@ protected: virtual ~SharkRandomForestsMachineLearningModel(); /** Predict values using the model */ - virtual TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=ITK_NULLPTR) const override; + virtual TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType *quality=nullptr) const override; - virtual void DoPredictBatch(const InputListSampleType *, const unsigned int & startIndex, const unsigned int & size, TargetListSampleType *, ConfidenceListSampleType * = ITK_NULLPTR) const override; + virtual void DoPredictBatch(const InputListSampleType *, const unsigned int & startIndex, const unsigned int & size, TargetListSampleType *, ConfidenceListSampleType * = nullptr) const override; /** PrintSelf method */ void PrintSelf(std::ostream& os, itk::Indent indent) const override; diff --git a/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.txx b/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.txx index 72c816069b..10c3a5630f 100644 --- a/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.txx +++ b/Modules/Learning/Supervised/include/otbSharkRandomForestsMachineLearningModel.txx @@ -127,7 +127,7 @@ SharkRandomForestsMachineLearningModel<TInputValue,TOutputValue> { samples.push_back(value[i]); } - if (quality != ITK_NULLPTR) + if (quality != nullptr) { shark::RealVector probas = m_RFModel.decisionFunction()(samples); (*quality) = ComputeConfidence(probas, m_ComputeMargin); @@ -151,11 +151,11 @@ void SharkRandomForestsMachineLearningModel<TInputValue,TOutputValue> ::DoPredictBatch(const InputListSampleType *input, const unsigned int & startIndex, const unsigned int & size, TargetListSampleType * targets, ConfidenceListSampleType * quality) const { - assert(input != ITK_NULLPTR); - assert(targets != ITK_NULLPTR); + assert(input != nullptr); + assert(targets != nullptr); assert(input->Size()==targets->Size()&&"Input sample list and target label list do not have the same size."); - assert(((quality==ITK_NULLPTR)||(quality->Size()==input->Size()))&&"Quality samples list is not null and does not have the same size as input samples list"); + assert(((quality==nullptr)||(quality->Size()==input->Size()))&&"Quality samples list is not null and does not have the same size as input samples list"); if(startIndex+size>input->Size()) { @@ -170,7 +170,7 @@ SharkRandomForestsMachineLearningModel<TInputValue,TOutputValue> omp_set_num_threads(itk::MultiThreader::GetGlobalDefaultNumberOfThreads()); #endif - if(quality != ITK_NULLPTR) + if(quality != nullptr) { shark::Data<shark::RealVector> probas = m_RFModel.decisionFunction()(inputSamples); unsigned int id = startIndex; diff --git a/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.h b/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.h index a060046c61..5f49cba1f8 100644 --- a/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.h +++ b/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.h @@ -130,11 +130,11 @@ protected: /** Predict values using the model */ virtual TargetSampleType - DoPredict(const InputSampleType &input, ConfidenceValueType *quality = ITK_NULLPTR) const override; + DoPredict(const InputSampleType &input, ConfidenceValueType *quality = nullptr) const override; virtual void DoPredictBatch(const InputListSampleType *, const unsigned int &startIndex, const unsigned int &size, - TargetListSampleType *, ConfidenceListSampleType * = ITK_NULLPTR) const override; + TargetListSampleType *, ConfidenceListSampleType * = nullptr) const override; template<typename DataType> DataType NormalizeData(const DataType &data) const; diff --git a/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.txx b/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.txx index 1b08d538c9..f3b9310c7b 100644 --- a/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.txx +++ b/Modules/Learning/Unsupervised/include/otbSharkKMeansMachineLearningModel.txx @@ -111,7 +111,7 @@ SharkKMeansMachineLearningModel<TInputValue, TOutputValue> } // Change quality measurement only if SoftClustering or other clustering method is used. - if( quality != ITK_NULLPTR ) + if( quality != nullptr ) { //unsigned int probas = (*m_ClusteringModel)( data ); ( *quality ) = ConfidenceValueType( 1.); @@ -134,12 +134,12 @@ SharkKMeansMachineLearningModel<TInputValue, TOutputValue> { // Perform check on input values - assert( input != ITK_NULLPTR ); - assert( targets != ITK_NULLPTR ); + assert( input != nullptr ); + assert( targets != nullptr ); // input list sample and target list sample should be initialized and without assert( input->Size() == targets->Size() && "Input sample list and target label list do not have the same size." ); - assert( ( ( quality == ITK_NULLPTR ) || ( quality->Size() == input->Size() ) ) && + assert( ( ( quality == nullptr ) || ( quality->Size() == input->Size() ) ) && "Quality samples list is not null and does not have the same size as input samples list" ); if( startIndex + size > input->Size() ) { @@ -173,7 +173,7 @@ SharkKMeansMachineLearningModel<TInputValue, TOutputValue> } // Change quality measurement only if SoftClustering or other clustering method is used. - if( quality != ITK_NULLPTR ) + if( quality != nullptr ) { for( unsigned int qid = startIndex; qid < startIndex+size; ++qid ) { diff --git a/Modules/OBIA/RCC8/include/otbImageListToRCC8GraphFilter.txx b/Modules/OBIA/RCC8/include/otbImageListToRCC8GraphFilter.txx index 4d7690d5c0..5f98249b27 100644 --- a/Modules/OBIA/RCC8/include/otbImageListToRCC8GraphFilter.txx +++ b/Modules/OBIA/RCC8/include/otbImageListToRCC8GraphFilter.txx @@ -59,7 +59,7 @@ ImageListToRCC8GraphFilter<TInputImage, TOutputGraph> if (this->GetNumberOfInputs() < 1) { // exit - return ITK_NULLPTR; + return nullptr; } // else return the first input return static_cast<InputImageListType *> diff --git a/Modules/OBIA/RCC8/include/otbPolygonListToRCC8GraphFilter.txx b/Modules/OBIA/RCC8/include/otbPolygonListToRCC8GraphFilter.txx index 4c62af51ab..2b1d81da48 100644 --- a/Modules/OBIA/RCC8/include/otbPolygonListToRCC8GraphFilter.txx +++ b/Modules/OBIA/RCC8/include/otbPolygonListToRCC8GraphFilter.txx @@ -62,7 +62,7 @@ PolygonListToRCC8GraphFilter<TPolygonList, TOutputGraph> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TPolygonList *> diff --git a/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.txx b/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.txx index 637d6a370d..7d780f7447 100644 --- a/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.txx +++ b/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.txx @@ -95,7 +95,7 @@ RCC8GraphFileWriter<TInputGraph> itkDebugMacro(<< "Writing a RCC8Graph file"); // Make sure input is available - if (input == ITK_NULLPTR) + if (input == nullptr) { itkExceptionMacro(<< "No input to writer!"); } diff --git a/Modules/OBIA/RCC8/include/otbRCC8GraphSource.txx b/Modules/OBIA/RCC8/include/otbRCC8GraphSource.txx index 07d82bf465..6b1287bfb6 100644 --- a/Modules/OBIA/RCC8/include/otbRCC8GraphSource.txx +++ b/Modules/OBIA/RCC8/include/otbRCC8GraphSource.txx @@ -46,7 +46,7 @@ RCC8GraphSource<TOutputGraph> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputGraphType *> (this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Radiometry/OpticalCalibration/include/otbReflectanceToSurfaceReflectanceImageFilter.txx b/Modules/Radiometry/OpticalCalibration/include/otbReflectanceToSurfaceReflectanceImageFilter.txx index 21e119032c..9494c2ebc3 100644 --- a/Modules/Radiometry/OpticalCalibration/include/otbReflectanceToSurfaceReflectanceImageFilter.txx +++ b/Modules/Radiometry/OpticalCalibration/include/otbReflectanceToSurfaceReflectanceImageFilter.txx @@ -87,7 +87,7 @@ void ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage> ::UpdateAtmosphericRadiativeTerms() { - if (this->GetInput() == ITK_NULLPTR) + if (this->GetInput() == nullptr) { itkExceptionMacro(<< "Input must be set before updating the atmospheric radiative terms"); } @@ -164,7 +164,7 @@ ReflectanceToSurfaceReflectanceImageFilter<TInputImage, TOutputImage> ::UpdateFunctors() { - if (this->GetInput() == ITK_NULLPTR) + if (this->GetInput() == nullptr) { itkExceptionMacro(<< "Input must be set before updating the functors"); } diff --git a/Modules/Radiometry/OpticalCalibration/include/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.txx b/Modules/Radiometry/OpticalCalibration/include/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.txx index f98d9b288e..18a1831622 100644 --- a/Modules/Radiometry/OpticalCalibration/include/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.txx +++ b/Modules/Radiometry/OpticalCalibration/include/otbSurfaceAdjacencyEffectCorrectionSchemeFilter.txx @@ -79,7 +79,7 @@ void SurfaceAdjacencyEffectCorrectionSchemeFilter<TInputImage, TOutputImage> ::UpdateAtmosphericRadiativeTerms() { - if (this->GetInput() == ITK_NULLPTR) + if (this->GetInput() == nullptr) { itkExceptionMacro(<< "Input must be set before updating the atmospheric radiative terms"); } diff --git a/Modules/Radiometry/OpticalCalibration/src/otbAeronetFileReader.cxx b/Modules/Radiometry/OpticalCalibration/src/otbAeronetFileReader.cxx index ea59ddea54..dd7fbb1ccc 100644 --- a/Modules/Radiometry/OpticalCalibration/src/otbAeronetFileReader.cxx +++ b/Modules/Radiometry/OpticalCalibration/src/otbAeronetFileReader.cxx @@ -104,7 +104,7 @@ AeronetFileReader { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<AeronetData *> (this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Radiometry/OpticalCalibration/src/otbSpectralSensitivityReader.cxx b/Modules/Radiometry/OpticalCalibration/src/otbSpectralSensitivityReader.cxx index ea69b22db5..4ebfecb7f6 100644 --- a/Modules/Radiometry/OpticalCalibration/src/otbSpectralSensitivityReader.cxx +++ b/Modules/Radiometry/OpticalCalibration/src/otbSpectralSensitivityReader.cxx @@ -53,7 +53,7 @@ SpectralSensitivityReader { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<WavelengthSpectralBandVectorType *> (this->ProcessObject::GetOutput(0)); } @@ -64,7 +64,7 @@ SpectralSensitivityReader { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const WavelengthSpectralBandVectorType *> (this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Radiometry/OpticalCalibration/test/otbSIXSTraitsTest.cxx b/Modules/Radiometry/OpticalCalibration/test/otbSIXSTraitsTest.cxx index ff1a0148ef..5f6e8c04a0 100644 --- a/Modules/Radiometry/OpticalCalibration/test/otbSIXSTraitsTest.cxx +++ b/Modules/Radiometry/OpticalCalibration/test/otbSIXSTraitsTest.cxx @@ -23,7 +23,7 @@ int otbSIXSTraitsTest(int itkNotUsed(argc), char * itkNotUsed(argv)[]) { - otb::SIXSTraits *var(ITK_NULLPTR); + otb::SIXSTraits *var(nullptr); var = new otb::SIXSTraits(); delete var; return EXIT_SUCCESS; diff --git a/Modules/Radiometry/Simulation/include/otbReduceSpectralResponse.txx b/Modules/Radiometry/Simulation/include/otbReduceSpectralResponse.txx index 2c7af98309..95c3b4de2a 100644 --- a/Modules/Radiometry/Simulation/include/otbReduceSpectralResponse.txx +++ b/Modules/Radiometry/Simulation/include/otbReduceSpectralResponse.txx @@ -84,7 +84,7 @@ ReduceSpectralResponse<TSpectralResponse , TRSR> if(m_ReflectanceMode) { - if (solarIrradiance == ITK_NULLPTR) + if (solarIrradiance == nullptr) { itkExceptionMacro(<<"Error occurs getting solar irradiance. Solar irradiance is mandatory using the reflectance mode."); } diff --git a/Modules/Radiometry/Simulation/include/otbSurfaceReflectanceToReflectanceFilter.txx b/Modules/Radiometry/Simulation/include/otbSurfaceReflectanceToReflectanceFilter.txx index bbbd91afe4..9364b328c4 100644 --- a/Modules/Radiometry/Simulation/include/otbSurfaceReflectanceToReflectanceFilter.txx +++ b/Modules/Radiometry/Simulation/include/otbSurfaceReflectanceToReflectanceFilter.txx @@ -49,7 +49,7 @@ void SurfaceReflectanceToReflectanceFilter<TInputImage, TOutputImage> ::UpdateAtmosphericRadiativeTerms() { - if (this->GetInput() == ITK_NULLPTR) + if (this->GetInput() == nullptr) { itkExceptionMacro(<< "Input must be set before updating the atmospheric radiative terms"); } diff --git a/Modules/Radiometry/Simulation/src/otbProspectModel.cxx b/Modules/Radiometry/Simulation/src/otbProspectModel.cxx index 8e6fdac767..a2907b34a1 100644 --- a/Modules/Radiometry/Simulation/src/otbProspectModel.cxx +++ b/Modules/Radiometry/Simulation/src/otbProspectModel.cxx @@ -67,7 +67,7 @@ ProspectModel if(this->GetNumberOfInputs() != 1) { //exit - return ITK_NULLPTR; + return nullptr; } return static_cast<LeafParametersType *>(this->itk::ProcessObject::GetInput(0)); } @@ -88,7 +88,7 @@ ProspectModel if(this->GetNumberOfOutputs() < 2) { //exit - return ITK_NULLPTR; + return nullptr; } return static_cast<SpectralResponseType *>(this->itk::ProcessObject::GetOutput(0)); } @@ -101,7 +101,7 @@ ProspectModel if(this->GetNumberOfOutputs() < 2) { //exit - return ITK_NULLPTR; + return nullptr; } return static_cast<SpectralResponseType *>(this->itk::ProcessObject::GetOutput(1)); } diff --git a/Modules/Radiometry/Simulation/src/otbSailModel.cxx b/Modules/Radiometry/Simulation/src/otbSailModel.cxx index e2c1ef0002..b822fc061a 100644 --- a/Modules/Radiometry/Simulation/src/otbSailModel.cxx +++ b/Modules/Radiometry/Simulation/src/otbSailModel.cxx @@ -72,7 +72,7 @@ SailModel if(this->GetNumberOfInputs() != 2) { //exit - return ITK_NULLPTR; + return nullptr; } return static_cast<SpectralResponseType *>(this->itk::ProcessObject::GetInput(0)); } @@ -92,7 +92,7 @@ SailModel if(this->GetNumberOfInputs() != 2) { //exit - return ITK_NULLPTR; + return nullptr; } return static_cast<SpectralResponseType *>(this->itk::ProcessObject::GetInput(1)); } @@ -113,7 +113,7 @@ SailModel if(this->GetNumberOfOutputs() < 4) { //exit - return ITK_NULLPTR; + return nullptr; } return static_cast<SpectralResponseType *>(this->itk::ProcessObject::GetOutput(0)); } @@ -126,7 +126,7 @@ SailModel if(this->GetNumberOfOutputs() < 4) { //exit - return ITK_NULLPTR; + return nullptr; } return static_cast<SpectralResponseType *>(this->itk::ProcessObject::GetOutput(1)); } @@ -139,7 +139,7 @@ SailModel if(this->GetNumberOfOutputs() < 4) { //exit - return ITK_NULLPTR; + return nullptr; } return static_cast<SpectralResponseType *>(this->itk::ProcessObject::GetOutput(2)); } @@ -152,7 +152,7 @@ SailModel if(this->GetNumberOfOutputs() < 4) { //exit - return ITK_NULLPTR; + return nullptr; } return static_cast<SpectralResponseType *>(this->itk::ProcessObject::GetOutput(3)); } diff --git a/Modules/Registration/DisparityMap/include/otbDisparityMapEstimationMethod.txx b/Modules/Registration/DisparityMap/include/otbDisparityMapEstimationMethod.txx index 0f18582508..c40c36221c 100644 --- a/Modules/Registration/DisparityMap/include/otbDisparityMapEstimationMethod.txx +++ b/Modules/Registration/DisparityMap/include/otbDisparityMapEstimationMethod.txx @@ -42,10 +42,10 @@ DisparityMapEstimationMethod<TFixedImage, TMovingImage, TPointSet> //this->SetNumberOfRequiredOutputs(1); // this->SetReleaseDataFlag(false); this->SetReleaseDataBeforeUpdateFlag(false); - 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_Transform = nullptr; // has to be provided by the user. + m_Interpolator = nullptr; // has to be provided by the user. + m_Metric = nullptr; // has to be provided by the user. + m_Optimizer = nullptr; // has to be provided by the user. m_WinSize.Fill(15); m_ExploSize.Fill(10); m_InitialTransformParameters = ParametersType(1); diff --git a/Modules/Registration/DisparityMap/include/otbDisparityMapMedianFilter.txx b/Modules/Registration/DisparityMap/include/otbDisparityMapMedianFilter.txx index 54d2bcd534..f876cfe9ed 100644 --- a/Modules/Registration/DisparityMap/include/otbDisparityMapMedianFilter.txx +++ b/Modules/Registration/DisparityMap/include/otbDisparityMapMedianFilter.txx @@ -64,7 +64,7 @@ DisparityMapMedianFilter<TInputImage, TOutputImage, TMask> { if (this->GetNumberOfInputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMask *>(this->itk::ProcessObject::GetInput(1)); } @@ -76,7 +76,7 @@ DisparityMapMedianFilter<TInputImage, TOutputImage, TMask> { if (this->GetNumberOfOutputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TMask *>(this->itk::ProcessObject::GetOutput(1)); } @@ -89,7 +89,7 @@ DisparityMapMedianFilter<TInputImage, TOutputImage, TMask> { if (this->GetNumberOfOutputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TOutputImage *>(this->itk::ProcessObject::GetOutput(2)); } @@ -101,7 +101,7 @@ DisparityMapMedianFilter<TInputImage, TOutputImage, TMask> { if (this->GetNumberOfOutputs()<4) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TMask *>(this->itk::ProcessObject::GetOutput(3)); } diff --git a/Modules/Registration/DisparityMap/include/otbDisparityMapTo3DFilter.txx b/Modules/Registration/DisparityMap/include/otbDisparityMapTo3DFilter.txx index 8a90738d4a..737e9d3937 100644 --- a/Modules/Registration/DisparityMap/include/otbDisparityMapTo3DFilter.txx +++ b/Modules/Registration/DisparityMap/include/otbDisparityMapTo3DFilter.txx @@ -106,7 +106,7 @@ DisparityMapTo3DFilter<TDisparityImage,TOutputImage,TEpipolarGridImage,TMaskImag { if(this->GetNumberOfInputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(0)); } @@ -119,7 +119,7 @@ DisparityMapTo3DFilter<TDisparityImage,TOutputImage,TEpipolarGridImage,TMaskImag { if(this->GetNumberOfInputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(1)); } @@ -132,7 +132,7 @@ DisparityMapTo3DFilter<TDisparityImage,TOutputImage,TEpipolarGridImage,TMaskImag { if(this->GetNumberOfInputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TEpipolarGridImage *>(this->itk::ProcessObject::GetInput(2)); } @@ -145,7 +145,7 @@ DisparityMapTo3DFilter<TDisparityImage,TOutputImage,TEpipolarGridImage,TMaskImag { if(this->GetNumberOfInputs()<4) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TEpipolarGridImage *>(this->itk::ProcessObject::GetInput(3)); } @@ -158,7 +158,7 @@ DisparityMapTo3DFilter<TDisparityImage,TOutputImage,TEpipolarGridImage,TMaskImag { if(this->GetNumberOfInputs()<5) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMaskImage *>(this->itk::ProcessObject::GetInput(4)); } diff --git a/Modules/Registration/DisparityMap/include/otbDisparityMapToDEMFilter.txx b/Modules/Registration/DisparityMap/include/otbDisparityMapToDEMFilter.txx index 96965071cf..fdbbcbaaab 100644 --- a/Modules/Registration/DisparityMap/include/otbDisparityMapToDEMFilter.txx +++ b/Modules/Registration/DisparityMap/include/otbDisparityMapToDEMFilter.txx @@ -134,7 +134,7 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri { if(this->GetNumberOfInputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(0)); } @@ -147,7 +147,7 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri { if(this->GetNumberOfInputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(1)); } @@ -160,7 +160,7 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri { if(this->GetNumberOfInputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(2)); } @@ -173,7 +173,7 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri { if(this->GetNumberOfInputs()<4) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(3)); } @@ -186,7 +186,7 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri { if(this->GetNumberOfInputs()<5) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TEpipolarGridImage *>(this->itk::ProcessObject::GetInput(4)); } @@ -199,7 +199,7 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri { if(this->GetNumberOfInputs()<6) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TEpipolarGridImage *>(this->itk::ProcessObject::GetInput(5)); } @@ -212,7 +212,7 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri { if(this->GetNumberOfInputs()<7) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMaskImage *>(this->itk::ProcessObject::GetInput(6)); } @@ -238,7 +238,7 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri { if(this->GetNumberOfOutputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TOutputDEMImage *>(this->itk::ProcessObject::GetOutput(0)); } @@ -691,7 +691,7 @@ DisparityMapToDEMFilter<TDisparityImage,TInputImage,TOutputDEMImage,TEpipolarGri typename TEpipolarGridImage::RegionType gridRegion = leftGrid->GetLargestPossibleRegion(); - TOutputDEMImage * tmpDEM = ITK_NULLPTR; + TOutputDEMImage * tmpDEM = nullptr; typename TOutputDEMImage::RegionType outputRequestedRegion = outputDEM->GetRequestedRegion(); typename TDisparityImage::RegionType disparityRegion; diff --git a/Modules/Registration/DisparityMap/include/otbDisparityTranslateFilter.txx b/Modules/Registration/DisparityMap/include/otbDisparityTranslateFilter.txx index 20ea399a18..1d4129959a 100644 --- a/Modules/Registration/DisparityMap/include/otbDisparityTranslateFilter.txx +++ b/Modules/Registration/DisparityMap/include/otbDisparityTranslateFilter.txx @@ -105,7 +105,7 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage> { if (this->GetNumberOfInputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(0)); } @@ -117,7 +117,7 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage> { if (this->GetNumberOfInputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(1)); } @@ -129,7 +129,7 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage> { if (this->GetNumberOfInputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TGridImage *>(this->itk::ProcessObject::GetInput(2)); } @@ -141,7 +141,7 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage> { if (this->GetNumberOfInputs()<4) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TGridImage *>(this->itk::ProcessObject::GetInput(3)); } @@ -153,7 +153,7 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage> { if (this->GetNumberOfInputs()<5) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMaskImage *>(this->itk::ProcessObject::GetInput(4)); } @@ -165,7 +165,7 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage> { if (this->GetNumberOfInputs()<6) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TSensorImage *>(this->itk::ProcessObject::GetInput(5)); } @@ -177,7 +177,7 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage> { if (this->GetNumberOfOutputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TDisparityImage *>(this->itk::ProcessObject::GetOutput(0)); } @@ -189,7 +189,7 @@ DisparityTranslateFilter<TDisparityImage,TGridImage,TSensorImage,TMaskImage> { if (this->GetNumberOfOutputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TDisparityImage *>(this->itk::ProcessObject::GetOutput(1)); } diff --git a/Modules/Registration/DisparityMap/include/otbFineRegistrationImageFilter.txx b/Modules/Registration/DisparityMap/include/otbFineRegistrationImageFilter.txx index b19bcedfb1..33b4cf4ccf 100644 --- a/Modules/Registration/DisparityMap/include/otbFineRegistrationImageFilter.txx +++ b/Modules/Registration/DisparityMap/include/otbFineRegistrationImageFilter.txx @@ -73,7 +73,7 @@ FineRegistrationImageFilter<TInputImage, T0utputCorrelation, TOutputDisplacement // Default offset m_InitialOffset.Fill(0); - m_Transform = ITK_NULLPTR; + m_Transform = nullptr; } template <class TInputImage, class T0utputCorrelation, class TOutputDisplacementField> @@ -101,7 +101,7 @@ FineRegistrationImageFilter<TInputImage, T0utputCorrelation, TOutputDisplacement { if (this->GetNumberOfInputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(0)); } @@ -113,7 +113,7 @@ FineRegistrationImageFilter<TInputImage, T0utputCorrelation, TOutputDisplacement { if (this->GetNumberOfInputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(1)); } @@ -125,7 +125,7 @@ FineRegistrationImageFilter<TInputImage, T0utputCorrelation, TOutputDisplacement { if (this->GetNumberOfOutputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TOutputDisplacementField *>(this->itk::ProcessObject::GetOutput(1)); } diff --git a/Modules/Registration/DisparityMap/include/otbMultiDisparityMapTo3DFilter.txx b/Modules/Registration/DisparityMap/include/otbMultiDisparityMapTo3DFilter.txx index 511538896b..5fcab94822 100644 --- a/Modules/Registration/DisparityMap/include/otbMultiDisparityMapTo3DFilter.txx +++ b/Modules/Registration/DisparityMap/include/otbMultiDisparityMapTo3DFilter.txx @@ -122,7 +122,7 @@ MultiDisparityMapTo3DFilter<TDisparityImage,TOutputImage,TMaskImage,TResidueImag { if ((3 * (index + 1)) > this->GetNumberOfRequiredInputs()) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(3 * index)); } @@ -135,7 +135,7 @@ MultiDisparityMapTo3DFilter<TDisparityImage,TOutputImage,TMaskImage,TResidueImag { if ((3 * (index + 1)) > this->GetNumberOfRequiredInputs()) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(3 * index + 1)); } @@ -148,7 +148,7 @@ MultiDisparityMapTo3DFilter<TDisparityImage,TOutputImage,TMaskImage,TResidueImag { if ((3 * (index + 1)) > this->GetNumberOfRequiredInputs()) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMaskImage *>(this->itk::ProcessObject::GetInput(3 * index + 2)); } diff --git a/Modules/Registration/DisparityMap/include/otbNCCRegistrationFunction.txx b/Modules/Registration/DisparityMap/include/otbNCCRegistrationFunction.txx index eb5f109337..1b9687b618 100644 --- a/Modules/Registration/DisparityMap/include/otbNCCRegistrationFunction.txx +++ b/Modules/Registration/DisparityMap/include/otbNCCRegistrationFunction.txx @@ -51,8 +51,8 @@ NCCRegistrationFunction<TFixedImage, TMovingImage, TDisplacementField> m_TimeStep = 1.0; m_DenominatorThreshold = 1e-9; m_IntensityDifferenceThreshold = 0.001; - this->SetMovingImage(ITK_NULLPTR); - this->SetFixedImage(ITK_NULLPTR); + this->SetMovingImage(nullptr); + this->SetFixedImage(nullptr); m_FixedImageSpacing.Fill(1.0); m_FixedImageOrigin.Fill(0.0); m_FixedImageGradientCalculator = GradientCalculatorType::New(); diff --git a/Modules/Registration/DisparityMap/include/otbPixelWiseBlockMatchingImageFilter.txx b/Modules/Registration/DisparityMap/include/otbPixelWiseBlockMatchingImageFilter.txx index 69041e41e2..c8499025d9 100644 --- a/Modules/Registration/DisparityMap/include/otbPixelWiseBlockMatchingImageFilter.txx +++ b/Modules/Registration/DisparityMap/include/otbPixelWiseBlockMatchingImageFilter.txx @@ -132,7 +132,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if (this->GetNumberOfInputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(0)); } @@ -146,7 +146,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if(this->GetNumberOfInputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(1)); } @@ -160,7 +160,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if(this->GetNumberOfInputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMaskImage *>(this->itk::ProcessObject::GetInput(2)); } @@ -174,7 +174,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if(this->GetNumberOfInputs()<4) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMaskImage *>(this->itk::ProcessObject::GetInput(3)); } @@ -188,7 +188,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if (this->GetNumberOfOutputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TOutputMetricImage *>(this->itk::ProcessObject::GetOutput(0)); } @@ -202,7 +202,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if (this->GetNumberOfOutputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TOutputMetricImage *>(this->itk::ProcessObject::GetOutput(0)); } @@ -217,7 +217,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if (this->GetNumberOfOutputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TOutputDisparityImage *>(this->itk::ProcessObject::GetOutput(1)); } @@ -231,7 +231,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if (this->GetNumberOfOutputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TOutputDisparityImage *>(this->itk::ProcessObject::GetOutput(1)); } @@ -245,7 +245,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if (this->GetNumberOfOutputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TOutputDisparityImage *>(this->itk::ProcessObject::GetOutput(2)); } @@ -259,7 +259,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if (this->GetNumberOfOutputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TOutputDisparityImage *>(this->itk::ProcessObject::GetOutput(2)); } @@ -295,7 +295,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if(this->GetNumberOfInputs()<5) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TOutputDisparityImage *>(this->itk::ProcessObject::GetInput(4)); } @@ -309,7 +309,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor> { if(this->GetNumberOfInputs()<6) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TOutputDisparityImage *>(this->itk::ProcessObject::GetInput(5)); } diff --git a/Modules/Registration/DisparityMap/include/otbSubPixelDisparityImageFilter.txx b/Modules/Registration/DisparityMap/include/otbSubPixelDisparityImageFilter.txx index a8b9426849..3250075e4c 100644 --- a/Modules/Registration/DisparityMap/include/otbSubPixelDisparityImageFilter.txx +++ b/Modules/Registration/DisparityMap/include/otbSubPixelDisparityImageFilter.txx @@ -156,7 +156,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> { if (this->GetNumberOfIndexedInputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(0)); } @@ -170,7 +170,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> { if(this->GetNumberOfIndexedInputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(1)); } @@ -184,7 +184,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> { if(this->GetNumberOfIndexedInputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(2)); } @@ -198,7 +198,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> { if(this->GetNumberOfIndexedInputs()<4) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(3)); } @@ -212,7 +212,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> { if(this->GetNumberOfIndexedInputs()<5) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMaskImage *>(this->itk::ProcessObject::GetInput(4)); } @@ -226,7 +226,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> { if(this->GetNumberOfIndexedInputs()<6) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMaskImage *>(this->itk::ProcessObject::GetInput(5)); } @@ -254,7 +254,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> { if (this->GetNumberOfOutputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TDisparityImage *>(this->itk::ProcessObject::GetOutput(0)); } @@ -282,7 +282,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> { if (this->GetNumberOfOutputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TDisparityImage *>(this->itk::ProcessObject::GetOutput(1)); } @@ -310,7 +310,7 @@ TDisparityImage,TMaskImage,TBlockMatchingFunctor> { if (this->GetNumberOfOutputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TOutputMetricImage *>(this->itk::ProcessObject::GetOutput(2)); } diff --git a/Modules/Registration/DisplacementField/include/otbPointSetWithTransformToDisplacementFieldGenerator.txx b/Modules/Registration/DisplacementField/include/otbPointSetWithTransformToDisplacementFieldGenerator.txx index 3040de1f56..0fbebc3f2b 100644 --- a/Modules/Registration/DisplacementField/include/otbPointSetWithTransformToDisplacementFieldGenerator.txx +++ b/Modules/Registration/DisplacementField/include/otbPointSetWithTransformToDisplacementFieldGenerator.txx @@ -34,7 +34,7 @@ template <class TPointSet, class TDisplacementField> PointSetWithTransformToDisplacementFieldGenerator<TPointSet, TDisplacementField> ::PointSetWithTransformToDisplacementFieldGenerator() { - m_Transform = ITK_NULLPTR; // has to be provided by the user + m_Transform = nullptr; // has to be provided by the user } /** * PrintSelf Method diff --git a/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.txx b/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.txx index fca8ff2a53..831ddbbd0b 100644 --- a/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.txx +++ b/Modules/Registration/Stereo/include/otbAdhesionCorrectionFilter.txx @@ -100,7 +100,7 @@ AdhesionCorrectionFilter<TImage, TMask> { if (this->GetNumberOfInputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TImage *>(this->itk::ProcessObject::GetInput(1)); } @@ -112,7 +112,7 @@ AdhesionCorrectionFilter<TImage, TMask> { if (this->GetNumberOfInputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMask *>(this->itk::ProcessObject::GetInput(2)); } @@ -124,7 +124,7 @@ AdhesionCorrectionFilter<TImage, TMask> { if (this->GetNumberOfInputs()<4) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TImage *>(this->itk::ProcessObject::GetInput(3)); } @@ -136,7 +136,7 @@ AdhesionCorrectionFilter<TImage, TMask> { if (this->GetNumberOfInputs()<5) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMask *>(this->itk::ProcessObject::GetInput(4)); } @@ -148,7 +148,7 @@ AdhesionCorrectionFilter<TImage, TMask> { if (this->GetNumberOfOutputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TMask *>(this->itk::ProcessObject::GetOutput(1)); } @@ -160,7 +160,7 @@ AdhesionCorrectionFilter<TImage, TMask> { if (this->GetNumberOfOutputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TImage *>(this->itk::ProcessObject::GetOutput(2)); } diff --git a/Modules/Registration/Stereo/include/otbBijectionCoherencyFilter.txx b/Modules/Registration/Stereo/include/otbBijectionCoherencyFilter.txx index e4d403338a..7bef0a97de 100644 --- a/Modules/Registration/Stereo/include/otbBijectionCoherencyFilter.txx +++ b/Modules/Registration/Stereo/include/otbBijectionCoherencyFilter.txx @@ -90,7 +90,7 @@ BijectionCoherencyFilter<TDisparityImage,TOutputImage> { if (this->GetNumberOfInputs()<1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(0)); } @@ -102,7 +102,7 @@ BijectionCoherencyFilter<TDisparityImage,TOutputImage> { if (this->GetNumberOfInputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(1)); } @@ -114,7 +114,7 @@ BijectionCoherencyFilter<TDisparityImage,TOutputImage> { if (this->GetNumberOfInputs()<3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(2)); } @@ -126,7 +126,7 @@ BijectionCoherencyFilter<TDisparityImage,TOutputImage> { if (this->GetNumberOfInputs()<4) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TDisparityImage *>(this->itk::ProcessObject::GetInput(3)); } diff --git a/Modules/Registration/Stereo/include/otbMulti3DMapToDEMFilter.txx b/Modules/Registration/Stereo/include/otbMulti3DMapToDEMFilter.txx index 811a24f35b..a1f8d45ea3 100644 --- a/Modules/Registration/Stereo/include/otbMulti3DMapToDEMFilter.txx +++ b/Modules/Registration/Stereo/include/otbMulti3DMapToDEMFilter.txx @@ -107,7 +107,7 @@ Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::Get3DMapInput(unsi { if ((2 * (index + 1)) > this->GetNumberOfInputs()) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const T3DImage *> (this->itk::ProcessObject::GetInput(2 * index)); } @@ -118,7 +118,7 @@ Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::GetMaskInput(unsig { if ((2 * (index + 1)) > this->GetNumberOfInputs()) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TMaskImage *> (this->itk::ProcessObject::GetInput(2 * index + 1)); } @@ -140,7 +140,7 @@ Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::GetDEMOutput() { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TOutputDEMImage *> (this->itk::ProcessObject::GetOutput(0)); } @@ -587,8 +587,8 @@ void Multi3DMapToDEMFilter<T3DImage, TMaskImage, TOutputDEMImage>::ThreadedGener InputInternalPixelType maxLat = std::max(regionLat1, regionLat2); */ - TOutputDEMImage * tmpDEM = ITK_NULLPTR; - AccumulatorImageType *tmpAcc = ITK_NULLPTR; + TOutputDEMImage * tmpDEM = nullptr; + AccumulatorImageType *tmpAcc = nullptr; typename TOutputDEMImage::RegionType outputRequestedRegion = outputPtr->GetRequestedRegion(); typename T3DImage::RegionType splitRegion; diff --git a/Modules/Registration/Stereo/include/otbStereoSensorModelToElevationMapFilter.txx b/Modules/Registration/Stereo/include/otbStereoSensorModelToElevationMapFilter.txx index a755dd1622..9ea41b6efb 100644 --- a/Modules/Registration/Stereo/include/otbStereoSensorModelToElevationMapFilter.txx +++ b/Modules/Registration/Stereo/include/otbStereoSensorModelToElevationMapFilter.txx @@ -84,7 +84,7 @@ StereoSensorModelToElevationFilter<TInputImage, TOutputHeight> { if(this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(0)); } @@ -96,7 +96,7 @@ StereoSensorModelToElevationFilter<TInputImage, TOutputHeight> { if(this->GetNumberOfInputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(1)); } @@ -108,7 +108,7 @@ StereoSensorModelToElevationFilter<TInputImage, TOutputHeight> { if(this->GetNumberOfOutputs()<2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<TOutputHeight *>(this->itk::ProcessObject::GetOutput(1)); } diff --git a/Modules/Registration/Stereo/include/otbStereorectificationDisplacementFieldSource.txx b/Modules/Registration/Stereo/include/otbStereorectificationDisplacementFieldSource.txx index 3806958e49..8e4c179c83 100644 --- a/Modules/Registration/Stereo/include/otbStereorectificationDisplacementFieldSource.txx +++ b/Modules/Registration/Stereo/include/otbStereorectificationDisplacementFieldSource.txx @@ -81,7 +81,7 @@ StereorectificationDisplacementFieldSource<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->itk::ProcessObject::GetOutput(0)); } @@ -107,7 +107,7 @@ StereorectificationDisplacementFieldSource<TInputImage, TOutputImage> { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *>(this->itk::ProcessObject::GetOutput(1)); } diff --git a/Modules/Registration/Stereo/test/otbMulti3DMapToDEMFilter.cxx b/Modules/Registration/Stereo/test/otbMulti3DMapToDEMFilter.cxx index 4faf448367..0480556ffd 100644 --- a/Modules/Registration/Stereo/test/otbMulti3DMapToDEMFilter.cxx +++ b/Modules/Registration/Stereo/test/otbMulti3DMapToDEMFilter.cxx @@ -127,8 +127,8 @@ int otbMulti3DMapToDEMFilterEPSG(int argc, char* argv[]) multiFilter->SetOutputSpacing(spacing); VectorImageType::PointType origin; - origin[0] = strtod(argv[argc-7], ITK_NULLPTR); - origin[1] = strtod(argv[argc-6], ITK_NULLPTR); + origin[0] = strtod(argv[argc-7], nullptr); + origin[1] = strtod(argv[argc-6], nullptr); multiFilter->SetOutputOrigin(origin); std::string projectionRef=otb::GeoInformationConversion::ToWKT( atoi(argv[argc-1])); @@ -383,8 +383,8 @@ spacing[1] = atof(argv[argc-1]); multiFilter->SetOutputSpacing(spacing); VectorImageType::PointType origin; -origin[0] = strtod(argv[argc-6], ITK_NULLPTR); -origin[1] = strtod(argv[argc-5], ITK_NULLPTR); +origin[0] = strtod(argv[argc-6], nullptr); +origin[1] = strtod(argv[argc-5], nullptr); multiFilter->SetOutputOrigin(origin); diff --git a/Modules/Segmentation/CCOBIA/test/otbConnectedComponentMuParserFunctorTest.cxx b/Modules/Segmentation/CCOBIA/test/otbConnectedComponentMuParserFunctorTest.cxx index c684334081..95505b3c9e 100644 --- a/Modules/Segmentation/CCOBIA/test/otbConnectedComponentMuParserFunctorTest.cxx +++ b/Modules/Segmentation/CCOBIA/test/otbConnectedComponentMuParserFunctorTest.cxx @@ -48,7 +48,7 @@ int otbConnectedComponentMuParserFunctorTest(int argc, char *argv[]) } else { - maskFilename = ITK_NULLPTR; + maskFilename = nullptr; } typedef float InputPixelType; @@ -77,7 +77,7 @@ int otbConnectedComponentMuParserFunctorTest(int argc, char *argv[]) filter->SetInput(reader->GetOutput()); - if(ITK_NULLPTR != maskFilename) + if(nullptr != maskFilename) { maskReader = MaskReaderType::New(); maskReader->SetFileName(maskFilename); diff --git a/Modules/Segmentation/Conversion/include/otbLabelImageRegionMergingFilter.txx b/Modules/Segmentation/Conversion/include/otbLabelImageRegionMergingFilter.txx index 6497158f87..34b7e59684 100644 --- a/Modules/Segmentation/Conversion/include/otbLabelImageRegionMergingFilter.txx +++ b/Modules/Segmentation/Conversion/include/otbLabelImageRegionMergingFilter.txx @@ -93,7 +93,7 @@ LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputLabelImageType *>(this->itk::ProcessObject::GetOutput(0)); } @@ -117,7 +117,7 @@ LabelImageRegionMergingFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputClusteredImageType *>(this->itk::ProcessObject::GetOutput(1)); } diff --git a/Modules/Segmentation/Conversion/include/otbLabelImageRegionPruningFilter.txx b/Modules/Segmentation/Conversion/include/otbLabelImageRegionPruningFilter.txx index 8ded186f9c..498e3dab05 100644 --- a/Modules/Segmentation/Conversion/include/otbLabelImageRegionPruningFilter.txx +++ b/Modules/Segmentation/Conversion/include/otbLabelImageRegionPruningFilter.txx @@ -94,7 +94,7 @@ LabelImageRegionPruningFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe { if (this->GetNumberOfOutputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputLabelImageType *>(this->itk::ProcessObject::GetOutput(0)); } @@ -118,7 +118,7 @@ LabelImageRegionPruningFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputClusteredImageType *>(this->itk::ProcessObject::GetOutput(1)); } diff --git a/Modules/Segmentation/Conversion/include/otbLabelImageToOGRDataSourceFilter.txx b/Modules/Segmentation/Conversion/include/otbLabelImageToOGRDataSourceFilter.txx index 0d41eba032..8f714630c7 100644 --- a/Modules/Segmentation/Conversion/include/otbLabelImageToOGRDataSourceFilter.txx +++ b/Modules/Segmentation/Conversion/include/otbLabelImageToOGRDataSourceFilter.txx @@ -81,7 +81,7 @@ LabelImageToOGRDataSourceFilter<TInputImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageType *>(this->Superclass::GetInput(0)); @@ -103,7 +103,7 @@ LabelImageToOGRDataSourceFilter<TInputImage> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageType *>(this->Superclass::GetInput(1)); @@ -207,14 +207,14 @@ LabelImageToOGRDataSourceFilter<TInputImage> //Create the output layer for GDALPolygonize(). ogr::DataSource::Pointer ogrDS = ogr::DataSource::New(); - OGRLayerType outputLayer = ogrDS->CreateLayer("layer",ITK_NULLPTR,wkbPolygon); + OGRLayerType outputLayer = ogrDS->CreateLayer("layer",nullptr,wkbPolygon); OGRFieldDefn field(m_FieldName.c_str(),OFTInteger); outputLayer.CreateField(field, true); //Call GDALPolygonize() char ** options; - options = ITK_NULLPTR; + options = nullptr; char * option[2]= { nullptr , nullptr } ; if (m_Use8Connected == true) { @@ -274,12 +274,12 @@ LabelImageToOGRDataSourceFilter<TInputImage> } maskDataset->SetGeoTransform(geoTransform); - GDALPolygonize(dataset->GetRasterBand(1), maskDataset->GetRasterBand(1), &outputLayer.ogr(), 0, options, ITK_NULLPTR, ITK_NULLPTR); + GDALPolygonize(dataset->GetRasterBand(1), maskDataset->GetRasterBand(1), &outputLayer.ogr(), 0, options, nullptr, nullptr); GDALClose(maskDataset); } else { - GDALPolygonize(dataset->GetRasterBand(1), ITK_NULLPTR, &outputLayer.ogr(), 0, options, ITK_NULLPTR, ITK_NULLPTR); + GDALPolygonize(dataset->GetRasterBand(1), nullptr, &outputLayer.ogr(), 0, options, nullptr, nullptr); } this->SetNthOutput(0,ogrDS); diff --git a/Modules/Segmentation/Conversion/include/otbLabelImageToVectorDataFilter.txx b/Modules/Segmentation/Conversion/include/otbLabelImageToVectorDataFilter.txx index 698b326eb9..fdc11febda 100644 --- a/Modules/Segmentation/Conversion/include/otbLabelImageToVectorDataFilter.txx +++ b/Modules/Segmentation/Conversion/include/otbLabelImageToVectorDataFilter.txx @@ -62,7 +62,7 @@ LabelImageToVectorDataFilter<TInputImage, TPrecision> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageType *>(this->Superclass::GetInput(0)); @@ -84,7 +84,7 @@ LabelImageToVectorDataFilter<TInputImage, TPrecision> { if (this->GetNumberOfInputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageType *>(this->Superclass::GetInput(1)); @@ -187,14 +187,14 @@ LabelImageToVectorDataFilter<TInputImage, TPrecision> //Create the output layer for GDALPolygonize(). ogr::DataSource::Pointer ogrDS = ogr::DataSource::New(); - OGRLayerType outputLayer = ogrDS->CreateLayer("layer",ITK_NULLPTR,wkbPolygon); + OGRLayerType outputLayer = ogrDS->CreateLayer("layer",nullptr,wkbPolygon); OGRFieldDefn field(m_FieldName.c_str(),OFTInteger); outputLayer.CreateField(field, true); //Call GDALPolygonize() char ** options; - options = ITK_NULLPTR; + options = nullptr; char * option[1]; if (m_Use8Connected == true) { @@ -254,12 +254,12 @@ LabelImageToVectorDataFilter<TInputImage, TPrecision> } maskDataset->SetGeoTransform(geoTransform); - GDALPolygonize(dataset->GetRasterBand(1), maskDataset->GetRasterBand(1), &outputLayer.ogr(), 0, options, ITK_NULLPTR, ITK_NULLPTR); + GDALPolygonize(dataset->GetRasterBand(1), maskDataset->GetRasterBand(1), &outputLayer.ogr(), 0, options, nullptr, nullptr); GDALClose(maskDataset); } else { - GDALPolygonize(dataset->GetRasterBand(1), ITK_NULLPTR, &outputLayer.ogr(), 0, options, ITK_NULLPTR, ITK_NULLPTR); + GDALPolygonize(dataset->GetRasterBand(1), nullptr, &outputLayer.ogr(), 0, options, nullptr, nullptr); } diff --git a/Modules/Segmentation/Conversion/include/otbLabelMapToVectorDataFilter.txx b/Modules/Segmentation/Conversion/include/otbLabelMapToVectorDataFilter.txx index a4155ec9c2..6cf464cd98 100644 --- a/Modules/Segmentation/Conversion/include/otbLabelMapToVectorDataFilter.txx +++ b/Modules/Segmentation/Conversion/include/otbLabelMapToVectorDataFilter.txx @@ -59,7 +59,7 @@ LabelMapToVectorDataFilter<TLabelMap, TVectorData, TFieldsFunctor> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TLabelMap *> diff --git a/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.txx b/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.txx index ef069d7611..71b45b9026 100644 --- a/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.txx +++ b/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.txx @@ -241,7 +241,7 @@ OGRDataSourceToLabelImageFilter<TOutputImage>::GenerateData() GDALSetGeoTransform(dataset,const_cast<double*>(geoTransform.GetDataPointer())); // Burn the geometries into the dataset - if (dataset != ITK_NULLPTR) + if (dataset != nullptr) { std::vector<std::string> options; @@ -256,9 +256,9 @@ OGRDataSourceToLabelImageFilter<TOutputImage>::GenerateData() &m_BandsToBurn[0], m_SrcDataSetLayers.size(), &(m_SrcDataSetLayers[0]), - ITK_NULLPTR, ITK_NULLPTR, &foreground[0], + nullptr, nullptr, &foreground[0], ogr::StringListConverter(options).to_ogr(), - ITK_NULLPTR, ITK_NULLPTR ); + nullptr, nullptr ); // release the dataset GDALClose( dataset ); } diff --git a/Modules/Segmentation/Conversion/include/otbPersistentImageToOGRLayerFilter.txx b/Modules/Segmentation/Conversion/include/otbPersistentImageToOGRLayerFilter.txx index 730dd18455..29cfa84a63 100644 --- a/Modules/Segmentation/Conversion/include/otbPersistentImageToOGRLayerFilter.txx +++ b/Modules/Segmentation/Conversion/include/otbPersistentImageToOGRLayerFilter.txx @@ -34,7 +34,7 @@ namespace otb template<class TImage> PersistentImageToOGRLayerFilter<TImage> -::PersistentImageToOGRLayerFilter() : m_OGRLayer(ITK_NULLPTR, false) +::PersistentImageToOGRLayerFilter() : m_OGRLayer(nullptr, false) { m_StreamSize.Fill(0); } diff --git a/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.h b/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.h index eb197d050f..90bfbc448f 100644 --- a/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.h +++ b/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.h @@ -141,7 +141,7 @@ protected: RasterizeVectorDataFilter(); ~RasterizeVectorDataFilter() override { - if (m_OGRDataSourcePointer != ITK_NULLPTR) + if (m_OGRDataSourcePointer != nullptr) { ogr::version_proxy::Close(m_OGRDataSourcePointer); } diff --git a/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.txx b/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.txx index 58f817ce10..b3c2d3fd16 100644 --- a/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.txx +++ b/Modules/Segmentation/Conversion/include/otbRasterizeVectorDataFilter.txx @@ -30,7 +30,7 @@ namespace otb template<class TVectorData, class TInputImage, class TOutputImage> RasterizeVectorDataFilter<TVectorData, TInputImage, TOutputImage> ::RasterizeVectorDataFilter() - : m_OGRDataSourcePointer(ITK_NULLPTR) + : m_OGRDataSourcePointer(nullptr) { this->SetNumberOfRequiredInputs(1); } @@ -69,7 +69,7 @@ RasterizeVectorDataFilter<TVectorData, TInputImage, TOutputImage> // Get the projection ref of the current VectorData std::string projectionRefWkt = vd->GetProjectionRef(); bool projectionInformationAvailable = !projectionRefWkt.empty(); - OGRSpatialReference * oSRS = ITK_NULLPTR; + OGRSpatialReference * oSRS = nullptr; if (projectionInformationAvailable) { @@ -88,14 +88,14 @@ RasterizeVectorDataFilter<TVectorData, TInputImage, TOutputImage> // Iterative method to build the layers from a VectorData OGRRegisterAll(); - OGRLayer * ogrCurrentLayer = ITK_NULLPTR; + OGRLayer * ogrCurrentLayer = nullptr; std::vector<OGRLayer *> ogrLayerVector; otb::OGRIOHelper::Pointer IOConversion = otb::OGRIOHelper::New(); // The method ConvertDataTreeNodeToOGRLayers create the // OGRDataSource but don t release it. Destruction is done in the // desctructor - m_OGRDataSourcePointer = ITK_NULLPTR; + m_OGRDataSourcePointer = nullptr; ogrLayerVector = IOConversion->ConvertDataTreeNodeToOGRLayers(inputRoot, m_OGRDataSourcePointer, ogrCurrentLayer, @@ -108,7 +108,7 @@ RasterizeVectorDataFilter<TVectorData, TInputImage, TOutputImage> } // Destroy the oSRS - if (oSRS != ITK_NULLPTR) + if (oSRS != nullptr) { OSRRelease(oSRS); } @@ -189,15 +189,15 @@ RasterizeVectorDataFilter<TVectorData, TInputImage, TOutputImage>::GenerateData( GDALSetGeoTransform(dataset,const_cast<double*>(geoTransform.GetDataPointer())); // Burn the geometries into the dataset - if (dataset != ITK_NULLPTR) + if (dataset != nullptr) { GDALRasterizeLayers( dataset, m_BandsToBurn.size(), &(m_BandsToBurn[0]), m_SrcDataSetLayers.size(), &(m_SrcDataSetLayers[0]), - ITK_NULLPTR, ITK_NULLPTR, &(m_FullBurnValues[0]), - ITK_NULLPTR, - GDALDummyProgress, ITK_NULLPTR ); + nullptr, nullptr, &(m_FullBurnValues[0]), + nullptr, + GDALDummyProgress, nullptr ); // release the dataset GDALClose( dataset ); diff --git a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h index 7f3056a94f..1a0d68bcf0 100644 --- a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h +++ b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h @@ -143,7 +143,7 @@ protected: OGR_G_DestroyGeometry(m_SrcDataSetGeometries[idx]); } - if (m_OGRDataSourcePointer != ITK_NULLPTR) + if (m_OGRDataSourcePointer != nullptr) { ogr::version_proxy::Close(m_OGRDataSourcePointer); } diff --git a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.txx b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.txx index b8fcb83d7c..549b9612a5 100644 --- a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.txx +++ b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.txx @@ -36,7 +36,7 @@ namespace otb template<class TVectorData, class TOutputImage> VectorDataToLabelImageFilter<TVectorData, TOutputImage> ::VectorDataToLabelImageFilter() - : m_OGRDataSourcePointer(ITK_NULLPTR), + : m_OGRDataSourcePointer(nullptr), m_BandsToBurn(1, 1), m_BurnAttribute("FID"), m_DefaultBurnValue(1.), @@ -166,7 +166,7 @@ VectorDataToLabelImageFilter<TVectorData, TOutputImage> // Get the projection ref of the current VectorData std::string projectionRefWkt = vd->GetProjectionRef(); bool projectionInformationAvailable = !projectionRefWkt.empty(); - OGRSpatialReference * oSRS = ITK_NULLPTR; + OGRSpatialReference * oSRS = nullptr; if (projectionInformationAvailable) { @@ -184,14 +184,14 @@ VectorDataToLabelImageFilter<TVectorData, TOutputImage> InternalTreeNodeType * inputRoot = const_cast<InternalTreeNodeType *>(tree->GetRoot()); // Iterative method to build the layers from a VectorData - OGRLayer * ogrCurrentLayer = ITK_NULLPTR; + OGRLayer * ogrCurrentLayer = nullptr; std::vector<OGRLayer *> ogrLayerVector; otb::OGRIOHelper::Pointer IOConversion = otb::OGRIOHelper::New(); // The method ConvertDataTreeNodeToOGRLayers create the // OGRDataSource but don t release it. Destruction is done in the // desctructor - m_OGRDataSourcePointer = ITK_NULLPTR; + m_OGRDataSourcePointer = nullptr; ogrLayerVector = IOConversion->ConvertDataTreeNodeToOGRLayers(inputRoot, m_OGRDataSourcePointer, ogrCurrentLayer, @@ -211,10 +211,10 @@ VectorDataToLabelImageFilter<TVectorData, TOutputImage> // Get the geometries of the layer OGRFeatureH hFeat; OGR_L_ResetReading( (OGRLayerH)(ogrLayerVector[idx2]) ); - while( ( hFeat = OGR_L_GetNextFeature( (OGRLayerH)(ogrLayerVector[idx2]) )) != ITK_NULLPTR ) + while( ( hFeat = OGR_L_GetNextFeature( (OGRLayerH)(ogrLayerVector[idx2]) )) != nullptr ) { OGRGeometryH hGeom; - if( OGR_F_GetGeometryRef( hFeat ) == ITK_NULLPTR ) + if( OGR_F_GetGeometryRef( hFeat ) == nullptr ) { OGR_F_Destroy( hFeat ); continue; @@ -242,7 +242,7 @@ VectorDataToLabelImageFilter<TVectorData, TOutputImage> } // Destroy the oSRS - if (oSRS != ITK_NULLPTR) + if (oSRS != nullptr) { OSRRelease(oSRS); } @@ -304,15 +304,15 @@ VectorDataToLabelImageFilter<TVectorData, TOutputImage>::GenerateData() GDALSetGeoTransform(dataset,const_cast<double*>(geoTransform.GetDataPointer())); // Burn the geometries into the dataset - if (dataset != ITK_NULLPTR) + if (dataset != nullptr) { GDALRasterizeGeometries( dataset, m_BandsToBurn.size(), &(m_BandsToBurn[0]), m_SrcDataSetGeometries.size(), &(m_SrcDataSetGeometries[0]), - ITK_NULLPTR, ITK_NULLPTR, &(m_FullBurnValues[0]), - ITK_NULLPTR, - GDALDummyProgress, ITK_NULLPTR ); + nullptr, nullptr, &(m_FullBurnValues[0]), + nullptr, + GDALDummyProgress, nullptr ); // release the dataset GDALClose( dataset ); diff --git a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapWithAttributesFilter.txx b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapWithAttributesFilter.txx index 3a026a063a..1d81abe61e 100644 --- a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapWithAttributesFilter.txx +++ b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapWithAttributesFilter.txx @@ -228,7 +228,7 @@ VectorDataToLabelMapWithAttributesFilter<TVectorData, TLabelMap> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const TVectorData *> diff --git a/Modules/Segmentation/MorphologicalProfiles/include/otbGeodesicMorphologyDecompositionImageFilter.txx b/Modules/Segmentation/MorphologicalProfiles/include/otbGeodesicMorphologyDecompositionImageFilter.txx index 5d16052ff5..5c56cbb992 100644 --- a/Modules/Segmentation/MorphologicalProfiles/include/otbGeodesicMorphologyDecompositionImageFilter.txx +++ b/Modules/Segmentation/MorphologicalProfiles/include/otbGeodesicMorphologyDecompositionImageFilter.txx @@ -115,7 +115,7 @@ GeodesicMorphologyDecompositionImageFilter<TInputImage, TOutputImage, TStructuri { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *> (this->itk::ProcessObject::GetOutput(1)); @@ -131,7 +131,7 @@ GeodesicMorphologyDecompositionImageFilter<TInputImage, TOutputImage, TStructuri { if (this->GetNumberOfOutputs() < 3) { - return ITK_NULLPTR; + return nullptr; } return static_cast<OutputImageType *> (this->itk::ProcessObject::GetOutput(2)); diff --git a/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.txx b/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.txx index 35aa0584a4..5b112476fb 100644 --- a/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.txx +++ b/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.txx @@ -46,7 +46,7 @@ ProfileDerivativeToMultiScaleCharacteristicsFilter<TInputImage, TOutputImage, TL { if (this->GetNumberOfOutputs() < 2) { - return ITK_NULLPTR; + return nullptr; } return static_cast<LabeledImageType *> (this->itk::ProcessObject::GetOutput(1)); diff --git a/Modules/Segmentation/OGRProcessing/include/otbOGRLayerStreamStitchingFilter.txx b/Modules/Segmentation/OGRProcessing/include/otbOGRLayerStreamStitchingFilter.txx index 53a3717db3..7ca556f7b9 100644 --- a/Modules/Segmentation/OGRProcessing/include/otbOGRLayerStreamStitchingFilter.txx +++ b/Modules/Segmentation/OGRProcessing/include/otbOGRLayerStreamStitchingFilter.txx @@ -33,7 +33,7 @@ namespace otb template<class TImage> OGRLayerStreamStitchingFilter<TImage> -::OGRLayerStreamStitchingFilter() : m_Radius(2), m_OGRLayer(ITK_NULLPTR, false) +::OGRLayerStreamStitchingFilter() : m_Radius(2), m_OGRLayer(nullptr, false) { m_StreamSize.Fill(0); } @@ -54,7 +54,7 @@ OGRLayerStreamStitchingFilter<TInputImage> { if (this->GetNumberOfInputs() < 1) { - return ITK_NULLPTR; + return nullptr; } return static_cast<const InputImageType *>(this->Superclass::GetInput(0)); diff --git a/Modules/Segmentation/OGRProcessing/test/otbOGRLayerStreamStitchingFilter.cxx b/Modules/Segmentation/OGRProcessing/test/otbOGRLayerStreamStitchingFilter.cxx index 1bbc210129..22f8e65421 100644 --- a/Modules/Segmentation/OGRProcessing/test/otbOGRLayerStreamStitchingFilter.cxx +++ b/Modules/Segmentation/OGRProcessing/test/otbOGRLayerStreamStitchingFilter.cxx @@ -88,7 +88,7 @@ int otbOGRLayerStreamStitchingFilter(int argc, char * argv[]) //REPACK the layer to remove features marked as deleted in the Shapefile. std::string sql("REPACK "); sql = sql + layerName; - ogrDS->ExecuteSQL(sql , ITK_NULLPTR, ITK_NULLPTR); + ogrDS->ExecuteSQL(sql , nullptr, nullptr); return EXIT_SUCCESS; } diff --git a/Modules/Visualization/Ice/include/otbGlImageActor.h b/Modules/Visualization/Ice/include/otbGlImageActor.h index 9f2c4b7ac1..dcc3a6aeb8 100644 --- a/Modules/Visualization/Ice/include/otbGlImageActor.h +++ b/Modules/Visualization/Ice/include/otbGlImageActor.h @@ -229,7 +229,7 @@ protected: m_RedIdx(1), m_GreenIdx(2), m_BlueIdx(3), - m_RescaleFilter(ITK_NULLPTR) + m_RescaleFilter(nullptr) { m_UL.Fill(0); m_UR.Fill(0); diff --git a/Modules/Visualization/Ice/include/otbGlView.h b/Modules/Visualization/Ice/include/otbGlView.h index 63c43a3753..a3c0bd9983 100644 --- a/Modules/Visualization/Ice/include/otbGlView.h +++ b/Modules/Visualization/Ice/include/otbGlView.h @@ -327,7 +327,7 @@ GlView const otb::GeoInterface * geo = dynamic_cast< const GeoInterface * >( actor.GetPointer() ); - if( geo==ITK_NULLPTR ) + if( geo==nullptr ) return false; const otb::GeoInterface::Spacing2 nativeReferenceSpacing = geo->GetSpacing(); @@ -631,7 +631,7 @@ GlView const GeoInterface * geo = dynamic_cast< const GeoInterface * >( actor.GetPointer() ); - if( geo==ITK_NULLPTR ) + if( geo==nullptr ) return false; // Get viewport current center and spacing. diff --git a/Modules/Visualization/Ice/src/otbFragmentShaderRegistry.cxx b/Modules/Visualization/Ice/src/otbFragmentShaderRegistry.cxx index 8e2577a9e1..a9c80e2f80 100644 --- a/Modules/Visualization/Ice/src/otbFragmentShaderRegistry.cxx +++ b/Modules/Visualization/Ice/src/otbFragmentShaderRegistry.cxx @@ -59,7 +59,7 @@ void FragmentShaderRegistry::RegisterShader(const std::string& name, const std:: const char * source_cstr = source.c_str(); - glShaderSource(shader, 1, &source_cstr,ITK_NULLPTR); + glShaderSource(shader, 1, &source_cstr,nullptr); glCompileShader(shader); GLint compiled; @@ -78,7 +78,7 @@ void FragmentShaderRegistry::RegisterShader(const std::string& name, const std:: delete [] logs; // For safety! - logs = ITK_NULLPTR; + logs = nullptr; // Shader must be destroyed here! glDeleteShader( shader ); diff --git a/Modules/Visualization/Ice/src/otbGlVectorActor.cxx b/Modules/Visualization/Ice/src/otbGlVectorActor.cxx index 6ba0a87052..e270d01c64 100644 --- a/Modules/Visualization/Ice/src/otbGlVectorActor.cxx +++ b/Modules/Visualization/Ice/src/otbGlVectorActor.cxx @@ -210,8 +210,8 @@ void GlVectorActor::SetCurrentLayer(const std::string & layername) m_CurrentLayer = m_OGRDataSource->GetLayerChecked(layername).GetName(); // Clear transforms - m_VectorToViewportTransform = ITK_NULLPTR; - m_ViewportToVectorTransform = ITK_NULLPTR; + m_VectorToViewportTransform = nullptr; + m_ViewportToVectorTransform = nullptr; // Clear features m_InternalFeatures.clear(); @@ -371,7 +371,7 @@ void GlVectorActor::UpdateData() { std::ostringstream oss; oss<<"SELECT * FROM "<<m_CurrentLayer<<" WHERE OGR_GEOM_AREA>"<<100*areaOfScreenPixel; - filtered = m_OGRDataSource->ExecuteSQL(oss.str(), &spatialFilter,ITK_NULLPTR); + filtered = m_OGRDataSource->ExecuteSQL(oss.str(), &spatialFilter,nullptr); } m_InternalFeatures.clear(); @@ -427,7 +427,7 @@ void GeometryRender(const OGRPolygon * in, GLUtesselator * tesselator, bool fill gluTessProperty(tesselator, GLU_TESS_BOUNDARY_ONLY, !fill); // Begin a new polygon - gluTessBeginPolygon(tesselator, ITK_NULLPTR); + gluTessBeginPolygon(tesselator, nullptr); // Render the outer boundary gluTessBeginContour(tesselator); @@ -473,7 +473,7 @@ void GeometryRender(const OGRPolygon * in, GLUtesselator * tesselator, bool fill gluTessProperty(tesselator, GLU_TESS_BOUNDARY_ONLY, true); // Begin a new polygon - gluTessBeginPolygon(tesselator, ITK_NULLPTR); + gluTessBeginPolygon(tesselator, nullptr); // Render the outer boundary gluTessBeginContour(tesselator); diff --git a/Modules/Visualization/Ice/src/otbGlVersionChecker.cxx b/Modules/Visualization/Ice/src/otbGlVersionChecker.cxx index 158157d0b4..3234f3654f 100644 --- a/Modules/Visualization/Ice/src/otbGlVersionChecker.cxx +++ b/Modules/Visualization/Ice/src/otbGlVersionChecker.cxx @@ -44,7 +44,7 @@ GlVersionChecker { const GLubyte * glVersionStr = glGetString( GL_VERSION ); - if( glVersionStr==ITK_NULLPTR ) + if( glVersionStr==nullptr ) { std::ostringstream oss; @@ -65,7 +65,7 @@ GlVersionChecker { const GLubyte * slVersionStr = glGetString( GL_SHADING_LANGUAGE_VERSION ); - if( slVersionStr==ITK_NULLPTR ) + if( slVersionStr==nullptr ) { std::ostringstream oss; @@ -90,7 +90,7 @@ GlVersionChecker // If OpenGL version is at least 2.0, get (and return) GLSL version // (before checking against OpenGL required version). if( GlVersionChecker::VerCmp( glVersion, "2.0" )<0 ) - glslVersion = ITK_NULLPTR; + glslVersion = nullptr; else glslVersion = GlVersionChecker::GLSLVersion(); @@ -118,7 +118,7 @@ GlVersionChecker { // // Special case: empty strings returns 0.0.0 and true. - if( version==ITK_NULLPTR || strlen( version )==0 ) + if( version==nullptr || strlen( version )==0 ) { major = 0; minor = 0; @@ -147,7 +147,7 @@ GlVersionChecker const char * minorStr = strchr( version, '.' ); - if( minorStr==ITK_NULLPTR ) + if( minorStr==nullptr ) return false; minor = atoi( ++minorStr ); @@ -161,7 +161,7 @@ GlVersionChecker // In this case, it is Ok to return because version of the form // Major.minor are handled. - if( releaseStr==ITK_NULLPTR ) + if( releaseStr==nullptr ) return true; release = atoi( ++releaseStr ); diff --git a/Modules/Visualization/Ice/src/otbGlView.cxx b/Modules/Visualization/Ice/src/otbGlView.cxx index 3c94fcfc8b..05ec04e581 100644 --- a/Modules/Visualization/Ice/src/otbGlView.cxx +++ b/Modules/Visualization/Ice/src/otbGlView.cxx @@ -463,7 +463,7 @@ GlView } delete[] glBuffer; - glBuffer = ITK_NULLPTR; + glBuffer = nullptr; // // Setup import RGBA-image filter. diff --git a/Modules/Visualization/Ice/src/otbStandardShader.cxx b/Modules/Visualization/Ice/src/otbStandardShader.cxx index 91d75ebc78..3ffd7820e1 100644 --- a/Modules/Visualization/Ice/src/otbStandardShader.cxx +++ b/Modules/Visualization/Ice/src/otbStandardShader.cxx @@ -49,8 +49,8 @@ StandardShader::~StandardShader() std::string StandardShader::GetSource() const { - const char * glVersion = ITK_NULLPTR; - const char * glslVersion = ITK_NULLPTR; + const char * glVersion = nullptr; + const char * glslVersion = nullptr; if(!otb::GlVersionChecker::CheckGLCapabilities( glVersion, glslVersion)) { itkExceptionMacro(<<" Required GL and GLSL versions were not found (GL version is "<<glVersion<<", should be at least "<<otb::GlVersionChecker::REQUIRED_GL_VERSION<<", GLSL version is "<<glslVersion<<", should be at least "<<otb::GlVersionChecker::REQUIRED_GLSL_VERSION<<")"); diff --git a/Modules/Visualization/IceViewer/src/otbIce.cxx b/Modules/Visualization/IceViewer/src/otbIce.cxx index 72c18dee5c..6673a0c631 100644 --- a/Modules/Visualization/IceViewer/src/otbIce.cxx +++ b/Modules/Visualization/IceViewer/src/otbIce.cxx @@ -42,13 +42,13 @@ int main(int argc, char * argv[]) otb::DEMHandler::Pointer demHandler = otb::DEMHandler::Instance(); - if(demdir != ITK_NULLPTR) + if(demdir != nullptr) { std::cout<<"Configuring DEM directory: "<<demdir<<std::endl; demHandler->OpenDEMDirectory(demdir); } - if(geoidfile != ITK_NULLPTR) + if(geoidfile != nullptr) { std::cout<<"Configuring geoid file: "<<geoidfile<<std::endl; demHandler->OpenGeoidFile(geoidfile); diff --git a/Modules/Visualization/IceViewer/src/otbIceViewer.cxx b/Modules/Visualization/IceViewer/src/otbIceViewer.cxx index d3dff6710e..00bcc7a481 100644 --- a/Modules/Visualization/IceViewer/src/otbIceViewer.cxx +++ b/Modules/Visualization/IceViewer/src/otbIceViewer.cxx @@ -41,7 +41,7 @@ GlVectorActor::ColorType BuildColor(double r, double g, double b) } IceViewer::IceViewer() - : m_Window(ITK_NULLPTR), + : m_Window(nullptr), m_View(), m_FastRendering(false), m_SelectedActor(""), @@ -74,7 +74,7 @@ IceViewer::IceViewer() IceViewer::~IceViewer() { - if(m_Window != ITK_NULLPTR) + if(m_Window != nullptr) { glfwDestroyWindow(m_Window); } @@ -91,8 +91,8 @@ void IceViewer::AddImage(const std::string & fname, const std::string & key, con otb::GlImageActor::Pointer actor = otb::GlImageActor::New(); - const char * glVersion = ITK_NULLPTR; - const char * glslVersion = ITK_NULLPTR; + const char * glVersion = nullptr; + const char * glslVersion = nullptr; if( GlVersionChecker::CheckGLCapabilities( glVersion, glslVersion ) ) @@ -229,19 +229,19 @@ void IceViewer::Initialize(unsigned int w, unsigned int h, const std::string & n // Initialize glut (ugly workaround) int fake_argc = 1; char fake_name[] = "fake"; - char * fake_argv[] = {fake_name,ITK_NULLPTR}; + char * fake_argv[] = {fake_name,nullptr}; glutInit(&fake_argc,fake_argv); // Set glfw errors callback glfwSetErrorCallback(error_callback); // Create the window - if(m_Window != ITK_NULLPTR) + if(m_Window != nullptr) { glfwDestroyWindow(m_Window); } - m_Window = glfwCreateWindow(w, h,name.c_str(), ITK_NULLPTR, ITK_NULLPTR); + m_Window = glfwCreateWindow(w, h,name.c_str(), nullptr, nullptr); if (!m_Window) { itkExceptionMacro(<<"Could not create glfw window."); diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index cd34d9bddc..943e79aa4c 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -366,7 +366,7 @@ void Application::UpdateParameters() { Parameter* param = GetParameterByKey(inXMLKey); InputProcessXMLParameter* inXMLParam = dynamic_cast<InputProcessXMLParameter*>(param); - if(inXMLParam!=ITK_NULLPTR) + if(inXMLParam!=nullptr) { // switch on 'm_IsInXMLParsed' before Read() to avoid cyclic calls m_IsInXMLParsed = true; @@ -606,7 +606,7 @@ int Application::Execute() UseSpecificSeed = true; Parameter* param = GetParameterByKey(key); IntParameter* randParam = dynamic_cast<IntParameter*> (param); - if(randParam!=ITK_NULLPTR) + if(randParam!=nullptr) { int seed = randParam->GetValue(); itk::Statistics::MersenneTwisterRandomVariateGenerator::GetInstance()->SetSeed(seed); @@ -627,7 +627,7 @@ int Application::Execute() { OutputImageParameter * outImgParamPtr = dynamic_cast<OutputImageParameter *>(GetParameterByKey(*it)); // If this is an OutputImageParameter - if(outImgParamPtr != ITK_NULLPTR) + if(outImgParamPtr != nullptr) { // If the parameter is enabled if(IsParameterEnabled(*it)) @@ -667,7 +667,7 @@ int Application::ExecuteAndWriteOutput() { Parameter* param = GetParameterByKey(key); RAMParameter* ramParam = dynamic_cast<RAMParameter*>(param); - if(ramParam!=ITK_NULLPTR) + if(ramParam!=nullptr) { ram = ramParam->GetValue(); useRAM = true; @@ -686,7 +686,7 @@ int Application::ExecuteAndWriteOutput() Parameter* param = GetParameterByKey(key); OutputImageParameter* outputParam = dynamic_cast<OutputImageParameter*>(param); - if(outputParam!=ITK_NULLPTR) + if(outputParam!=nullptr) { std::string checkReturn = outputParam->CheckFileName(true); if (!checkReturn.empty()) @@ -709,7 +709,7 @@ int Application::ExecuteAndWriteOutput() { Parameter* param = GetParameterByKey(key); OutputVectorDataParameter* outputParam = dynamic_cast<OutputVectorDataParameter*>(param); - if(outputParam!=ITK_NULLPTR) + if(outputParam!=nullptr) { outputParam->InitializeWriters(); std::ostringstream progressId; @@ -724,7 +724,7 @@ int Application::ExecuteAndWriteOutput() Parameter* param = GetParameterByKey(key); ComplexOutputImageParameter* outputParam = dynamic_cast<ComplexOutputImageParameter*>(param); - if(outputParam!=ITK_NULLPTR) + if(outputParam!=nullptr) { outputParam->InitializeWriters(); if (useRAM) @@ -743,7 +743,7 @@ int Application::ExecuteAndWriteOutput() { Parameter* param = GetParameterByKey(key); OutputProcessXMLParameter* outXMLParam = dynamic_cast<OutputProcessXMLParameter*>(param); - if(outXMLParam!=ITK_NULLPTR) + if(outXMLParam!=nullptr) { outXMLParam->Write(this); } @@ -1657,7 +1657,7 @@ unsigned int Application::GetNumberOfElementsInParameterInputImageList(std::stri FloatVectorImageType* Application::GetParameterImage(std::string parameter) { - FloatVectorImageType::Pointer ret = ITK_NULLPTR; + FloatVectorImageType::Pointer ret = nullptr; Parameter* param = GetParameterByKey(parameter); if (dynamic_cast<InputImageParameter*> (param)) @@ -1675,7 +1675,7 @@ FloatVectorImageType* Application::GetParameterImage(std::string parameter) FloatVectorImageListType* Application::GetParameterImageList(std::string parameter) { - FloatVectorImageListType::Pointer ret=ITK_NULLPTR; + FloatVectorImageListType::Pointer ret=nullptr; Parameter* param = GetParameterByKey(parameter); if (dynamic_cast<InputImageListParameter*>(param)) @@ -1693,7 +1693,7 @@ FloatVectorImageListType* Application::GetParameterImageList(std::string paramet ComplexFloatVectorImageType* Application::GetParameterComplexImage(std::string parameter) { - ComplexFloatVectorImageType::Pointer ret=ITK_NULLPTR; + ComplexFloatVectorImageType::Pointer ret=nullptr; Parameter* param = GetParameterByKey(parameter); if (dynamic_cast<ComplexInputImageParameter*>(param)) @@ -1711,7 +1711,7 @@ ComplexFloatVectorImageType* Application::GetParameterComplexImage(std::string p VectorDataType* Application::GetParameterVectorData(std::string parameter) { - VectorDataType::Pointer ret=ITK_NULLPTR; + VectorDataType::Pointer ret=nullptr; Parameter* param = GetParameterByKey(parameter); if (dynamic_cast<InputVectorDataParameter*>(param)) @@ -1728,7 +1728,7 @@ VectorDataType* Application::GetParameterVectorData(std::string parameter) VectorDataListType* Application::GetParameterVectorDataList(std::string parameter) { - VectorDataListType::Pointer ret=ITK_NULLPTR; + VectorDataListType::Pointer ret=nullptr; Parameter* param = GetParameterByKey(parameter); if (dynamic_cast<InputVectorDataListParameter*>(param)) diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationRegistry.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationRegistry.cxx index f68d3a3923..e5a60bad36 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationRegistry.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationRegistry.cxx @@ -71,7 +71,7 @@ public: { if ((*it).first == app) { - (*it).first = ITK_NULLPTR; + (*it).first = nullptr; } ++it; } @@ -85,13 +85,13 @@ public: AppHandleContainerType::iterator it; for (it = m_Container.begin() ; it != m_Container.end() ; ++it) { - if ((*it).first == ITK_NULLPTR) + if ((*it).first == nullptr) { itk::DynamicLoader::CloseLibrary( static_cast<itk::LibHandle>((*it).second)); - (*it).second = ITK_NULLPTR; + (*it).second = nullptr; } } - m_Container.remove(AppHandlePairType((Application*) ITK_NULLPTR, (void*) ITK_NULLPTR)); + m_Container.remove(AppHandlePairType((Application*) nullptr, (void*) nullptr)); } /** close all handles at program exit */ @@ -222,7 +222,7 @@ typedef itk::ObjectFactoryBase * ( *ITK_LOAD_FUNCTION )(); Application::Pointer ApplicationRegistry::CreateApplicationFaster(const std::string& name) { - ApplicationPointer appli = ITK_NULLPTR; + ApplicationPointer appli = nullptr; std::string appExtension = itksys::DynamicLoader::LibExtension(); #ifdef __APPLE__ @@ -328,7 +328,7 @@ ApplicationRegistry::GetAvailableApplications(bool useFactory) { appSet.insert(name); } - appli = ITK_NULLPTR; + appli = nullptr; } } } diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperComplexInputImageParameter.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperComplexInputImageParameter.cxx index 1b3883e36c..961a40ae45 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperComplexInputImageParameter.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperComplexInputImageParameter.cxx @@ -138,9 +138,9 @@ ComplexInputImageParameter::HasValue() const void ComplexInputImageParameter::ClearValue() { - m_Image = ITK_NULLPTR; - m_Reader = ITK_NULLPTR; - m_Caster = ITK_NULLPTR; + m_Image = nullptr; + m_Reader = nullptr; + m_Caster = nullptr; m_FileName = ""; m_PreviousFileName=""; m_UseFilename = true; diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperComplexOutputImageParameter.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperComplexOutputImageParameter.cxx index 4218836ed7..59e438ca2b 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperComplexOutputImageParameter.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperComplexOutputImageParameter.cxx @@ -253,7 +253,7 @@ ComplexOutputImageParameter::Write() itk::ProcessObject* ComplexOutputImageParameter::GetWriter() { - itk::ProcessObject* writer = ITK_NULLPTR; + itk::ProcessObject* writer = nullptr; switch ( GetComplexPixelType() ) { case ComplexImagePixelType_int16: diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameter.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameter.cxx index 2b806426a1..0882bd9596 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameter.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameter.cxx @@ -102,9 +102,9 @@ void InputImageParameter ::ClearValue() { - m_Image = ITK_NULLPTR; - m_Reader = ITK_NULLPTR; - m_Caster = ITK_NULLPTR; + m_Image = nullptr; + m_Reader = nullptr; + m_Caster = nullptr; m_FileName = ""; m_PreviousFileName=""; m_UseFilename = true; diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx index 8287525aa6..b2d5d37c62 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputProcessXMLParameter.cxx @@ -156,7 +156,7 @@ InputProcessXMLParameter::GetChildNodeTextOf(TiXmlElement *parentElement, std::s if(parentElement) { - TiXmlElement* childElement = ITK_NULLPTR; + TiXmlElement* childElement = nullptr; childElement = parentElement->FirstChildElement(key.c_str()); //same as childElement->GetText() does but that call is failing if there is @@ -270,7 +270,7 @@ InputProcessXMLParameter::Read(Application::Pointer this_) ParameterGroup::Pointer paramGroup = this_->GetParameterList(); // Iterate through the parameter list - for( TiXmlElement* n_Parameter = n_AppNode->FirstChildElement("parameter"); n_Parameter != ITK_NULLPTR; + for( TiXmlElement* n_Parameter = n_AppNode->FirstChildElement("parameter"); n_Parameter != nullptr; n_Parameter = n_Parameter->NextSiblingElement() ) { std::string key,typeAsString, value, paramName; @@ -295,11 +295,11 @@ InputProcessXMLParameter::Read(Application::Pointer this_) param->SetUserValue(true); param->SetActive(true); - TiXmlElement* n_Values = ITK_NULLPTR; + TiXmlElement* n_Values = nullptr; n_Values = n_Parameter->FirstChildElement("values"); if(n_Values) { - for(TiXmlElement* n_Value = n_Values->FirstChildElement("value"); n_Value != ITK_NULLPTR; + for(TiXmlElement* n_Value = n_Values->FirstChildElement("value"); n_Value != nullptr; n_Value = n_Value->NextSiblingElement()) { values.push_back(n_Value->GetText()); @@ -319,7 +319,7 @@ InputProcessXMLParameter::Read(Application::Pointer this_) OutputImageParameter * outImageParam = dynamic_cast< OutputImageParameter * >( param ); - assert( outImageParam!=ITK_NULLPTR ); + assert( outImageParam!=nullptr ); outImageParam->SetFileName( value ); @@ -337,19 +337,19 @@ InputProcessXMLParameter::Read(Application::Pointer this_) else if (type == ParameterType_ComplexOutputImage) { ComplexOutputImageParameter* paramDown = dynamic_cast<ComplexOutputImageParameter*>(param); - if(paramDown!=ITK_NULLPTR) + if(paramDown!=nullptr) paramDown->SetFileName(value); } else if (type == ParameterType_Directory) { DirectoryParameter* paramDown = dynamic_cast<DirectoryParameter*>(param); - if(paramDown!=ITK_NULLPTR) + if(paramDown!=nullptr) paramDown->SetValue(value); } else if (type == ParameterType_InputFilename) { InputFilenameParameter* paramDown = dynamic_cast<InputFilenameParameter*>(param); - if(paramDown!=ITK_NULLPTR) + if(paramDown!=nullptr) paramDown->SetValue(value); } else if (type == ParameterType_InputImage) @@ -357,7 +357,7 @@ InputProcessXMLParameter::Read(Application::Pointer this_) if(itksys::SystemTools::FileExists(value.c_str())) { InputImageParameter* paramDown = dynamic_cast<InputImageParameter*>(param); - if(paramDown!=ITK_NULLPTR) + if(paramDown!=nullptr) { paramDown->SetFromFileName(value); if (!paramDown->SetFromFileName(value)) @@ -376,7 +376,7 @@ InputProcessXMLParameter::Read(Application::Pointer this_) if(itksys::SystemTools::FileExists(value.c_str())) { ComplexInputImageParameter* paramDown = dynamic_cast<ComplexInputImageParameter*>(param); - if(paramDown!=ITK_NULLPTR) + if(paramDown!=nullptr) paramDown->SetFromFileName(value); } } diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputVectorDataParameter.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputVectorDataParameter.cxx index f60cf29078..c896d3acb8 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputVectorDataParameter.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputVectorDataParameter.cxx @@ -107,8 +107,8 @@ InputVectorDataParameter::HasValue() const void InputVectorDataParameter::ClearValue() { - m_VectorData = ITK_NULLPTR; - m_Reader = ITK_NULLPTR; + m_VectorData = nullptr; + m_Reader = nullptr; m_FileName = ""; } diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperOutputProcessXMLParameter.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperOutputProcessXMLParameter.cxx index cc2f69e995..22791595c0 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperOutputProcessXMLParameter.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperOutputProcessXMLParameter.cxx @@ -45,7 +45,7 @@ namespace otb namespace Wrapper { OutputProcessXMLParameter::OutputProcessXMLParameter() - : m_Node(ITK_NULLPTR) + : m_Node(nullptr) , m_Appli() { this->SetKey("outxml"); @@ -192,8 +192,8 @@ OutputProcessXMLParameter::ParseApplication(Application::Pointer app) this->ParseGroup(std::string("")); // reset temporary members - m_Appli = ITK_NULLPTR; - m_Node = ITK_NULLPTR; + m_Appli = nullptr; + m_Node = nullptr; return n_App; } @@ -248,7 +248,7 @@ OutputProcessXMLParameter::ParseGroup(const std::string& group) { EmptyParameter* eParam = dynamic_cast<EmptyParameter *> (param); - if(eParam!=ITK_NULLPTR) + if(eParam!=nullptr) { //Don't use m_Appli->HasUserValue which returns false always because of //EmptyParameter::HasValue() is false for EmptyParameter @@ -278,7 +278,7 @@ OutputProcessXMLParameter::ParseGroup(const std::string& group) { OutputImageParameter *imgParam = dynamic_cast<OutputImageParameter *>(param); - if(imgParam!=ITK_NULLPTR) + if(imgParam!=nullptr) { value = imgParam->GetFileName(); ImagePixelType pixType = imgParam->GetPixelType(); diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperParameterGroup.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperParameterGroup.cxx index 9846f99ce4..55095184e5 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperParameterGroup.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperParameterGroup.cxx @@ -176,7 +176,7 @@ const std::string defaultXMLFileName = std::string(GetName()) + ".xml"; tmpParam->SetActive(false); AddParameter(tmpParam); - tmpParam = ITK_NULLPTR; + tmpParam = nullptr; /* AddParameter(ParameterType_OutputProcessXML, key, descr); SetParameterDescription(key, descr); @@ -196,7 +196,7 @@ void ParameterGroup::AddInXMLParameter() tmpParam->SetActive(false); AddParameter(tmpParam); - tmpParam = ITK_NULLPTR; + tmpParam = nullptr; /* AddParameter(ParameterType_InputProcessXML, key, descr); SetParameterDescription(key, descr); @@ -858,7 +858,7 @@ ParameterGroup::GetNumberOfParameters() Parameter* ParameterGroup::ResolveParameter(Parameter *param) { Parameter* ret = param; - if (ret == ITK_NULLPTR) + if (ret == nullptr) { itkGenericExceptionMacro("Can't resolve NULL parameter!"); } diff --git a/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx b/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx index 72f8b84d95..84be8cd5e5 100644 --- a/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx +++ b/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx @@ -107,18 +107,18 @@ std::string PrepareExpressionFromXML(std::string filename) expression.append(moduleName); - for( TiXmlElement* n_Parameter = n_AppNode->FirstChildElement("parameter"); n_Parameter != ITK_NULLPTR; + for( TiXmlElement* n_Parameter = n_AppNode->FirstChildElement("parameter"); n_Parameter != nullptr; n_Parameter = n_Parameter->NextSiblingElement() ) { std::string key="-"; key.append(GetChildNodeTextOf(n_Parameter, "key")); - TiXmlElement* n_Values = ITK_NULLPTR; + TiXmlElement* n_Values = nullptr; n_Values = n_Parameter->FirstChildElement("values"); if(n_Values) { std::string values; - for(TiXmlElement* n_Value = n_Values->FirstChildElement("value"); n_Value != ITK_NULLPTR; + for(TiXmlElement* n_Value = n_Values->FirstChildElement("value"); n_Value != nullptr; n_Value = n_Value->NextSiblingElement()) { values.append(n_Value->GetText()); @@ -204,19 +204,19 @@ std::vector<std::string> PrepareVectorExpressionFromXML(std::string filename) expression.push_back(CleanWord(moduleName)); - for( TiXmlElement* n_Parameter = n_AppNode->FirstChildElement("parameter"); n_Parameter != ITK_NULLPTR; + for( TiXmlElement* n_Parameter = n_AppNode->FirstChildElement("parameter"); n_Parameter != nullptr; n_Parameter = n_Parameter->NextSiblingElement() ) { std::string key="-"; key.append(GetChildNodeTextOf(n_Parameter, "key")); expression.push_back(CleanWord(key)); - TiXmlElement* n_Values = ITK_NULLPTR; + TiXmlElement* n_Values = nullptr; n_Values = n_Parameter->FirstChildElement("values"); if(n_Values) { std::string values; - for(TiXmlElement* n_Value = n_Values->FirstChildElement("value"); n_Value != ITK_NULLPTR; + for(TiXmlElement* n_Value = n_Values->FirstChildElement("value"); n_Value != nullptr; n_Value = n_Value->NextSiblingElement()) { expression.push_back(CleanWord(n_Value->GetText())); @@ -320,7 +320,7 @@ const std::string GetChildNodeTextOf(TiXmlElement *parentElement, std::string ke if(parentElement) { - TiXmlElement* childElement = ITK_NULLPTR; + TiXmlElement* childElement = nullptr; childElement = parentElement->FirstChildElement(key.c_str()); //same as childElement->GetText() does but that call is failing if there is diff --git a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx index 1f9820268a..e0a324191d 100644 --- a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx +++ b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx @@ -59,7 +59,7 @@ namespace Wrapper CommandLineLauncher::CommandLineLauncher() : /*m_Expression(""),*/m_VExpression(), m_WatcherList(), m_ReportProgress(true) { - m_Application = ITK_NULLPTR; + m_Application = nullptr; m_Parser = CommandLineParser::New(); m_LogOutput = itk::StdStreamLogOutput::New(); m_LogOutput->SetStream(std::cout); @@ -72,7 +72,7 @@ CommandLineLauncher::CommandLineLauncher() : CommandLineLauncher::~CommandLineLauncher() { this->DeleteWatcherList(); - m_Application = ITK_NULLPTR; + m_Application = nullptr; ApplicationRegistry::CleanRegistry(); } @@ -81,7 +81,7 @@ void CommandLineLauncher::DeleteWatcherList() for (unsigned int i = 0; i < m_WatcherList.size(); i++) { delete m_WatcherList[i]; - m_WatcherList[i] = ITK_NULLPTR; + m_WatcherList[i] = nullptr; } m_WatcherList.clear(); } diff --git a/Modules/Wrappers/QtWidget/src/otbApplicationLauncherQt.cxx b/Modules/Wrappers/QtWidget/src/otbApplicationLauncherQt.cxx index 529ce721f9..eedad2ebc4 100644 --- a/Modules/Wrappers/QtWidget/src/otbApplicationLauncherQt.cxx +++ b/Modules/Wrappers/QtWidget/src/otbApplicationLauncherQt.cxx @@ -112,7 +112,7 @@ int main(int argc, char* argv[]) // Clean resources delete mainWindow; - app = ITK_NULLPTR; + app = nullptr; ApplicationRegistry::CleanRegistry(); return ret; diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetChoiceParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetChoiceParameter.cxx index 078064cba3..3e21457687 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetChoiceParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetChoiceParameter.cxx @@ -32,10 +32,10 @@ QtWidgetChoiceParameter::QtWidgetChoiceParameter( ChoiceParameter* param, QtWidgetModel* m ) : QtWidgetParameterBase(param, m), m_ChoiceParam(param), - m_ComboBox( ITK_NULLPTR ), - m_StackWidget( ITK_NULLPTR ), - m_VLayout( ITK_NULLPTR ), - m_VLayoutGroup( ITK_NULLPTR ), + m_ComboBox( nullptr ), + m_StackWidget( nullptr ), + m_VLayout( nullptr ), + m_VLayoutGroup( nullptr ), m_WidgetList() { } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputFilenameParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputFilenameParameter.cxx index d7e766a004..49d0161a5e 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputFilenameParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputFilenameParameter.cxx @@ -31,9 +31,9 @@ namespace Wrapper QtWidgetInputFilenameParameter::QtWidgetInputFilenameParameter(InputFilenameParameter* param, QtWidgetModel* m) : QtWidgetParameterBase(param, m), m_FilenameParam(param), - m_HLayout( ITK_NULLPTR ), - m_Input( ITK_NULLPTR ), - m_Button( ITK_NULLPTR ) + m_HLayout( nullptr ), + m_Input( nullptr ), + m_Button( nullptr ) { } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputImageParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputImageParameter.cxx index 776c51897f..3146f4cb04 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputImageParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputImageParameter.cxx @@ -35,9 +35,9 @@ namespace Wrapper QtWidgetInputImageParameter::QtWidgetInputImageParameter(InputImageParameter* param, QtWidgetModel* m) : QtWidgetParameterBase(param, m), m_InputImageParam(param), - m_HLayout( ITK_NULLPTR ), - m_Input( ITK_NULLPTR ), - m_Button( ITK_NULLPTR ) + m_HLayout( nullptr ), + m_Input( nullptr ), + m_Button( nullptr ) { } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputVectorDataParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputVectorDataParameter.cxx index d5956e3367..de0c2ccf8f 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputVectorDataParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputVectorDataParameter.cxx @@ -30,9 +30,9 @@ namespace Wrapper QtWidgetInputVectorDataParameter::QtWidgetInputVectorDataParameter(InputVectorDataParameter* param, QtWidgetModel* m) : QtWidgetParameterBase(param, m), m_InputVectorDataParam(param), - m_HLayout( ITK_NULLPTR ), - m_Input( ITK_NULLPTR ), - m_Button( ITK_NULLPTR ) + m_HLayout( nullptr ), + m_Input( nullptr ), + m_Button( nullptr ) { } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterFactory.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterFactory.cxx index f675050e23..b7af5852ff 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterFactory.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterFactory.cxx @@ -68,12 +68,12 @@ public: static bool CanCreate( Parameter* param ) { - return dynamic_cast<TParameterType *>(param) != ITK_NULLPTR; + return dynamic_cast<TParameterType *>(param) != nullptr; } static QtWidgetParameterBase* Create( Parameter* param, QtWidgetModel* model ) { - QtWidgetParameterBase * widget = ITK_NULLPTR; + QtWidgetParameterBase * widget = nullptr; TParameterType * specificParam = dynamic_cast< TParameterType * >( param ); // Code should break if param is not a TParameterType and not be silent! @@ -96,7 +96,7 @@ QtWidgetParameterFactory::~QtWidgetParameterFactory() QtWidgetParameterBase* QtWidgetParameterFactory::CreateQtWidget( Parameter* param, QtWidgetModel* model ) { - QtWidgetParameterBase* widget = ITK_NULLPTR; + QtWidgetParameterBase* widget = nullptr; #define CREATEWIDGET( ParameterType, WidgetType ) \ else if ( QtWidgetParameterGenericFactory<ParameterType, WidgetType>::CanCreate(param) ) \ diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterGroup.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterGroup.cxx index b9ba4673cb..cfd3ca2509 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterGroup.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterGroup.cxx @@ -60,7 +60,7 @@ void QtWidgetParameterGroup::DoCreateWidget() Parameter* param = m_ParamList->GetParameterByIndex(i); Parameter* rawParam = m_ParamList->GetParameterByIndex(i,false); - if (param != ITK_NULLPTR) + if (param != nullptr) { ParameterGroup* paramAsGroup = dynamic_cast<ParameterGroup*>(param); ChoiceParameter* paramAsChoice = dynamic_cast<ChoiceParameter*>(param); @@ -68,10 +68,10 @@ void QtWidgetParameterGroup::DoCreateWidget() InputProcessXMLParameter* paramAsOutXML = dynamic_cast<InputProcessXMLParameter*>(param); bool paramIsXML = false; - if(paramAsInXML != ITK_NULLPTR || paramAsOutXML != ITK_NULLPTR) + if(paramAsInXML != nullptr || paramAsOutXML != nullptr) paramIsXML = true; - if (paramAsGroup == ITK_NULLPTR && paramAsChoice == ITK_NULLPTR && !paramIsXML) + if (paramAsGroup == nullptr && paramAsChoice == nullptr && !paramIsXML) { // Label (col 1) QWidget* label = new QtWidgetParameterLabel( rawParam ); diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetProgressReport.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetProgressReport.cxx index cb50f08f8c..e3e5447312 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetProgressReport.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetProgressReport.cxx @@ -99,7 +99,7 @@ void QtWidgetProgressReport::RemoveLayout() { // Remove the children of the layout (progress bar widgets) QLayoutItem *child; - while ((child = this->layout()->takeAt(0)) != ITK_NULLPTR) + while ((child = this->layout()->takeAt(0)) != nullptr) { delete child->widget(); delete child; diff --git a/Modules/Wrappers/SWIG/src/python/itkPyCommand.cxx b/Modules/Wrappers/SWIG/src/python/itkPyCommand.cxx index db1ac2193c..75975c5254 100644 --- a/Modules/Wrappers/SWIG/src/python/itkPyCommand.cxx +++ b/Modules/Wrappers/SWIG/src/python/itkPyCommand.cxx @@ -26,7 +26,7 @@ namespace itk PyCommand::PyCommand() { - this->obj = ITK_NULLPTR; + this->obj = nullptr; } PyCommand::~PyCommand() @@ -35,7 +35,7 @@ PyCommand::~PyCommand() { Py_DECREF(this->obj); } - this->obj = ITK_NULLPTR; + this->obj = nullptr; } void PyCommand::SetCommandCallable(PyObject *theObj) @@ -92,7 +92,7 @@ void PyCommand::PyExecute() { PyObject *result; - result = PyEval_CallObject(this->obj, (PyObject *)ITK_NULLPTR); + result = PyEval_CallObject(this->obj, (PyObject *)nullptr); if (result) { -- GitLab